@funhub/platform 0.1.51 → 0.1.53

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 (90) hide show
  1. package/dist/biz.d.mts +8 -10
  2. package/dist/biz.mjs +1 -1
  3. package/dist/components/biz/business/detail/materials/registry.d.mts +1 -0
  4. package/dist/components/biz/business/detail/materials/runtime-context-provider.mjs +2 -0
  5. package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +0 -2
  6. package/dist/components/biz/business/detail/materials/video-detail-actions/client.mjs +1 -1
  7. package/dist/components/biz/business/detail/materials/video-detail-actions/schema.d.mts +1 -5
  8. package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +0 -4
  9. package/dist/components/biz/business/detail/materials/video-detail-info/client.mjs +1 -1
  10. package/dist/components/biz/business/detail/materials/video-detail-info/schema.d.mts +1 -7
  11. package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +0 -1
  12. package/dist/components/biz/business/detail/materials/video-detail-info-title/client.mjs +1 -1
  13. package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.d.mts +1 -4
  14. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +0 -3
  15. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.mjs +1 -1
  16. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.mts +1 -6
  17. package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +0 -3
  18. package/dist/components/biz/business/detail/materials/video-detail-player/client.mjs +1 -1
  19. package/dist/components/biz/business/detail/materials/video-detail-player/schema.d.mts +1 -6
  20. package/dist/components/biz/business/detail/materials/video-detail-recommend/client.d.mts +1 -2
  21. package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +1 -1
  22. package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +1 -0
  23. package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +2 -3
  24. package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.mjs +1 -1
  25. package/dist/components/biz/business/detail/materials/video-detail-recommend/utils.mjs +1 -1
  26. package/dist/components/biz/business/home-recommend/index.d.mts +4 -6
  27. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
  28. package/dist/components/biz/business/home-recommend/shared/home-recommend-default-config.mjs +2 -0
  29. package/dist/components/biz/business/home-recommend/shared/home-recommend-feed-mode.mjs +2 -0
  30. package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
  31. package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +2 -0
  32. package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +2 -0
  33. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/index.d.mts +2 -3
  34. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/index.mjs +1 -1
  35. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.d.mts +35 -1
  36. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.mjs +1 -1
  37. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts +28 -2
  38. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.mjs +1 -1
  39. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/prefetch-client.d.mts +27 -0
  40. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/prefetch-client.mjs +2 -0
  41. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/index.mjs +1 -1
  42. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/server.d.mts +3 -6
  43. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/server.mjs +1 -1
  44. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/index.d.mts +2 -3
  45. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/index.mjs +1 -1
  46. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.d.mts +30 -2
  47. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs +1 -1
  48. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts +25 -3
  49. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.mjs +1 -1
  50. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/prefetch-client.d.mts +27 -0
  51. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/prefetch-client.mjs +2 -0
  52. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/index.mjs +1 -1
  53. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/server.d.mts +3 -6
  54. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/server.mjs +1 -1
  55. package/dist/components/biz/business/index.d.mts +11 -13
  56. package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
  57. package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
  58. package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
  59. package/dist/components/biz/business/tab-bar/material.d.mts +1 -1
  60. package/dist/components/biz/business/tab-bar/schema.d.mts +1 -1
  61. package/dist/components/biz/utils/transformers/data.mjs +1 -1
  62. package/dist/components/common/cards/mini-three-card.mjs +1 -1
  63. package/dist/components/pages/(follow)/_components/follow-button/index.mjs +1 -1
  64. package/dist/components/pages/login/register.mjs +1 -1
  65. package/dist/components/pages/search-result/page-client.mjs +1 -1
  66. package/dist/components/pages/search-result/search-all.mjs +1 -1
  67. package/dist/components/pages/search-result/search-tab.mjs +1 -1
  68. package/dist/components/pages/search-result/search-user.mjs +1 -1
  69. package/dist/components/pages/search-result/search-video.mjs +1 -1
  70. package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
  71. package/dist/components/ui/badge.d.mts +1 -1
  72. package/dist/components/ui/button.d.mts +1 -1
  73. package/dist/i18n/locales/en.mjs +1 -1
  74. package/dist/i18n/locales/zh-CN.mjs +1 -1
  75. package/dist/service/content-batch-get-video-detail.d.mts +21 -0
  76. package/dist/service/content-batch-get-video-detail.mjs +2 -0
  77. package/dist/service.d.mts +2 -1
  78. package/dist/service.mjs +1 -1
  79. package/package.json +1 -1
  80. package/dist/assets/images/user/default_avatar.mjs +0 -2
  81. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/defaults/default-props.d.mts +0 -10
  82. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/defaults/default-props.mjs +0 -2
  83. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.d.mts +0 -20
  84. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.mjs +0 -2
  85. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/props.schema.mjs +0 -2
  86. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/defaults/default-props.d.mts +0 -8
  87. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs +0 -2
  88. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.d.mts +0 -20
  89. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.mjs +0 -2
  90. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/props.schema.mjs +0 -2
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{gContentGetAppChannelBlockData as e}from"../../../../../service/generated/client.mjs";import{Image as t}from"../../../../ui/image.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Text as r}from"../../../../ui/text.mjs";import{usePaginated as i}from"../../../../../hooks/query/use-query.mjs";import a from"../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as o}from"../../../../common/cards/mini-three-card.mjs";import{useCallback as s,useEffect as c,useLayoutEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useRouter as h}from"next/navigation";const g={},_={list:[]};function v({variant:e,props:t=g,data:i=_,mode:a=`renderer`}){let o=h(),{list:v,title:b,cursor:x,block_id:C,channel_id:w}=i,T=Array.isArray(i.icons)?i.icons:[],{moreLink:E,title:D,enableInfinite:O}=t,[A,N]=f(0),P=d(null),F=O===!0,{items:I,icons:L,hasNextPage:R,isFetchingNextPage:z,fetchNextPage:B}=M({blockId:C||``,initialCursor:x||``,initialIcons:T,initialList:v,pageSize:16,enabled:a===`renderer`&&F}),V=e===`waterfall`?6:4,H=I.length>=V?I.length-V:-1,U=d(null),W=d(!1),G=D&&D.trim()||b||``,K=e!==`waterfall`&&!F,q=K?S(E,C||``,w||``):``,J=!!(x&&x.trim()),Y=a===`renderer`&&F&&(J||R===!0),X=s(()=>{q&&(q.startsWith(`http`)?window.location.href=q:o.push(q))},[q,o]);l(()=>{let t=P.current;if(!t||e!==`waterfall`)return;let n=()=>{let e=t.clientWidth||0;N(e>0?(e-12)/2:0)};n();let r=new ResizeObserver(n);return r.observe(t),()=>{r.disconnect()}},[e]),c(()=>{let e=U.current;if(!e||!Y||I.length<16)return;let t=document.getElementById(`app-scroll-container`)||null,n=new IntersectionObserver(e=>{e[0]?.isIntersecting&&(z||W.current||(W.current=!0,B().finally(()=>{W.current=!1})))},{root:t,threshold:0});return n.observe(e),()=>{n.disconnect()}},[Y,B,z,I.length,H]);let Z=u(()=>e===`waterfall`?k(I,L,A):{left:[],right:[]},[A,I,L,e]);return I.length?m(n,{className:`w-full mt-[16px]`,children:[m(n,{className:`flex items-center justify-between px-[12px] mb-[8px]`,children:[p(r,{className:`text-text1 text-[18px] leading-[26px] font-bold line-clamp-1`,children:G}),K&&p(r,{className:`text-text3 text-[12px] leading-[18px] ${q?`cursor-pointer`:``}`,onClick:X,children:`更多`})]}),e===`grid`&&p(n,{className:`w-full flex flex-wrap px-[12px]`,children:I.map((e,t)=>{let n=L[t];return p(`div`,{ref:t===H?U:void 0,className:`w-1/2 px-[6px]`,children:p(y,{item:e,icon:n,index:t,widthStyle:{width:`100%`}})},j(e,t))})}),e===`waterfall`&&m(n,{ref:P,className:`w-full px-[12px] flex gap-[12px]`,children:[p(n,{className:`flex-1 min-w-0 flex flex-col`,children:Z.left.map(e=>p(`div`,{ref:e.index===H?U:void 0,children:p(y,{item:e.item,icon:e.icon,index:e.index,widthStyle:{width:`100%`}})},j(e.item,e.index)))}),p(n,{className:`flex-1 min-w-0 flex flex-col`,children:Z.right.map(e=>p(`div`,{ref:e.index===H?U:void 0,children:p(y,{item:e.item,icon:e.icon,index:e.index,widthStyle:{width:`100%`}})},j(e.item,e.index)))})]})]}):null}function y({item:e,icon:t,index:i,widthStyle:s}){let c=C(e),l=e.name||``,u=T(e.static?.browse_cnt??0),d=w(e),f=O(e,t,i);return p(o,{url:c,text:l,className:`w-full`,style:s,topRightChild:f?p(b,{url:f}):void 0,bottomLeftChild:m(n,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[p(a,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),u]}),textChild:m(n,{className:`mt-[4px]`,children:[p(r,{as:`h3`,className:`text-text1 text-[14px] leading-[20px] line-clamp-1`,children:l}),d&&p(r,{className:`text-text3 text-[12px] leading-[18px]`,children:d})]}),linkPath:x(e)})}function b({url:e}){return p(n,{className:`relative w-[40px] h-[20px] mr-[6px] mt-[6px]`,children:p(t,{src:e,alt:`corner`,fill:!0,objectFit:`contain`})})}function x(e){let t=encodeURIComponent(e.name||``);return`/video/${e.id||``}/${t}/episode/1`}function S(e,t,n){if(e)return e;if(!t)return``;let r=new URLSearchParams({blockId:t});return n&&r.set(`channelId`,n),`/featured?${r.toString()}`}function C(e){return e.img_y||e.img_x||``}function w(e){if((e.type??0)===2){let t=Number(e.episode_cnt||e.links?.length||0);return t>0?`全${t}集`:``}return D(Number(e.duration||0))}function T(e){return!Number.isFinite(e)||e<=0?`0`:e>=1e6?`${E(e/1e6)}M`:e>=1e3?`${E(e/1e3)}k`:Math.floor(e).toString()}function E(e){let t=e.toFixed(1);return t.endsWith(`.0`)?t.slice(0,-2):t}function D(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 O(e,t,n){let r=e;return r.corner_icon_url||r.corner_icon||r.icon_url||t?.material_url||``}function k(e,t,n){let r=[],i=[],a=0,o=0;return e.forEach((e,s)=>{let c=t[s],l=A(n,e);a<=o?(r.push({item:e,icon:c,index:s}),a+=l):(i.push({item:e,icon:c,index:s}),o+=l)}),{left:r,right:i}}function A(e,t){if(!e)return 0;let n=e*1.3461538461538463,r=w(t)?18:0;return n+20+r+6+16}function j(e,t){return e.id?`home-recommend-${e.id}`:`home-recommend-${t}`}function M({blockId:t,initialList:n,initialCursor:r,initialIcons:a,pageSize:o,enabled:p}){let m=n.length>0,h=d(n),g=d(a),[_,v]=f(!1);c(()=>{h.current=n,g.current=a},[a,n]);let y=u(()=>{if(!m)return;let e=r&&r.trim()?r:void 0;return{pages:[{data:{block:{data:{videos:n,icons:a,cursor:r||``}}}}],pageParams:[e]}},[m,r,a,n]),{data:b,fetchNextPage:x,hasNextPage:S,isFetchingNextPage:C}=i({key:[`home-recommend`,t],queryFn:n=>e({block_id:t,cursor:n||void 0,page_size:o}),getNextPageParam:e=>{let t=e.data?.block?.data?.cursor;return t&&t.trim()?t:void 0},options:{enabled:p&&!!t,initialData:y,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1},initialPageParam:m&&r&&r.trim()?r:void 0});l(()=>{v(!0)},[]);let w=u(()=>{if(!_)return{items:m?[...h.current]:[],icons:m?[...g.current]:[]};let e=b?.pages||[],t=[],n=[],r=m?1:0;m&&(t.push(...h.current),n.push(...g.current));for(let i=r;i<e.length;i++){let r=e[i].data?.block?.data,a=r?.videos||[],o=r?.icons||[];t.push(...a),n.push(...o)}return{items:t,icons:n}},[m,_,b?.pages]),T=s(async()=>{await x()},[x]);return{items:w.items,icons:w.icons,hasNextPage:S,isFetchingNextPage:C,fetchNextPage:T}}export{v as default};
2
+ "use client";import{gContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{Image as t}from"../../../../ui/image.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Text as r}from"../../../../ui/text.mjs";import{usePaginated as i}from"../../../../../hooks/query/use-query.mjs";import a from"../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as o}from"../../../../common/cards/mini-three-card.mjs";import{HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as s,HOME_RECOMMEND_DEFAULT_GRID_ROWS as c,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as l,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as u,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as d,HOME_RECOMMEND_MAX_GRID_COLUMNS as f,HOME_RECOMMEND_MAX_GRID_ROWS as p}from"./home-recommend-default-config.mjs";import{resolveHomeRecommendFeedMode as m}from"./home-recommend-feed-mode.mjs";import{HOME_RECOMMEND_CARD_CONFIG_FIELD as h}from"./home-recommend-preview.mjs";import{enrichHomeRecommendItemsWithVideoDetails as g}from"./home-recommend-video-detail.mjs";import{useCallback as _,useEffect as v,useLayoutEffect as ee,useMemo as y,useRef as b,useState as x}from"react";import{jsx as S,jsxs as C}from"react/jsx-runtime";import{useRouter as te}from"next/navigation";const ne={},re={list:[]};function ie({variant:e,props:t=ne,data:i=re,mode:a=`renderer`}){let o=a===`editor`,h=!o,g=te(),{list:ie,title:ae,cursor:T,block_id:O,channel_id:k}=i,A=Array.isArray(i.icons)?i.icons:[],{rows:se,columns:j,moreLink:M,title:N,showPlayCount:P,playCountDelta:I,showEpisode:ue,enableInfinite:de}=t,[fe,pe]=x(0),me=b(null),he=m(t.smartTagEnabled),L=de===!0,{items:R,icons:z,hasNextPage:ge,isFetchingNextPage:B,fetchNextPage:V}=le({feedMode:he,blockId:O||``,initialCursor:T||``,initialIcons:A,initialList:ie,pageSize:16,enabled:h,enableInfinite:L}),_e=E(se,c,p),H=E(j,s,f),U=_e*H,W=o&&e===`grid`&&!L,G=W?R.slice(0,U):R,ve=W?z.slice(0,U):z,K=e===`waterfall`?6:4,q=G.length>=K?G.length-K:-1,J=b(null),Y=b(!1),ye=N&&N.trim()||ae||``,X=P??d,Z=Number(I??l),Q=ue??u,be=e!==`waterfall`&&!L,$=be?oe(M,O||``,k||``):``,xe=!!(T&&T.trim()),Se=h&&L&&(xe||ge===!0),Ce=_(()=>{$&&($.startsWith(`http`)?window.location.href=$:g.push($))},[$,g]);ee(()=>{let t=me.current;if(!t||e!==`waterfall`)return;let n=()=>{let e=t.clientWidth||0;pe(e>0?(e-12)/2:0)};n();let r=new ResizeObserver(n);return r.observe(t),()=>{r.disconnect()}},[e]),v(()=>{let e=J.current;if(!e||!Se||G.length<16)return;let t=document.getElementById(`app-scroll-container`)||null,n=new IntersectionObserver(e=>{e[0]?.isIntersecting&&(B||Y.current||(Y.current=!0,V().finally(()=>{Y.current=!1})))},{root:t,threshold:0});return n.observe(e),()=>{n.disconnect()}},[Se,V,B,G.length,q]);let we=y(()=>e===`waterfall`?ce(R,z,fe):{left:[],right:[]},[fe,R,z,e]);return G.length?C(n,{className:`w-full mt-[16px]`,children:[C(n,{className:`flex items-center justify-between px-[12px] mb-[8px]`,children:[S(r,{className:`text-text1 text-[18px] leading-[26px] font-bold line-clamp-1`,children:ye}),be&&S(r,{className:`text-text3 text-[12px] leading-[18px] ${$?`cursor-pointer`:``}`,onClick:Ce,children:`更多`})]}),e===`grid`&&S(n,{className:`w-full flex flex-wrap px-[12px]`,children:G.map((t,n)=>{let r=ve[n],i=D(t),a=X&&(i?.showPlayCount??!0),o=i?.playCountDelta??Z,s=i?.showEpisode??Q,c=n%H,l=H>1?{paddingLeft:12*c/H,paddingRight:12*(H-c-1)/H}:void 0;return S(`div`,{ref:n===q?J:void 0,className:`min-w-0`,style:{width:`${100/H}%`,...l||{}},children:S(w,{variant:e,item:t,icon:r,index:n,showPlayCount:a,playCountDelta:o,showEpisode:s,widthStyle:{width:`100%`}})},F(t,n))})}),e===`waterfall`&&C(n,{ref:me,className:`w-full px-[12px] flex gap-[12px]`,children:[S(n,{className:`flex-1 min-w-0 flex flex-col`,children:we.left.map(t=>{let n=D(t.item),r=X&&(n?.showPlayCount??!0),i=n?.playCountDelta??Z,a=n?.showEpisode??Q;return S(`div`,{ref:t.index===q?J:void 0,children:S(w,{variant:e,item:t.item,icon:t.icon,index:t.index,showPlayCount:r,playCountDelta:i,showEpisode:a,widthStyle:{width:`100%`}})},F(t.item,t.index))})}),S(n,{className:`flex-1 min-w-0 flex flex-col`,children:we.right.map(t=>{let n=D(t.item),r=X&&(n?.showPlayCount??!0),i=n?.playCountDelta??Z,a=n?.showEpisode??Q;return S(`div`,{ref:t.index===q?J:void 0,children:S(w,{variant:e,item:t.item,icon:t.icon,index:t.index,showPlayCount:r,playCountDelta:i,showEpisode:a,widthStyle:{width:`100%`}})},F(t.item,t.index))})})]})]}):null}function w({variant:e,item:t,icon:i,index:s,showPlayCount:c,playCountDelta:l,showEpisode:u,widthStyle:d}){let f=O(t),p=t.name||``,m=se(t.static?.browse_cnt??0),h=A(t,u),g=N(t,i,s);return S(o,{url:f,text:p,className:`w-full`,style:d,topRightChild:g?S(ae,{url:g}):void 0,bottomLeftChild:c?C(n,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[S(a,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),m]}):null,bottomRightChild:u?h&&S(r,{className:`text-[#fff] text-[12px] leading-[18px] pr-2`,children:h}):null,textChild:S(n,{className:`mt-[4px]`,children:S(r,{as:`h3`,className:e===`waterfall`?`text-text1 text-[14px] leading-[20px] line-clamp-5`:`text-text1 text-[14px] leading-[20px] line-clamp-1`,children:p})}),linkPath:T(t)})}function ae({url:e}){return S(n,{className:`relative w-[40px] h-[20px]`,children:S(t,{src:e,alt:`corner`,fill:!0,objectFit:`cover`})})}function T(e){let t=encodeURIComponent(e.name||``);return`/video/${e.id||``}/${t}/episode/1`}function oe(e,t,n){if(e)return e;if(!t)return``;let r=new URLSearchParams({blockId:t});return n&&r.set(`channelId`,n),`/featured?${r.toString()}`}function E(e,t,n){let r=Number(e);return!Number.isFinite(r)||r<=0?t:Math.min(n,Math.floor(r))}function D(e){return e[h]}function O(e){return e.img_y||e.img_x||``}function k(e){return typeof e==`string`?e:``}function A(e,t){if((e.type??0)===2){if(!t)return``;let n=Number(e.episode_cnt||e.links?.length||0);return n>0?`全${n}集`:``}return M(Number(e.duration||0))}function se(e){return!Number.isFinite(e)||e<=0?`0`:e>=1e6?`${j(e/1e6)}M`:e>=1e3?`${j(e/1e3)}k`:Math.floor(e).toString()}function j(e){let t=e.toFixed(1);return t.endsWith(`.0`)?t.slice(0,-2):t}function M(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 N(e,t,n){return k(e.badge_url)||k(t?.material_url)||``}function ce(e,t,n){let r=[],i=[],a=0,o=0;return e.forEach((e,s)=>{let c=t[s],l=P(n,e);a<=o?(r.push({item:e,icon:c,index:s}),a+=l):(i.push({item:e,icon:c,index:s}),o+=l)}),{left:r,right:i}}function P(e,t){if(!e)return 0;let n=e*1.3461538461538463,r=A(t,!0)?18:0;return n+20+r+6+16}function F(e,t){return e.id?`home-recommend-${e.id}`:`home-recommend-${t}`}function I(e){if(typeof e==`string`)return e.trim()||void 0}function le({feedMode:t,blockId:n,initialList:r,initialCursor:a,initialIcons:o,pageSize:s,enabled:c,enableInfinite:l}){let u=r.length>0,[d,f]=x(!1),p=y(()=>{if(!u)return;let e=I(a);return{pages:[{items:r,icons:o,nextCursor:e}],pageParams:[e]}},[u,a,o,r]),{data:m,fetchNextPage:h,hasNextPage:v,isFetchingNextPage:b}=i({key:[`home-recommend`,t,n||`popular`],queryFn:async n=>{let r=await e({cursor:I(n),page_size:s}),i=r.data?.videos||[],a=i;if(t===`popular-with-video-detail`)try{a=await g(i)}catch(e){console.error(`推荐位批量补齐视频详情失败(client)`,e)}return{items:a,icons:[],nextCursor:I(r.data?.cusor)}},getNextPageParam:e=>{if(l)return I(e.nextCursor)},options:{enabled:c,initialData:p,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1},initialPageParam:u?I(a):``});ee(()=>{f(!0)},[]);let S=y(()=>{if(!d)return{items:u?[...r]:[],icons:u?[...o]:[]};let e=m?.pages||[],t=[],n=[],i=u?1:0;u&&(t.push(...r),n.push(...o));for(let r=i;r<e.length;r++){let i=e[r];t.push(...i.items||[]),n.push(...i.icons||[])}return{items:t,icons:n}},[u,o,r,d,m?.pages]),C=_(async()=>{await h()},[h]);return{items:S.items,icons:S.icons,hasNextPage:l?v:!1,isFetchingNextPage:b,fetchNextPage:C}}export{ie as default};
@@ -0,0 +1,2 @@
1
+
2
+ const e=`推荐`,t=1,n=2,r=10,i=6,a=!1,o=!0,s=0,c=!0,l=!1;export{l as HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE,n as HOME_RECOMMEND_DEFAULT_GRID_COLUMNS,t as HOME_RECOMMEND_DEFAULT_GRID_ROWS,s as HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA,c as HOME_RECOMMEND_DEFAULT_SHOW_EPISODE,o as HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT,a as HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED,e as HOME_RECOMMEND_DEFAULT_TITLE,i as HOME_RECOMMEND_MAX_GRID_COLUMNS,r as HOME_RECOMMEND_MAX_GRID_ROWS};
@@ -0,0 +1,2 @@
1
+
2
+ function e(e){return e===!0?`popular-with-video-detail`:`popular`}export{e as resolveHomeRecommendFeedMode};
@@ -1,2 +1,2 @@
1
1
 
2
- const e=`/static/components-thumb/video_player.png`,t=Array.from({length:12},(t,n)=>{let r=n%2==1,i={browse_cnt:12345+n*731};return{id:`preview-recommend-${n+1}`,name:`媒资标题 ${n+1}`,img_y:e,img_x:e,type:r?2:1,duration:r?0:60*(18+n),episode_cnt:r?12+n%3*6:0,static:i}});function n(e,t){return t?8:e===`waterfall`?4:2}function r(e){let n=Math.max(1,Math.floor(e));return Array.from({length:n},(e,n)=>({...t[n%t.length],id:`preview-recommend-${n+1}`,name:`媒资标题 ${n+1}`}))}function i({variant:e,schemaTitle:t,enableInfinite:i,data:a}){let o=Array.isArray(a?.list)?a.list.filter(Boolean):[],s=n(e,i);return{title:t&&t.trim()||a?.title||`推荐位名称`,list:o.length?o:r(s),icons:Array.isArray(a?.icons)?a.icons:[],cursor:a?.cursor||``,block_id:a?.block_id||``,channel_id:a?.channel_id||``,show_style:a?.show_style}}export{i as buildHomeRecommendEditorPreviewData};
2
+ import{HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as e,HOME_RECOMMEND_DEFAULT_GRID_ROWS as t,HOME_RECOMMEND_DEFAULT_TITLE as n,HOME_RECOMMEND_MAX_GRID_COLUMNS as r,HOME_RECOMMEND_MAX_GRID_ROWS as i}from"./home-recommend-default-config.mjs";const a=`/static/components-thumb/video_player.png`,o=`__homeRecommendCardConfig`,s=Array.from({length:60},(e,t)=>{let n=t%2==1,r={browse_cnt:12345+t*731};return{id:`preview-recommend-${t+1}`,name:`${`媒资标题`.repeat((t+1)*2)}`,img_y:a,img_x:a,type:n?2:1,duration:n?0:60*(18+t),episode_cnt:n?12+t%3*6:0,static:r}});function c({variant:e,enableInfinite:t,rows:n,columns:r,items:i}){let a=Array.isArray(i)?i.length:0;return t?Math.max(8,a):e===`waterfall`?Math.max(4,a):Math.max(f(n,r),2,a)}function l(e){let t=Math.max(1,Math.floor(e));return Array.from({length:t},(e,t)=>{let n=s[t%s.length];return{...n,id:`preview-recommend-${t+1}`,name:n.name}})}function u(e,t,n){return t.length?e.map((e,r)=>{let i=t[r];if(!i)return e;let a=(i.contentId?n.get(i.contentId):void 0)||e,s=i.titleMode===`custom`?i.title?.trim()||a.name||e.name||``:a.name||e.name||``,c=i.coverMode===`upload`&&!!i.coverUrl,l=c?i.coverUrl||``:a.img_y||a.img_x||e.img_y||e.img_x||``,u=c?i.coverUrl||``:a.img_x||a.img_y||e.img_x||e.img_y||``,f=a.badge_url||e.badge_url||``,p=i.badge_url??f,m=d(i,a);return{...e,...a,id:a.id||e.id||`preview-recommend-${r+1}`,name:s,img_y:l,img_x:u,badge_url:p||void 0,[o]:m}}):e}function d(e,t){let n=t[o],r={showPlayCount:e.showPlayCount??n?.showPlayCount,playCountDelta:e.playCountDelta??n?.playCountDelta,showEpisode:e.showEpisode??n?.showEpisode};if(!(r.showPlayCount===void 0&&r.playCountDelta===void 0&&r.showEpisode===void 0))return r}function f(n,a){return p(n,t,1,i)*p(a,e,1,r)}function p(e,t,n,r){let i=Number(e);return Number.isFinite(i)?Math.min(r,Math.max(n,Math.floor(i))):t}function m({variant:e,schemaTitle:t,enableInfinite:r,smartTagEnabled:i,rows:a,columns:o,items:s}){let d=new Map,f=i?[]:Array.isArray(s)?s.filter(Boolean):[],p=u(l(c({variant:e,enableInfinite:r,rows:a,columns:o,items:f})),f,d);return{title:t&&t.trim()||n,list:p,icons:[],cursor:``,block_id:``,channel_id:``,show_style:void 0}}export{o as HOME_RECOMMEND_CARD_CONFIG_FIELD,m as buildHomeRecommendEditorPreviewData};
@@ -0,0 +1,2 @@
1
+
2
+ import{gContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{resolveHomeRecommendFeedMode as t}from"./home-recommend-feed-mode.mjs";import{enrichHomeRecommendItemsWithVideoDetails as n}from"./home-recommend-video-detail.mjs";async function r(t){try{let n=await e({page_size:t,cursor:void 0});return{videos:Array.isArray(n.data?.videos)?n.data.videos:[],nextCursor:n.data?.cusor||``,loaded:!0}}catch(e){return console.error(`推荐位获取热门视频失败(server)`,e),{videos:[],nextCursor:``,loaded:!1}}}async function i({smartTagEnabled:e,pageSize:i=16}){let a=t(e),o={list:[],icons:[],cursor:``,title:``,block_id:``,channel_id:``,show_style:void 0};if(a===`popular-with-video-detail`){let e=o.list,t=o.cursor||``,s=e.length>0;if(!s){let n=await r(i);e=n.videos,t=n.nextCursor,s=n.loaded}let c=e;try{c=await n(e)}catch(e){console.error(`推荐位批量补齐视频详情失败(server)`,e)}return{feedMode:a,data:{...o,list:c,cursor:t}}}let s=await r(i),c=s.loaded?s.videos:o.list,l=s.loaded?s.nextCursor:o.cursor||``;return{feedMode:a,data:{...o,list:c,icons:[],cursor:l}}}export{i as resolveHomeRecommendServerData};
@@ -0,0 +1,2 @@
1
+
2
+ import{gContentBatchGetVideoDetail as e}from"../../../../../service/content-batch-get-video-detail.mjs";function t(e){return typeof e==`string`?e.trim():``}function n(e){return t(e.id||e.mid)}function r(e){let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}async function i(r){let i=Array.from(new Set(r.map(n).filter(Boolean)));if(!i.length)return new Map;let a=await e({video_ids:i}),o=Array.isArray(a.data?.videos)?a.data.videos:[],s=new Map;return o.forEach(e=>{let n=t(e.video_id||e.id||e.mid);n&&s.set(n,e)}),s}function a(e,t){return!e.length||!t.size?e:e.map(e=>{let i=n(e),a=t.get(i);if(!a)return e;let o=e.static||{},s=r(a.play_count)??o.browse_cnt,c=r(a.like_count)??o.like_cnt,l=r(a.collect_count)??o.collect_cnt,u=r(a.duration)??e.duration,d=r(Array.isArray(a.episodes)?a.episodes.length:void 0)??e.episode_cnt;return{...e,duration:u,episode_cnt:d,time:a.time||e.time,static:{...o,browse_cnt:s,like_cnt:c,collect_cnt:l}}})}async function o(e){return e.length?a(e,await i(e)):e}export{o as enrichHomeRecommendItemsWithVideoDetails};
@@ -1,7 +1,6 @@
1
1
 
2
- import { defaultProps } from "./defaults/default-props.mjs";
3
- import { HomeRecommendGridClient } from "./runtime/client.mjs";
4
- import { schema } from "./schema/index.mjs";
5
2
  import { homeRecommendGridInspectorDefaultProps, homeRecommendGridInspectorPropsSchema } from "./inspector-schema.mjs";
3
+ import { HomeRecommendGridPrefetchClient } from "./runtime/prefetch-client.mjs";
4
+ import { schema } from "./schema/index.mjs";
6
5
  import { HomeRecommendGrid } from "./server.mjs";
7
6
  import { homeRecommendGridMaterial } from "./material.mjs";
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"./runtime/client.mjs";import{schema as t}from"./schema/index.mjs";import{defaultProps as n}from"./defaults/default-props.mjs";import{homeRecommendGridInspectorDefaultProps as r,homeRecommendGridInspectorPropsSchema as i}from"./inspector-schema.mjs";import{HomeRecommendGrid as a}from"./server.mjs";import{homeRecommendGridMaterial as o}from"./material.mjs";var s=e;export{s as default};
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,4 +1,5 @@
1
1
 
2
+ import "../../../../utils/index.mjs";
2
3
  import { SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
3
4
  import "../../../../../../utils/schema/index.mjs";
4
5
  import z$1 from "zod";
@@ -8,16 +9,49 @@ import z$1 from "zod";
8
9
  * HomeRecommendGrid 物料属性 schema 定义。
9
10
  */
10
11
  declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
11
- title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
12
+ rows: z$1.ZodNumber & SchemaHasDefaultValue;
13
+ columns: z$1.ZodNumber & SchemaHasDefaultValue;
14
+ smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
15
+ title: z$1.ZodString & SchemaHasDefaultValue;
16
+ showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
17
+ playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
18
+ showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
12
19
  enableInfinite: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
13
20
  moreLink: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
21
+ smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
22
+ items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
23
+ contentId: z$1.ZodString;
24
+ coverMode: z$1.ZodOptional<z$1.ZodEnum<{
25
+ content: "content";
26
+ upload: "upload";
27
+ }>>;
28
+ coverUrl: z$1.ZodOptional<z$1.ZodString>;
29
+ badge_url: z$1.ZodOptional<z$1.ZodString>;
30
+ titleMode: z$1.ZodOptional<z$1.ZodEnum<{
31
+ content: "content";
32
+ custom: "custom";
33
+ }>>;
34
+ title: z$1.ZodOptional<z$1.ZodString>;
35
+ description: z$1.ZodOptional<z$1.ZodString>;
36
+ showPlayCount: z$1.ZodOptional<z$1.ZodBoolean>;
37
+ playCountDelta: z$1.ZodOptional<z$1.ZodNumber>;
38
+ showEpisode: z$1.ZodOptional<z$1.ZodBoolean>;
39
+ }, z$1.core.$strip>>>;
14
40
  mode: z$1.ZodOptional<z$1.ZodEnum<{
15
41
  renderer: "renderer";
16
42
  editor: "editor";
17
43
  }>>;
18
44
  }, z$1.core.$strip>;
19
45
  declare const homeRecommendGridInspectorDefaultProps: {
46
+ smartTagIds: never[];
47
+ items: never[];
48
+ rows: number;
49
+ columns: number;
50
+ smartTagEnabled: boolean;
20
51
  title: string;
52
+ showPlayCount: boolean;
53
+ playCountDelta: number;
54
+ showEpisode: boolean;
21
55
  enableInfinite: boolean;
22
56
  moreLink: string;
23
57
  };
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,defineSwitchPropSchema as t,defineTextPropSchema as n,getSchemaDefaultProps as r}from"../../../../../../utils/schema/schema.mjs";const i=e({title:n({label:`推荐位名称`,description:``,required:!1,defaultValue:``}),enableInfinite:t({label:`无限下拉`,defaultValue:!1,required:!1}),moreLink:n({label:`更多`,description:``,required:!1,defaultValue:``})}),a=r(i);export{a as homeRecommendGridInspectorDefaultProps,i as homeRecommendGridInspectorPropsSchema};
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};
@@ -2,15 +2,41 @@
2
2
  import { SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
3
3
  import { DefineMaterialOption } from "../../../../../../utils/schema/material.mjs";
4
4
  import "../../../../../../utils/schema/index.mjs";
5
+ import { HomeRecommendGridPrefetchClient } from "./runtime/prefetch-client.mjs";
5
6
  import { HomeRecommendGrid } from "./server.mjs";
6
7
  import * as zod from "zod";
7
8
  import * as zod_v4_core0 from "zod/v4/core";
8
9
 
9
10
  //#region components/biz/business/home-recommend/variants/home-recommend-grid/material.d.ts
10
- declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecommendGrid, typeof HomeRecommendGrid, zod.ZodObject<{
11
- title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
11
+ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecommendGrid, typeof HomeRecommendGridPrefetchClient, zod.ZodObject<{
12
+ rows: zod.ZodNumber & SchemaHasDefaultValue;
13
+ columns: zod.ZodNumber & SchemaHasDefaultValue;
14
+ smartTagEnabled: zod.ZodBoolean & SchemaHasDefaultValue;
15
+ title: zod.ZodString & SchemaHasDefaultValue;
16
+ showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
17
+ playCountDelta: zod.ZodNumber & SchemaHasDefaultValue;
18
+ showEpisode: zod.ZodBoolean & SchemaHasDefaultValue;
12
19
  enableInfinite: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
13
20
  moreLink: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
21
+ smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
22
+ items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
23
+ contentId: zod.ZodString;
24
+ coverMode: zod.ZodOptional<zod.ZodEnum<{
25
+ content: "content";
26
+ upload: "upload";
27
+ }>>;
28
+ coverUrl: zod.ZodOptional<zod.ZodString>;
29
+ badge_url: zod.ZodOptional<zod.ZodString>;
30
+ titleMode: zod.ZodOptional<zod.ZodEnum<{
31
+ content: "content";
32
+ custom: "custom";
33
+ }>>;
34
+ title: zod.ZodOptional<zod.ZodString>;
35
+ description: zod.ZodOptional<zod.ZodString>;
36
+ showPlayCount: zod.ZodOptional<zod.ZodBoolean>;
37
+ playCountDelta: zod.ZodOptional<zod.ZodNumber>;
38
+ showEpisode: zod.ZodOptional<zod.ZodBoolean>;
39
+ }, zod_v4_core0.$strip>>>;
14
40
  mode: zod.ZodOptional<zod.ZodEnum<{
15
41
  renderer: "renderer";
16
42
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{homeRecommendGridInspectorPropsSchema as t}from"./inspector-schema.mjs";import{HomeRecommendGrid as n}from"./server.mjs";const r=e({type:`home-recommend-grid`,name:`两列宫格`,icon:`/static/components-thumb/grid_two_column_single_row.png`,category:`内容组件`,serverComponent:n,clientComponent:n,propsSchema:t});export{r as homeRecommendGridMaterial};
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};
@@ -0,0 +1,27 @@
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 };
@@ -0,0 +1,2 @@
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 +1,2 @@
1
1
 
2
- import{componentMeta as e}from"./component.mjs";import{dataSchema as t}from"./data.schema.mjs";import{eventSchema as n}from"./event.schema.mjs";import{propsSchema as r}from"./props.schema.mjs";import{styleSchema as i}from"./style.schema.mjs";const a={...e,propsSchema:r,dataSchema:t,styleSchema:i,eventSchema:n};export{a as schema};
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,17 +1,14 @@
1
1
 
2
- import { HomeRecommendData } from "../../types.mjs";
3
2
  import { HomeRecommendGridInspectorProps } from "./inspector-schema.mjs";
4
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
4
 
6
5
  //#region components/biz/business/home-recommend/variants/home-recommend-grid/server.d.ts
7
- /** HomeRecommendGrid 物料组件 props(inspector 可编辑字段 + 可选数据) */
8
- type HomeRecommendGridProps = HomeRecommendGridInspectorProps & {
9
- /** 推荐位数据 */data?: HomeRecommendData;
10
- };
6
+ /** HomeRecommendGrid 物料组件 props */
7
+ type HomeRecommendGridProps = HomeRecommendGridInspectorProps;
11
8
  /**
12
9
  * HomeRecommendGrid 物料组件
13
10
  * 接收 inspector 可编辑的 props,转换为 BaseComponentProps 传给 runtime client
14
11
  */
15
- declare function HomeRecommendGrid(props: HomeRecommendGridProps): react_jsx_runtime0.JSX.Element;
12
+ declare function HomeRecommendGrid(props: HomeRecommendGridProps): Promise<react_jsx_runtime0.JSX.Element>;
16
13
  //#endregion
17
14
  export { HomeRecommendGrid };
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"./runtime/client.mjs";import{defaultProps as t}from"./defaults/default-props.mjs";import{jsx as n}from"react/jsx-runtime";function r(r){let{mode:i=`renderer`,moreLink:a=t.moreLink,title:o,enableInfinite:s,data:c}=r;return n(e,{mode:i,props:{moreLink:a,title:o,enableInfinite:s},data:c})}export{r as HomeRecommendGrid};
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,7 +1,6 @@
1
1
 
2
- import { defaultProps } from "./defaults/default-props.mjs";
3
- import { HomeRecommendWaterfallClient } from "./runtime/client.mjs";
4
- import { schema } from "./schema/index.mjs";
5
2
  import { homeRecommendWaterfallInspectorDefaultProps, homeRecommendWaterfallInspectorPropsSchema } from "./inspector-schema.mjs";
3
+ import { HomeRecommendWaterfallPrefetchClient } from "./runtime/prefetch-client.mjs";
4
+ import { schema } from "./schema/index.mjs";
6
5
  import { HomeRecommendWaterfall } from "./server.mjs";
7
6
  import { homeRecommendWaterfallMaterial } from "./material.mjs";
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"./runtime/client.mjs";import{schema as t}from"./schema/index.mjs";import{defaultProps as n}from"./defaults/default-props.mjs";import{homeRecommendWaterfallInspectorDefaultProps as r,homeRecommendWaterfallInspectorPropsSchema as i}from"./inspector-schema.mjs";import{HomeRecommendWaterfall as a}from"./server.mjs";import{homeRecommendWaterfallMaterial as o}from"./material.mjs";var s=e;export{s as default};
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,4 +1,5 @@
1
1
 
2
+ import "../../../../utils/index.mjs";
2
3
  import { SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
3
4
  import "../../../../../../utils/schema/index.mjs";
4
5
  import z$1 from "zod";
@@ -8,15 +9,42 @@ import z$1 from "zod";
8
9
  * HomeRecommendWaterfall 物料属性 schema 定义。
9
10
  */
10
11
  declare const homeRecommendWaterfallInspectorPropsSchema: z$1.ZodObject<{
11
- title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
12
- enableInfinite: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
12
+ smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
13
+ title: z$1.ZodString & SchemaHasDefaultValue;
14
+ showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
15
+ playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
16
+ showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
17
+ enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
18
+ smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
19
+ items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
20
+ contentId: z$1.ZodString;
21
+ coverMode: z$1.ZodOptional<z$1.ZodEnum<{
22
+ content: "content";
23
+ upload: "upload";
24
+ }>>;
25
+ coverUrl: z$1.ZodOptional<z$1.ZodString>;
26
+ titleMode: z$1.ZodOptional<z$1.ZodEnum<{
27
+ content: "content";
28
+ custom: "custom";
29
+ }>>;
30
+ title: z$1.ZodOptional<z$1.ZodString>;
31
+ showPlayCount: z$1.ZodOptional<z$1.ZodBoolean>;
32
+ playCountDelta: z$1.ZodOptional<z$1.ZodNumber>;
33
+ showEpisode: z$1.ZodOptional<z$1.ZodBoolean>;
34
+ }, z$1.core.$strip>>>;
13
35
  mode: z$1.ZodOptional<z$1.ZodEnum<{
14
36
  renderer: "renderer";
15
37
  editor: "editor";
16
38
  }>>;
17
39
  }, z$1.core.$strip>;
18
40
  declare const homeRecommendWaterfallInspectorDefaultProps: {
41
+ smartTagIds: never[];
42
+ items: never[];
43
+ smartTagEnabled: boolean;
19
44
  title: string;
45
+ showPlayCount: boolean;
46
+ playCountDelta: number;
47
+ showEpisode: boolean;
20
48
  enableInfinite: boolean;
21
49
  };
22
50
  type HomeRecommendWaterfallInspectorProps = z$1.infer<typeof homeRecommendWaterfallInspectorPropsSchema>;
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,defineSwitchPropSchema as t,defineTextPropSchema as n,getSchemaDefaultProps as r}from"../../../../../../utils/schema/schema.mjs";const i=e({title:n({label:`推荐位名称`,description:``,required:!1,defaultValue:``}),enableInfinite:t({label:`无限下拉`,defaultValue:!1,required:!1})}),a=r(i);export{a as homeRecommendWaterfallInspectorDefaultProps,i as homeRecommendWaterfallInspectorPropsSchema};
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};
@@ -2,14 +2,36 @@
2
2
  import { SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
3
3
  import { DefineMaterialOption } from "../../../../../../utils/schema/material.mjs";
4
4
  import "../../../../../../utils/schema/index.mjs";
5
+ import { HomeRecommendWaterfallPrefetchClient } from "./runtime/prefetch-client.mjs";
5
6
  import { HomeRecommendWaterfall } from "./server.mjs";
6
7
  import * as zod from "zod";
7
8
  import * as zod_v4_core0 from "zod/v4/core";
8
9
 
9
10
  //#region components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.ts
10
- declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRecommendWaterfall, typeof HomeRecommendWaterfall, zod.ZodObject<{
11
- title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
12
- enableInfinite: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
11
+ declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRecommendWaterfall, typeof HomeRecommendWaterfallPrefetchClient, zod.ZodObject<{
12
+ smartTagEnabled: zod.ZodBoolean & SchemaHasDefaultValue;
13
+ title: zod.ZodString & SchemaHasDefaultValue;
14
+ showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
15
+ playCountDelta: zod.ZodNumber & SchemaHasDefaultValue;
16
+ showEpisode: zod.ZodBoolean & SchemaHasDefaultValue;
17
+ enableInfinite: zod.ZodBoolean & SchemaHasDefaultValue;
18
+ smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
19
+ items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
20
+ contentId: zod.ZodString;
21
+ coverMode: zod.ZodOptional<zod.ZodEnum<{
22
+ content: "content";
23
+ upload: "upload";
24
+ }>>;
25
+ coverUrl: zod.ZodOptional<zod.ZodString>;
26
+ titleMode: zod.ZodOptional<zod.ZodEnum<{
27
+ content: "content";
28
+ custom: "custom";
29
+ }>>;
30
+ title: zod.ZodOptional<zod.ZodString>;
31
+ showPlayCount: zod.ZodOptional<zod.ZodBoolean>;
32
+ playCountDelta: zod.ZodOptional<zod.ZodNumber>;
33
+ showEpisode: zod.ZodOptional<zod.ZodBoolean>;
34
+ }, zod_v4_core0.$strip>>>;
13
35
  mode: zod.ZodOptional<zod.ZodEnum<{
14
36
  renderer: "renderer";
15
37
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{homeRecommendWaterfallInspectorPropsSchema as t}from"./inspector-schema.mjs";import{HomeRecommendWaterfall as n}from"./server.mjs";const r=e({type:`home-recommend-waterfall`,name:`瀑布流`,icon:`/static/components-thumb/grid_waterfall_two_column.png`,category:`内容组件`,serverComponent:n,clientComponent:n,propsSchema:t});export{r as homeRecommendWaterfallMaterial};
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};
@@ -0,0 +1,27 @@
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 };
@@ -0,0 +1,2 @@
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 +1,2 @@
1
1
 
2
- import{componentMeta as e}from"./component.mjs";import{dataSchema as t}from"./data.schema.mjs";import{eventSchema as n}from"./event.schema.mjs";import{propsSchema as r}from"./props.schema.mjs";import{styleSchema as i}from"./style.schema.mjs";const a={...e,propsSchema:r,dataSchema:t,styleSchema:i,eventSchema:n};export{a as schema};
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,17 +1,14 @@
1
1
 
2
- import { HomeRecommendData } from "../../types.mjs";
3
2
  import { HomeRecommendWaterfallInspectorProps } from "./inspector-schema.mjs";
4
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
4
 
6
5
  //#region components/biz/business/home-recommend/variants/home-recommend-waterfall/server.d.ts
7
- /** HomeRecommendWaterfall 物料组件 props(inspector 可编辑字段 + 可选数据) */
8
- type HomeRecommendWaterfallProps = HomeRecommendWaterfallInspectorProps & {
9
- /** 推荐位数据 */data?: HomeRecommendData;
10
- };
6
+ /** HomeRecommendWaterfall 物料组件 props */
7
+ type HomeRecommendWaterfallProps = HomeRecommendWaterfallInspectorProps;
11
8
  /**
12
9
  * HomeRecommendWaterfall 物料组件
13
10
  * 接收 inspector 可编辑的 props,转换为 BaseComponentProps 传给 runtime client
14
11
  */
15
- declare function HomeRecommendWaterfall(props: HomeRecommendWaterfallProps): react_jsx_runtime0.JSX.Element;
12
+ declare function HomeRecommendWaterfall(props: HomeRecommendWaterfallProps): Promise<react_jsx_runtime0.JSX.Element>;
16
13
  //#endregion
17
14
  export { HomeRecommendWaterfall };
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"./runtime/client.mjs";import{jsx as t}from"react/jsx-runtime";function n(n){let{mode:r=`renderer`,title:i,enableInfinite:a,data:o}=n;return t(e,{mode:r,props:{title:i,enableInfinite:a},data:o})}export{n as HomeRecommendWaterfall};
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};
@@ -41,16 +41,14 @@ import { defaultProps as defaultProps$9 } from "./fullscreen-feed/variants/fulls
41
41
  import { FullscreenVideoFeedClient } from "./fullscreen-feed/variants/fullscreen-video-feed/runtime/client.mjs";
42
42
  import { schema as schema$9 } from "./fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";
43
43
  import "./fullscreen-feed/index.mjs";
44
- import { defaultProps as defaultProps$10 } from "./home-recommend/variants/home-recommend-grid/defaults/default-props.mjs";
45
- import { HomeRecommendGridClient } from "./home-recommend/variants/home-recommend-grid/runtime/client.mjs";
46
- import { schema as schema$10 } from "./home-recommend/variants/home-recommend-grid/schema/index.mjs";
47
44
  import { homeRecommendGridInspectorDefaultProps, homeRecommendGridInspectorPropsSchema } from "./home-recommend/variants/home-recommend-grid/inspector-schema.mjs";
45
+ import { HomeRecommendGridPrefetchClient } from "./home-recommend/variants/home-recommend-grid/runtime/prefetch-client.mjs";
46
+ import { schema as schema$10 } from "./home-recommend/variants/home-recommend-grid/schema/index.mjs";
48
47
  import { HomeRecommendGrid } from "./home-recommend/variants/home-recommend-grid/server.mjs";
49
48
  import { homeRecommendGridMaterial } from "./home-recommend/variants/home-recommend-grid/material.mjs";
50
- import { defaultProps as defaultProps$11 } from "./home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs";
51
- import { HomeRecommendWaterfallClient } from "./home-recommend/variants/home-recommend-waterfall/runtime/client.mjs";
52
- import { schema as schema$11 } from "./home-recommend/variants/home-recommend-waterfall/schema/index.mjs";
53
49
  import { homeRecommendWaterfallInspectorDefaultProps, homeRecommendWaterfallInspectorPropsSchema } from "./home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs";
50
+ import { HomeRecommendWaterfallPrefetchClient } from "./home-recommend/variants/home-recommend-waterfall/runtime/prefetch-client.mjs";
51
+ import { schema as schema$11 } from "./home-recommend/variants/home-recommend-waterfall/schema/index.mjs";
54
52
  import { HomeRecommendWaterfall } from "./home-recommend/variants/home-recommend-waterfall/server.mjs";
55
53
  import { homeRecommendWaterfallMaterial } from "./home-recommend/variants/home-recommend-waterfall/material.mjs";
56
54
  import "./home-recommend/index.mjs";
@@ -59,11 +57,11 @@ import { MarqueeClient, MarqueeProps } from "./marquee/client.mjs";
59
57
  import { MarqueeServer } from "./marquee/server.mjs";
60
58
  import { marqueeMaterial } from "./marquee/material.mjs";
61
59
  import "./marquee/index.mjs";
62
- import { defaultProps as defaultProps$12 } from "./nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";
60
+ import { defaultProps as defaultProps$10 } from "./nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";
63
61
  import { BasicNavBarClient } from "./nav-bar/variants/basic-nav-bar/runtime/client.mjs";
64
62
  import { schema as schema$12 } from "./nav-bar/variants/basic-nav-bar/schema/index.mjs";
65
63
  import "./nav-bar/index.mjs";
66
- import { defaultProps as defaultProps$13 } from "./post-card/variants/basic-post-card/defaults/default-props.mjs";
64
+ import { defaultProps as defaultProps$11 } from "./post-card/variants/basic-post-card/defaults/default-props.mjs";
67
65
  import { BasicPostCardClient } from "./post-card/variants/basic-post-card/runtime/client.mjs";
68
66
  import { schema as schema$13 } from "./post-card/variants/basic-post-card/schema/index.mjs";
69
67
  import "./post-card/index.mjs";
@@ -86,20 +84,20 @@ import { PublishTab, PublishTabProps, PublishTabUserInfo } from "./profile/profi
86
84
  import { BuildPublishTabPrefetchParams, PublishTabServer, buildPublishTabPrefetch } from "./profile/profile-main/tabs/publish-tab/server.mjs";
87
85
  import { profileMainCollectCollectionTabOptions, profileMainCollectTabOptions, profileMainHistoryTabOptions, profileMainLikeTabOptions, profileMainMineTabOptions, profileMainProfileTabOptions, profileMainTabOptions } from "./profile/profile-main/variants.mjs";
88
86
  import "./profile/index.mjs";
89
- import { defaultProps as defaultProps$14 } from "./recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";
87
+ import { defaultProps as defaultProps$12 } from "./recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";
90
88
  import { BasicRecommendedUsersClient } from "./recommended-users/variants/basic-recommended-users/runtime/client.mjs";
91
89
  import { schema as schema$14 } from "./recommended-users/variants/basic-recommended-users/schema/index.mjs";
92
90
  import "./recommended-users/index.mjs";
93
- import { defaultProps as defaultProps$15 } from "./search-bar/variants/basic-search-bar/defaults/default-props.mjs";
91
+ import { defaultProps as defaultProps$13 } from "./search-bar/variants/basic-search-bar/defaults/default-props.mjs";
94
92
  import { BasicSearchBarClient } from "./search-bar/variants/basic-search-bar/runtime/client.mjs";
95
93
  import { schema as schema$15 } from "./search-bar/variants/basic-search-bar/schema/index.mjs";
96
- import { defaultProps as defaultProps$16 } from "./search-bar/variants/detail-search-bar/defaults/default-props.mjs";
94
+ import { defaultProps as defaultProps$14 } from "./search-bar/variants/detail-search-bar/defaults/default-props.mjs";
97
95
  import { DetailSearchBarClient } from "./search-bar/variants/detail-search-bar/runtime/client.mjs";
98
96
  import { schema as schema$16 } from "./search-bar/variants/detail-search-bar/schema/index.mjs";
99
- import { defaultProps as defaultProps$17 } from "./search-bar/variants/filter-search-bar/defaults/default-props.mjs";
97
+ import { defaultProps as defaultProps$15 } from "./search-bar/variants/filter-search-bar/defaults/default-props.mjs";
100
98
  import { FilterSearchBarClient } from "./search-bar/variants/filter-search-bar/runtime/client.mjs";
101
99
  import { schema as schema$17 } from "./search-bar/variants/filter-search-bar/schema/index.mjs";
102
- import { defaultProps as defaultProps$18 } from "./search-bar/variants/tag-search-bar/defaults/default-props.mjs";
100
+ import { defaultProps as defaultProps$16 } from "./search-bar/variants/tag-search-bar/defaults/default-props.mjs";
103
101
  import { TagSearchBarClient } from "./search-bar/variants/tag-search-bar/runtime/client.mjs";
104
102
  import { schema as schema$18 } from "./search-bar/variants/tag-search-bar/schema/index.mjs";
105
103
  import "./search-bar/index.mjs";
@@ -1,2 +1,2 @@
1
1
 
2
- import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../ui/link.mjs";import i from"../../../../assets/icons/view.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({data:s}){return s?a(t,{children:(Array.isArray(s)?s:[s]).map((s,c)=>{if(!s||typeof s!=`object`)return null;let{id:l,title:u,desc:d,cover:f,tagImageUrl:p,showEpisode:m,episodeText:h,showPlayCount:g,playCount:_}=s,v=u||``,y=l?`/video/${l}/${v?encodeURIComponent(v):``}`:`#`,b=p?String(p):null,x=h==null?``:String(h).trim(),S=_==null?``:String(_).trim(),C=(m??!0)&&x?x:null,w=(g??!0)&&S?S:null;return a(t,{children:o(r,{href:y,children:[o(t,{className:`relative w-full overflow-hidden rounded-[12px] bg-neutral-800`,style:{aspectRatio:`16/9`},children:[f&&a(e,{src:f,alt:v||`封面`,fill:!0,objectFit:`cover`}),b&&a(t,{className:`absolute top-0 right-0 z-10 w-[37px] h-[20px]`,children:a(e,{src:b,alt:v||`角标`,fill:!0,sizes:`37px`,className:`object-contain`})}),a(t,{className:`absolute inset-x-0 bottom-0 h-[40px] bg-gradient-to-t from-black/80 to-transparent z-0 pointer-events-none`}),w&&o(t,{className:`absolute bottom-0 left-[8px] mb-[6px] z-10 flex items-center gap-[4px]`,children:[a(i,{className:`h-[14px] w-[14px] text-white`}),a(n,{as:`span`,className:`text-[12px] font-medium text-white drop-shadow-md`,children:w})]}),C&&a(t,{className:`absolute bottom-0 right-[8px] mb-[6px] z-10 flex items-center`,children:a(n,{as:`span`,className:`text-[12px] font-medium text-white drop-shadow-md`,children:C})})]}),o(t,{className:`flex items-center justify-between gap-[12px] pt-[10px] px-2`,children:[o(t,{className:`flex-1 min-w-0`,children:[a(n,{as:`h3`,className:`text-[16px] font-semibold leading-[24px] text-text1 line-clamp-1`,children:v}),d&&a(n,{as:`p`,className:`mt-[4px] text-[13px] leading-[20px] text-text2 line-clamp-1`,children:d})]}),a(n,{className:`shrink-0 rounded-[20px] border border-[#FD4C5E] px-[24px] py-[8px] text-[14px] font-normal text-[#FD4C5E]`,children:`观看`})]})]})},l||v||`large-grid-item-${c}`)})}):null}export{s as LargeGridItemClient};
2
+ import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../ui/link.mjs";import i from"../../../../assets/icons/view.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(e){if(e.episodeText===void 0||e.episodeText===null||e.episodeText===``)return null;let t=String(e.episodeText).trim();if(!t)return null;if(t===`已完结`||t===`连载中`)return t;let n=Number(t);return Number.isFinite(n)&&n>0?`全${Math.floor(n)}集`:/^全\d+集$/.test(t)?t:null}function c(e){if(e==null||e===``)return null;let t=Number(e);if(Number.isNaN(t))return String(e);if(t<1e3)return String(t);if(t<1e6){let e=(t/1e3).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}K`:`${e}K`}else{let e=(t/1e6).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}M`:`${e}M`}}function l(e,t,n){return t===`showPlayCount`?e.showPlayCount??n:t===`showEpisode`?e.showEpisode??n:n}function u(e){if(l(e,`showPlayCount`,!0))return e.playCount}function d(e){let t=e.tagImageUrl;return t?String(t):null}function f({data:f}){return f?a(t,{children:(Array.isArray(f)?f:[f]).map(f=>{let p=f.id?`/video/${f.id}/${f.title?encodeURIComponent(f.title):``}`:`#`,m=d(f),h=l(f,`showEpisode`,!0)?s(f):null,g=c(u(f));return a(t,{children:o(r,{href:p,children:[o(t,{className:`relative w-full overflow-hidden rounded-[12px] bg-neutral-800`,style:{aspectRatio:`16/9`},children:[f.cover&&a(e,{src:f.cover,alt:f.title,fill:!0,objectFit:`cover`}),m&&a(t,{className:`absolute right-0 top-0 z-10 h-[37px] w-[20px] overflow-hidden`,style:{borderRadius:`0 8px`},children:a(e,{src:m,alt:f.title,fill:!0,objectFit:`cover`})}),a(t,{className:`absolute inset-x-0 bottom-0 h-[40px] bg-gradient-to-t from-black/80 to-transparent z-0 pointer-events-none`}),g&&o(t,{className:`absolute bottom-0 left-[8px] mb-[6px] z-10 flex items-center gap-[4px]`,children:[a(i,{className:`h-[14px] w-[14px] text-white`}),a(n,{as:`span`,className:`text-[12px] font-medium text-white drop-shadow-md`,children:g})]}),h&&a(t,{className:`absolute bottom-0 right-[8px] mb-[6px] z-10 flex items-center`,children:a(n,{as:`span`,className:`text-[12px] font-medium text-white drop-shadow-md`,children:h})})]}),o(t,{className:`flex items-center justify-between gap-[12px] pt-[10px] px-2`,children:[o(t,{className:`flex-1 min-w-0`,children:[a(n,{as:`h3`,className:`text-[16px] font-semibold leading-[24px] text-text1 line-clamp-1`,children:f.title}),f.desc&&a(n,{as:`p`,className:`mt-[4px] text-[13px] leading-[20px] text-text2 line-clamp-1`,children:f.desc})]}),a(n,{className:`shrink-0 rounded-[20px] border border-[#FD4C5E] px-[24px] py-[8px] text-[14px] font-normal text-[#FD4C5E]`,children:`观看`})]})]})},f.id||f.title)})}):null}export{f as LargeGridItemClient};