@funhub/platform 0.1.57 → 0.1.59

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 (215) hide show
  1. package/dist/assets/icons/filter_dark.mjs +1 -1
  2. package/dist/biz.d.mts +15 -15
  3. package/dist/biz.mjs +1 -1
  4. package/dist/components/biz/business/comment/comment-list.mjs +1 -1
  5. package/dist/components/biz/business/detail/shared/detail-follow-action.mjs +2 -0
  6. package/dist/components/biz/business/detail/shared/detail-info-tags.mjs +2 -0
  7. package/dist/components/biz/business/detail/shared/detail-info-title.mjs +2 -0
  8. package/dist/components/biz/business/detail/shared/detail-introduction.mjs +2 -0
  9. package/dist/components/biz/business/detail/shared/detail-operate.mjs +2 -0
  10. package/dist/components/biz/business/detail/shared/post-recommend-list.mjs +2 -0
  11. package/dist/components/biz/business/detail/{materials → shared}/registry.d.mts +20 -20
  12. package/dist/components/biz/business/detail/shared/registry.mjs +2 -0
  13. package/dist/components/biz/business/detail/shared/seo-config.mjs +2 -0
  14. package/dist/components/biz/business/detail/shared/video-hero.mjs +2 -0
  15. package/dist/components/biz/business/detail/{materials/video-detail-actions → video-detail-actions}/client.d.mts +1 -1
  16. package/dist/components/biz/business/detail/video-detail-actions/client.mjs +2 -0
  17. package/dist/components/biz/business/detail/{materials/video-detail-actions → video-detail-actions}/material.d.mts +2 -2
  18. package/dist/components/biz/business/detail/video-detail-actions/material.mjs +2 -0
  19. package/dist/components/biz/business/detail/{materials/video-detail-actions → video-detail-actions}/schema.d.mts +3 -3
  20. package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +2 -0
  21. package/dist/components/biz/business/detail/{materials/video-detail-actions → video-detail-actions}/server.d.mts +1 -1
  22. package/dist/components/biz/business/detail/{materials/video-detail-info → video-detail-info}/client.d.mts +1 -1
  23. package/dist/components/biz/business/detail/video-detail-info/client.mjs +2 -0
  24. package/dist/components/biz/business/detail/{materials/video-detail-info → video-detail-info}/material.d.mts +4 -4
  25. package/dist/components/biz/business/detail/video-detail-info/material.mjs +2 -0
  26. package/dist/components/biz/business/detail/{materials/video-detail-info → video-detail-info}/schema.d.mts +3 -3
  27. package/dist/components/biz/business/detail/video-detail-info/schema.mjs +2 -0
  28. package/dist/components/biz/business/detail/{materials/video-detail-info → video-detail-info}/server.d.mts +1 -1
  29. package/dist/components/biz/business/detail/{materials/video-detail-info-title → video-detail-info-title}/client.d.mts +1 -1
  30. package/dist/components/biz/business/detail/video-detail-info-title/client.mjs +2 -0
  31. package/dist/components/biz/business/detail/{materials/video-detail-info-title → video-detail-info-title}/material.d.mts +2 -2
  32. package/dist/components/biz/business/detail/video-detail-info-title/material.mjs +2 -0
  33. package/dist/components/biz/business/detail/{materials/video-detail-info-title → video-detail-info-title}/schema.d.mts +3 -3
  34. package/dist/components/biz/business/detail/video-detail-info-title/schema.mjs +2 -0
  35. package/dist/components/biz/business/detail/{materials/video-detail-info-title → video-detail-info-title}/server.d.mts +1 -1
  36. package/dist/components/biz/business/detail/{materials/video-detail-info-title-tags-episodes → video-detail-info-title-tags-episodes}/client.d.mts +1 -1
  37. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/client.mjs +2 -0
  38. package/dist/components/biz/business/detail/{materials/video-detail-info-title-tags-episodes → video-detail-info-title-tags-episodes}/material.d.mts +4 -4
  39. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs +2 -0
  40. package/dist/components/biz/business/detail/{materials/video-detail-info-title-tags-episodes → video-detail-info-title-tags-episodes}/schema.d.mts +3 -3
  41. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +2 -0
  42. package/dist/components/biz/business/detail/{materials/video-detail-info-title-tags-episodes → video-detail-info-title-tags-episodes}/server.d.mts +1 -1
  43. package/dist/components/biz/business/detail/{materials/video-detail-player → video-detail-player}/client.d.mts +1 -1
  44. package/dist/components/biz/business/detail/video-detail-player/client.mjs +2 -0
  45. package/dist/components/biz/business/detail/{materials/video-detail-player → video-detail-player}/material.d.mts +2 -2
  46. package/dist/components/biz/business/detail/video-detail-player/material.mjs +2 -0
  47. package/dist/components/biz/business/detail/{materials/video-detail-player → video-detail-player}/schema.d.mts +3 -3
  48. package/dist/components/biz/business/detail/video-detail-player/schema.mjs +2 -0
  49. package/dist/components/biz/business/detail/{materials/video-detail-player → video-detail-player}/server.d.mts +1 -1
  50. package/dist/components/biz/business/detail/{materials/video-detail-recommend → video-detail-recommend}/client.d.mts +1 -1
  51. package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +2 -0
  52. package/dist/components/biz/business/detail/{materials/video-detail-recommend → video-detail-recommend}/material.d.mts +4 -4
  53. package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +2 -0
  54. package/dist/components/biz/business/detail/{materials/video-detail-recommend → video-detail-recommend}/schema.d.mts +3 -3
  55. package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +2 -0
  56. package/dist/components/biz/business/detail/{materials/video-detail-recommend → video-detail-recommend}/server.d.mts +1 -1
  57. package/dist/components/biz/business/home-recommend/home-recommend-grid/client.d.mts +24 -0
  58. package/dist/components/biz/business/home-recommend/home-recommend-grid/client.mjs +2 -0
  59. package/dist/components/biz/business/home-recommend/home-recommend-grid/index.d.mts +6 -0
  60. package/dist/components/biz/business/home-recommend/home-recommend-grid/index.mjs +2 -0
  61. package/dist/components/biz/business/home-recommend/{variants/home-recommend-grid → home-recommend-grid}/inspector-schema.d.mts +4 -4
  62. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +2 -0
  63. package/dist/components/biz/business/home-recommend/{variants/home-recommend-grid → home-recommend-grid}/material.d.mts +6 -6
  64. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.mjs +2 -0
  65. package/dist/components/biz/business/home-recommend/home-recommend-grid/schema.d.mts +11 -0
  66. package/dist/components/biz/business/home-recommend/home-recommend-grid/schema.mjs +2 -0
  67. package/dist/components/biz/business/home-recommend/{variants/home-recommend-grid → home-recommend-grid}/server.d.mts +2 -2
  68. package/dist/components/biz/business/home-recommend/home-recommend-grid/server.mjs +2 -0
  69. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.d.mts +24 -0
  70. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.mjs +2 -0
  71. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/index.d.mts +6 -0
  72. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/index.mjs +2 -0
  73. package/dist/components/biz/business/home-recommend/{variants/home-recommend-waterfall → home-recommend-waterfall}/inspector-schema.d.mts +7 -4
  74. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +2 -0
  75. package/dist/components/biz/business/home-recommend/{variants/home-recommend-waterfall → home-recommend-waterfall}/material.d.mts +8 -6
  76. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.mjs +2 -0
  77. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/schema.d.mts +11 -0
  78. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/schema.mjs +2 -0
  79. package/dist/components/biz/business/home-recommend/{variants/home-recommend-waterfall → home-recommend-waterfall}/server.d.mts +2 -2
  80. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/server.mjs +2 -0
  81. package/dist/components/biz/business/home-recommend/index.d.mts +12 -12
  82. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
  83. package/dist/components/biz/business/home-recommend/shared/home-recommend-default-config.mjs +1 -1
  84. package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
  85. package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -1
  86. package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +1 -1
  87. package/dist/components/biz/business/home-recommend/types.d.mts +1 -5
  88. package/dist/components/biz/business/{video-horizontal-list → image-text-recommend}/client.d.mts +14 -3
  89. package/dist/components/biz/business/image-text-recommend/client.mjs +2 -0
  90. package/dist/components/biz/business/image-text-recommend/index.d.mts +5 -0
  91. package/dist/components/biz/business/{video-horizontal-list → image-text-recommend}/material.d.mts +2 -3
  92. package/dist/components/biz/business/{video-horizontal-list → image-text-recommend}/schema.d.mts +1 -2
  93. package/dist/components/biz/business/image-text-recommend/schema.mjs +2 -0
  94. package/dist/components/biz/business/image-text-recommend/server.d.mts +13 -0
  95. package/dist/components/biz/business/image-text-recommend/server.mjs +2 -0
  96. package/dist/components/biz/business/index.d.mts +16 -16
  97. package/dist/components/biz/business/marquee/material.d.mts +1 -1
  98. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -1
  99. package/dist/components/biz/business/profile/profile-header/server.d.mts +1 -1
  100. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
  101. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +1 -1
  102. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +1 -1
  103. package/dist/components/biz/business/search-bar/variants/detail-search-bar/runtime/client.mjs +1 -1
  104. package/dist/components/biz/utils/transformers/data.mjs +1 -1
  105. package/dist/components/pages/collection-detail/detail.mjs +1 -1
  106. package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -1
  107. package/dist/components/pages/post-detail/post-detail-client.mjs +1 -1
  108. package/dist/components/pages/video-detail/page.mjs +1 -1
  109. package/dist/components/pages/video-detail/video-detail-client.d.mts +1 -1
  110. package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
  111. package/dist/components/pages/video-list/index.mjs +1 -1
  112. package/dist/components/pages/video-list/video-list-client.mjs +1 -1
  113. package/dist/components/ui/badge.d.mts +1 -1
  114. package/dist/components/ui/button.d.mts +2 -2
  115. package/dist/hooks/video-horizontal-list.d.mts +17 -0
  116. package/dist/hooks/video-horizontal-list.mjs +2 -0
  117. package/dist/hooks.d.mts +2 -1
  118. package/dist/hooks.mjs +1 -1
  119. package/dist/i18n/locales/en.mjs +1 -1
  120. package/dist/i18n/locales/zh-CN.mjs +1 -1
  121. package/dist/materials.d.mts +15 -15
  122. package/dist/materials.mjs +1 -1
  123. package/dist/service/generated/client.d.mts +171 -275
  124. package/dist/service/generated/client.mjs +1 -1
  125. package/dist/service/generated/tanstack.d.mts +172 -302
  126. package/dist/service/generated/tanstack.mjs +1 -1
  127. package/dist/service.d.mts +3 -6
  128. package/dist/service.mjs +1 -1
  129. package/dist/types/community-types.d.mts +46 -0
  130. package/dist/types.d.mts +2732 -5699
  131. package/dist/utils/follow-service.d.mts +4 -4
  132. package/package.json +1 -1
  133. package/dist/components/biz/business/detail/detail-follow-action.mjs +0 -2
  134. package/dist/components/biz/business/detail/detail-info-tags.mjs +0 -2
  135. package/dist/components/biz/business/detail/detail-info-title.mjs +0 -2
  136. package/dist/components/biz/business/detail/detail-introduction.mjs +0 -2
  137. package/dist/components/biz/business/detail/detail-operate.mjs +0 -2
  138. package/dist/components/biz/business/detail/materials/registry.mjs +0 -2
  139. package/dist/components/biz/business/detail/materials/video-detail-actions/client.mjs +0 -2
  140. package/dist/components/biz/business/detail/materials/video-detail-actions/material.mjs +0 -2
  141. package/dist/components/biz/business/detail/materials/video-detail-actions/schema.mjs +0 -2
  142. package/dist/components/biz/business/detail/materials/video-detail-info/client.mjs +0 -2
  143. package/dist/components/biz/business/detail/materials/video-detail-info/material.mjs +0 -2
  144. package/dist/components/biz/business/detail/materials/video-detail-info/schema.mjs +0 -2
  145. package/dist/components/biz/business/detail/materials/video-detail-info-title/client.mjs +0 -2
  146. package/dist/components/biz/business/detail/materials/video-detail-info-title/material.mjs +0 -2
  147. package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.mjs +0 -2
  148. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.mjs +0 -2
  149. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.mjs +0 -2
  150. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.mjs +0 -2
  151. package/dist/components/biz/business/detail/materials/video-detail-player/client.mjs +0 -2
  152. package/dist/components/biz/business/detail/materials/video-detail-player/material.mjs +0 -2
  153. package/dist/components/biz/business/detail/materials/video-detail-player/schema.mjs +0 -2
  154. package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +0 -2
  155. package/dist/components/biz/business/detail/materials/video-detail-recommend/material.mjs +0 -2
  156. package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.mjs +0 -2
  157. package/dist/components/biz/business/detail/post-recommend-list.mjs +0 -2
  158. package/dist/components/biz/business/detail/seo-config.mjs +0 -2
  159. package/dist/components/biz/business/detail/video-hero.mjs +0 -2
  160. package/dist/components/biz/business/home-recommend/shared/home-recommend-feed-mode.mjs +0 -2
  161. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/index.d.mts +0 -6
  162. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/index.mjs +0 -2
  163. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.mjs +0 -2
  164. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.mjs +0 -2
  165. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/prefetch-client.d.mts +0 -27
  166. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/prefetch-client.mjs +0 -2
  167. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/component.mjs +0 -2
  168. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/data.schema.mjs +0 -2
  169. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/event.schema.mjs +0 -2
  170. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/index.d.mts +0 -8
  171. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/index.mjs +0 -2
  172. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/style.schema.mjs +0 -2
  173. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/server.mjs +0 -2
  174. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/index.d.mts +0 -6
  175. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/index.mjs +0 -2
  176. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs +0 -2
  177. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.mjs +0 -2
  178. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/prefetch-client.d.mts +0 -27
  179. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/prefetch-client.mjs +0 -2
  180. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/component.mjs +0 -2
  181. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/data.schema.mjs +0 -2
  182. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/event.schema.mjs +0 -2
  183. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/index.d.mts +0 -8
  184. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/index.mjs +0 -2
  185. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/style.schema.mjs +0 -2
  186. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/server.mjs +0 -2
  187. package/dist/components/biz/business/video-horizontal-list/client.mjs +0 -2
  188. package/dist/components/biz/business/video-horizontal-list/index.d.mts +0 -5
  189. package/dist/components/biz/business/video-horizontal-list/schema.mjs +0 -2
  190. package/dist/components/biz/business/video-horizontal-list/server.d.mts +0 -12
  191. package/dist/components/biz/business/video-horizontal-list/server.mjs +0 -2
  192. package/dist/service/batch-get-video-detail.d.mts +0 -21
  193. package/dist/service/batch-get-video-detail.mjs +0 -2
  194. package/dist/service/content-batch-get-video-detail.d.mts +0 -21
  195. package/dist/service/content-batch-get-video-detail.mjs +0 -2
  196. package/dist/service/get-popular-video-list-post.d.mts +0 -8
  197. package/dist/service/get-popular-video-list-post.mjs +0 -2
  198. /package/dist/components/biz/business/detail/{detail-structured-data.mjs → shared/detail-structured-data.mjs} +0 -0
  199. /package/dist/components/biz/business/detail/{materials → shared}/editor-preview.mjs +0 -0
  200. /package/dist/components/biz/business/detail/{metadata-utils.mjs → shared/metadata-utils.mjs} +0 -0
  201. /package/dist/components/biz/business/detail/{materials → shared}/runtime-context-provider.mjs +0 -0
  202. /package/dist/components/biz/business/detail/{materials/video-detail-actions → video-detail-actions}/index.d.mts +0 -0
  203. /package/dist/components/biz/business/detail/{materials/video-detail-actions → video-detail-actions}/server.mjs +0 -0
  204. /package/dist/components/biz/business/detail/{materials/video-detail-info → video-detail-info}/index.d.mts +0 -0
  205. /package/dist/components/biz/business/detail/{materials/video-detail-info → video-detail-info}/server.mjs +0 -0
  206. /package/dist/components/biz/business/detail/{materials/video-detail-info-title → video-detail-info-title}/index.d.mts +0 -0
  207. /package/dist/components/biz/business/detail/{materials/video-detail-info-title → video-detail-info-title}/server.mjs +0 -0
  208. /package/dist/components/biz/business/detail/{materials/video-detail-info-title-tags-episodes → video-detail-info-title-tags-episodes}/index.d.mts +0 -0
  209. /package/dist/components/biz/business/detail/{materials/video-detail-info-title-tags-episodes → video-detail-info-title-tags-episodes}/server.mjs +0 -0
  210. /package/dist/components/biz/business/detail/{materials/video-detail-player → video-detail-player}/index.d.mts +0 -0
  211. /package/dist/components/biz/business/detail/{materials/video-detail-player → video-detail-player}/server.mjs +0 -0
  212. /package/dist/components/biz/business/detail/{materials/video-detail-recommend → video-detail-recommend}/index.d.mts +0 -0
  213. /package/dist/components/biz/business/detail/{materials/video-detail-recommend → video-detail-recommend}/server.mjs +0 -0
  214. /package/dist/components/biz/business/detail/{materials/video-detail-recommend → video-detail-recommend}/utils.mjs +0 -0
  215. /package/dist/components/biz/business/{video-horizontal-list → image-text-recommend}/material.mjs +0 -0
@@ -1,5 +1,5 @@
1
1
 
2
- import { CommunityCheckFollowResponse, CommunityFollowResponse, CommunityUnfollowResponse, PostApiInteractionCheckFollowReqBody, PostApiInteractionFollowReqBody, PostApiInteractionUnfollowReqBody } from "../types.mjs";
2
+ import { InteractionCheckFollowResponse, InteractionFollowResponse, InteractionUnfollowResponse, PostApiInteractionCheckFollowReqBody, PostApiInteractionFollowReqBody, PostApiInteractionUnfollowReqBody } from "../types.mjs";
3
3
 
4
4
  //#region utils/follow-service.d.ts
5
5
  /**
@@ -10,7 +10,7 @@ import { CommunityCheckFollowResponse, CommunityFollowResponse, CommunityUnfollo
10
10
  declare function followUser(params: PostApiInteractionFollowReqBody): Promise<{
11
11
  success: boolean;
12
12
  message: string;
13
- data: CommunityFollowResponse;
13
+ data: InteractionFollowResponse;
14
14
  } | {
15
15
  success: boolean;
16
16
  message: string;
@@ -24,7 +24,7 @@ declare function followUser(params: PostApiInteractionFollowReqBody): Promise<{
24
24
  declare function unfollowUser(params: PostApiInteractionUnfollowReqBody): Promise<{
25
25
  success: boolean;
26
26
  message: string;
27
- data: CommunityUnfollowResponse;
27
+ data: InteractionUnfollowResponse;
28
28
  } | {
29
29
  success: boolean;
30
30
  message: string;
@@ -38,7 +38,7 @@ declare function unfollowUser(params: PostApiInteractionUnfollowReqBody): Promis
38
38
  declare function checkFollowStatus(data: PostApiInteractionCheckFollowReqBody): Promise<{
39
39
  success: boolean;
40
40
  message: string;
41
- data: CommunityCheckFollowResponse;
41
+ data: InteractionCheckFollowResponse;
42
42
  } | {
43
43
  success: boolean;
44
44
  message: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funhub/platform",
3
3
  "type": "module",
4
- "version": "0.1.57",
4
+ "version": "0.1.59",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{cn as e}from"../../../../utils/cn.mjs";import{useFollowIdsState as t}from"../../../../store/modules/follow-ids-store.mjs";import{useUserStore as n}from"../../../../store/modules/user-store.mjs";import{followUser as r,unfollowUser as i}from"../../../../utils/follow-service.mjs";import a from"../../../../assets/icons/common/follow_sel.mjs";import o from"../../../../assets/icons/common/follow_user.mjs";import{UnfollowConfirmDialog as s}from"../../../common/follow-button/unfollow-confirm-dialog.mjs";import{useEffect as c,useState as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{useTranslations as p}from"next-intl";function m({information:e,onUpdate:a}){let{userId:o,userInfo:p}=n(),m=o||p?.userId||``,g=e.author,_=e.up_user||g?.user_id||``,v=!!(m&&_&&m===_),[y,b]=l(!!e.is_followed),[x,S]=l(!1),[C,w]=l(!1);c(()=>{b(!!e.is_followed)},[e.id,e.is_followed]);async function T(){if(!_){console.warn(`用户信息不完整,无法执行关注操作`);return}w(!0);let e=!y;try{let n;if(n=e?await r({app_id:0,follower_id:m,followee_id:_}):await i({app_id:0,follower_id:m,followee_id:_}),n.success){b(e),a({is_followed:e});let{followIds:n,setFollowIds:r}=t.getState(),i=new Set(n);e?i.add(_):i.delete(_),r(Array.from(i))}else console.error(`关注操作失败:`,n.message)}catch(e){console.error(`关注操作异常:`,e)}finally{w(!1)}}function E(){if(!C){if(y){S(!0);return}T()}}function D(){S(!1),T()}function O(){S(!1)}return f(u,{children:[e.up_user&&_&&!v?d(h,{followed:y,loading:C,onToggle:E}):null,d(s,{open:x,onOpenChange:S,onCancel:O,onConfirm:D})]})}function h({followed:t,loading:n=!1,onToggle:r}){let i=p(`components.biz.business.detail`);return d(`button`,{type:`button`,disabled:n,className:e(`flex h-7 items-center rounded-full border border-solid px-3 text-xs font-medium transition-colors`,n&&`opacity-50 cursor-not-allowed`,t?`border-text3 text-text3`:`border-theme5 text-theme5`),onClick:r,children:t?f(u,{children:[d(a,{className:`w-[12px] h-[12px] text-text3 shrink-0`}),d(`span`,{className:`text-text3 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:i(`detailFollowAction.following`)})]}):f(u,{children:[d(o,{className:`block w-[12px] h-[12px] text-theme5 shrink-0`}),d(`span`,{className:`block text-theme5 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:i(`detailFollowAction.follow`)})]})})}export{m as DetailFollowAction};
@@ -1,2 +0,0 @@
1
-
2
- import{Box as e}from"../../../ui/box.mjs";import{Text as t}from"../../../ui/text.mjs";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({tags:i,className:a=``}){return!i||i.length===0?null:n(e,{className:`flex items-center gap-[6px] overflow-x-auto overflow-y-hidden flex-nowrap [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden ${a}`,children:i.map((e,i)=>n(`div`,{className:`shrink-0 h-[28px] border-line1 border-[1px] rounded-[6px] px-[6px] flex items-center`,children:r(t,{className:`text-[14px] text-text1 leading-[20px]`,children:[`#`,e.name]})},`${i}-tag-${e.id}`))})}export{i as DetailInfoTags};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{Box as e}from"../../../ui/box.mjs";import t from"../../../../assets/icons/common/right_arrow.mjs";import{useEffect as n,useMemo as r,useRef as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({title:c,className:l=``}){let[u,d]=a(!1),[f,p]=a(!1),m=i(null),h=i(null),g=i(null),_=r(()=>c?.trim()??``,[c]);if(n(()=>{d(!1)},[_]),n(()=>{if(u){p(!0);return}if(!_){p(!1);return}let e=h.current,t=g.current;if(!e||!t){p(!1);return}let n=()=>{let n=e.clientWidth||e.getBoundingClientRect().width,r=t.getBoundingClientRect().width;p(r>n+1)};n();let r=new ResizeObserver(n);return r.observe(e),m.current&&r.observe(m.current),()=>{r.disconnect()}},[u,_]),!_)return null;function v(){d(e=>!e)}return s(e,{ref:m,className:`relative flex items-start min-w-0 ${l}`,children:[o(`span`,{ref:g,className:`absolute invisible whitespace-nowrap text-[20px] leading-[28px] font-bold`,children:_}),o(`p`,{ref:h,className:`flex-1 min-w-0 text-[20px] leading-[28px] font-bold text-text1 ${u?``:`line-clamp-1`}`,children:_}),f&&o(`button`,{type:`button`,className:`ml-[8px] h-[24px] w-[24px] flex items-center justify-center`,onClick:v,children:o(t,{className:`h-[12px] w-[12px] text-text2 transition-transform ${u?`-rotate-90`:`rotate-90`}`})})]})}export{c as DetailInfoTitle};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{Box as e}from"../../../ui/box.mjs";import{Text as t}from"../../../ui/text.mjs";import{useCardDecoration as n}from"../../../../hooks/use-card-decoration.mjs";import{DetailInfoTags as r}from"./detail-info-tags.mjs";import{DetailInfoTitle as i}from"./detail-info-title.mjs";import{useMemo as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{useTranslations as c}from"next-intl";function l({information:l,isShow:d,showTags:f=!0}){let p=c(`components.biz.business.detail`),{getTitleText:m}=n(),h=a(()=>m(l),[m,l]),g=a(()=>l.description||``,[l.description]),_=a(()=>u(l.score),[l.score]),v=l.tags||[],y=f&&v.length>0;return!h&&!g&&!y?null:s(e,{className:`w-full mt-4 px-[12px]`,children:[s(e,{className:`w-full flex items-start justify-between min-w-0`,children:[o(e,{className:`flex-1 pr-[12px] min-w-0`,children:o(i,{title:h})}),s(e,{className:`ml-4 shrink-0 flex flex-col items-center`,children:[o(e,{className:`text-[28px] leading-[36px] h-[36px] font-bold text-[#FF9F1A]`,children:_}),o(t,{className:`text-[12px] text-text2 leading-4`,children:p(`detailIntroduction.score`)})]})]}),g&&d&&o(t,{className:`mt-[12px] text-[14px] leading-[22px] text-text2`,children:g}),y&&o(r,{tags:v,className:`mt-[12px]`})]})}function u(e){let t=Number(e||`0`);return Number.isFinite(t)?(t>10?t/10:t).toFixed(1):`0`}export{l as DetailIntroduction};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{useUserStore as e}from"../../../../store/modules/user-store.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useLoginModalStore as r}from"../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as i}from"../../../../hooks/query/use-query.mjs";import{debounceFun as a}from"../../../../utils/tools.mjs";import o from"../../../common/interaction-animations.module.mjs";import s from"../../../common/collection-popup/index.mjs";import{useContentOperate as c}from"../../../../hooks/use-content-operate.mjs";import l from"../../../../assets/icons/detail/check-ok.mjs";import u from"../../../../assets/icons/detail/collect_nor.mjs";import d from"../../../../assets/icons/detail/collect_sel.mjs";import f from"../../../../assets/icons/detail/give_like.mjs";import p from"../../../../assets/icons/detail/give_like_sel.mjs";import m from"../../../../assets/icons/detail/share.mjs";import{useCallback as h,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{toast as x}from"sonner";import{useTranslations as S}from"next-intl";function C({mode:C=`renderer`,information:E,onUpdate:D}){let O=C===`editor`||!E?.id||E.id.startsWith(`preview-`),k=S(`components.biz.business.detail`),[A,j]=v(!1),[M,N]=v(!1),P=_(0),F=e(e=>e.userId),I=e(e=>e.isLogin),L=i(),R=h(()=>{F&&(L([`user-profile`,`mine`,F,`user-like-video`]),L([`user-profile`,`mine`,F,`user-like-post`]),L([`user-profile`,`mine`,F,`user-collect-video`,F]),L([`user-profile`,`mine`,F,`user-collect-post`,F]))},[L,F]),{likeAnimation:z,handleLikeOperate:B,handleDefaultCollectionOperate:V,handleShareOperate:H}=c({id:E.id,isLike:E.like||!1,isDislike:E.dislike||!1,isCollect:E.collect||!1,likeCnt:T(E.static?.like_cnt),dislikeCnt:T(E.static?.dislike_cnt),contentType:E.content_type,prefetchDefaultCollection:!O,animationClasses:{like:o.likeShakeAnimation,dislike:o.dislikeShakeAnimation}}),U=h(e=>{D?.({...e})},[D]),W=h(async()=>{if(A)return;if(!I){r.getState().open();return}let e=Date.now();if(e-P.current<300)return;P.current=e,j(!0);let t=E.like||!1,n=E.dislike||!1,i=T(E.static?.like_cnt),a=T(E.static?.dislike_cnt),o=!t,s=Math.max(0,i+(o?1:-1)),c=o?!1:n,l=o&&n?Math.max(0,a-1):a;U({like:o,dislike:c,static:{...E.static,like_cnt:s,dislike_cnt:l}});try{let e=await B();if(!e){U({like:t,dislike:n,static:{...E.static,like_cnt:i,dislike_cnt:a}});return}U({like:e.isLike,dislike:e.isDislike??c,static:{...E.static,like_cnt:e.likeCnt,dislike_cnt:e.dislikeCnt??l}}),R(),window.sensors?.track?.(`detail_like_click`,{object_id:E.id,action:e.isLike?`点赞`:`取消点赞`,like_count:e.likeCnt})}catch(e){console.error(`点赞操作失败:`,e),x.error(k(`detailOperate.operateFailed`))}finally{j(!1)}},[B,E,R,A,I,k,U]),G=g(()=>E.id,[E.id]),K=h(()=>{H(({isCollect:e})=>{U({collect:e})},G)},[H,G,U]);async function q(e){return await new Promise(e=>setTimeout(e,300)),e}let J=h(()=>{s.show({mode:`select`,onCollect:async e=>{try{await q({contentId:E.id,collectionId:e}),U({collect:!0}),R(),x.success(k(`detailOperate.modifyCollectionSuccess`))}catch(e){console.error(`修改收藏夹失败:`,e),x.error(k(`detailOperate.collectFailed`))}}})},[E.id,R,k,U]),Y=h(e=>{let t=e||k(`detailOperate.defaultCollection`);x.custom(e=>b(`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:[b(`div`,{className:`flex items-center gap-[10px]`,children:[y(`div`,{className:`w-[24px] h-[24px] rounded-full bg-white flex items-center justify-center`,children:y(l,{className:`w-[14px] h-[14px]`})}),b(`div`,{className:`flex items-center gap-[6px]`,children:[y(`span`,{className:`text-[14px] leading-[20px]`,children:k(`detailOperate.collectAdded`)}),y(`span`,{className:`text-[14px] leading-[20px] font-semibold`,children:t})]})]}),y(`button`,{type:`button`,className:`text-[14px] text-theme5 font-semibold`,onClick:()=>{x.dismiss(e),J()},children:k(`detailOperate.modifyCollection`)})]}))},[J,k]),X=h(async()=>{if(M)return;if(!I){r.getState().open();return}let e=E.collect||!1;N(!0),window.sensors?.track?.(`detail_fav_click`,{object_id:E.id,action:e?`取消收藏`:`收藏`});try{let t=await V({currentCollect:e,onUpdate:({isCollect:e})=>{U({collect:e})}});if(!t?.success){x.error(t?.message||k(`detailOperate.collectFailed`));return}R(),window.sensors?.track?.(`detail_fav_click`,{object_id:E.id,action:t.isCollect?`收藏`:`取消收藏`}),!e&&t.isCollect&&Y(t.collectionTitle)}catch(e){console.error(`收藏操作失败:`,e),x.error(e?.message||k(`detailOperate.collectFailed`))}finally{N(!1)}},[V,E.collect,E.id,R,M,I,Y,k,U]),Z=g(()=>a(X,300),[X]);return b(t,{className:`w-full h-[42px] mt-[16px] flex items-center justify-between ${O?`pointer-events-none`:``}`,children:[b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center ${A?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:W,children:[E.like?y(p,{className:`w-[20px] h-[20px] ${z.animationClass}`}):y(f,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:E.static?E.static.like_cnt===0?k(`detailOperate.like`):w(E.static?.like_cnt):k(`detailOperate.like`)})]}),b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center ${M?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:Z,children:[E.collect?y(d,{className:`w-[20px] h-[20px]`}):y(u,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:k(`detailOperate.collection`)})]}),b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center cursor-pointer`,onClick:K,children:[y(m,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:k(`detailOperate.share`)})]})]})}function w(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 T(e){if(e==null)return 0;if(typeof e==`number`)return e;let t=Number(e);return Number.isNaN(t)?0:t}export{C as DetailOperate};
@@ -1,2 +0,0 @@
1
-
2
- import{getSchemaDefaultProps as e}from"../../../../../utils/schema/schema.mjs";import{generateMaterialMap as t}from"../../../../../utils/schema/utils.mjs";import{videoDetailInfoMaterial as n}from"./video-detail-info/material.mjs";import{videoDetailInfoTitleMaterial as r}from"./video-detail-info-title/material.mjs";import{videoDetailInfoTitleTagsEpisodesMaterial as i}from"./video-detail-info-title-tags-episodes/material.mjs";import{videoDetailPlayerMaterial as a}from"./video-detail-player/material.mjs";import{videoDetailRecommendMaterial as o}from"./video-detail-recommend/material.mjs";import{videoDetailActionsMaterial as s}from"./video-detail-actions/material.mjs";function c(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>typeof t==`number`&&Number.isFinite(t)?[e,String(t)]:[e,t]))}function l(t,n){let r={...e(t.propsSchema),...n??{}},i=t.propsSchema.safeParse(r);if(i.success)return{isValid:!0,props:i.data};let a=c(r),o=t.propsSchema.safeParse(a);return o.success?{isValid:!0,props:o.data}:{isValid:!1,props:r}}const u=t([a,n,r,i,s,o]);export{l as resolveMaterialProps,u as videoDetailMaterials};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{DetailOperate as e}from"../../detail-operate.mjs";import{editorPreviewInformation as t}from"../editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as n}from"../runtime-context-provider.mjs";import{jsx as r}from"react/jsx-runtime";function i({mode:i=`renderer`}){let a=n(),o=a?.information,s=a?.onUpdateInformation,c=i===`editor`||!o;return r(`div`,{className:c?`pointer-events-none`:void 0,children:r(e,{mode:i,information:c?t:o,onUpdate:c?e=>{}:s??(()=>{})})})}export{i as VideoDetailActionsClient};
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{VideoDetailActionsClient as t}from"./client.mjs";import{videoDetailActionsInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailActions as r}from"./server.mjs";const i=e({type:`video-detail-actions`,name:`行为模块`,icon:`/static/components-thumb/interaction_actions_default.png`,category:`行为组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailActionsMaterial};
@@ -1,2 +0,0 @@
1
-
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../../utils/schema/schema.mjs";const n=e({});t(n);export{n as videoDetailActionsInspectorPropsSchema};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{SeriesEpisodes as e}from"../../../../../common/series-episodes/index.mjs";import{DetailIntroduction as t}from"../../detail-introduction.mjs";import{editorPreviewInformation as n}from"../editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as r}from"../runtime-context-provider.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o({showTags:o=!1,showEpisodes:s=!1,mode:c=`renderer`}){let l=r(),u=l?.information,d=l?.currentSeriesNum??1,f=l?.onEpisodeChange,p=l?.isShow??!0,m=c===`editor`||!u,h=m?n:u,g=Math.max(1,Number(d||1)),_=m?e=>{}:f??(()=>{}),v=h?.is_more_link===`y`&&(h?.links?.length??0)>0;return a(`div`,{className:m?`pointer-events-none`:void 0,children:[i(t,{information:h,isShow:p,showTags:o}),s&&v&&i(e,{mode:`detail`,series_num:g,information:h,onEpisodeChange:_})]})}export{o as VideoDetailInfoClient};
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{VideoDetailInfoClient as t}from"./client.mjs";import{videoDetailInfoInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailInfo as r}from"./server.mjs";const i=e({type:`video-detail-info`,name:`专辑信息样式2`,icon:`/static/components-thumb/media_info_description_episode.png`,category:`内容组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailInfoMaterial};
@@ -1,2 +0,0 @@
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:!1})});n(r);export{r as videoDetailInfoInspectorPropsSchema};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{Box as e}from"../../../../../ui/box.mjs";import{useCardDecoration as t}from"../../../../../../hooks/use-card-decoration.mjs";import{DetailInfoTitle as n}from"../../detail-info-title.mjs";import{editorPreviewInformation as r}from"../editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as i}from"../runtime-context-provider.mjs";import{jsx as a}from"react/jsx-runtime";function o({mode:o=`renderer`}){let s=i()?.information,c=o===`editor`||!s?r:s,{getTitleText:l}=t(),u=l(c);return u?a(e,{className:`w-full mt-[16px] px-[12px]`,children:a(n,{title:u})}):null}export{o as VideoDetailInfoTitleClient};
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{VideoDetailInfoTitleClient as t}from"./client.mjs";import{videoDetailInfoTitleInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailInfoTitle as r}from"./server.mjs";const i=e({type:`video-detail-info-title`,name:`专辑信息样式1`,icon:`/static/components-thumb/media_info_basic.png`,category:`内容组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailInfoTitleMaterial};
@@ -1,2 +0,0 @@
1
-
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../../utils/schema/schema.mjs";const n=e({});t(n);export{n as videoDetailInfoTitleInspectorPropsSchema};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{Box as e}from"../../../../../ui/box.mjs";import{useCardDecoration as t}from"../../../../../../hooks/use-card-decoration.mjs";import{SeriesEpisodes as n}from"../../../../../common/series-episodes/index.mjs";import{DetailInfoTags as r}from"../../detail-info-tags.mjs";import{DetailInfoTitle as i}from"../../detail-info-title.mjs";import{editorPreviewInformation as a}from"../editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as o}from"../runtime-context-provider.mjs";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({showTags:l=!0,showEpisodes:u=!0,mode:d=`renderer`}){let f=o(),p=f?.information,m=f?.currentSeriesNum??1,h=f?.onEpisodeChange,g=d===`editor`||!p,_=g?a:p,v=Math.max(1,Number(m||1)),y=g?e=>{}:h??(()=>{}),{getTitleText:b}=t(),x=b(_),S=_?.is_more_link===`y`&&(_?.links?.length??0)>0,C=l&&(_.tags?.length??0)>0,w=u&&S;return!x&&!C&&!w?null:c(e,{className:`w-full mt-[16px] ${g?`pointer-events-none`:``}`,children:[c(e,{className:`px-[12px]`,children:[x&&s(i,{title:x}),C&&s(r,{tags:_.tags||[],className:`mt-[12px]`})]}),w&&s(n,{mode:`detail`,series_num:v,information:_,onEpisodeChange:y})]})}export{l as VideoDetailInfoTitleTagsEpisodesClient};
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{VideoDetailInfoTitleTagsEpisodesClient as t}from"./client.mjs";import{videoDetailInfoTitleTagsEpisodesInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailInfoTitleTagsEpisodes as r}from"./server.mjs";const i=e({type:`video-detail-info-title-tags-episodes`,name:`专辑信息样式3`,icon:`/static/components-thumb/media_info_episode_list.png`,category:`内容组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailInfoTitleTagsEpisodesMaterial};
@@ -1,2 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{editorPreviewInformation as e}from"../editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as t}from"../runtime-context-provider.mjs";import{DetailHero as n}from"../../video-hero.mjs";import{jsx as r}from"react/jsx-runtime";function i({mode:i=`renderer`}){let a=t(),o=a?.information,s=a?.episodeIndex??0,c=a?.resumeProgressSeconds??0,l=i===`editor`||!o,u=l?{...e,id:``,mid:``}:o;return r(`div`,{className:l?`pointer-events-none`:void 0,children:r(n,{mode:i,isVideo:!0,information:u,episodeIndex:l?0:s,resumeProgressSeconds:l?0:c})})}export{i as VideoDetailPlayerClient};
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{VideoDetailPlayerClient as t}from"./client.mjs";import{videoDetailPlayerInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailPlayer as r}from"./server.mjs";const i=e({type:`video-detail-player`,name:`视频播放器`,icon:`/static/components-thumb/video_player.png`,category:`视频模块`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailPlayerMaterial};
@@ -1,2 +0,0 @@
1
-
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../../utils/schema/schema.mjs";const n=e({});t(n);export{n as videoDetailPlayerInspectorPropsSchema};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{gContentGetGuessYouLikeVideos as e}from"../../../../../../service/generated/client.mjs";import{Box as t}from"../../../../../ui/box.mjs";import{Text as n}from"../../../../../ui/text.mjs";import{useRequest as r}from"../../../../../../hooks/query/use-query.mjs";import i from"../../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as a}from"../../../../../common/cards/mini-three-card.mjs";import{useCardDecoration as o}from"../../../../../../hooks/use-card-decoration.mjs";import{buildEditorPreviewRecommendList as s}from"../editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as c}from"../runtime-context-provider.mjs";import{buildEpisodeLabel as l,clampColumns as u,mergeManualAndPool as d,mockPagedList as f,resolveRows as p}from"./utils.mjs";import{useEffect as m,useMemo as h,useRef as g,useState as _}from"react";import{jsx as v,jsxs as y}from"react/jsx-runtime";function b({rows:b,columns:ne,smartTagEnabled:S,smartTagIds:C,title:re,showPlayCount:w,playCountDelta:ie,showEpisode:T,enableInfinite:E,items:D,mode:O=`renderer`}){let k=c()?.detailId||``,A=O===`editor`,j=A||!k,{getVerticalHoCoverImageUrl:M,getTitleText:N}=o(),[P,F]=_(1),I=g(null),L=h(()=>C??[],[C]),R=h(()=>D??[],[D]),z=!!E&&!A,B=p(b,z),V=u(ne),H=B*V,U=h(()=>s(H),[H]),{data:W}=r([`video-detail-recommend`,k],async()=>!k||j?null:await e(),{enabled:!j&&!!k}),G=h(()=>{if(j)return U;let e=W?.data?.videos;return Array.isArray(e)?e.map(e=>x(e)).filter(e=>!k||!e.id||e.id!==k):[]},[W?.data?.videos,k,U,j]),K=h(()=>S?new Set:new Set(R.map(e=>e.contentId)),[R,S]),q=h(()=>{if(j)return G;let e=G.filter(e=>!K.has(e.id));if(!S||L.length===0)return e;let t=new Set(L.map(String));return e.filter(e=>(Array.isArray(e.source_tags)?e.source_tags:String(e.source_tags||``).split(`,`).filter(Boolean)).some(e=>t.has(String(e?.id??e))))},[j,K,G,S,L]),J=h(()=>{if(S||!R.length)return[];let e=new Map(q.map(e=>[e.id,e]));return R.map((t,n)=>{let r=U[n%Math.max(1,U.length)],i=e.get(t.contentId)??(j?{...r,id:t.contentId||r.id||`preview-manual-${n+1}`,name:r.name||`猜你喜欢 ${n+1}`}:null);if(!i)return null;let a=t.titleMode===`custom`?t.title:N(i),o=t.coverMode===`upload`?t.coverUrl:M(i);return{info:{...i,name:a||i.name,img_y:o||i.img_y,img_x:o||i.img_x},config:{showPlayCount:t.showPlayCount,playCountDelta:t.playCountDelta,showEpisode:t.showEpisode}}}).filter(Boolean)},[U,q,N,M,j,R,S]),Y=h(()=>q.map(e=>({info:e})),[q]),X=h(()=>d(J,Y,H),[J,H,Y]),Z=h(()=>{if(!z)return X;let e=f(Y,P,H,5);return P===1?X:X.concat(e)},[X,P,H,Y,z]),Q=z&&P<5&&Y.length>0,$=String(re||``).trim();return m(()=>{z&&F(1)},[k,z]),m(()=>{if(!z)return;let e=I.current;if(!e||!Q)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&F(e=>Math.min(e+1,5))});return t.observe(e),()=>{t.disconnect()}},[Q,z]),Z.length?y(t,{className:`w-full mt-[16px] ${j?`pointer-events-none`:``}`,children:[$?v(n,{className:`block pl-[12px] mb-[8px] text-text1 text-[18px] leading-[26px] font-bold`,children:$}):null,v(t,{className:`w-full flex flex-wrap px-[12px]`,children:Z.map((e,t)=>{let n=w!==!1&&(e.config?.showPlayCount??!0),r=e.config?.showEpisode??T,o=ee(e.info.play_count||0),s=l(Number(e.info.update_status)===1?`done`:`updating`,e.info.episode_cnt||e.info.links?.length,e.info.episode_cnt||e.info.links?.length),c=Number.isFinite(V)&&V>0?V:3,u=`${100/c}%`,d=t%c,f=c>1?{paddingLeft:8*d/c,paddingRight:8*(c-d-1)/c}:null;return v(a,{url:M(e.info),text:N(e.info),style:{width:u,...f||{}},bottomLeftChild:n?y(`div`,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[v(i,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),o]}):null,bottomRightChild:r&&s?v(`div`,{className:`text-[#fff] text-[12px] leading-[20px] pr-2`,children:s}):null,linkPath:j?``:te(e.info)},`guess-like-${t}`)})}),z&&v(`div`,{ref:I,className:`h-[1px] w-full`})]}):null}function x(e){return{id:e.video_id||``,mid:``,name:e.name||``,cat_id:``,cat_name:``,status:`1`,status_text:``,create_time:``,content_type:0,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:e.is_more_link?`y`:`n`,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 ee(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 te(e){if(e.content_type===0){let t=encodeURIComponent(e.name||``);return`/video/${e.id}/${t}/episode/1`}return`/post/${e.id}`}export{b as VideoDetailRecommendClient};
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{VideoDetailRecommendClient as t}from"./client.mjs";import{videoDetailRecommendInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailRecommend as r}from"./server.mjs";const i=e({type:`video-detail-recommend`,name:`详情页-推荐模块`,icon:`/static/components-thumb/video_guess_you_like.png`,category:`详情页`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailRecommendMaterial};
@@ -1,2 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{useFollowIdsState as e}from"../../../../store/modules/follow-ids-store.mjs";import{useUserStore as t}from"../../../../store/modules/user-store.mjs";import{checkFollowStatus as n}from"../../../../utils/follow-service.mjs";import{useKeepAliveState as r}from"../../../common/keep-scroll-position/index.mjs";import{UserActivityListItem as i}from"../../../common/list/user-activity-list/user-activity-list-item.mjs";import a from"../../../common/follow-button/index.mjs";import{useCallback as o,useEffect as s,useMemo as c,useRef as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{useTranslations as f}from"next-intl";function p(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:0}function m(e){return typeof e==`string`?e.trim():typeof e==`number`?String(e):``}function h(e){let t=e?.medias;return Array.isArray(t)&&t.length>0?t:(Array.isArray(e.preview_images)?e.preview_images:[]).filter(Boolean).map(e=>({media_url:e,is_video:!1,cover_image:``}))}function g({information:g,initRecommendList:_}){let v=f(`components.biz.business.detail`),{isLogin:y,userInfo:b,userId:x}=t(),S=x||b?.userId||``,[C,w]=r(`post-detail-recommend-list-${g.id}`,_),{followIds:T,setFollowIds:E}=e(),D=l(new Set),O=c(()=>{let e=new Set;for(let t of C||[]){let n=m(t.author?.user_id??t?.up_user);n&&e.add(n)}return Array.from(e)},[C]);s(()=>{if(!y||!S||!O||O.length===0)return;let e=O.filter(e=>e!==S).filter(e=>!D.current.has(e));if(e.length===0)return;let t=!0;async function r(){let r=await n({app_id:0,follower_id:S,followee_ids:e});if(!t||!r?.success)return;let i=r.data?.is_following_map||{},a=new Set(T);for(let t of e)i[t]?a.add(t):a.delete(t),D.current.add(t);E(Array.from(a))}return r(),()=>{t=!1}},[S,T,y,O,E]);let k=o((e,t)=>{e&&w(n=>{let r=n.findIndex(t=>t.id===e);if(r===-1)return n;let i=[...n];return i[r]={...i[r],...t},i})},[w]);return!C||C.length===0?null:d(`section`,{className:`w-full mt-[-40px] border-t-[8px] border-bg2 pb-[68px]`,children:[u(`div`,{className:`w-full px-[16px] h-[40px] border-b-[1px] border-line1 flex items-center`,children:u(`p`,{className:`text-[16px] text-text1 font-bold`,children:v(`postRecommendList.title`)})}),C.map((e,t)=>{let n=m(e.author?.user_id??e?.up_user),r=!!(S&&n&&S===n),o=!!(n&&T.includes(n)),s=n&&!r?u(`div`,{onClick:e=>{e.stopPropagation(),e.preventDefault()},children:u(a,{userId:n,hasFollow:o})}):null;return u(`div`,{className:`border-b border-line1`,children:u(i,{type:2,content_id:e.id,rightSlot:s,author:{user_id:n,nick_name:e.author?.nickname||e.author?.name||``,avatar:e.author?.avatar_url||e.author?.avatar||``},create_time:e.show_at,content:e.description||e.info?.text||e.name,medias:h(e),like_count:p(e?.statics_cnt?.like_cnt??e.static?.like_cnt),dislike_count:p(e?.statics_cnt?.dislike_cnt??e.static?.dislike_cnt),comment_count:p(e?.statics_cnt?.comment_cnt??e.static?.comment_cnt),is_liked:!!e.like,is_dislike:!!e.dislike,onLikeSuccess:({isLiked:t,count:n})=>{let r=!!e.dislike,i=p(e?.statics_cnt?.dislike_cnt??e.static?.dislike_cnt),a=t&&r,o=a?Math.max(0,i-1):i;k(e.id,{like:t,dislike:a?!1:e.dislike,statics_cnt:{...e.statics_cnt,like_cnt:String(n),dislike_cnt:String(o)},static:{...e.static,like_cnt:n,dislike_cnt:o}})},onDislikeSuccess:({isDisliked:t,count:n})=>{let r=!!e.like,i=p(e?.statics_cnt?.like_cnt??e.static?.like_cnt),a=t&&r,o=a?Math.max(0,i-1):i;k(e.id,{dislike:t,like:a?!1:e.like,statics_cnt:{...e.statics_cnt,like_cnt:String(o),dislike_cnt:String(n)},static:{...e.static,like_cnt:o,dislike_cnt:n}})}})},`post-recommend-${e.id||t}`)})]})}export{g as PostRecommendList};
@@ -1,2 +0,0 @@
1
-
2
- import{site as e}from"../../../../constants/site.mjs";const t={siteName:e.APP_NAME,siteUrl:e.URL,logoUrl:`${e.URL}/favicon.png`,common:{title:e.TITLE,description:e.DESCRIPTION,keywords:e.KEYWORDS,index:{index:!0,follow:!0}},category:[],urls:[]};let n=null;function r(){return n||(n=t,n)}export{t as SEO_CONFIG,r as getSeoConfig};
@@ -1,2 +0,0 @@
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=t(242);return _(h,{children:[g(r,{suppressHydrationWarning:!0,className:`w-full`,style:{height:R,maxWidth:`100%`,maxHeight:z}}),_(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:z,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};
@@ -1,2 +0,0 @@
1
-
2
- function e(e){return e===!0?`popular-with-video-detail`:`popular`}export{e as resolveHomeRecommendFeedMode};
@@ -1,6 +0,0 @@
1
-
2
- import { homeRecommendGridInspectorDefaultProps, homeRecommendGridInspectorPropsSchema } from "./inspector-schema.mjs";
3
- import { HomeRecommendGridPrefetchClient } from "./runtime/prefetch-client.mjs";
4
- import { schema } from "./schema/index.mjs";
5
- import { HomeRecommendGrid } from "./server.mjs";
6
- import { homeRecommendGridMaterial } from "./material.mjs";
@@ -1,2 +0,0 @@
1
-
2
- import e from"./runtime/prefetch-client.mjs";import{homeRecommendGridInspectorDefaultProps as t,homeRecommendGridInspectorPropsSchema as n}from"./inspector-schema.mjs";import{schema as r}from"./schema/index.mjs";import{HomeRecommendGrid as i}from"./server.mjs";import{homeRecommendGridMaterial as a}from"./material.mjs";var o=e;export{o as default};
@@ -1,2 +0,0 @@
1
-
2
- import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as a,HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as o,HOME_RECOMMEND_DEFAULT_GRID_ROWS as s,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as c,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as l,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as u,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as d,HOME_RECOMMEND_DEFAULT_TITLE as f}from"../../shared/home-recommend-default-config.mjs";import p from"zod";const m=e({rows:t({label:`行数`,defaultValue:s}),columns:t({label:`列数`,defaultValue:o}),smartTagEnabled:n({label:`智能铺设`,defaultValue:d}),title:r({label:`推荐位名称`,defaultValue:f}),showPlayCount:n({label:`显示播放量`,defaultValue:u}),playCountDelta:t({label:`播放量浮动`,defaultValue:c}),showEpisode:n({label:`显示集数`,defaultValue:l}),enableInfinite:n({label:`无限下拉`,defaultValue:a,required:!1}),moreLink:r({label:`更多`,description:``,required:!1,defaultValue:``}),smartTagIds:p.array(p.string()).optional(),items:p.array(p.object({contentId:p.string(),coverMode:p.enum([`upload`,`content`]).optional(),coverUrl:p.string().optional(),badge_url:p.string().optional(),titleMode:p.enum([`custom`,`content`]).optional(),title:p.string().optional(),description:p.string().optional(),showPlayCount:p.boolean().optional(),playCountDelta:p.number().optional(),showEpisode:p.boolean().optional()})).optional()}),h={...i(m),smartTagIds:[],items:[]},g={rows:{type:`number`,title:`行数`,default:h.rows},columns:{type:`number`,title:`列数`,default:h.columns},smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:h.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:h.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:h.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:h.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:h.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:h.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:h.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:h.smartTagIds,items:{type:`string`,title:`标签 ID`}},items:{type:`array`,title:`推荐项`,default:h.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},description:{type:`string`,title:`简介`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{h as homeRecommendGridInspectorDefaultProps,m as homeRecommendGridInspectorPropsSchema,g as homeRecommendGridPropsSchema};
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import t from"./runtime/prefetch-client.mjs";import{homeRecommendGridInspectorPropsSchema as n}from"./inspector-schema.mjs";import{HomeRecommendGrid as r}from"./server.mjs";const i=e({type:`home-recommend-grid`,name:`两列宫格`,icon:`/static/components-thumb/grid_two_column_single_row.png`,category:`内容组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as homeRecommendGridMaterial};
@@ -1,27 +0,0 @@
1
-
2
- import { MaterialComponentMode } from "../../../../../../../utils/schema/schema.mjs";
3
- import "../../../../../../../utils/schema/index.mjs";
4
- import { HomeRecommendGridInspectorProps } from "../inspector-schema.mjs";
5
- import { HomeRecommendData } from "../../../types.mjs";
6
- import * as react_jsx_runtime0 from "react/jsx-runtime";
7
-
8
- //#region components/biz/business/home-recommend/variants/home-recommend-grid/runtime/prefetch-client.d.ts
9
- interface HomeRecommendGridPrefetchClientProps extends Partial<Omit<HomeRecommendGridInspectorProps, 'mode'>> {
10
- /** 预取数据(可选)。 */
11
- prefetchData?: HomeRecommendData;
12
- /** 兼容内容块转换链路的数据字段。 */
13
- data?: HomeRecommendData;
14
- /** 渲染模式。 */
15
- mode?: MaterialComponentMode;
16
- }
17
- /**
18
- * 首页推荐两列宫格布局(支持预取数据)。
19
- */
20
- declare function HomeRecommendGridPrefetchClient({
21
- prefetchData,
22
- data,
23
- mode,
24
- ...propsConfig
25
- }: HomeRecommendGridPrefetchClientProps): react_jsx_runtime0.JSX.Element;
26
- //#endregion
27
- export { HomeRecommendGridPrefetchClient };
@@ -1,2 +0,0 @@
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,data:a,mode:o=`renderer`,...s}){let c=o===`editor`,l=s,u=i??a,d=n(()=>c?e({variant:`grid`,schemaTitle:l.title,enableInfinite:l.enableInfinite,smartTagEnabled:l.smartTagEnabled,rows:l.rows,columns:l.columns,items:l.items}):u,[c,u,l.columns,l.enableInfinite,l.items,l.rows,l.smartTagEnabled,l.title]);return r(`div`,{className:c?`pointer-events-none`:void 0,children:r(t,{variant:`grid`,props:l,data:d,mode:o})})}export{i as default};
@@ -1,2 +0,0 @@
1
-
2
- const e={componentName:`HomeRecommendGrid`,displayName:`两列宫格推荐位`,category:`HomeRecommend`,categoryName:`内容组件`,enabled:!0};export{e as componentMeta};
@@ -1,2 +0,0 @@
1
-
2
- const e={dataBinding:{field:`videos`,sourceType:`dynamic`}};export{e as dataSchema};
@@ -1,8 +0,0 @@
1
-
2
- import { ComponentSchema } from "../../../../../utils/schema/component.mjs";
3
- import "../../../../../utils/index.mjs";
4
-
5
- //#region components/biz/business/home-recommend/variants/home-recommend-grid/schema/index.d.ts
6
- declare const schema: ComponentSchema;
7
- //#endregion
8
- export { schema };
@@ -1,2 +0,0 @@
1
-
2
- import{homeRecommendGridPropsSchema as e}from"../inspector-schema.mjs";import{componentMeta as t}from"./component.mjs";import{dataSchema as n}from"./data.schema.mjs";import{eventSchema as r}from"./event.schema.mjs";import{styleSchema as i}from"./style.schema.mjs";const a={...t,propsSchema:e,dataSchema:n,styleSchema:i,eventSchema:r};export{a as schema};
@@ -1,2 +0,0 @@
1
-
2
- import{commonStyleSchema as e}from"../../../../../utils/styles/schema.mjs";const t={...e};export{t as styleSchema};
@@ -1,2 +0,0 @@
1
-
2
- import{HydrationBoundary as e}from"../../../../../../hooks/query/hydration-boundary.mjs";import t from"./runtime/prefetch-client.mjs";import{resolveHomeRecommendServerData as n}from"../../shared/home-recommend-server-data.mjs";import{jsx as r}from"react/jsx-runtime";function i({rows:e,columns:t}){let n=Number(e),r=Number(t);if(!Number.isFinite(n)||!Number.isFinite(r))return 16;let i=Math.floor(n)*Math.floor(r);return!Number.isFinite(i)||i<=0?16:i}function a(e){if(typeof e==`string`)return e.trim()||void 0}async function o(o){let{mode:s=`renderer`,...c}=o;if(s!==`renderer`)return r(t,{...c,mode:s});let l=await n({smartTagEnabled:c.smartTagEnabled,pageSize:i(c)});return r(e,{prefetch:[{type:`infinite`,queryKey:[`home-recommend`,l.feedMode,l.data.block_id||`popular`],queryFn:async()=>({items:l.data.list||[],icons:l.data.icons||[],nextCursor:a(l.data.cursor)}),initialPageParam:``,getNextPageParam:()=>void 0}],children:r(t,{...c,prefetchData:l.data,mode:s})})}export{o as HomeRecommendGrid};
@@ -1,6 +0,0 @@
1
-
2
- import { homeRecommendWaterfallInspectorDefaultProps, homeRecommendWaterfallInspectorPropsSchema } from "./inspector-schema.mjs";
3
- import { HomeRecommendWaterfallPrefetchClient } from "./runtime/prefetch-client.mjs";
4
- import { schema } from "./schema/index.mjs";
5
- import { HomeRecommendWaterfall } from "./server.mjs";
6
- import { homeRecommendWaterfallMaterial } from "./material.mjs";
@@ -1,2 +0,0 @@
1
-
2
- import e from"./runtime/prefetch-client.mjs";import{homeRecommendWaterfallInspectorDefaultProps as t,homeRecommendWaterfallInspectorPropsSchema as n}from"./inspector-schema.mjs";import{schema as r}from"./schema/index.mjs";import{HomeRecommendWaterfall as i}from"./server.mjs";import{homeRecommendWaterfallMaterial as a}from"./material.mjs";var o=e;export{o as default};
@@ -1,2 +0,0 @@
1
-
2
- import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as a,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as o,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as s,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as c,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as l,HOME_RECOMMEND_DEFAULT_TITLE as u}from"../../shared/home-recommend-default-config.mjs";import d from"zod";const f=e({smartTagEnabled:n({label:`智能铺设`,defaultValue:l}),title:r({label:`推荐位名称`,defaultValue:u}),showPlayCount:n({label:`显示播放量`,defaultValue:c}),playCountDelta:t({label:`播放量浮动`,defaultValue:o}),showEpisode:n({label:`显示集数`,defaultValue:s}),enableInfinite:n({label:`无限下拉`,defaultValue:a}),smartTagIds:d.array(d.string()).optional(),items:d.array(d.object({contentId:d.string(),coverMode:d.enum([`upload`,`content`]).optional(),coverUrl:d.string().optional(),titleMode:d.enum([`custom`,`content`]).optional(),title:d.string().optional(),showPlayCount:d.boolean().optional(),playCountDelta:d.number().optional(),showEpisode:d.boolean().optional()})).optional()}),p={...i(f),smartTagIds:[],items:[]},m={smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:p.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:p.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:p.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:p.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:p.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:p.enableInfinite},smartTagIds:{type:`array`,title:`智能铺设标签`,default:p.smartTagIds,items:{type:`string`,title:`标签 ID`}},items:{type:`array`,title:`推荐项`,default:p.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{p as homeRecommendWaterfallInspectorDefaultProps,f as homeRecommendWaterfallInspectorPropsSchema,m as homeRecommendWaterfallPropsSchema};
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import t from"./runtime/prefetch-client.mjs";import{homeRecommendWaterfallInspectorPropsSchema as n}from"./inspector-schema.mjs";import{HomeRecommendWaterfall as r}from"./server.mjs";const i=e({type:`home-recommend-waterfall`,name:`瀑布流`,icon:`/static/components-thumb/grid_waterfall_two_column.png`,category:`内容组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as homeRecommendWaterfallMaterial};
@@ -1,27 +0,0 @@
1
-
2
- import { MaterialComponentMode } from "../../../../../../../utils/schema/schema.mjs";
3
- import "../../../../../../../utils/schema/index.mjs";
4
- import { HomeRecommendData } from "../../../types.mjs";
5
- import { HomeRecommendWaterfallInspectorProps } from "../inspector-schema.mjs";
6
- import * as react_jsx_runtime0 from "react/jsx-runtime";
7
-
8
- //#region components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/prefetch-client.d.ts
9
- interface HomeRecommendWaterfallPrefetchClientProps extends Partial<Omit<HomeRecommendWaterfallInspectorProps, 'mode'>> {
10
- /** 预取数据(可选)。 */
11
- prefetchData?: HomeRecommendData;
12
- /** 兼容内容块转换链路的数据字段。 */
13
- data?: HomeRecommendData;
14
- /** 渲染模式。 */
15
- mode?: MaterialComponentMode;
16
- }
17
- /**
18
- * 首页推荐瀑布流布局(支持预取数据)。
19
- */
20
- declare function HomeRecommendWaterfallPrefetchClient({
21
- prefetchData,
22
- data,
23
- mode,
24
- ...propsConfig
25
- }: HomeRecommendWaterfallPrefetchClientProps): react_jsx_runtime0.JSX.Element;
26
- //#endregion
27
- export { HomeRecommendWaterfallPrefetchClient };
@@ -1,2 +0,0 @@
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,data:a,mode:o=`renderer`,...s}){let c=o===`editor`,l=s,u=i??a,d=n(()=>c?e({variant:`waterfall`,schemaTitle:l.title,enableInfinite:l.enableInfinite,smartTagEnabled:l.smartTagEnabled,items:l.items}):u,[c,u,l.enableInfinite,l.items,l.smartTagEnabled,l.title]);return r(`div`,{className:c?`pointer-events-none`:void 0,children:r(t,{variant:`waterfall`,props:l,data:d,mode:o})})}export{i as default};
@@ -1,2 +0,0 @@
1
-
2
- const e={componentName:`HomeRecommendWaterfall`,displayName:`瀑布流`,category:`HomeRecommend`,categoryName:`内容组件`,enabled:!0};export{e as componentMeta};
@@ -1,2 +0,0 @@
1
-
2
- const e={dataBinding:{field:`videos`,sourceType:`dynamic`}};export{e as dataSchema};
@@ -1,8 +0,0 @@
1
-
2
- import { ComponentSchema } from "../../../../../utils/schema/component.mjs";
3
- import "../../../../../utils/index.mjs";
4
-
5
- //#region components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/index.d.ts
6
- declare const schema: ComponentSchema;
7
- //#endregion
8
- export { schema };
@@ -1,2 +0,0 @@
1
-
2
- import{homeRecommendWaterfallPropsSchema as e}from"../inspector-schema.mjs";import{componentMeta as t}from"./component.mjs";import{dataSchema as n}from"./data.schema.mjs";import{eventSchema as r}from"./event.schema.mjs";import{styleSchema as i}from"./style.schema.mjs";const a={...t,propsSchema:e,dataSchema:n,styleSchema:i,eventSchema:r};export{a as schema};
@@ -1,2 +0,0 @@
1
-
2
- import{commonStyleSchema as e}from"../../../../../utils/styles/schema.mjs";const t={...e};export{t as styleSchema};
@@ -1,2 +0,0 @@
1
-
2
- import{HydrationBoundary as e}from"../../../../../../hooks/query/hydration-boundary.mjs";import t from"./runtime/prefetch-client.mjs";import{resolveHomeRecommendServerData as n}from"../../shared/home-recommend-server-data.mjs";import{jsx as r}from"react/jsx-runtime";function i(e){let t=Array.isArray(e)?e.length:0;return t>0?t:16}function a(e){if(typeof e==`string`)return e.trim()||void 0}async function o(o){let{mode:s=`renderer`,...c}=o;if(s!==`renderer`)return r(t,{...c,mode:s});let l=await n({smartTagEnabled:c.smartTagEnabled,pageSize:i(c.items)});return r(e,{prefetch:[{type:`infinite`,queryKey:[`home-recommend`,l.feedMode,l.data.block_id||`popular`],queryFn:async()=>({items:l.data.list||[],icons:l.data.icons||[],nextCursor:a(l.data.cursor)}),initialPageParam:``,getNextPageParam:()=>void 0}],children:r(t,{...c,prefetchData:l.data,mode:s})})}export{o as HomeRecommendWaterfall};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import e from"../../../../utils/get-res-url.mjs";import{batchGetVideoDetail as t}from"../../../../service/batch-get-video-detail.mjs";import{getPopularVideoListPost as n}from"../../../../service/get-popular-video-list-post.mjs";import r from"../../../../assets/images/frame.mjs";import i from"../../../../assets/images/subscript.mjs";import{useCallback as a,useEffect as o,useMemo as s,useRef as c,useState as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import p from"next/image";import{useTranslations as m}from"next-intl";import h from"next/link";const g=[];function _(t,n){if(!t||!t.trim())return n;if(t.startsWith(`http`)||t.startsWith(`//`)||t.startsWith(`data:`))return t;let r=e();return r?`${r}${t.startsWith(`/`)?t:`/${t}`}`:t}function v(e){if(e==null)return``;let t=e;return t.img_y||t.media?.img_y||``}function y(e){if(e==null)return``;let t=e;return t.id||t.video_id||t.mid||``}function b(e){return e==null?``:e.name||``}function x(e){let t=e,n=t.type;return typeof n==`number`?n:t.is_more_link===!0||Number(t.episode_cnt||t.episode_count||t.episodes?.length||t.links?.length||0)>1?2:1}function S(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 C(e,t){let n=e,r=Number(n.episode_cnt??0);if(!Number.isFinite(r)||r<=0)return``;let i=n.update_status;return t(r,i===0||i===`0`)}function w(e,t,n){return e?x(e)===2&&n?C(e,n):S(Number(e.duration??e.detail?.duration??0)):``}function T(e,t){if(!(e??``).trim())return``;let n=encodeURIComponent((t??``).trim()||``);return`/video/${e.trim()}/${n}/episode/1`}function E(e){return!e||!Array.isArray(e.tags)?[]:e.tags.map(e=>String(e).trim()).filter(Boolean)}function D(e){for(let t=e.length-1;t>0;t--){let n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}function O(e,t){let n=[...e];return D(n),n.slice(0,Math.max(0,t))}function k(e,t){if(t<=0||!e.length)return[];if(e.length>=t)return O(e,t);let n=[];for(let t of e)n.push(t);for(;n.length<t;){let t=e[Math.floor(Math.random()*e.length)];n.push(t)}return D(n),n}function A(e,t){return(e.tags??[]).some(e=>(e.name??``).trim()===t)}function j(e,t,n){let r=new Set,i=[];for(let a=0;a<n;a++){let n=t[a]??``,o=n?e.filter(e=>!r.has(y(e))&&A(e,n)):[],s=o.length?o:e.filter(e=>!r.has(y(e))),c=s.length?s[Math.floor(Math.random()*s.length)]:void 0;c&&(r.add(y(c)),i.push(c))}return i}function M(e){if(!e)return``;let t=e,n=Number(t.static?.browse_cnt??0);if(!Number.isFinite(n)||n<=0)return``;if(n>=1e6){let e=(n/1e6).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}M`:`${e}M`}if(n>=1e3){let e=(n/1e3).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}k`:`${e}k`}return Math.floor(n).toString()}function N(){let e=new Date,t=new Date(e);return t.setHours(24,0,0,0),t.getTime()-e.getTime()}function P(e){let{title:x,items:S=g,commonPlayCount:C,commonEpisodes:D,layout:O,allEpisodesText:A,mode:P=`renderer`}=e,F=m(`components.biz.business.videoHorizontalList`),I=P===`editor`,[L,R]=l({}),[z,B]=l([]),[V,H]=l(0),U=c(null),W=!!O?.enabled,G=s(()=>E(O),[O]),K=S?.length??0,q=s(()=>W||!S?.length?[]:S.map(e=>String(e?.contentId??``).trim()).filter(Boolean),[W,S]),J=s(()=>q.length>0?Math.ceil(q.length/8):0,[q.length]),Y=a((e,t)=>F(t?`updatedTo`:`allEpisodes`,{count:e}),[F]),X=a(async(e,n)=>{if(e.length===0)return;let r=(await t({ids:e})).data?.videos??[],i={};for(let e of r){let t=y(e);t&&(i[t]=e)}R(e=>n?{...e,...i}:i)},[]);o(()=>{if(I||!S||S.length===0)return;let e=!1;async function t(){if(q.length===0){e||(R({}),H(0));return}if(q.length<=8){await X(q,!1),e||H(1);return}await X(q.slice(0,8),!1),e||H(1)}async function r(){let t=k(G,K),r=(await n({page_size:Math.max(20,K*10),tags:t.length?Array.from(new Set(t)):void 0})).data?.videos??[];e||B(j(r,t,K))}return(async()=>{try{W?await r():await t()}catch{e||(R({}),B([]),H(0))}})(),()=>{e=!0}},[I,W,S,G,K,q,X]),o(()=>{if(I||W||q.length<=8||V<1||V>=J)return;let e=U.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;if(!t?.isIntersecting)return;let n=V,r=n*8,i=q.slice(r,r+8);i.length!==0&&(X(i,!0),H(n+1))},{root:null,rootMargin:`0px`,threshold:0});return t.observe(e),()=>t.disconnect()},[I,W,q,V,J,X]),o(()=>{if(I||!W||K<=0)return;let e,t=!1;function r(){e=window.setTimeout(()=>{let e=k(G,K);n({page_size:Math.max(20,K*10),tags:e.length?Array.from(new Set(e)):void 0}).then(n=>{t||B(j(n.data?.videos??[],e,K))}).catch(()=>{t||B([])}).finally(()=>{t||r()})},N())}return r(),()=>{t=!0,e!==void 0&&window.clearTimeout(e)}},[I,W,G,K]);let Z=s(()=>!S||S.length===0?g:S.map((e,t)=>{let n=String(e?.contentId??``).trim(),r=W?z[t]:n?L[n]:void 0,i=(e?.title??``).trim()||(r?b(r):``),a=(e?.cover??``).trim()||(e?.useVideoPoster?v(r):``),o=(e?.contentDescription??``).trim()||w(r,A,Y),s=(e?.playCountDelta??``).trim()||M(r);return{...e,contentId:n||(r?y(r):``),title:i,cover:a,contentDescription:o,playCountDelta:s}}),[A,Y,W,S,L,z]);if(!S||S.length===0)return null;let Q=!W&&q.length>8&&V>=1&&V<J?V*8-2:-1;return f(`div`,{className:I?`bg-bg1 px-3 py-3 pointer-events-none`:`bg-bg1 px-3 py-3`,children:[x&&d(`div`,{className:`mb-3 flex items-center justify-between`,children:d(`h2`,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:x})}),d(`div`,{className:`flex overflow-x-auto pb-2 scrollbar-hide space-x-2`,children:Z.map((e,t)=>{let n=W?C:e.showPlayCount??!1,a=e.playCountDelta,o=(W?D:e.showEpisodes??!1)&&(e.contentDescription??``).trim(),s=P===`renderer`?T(e.contentId??``,e.title??``):``,c=f(u,{children:[f(`div`,{className:`relative aspect-[116.67/155.56] rounded-lg overflow-hidden bg-bg2`,children:[I||e.cover?d(p,{src:_(e.cover,r),alt:e.title,fill:!0,sizes:`116.67px`,className:`object-cover text-[10px] text-text3`}):d(`div`,{className:`w-full h-full flex items-center justify-center text-text3 text-xs`,children:F(`noCover`)}),!W&&(e.badge??``).trim()?d(`div`,{className:`absolute top-0 right-0 w-8 h-8`,children:d(p,{src:(e.badge??``).trim()||i,alt:``,fill:!0,sizes:`32px`,className:`object-contain object-right-top`})}):null,f(`div`,{className:`absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent pb-1 pt-3 px-1 flex justify-between items-center gap-1`,children:[d(`div`,{className:`flex items-center min-w-0 shrink`,children:n&&a?f(`div`,{className:`flex items-center gap-1 rounded bg-overlay px-1 py-0`,children:[d(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`10`,viewBox:`0 0 12 10`,fill:`none`,className:`shrink-0`,"aria-hidden":!0,children:d(`path`,{d:`M7.56 5.18437L5.013 6.56737C4.893 6.63337 4.761 6.66937 4.638 6.66937C4.269 6.66937 4.002 6.38737 4.002 5.99737V3.28237C4.002 2.89237 4.269 2.61037 4.638 2.61037C4.764 2.61037 4.893 2.64637 5.013 2.70937L7.572 4.09237C7.803 4.21837 7.938 4.41637 7.938 4.63237C7.938 4.85137 7.8 5.05537 7.56 5.18437ZM9.807 9.27637L2.133 8.52937C0.954 8.52937 0 7.57537 0 6.39637V2.79937C0 1.62037 0.954 0.666368 2.133 0.666368L9.81 0.000367165C10.989 0.000367165 11.943 0.954367 11.943 2.13337V7.14337C11.9422 7.70935 11.7168 8.25188 11.3163 8.65181C10.9158 9.05174 10.373 9.27637 9.807 9.27637ZM10.875 2.13337C10.875 1.99351 10.8475 1.85502 10.7939 1.72581C10.7404 1.5966 10.662 1.47919 10.5631 1.3803C10.4642 1.2814 10.3468 1.20296 10.2176 1.14944C10.0883 1.09591 9.94986 1.06837 9.81 1.06837L2.133 1.73437C1.99314 1.73437 1.85465 1.76191 1.72544 1.81544C1.59623 1.86896 1.47883 1.9474 1.37993 2.0463C1.28104 2.14519 1.20259 2.2626 1.14907 2.39181C1.09555 2.52102 1.068 2.65951 1.068 2.79937V6.39637C1.068 6.67882 1.1802 6.94971 1.37993 7.14944C1.57966 7.34916 1.85054 7.46137 2.133 7.46137L9.807 8.20837C9.94686 8.20837 10.0853 8.18082 10.2146 8.1273C10.3438 8.07378 10.4612 7.99533 10.5601 7.89644C10.659 7.79754 10.7374 7.68014 10.7909 7.55093C10.8445 7.42171 10.872 7.28323 10.872 7.14337V2.13337H10.875Z`,fill:`white`})}),d(`span`,{className:`text-white text-[12px] leading-[20px]`,children:a})]}):null}),d(`div`,{className:`flex items-center shrink-0`,children:o?d(`span`,{className:`text-white text-[12px] leading-[20px]`,children:e.contentDescription}):null})]})]}),d(`div`,{className:`mt-2 py-2`,children:d(`h3`,{className:`text-[16px] text-text1 truncate font-bold leading-[24px]`,children:e.title})})]});return d(`div`,{ref:t===Q?U:void 0,className:`flex-shrink-0 w-[116.67px]`,children:s?d(h,{href:s,className:`block rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-primary`,children:c}):c},t)})})]})}export{P as VideoHorizontalListClient};
@@ -1,5 +0,0 @@
1
-
2
- import { videoHorizontalListInspectorPropsSchema } from "./schema.mjs";
3
- import { VideoHorizontalListClient, VideoHorizontalListProps } from "./client.mjs";
4
- import { VideoHorizontalListServer } from "./server.mjs";
5
- import { videoHorizontalListMaterial } from "./material.mjs";
@@ -1,2 +0,0 @@
1
-
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineObjectPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a}from"../../../../utils/schema/schema.mjs";import{z as o}from"zod";const s=o.object({contentId:a({label:`推荐位内容`,defaultValue:``}),title:a({label:`推荐位内容名称`,defaultValue:`视频标题`}),contentDescription:a({label:`内容说明简介`,defaultValue:``}),cover:a({label:`推荐位封面`,defaultValue:``}),useVideoPoster:i({label:`沿用视频海报`,defaultValue:!0}),showPlayCount:i({label:`播放量显示`,defaultValue:!1}),playCountDelta:a({label:`播放量`,defaultValue:``,required:!1}),showEpisodes:i({label:`集数展示`,defaultValue:!0}),badge:a({label:`推荐位角标`,defaultValue:``,description:`角标图片地址,可通过低代码平台配置上传;留空则使用默认角标图`})}),c=t({title:a({label:`推荐位名称`,defaultValue:`推荐视频`}),moduleCount:n({label:`推荐模块数`,defaultValue:1}),layout:r({enabled:i({label:`智能铺设`,defaultValue:!1}),tags:e(o.string(),{label:`取数范围标签`,defaultValue:[`电影`]})},{label:`组件铺设`,defaultValue:{enabled:!1,tags:[`电影`]}}),commonPlayCount:i({label:`通用播放量`,defaultValue:!0}),commonEpisodes:i({label:`通用集数`,defaultValue:!0}),items:e(s,{label:`推荐位模块`,defaultValue:[{contentId:``,title:`视频标题 1`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,playCountDelta:``,showEpisodes:!0,badge:``},{contentId:``,title:`视频标题 2`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,playCountDelta:``,showEpisodes:!0,badge:``},{contentId:``,title:`视频标题 3`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,playCountDelta:``,showEpisodes:!0,badge:``}]})});export{c as videoHorizontalListInspectorPropsSchema};
@@ -1,12 +0,0 @@
1
-
2
- import { VideoHorizontalListProps } from "./client.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
-
5
- //#region components/biz/business/video-horizontal-list/server.d.ts
6
- /**
7
- * 视频横向列表物料组件 - 服务端部分
8
- * 负责国际化文案的预取和属性透传
9
- */
10
- declare function VideoHorizontalListServer(props: VideoHorizontalListProps): Promise<react_jsx_runtime0.JSX.Element>;
11
- //#endregion
12
- export { VideoHorizontalListServer };
@@ -1,2 +0,0 @@
1
-
2
- import{VideoHorizontalListClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";import{getTranslations as n}from"next-intl/server";async function r(r){let{mode:i=`renderer`,...a}=r,o=await n(`components.biz.business.videoHorizontalList`);return t(e,{...a,mode:i,allEpisodesText:o.raw(`allEpisodes`),updatedToText:o.raw(`updatedTo`)})}export{r as VideoHorizontalListServer};
@@ -1,21 +0,0 @@
1
-
2
- import { ContentVideoDetail } from "../types.mjs";
3
- import { ResponseData } from "../utils/http.mjs";
4
-
5
- //#region service/batch-get-video-detail.d.ts
6
- /** 批量获取视频详情请求体 */
7
- interface BatchGetVideoDetailBody {
8
- /** 视频编号列表,必填 */
9
- ids: string[];
10
- }
11
- /** 批量获取视频详情响应 data */
12
- interface BatchGetVideoDetailData {
13
- videos?: ContentVideoDetail[];
14
- }
15
- /**
16
- * 批量获取视频详情。
17
- * POST /api/content/batchGetVideoDetail,Body application/json { ids: string[] }。
18
- */
19
- declare function batchGetVideoDetail(data: BatchGetVideoDetailBody): Promise<ResponseData<BatchGetVideoDetailData>>;
20
- //#endregion
21
- export { BatchGetVideoDetailBody, BatchGetVideoDetailData, batchGetVideoDetail };
@@ -1,2 +0,0 @@
1
-
2
- import e from"../utils/http.mjs";async function t(t){return e.request({url:`/api/content/batchGetVideoDetail`,method:`POST`,data:t})}export{t as batchGetVideoDetail};
@@ -1,21 +0,0 @@
1
-
2
- import { ContentVideo } from "../types.mjs";
3
- import { RequestConfig, ResponseData } from "../utils/http.mjs";
4
-
5
- //#region service/content-batch-get-video-detail.d.ts
6
- type ExtraRequestConfig = Omit<RequestConfig, 'url' | 'method' | 'params' | 'data'>;
7
- interface ContentBatchGetVideoDetailResponse {
8
- videos?: ContentVideo[];
9
- total?: number;
10
- }
11
- interface ContentBatchGetVideoDetailRes {
12
- data: ContentBatchGetVideoDetailResponse;
13
- }
14
- /**
15
- * 批量获取视频详情(用于推荐位补齐播放/点赞/收藏/时长等统计)。
16
- */
17
- declare function gContentBatchGetVideoDetail(query: {
18
- video_ids: string[];
19
- }, config?: ExtraRequestConfig): Promise<ResponseData<ContentBatchGetVideoDetailRes>>;
20
- //#endregion
21
- export { gContentBatchGetVideoDetail };
@@ -1,2 +0,0 @@
1
-
2
- import e from"../utils/http.mjs";import{gContentGetVideosByIds as t}from"./generated/client.mjs";async function n(n,r){try{return await e.request({...r??{},url:`/api/content/batchGetVideoDetail`,method:`GET`,params:n})}catch{let e=await t(n,r);return{...e,data:{videos:e.data?.videos||[],total:e.data?.total??(e.data?.videos?.length||0)}}}}export{n as gContentBatchGetVideoDetail};
@@ -1,8 +0,0 @@
1
-
2
- import { GetApiContentGetPopularVideoListQuery, GetApiContentGetPopularVideoListRes } from "../types.mjs";
3
- import { ResponseData } from "../utils/http.mjs";
4
-
5
- //#region service/get-popular-video-list-post.d.ts
6
- declare function getPopularVideoListPost(data?: GetApiContentGetPopularVideoListQuery): Promise<ResponseData<GetApiContentGetPopularVideoListRes>>;
7
- //#endregion
8
- export { getPopularVideoListPost };
@@ -1,2 +0,0 @@
1
-
2
- import e from"../utils/http.mjs";async function t(t){return e.request({url:`/api/content/getPopularVideoList`,method:`POST`,data:t})}export{t as getPopularVideoListPost};