@funhub/platform 0.1.37 → 0.1.41
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.
- package/README.md +6 -0
- package/config/tailwind/index.cjs +4 -0
- package/config/tailwind/index.mjs +4 -0
- package/dist/assets/images/subscript.mjs +2 -0
- package/dist/biz.mjs +1 -1
- package/dist/common.d.mts +1 -2
- package/dist/common.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +4 -0
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +4 -0
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.d.mts +6 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/material.d.mts +4 -0
- package/dist/components/biz/business/banner-carousel/schema.d.mts +4 -0
- package/dist/components/biz/business/banner-carousel/server.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/material.d.mts +4 -0
- package/dist/components/biz/business/channel-list/schema.d.mts +4 -0
- package/dist/components/biz/business/comment/comment-input.mjs +1 -1
- package/dist/components/biz/business/detail/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/materials/registry.d.mts +30 -3
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/schema.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/schema.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/schema.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/server.mjs +1 -1
- package/dist/components/biz/business/detail/video-hero.mjs +1 -1
- package/dist/components/biz/business/floating-ball/client.mjs +1 -1
- package/dist/components/biz/business/floating-ball/material.d.mts +4 -0
- package/dist/components/biz/business/floating-ball/schema.d.mts +4 -0
- package/dist/components/biz/business/floating-ball/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/client.d.mts +3 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/material.d.mts +6 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.d.mts +6 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +4 -0
- package/dist/components/biz/business/header-search/header-logo-search/server.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/client.d.mts +3 -1
- package/dist/components/biz/business/header-search/header-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/material.d.mts +6 -1
- package/dist/components/biz/business/header-search/header-search/schema.d.mts +6 -1
- package/dist/components/biz/business/header-search/header-search/server.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.d.mts +8 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/server.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.d.mts +8 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/server.mjs +1 -1
- package/dist/components/biz/business/index.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.d.mts +15 -0
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/material.d.mts +34 -4
- package/dist/components/biz/business/large-feature-grid/schema.d.mts +42 -0
- package/dist/components/biz/business/large-feature-grid/server.d.mts +15 -0
- package/dist/components/biz/business/large-feature-grid/server.mjs +1 -1
- package/dist/components/biz/business/marquee/client.mjs +1 -1
- package/dist/components/biz/business/marquee/material.d.mts +4 -0
- package/dist/components/biz/business/marquee/schema.d.mts +4 -0
- package/dist/components/biz/business/marquee/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/client.d.mts +2 -1
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/material.d.mts +18 -2
- package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/schema.d.mts +7 -2
- package/dist/components/biz/business/profile/profile-header/server.d.mts +4 -1
- package/dist/components/biz/business/profile/profile-header/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/client.d.mts +2 -1
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/material.d.mts +6 -1
- package/dist/components/biz/business/profile/profile-main/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/schema.d.mts +7 -2
- package/dist/components/biz/business/profile/profile-main/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.d.mts +5 -0
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.d.mts +5 -0
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +5 -0
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.d.mts +6 -1
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/utils.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/variants.d.mts +3 -3
- package/dist/components/biz/business/profile/profile-main/variants.mjs +1 -1
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-history/material.d.mts +4 -0
- package/dist/components/biz/business/search-history/schema.d.mts +4 -0
- package/dist/components/biz/business/search-history/server.mjs +1 -1
- package/dist/components/biz/business/search-input/client.mjs +1 -1
- package/dist/components/biz/business/search-input/material.d.mts +4 -0
- package/dist/components/biz/business/search-input/schema.d.mts +4 -0
- package/dist/components/biz/business/search-input/server.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/material.d.mts +4 -0
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +4 -0
- package/dist/components/biz/business/shortcut-grid/server.mjs +1 -1
- package/dist/components/biz/business/tab-bar/client.mjs +1 -1
- package/dist/components/biz/business/tab-bar/material.d.mts +14 -2
- package/dist/components/biz/business/tab-bar/schema.d.mts +14 -2
- package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
- package/dist/components/biz/business/tab-bar/server.mjs +1 -1
- package/dist/components/biz/business/text-recommend/client.mjs +1 -1
- package/dist/components/biz/business/text-recommend/material.d.mts +4 -0
- package/dist/components/biz/business/text-recommend/schema.d.mts +4 -0
- package/dist/components/biz/business/text-recommend/server.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/client.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/material.d.mts +4 -0
- package/dist/components/biz/business/video-horizontal-list/schema.d.mts +4 -0
- package/dist/components/biz/business/video-horizontal-list/schema.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/server.mjs +1 -1
- package/dist/components/biz/example/button/client.mjs +1 -1
- package/dist/components/biz/example/button/material.d.mts +4 -0
- package/dist/components/biz/example/button/schema.d.mts +4 -0
- package/dist/components/biz/example/button/server.d.mts +4 -1
- package/dist/components/biz/example/button/server.mjs +1 -1
- package/dist/components/common/list/post-list/post-list.d.mts +2 -0
- package/dist/components/common/list/post-list/post-list.mjs +1 -1
- package/dist/components/common/list/video-list/video-list.d.mts +2 -0
- package/dist/components/common/list/video-list/video-list.mjs +1 -1
- package/dist/components/pages/collection-create/form.mjs +1 -1
- package/dist/components/pages/collection-detail/_components/collection-detail-card.mjs +1 -1
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/hooks.d.mts +1 -4
- package/dist/hooks.mjs +1 -1
- package/dist/i18n/locales/en.mjs +1 -1
- package/dist/i18n/locales/zh-CN.mjs +1 -1
- package/dist/utils/schema/index.d.mts +1 -1
- package/dist/utils/schema/material.d.mts +3 -2
- package/dist/utils/schema/schema.d.mts +18 -3
- package/dist/utils/schema/schema.mjs +1 -1
- package/dist/utils.d.mts +2 -2
- package/package.json +1 -1
- package/theme.css +4 -0
- package/dist/components/common/app-context/index.d.mts +0 -19
- package/dist/components/common/app-context/index.mjs +0 -2
- package/dist/components/common/app-context/provider.mjs +0 -2
- package/dist/components/common/icons/edit.mjs +0 -2
- package/dist/hooks/app-context.d.mts +0 -20
- package/dist/hooks/app-context.mjs +0 -2
- package/dist/hooks/get-app-context.d.mts +0 -19
- package/dist/hooks/get-app-context.mjs +0 -2
- package/dist/hooks/use-app-context/index.d.mts +0 -14
- package/dist/hooks/use-app-context/index.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
|
|
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};
|
|
@@ -11,6 +11,10 @@ declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
|
|
|
11
11
|
title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
12
12
|
enableInfinite: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
|
|
13
13
|
moreLink: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
14
|
+
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
15
|
+
renderer: "renderer";
|
|
16
|
+
editor: "editor";
|
|
17
|
+
}>>;
|
|
14
18
|
}, z$1.core.$strip>;
|
|
15
19
|
declare const homeRecommendGridInspectorDefaultProps: {
|
|
16
20
|
title: string;
|
package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts
CHANGED
|
@@ -11,6 +11,10 @@ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecomme
|
|
|
11
11
|
title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
12
12
|
enableInfinite: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
|
|
13
13
|
moreLink: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
14
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
15
|
+
renderer: "renderer";
|
|
16
|
+
editor: "editor";
|
|
17
|
+
}>>;
|
|
14
18
|
}, zod_v4_core0.$strip>, "home-recommend-grid">;
|
|
15
19
|
//#endregion
|
|
16
20
|
export { homeRecommendGridMaterial };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { BaseComponentProps } from "../../../../../utils/types/component.mjs";
|
|
3
3
|
import "../../../../../utils/index.mjs";
|
|
4
|
+
import { MaterialComponentMode } from "../../../../../../../utils/schema/schema.mjs";
|
|
5
|
+
import "../../../../../../../utils/schema/index.mjs";
|
|
4
6
|
import { HomeRecommendData } from "../../../types.mjs";
|
|
5
7
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
8
|
|
|
@@ -8,6 +10,11 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
8
10
|
/**
|
|
9
11
|
* 首页推荐两列宫格布局。
|
|
10
12
|
*/
|
|
11
|
-
declare function HomeRecommendGridClient(
|
|
13
|
+
declare function HomeRecommendGridClient({
|
|
14
|
+
mode,
|
|
15
|
+
...props
|
|
16
|
+
}: BaseComponentProps<HomeRecommendData> & {
|
|
17
|
+
mode?: MaterialComponentMode;
|
|
18
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
12
19
|
//#endregion
|
|
13
20
|
export { HomeRecommendGridClient };
|
package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import
|
|
2
|
+
"use client";import e from"../../../shared/home-recommend-base.mjs";import{buildHomeRecommendEditorPreviewData as t}from"../../../shared/home-recommend-preview.mjs";import{useMemo as n}from"react";import{jsx as r}from"react/jsx-runtime";function i({mode:i=`renderer`,...a}){let o=i===`editor`,s=a.props||{},c=n(()=>o?t({variant:`grid`,schemaTitle:s.title,enableInfinite:s.enableInfinite,data:a.data}):a.data,[o,a.data,s.enableInfinite,s.title]);return r(`div`,{className:o?`pointer-events-none`:void 0,children:r(e,{variant:`grid`,mode:i,...a,data:c})})}export{i as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{jsx as n}from"react/jsx-runtime";function r(r){let{moreLink:
|
|
2
|
+
import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{jsx as n}from"react/jsx-runtime";function r(r){let{mode:i=`renderer`,moreLink:a=e.moreLink,title:o,enableInfinite:s,data:c}=r;return n(t,{mode:i,props:{moreLink:a,title:o,enableInfinite:s},data:c})}export{r as HomeRecommendGrid};
|
|
@@ -10,6 +10,10 @@ import z$1 from "zod";
|
|
|
10
10
|
declare const homeRecommendWaterfallInspectorPropsSchema: z$1.ZodObject<{
|
|
11
11
|
title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
12
12
|
enableInfinite: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
|
|
13
|
+
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
14
|
+
renderer: "renderer";
|
|
15
|
+
editor: "editor";
|
|
16
|
+
}>>;
|
|
13
17
|
}, z$1.core.$strip>;
|
|
14
18
|
declare const homeRecommendWaterfallInspectorDefaultProps: {
|
|
15
19
|
title: string;
|
package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts
CHANGED
|
@@ -10,6 +10,10 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
10
10
|
declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRecommendWaterfall, typeof HomeRecommendWaterfall, zod.ZodObject<{
|
|
11
11
|
title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
12
12
|
enableInfinite: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
|
|
13
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
14
|
+
renderer: "renderer";
|
|
15
|
+
editor: "editor";
|
|
16
|
+
}>>;
|
|
13
17
|
}, zod_v4_core0.$strip>, "home-recommend-waterfall">;
|
|
14
18
|
//#endregion
|
|
15
19
|
export { homeRecommendWaterfallMaterial };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { BaseComponentProps } from "../../../../../utils/types/component.mjs";
|
|
3
3
|
import "../../../../../utils/index.mjs";
|
|
4
|
+
import { MaterialComponentMode } from "../../../../../../../utils/schema/schema.mjs";
|
|
5
|
+
import "../../../../../../../utils/schema/index.mjs";
|
|
4
6
|
import { HomeRecommendData } from "../../../types.mjs";
|
|
5
7
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
8
|
|
|
@@ -8,6 +10,11 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
8
10
|
/**
|
|
9
11
|
* 首页推荐瀑布流布局。
|
|
10
12
|
*/
|
|
11
|
-
declare function HomeRecommendWaterfallClient(
|
|
13
|
+
declare function HomeRecommendWaterfallClient({
|
|
14
|
+
mode,
|
|
15
|
+
...props
|
|
16
|
+
}: BaseComponentProps<HomeRecommendData> & {
|
|
17
|
+
mode?: MaterialComponentMode;
|
|
18
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
12
19
|
//#endregion
|
|
13
20
|
export { HomeRecommendWaterfallClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import
|
|
2
|
+
"use client";import e from"../../../shared/home-recommend-base.mjs";import{buildHomeRecommendEditorPreviewData as t}from"../../../shared/home-recommend-preview.mjs";import{useMemo as n}from"react";import{jsx as r}from"react/jsx-runtime";function i({mode:i=`renderer`,...a}){let o=i===`editor`,s=a.props||{},c=n(()=>o?t({variant:`waterfall`,schemaTitle:s.title,enableInfinite:s.enableInfinite,data:a.data}):a.data,[o,a.data,s.enableInfinite,s.title]);return r(`div`,{className:o?`pointer-events-none`:void 0,children:r(e,{variant:`waterfall`,mode:i,...a,data:c})})}export{i as default};
|
package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/server.mjs
CHANGED
|
@@ -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{title:
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{__exportAll as e}from"../../../_virtual/_rolldown/runtime.mjs";import{defaultProps as t}from"./banner/variants/basic-banner/defaults/default-props.mjs";import{schema as n}from"./banner/variants/basic-banner/schema/index.mjs";import{basicBannerInspectorDefaultProps as r,basicBannerInspectorPropsSchema as i}from"./banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as a}from"./banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as o}from"./banner/variants/basic-banner/material.mjs";import s from"./banner/variants/basic-banner/index.mjs";import{defaultProps as c}from"./card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as l}from"./card-grid/variants/card-grid-2x3/schema/index.mjs";import u from"./card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as d}from"./card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as f}from"./card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import p from"./card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as m}from"./card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as h}from"./card-grid/variants/card-grid-2x4/schema/index.mjs";import g from"./card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as _}from"./card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as v}from"./card-grid/variants/card-grid-3x3/schema/index.mjs";import y from"./card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as b}from"./card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as x}from"./card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import S from"./card-grid/variants/card-grid-3x3-infinite/index.mjs";import{defaultProps as C}from"./feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as w}from"./feature-grid/variants/basic-feature-grid/schema/index.mjs";import T from"./feature-grid/variants/basic-feature-grid/index.mjs";import{FloatingBallClient as E}from"./floating-ball/client.mjs";import{floatingBallInspectorDefaultProps as D,floatingBallInspectorPropsSchema as O}from"./floating-ball/schema.mjs";import{FloatingBall as k}from"./floating-ball/server.mjs";import{floatingBallMaterial as A}from"./floating-ball/material.mjs";import{defaultProps as j}from"../basics/fullscreen-feed/defaults/default-props.mjs";import{schema as M}from"../basics/fullscreen-feed/schema/index.mjs";import N from"../basics/fullscreen-feed/index.mjs";import{defaultProps as P}from"./fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import{schema as F}from"./fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import I from"./fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as L}from"./fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import{schema as R}from"./fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import z from"./fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{defaultProps as B}from"./home-recommend/variants/home-recommend-grid/defaults/default-props.mjs";import{defaultProps as V}from"./search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{schema as H}from"./search-bar/variants/detail-search-bar/schema/index.mjs";import U from"./search-bar/variants/detail-search-bar/index.mjs";import{schema as W}from"./home-recommend/variants/home-recommend-grid/schema/index.mjs";import{homeRecommendGridInspectorDefaultProps as G,homeRecommendGridInspectorPropsSchema as K}from"./home-recommend/variants/home-recommend-grid/inspector-schema.mjs";import{HomeRecommendGrid as q}from"./home-recommend/variants/home-recommend-grid/server.mjs";import{homeRecommendGridMaterial as J}from"./home-recommend/variants/home-recommend-grid/material.mjs";import Y from"./home-recommend/variants/home-recommend-grid/index.mjs";import{defaultProps as X}from"./home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs";import{schema as Z}from"./home-recommend/variants/home-recommend-waterfall/schema/index.mjs";import{homeRecommendWaterfallInspectorDefaultProps as Q,homeRecommendWaterfallInspectorPropsSchema as $}from"./home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs";import{HomeRecommendWaterfall as ee}from"./home-recommend/variants/home-recommend-waterfall/server.mjs";import{homeRecommendWaterfallMaterial as te}from"./home-recommend/variants/home-recommend-waterfall/material.mjs";import ne from"./home-recommend/variants/home-recommend-waterfall/index.mjs";import{MarqueeClient as re}from"./marquee/client.mjs";import{marqueeInspectorPropsSchema as ie}from"./marquee/schema.mjs";import{MarqueeServer as ae}from"./marquee/server.mjs";import{marqueeMaterial as oe}from"./marquee/material.mjs";import{defaultProps as se}from"./nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as ce}from"./nav-bar/variants/basic-nav-bar/schema/index.mjs";import le from"./nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as ue}from"./post-card/variants/basic-post-card/defaults/default-props.mjs";import{schema as de}from"./post-card/variants/basic-post-card/schema/index.mjs";import fe from"./post-card/variants/basic-post-card/index.mjs";import{UserProfileHeaderClient as pe}from"./profile/profile-header/client.mjs";import{profileHeaderInspectorDefaultProps as me,profileHeaderInspectorPropsSchema as he}from"./profile/profile-header/schema.mjs";import{UserProfileHeader as ge,buildUserProfileHeaderPrefetch as _e}from"./profile/profile-header/server.mjs";import{profileHeaderMaterial as ve,profileHeaderMaterialWithDisabledBackground as ye}from"./profile/profile-header/material.mjs";import{profileMainCollectCollectionTabOptions as be,profileMainCollectTabOptions as xe,profileMainHistoryTabOptions as Se,profileMainLikeTabOptions as Ce,profileMainMineTabOptions as we,profileMainProfileTabOptions as Te,profileMainTabOptions as Ee}from"./profile/profile-main/variants.mjs";import{UserProfileMainShell as De}from"./profile/profile-main/shell.mjs";import{UserProfileMainClient as Oe}from"./profile/profile-main/client.mjs";import{profileMainInspectorDefaultProps as ke,profileMainInspectorPropsSchema as Ae}from"./profile/profile-main/schema.mjs";import{CollectTab as je}from"./profile/profile-main/tabs/collect-tab/client.mjs";import{CollectTabServer as Me,buildCollectTabPrefetch as Ne}from"./profile/profile-main/tabs/collect-tab/server.mjs";import{HistoryTab as Pe}from"./profile/profile-main/tabs/history-tab/client.mjs";import{HistoryTabServer as Fe,buildHistoryTabPrefetch as Ie}from"./profile/profile-main/tabs/history-tab/server.mjs";import{LikeTab as Le}from"./profile/profile-main/tabs/like-tab/client.mjs";import{LikeTabServer as Re,buildLikeTabPrefetch as ze}from"./profile/profile-main/tabs/like-tab/server.mjs";import{PublishTab as Be}from"./profile/profile-main/tabs/publish-tab/client.mjs";import{PublishTabServer as Ve,buildPublishTabPrefetch as He}from"./profile/profile-main/tabs/publish-tab/server.mjs";import{UserProfileMain as Ue}from"./profile/profile-main/server.mjs";import{profileMainMaterial as We}from"./profile/profile-main/material.mjs";import{defaultProps as Ge}from"./recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";import{schema as Ke}from"./recommended-users/variants/basic-recommended-users/schema/index.mjs";import qe from"./recommended-users/variants/basic-recommended-users/index.mjs";import{defaultProps as Je}from"./search-bar/variants/basic-search-bar/defaults/default-props.mjs";import{schema as Ye}from"./search-bar/variants/basic-search-bar/schema/index.mjs";import Xe from"./search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as Ze}from"./search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as Qe}from"./search-bar/variants/filter-search-bar/schema/index.mjs";import $e from"./search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as et}from"./search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as tt}from"./search-bar/variants/tag-search-bar/schema/index.mjs";import nt from"./search-bar/variants/tag-search-bar/index.mjs";import{SearchHistoryClient as rt}from"./search-history/client.mjs";import{searchHistoryInspectorPropsSchema as it}from"./search-history/schema.mjs";import{SearchHistoryServer as at}from"./search-history/server.mjs";import{searchHistoryMaterial as ot}from"./search-history/material.mjs";import{SearchInputClient as st}from"./search-input/client.mjs";import{searchInputInspectorPropsSchema as ct}from"./search-input/schema.mjs";import{SearchInputServer as lt}from"./search-input/server.mjs";import{searchInputMaterial as ut}from"./search-input/material.mjs";import{TabBarClient as dt}from"./tab-bar/client.mjs";import{tabBarInspectorPropsSchema as ft}from"./tab-bar/schema.mjs";import{TabBarServer as pt}from"./tab-bar/server.mjs";import{tabBarMaterial as mt}from"./tab-bar/material.mjs";import{TextRecommendClient as ht}from"./text-recommend/client.mjs";import{textRecommendInspectorPropsSchema as gt}from"./text-recommend/schema.mjs";import{TextRecommendServer as _t}from"./text-recommend/server.mjs";import{textRecommendMaterial as vt}from"./text-recommend/material.mjs";import{VideoHorizontalListClient as yt}from"./video-horizontal-list/client.mjs";import{videoHorizontalListInspectorPropsSchema as bt}from"./video-horizontal-list/schema.mjs";import{VideoHorizontalListServer as xt}from"./video-horizontal-list/server.mjs";import{videoHorizontalListMaterial as St}from"./video-horizontal-list/material.mjs";var Ct=e({BasicBanner:()=>s,BasicBannerDefaultData:()=>t,BasicBannerMaterialComponent:()=>a,BasicBannerSchema:()=>n,BasicFeatureGrid:()=>T,BasicFeatureGridDefaultData:()=>C,BasicFeatureGridSchema:()=>w,BasicFullscreenFeed:()=>N,BasicFullscreenFeedDefaultData:()=>j,BasicFullscreenFeedSchema:()=>M,BasicNavBar:()=>le,BasicNavBarDefaultData:()=>se,BasicNavBarSchema:()=>ce,BasicPostCard:()=>fe,BasicPostCardDefaultData:()=>ue,BasicPostCardSchema:()=>de,BasicRecommendedUsers:()=>qe,BasicRecommendedUsersDefaultData:()=>Ge,BasicRecommendedUsersSchema:()=>Ke,BasicSearchBar:()=>Xe,BasicSearchBarDefaultData:()=>Je,BasicSearchBarSchema:()=>Ye,CardGrid2x3:()=>u,CardGrid2x3DefaultData:()=>c,CardGrid2x3Infinite:()=>p,CardGrid2x3InfiniteDefaultData:()=>d,CardGrid2x3InfiniteSchema:()=>f,CardGrid2x3Schema:()=>l,CardGrid2x4:()=>g,CardGrid2x4DefaultData:()=>m,CardGrid2x4Schema:()=>h,CardGrid3x3:()=>y,CardGrid3x3DefaultData:()=>_,CardGrid3x3Infinite:()=>S,CardGrid3x3InfiniteDefaultData:()=>b,CardGrid3x3InfiniteSchema:()=>x,CardGrid3x3Schema:()=>v,CollectTab:()=>je,CollectTabServer:()=>Me,DetailSearchBar:()=>U,DetailSearchBarDefaultData:()=>V,DetailSearchBarSchema:()=>H,FilterSearchBar:()=>$e,FilterSearchBarDefaultData:()=>Ze,FilterSearchBarSchema:()=>Qe,FloatingBall:()=>k,FloatingBallClient:()=>E,FullscreenFeedClient:()=>I,FullscreenPostFeedDefaultData:()=>P,FullscreenPostFeedSchema:()=>F,FullscreenVideoClient:()=>z,FullscreenVideoFeedDefaultData:()=>L,FullscreenVideoFeedSchema:()=>R,HistoryTab:()=>Pe,HistoryTabServer:()=>Fe,HomeRecommendGrid:()=>Y,HomeRecommendGridDefaultData:()=>B,HomeRecommendGridMaterialComponent:()=>q,HomeRecommendGridSchema:()=>W,HomeRecommendWaterfall:()=>ne,HomeRecommendWaterfallDefaultData:()=>X,HomeRecommendWaterfallMaterialComponent:()=>ee,HomeRecommendWaterfallSchema:()=>Z,LikeTab:()=>Le,LikeTabServer:()=>Re,MarqueeClient:()=>re,MarqueeServer:()=>ae,PublishTab:()=>Be,PublishTabServer:()=>Ve,SearchHistoryClient:()=>rt,SearchHistoryServer:()=>at,SearchInputClient:()=>st,SearchInputServer:()=>lt,TabBarClient:()=>dt,TabBarServer:()=>pt,TagSearchBar:()=>nt,TagSearchBarDefaultData:()=>et,TagSearchBarSchema:()=>tt,TextRecommendClient:()=>ht,TextRecommendServer:()=>_t,UserProfileHeader:()=>ge,UserProfileHeaderClient:()=>pe,UserProfileMain:()=>Ue,UserProfileMainClient:()=>Oe,UserProfileMainShell:()=>De,VideoHorizontalListClient:()=>yt,VideoHorizontalListServer:()=>xt,basicBannerInspectorDefaultProps:()=>r,basicBannerInspectorPropsSchema:()=>i,basicBannerMaterial:()=>o,buildCollectTabPrefetch:()=>Ne,buildHistoryTabPrefetch:()=>Ie,buildLikeTabPrefetch:()=>ze,buildPublishTabPrefetch:()=>He,buildUserProfileHeaderPrefetch:()=>_e,floatingBallInspectorDefaultProps:()=>D,floatingBallInspectorPropsSchema:()=>O,floatingBallMaterial:()=>A,homeRecommendGridInspectorDefaultProps:()=>G,homeRecommendGridInspectorPropsSchema:()=>K,homeRecommendGridMaterial:()=>J,homeRecommendWaterfallInspectorDefaultProps:()=>Q,homeRecommendWaterfallInspectorPropsSchema:()=>$,homeRecommendWaterfallMaterial:()=>te,marqueeInspectorPropsSchema:()=>ie,marqueeMaterial:()=>oe,profileHeaderInspectorDefaultProps:()=>me,profileHeaderInspectorPropsSchema:()=>he,profileHeaderMaterial:()=>ve,profileHeaderMaterialWithDisabledBackground:()=>ye,profileMainCollectCollectionTabOptions:()=>be,profileMainCollectTabOptions:()=>xe,profileMainHistoryTabOptions:()=>Se,profileMainInspectorDefaultProps:()=>ke,profileMainInspectorPropsSchema:()=>Ae,profileMainLikeTabOptions:()=>Ce,profileMainMaterial:()=>We,profileMainMineTabOptions:()=>we,profileMainProfileTabOptions:()=>Te,profileMainTabOptions:()=>Ee,searchHistoryInspectorPropsSchema:()=>it,searchHistoryMaterial:()=>ot,searchInputInspectorPropsSchema:()=>ct,searchInputMaterial:()=>ut,tabBarInspectorPropsSchema:()=>ft,tabBarMaterial:()=>mt,textRecommendInspectorPropsSchema:()=>gt,textRecommendMaterial:()=>vt,videoHorizontalListInspectorPropsSchema:()=>bt,videoHorizontalListMaterial:()=>St});export{Ct as business_exports};
|
|
2
|
+
import{__exportAll as e}from"../../../_virtual/_rolldown/runtime.mjs";import{defaultProps as t}from"./banner/variants/basic-banner/defaults/default-props.mjs";import{schema as n}from"./banner/variants/basic-banner/schema/index.mjs";import{basicBannerInspectorDefaultProps as r,basicBannerInspectorPropsSchema as i}from"./banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as a}from"./banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as o}from"./banner/variants/basic-banner/material.mjs";import s from"./banner/variants/basic-banner/index.mjs";import{defaultProps as c}from"./card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as l}from"./card-grid/variants/card-grid-2x3/schema/index.mjs";import u from"./card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as d}from"./card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as f}from"./card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import p from"./card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as m}from"./card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as h}from"./card-grid/variants/card-grid-2x4/schema/index.mjs";import g from"./card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as _}from"./card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as v}from"./card-grid/variants/card-grid-3x3/schema/index.mjs";import y from"./card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as b}from"./card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as x}from"./card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import S from"./card-grid/variants/card-grid-3x3-infinite/index.mjs";import{defaultProps as C}from"./feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as w}from"./feature-grid/variants/basic-feature-grid/schema/index.mjs";import T from"./feature-grid/variants/basic-feature-grid/index.mjs";import{FloatingBallClient as E}from"./floating-ball/client.mjs";import{floatingBallInspectorDefaultProps as D,floatingBallInspectorPropsSchema as O}from"./floating-ball/schema.mjs";import{FloatingBall as k}from"./floating-ball/server.mjs";import{floatingBallMaterial as A}from"./floating-ball/material.mjs";import{defaultProps as j}from"../basics/fullscreen-feed/defaults/default-props.mjs";import{schema as M}from"../basics/fullscreen-feed/schema/index.mjs";import N from"../basics/fullscreen-feed/index.mjs";import{defaultProps as P}from"./fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import{schema as F}from"./fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import I from"./fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as L}from"./fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import{schema as R}from"./fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import z from"./fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{defaultProps as B}from"./home-recommend/variants/home-recommend-grid/defaults/default-props.mjs";import{defaultProps as V}from"./search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{schema as H}from"./search-bar/variants/detail-search-bar/schema/index.mjs";import U from"./search-bar/variants/detail-search-bar/index.mjs";import{schema as W}from"./home-recommend/variants/home-recommend-grid/schema/index.mjs";import{homeRecommendGridInspectorDefaultProps as G,homeRecommendGridInspectorPropsSchema as K}from"./home-recommend/variants/home-recommend-grid/inspector-schema.mjs";import{HomeRecommendGrid as q}from"./home-recommend/variants/home-recommend-grid/server.mjs";import{homeRecommendGridMaterial as J}from"./home-recommend/variants/home-recommend-grid/material.mjs";import Y from"./home-recommend/variants/home-recommend-grid/index.mjs";import{defaultProps as X}from"./home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs";import{schema as Z}from"./home-recommend/variants/home-recommend-waterfall/schema/index.mjs";import{homeRecommendWaterfallInspectorDefaultProps as Q,homeRecommendWaterfallInspectorPropsSchema as $}from"./home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs";import{HomeRecommendWaterfall as ee}from"./home-recommend/variants/home-recommend-waterfall/server.mjs";import{homeRecommendWaterfallMaterial as te}from"./home-recommend/variants/home-recommend-waterfall/material.mjs";import ne from"./home-recommend/variants/home-recommend-waterfall/index.mjs";import{MarqueeClient as re}from"./marquee/client.mjs";import{marqueeInspectorPropsSchema as ie}from"./marquee/schema.mjs";import{MarqueeServer as ae}from"./marquee/server.mjs";import{marqueeMaterial as oe}from"./marquee/material.mjs";import{defaultProps as se}from"./nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as ce}from"./nav-bar/variants/basic-nav-bar/schema/index.mjs";import le from"./nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as ue}from"./post-card/variants/basic-post-card/defaults/default-props.mjs";import{schema as de}from"./post-card/variants/basic-post-card/schema/index.mjs";import fe from"./post-card/variants/basic-post-card/index.mjs";import{UserProfileHeaderClient as pe}from"./profile/profile-header/client.mjs";import{profileHeaderInspectorDefaultProps as me,profileHeaderInspectorPropsSchema as he}from"./profile/profile-header/schema.mjs";import{UserProfileHeader as ge,buildUserProfileHeaderPrefetch as _e}from"./profile/profile-header/server.mjs";import{profileHeaderMaterial as ve,profileHeaderMaterialWithDisabledBackground as ye}from"./profile/profile-header/material.mjs";import{profileMainCollectCollectionTabOptions as be,profileMainCollectTabOptions as xe,profileMainHistoryTabOptions as Se,profileMainLikeTabOptions as Ce,profileMainMineTabOptions as we,profileMainProfileTabOptions as Te,profileMainTabOptions as Ee}from"./profile/profile-main/variants.mjs";import{UserProfileMainShell as De}from"./profile/profile-main/shell.mjs";import{UserProfileMainClient as Oe}from"./profile/profile-main/client.mjs";import{profileMainInspectorDefaultProps as ke,profileMainInspectorPropsSchema as Ae}from"./profile/profile-main/schema.mjs";import{CollectTab as je}from"./profile/profile-main/tabs/collect-tab/client.mjs";import{CollectTabServer as Me,buildCollectTabPrefetch as Ne}from"./profile/profile-main/tabs/collect-tab/server.mjs";import{HistoryTab as Pe}from"./profile/profile-main/tabs/history-tab/client.mjs";import{HistoryTabServer as Fe,buildHistoryTabPrefetch as Ie}from"./profile/profile-main/tabs/history-tab/server.mjs";import{LikeTab as Le}from"./profile/profile-main/tabs/like-tab/client.mjs";import{LikeTabServer as Re,buildLikeTabPrefetch as ze}from"./profile/profile-main/tabs/like-tab/server.mjs";import{UserProfileMain as Be}from"./profile/profile-main/server.mjs";import{profileMainMaterial as Ve}from"./profile/profile-main/material.mjs";import{PublishTab as He}from"./profile/profile-main/tabs/publish-tab/client.mjs";import{PublishTabServer as Ue,buildPublishTabPrefetch as We}from"./profile/profile-main/tabs/publish-tab/server.mjs";import{defaultProps as Ge}from"./recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";import{schema as Ke}from"./recommended-users/variants/basic-recommended-users/schema/index.mjs";import qe from"./recommended-users/variants/basic-recommended-users/index.mjs";import{defaultProps as Je}from"./search-bar/variants/basic-search-bar/defaults/default-props.mjs";import{schema as Ye}from"./search-bar/variants/basic-search-bar/schema/index.mjs";import Xe from"./search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as Ze}from"./search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as Qe}from"./search-bar/variants/filter-search-bar/schema/index.mjs";import $e from"./search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as et}from"./search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as tt}from"./search-bar/variants/tag-search-bar/schema/index.mjs";import nt from"./search-bar/variants/tag-search-bar/index.mjs";import{SearchHistoryClient as rt}from"./search-history/client.mjs";import{searchHistoryInspectorPropsSchema as it}from"./search-history/schema.mjs";import{SearchHistoryServer as at}from"./search-history/server.mjs";import{searchHistoryMaterial as ot}from"./search-history/material.mjs";import{SearchInputClient as st}from"./search-input/client.mjs";import{searchInputInspectorPropsSchema as ct}from"./search-input/schema.mjs";import{SearchInputServer as lt}from"./search-input/server.mjs";import{searchInputMaterial as ut}from"./search-input/material.mjs";import{TabBarClient as dt}from"./tab-bar/client.mjs";import{tabBarInspectorPropsSchema as ft}from"./tab-bar/schema.mjs";import{TabBarServer as pt}from"./tab-bar/server.mjs";import{tabBarMaterial as mt}from"./tab-bar/material.mjs";import{TextRecommendClient as ht}from"./text-recommend/client.mjs";import{textRecommendInspectorPropsSchema as gt}from"./text-recommend/schema.mjs";import{TextRecommendServer as _t}from"./text-recommend/server.mjs";import{textRecommendMaterial as vt}from"./text-recommend/material.mjs";import{VideoHorizontalListClient as yt}from"./video-horizontal-list/client.mjs";import{videoHorizontalListInspectorPropsSchema as bt}from"./video-horizontal-list/schema.mjs";import{VideoHorizontalListServer as xt}from"./video-horizontal-list/server.mjs";import{videoHorizontalListMaterial as St}from"./video-horizontal-list/material.mjs";var Ct=e({BasicBanner:()=>s,BasicBannerDefaultData:()=>t,BasicBannerMaterialComponent:()=>a,BasicBannerSchema:()=>n,BasicFeatureGrid:()=>T,BasicFeatureGridDefaultData:()=>C,BasicFeatureGridSchema:()=>w,BasicFullscreenFeed:()=>N,BasicFullscreenFeedDefaultData:()=>j,BasicFullscreenFeedSchema:()=>M,BasicNavBar:()=>le,BasicNavBarDefaultData:()=>se,BasicNavBarSchema:()=>ce,BasicPostCard:()=>fe,BasicPostCardDefaultData:()=>ue,BasicPostCardSchema:()=>de,BasicRecommendedUsers:()=>qe,BasicRecommendedUsersDefaultData:()=>Ge,BasicRecommendedUsersSchema:()=>Ke,BasicSearchBar:()=>Xe,BasicSearchBarDefaultData:()=>Je,BasicSearchBarSchema:()=>Ye,CardGrid2x3:()=>u,CardGrid2x3DefaultData:()=>c,CardGrid2x3Infinite:()=>p,CardGrid2x3InfiniteDefaultData:()=>d,CardGrid2x3InfiniteSchema:()=>f,CardGrid2x3Schema:()=>l,CardGrid2x4:()=>g,CardGrid2x4DefaultData:()=>m,CardGrid2x4Schema:()=>h,CardGrid3x3:()=>y,CardGrid3x3DefaultData:()=>_,CardGrid3x3Infinite:()=>S,CardGrid3x3InfiniteDefaultData:()=>b,CardGrid3x3InfiniteSchema:()=>x,CardGrid3x3Schema:()=>v,CollectTab:()=>je,CollectTabServer:()=>Me,DetailSearchBar:()=>U,DetailSearchBarDefaultData:()=>V,DetailSearchBarSchema:()=>H,FilterSearchBar:()=>$e,FilterSearchBarDefaultData:()=>Ze,FilterSearchBarSchema:()=>Qe,FloatingBall:()=>k,FloatingBallClient:()=>E,FullscreenFeedClient:()=>I,FullscreenPostFeedDefaultData:()=>P,FullscreenPostFeedSchema:()=>F,FullscreenVideoClient:()=>z,FullscreenVideoFeedDefaultData:()=>L,FullscreenVideoFeedSchema:()=>R,HistoryTab:()=>Pe,HistoryTabServer:()=>Fe,HomeRecommendGrid:()=>Y,HomeRecommendGridDefaultData:()=>B,HomeRecommendGridMaterialComponent:()=>q,HomeRecommendGridSchema:()=>W,HomeRecommendWaterfall:()=>ne,HomeRecommendWaterfallDefaultData:()=>X,HomeRecommendWaterfallMaterialComponent:()=>ee,HomeRecommendWaterfallSchema:()=>Z,LikeTab:()=>Le,LikeTabServer:()=>Re,MarqueeClient:()=>re,MarqueeServer:()=>ae,PublishTab:()=>He,PublishTabServer:()=>Ue,SearchHistoryClient:()=>rt,SearchHistoryServer:()=>at,SearchInputClient:()=>st,SearchInputServer:()=>lt,TabBarClient:()=>dt,TabBarServer:()=>pt,TagSearchBar:()=>nt,TagSearchBarDefaultData:()=>et,TagSearchBarSchema:()=>tt,TextRecommendClient:()=>ht,TextRecommendServer:()=>_t,UserProfileHeader:()=>ge,UserProfileHeaderClient:()=>pe,UserProfileMain:()=>Be,UserProfileMainClient:()=>Oe,UserProfileMainShell:()=>De,VideoHorizontalListClient:()=>yt,VideoHorizontalListServer:()=>xt,basicBannerInspectorDefaultProps:()=>r,basicBannerInspectorPropsSchema:()=>i,basicBannerMaterial:()=>o,buildCollectTabPrefetch:()=>Ne,buildHistoryTabPrefetch:()=>Ie,buildLikeTabPrefetch:()=>ze,buildPublishTabPrefetch:()=>We,buildUserProfileHeaderPrefetch:()=>_e,floatingBallInspectorDefaultProps:()=>D,floatingBallInspectorPropsSchema:()=>O,floatingBallMaterial:()=>A,homeRecommendGridInspectorDefaultProps:()=>G,homeRecommendGridInspectorPropsSchema:()=>K,homeRecommendGridMaterial:()=>J,homeRecommendWaterfallInspectorDefaultProps:()=>Q,homeRecommendWaterfallInspectorPropsSchema:()=>$,homeRecommendWaterfallMaterial:()=>te,marqueeInspectorPropsSchema:()=>ie,marqueeMaterial:()=>oe,profileHeaderInspectorDefaultProps:()=>me,profileHeaderInspectorPropsSchema:()=>he,profileHeaderMaterial:()=>ve,profileHeaderMaterialWithDisabledBackground:()=>ye,profileMainCollectCollectionTabOptions:()=>be,profileMainCollectTabOptions:()=>xe,profileMainHistoryTabOptions:()=>Se,profileMainInspectorDefaultProps:()=>ke,profileMainInspectorPropsSchema:()=>Ae,profileMainLikeTabOptions:()=>Ce,profileMainMaterial:()=>Ve,profileMainMineTabOptions:()=>we,profileMainProfileTabOptions:()=>Te,profileMainTabOptions:()=>Ee,searchHistoryInspectorPropsSchema:()=>it,searchHistoryMaterial:()=>ot,searchInputInspectorPropsSchema:()=>ct,searchInputMaterial:()=>ut,tabBarInspectorPropsSchema:()=>ft,tabBarMaterial:()=>mt,textRecommendInspectorPropsSchema:()=>gt,textRecommendMaterial:()=>vt,videoHorizontalListInspectorPropsSchema:()=>bt,videoHorizontalListMaterial:()=>St});export{Ct as business_exports};
|
|
@@ -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(e){if(e.duration===void 0||e.duration===null||e.duration===``)return null;let t=String(e.duration);if(t.includes(`集`))return t.startsWith(`全`)?t:`全${t.replace(/\D/g,``)}集`;let n=Number(e.duration);if(!Number.isNaN(n)&&n>0){let e=Math.floor(n),t=Math.floor(e/3600),r=Math.floor(e%3600/60),i=e%60,a=e=>String(e).padStart(2,`0`);return t>0?`${a(t)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}return String(e.duration)}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;let t=e.playCount,n=Number(e.playCountDelta??0);if(t==null||t===``)return t;let r=Number(t);return Number.isNaN(r)?t:r+(Number.isNaN(n)?0:n)}function d(e){let t=e.tag_image||e.tag_image_url||e.tagImage||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=(e=>e===1?{text:`新剧`,fromColor:`#FD4C5E`,toColor:`#F05D19`,textColor:`#FFFFFF`}:e===2?{text:`热门`,fromColor:`#FFE485`,toColor:`#CF8125`,textColor:`#674100`}:null)(f.superscript),h=f.tag||m?.text,g=d(f),_=m?{from:m.fromColor,to:m.toColor,text:m.textColor}:{from:`#FD4C5E`,to:`#F05D19`,text:`#FFFFFF`},v=l(f,`showEpisode`,!0)?s(f):null,y=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`}),g&&a(t,{className:`absolute right-0 top-0 z-10 h-[24px] w-[64px]`,children:a(e,{src:g,alt:f.title,fill:!0,objectFit:`contain`})}),!g&&h&&a(t,{className:`absolute right-0 top-0 flex items-center justify-center z-10`,style:{height:`24px`,padding:`0 10px`,borderTopRightRadius:`12px`,borderBottomLeftRadius:`18px`,background:`linear-gradient(to right, ${_.from}, ${_.to})`,color:_.text},children:a(n,{as:`span`,className:`text-[13px] font-medium leading-none`,children:h})}),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`}),y&&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:y})]}),v&&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:v})})]}),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};
|
|
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.duration===void 0||e.duration===null||e.duration===``)return null;let t=String(e.duration);if(t.includes(`集`))return t.startsWith(`全`)?t:`全${t.replace(/\D/g,``)}集`;let n=Number(e.duration);if(!Number.isNaN(n)&&n>0){let e=Math.floor(n),t=Math.floor(e/3600),r=Math.floor(e%3600/60),i=e%60,a=e=>String(e).padStart(2,`0`);return t>0?`${a(t)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}return String(e.duration)}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;let t=e.playCount,n=Number(e.playCountDelta??0);if(t==null||t===``)return t;let r=Number(t);return Number.isNaN(r)?t:r+(Number.isNaN(n)?0:n)}function d(e){let t=e.tag_image||e.tag_image_url||e.tagImage||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=(e=>e===1?{text:`新剧`,fromColor:`#FD4C5E`,toColor:`#F05D19`,textColor:`#FFFFFF`}:e===2?{text:`热门`,fromColor:`#FFE485`,toColor:`#CF8125`,textColor:`#674100`}:null)(f.superscript),h=f.tag||m?.text,g=d(f),_=m?{from:m.fromColor,to:m.toColor,text:m.textColor}:{from:`#FD4C5E`,to:`#F05D19`,text:`#FFFFFF`},v=l(f,`showEpisode`,!0)?s(f):null,y=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`}),g&&a(t,{className:`absolute right-0 top-0 z-10 h-[24px] w-[64px]`,children:a(e,{src:g,alt:f.title,fill:!0,objectFit:`contain`,style:{objectPosition:`right top`}})}),!g&&h&&a(t,{className:`absolute right-0 top-0 flex items-center justify-center z-10`,style:{height:`24px`,padding:`0 10px`,borderTopRightRadius:`12px`,borderBottomLeftRadius:`18px`,background:`linear-gradient(to right, ${_.from}, ${_.to})`,color:_.text},children:a(n,{as:`span`,className:`text-[13px] font-medium leading-none`,children:h})}),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`}),y&&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:y})]}),v&&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:v})})]}),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};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import { LargeFeatureGridInspectorProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/large-feature-grid/client.d.ts
|
|
6
|
+
type LargeFeatureGridClientProps = LargeFeatureGridInspectorProps;
|
|
7
|
+
/**
|
|
8
|
+
* 大图推荐客户端组件。
|
|
9
|
+
*/
|
|
10
|
+
declare function LargeFeatureGridClient({
|
|
11
|
+
mode,
|
|
12
|
+
data
|
|
13
|
+
}: LargeFeatureGridClientProps): react_jsx_runtime0.JSX.Element | null;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { LargeFeatureGridClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../../ui/box.mjs";import{Text as t}from"../../../ui/text.mjs";import n from"../../../ui/link.mjs";import r from"../../../../assets/icons/common/right_arrow.mjs";import{LargeGridItemClient as i}from"./card-item.mjs";import{largeFeatureGridInspectorDefaultProps as a}from"./schema.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c=[],l=a.data??[];function u(e){return e==null||e===``}function d(e,t){return u(e)?t:e}function f(e,t){return t?{...e,...t,id:d(t.id,e.id),cover:d(t.cover,e.cover),title:d(t.title,e.title),desc:d(t.desc,e.desc),tag:d(t.tag,e.tag),superscript:t.superscript??e.superscript,playCount:d(t.playCount,e.playCount),playCountDelta:t.playCountDelta??e.playCountDelta,showPlayCount:t.showPlayCount??e.showPlayCount,duration:d(t.duration,e.duration),showEpisode:t.showEpisode??e.showEpisode,useContentCover:t.useContentCover??e.useContentCover,tagImageUrl:d(t.tagImageUrl,e.tagImageUrl),tag_image:d(t.tag_image,e.tag_image),tag_image_url:d(t.tag_image_url,e.tag_image_url),tagImage:d(t.tagImage,e.tagImage)}:e}function p(e,t){if(!t)return e;let n=e.items;return{...e,...t,title:d(t.title,e.title),moreUrl:d(t.moreUrl,e.moreUrl),moreLinkType:t.moreLinkType??e.moreLinkType,recommendMode:t.recommendMode??e.recommendMode,items:n?f(n,t.items):t.items}}function m({data:
|
|
2
|
+
"use client";import{Box as e}from"../../../ui/box.mjs";import{Text as t}from"../../../ui/text.mjs";import n from"../../../ui/link.mjs";import r from"../../../../assets/icons/common/right_arrow.mjs";import{LargeGridItemClient as i}from"./card-item.mjs";import{largeFeatureGridInspectorDefaultProps as a}from"./schema.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c=[],l=a.data??[];function u(e){return e==null||e===``}function d(e,t){return u(e)?t:e}function f(e,t){return t?{...e,...t,id:d(t.id,e.id),cover:d(t.cover,e.cover),title:d(t.title,e.title),desc:d(t.desc,e.desc),tag:d(t.tag,e.tag),superscript:t.superscript??e.superscript,playCount:d(t.playCount,e.playCount),playCountDelta:t.playCountDelta??e.playCountDelta,showPlayCount:t.showPlayCount??e.showPlayCount,duration:d(t.duration,e.duration),showEpisode:t.showEpisode??e.showEpisode,useContentCover:t.useContentCover??e.useContentCover,tagImageUrl:d(t.tagImageUrl,e.tagImageUrl),tag_image:d(t.tag_image,e.tag_image),tag_image_url:d(t.tag_image_url,e.tag_image_url),tagImage:d(t.tagImage,e.tagImage)}:e}function p(e,t){if(!t)return e;let n=e.items;return{...e,...t,title:d(t.title,e.title),moreUrl:d(t.moreUrl,e.moreUrl),moreLinkType:t.moreLinkType??e.moreLinkType,recommendMode:t.recommendMode??e.recommendMode,items:n?f(n,t.items):t.items}}function m({mode:a=`renderer`,data:u=c}){let d=a===`editor`,f=u??c,m=Array.isArray(f)&&f.length>0?[p(l[0],f[0])]:l;if(!m||m.length===0)return null;let h=m[0],g=h?.title,_=h?.moreUrl;return s(e,{className:d?`p-3 pointer-events-none`:`p-3`,children:[s(e,{className:`flex items-center justify-between mb-[10px] h-[24px]`,children:[g&&o(t,{as:`h2`,className:`text-[18px] font-bold text-text1 line-clamp-1 flex-1 min-w-0 mr-[12px]`,children:g}),_&&s(n,{href:_,className:`flex items-center text-[14px] text-text2 ml-auto`,children:[`更多`,o(r,{className:`ml-[2px] h-[12px] w-[12px] text-text2`})]})]}),m.map((t,n)=>{let{items:r}=t;return r?o(e,{className:n>0?`mt-3`:``,children:o(i,{data:r})},`large-feature-grid-items-${n}`):null})]})}export{m as LargeFeatureGridClient};
|
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
|
|
2
|
+
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
2
3
|
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
3
|
-
import
|
|
4
|
+
import "../../../../utils/schema/index.mjs";
|
|
5
|
+
import { LargeFeatureGridClient } from "./client.mjs";
|
|
6
|
+
import { LargeFeatureGrid } from "./server.mjs";
|
|
4
7
|
import * as zod from "zod";
|
|
5
8
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
9
|
|
|
7
10
|
//#region components/biz/business/large-feature-grid/material.d.ts
|
|
8
|
-
declare const largeFeatureGridMaterial: DefineMaterialOption<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
declare const largeFeatureGridMaterial: DefineMaterialOption<typeof LargeFeatureGrid, typeof LargeFeatureGridClient, zod.ZodObject<{
|
|
12
|
+
data: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
13
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
14
|
+
moreUrl: zod.ZodOptional<zod.ZodString>;
|
|
15
|
+
moreLinkType: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
16
|
+
recommendMode: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
17
|
+
items: zod.ZodObject<{
|
|
18
|
+
id: zod.ZodString;
|
|
19
|
+
cover: zod.ZodString;
|
|
20
|
+
tag: zod.ZodOptional<zod.ZodString>;
|
|
21
|
+
playCount: zod.ZodOptional<zod.ZodString>;
|
|
22
|
+
playCountDelta: zod.ZodOptional<zod.ZodNumber> & SchemaHasDefaultValue;
|
|
23
|
+
showPlayCount: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
|
|
24
|
+
duration: zod.ZodOptional<zod.ZodString>;
|
|
25
|
+
showEpisode: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
|
|
26
|
+
useContentCover: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
|
|
27
|
+
title: zod.ZodString;
|
|
28
|
+
desc: zod.ZodOptional<zod.ZodString>;
|
|
29
|
+
tagImageUrl: zod.ZodOptional<zod.ZodString>;
|
|
30
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
31
|
+
renderer: "renderer";
|
|
32
|
+
editor: "editor";
|
|
33
|
+
}>>;
|
|
34
|
+
}, zod_v4_core0.$strip>;
|
|
35
|
+
}, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
|
|
36
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
37
|
+
renderer: "renderer";
|
|
38
|
+
editor: "editor";
|
|
39
|
+
}>>;
|
|
40
|
+
}, zod_v4_core0.$strip>, "large-feature-grid">;
|
|
11
41
|
//#endregion
|
|
12
42
|
export { largeFeatureGridMaterial };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
import { InferSchemaProps, SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../utils/schema/index.mjs";
|
|
4
|
+
import z$1 from "zod";
|
|
5
|
+
|
|
6
|
+
//#region components/biz/business/large-feature-grid/schema.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* 大图推荐物料 schema
|
|
9
|
+
*/
|
|
10
|
+
declare const largeFeatureGridInspectorPropsSchema: z$1.ZodObject<{
|
|
11
|
+
data: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
12
|
+
title: z$1.ZodOptional<z$1.ZodString>;
|
|
13
|
+
moreUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
14
|
+
moreLinkType: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
15
|
+
recommendMode: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
16
|
+
items: z$1.ZodObject<{
|
|
17
|
+
id: z$1.ZodString;
|
|
18
|
+
cover: z$1.ZodString;
|
|
19
|
+
tag: z$1.ZodOptional<z$1.ZodString>;
|
|
20
|
+
playCount: z$1.ZodOptional<z$1.ZodString>;
|
|
21
|
+
playCountDelta: z$1.ZodOptional<z$1.ZodNumber> & SchemaHasDefaultValue;
|
|
22
|
+
showPlayCount: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
|
|
23
|
+
duration: z$1.ZodOptional<z$1.ZodString>;
|
|
24
|
+
showEpisode: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
|
|
25
|
+
useContentCover: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
|
|
26
|
+
title: z$1.ZodString;
|
|
27
|
+
desc: z$1.ZodOptional<z$1.ZodString>;
|
|
28
|
+
tagImageUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
29
|
+
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
30
|
+
renderer: "renderer";
|
|
31
|
+
editor: "editor";
|
|
32
|
+
}>>;
|
|
33
|
+
}, z$1.core.$strip>;
|
|
34
|
+
}, z$1.core.$strip>>> & SchemaHasDefaultValue;
|
|
35
|
+
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
36
|
+
renderer: "renderer";
|
|
37
|
+
editor: "editor";
|
|
38
|
+
}>>;
|
|
39
|
+
}, z$1.core.$strip>;
|
|
40
|
+
type LargeFeatureGridInspectorProps = InferSchemaProps<typeof largeFeatureGridInspectorPropsSchema>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { LargeFeatureGridInspectorProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import { LargeFeatureGridInspectorProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/large-feature-grid/server.d.ts
|
|
6
|
+
type LargeFeatureGridProps = LargeFeatureGridInspectorProps;
|
|
7
|
+
/**
|
|
8
|
+
* 大图推荐服务端组件,直接渲染客户端组件。
|
|
9
|
+
*/
|
|
10
|
+
declare function LargeFeatureGrid({
|
|
11
|
+
mode,
|
|
12
|
+
...props
|
|
13
|
+
}: LargeFeatureGridProps): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { LargeFeatureGrid };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{LargeFeatureGridClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";function n(n){return t(e,{...n})}export{n as LargeFeatureGrid};
|
|
2
|
+
import{LargeFeatureGridClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";function n({mode:n=`renderer`,...r}){return t(e,{...r,mode:n})}export{n as LargeFeatureGrid};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../../assets/icons/clear.mjs";import i from"../../../../assets/icons/right_arrow.mjs";import a from"../../../../assets/images/marquee.mjs";import{useEffect as o,useMemo as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useRouter as d}from"next/navigation";const f=[];function p(p){let{contents:m=f,click:h,close:g,displayStrategy:_}=p,v=d(),[
|
|
2
|
+
"use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../../assets/icons/clear.mjs";import i from"../../../../assets/icons/right_arrow.mjs";import a from"../../../../assets/images/marquee.mjs";import{useEffect as o,useMemo as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useRouter as d}from"next/navigation";const f=[];function p(p){let{contents:m=f,click:h,close:g,displayStrategy:_,mode:v=`renderer`}=p,y=v===`editor`,b=d(),[x,S]=c(!0),[C,w]=c(0),[T,E]=c(!1);o(()=>{E(!0)},[]);let D=s(()=>{let e=_?.period?.start,t=_?.period?.end;if(!e&&!t)return!0;let n=Date.now(),r=e?new Date(e).getTime():0,i=t?new Date(t).getTime():2**53-1;return n>=r&&n<=i},[_?.period]);if(o(()=>{if(!T||!_?.rule)return;let e=`marquee_closed_${_.rule}`,t=localStorage.getItem(e);t&&(_.rule===`once`||_.rule===`daily`&&new Date(Number(t)).toLocaleDateString()===new Date().toLocaleDateString())&&S(!1)},[T,_?.rule]),o(()=>{if(!m||m.length<=1)return;let e=setInterval(()=>{w(e=>(e+1)%m.length)},3e3);return()=>clearInterval(e)},[m]),!T||!x||!D||!m||m.length===0)return null;let O=m[C],k=h?.enabled,A=h?.link||O.link,j=k&&!!A;return l(t,{className:y?`px-[12px] py-[8px] w-full bg-bg1 pointer-events-none`:`px-[12px] py-[8px] w-full bg-bg1`,children:u(t,{className:`flex items-center pl-[2px] pr-[12px] py-[2px] rounded-[8px] w-full cursor-pointer relative overflow-hidden`,style:{backgroundImage:`linear-gradient(154deg, rgba(255, 228, 133, 0.2) 9.14%, rgba(207, 129, 37, 0.05) 90.86%)`},onClick:()=>{y||j&&A&&b.push(A)},children:[l(t,{className:`relative shrink-0 w-[36px] h-[36px]`,children:l(e,{src:typeof a==`string`?a:a.src,alt:`notice`,fill:!0,className:`object-cover`,unoptimized:!0})}),l(t,{className:`flex-1 overflow-hidden relative h-[22px] ml-1`,children:l(t,{className:`absolute inset-0 flex items-center transition-transform duration-500 ease-in-out`,style:{transform:`translateY(0)`},children:l(n,{className:`text-[14px] text-[#f59e0b] leading-[22px] truncate w-full font-medium`,children:O.text})})}),u(t,{className:`flex items-center gap-[12px] shrink-0 ml-[4px]`,children:[j&&l(i,{className:`w-[16px] h-[16px] text-[#f59e0b]`}),g?.enabled&&l(t,{className:`opacity-30 hover:opacity-100 transition-opacity p-1`,onClick:e=>{if(e.stopPropagation(),S(!1),_?.rule){let e=`marquee_closed_${_.rule}`;localStorage.setItem(e,Date.now().toString())}},children:l(r,{className:`w-[12px] h-[12px] text-[#999]`})})]})]})})}export{p as MarqueeClient};
|
|
@@ -31,6 +31,10 @@ declare const marqueeMaterial: DefineMaterialOption<typeof MarqueeServer, typeof
|
|
|
31
31
|
readonly end: zod.ZodString;
|
|
32
32
|
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
33
33
|
}, zod_v4_core0.$strip> & SchemaHasDefaultValue;
|
|
34
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
35
|
+
renderer: "renderer";
|
|
36
|
+
editor: "editor";
|
|
37
|
+
}>>;
|
|
34
38
|
}, zod_v4_core0.$strip>, "marquee">;
|
|
35
39
|
//#endregion
|
|
36
40
|
export { marqueeMaterial };
|
|
@@ -27,6 +27,10 @@ declare const marqueeInspectorPropsSchema: z.ZodObject<{
|
|
|
27
27
|
readonly end: z.ZodString;
|
|
28
28
|
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
29
29
|
}, z.core.$strip> & SchemaHasDefaultValue;
|
|
30
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
renderer: "renderer";
|
|
32
|
+
editor: "editor";
|
|
33
|
+
}>>;
|
|
30
34
|
}, z.core.$strip>;
|
|
31
35
|
//#endregion
|
|
32
36
|
export { marqueeInspectorPropsSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{MarqueeClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";async function n(n){return t(e,{...
|
|
2
|
+
import{MarqueeClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";async function n(n){let{mode:r=`renderer`,...i}=n;return t(e,{...i,mode:r})}export{n as MarqueeServer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{useUserStore as n}from"../../../../../store/modules/user-store.mjs";import{gUserGetUserInfo as r,gUserViewUserInfo as i,pInteractionFollow as a,pInteractionUnfollow as o}from"../../../../../service/generated/client.mjs";import{Box as s}from"../../../../ui/box.mjs";import{Text as c}from"../../../../ui/text.mjs";import{useDeleteRequest as l,useMutation as u,useRequest as d,useUpdateRequest as f}from"../../../../../hooks/query/use-query.mjs";import{
|
|
2
|
+
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{useUserStore as n}from"../../../../../store/modules/user-store.mjs";import{gUserGetUserInfo as r,gUserViewUserInfo as i,pInteractionFollow as a,pInteractionUnfollow as o}from"../../../../../service/generated/client.mjs";import{Box as s}from"../../../../ui/box.mjs";import{Text as c}from"../../../../ui/text.mjs";import{useDeleteRequest as l,useMutation as u,useRequest as d,useUpdateRequest as f}from"../../../../../hooks/query/use-query.mjs";import{useLoginModalStore as p}from"../../../../../store/modules/login-modal-store.mjs";import{LeftArrowIcon as m}from"../../../../common/icons/left-arrow.mjs";import{SettingIcon as h}from"../../../../common/icons/setting.mjs";import{UserProfileAvatar as g}from"./user-profile-avatar.mjs";import{UserProfileCoverBackground as _}from"./user-profile-cover-background.mjs";import{useEffect as v,useMemo as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";import{toast as C}from"sonner";import{useTranslations as w}from"next-intl";import T from"next/link";import{useRouter as ee}from"next/navigation";const E=n.persist,D=`https://guadd-sg-ccs-sing-dev.s3.ap-southeast-1.amazonaws.com/default/default_avatar.png`,O=`/images/mine/img_mine_head_bg.png`;function te({userId:e,currentUserId:n,isFollowing:r}){let i=w(`components.pages.profile`),{open:s}=p(),c=l(),d=f(),{mutateAsync:m,isPending:h}=u(async e=>a(e)),{mutateAsync:g,isPending:_}=u(async e=>o(e)),v=h||_;async function y(){if(!v){if(!n){s();return}try{if(r){let t=await g({app_id:0,follower_id:n,followee_id:e});t.code===0?(C.success(i(`client.unfollowSuccess`)),b(!1),c([`check-follow`,e]),c([`user-profile`,`profile`,e])):C.error(t.message||i(`client.unfollowFailed`))}else{let t=await m({app_id:0,follower_id:n,followee_id:e});t.code===0?(C.success(i(`client.followSuccess`)),b(!0),c([`check-follow`,e]),c([`user-profile`,`profile`,e])):C.error(t.message||i(`client.followFailed`))}}catch(e){console.error(`关注操作失败`,e),C.error(i(`client.operationFailed`))}}}function b(t){d([`user-profile`,`profile`,e],e=>!e||!e.data?e:{...e,data:{...e.data,is_following:t}})}return x(t,{variant:r?`outline`:`default`,className:`rounded-full disabled:opacity-100`,onClick:y,disabled:v,children:i(v?`client.processing`:r?`client.followed`:`client.follow`)})}function k({id:a,enableCustomBackground:o=!0,showBackButton:l=!0,requireLogin:u=!1,cookieToken:f,cookieUserId:C,isEditorPreview:k=!1,className:A,mode:j=`renderer`}){let M=w(`components.pages.profile`);w(`components.pages.profile.components`);let N=k||j===`editor`,ne=!N,re=ee(),{open:ie}=p(),{isLogin:ae,userId:P,token:F}=n(),[I,L]=b(!1);v(()=>{if(!E){L(!0);return}L(E.hasHydrated());let e=E.onHydrate(()=>{L(!1)}),t=E.onFinishHydration(()=>{L(!0)});return()=>{e(),t()}},[]);let R=N?!1:I?ae&&!!P&&!!F:!!C&&!!f,z=N?``:I?P:P||C,B=z,V=a==null||!!a&&!!B&&a===B,oe=!V&&!!a,H=V?[`user-profile`,`mine`]:[`user-profile`,`profile`,a],{data:U}=d(N?[`editor-preview`,...H]:H,()=>a?i({target_user_id:a,user_id:z||a}):r({user_id:a||z||``}),{staleTime:0,enabled:ne&&(!!a||!!z)}),W=y(()=>{let e=U?U.data:void 0;return e?{userId:e.user_id,isFollowing:e.is_following||!1,name:e.nick_name||`User${a??``}`,avatar:e.avatar||D,followingCnt:e.following_count??0,followersCnt:e.follower_count??0,likeCnt:e.like_count??0,signature:e.signature||``,background:e.bg_image||O}:{}},[a,U]),G=u&&V&&!R,K=!R&&oe,q=V&&R&&!G,J=!R,se=o&&q,ce=o&&J,le={name:M(`client.welcomeToPlanet`),description:M(`client.exploreAdventures`),avatar:D,followingCnt:0,followersCnt:0,likeCnt:0,background:O};function Y(){ie()}function X(){re.back()}let ue=G?x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.loginNow`)}):K?x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.follow`)}):R?V?x(T,{href:`/edit`,children:x(t,{variant:`outline`,className:`rounded-full`,children:M(`client.editProfile`)})}):x(te,{userId:a||``,currentUserId:z,isFollowing:W?.isFollowing}):x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.loginNow`)}),Z=G?le:W,Q=Z.name||``,$=Z.description||Z.signature||``;Z.followingCnt,Z.followersCnt,Z.likeCnt;let de=Z.avatar||``;return S(s,{className:e(`flex flex-col relative`,A),children:[S(s,{className:`absolute top-0 p-3 z-10 flex items-center justify-between w-full`,children:[x(t,{variant:`ghost`,size:`icon-xs`,onClick:X,className:e(`h-4 w-4 p-0 hover:bg-transparent`,{invisible:!l}),children:x(m,{className:`w-4 h-4`})}),x(T,{href:`/settings`,className:e({invisible:!V}),children:x(h,{})})]}),x(_,{isMine:se,enableCustomBackground:o,src:Z.background,onUnauthorizedClick:ce?Y:void 0}),S(s,{className:`flex-1 px-3`,children:[S(s,{className:`relative flex justify-end`,children:[x(g,{isMine:q,src:de,alt:Q||`avatar`,onUnauthorizedClick:J?Y:void 0}),x(s,{className:`flex divide-x divide-text1/5 py-4 h-12`})]}),S(s,{className:`flex items-center justify-between gap-1`,children:[x(c,{as:`p`,className:`text-text1 text-xl line-clamp-2 font-bold`,children:Q}),ue]}),$&&x(c,{as:`p`,className:`text-sm py-1 line-clamp-3 text-text1/66`,children:$})]})]})}export{k as UserProfileHeaderClient};
|
|
@@ -7,7 +7,23 @@ import * as zod from "zod";
|
|
|
7
7
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
8
|
|
|
9
9
|
//#region components/biz/business/profile/profile-header/material.d.ts
|
|
10
|
-
declare const profileHeaderMaterial: DefineMaterialOption<typeof UserProfileHeader, typeof UserProfileHeaderClient, zod.ZodObject<{
|
|
11
|
-
|
|
10
|
+
declare const profileHeaderMaterial: DefineMaterialOption<typeof UserProfileHeader, typeof UserProfileHeaderClient, zod.ZodObject<{
|
|
11
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
12
|
+
renderer: "renderer";
|
|
13
|
+
editor: "editor";
|
|
14
|
+
}>>;
|
|
15
|
+
}, zod_v4_core0.$strip>, "profile-header">;
|
|
16
|
+
declare const profileHeaderMaterialWithDisabledBackground: DefineMaterialOption<({
|
|
17
|
+
mode,
|
|
18
|
+
...props
|
|
19
|
+
}: React.ComponentProps<typeof UserProfileHeader>) => react_jsx_runtime0.JSX.Element, ({
|
|
20
|
+
mode,
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<typeof UserProfileHeaderClient>) => react_jsx_runtime0.JSX.Element, zod.ZodObject<{
|
|
23
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
24
|
+
renderer: "renderer";
|
|
25
|
+
editor: "editor";
|
|
26
|
+
}>>;
|
|
27
|
+
}, zod_v4_core0.$strip>, "profile-header-with-disabled-background">;
|
|
12
28
|
//#endregion
|
|
13
29
|
export { profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{UserProfileHeaderClient as t}from"./client.mjs";import{profileHeaderInspectorPropsSchema as n}from"./schema.mjs";import{UserProfileHeader as r}from"./server.mjs";import{jsx as i}from"react/jsx-runtime";const a=e({type:`profile-header`,category
|
|
2
|
+
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{UserProfileHeaderClient as t}from"./client.mjs";import{profileHeaderInspectorPropsSchema as n}from"./schema.mjs";import{UserProfileHeader as r}from"./server.mjs";import{jsx as i}from"react/jsx-runtime";const a=e({type:`profile-header`,category:`内容组件`,name:`用户信息模块(有背景图)`,icon:`/static/components-thumb/user_profile_with_background.png`,serverComponent:r,clientComponent:t,propsSchema:n}),o=e({type:`profile-header-with-disabled-background`,category:`内容组件`,name:`用户信息模块(无背景图)`,icon:`/static/components-thumb/user_profile_plain.png`,serverComponent:({mode:e=`renderer`,...t})=>i(r,{...t,mode:e,enableCustomBackground:!1}),clientComponent:({mode:e=`renderer`,...n})=>i(t,{...n,mode:e,enableCustomBackground:!1}),propsSchema:n});export{a as profileHeaderMaterial,o as profileHeaderMaterialWithDisabledBackground};
|
|
@@ -8,13 +8,18 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
8
8
|
/**
|
|
9
9
|
* 用户资料头部物料 inspector 配置。
|
|
10
10
|
*/
|
|
11
|
-
declare const profileHeaderInspectorPropsSchema: zod.ZodObject<{
|
|
11
|
+
declare const profileHeaderInspectorPropsSchema: zod.ZodObject<{
|
|
12
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
13
|
+
renderer: "renderer";
|
|
14
|
+
editor: "editor";
|
|
15
|
+
}>>;
|
|
16
|
+
}, zod_v4_core0.$strip>;
|
|
12
17
|
declare const profileHeaderInspectorDefaultProps: {};
|
|
13
18
|
type ProfileHeaderInspectorProps = InferSchemaProps<typeof profileHeaderInspectorPropsSchema>;
|
|
14
19
|
interface UserProfileHeaderAuthConfig {
|
|
15
20
|
headers?: Record<string, string>;
|
|
16
21
|
}
|
|
17
|
-
interface UserProfileHeaderClientProps {
|
|
22
|
+
interface UserProfileHeaderClientProps extends ProfileHeaderInspectorProps {
|
|
18
23
|
/** 用户 ID。 */
|
|
19
24
|
id?: string;
|
|
20
25
|
/** 是否允许自定义背景图。 */
|
|
@@ -28,6 +28,9 @@ type UserProfileHeaderProps = UserProfileHeaderClientProps;
|
|
|
28
28
|
/**
|
|
29
29
|
* 用户资料头部服务端组件(用于物料注册),内部包含预取逻辑。
|
|
30
30
|
*/
|
|
31
|
-
declare function UserProfileHeader(
|
|
31
|
+
declare function UserProfileHeader({
|
|
32
|
+
mode,
|
|
33
|
+
...props
|
|
34
|
+
}: UserProfileHeaderProps): react_jsx_runtime0.JSX.Element;
|
|
32
35
|
//#endregion
|
|
33
36
|
export { BuildUserProfileHeaderPrefetchParams, UserProfileHeader, UserProfileHeaderProps, buildUserProfileHeaderPrefetch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{gUserGetUserInfo as e,gUserViewUserInfo as t}from"../../../../../service/generated/client.mjs";import{
|
|
2
|
+
import{gUserGetUserInfo as e,gUserViewUserInfo as t}from"../../../../../service/generated/client.mjs";import{HydrationBoundary as n}from"../../../../../hooks/query/hydration-boundary.mjs";import{UserProfileHeaderClient as r}from"./client.mjs";import{jsx as i}from"react/jsx-runtime";function a({id:n,currentUserId:r,token:i,authConfig:a}){return n||r&&i?[{queryKey:n==null||r&&n===r?[`user-profile`,`mine`]:[`user-profile`,`profile`,n],async queryFn(){return n==null?e({user_id:r},a):t({target_user_id:n,user_id:r||n},a)}}]:[]}function o({mode:e=`renderer`,...t}){return i(s,{...t,mode:e})}function s({mode:e=`renderer`,token:t=``,currentUserId:o=``,authConfig:s,...c}){if(e===`editor`)return i(r,{...c,mode:e,isEditorPreview:!0});let l=a({id:c.id,currentUserId:o,token:t,authConfig:s});return l.length===0?i(r,{...c,mode:e}):i(n,{prefetch:l,children:i(r,{...c,mode:e})})}export{o as UserProfileHeader,a as buildUserProfileHeaderPrefetch};
|