@funhub/platform 0.2.6 → 0.2.7

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 (236) hide show
  1. package/dist/assets/icons/channel-list/channel-active-indicator.mjs +2 -0
  2. package/dist/assets/icons/common/header-menu.mjs +2 -0
  3. package/dist/assets/icons/common/header-search-icon.mjs +2 -0
  4. package/dist/assets/icons/common/right_arrow_thin.mjs +2 -0
  5. package/dist/assets/icons/eye-off-icon.mjs +1 -1
  6. package/dist/assets/icons/marquee-close.mjs +2 -0
  7. package/dist/assets/icons/marquee-speaker.mjs +2 -0
  8. package/dist/assets/images/shortcut-grid/shortcut-grid-card-bg-primary.mjs +2 -0
  9. package/dist/biz.d.mts +10 -6
  10. package/dist/biz.mjs +1 -1
  11. package/dist/common.d.mts +5 -2
  12. package/dist/common.mjs +1 -1
  13. package/dist/components/biz/basics/fullscreen-feed/runtime/user-action.mjs +1 -1
  14. package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -1
  15. package/dist/components/biz/business/advertisement/ad-match.d.mts +7 -3
  16. package/dist/components/biz/business/advertisement/ad-match.mjs +1 -1
  17. package/dist/components/biz/business/advertisement/banner-ad/client.mjs +1 -1
  18. package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +2 -2
  19. package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -1
  20. package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +9 -4
  21. package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +1 -1
  22. package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +1 -31
  23. package/dist/components/biz/business/advertisement/feed-ad/index.mjs +1 -1
  24. package/dist/components/biz/business/advertisement/floating-ad/client.d.mts +4 -3
  25. package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -1
  26. package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +1 -1
  27. package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +5 -0
  28. package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +21 -6
  29. package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +1 -1
  30. package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -1
  31. package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +1 -1
  32. package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -1
  33. package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +7 -1
  34. package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -1
  35. package/dist/components/biz/business/advertisement/index.d.mts +4 -4
  36. package/dist/components/biz/business/advertisement/popup-ad/client.mjs +2 -2
  37. package/dist/components/biz/business/advertisement/popup-ad/index.d.mts +1 -1
  38. package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +2 -2
  39. package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +14 -15
  40. package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -1
  41. package/dist/components/biz/business/advertisement/text-ad/client.mjs +1 -1
  42. package/dist/components/biz/business/advertisement/text-ad/material.d.mts +1 -1
  43. package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -1
  44. package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +5 -1
  45. package/dist/components/biz/business/advertisement/text-ad/schema.mjs +1 -1
  46. package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
  47. package/dist/components/biz/business/banner-carousel/client.d.mts +2 -1
  48. package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
  49. package/dist/components/biz/business/banner-carousel/default-props.mjs +1 -1
  50. package/dist/components/biz/business/channel-list/client.mjs +1 -1
  51. package/dist/components/biz/business/channel-list/default-props.mjs +1 -1
  52. package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -1
  53. package/dist/components/biz/business/detail/shared/editor-preview.mjs +1 -1
  54. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
  55. package/dist/components/biz/business/detail/shared/video-hero.mjs +1 -1
  56. package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
  57. package/dist/components/biz/business/detail/video-detail-info/client.mjs +1 -1
  58. package/dist/components/biz/business/detail/video-detail-recommend/client.d.mts +1 -13
  59. package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
  60. package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +1 -1
  61. package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -1
  62. package/dist/components/biz/business/detail/video-detail-recommend/shared.mjs +2 -0
  63. package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -1
  64. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.d.mts +1 -1
  65. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
  66. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +4 -3
  67. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
  68. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -1
  69. package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -1
  70. package/dist/components/biz/business/header-search/header-search/client.mjs +1 -1
  71. package/dist/components/biz/business/header-search/shared/avatar.mjs +1 -1
  72. package/dist/components/biz/business/header-search/shared/header-action.mjs +2 -0
  73. package/dist/components/biz/business/header-search/shared/header-search-icon.mjs +2 -0
  74. package/dist/components/biz/business/header-search/shared/header-shell.mjs +2 -0
  75. package/dist/components/biz/business/header-search/shared/logo.mjs +1 -1
  76. package/dist/components/biz/business/header-search/shared/search.mjs +1 -1
  77. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +0 -8
  78. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
  79. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +0 -8
  80. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +0 -8
  81. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
  82. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +0 -8
  83. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
  84. package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
  85. package/dist/components/biz/business/hot-recommend/client.d.mts +17 -0
  86. package/dist/components/biz/business/hot-recommend/client.mjs +2 -0
  87. package/dist/components/biz/business/hot-recommend/index.d.mts +5 -0
  88. package/dist/components/biz/business/hot-recommend/material.d.mts +24 -0
  89. package/dist/components/biz/business/hot-recommend/material.mjs +2 -0
  90. package/dist/components/biz/business/hot-recommend/schema.d.mts +23 -0
  91. package/dist/components/biz/business/hot-recommend/schema.mjs +2 -0
  92. package/dist/components/biz/business/hot-recommend/server.d.mts +11 -0
  93. package/dist/components/biz/business/hot-recommend/server.mjs +2 -0
  94. package/dist/components/biz/business/index.d.mts +10 -5
  95. package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
  96. package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
  97. package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
  98. package/dist/components/biz/business/marquee/client.mjs +1 -1
  99. package/dist/components/biz/business/marquee/marquee.module.mjs +2 -6
  100. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -1
  101. package/dist/components/biz/business/profile/index.d.mts +1 -1
  102. package/dist/components/biz/business/profile/profile-header/client.d.mts +2 -1
  103. package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
  104. package/dist/components/biz/business/profile/profile-header/index.d.mts +1 -1
  105. package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
  106. package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
  107. package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
  108. package/dist/components/biz/business/profile/profile-main/empty-state.mjs +2 -0
  109. package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
  110. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
  111. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +2 -0
  112. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
  113. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +5 -1
  114. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
  115. package/dist/components/biz/business/profile/profile-main/utils.mjs +1 -1
  116. package/dist/components/biz/business/ranking-recommend/client.d.mts +17 -0
  117. package/dist/components/biz/business/ranking-recommend/client.mjs +70 -0
  118. package/dist/components/biz/business/ranking-recommend/material.d.mts +35 -0
  119. package/dist/components/biz/business/ranking-recommend/material.mjs +2 -0
  120. package/dist/components/biz/business/ranking-recommend/schema.d.mts +35 -0
  121. package/dist/components/biz/business/ranking-recommend/schema.mjs +2 -0
  122. package/dist/components/biz/business/ranking-recommend/server.d.mts +11 -0
  123. package/dist/components/biz/business/ranking-recommend/server.mjs +2 -0
  124. package/dist/components/biz/business/ranking-recommend/shared/query.mjs +2 -0
  125. package/dist/components/biz/business/ranking-recommend/shared.d.mts +15 -0
  126. package/dist/components/biz/business/ranking-recommend/shared.mjs +2 -0
  127. package/dist/components/biz/business/search-history/client.mjs +1 -1
  128. package/dist/components/biz/business/search-history/schema.mjs +1 -1
  129. package/dist/components/biz/business/search-input/client.mjs +1 -1
  130. package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
  131. package/dist/components/biz/business/tab-bar/client.d.mts +0 -2
  132. package/dist/components/biz/business/tab-bar/client.mjs +1 -1
  133. package/dist/components/common/collection-popup/create-collection-sheet.d.mts +41 -0
  134. package/dist/components/common/collection-popup/create-collection-sheet.mjs +2 -0
  135. package/dist/components/common/collection-popup/index.d.mts +1 -0
  136. package/dist/components/common/collection-popup/index.mjs +1 -1
  137. package/dist/components/common/icons/setting.mjs +1 -1
  138. package/dist/components/common/list/collection-list/collection-list-item.d.mts +8 -0
  139. package/dist/components/common/list/collection-list/collection-list-item.mjs +1 -1
  140. package/dist/components/common/list/collection-list/collection-list.d.mts +6 -0
  141. package/dist/components/common/list/collection-list/collection-list.mjs +1 -1
  142. package/dist/components/common/list/collection-list/collection-select-icon.mjs +2 -0
  143. package/dist/components/common/list/waterfall-recommend/index.d.mts +2 -0
  144. package/dist/components/common/list/waterfall-recommend/waterfall-recommend.d.mts +116 -0
  145. package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +2 -0
  146. package/dist/components/common/series-episodes/index.d.mts +3 -1
  147. package/dist/components/common/series-episodes/index.mjs +1 -1
  148. package/dist/components/common/tab-bar/index.mjs +1 -1
  149. package/dist/components/common/video-player/index.d.mts +1 -2
  150. package/dist/components/pages/collection-detail/_components/collection-detail-video-card.mjs +2 -0
  151. package/dist/components/pages/collection-detail/detail.mjs +1 -1
  152. package/dist/components/pages/edit/page.mjs +1 -1
  153. package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -1
  154. package/dist/components/pages/home/client.mjs +1 -1
  155. package/dist/components/pages/login/auth-page-styles.mjs +6 -0
  156. package/dist/components/pages/login/forgot.mjs +1 -1
  157. package/dist/components/pages/login/login-client.mjs +1 -1
  158. package/dist/components/pages/login/register.mjs +1 -1
  159. package/dist/components/pages/login/verify.mjs +1 -4
  160. package/dist/components/pages/publish/components/collection.mjs +1 -1
  161. package/dist/components/pages/search/page-client.mjs +1 -1
  162. package/dist/components/pages/search/search-result/index.mjs +1 -1
  163. package/dist/components/pages/search/search-result/search-all.mjs +1 -1
  164. package/dist/components/pages/search/search-result/search-user.mjs +1 -1
  165. package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
  166. package/dist/components/pages/search/search-result/shared.mjs +2 -0
  167. package/dist/components/pages/search/top-header.mjs +1 -1
  168. package/dist/components/pages/search-result/page-client.mjs +1 -1
  169. package/dist/components/pages/search-result/search-all.mjs +1 -1
  170. package/dist/components/pages/search-result/search-empty.mjs +2 -0
  171. package/dist/components/pages/search-result/search-tab.mjs +1 -1
  172. package/dist/components/pages/search-result/search-user.mjs +1 -1
  173. package/dist/components/pages/search-result/search-video-info.mjs +2 -0
  174. package/dist/components/pages/search-result/shared.mjs +2 -0
  175. package/dist/components/pages/search-result/top-header.mjs +2 -0
  176. package/dist/components/pages/settings/_components/reset-password-drawer.mjs +1 -4
  177. package/dist/components/pages/settings/_components/settings.mjs +1 -1
  178. package/dist/components/pages/user-follow/_components/follow-no-login.mjs +1 -1
  179. package/dist/components/pages/video-list/video-list-client.mjs +1 -1
  180. package/dist/components/pages/video-list/video-list-recommend-item.mjs +2 -0
  181. package/dist/components/pages/video-list/video-list-skeleton.d.mts +2 -3
  182. package/dist/components/pages/video-list/video-list-skeleton.mjs +1 -1
  183. package/dist/components/ui/badge.d.mts +1 -1
  184. package/dist/components/ui/box.d.mts +1 -1
  185. package/dist/components/ui/button.d.mts +2 -2
  186. package/dist/components/ui/empty.d.mts +1 -1
  187. package/dist/components/ui/input-group.d.mts +1 -1
  188. package/dist/components/ui/item.d.mts +2 -2
  189. package/dist/hooks.d.mts +1 -2
  190. package/dist/hooks.mjs +1 -1
  191. package/dist/i18n/locales/en.mjs +2 -2
  192. package/dist/i18n/locales/zh-CN.mjs +2 -2
  193. package/dist/materials.d.mts +3 -1
  194. package/dist/materials.mjs +1 -1
  195. package/dist/service/generated/client.d.mts +2 -10
  196. package/dist/service/generated/client.mjs +1 -1
  197. package/dist/service/generated/tanstack.d.mts +2 -12
  198. package/dist/service/generated/tanstack.mjs +1 -1
  199. package/dist/service.d.mts +3 -3
  200. package/dist/service.mjs +1 -1
  201. package/dist/store.d.mts +1 -3
  202. package/dist/store.mjs +1 -1
  203. package/dist/theme-tokens.d.mts +9 -0
  204. package/dist/theme-tokens.mjs +2 -0
  205. package/dist/types.d.mts +33 -171
  206. package/dist/utils/email-validator.d.mts +8 -0
  207. package/dist/utils/email-validator.mjs +2 -0
  208. package/dist/utils/helper.d.mts +1 -1
  209. package/dist/utils/helper.mjs +1 -1
  210. package/dist/utils/schema/inspector.d.mts +2 -2
  211. package/dist/utils.d.mts +2 -1
  212. package/dist/utils.mjs +1 -1
  213. package/package.json +7 -2
  214. package/theme.css +172 -59
  215. package/dist/assets/icons/detail/collect_nor.mjs +0 -2
  216. package/dist/assets/icons/detail/collect_sel.mjs +0 -2
  217. package/dist/assets/icons/detail/share.mjs +0 -2
  218. package/dist/assets/icons/marquee-enter.mjs +0 -2
  219. package/dist/assets/icons/right_arrow.mjs +0 -2
  220. package/dist/assets/icons/search/avatar.mjs +0 -2
  221. package/dist/assets/images/marquee.mjs +0 -2
  222. package/dist/components/biz/business/detail/shared/detail-introduction.mjs +0 -2
  223. package/dist/components/common/collection-popup/collection-create-modal.mjs +0 -2
  224. package/dist/components/common/skeleton/search-video-card-skeleton.mjs +0 -2
  225. package/dist/components/common/video-player/video-blind-ad-overlay.mjs +0 -2
  226. package/dist/components/common/video-player/video-player-ref-context.mjs +0 -2
  227. package/dist/components/pages/search/search-utils.mjs +0 -2
  228. package/dist/components/pages/search-result/search-result-skeleton.mjs +0 -2
  229. package/dist/components/pages/search-result/search-video.mjs +0 -2
  230. package/dist/components/pages/video-list/video-list-item.mjs +0 -2
  231. package/dist/hooks/use-is-client.d.mts +0 -10
  232. package/dist/hooks/use-is-client.mjs +0 -2
  233. package/dist/store/modules/blind-spot-ad-store.d.mts +0 -116
  234. package/dist/store/modules/blind-spot-ad-store.mjs +0 -2
  235. package/dist/store/modules/video-player-ref-store.d.mts +0 -21
  236. package/dist/store/modules/video-player-ref-store.mjs +0 -2
@@ -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{useEffect as a,useMemo as o,useRef as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";function f({information:f,isShow:m,showTags:h=!0}){let g=d(`components.biz.business.detail`),{getTitleText:_}=n(),v=o(()=>_(f),[_,f]),y=o(()=>f.description||``,[f.description]),[b,x]=c(!1),[S,C]=c(!1),w=s(null),T=o(()=>p(f.score),[f.score]),E=f.tags||[],D=h&&E.length>0;a(()=>{x(!1)},[y]),a(()=>{if(b){C(!0);return}let e=w.current;if(!y||!m||!e){C(!1);return}let t=()=>{C(e.scrollHeight>e.clientHeight+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[y,b,m]);function O(){x(e=>!e)}return!v&&!y&&!D?null:u(e,{className:`w-full pt-4 px-[12px]`,children:[u(e,{className:`w-full flex items-start justify-between min-w-0`,children:[l(e,{className:`flex-1 pr-[12px] min-w-0`,children:l(i,{title:v})}),u(e,{className:`ml-4 shrink-0 flex flex-col items-center`,children:[l(e,{className:`text-[28px] leading-[36px] h-[36px] font-bold text-[#FF9F1A]`,children:T}),l(t,{className:`text-[12px] text-text2 leading-4`,children:g(`detailIntroduction.score`)})]})]}),y&&m&&u(e,{className:`mt-[12px]`,children:[l(`p`,{ref:w,className:`text-[14px] leading-[22px] text-text2 break-all ${b?``:`line-clamp-1`}`,children:y}),S&&l(`button`,{type:`button`,className:`mt-[8px] text-theme5 inline-flex items-center text-[12px] leading-[18px] text-text2`,onClick:O,children:g(b?`detailIntroduction.collapse`:`detailIntroduction.expand`)})]}),D&&l(r,{tags:E,className:`mt-[12px]`})]})}function p(e){let t=Number(e||`0`);return Number.isFinite(t)?(t>10?t/10:t).toFixed(1):`0`}export{f as DetailIntroduction};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{pCommunityCreateCollection as t}from"../../../service/generated/client.mjs";import{InputGroup as n,InputGroupAddon as r,InputGroupInput as i}from"../../ui/input-group.mjs";import{useDeleteRequest as a}from"../../../hooks/query/use-query.mjs";import o from"../../ui/popup.mjs";import{useCallback as s,useEffect as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{toast as f}from"sonner";import{useTranslations as p}from"next-intl";function m({visible:m,onClose:h,onCreated:g}){let _=p(`components.pages.collectionCreate`),v=p(`components.common.collectionPopup`),{userId:y}=e(),b=a(),[x,S]=l(!1),[C,w]=l({title:``}),T=typeof document>`u`?void 0:document.body;c(()=>{m&&w({title:``})},[m]);let E=s((e,t)=>{w(n=>({...n,[e]:t}))},[]);function D(e){e||h?.()}async function O(){if(x)return;let e=C.title.trim();if(!e){f.error(_(`form.titleRequired`));return}try{S(!0);let n=await t({title:e,cover_image:``});if(n.code===0){f.success(_(`form.createSuccess`)),y&&b([`user-profile`,`mine`,y,`user-collection-created`,y]),g?.();return}f.error(n.message||_(`form.createFailed`))}catch(e){console.error(`创建收藏夹失败`,e),f.error(_(`form.createFailed`))}finally{S(!1)}}return u(o,{open:m,onOpenChange:D,showCloseButton:!1,className:`!z-[1210] h-[260px] rounded-t-[16px] bg-bg1 p-0 text-text1`,overlayClassName:`!z-[1200] bg-black/30`,overlayForceRender:!0,portalContainer:T,children:d(`div`,{className:`bg-bg1 h-[260px] flex flex-col`,children:[u(`div`,{className:`w-full px-[20px]`,children:d(`div`,{className:`w-full h-[56px] flex items-center justify-between`,children:[u(`div`,{className:`text-[18px] text-text1 font-medium`,children:v(`createModalTitle`)}),u(`button`,{type:`button`,className:`h-[56px] text-[16px] text-theme5 font-semibold disabled:text-text3`,onClick:O,disabled:x,children:x?_(`form.creating`):v(`createModalAction`)})]})}),u(`div`,{className:`w-full px-[20px] pt-[12px]`,children:d(n,{className:`!bg-bg2 h-[48px] rounded-[8px] px-[16px]`,children:[u(r,{className:`!text-text1 text-[16px] font-semibold pl-0 pr-2`,align:`inline-start`,children:_(`form.label`)}),u(i,{maxLength:50,className:`!text-text2 text-[16px] text-right placeholder:!text-text3`,placeholder:_(`form.titlePlaceholder`),value:C.title,onChange:e=>E(`title`,e.target.value)})]})})]})})}export{m as CollectionCreateModal};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{Box as e}from"../../ui/box.mjs";import{useId as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{useTranslations as i}from"next-intl";import a from"react-content-loader";function o({uniqueKey:o}){let s=i(`components.common`),c=t();return n(e,{className:`mb-[12px] w-full border-b border-line1 px-[12px] pb-[12px]`,children:r(a,{uniqueKey:o||c,viewBox:`0 0 375 312`,className:`h-auto w-full text-text1`,backgroundColor:`currentColor`,foregroundColor:`currentColor`,backgroundOpacity:.08,foregroundOpacity:.18,preserveAspectRatio:`none`,title:s(`skeleton.loading`),children:[n(`rect`,{x:0,y:0,rx:12,ry:12,width:375,height:211}),n(`rect`,{x:8,y:187,rx:4,ry:4,width:34,height:14}),n(`rect`,{x:325,y:187,rx:4,ry:4,width:42,height:14}),n(`rect`,{x:8,y:221,rx:4,ry:4,width:176,height:24}),n(`rect`,{x:8,y:257,rx:4,ry:4,width:205,height:20}),n(`rect`,{x:255,y:225,rx:21,ry:21,width:112,height:42})]})})}function s({count:t=3,uniqueKeyPrefix:r=`search-video-card-skeleton`,className:i=``}){return n(e,{className:`w-full px-[12px] pt-[12px] bg-bg1 ${i}`.trim(),children:Array.from({length:t}).map((e,t)=>n(o,{uniqueKey:`${r}-${t}`},`${r}-${t}`))})}export{s as SearchVideoCardSkeleton};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{pContentMatchAds as t}from"../../../service/generated/client.mjs";import{pContentMatchAdsKey as n}from"../../../service/generated/tanstack.mjs";import{useRequest as r}from"../../../hooks/query/use-query.mjs";import{useVideoPlayerRef as i}from"./video-player-ref-context.mjs";import{useIsClient as a}from"foxact/use-is-client";import{useEffect as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";import{create as u}from"zustand";import{createJSONStorage as d,persist as f}from"zustand/middleware";import{createPortal as p}from"react-dom";const m=u()(f((e,t)=>({shownVideoIds:new Set,hasShown:e=>t().shownVideoIds.has(e),markAsShown:n=>{let r=t().shownVideoIds;if(!r.has(n)){let t=new Set(r);t.add(n),e({shownVideoIds:t})}}}),{name:`video-blind-ad-storage`,storage:typeof window<`u`?d(()=>sessionStorage):void 0,partialize:e=>({shownVideoIds:Array.from(e.shownVideoIds)}),merge:(e,t)=>({...t,shownVideoIds:new Set(e.shownVideoIds||[])})}));function h({videoId:u}){let d=i(),f=a(),h=e(e=>e.userId),{hasShown:g,markAsShown:_}=m(),v=s(0),y=s(null),[b,x]=c(!1),S=s(!1),C={user_id:h,ad_type:`blind`},{data:w,isLoading:T}=r(n(C),()=>t(C)),E=g(u);o(()=>{let e=d?.current?.getPlayer();if(!e||!w||E)return;let t=w.data?.settings?.trigger_video_progress_min??0;function n(r){if(S.current){e?.off(`timeupdate`,n);return}let i=r?.currentTime;if(y.current!==null){let e=i-y.current;e>0&&e<2&&(v.current+=e,!S.current&&v.current/60>=t&&(S.current=!0,x(!0)))}y.current=i}return e.on(`timeupdate`,n),()=>{e.off(`timeupdate`,n)}},[d,w,E]);let D=!E&&b;o(()=>{if(D)return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=``}},[D]);function O(){E||(_(u),window.open(w?.data.materials?.[0].advertise_url))}return!f||typeof document>`u`||T||w?.data?.hit===!1||E||!b?null:p(l(`div`,{className:`blind-ad-overlay fixed inset-0 h-screen w-screen z-[99999]`,onClick:O}),document.body)}export{h as VideoBlindAdOverlay};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{createContext as e,use as t}from"react";const n=e(null);function r(){return t(n)}export{n as VideoPlayerRefContext,r as useVideoPlayerRef};
@@ -1,2 +0,0 @@
1
-
2
- function e(e){let t=e.author,n=(Array.isArray(e.medias)?e.medias:[]).map(t=>{let n=t?.media_url??``,r=!!t?.is_video,i=t?.cover_image||e.cover_image||(r?``:n);return{...t,media_url:n,is_video:r,cover_image:i}}).filter(e=>!!(e?.media_url||e?.cover_image)),r=(Array.isArray(e.images)?e.images:[]).map(e=>typeof e==`string`?e:e&&typeof e==`object`&&(e.url||e.image_url||e.media_url)||``).filter(e=>!!e).map(e=>({media_url:e,is_video:!1,cover_image:``})),i=n.length?n:r;return{type:Number(e.type??1),content_id:e.content_id??``,author:{avatar:t?.avatar_url??t?.avatar??``,nick_name:t?.nickname??t?.username??``,user_id:t?.user_id??e.user_id??``},create_time:Number(e.create_time??0),content:e.content??``,medias:i,like_count:Number(e.like_count??0),dislike_count:Number(e.dislike_count??0),comment_count:Number(e.comment_count??0),is_liked:e.interaction?.is_liked??!1,is_dislike:e.interaction?.is_dislike??!1}}export{e as mapRecommendContentToUserActivityItem};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{SearchVideoCardSkeleton as e}from"../../common/skeleton/search-video-card-skeleton.mjs";import{jsx as t}from"react/jsx-runtime";function n({count:n=6}){return t(e,{count:n,uniqueKeyPrefix:`search-result-skeleton`})}export{n as SearchResultSkeleton};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{Button as e}from"../../ui/button.mjs";import t from"../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{Item as a}from"../../ui/item.mjs";import{List as o}from"../../ui/list.mjs";import{Text as s}from"../../ui/text.mjs";import{usePaginated as c}from"../../../hooks/query/use-query.mjs";import{eventKey as l}from"../../../constants/event-key.mjs";import{formatVideoDuration as u,getPostDetailPagePath as d}from"../../../utils/tools.mjs";import{apiCollectCustom as f}from"../../../utils/api-collect.mjs";import p from"../../../assets/icons/view.mjs";import{SearchVideoCardSkeleton as m}from"../../common/skeleton/search-video-card-skeleton.mjs";import h from"../../../assets/icons/right_arrow.mjs";import{memo as g,useCallback as _,useMemo as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{useTranslations as x}from"next-intl";import S from"next/link";const C=g(()=>y(m,{count:3}));C.displayName=`SearchVideoListSkeleton`;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){let t=Number(e.episode_count||0),n=Number.isFinite(t)&&t>0,r=String(e.update_status??``).trim();return!n||t<=1?u(Number(e.duration||0)):r===`1`?`${t}集全`:`更新至${t}集`}const E=g(({item:e})=>{let t=e.name||``,n=e.img_x||e.img_y||``,a=T(e);return b(S,{className:`mb-[12px] block w-full border-b border-line1 px-[12px] pb-[12px]`,href:d({id:e.video_id,contentType:0}),onClick:()=>{e.video_id},children:[b(i,{className:`relative w-full overflow-hidden rounded-[12px] bg-neutral-800`,style:{aspectRatio:`16/9`},children:[n&&y(r,{src:n,alt:t||`封面`,fill:!0,objectFit:`cover`}),y(i,{className:`absolute inset-x-0 bottom-0 h-[40px] bg-gradient-to-t from-black/80 to-transparent z-0 pointer-events-none`}),b(i,{className:`absolute bottom-0 left-[8px] mb-[6px] z-10 flex items-center gap-[4px]`,children:[y(p,{className:`h-[14px] w-[14px] text-white`}),y(s,{as:`span`,className:`text-[12px] font-medium text-white drop-shadow-md`,children:w(e.play_count)})]}),a&&y(i,{className:`absolute bottom-0 right-[8px] mb-[6px] z-10 flex items-center`,children:y(s,{as:`span`,className:`text-[12px] font-medium text-white drop-shadow-md`,children:a})})]}),b(i,{className:`flex items-center justify-between gap-[12px] pt-[10px]`,children:[b(i,{className:`flex-1 min-w-0`,children:[y(s,{as:`h3`,className:`text-[16px] font-semibold leading-[24px] text-text1 line-clamp-1`,children:t}),e.description&&y(s,{as:`p`,className:`mt-[4px] text-[13px] leading-[20px] text-text2 line-clamp-1`,children:e.description})]}),y(s,{className:`shrink-0 rounded-[20px] border border-[#FD4C5E] px-[24px] py-[8px] text-[14px] font-normal text-[#FD4C5E]`,children:`观看`})]})]})});E.displayName=`VideoItem`;const D=g(({list:e})=>y(i,{className:`w-full pt-[12px]`,children:e.map((e,t)=>y(E,{item:e},String(e.video_id??t)))}));D.displayName=`VideoListContent`;const O=g(({list:n,hasMore:r})=>{let a=_(()=>{t.emit(l.EXCHANGE_SEARCH_TYPE,`video`)},[]);return b(i,{className:`w-full`,children:[y(D,{list:n}),r&&y(i,{className:`w-full flex items-center justify-center`,children:b(e,{variant:`ghost`,className:`w-fit h-[46px] leading-[46px] mx-auto mt-[-12px] text-[14px] text-text2`,onClick:a,children:[y(s,{as:`span`,children:`查看更多`}),y(h,{className:`w-[12px] h-[12px]`})]})})]})});O.displayName=`SearchVideoWithAll`;const k=g(({inputVal:e,sort:t,refreshVersion:r})=>{let s=x(`components.pages.search.searchResult`),l=_(async r=>await n({data_type:2,extra_params:JSON.stringify({type:3,keywords:e,sort:t}),page:r||1,page_size:20}),[e,t]),u=c({key:v(()=>[`searchByKeyForVideoInfo`,e,3,t,r],[e,t,r]),initialPageParam:1,async queryFn(e){return(await l(e))?.data?.videos??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),d=v(()=>{let e=u.data?.pages??[],t=[];for(let n of e){let e=n.list??[];t.push(...e)}return t},[u.data?.pages]),f=u.isPending||u.isFetching;return f&&d.length===0?y(C,{}):y(i,{className:`w-full`,children:y(o,{loading:f,hasMore:u.hasNextPage??!1,loadMore:async e=>{try{await u.fetchNextPage()}catch(e){console.error(`获取内容列表失败`,e)}},empty:`nodata`,emptyText:s(`searchVideoInfo.noRelevantContent`),children:d.map((e,t)=>y(a,{className:`p-0`,children:y(E,{item:e})},String(e.video_id??t)))})})});k.displayName=`SearchVideoWithPagination`;const A=g(e=>e.mode===`all`?y(O,{list:e.list,hasMore:e.hasMore}):y(k,{inputVal:e.inputVal,sort:e.sort,refreshVersion:e.refreshVersion}));A.displayName=`SearchVideo`;export{A as default};
@@ -1,2 +0,0 @@
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{memo as r,useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=r(({item:r})=>{let s=r.img_x??r.img_y??``,c=r.name??r.id??``;function l(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)}`}let u=i(()=>{let e=r.static?.browse_cnt??0;if(!Number.isFinite(e)||e<=0)return 0;if(e>=1e6){let t=(e/1e6).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}M`:`${t}M`}if(e>=1e3){let t=(e/1e3).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}k`:`${t}k`}return Math.floor(e).toString()},[r]),d=i(()=>{let{type:e,duration:t,links:n}=r;if(e===1)return l(t??0);if(e===2)return`全${n?.length??0}集`},[r]);return o(t,{className:`overflow-hidden rounded-[8px] shadow-sm relative`,children:[s?a(t,{className:`relative w-full aspect-video h-[240px]`,children:a(e,{src:s,alt:c,fill:!0,className:`object-cover`})}):null,a(t,{className:`py-[8px]`,children:a(n,{as:`h3`,className:`line-clamp-1 text-[16px] text-bold text-text1`,children:c})}),o(t,{className:`absolute z-[2] bottom-10 left-1 rounded-xs bg-black/60 px-1 text-[10px] text-white flex items-center gap-1`,children:[a(`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:a(`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`})}),a(n,{className:`text-white text-[12px] leading-[20px]`,children:u})]}),d&&a(t,{className:`absolute z-[2] bottom-10 right-1`,children:a(n,{className:`text-white text-[12px] leading-[20px]`,children:d})})]})});export{s as VideoListItemComponent};
@@ -1,10 +0,0 @@
1
-
2
- //#region hooks/use-is-client.d.ts
3
- /**
4
- * 判断当前是否在客户端环境
5
- *
6
- * 用于处理 SSR/CSR 兼容性问题
7
- */
8
- declare function useIsClient(): boolean;
9
- //#endregion
10
- export { useIsClient };
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{useEffect as e,useState as t}from"react";function n(){let[n,r]=t(!1);return e(()=>{r(!0)},[]),n}export{n as useIsClient};
@@ -1,116 +0,0 @@
1
-
2
- import * as zustand from "zustand";
3
-
4
- //#region store/modules/blind-spot-ad-store.d.ts
5
- /**
6
- * 盲点广告配置
7
- */
8
- interface BlindSpotAdConfig {
9
- /**
10
- * 触发时间阈值(分钟)
11
- */
12
- triggerTimeMinutes: number;
13
- /**
14
- * 广告跳转链接
15
- */
16
- jumpUrl: string;
17
- /**
18
- * 是否启用
19
- */
20
- enabled: boolean;
21
- }
22
- /**
23
- * 盲点广告状态
24
- */
25
- interface BlindSpotAdState {
26
- /**
27
- * 当前会话ID
28
- */
29
- sessionId: string;
30
- /**
31
- * 已触发的视频ID集合
32
- */
33
- triggeredVideoIds: Set<string>;
34
- /**
35
- * 当前视频ID
36
- */
37
- currentVideoId: string | undefined;
38
- /**
39
- * 当前播放时间(秒)
40
- */
41
- currentTime: number;
42
- /**
43
- * 是否显示蒙层
44
- */
45
- isOverlayVisible: boolean;
46
- /**
47
- * 当前广告配置
48
- */
49
- adConfig: BlindSpotAdConfig | null;
50
- /**
51
- * 广告响应数据(原始)
52
- */
53
- adResponseData: any;
54
- }
55
- /**
56
- * 盲点广告操作
57
- */
58
- interface BlindSpotAdActions {
59
- /**
60
- * 初始化会话
61
- */
62
- initSession: () => void;
63
- /**
64
- * 设置当前视频ID
65
- */
66
- setCurrentVideo: (videoId: string | undefined) => void;
67
- /**
68
- * 更新播放时间
69
- */
70
- updateCurrentTime: (time: number) => void;
71
- /**
72
- * 标记视频已触发
73
- */
74
- markVideoTriggered: (videoId: string) => void;
75
- /**
76
- * 检查视频是否已触发
77
- */
78
- isVideoTriggered: (videoId: string) => boolean;
79
- /**
80
- * 显示蒙层
81
- */
82
- showOverlay: () => void;
83
- /**
84
- * 隐藏蒙层
85
- */
86
- hideOverlay: () => void;
87
- /**
88
- * 设置广告配置
89
- */
90
- setAdConfig: (config: BlindSpotAdConfig | null) => void;
91
- /**
92
- * 设置广告响应数据
93
- */
94
- setAdResponseData: (data: any) => void;
95
- /**
96
- * 检查是否应该触发盲点广告
97
- */
98
- shouldTriggerAd: () => boolean;
99
- /**
100
- * 重置状态(视频切换时)
101
- */
102
- reset: () => void;
103
- }
104
- /**
105
- * 盲点广告 Store
106
- *
107
- * 管理盲点广告的全局状态,包括:
108
- * - 会话管理
109
- * - 已触发视频记录
110
- * - 播放进度跟踪
111
- * - 蒙层显示状态
112
- * - 广告配置
113
- */
114
- declare const useBlindSpotAdStore: zustand.UseBoundStore<zustand.StoreApi<BlindSpotAdState & BlindSpotAdActions>>;
115
- //#endregion
116
- export { BlindSpotAdConfig, useBlindSpotAdStore };
@@ -1,2 +0,0 @@
1
-
2
- import{isClient as e}from"../../utils/common.mjs";import{createStore as t}from"../create-store.mjs";function n(){return`session_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}const r=t((t,r)=>({sessionId:``,triggeredVideoIds:new Set,currentVideoId:void 0,currentTime:0,isOverlayVisible:!1,adConfig:null,adResponseData:null,initSession:()=>{t({sessionId:n(),triggeredVideoIds:new Set})},setCurrentVideo:e=>{t({currentVideoId:e,currentTime:0})},updateCurrentTime:e=>{t({currentTime:e})},markVideoTriggered:n=>{let{triggeredVideoIds:i}=r(),a=new Set(i);if(a.add(n),t({triggeredVideoIds:a}),e())try{let e=Array.from(a);sessionStorage.setItem(`blind_spot_ad_triggered_videos`,JSON.stringify(e))}catch(e){console.warn(`Failed to save triggered videos to sessionStorage:`,e)}},isVideoTriggered:e=>{let{triggeredVideoIds:t}=r();return t.has(e)},showOverlay:()=>{t({isOverlayVisible:!0})},hideOverlay:()=>{t({isOverlayVisible:!1})},setAdConfig:e=>{t({adConfig:e})},setAdResponseData:e=>{t({adResponseData:e})},shouldTriggerAd:()=>{let{currentVideoId:e,currentTime:t,adConfig:n,isOverlayVisible:i}=r();return!(i||!e||!n||!n.enabled||r().isVideoTriggered(e)||t<n.triggerTimeMinutes*60||!n.jumpUrl)},reset:()=>{t({currentVideoId:void 0,currentTime:0,isOverlayVisible:!1})}}),{name:`blind-spot-ad-store`,persist:!1});export{r as useBlindSpotAdStore};
@@ -1,21 +0,0 @@
1
-
2
- import { CommonPlayerRef } from "../../components/common/video-player/index.mjs";
3
- import * as zustand from "zustand";
4
-
5
- //#region store/modules/video-player-ref-store.d.ts
6
- /**
7
- * 视频播放器 Ref Store
8
- *
9
- * 用于全局存储当前视频详情页的播放器实例引用
10
- * 供盲点广告等需要访问播放器的功能使用
11
- */
12
- interface VideoPlayerRefState {
13
- playerRef: React.RefObject<CommonPlayerRef | null> | null;
14
- setPlayerRef: (ref: React.RefObject<CommonPlayerRef | null> | null) => void;
15
- }
16
- /**
17
- * 全局视频播放器 ref 状态管理。
18
- */
19
- declare const useVideoPlayerRefStore: zustand.UseBoundStore<zustand.StoreApi<VideoPlayerRefState>>;
20
- //#endregion
21
- export { useVideoPlayerRefStore };
@@ -1,2 +0,0 @@
1
-
2
- import{createStore as e}from"../create-store.mjs";const t=e(e=>({playerRef:null,setPlayerRef:t=>e({playerRef:t})}));export{t as useVideoPlayerRefStore};