@funhub/platform 0.1.44 → 0.1.46

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.
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../ui/link.mjs";import{urlPrefix as r}from"../../../../constants/url-prefix.mjs";import{useSticky as i}from"../../../../hooks/use-sticky.mjs";import a,{loadHiddenChannelIdsFromStorage as o}from"./channel-filter-dialog.mjs";import{defaultProps as s}from"./default-props.mjs";import{clsx as c}from"clsx";import{useEffect as l,useMemo as u,useState as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";const h={};function g(e,t){return t===0?`/`:`${r.CHANNEL}/${encodeURIComponent(e.name)}`}function _(r){let{mode:_=`renderer`,styles:v,events:y,...b}=r,x=_===`editor`,S=b||h,C={...s,...S},[w,T]=d(!1),{isSticky:E,ref:D}=i(),[O,k]=d(C.list),A=u(()=>C.currentChannelId??null,[C.currentChannelId]);l(()=>{let e=o();k(e?.length?C.list.filter(t=>!e.includes(t.name)):C.list)},[C.list]);let j=e=>{k(e)},M=(e,t)=>{y?.onChannelChange?.(e,t)},N=v?e(v,{}):void 0;return m(f,{children:[E&&p(t,{className:`w-full h-11`}),p(t,{as:`nav`,ref:D,className:c(`w-full transition-all duration-200`,x&&`pointer-events-none`,!C.isFullfeed&&E&&`fixed top-0 left-0 right-0 z-50`,C.isFullfeed&&`fixed top-[54px] left-0 z-10 w-full`,!C.isFullfeed&&`bg-bg1`),style:N,children:p(t,{className:`relative flex items-center h-[44px]`,children:p(t,{className:`flex-1 overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,style:{scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitOverflowScrolling:`touch`},children:p(t,{className:`flex items-center h-full w-4 h-4 gap-4`,children:O.map((e,t)=>{let r=A===e.name||A===null&&t===0;return p(n,{href:g(e,t),className:c(`whitespace-nowrap cursor-pointer transition-all duration-200`,`flex items-center justify-center h-11`,`${r?`text-xl`:`text-base`}`),style:{fontWeight:r?`bold`:`normal`,color:r?`var(--color-theme5)`:`var(--color-text2)`},onClick:()=>M(e,t),children:e.name},e.name||`channel-${t}`)})})})})}),p(a,{open:w,onOpenChange:T,channels:C.list,currentChannelId:A,onChannelClick:M,onChannelsChange:j})]})}export{_ as default};
2
+ "use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../ui/link.mjs";import{urlPrefix as r}from"../../../../constants/url-prefix.mjs";import{useSticky as i}from"../../../../hooks/use-sticky.mjs";import a from"../../../../assets/icons/filter_dark.mjs";import o,{loadHiddenChannelIdsFromStorage as s}from"./channel-filter-dialog.mjs";import{defaultProps as c}from"./default-props.mjs";import{clsx as l}from"clsx";import{useEffect as u,useMemo as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";const g={};function _(e,t){return t===0?`/`:`${r.CHANNEL}/${encodeURIComponent(e.name)}`}function v(r){let{mode:v=`renderer`,styles:y,events:b,...x}=r,S=v===`editor`,C=x||g,w={...c,...C},[T,E]=f(!1),{isSticky:D,ref:O}=i(),[k,A]=f(w.list),j=d(()=>w.list.find(e=>e.isDefault)?.name??null,[w.list]),M=d(()=>w.currentChannelId??j,[w.currentChannelId,j]);u(()=>{let e=s();A(e?.length?w.list.filter(t=>!e.includes(t.name)):w.list)},[w.list]);let N=e=>{A(e)},P=(e,t)=>{b?.onChannelChange?.(e,t)},F=y?e(y,{}):void 0;return h(p,{children:[D&&m(t,{className:`w-full h-11`}),m(t,{as:`nav`,ref:O,className:l(`w-full transition-all duration-200`,S&&`pointer-events-none`,!w.isFullfeed&&D&&`fixed top-0 left-0 right-0 z-50`,w.isFullfeed&&`fixed top-[54px] left-0 z-10 w-full`,!w.isFullfeed&&`bg-bg1`),style:F,children:h(t,{className:`relative flex items-center h-[44px]`,children:[m(t,{className:`flex-1 overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,style:{scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitOverflowScrolling:`touch`},children:m(t,{className:`flex items-center h-full w-4 h-4 gap-4`,children:k.map((e,t)=>{let r=M===e.name||M===null&&t===0;return m(n,{href:_(e,t),className:l(`whitespace-nowrap cursor-pointer transition-all duration-200`,`flex items-center justify-center h-11`,`${r?`text-xl`:`text-base`}`),style:{fontWeight:r?`bold`:`normal`,color:r?`var(--color-theme5)`:`var(--color-text2)`},onClick:()=>P(e,t),children:e.name},e.name||`channel-${t}`)})})}),r.filterable?m(t,{className:`flex items-center gap-[12px] px-[8px]`,children:m(t,{className:`flex items-center justify-center cursor-pointer w-7 h-8`,onClick:()=>{E(!0),b?.onFilterClick?.()},children:m(a,{className:`w-5 h-5`,style:{color:`var(--color-text1)`}})})}):null]})}),m(o,{open:T,onOpenChange:E,channels:w.list,currentChannelId:M,onChannelClick:P,onChannelsChange:N})]})}export{v as default};
@@ -8,6 +8,7 @@ import * as zod_v4_core0 from "zod/v4/core";
8
8
 
9
9
  //#region components/biz/business/channel-list/material.d.ts
10
10
  declare const channelListMaterial: DefineMaterialOption<typeof BasicChannelListClient, typeof BasicChannelListClient, zod.ZodObject<{
11
+ filterable: zod.ZodBoolean & SchemaHasDefaultValue;
11
12
  list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
12
13
  name: zod.ZodOptional<zod.ZodString>;
13
14
  icon: zod.ZodOptional<zod.ZodString>;
@@ -10,6 +10,7 @@ import z$1 from "zod";
10
10
  * 定义可以被低代码右侧inspector编辑的props
11
11
  */
12
12
  declare const channelListInspectorPropsSchema: z$1.ZodObject<{
13
+ filterable: z$1.ZodBoolean & SchemaHasDefaultValue;
13
14
  list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
14
15
  name: z$1.ZodOptional<z$1.ZodString>;
15
16
  icon: z$1.ZodOptional<z$1.ZodString>;
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../utils/schema/schema.mjs";import a from"zod";const o=t({list:e(a.object({name:r({label:`内容标题`,required:!1}),icon:r({label:`图标`,required:!1}),isDefault:n({label:`是否默认频道`,required:!1})}),{required:!1,label:`list`,defaultValue:[{name:`频道名称`,icon:``,isDefault:!0}]})});i(o);export{o as channelListInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../utils/schema/schema.mjs";import a from"zod";const o=t({filterable:n({label:`是否显示筛选`,defaultValue:!0}),list:e(a.object({name:r({label:`内容标题`,required:!1}),icon:r({label:`图标`,required:!1}),isDefault:n({label:`是否默认频道`,required:!1})}),{required:!1,label:`list`,defaultValue:[{name:`频道名称`,icon:``,isDefault:!0}]})});i(o);export{o as channelListInspectorPropsSchema};
@@ -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`,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};
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};
@@ -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({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};
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),playCount:d(t.playCount,e.playCount),showPlayCount:t.showPlayCount??e.showPlayCount,episodeText:d(t.episodeText,e.episodeText),showEpisode:t.showEpisode??e.showEpisode,useContentCover:t.useContentCover??e.useContentCover,tagImageUrl:d(t.tagImageUrl,e.tagImageUrl)}: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,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,42 +1,12 @@
1
1
 
2
- import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
3
2
  import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
4
- import "../../../../utils/schema/index.mjs";
5
- import { LargeFeatureGridClient } from "./client.mjs";
6
- import { LargeFeatureGrid } from "./server.mjs";
3
+ import * as react from "react";
7
4
  import * as zod from "zod";
8
5
  import * as zod_v4_core0 from "zod/v4/core";
9
6
 
10
7
  //#region components/biz/business/large-feature-grid/material.d.ts
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">;
8
+ declare const largeFeatureGridMaterial: DefineMaterialOption<react.ComponentType<any>, react.ComponentType<any>, zod.ZodObject<Readonly<{
9
+ [k: string]: zod_v4_core0.$ZodType<unknown, unknown, zod_v4_core0.$ZodTypeInternals<unknown, unknown>>;
10
+ }>, zod_v4_core0.$strip>, string>;
41
11
  //#endregion
42
12
  export { largeFeatureGridMaterial };
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineSwitchPropSchema as r,defineTextPropSchema as i,getSchemaDefaultProps as a}from"../../../../utils/schema/schema.mjs";import o from"zod";const s=t({data:e(o.object({title:i({label:`推荐位名称`,required:!1}),moreUrl:i({label:`更多链接`,required:!1}),moreLinkType:i({label:`更多链接类型`,required:!1,defaultValue:`content-list`}),recommendMode:i({label:`推荐位内容类型`,required:!1,defaultValue:`content`}),items:t({id:i({label:`内容ID`}),cover:i({label:`封面`}),tag:i({label:`角标文案`,required:!1}),playCount:i({label:`播放量`,required:!1}),playCountDelta:n({label:`播放量增量`,required:!1,defaultValue:0}),showPlayCount:r({label:`展示播放量`,required:!1,defaultValue:!0}),duration:i({label:`时长/集数`,required:!1}),showEpisode:r({label:`展示集数`,required:!1,defaultValue:!0}),useContentCover:r({label:`沿用内容海报`,required:!1,defaultValue:!0}),title:i({label:`内容标题`}),desc:i({label:`内容简介`,required:!1}),tagImageUrl:i({label:`角标图`,required:!1})})}),{label:`大图推荐数据`,required:!1,defaultValue:[{title:`推荐位名称`,moreUrl:`/channel`,moreLinkType:`content-list`,recommendMode:`content`,items:{id:`22edc8693ebbdaf1`,cover:`https://base-resources.guadd.fun/md-204/dcc-file/f7/f70a9f9f0c17aa9aff6c3a3e03a822db-small.jpg`,tag:`独家`,playCount:`11111`,playCountDelta:0,showPlayCount:!0,duration:`3600`,showEpisode:!0,useContentCover:!0,title:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`,desc:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`}}]})}),c=a(s);export{c as largeFeatureGridInspectorDefaultProps,s as largeFeatureGridInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../utils/schema/schema.mjs";import a from"zod";const o=t({data:e(a.object({title:r({label:`推荐位名称`,required:!1}),moreUrl:r({label:`更多链接`,required:!1}),moreLinkType:r({label:`更多链接类型`,required:!1,defaultValue:`content-list`}),items:t({id:r({label:`内容ID`}),cover:r({label:`封面`}),playCount:r({label:`播放量`,required:!1}),showPlayCount:n({label:`展示播放量`,required:!1,defaultValue:!0}),episodeText:r({label:`集数文案`,required:!1}),showEpisode:n({label:`展示集数`,required:!1,defaultValue:!0}),useContentCover:n({label:`沿用内容海报`,required:!1,defaultValue:!0}),title:r({label:`内容标题`}),desc:r({label:`内容简介`,required:!1}),tagImageUrl:r({label:`角标图`,required:!1})})}),{label:`大图推荐数据`,required:!1,defaultValue:[{title:`推荐位名称`,moreUrl:`/channel`,moreLinkType:`content-list`,items:{id:`22edc8693ebbdaf1`,cover:`https://base-resources.guadd.fun/md-204/dcc-file/f7/f70a9f9f0c17aa9aff6c3a3e03a822db-small.jpg`,playCount:`11111`,showPlayCount:!0,episodeText:`连载中`,showEpisode:!0,useContentCover:!0,title:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`,desc:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`}}]})}),s=i(o);export{s as largeFeatureGridInspectorDefaultProps,o as largeFeatureGridInspectorPropsSchema};
@@ -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{UserProfileMainShell as n}from"./shell.mjs";import{jsx as r}from"react/jsx-runtime";function i({id:i,className:a,cookieUserId:o,currentUserId:s,requireLogin:c=!1,mode:l=`renderer`}){let u=l===`editor`?``:s||o||``,d=i==null||!!u&&i===u;return r(n,{isMine:d,renderMode:c&&d&&!u?`login-required`:`content`,className:a,children:r(e,{className:`py-6 text-center`,children:r(t,{className:`text-sm text-text3`,children:`内容由服务端按当前 Tab 渲染`})})})}export{i as UserProfileMainClient};
2
+ "use client";import{VideoList as e}from"../../../../common/list/video-list/video-list.mjs";import{UserProfileMainShell as t}from"./shell.mjs";import{jsx as n}from"react/jsx-runtime";function r(e){return e*1e3}const i=[{id:`00d21b841126c976`,title:`朝朝暮暮都是你`,coverImage:`/md-204/uploads/default/other/2024-04-15/2750647625e6193940163169b77fb566.jpg`,duration:192,viewCount:237,createTime:1772175066,isMoreLink:!0},{id:`009f2e1820718add`,title:`狗哥的乡村爱情故事`,coverImage:`/md-204/uploads/default/other/2024-04-11/579bc5eb807d29657828945330b0ac47.jpg`,duration:74,viewCount:191,createTime:1770714221,isMoreLink:!0},{id:`02e2a11f78a3ffbf`,title:`唯爱百分之十二`,coverImage:`/md-204/resource/b6/b689e34f40d0e5baccb8f79630b99425.jpg`,duration:3348,viewCount:214,createTime:1770347155,isMoreLink:!0},{id:`2c19073cbd3c5c5a`,title:`疯狂磕学家`,coverImage:`/md-204/uploads/default/other/2024-08-23/5e174eeb8f2009dd7bb797fcabd5a649.jpg`,duration:2359,viewCount:17,createTime:1769757646,isMoreLink:!0},{id:`07e029915c2a9c96`,title:`我和祖宗做交易`,coverImage:`/md-204/uploads/default/other/2024-05-23/b53e50fa75986b41aac766c253a91fea.jpg`,duration:194,viewCount:75,createTime:1769670600,isMoreLink:!0},{id:`0ae1056a620b286f`,title:`识汝不识丁`,coverImage:`/md-204/uploads/default/other/2024-08-24/8958d46da3087a420d1d55e691dcb10a.jpg`,duration:2053,viewCount:13,createTime:1769651310,isMoreLink:!0},{id:`05564bf1aaf5fad6`,title:`我们的天空`,coverImage:`/md-204/resource/1a/1af6ce7117dcda390cf08db26e832684.jpg`,duration:2737,viewCount:180,createTime:1769566315,isMoreLink:!0},{id:`00f61e5be01409bb`,title:`我初初爱你`,coverImage:`/md-204/resource/bd/bd657a65bc6adc202a94acb8aca33f38.jpg`,duration:2898,viewCount:362,createTime:1769410683,isMoreLink:!0},{id:`062cd69d44fcb772`,title:`料理情缘`,coverImage:`/md-204/uploads/default/other/2023-11-27/de0491f07909b05fa012d15552e02cd0.png`,duration:2726,viewCount:33,createTime:1769157580,isMoreLink:!0},{id:`05751871b640b1a7`,title:`穷小伙被碎玻璃割伤眼睛,却因祸得福获得了一只超能神眼,人生直接开挂,之前欺负他的人统统匍匐在他脚下,征服姐妹花,走向人生巅峰!`,coverImage:`/md-204/dcc-file/29/29a0fdc86f0d756ad8f123e81693d233-small.jpgbnc`,duration:9236,viewCount:137,createTime:1769157575,isMoreLink:!1}].map(e=>({id:e.id,title:e.title,coverImage:e.coverImage,duration:e.duration,authorName:``,viewCount:e.viewCount,publishTime:r(e.createTime),is_more_link:e.isMoreLink}));function a({id:r,className:a,cookieUserId:o,currentUserId:s,requireLogin:c=!1,mode:l=`renderer`}){let u=l===`editor`?``:s||o||``,d=r==null||!!u&&r===u;return n(t,{isMine:d,renderMode:c&&d&&!u?`login-required`:`content`,className:a,children:n(e,{list:i,loading:!1,hasMore:!1,showVideoProgress:!1})})}export{a as UserProfileMainClient};
@@ -1,11 +1,11 @@
1
1
 
2
2
  import * as React from "react";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
- import Image from "next/image";
4
+ import NextImage from "next/image";
5
5
 
6
6
  //#region components/ui/image.d.ts
7
7
  /** BaseImageProps 属性定义。 */
8
- type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof Image>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
8
+ type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof NextImage>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
9
9
  type CommonImageProps = BaseImageProps & {
10
10
  /** 图片地址,支持普通 URL、默认资源路径和加密地址。 */src: string; /** 图片替代文本。 */
11
11
  alt?: string; /** 图片类名。 */
@@ -27,6 +27,6 @@ type ImagePropsWithSize = CommonImageProps & {
27
27
  /** ImageProps 属性定义。 */
28
28
  type ImageProps = ImagePropsWithFill | ImagePropsWithSize;
29
29
  /** 图片组件:支持 bnc 解密、默认资源域名拼接与错误占位。 */
30
- declare function Image$1(props: ImageProps): react_jsx_runtime0.JSX.Element;
30
+ declare function Image(props: ImageProps): react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
- export { BaseImageProps, CommonImageProps, Image$1 as Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
32
+ export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funhub/platform",
3
3
  "type": "module",
4
- "version": "0.1.44",
4
+ "version": "0.1.46",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"
@@ -1,15 +0,0 @@
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,42 +0,0 @@
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 };
@@ -1,15 +0,0 @@
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 };