@funhub/platform 0.1.36 → 0.1.38
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/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/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/editor-preview.mjs +2 -0
- package/dist/components/biz/business/detail/materials/registry.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +1 -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.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/schema.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-info/server.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +1 -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.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-info-title/server.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +1 -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.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/client.mjs +1 -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 +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-hero.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +2 -0
- 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/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.mjs +1 -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/schema/component.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/defaults/default-props.d.mts +1 -3
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.d.mts +4 -2
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts +2 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.mjs +1 -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/schema/component.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/props.schema.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/client.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/material.d.mts +4 -3
- package/dist/components/biz/business/large-feature-grid/material.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
- package/dist/components/biz/business/marquee/material.d.mts +1 -1
- package/dist/components/biz/business/marquee/schema.d.mts +1 -1
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/material.mjs +1 -1
- 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.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.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.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 +1 -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/shortcut-grid/material.d.mts +1 -1
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +1 -1
- package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -1
- package/dist/components/biz/business/tab-bar/client.mjs +1 -1
- package/dist/components/biz/business/tab-bar/material.d.mts +6 -2
- package/dist/components/biz/business/tab-bar/schema.d.mts +6 -2
- package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/client.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/schema.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-list-item.d.mts +1 -0
- package/dist/components/common/list/collection-list/collection-list-item.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/image.d.mts +4 -4
- package/dist/i18n/locales/en.mjs +1 -1
- package/dist/i18n/locales/zh-CN.mjs +1 -1
- package/dist/utils/schema/material.d.mts +1 -1
- package/package.json +1 -1
- package/theme.css +4 -0
- package/dist/components/biz/business/large-feature-grid/client.d.mts +0 -15
- package/dist/components/biz/business/large-feature-grid/default.mjs +0 -2
- package/dist/components/biz/business/large-feature-grid/server.d.mts +0 -13
- package/dist/components/biz/business/large-feature-grid/types.d.mts +0 -53
- package/dist/components/common/icons/edit.mjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../../../../../ui/button.mjs";import{useUserStore as t}from"../../../../../../../store/modules/user-store.mjs";import{pInteractionUnifiedBatchLikeDislike as n}from"../../../../../../../service/generated/client.mjs";import{Box as r}from"../../../../../../ui/box.mjs";import{Checkbox as i}from"../../../../../../ui/checkbox.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../../../../../ui/button.mjs";import{useUserStore as t}from"../../../../../../../store/modules/user-store.mjs";import{pInteractionUnifiedBatchLikeDislike as n}from"../../../../../../../service/generated/client.mjs";import{Box as r}from"../../../../../../ui/box.mjs";import{Checkbox as i}from"../../../../../../ui/checkbox.mjs";import{Text as a}from"../../../../../../ui/text.mjs";import{useMutation as o,usePaginated as s,useUpdateRequest as c}from"../../../../../../../hooks/query/use-query.mjs";import{useAppContext as l}from"../../../../../../../hooks/use-app-context/index.mjs";import{PostList as u}from"../../../../../../common/list/post-list/post-list.mjs";import{VideoList as d}from"../../../../../../common/list/video-list/video-list.mjs";import{getLikeData as f,likeContentType as p}from"../../utils.mjs";import{useEffect as m,useMemo as h,useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{toast as y}from"sonner";import{useTranslations as ee}from"next-intl";import{parseAsString as b,useQueryState as x}from"nuqs";function S(e,t,n){if(!e)return e;let r=0,i=e.pages.map(e=>({page:e,filteredList:(e.data?.list??[]).filter(e=>{let i=n(e)??``,a=t.has(i);return a&&(r+=1),!a})}));return{...e,pages:i.map(({page:e,filteredList:t})=>{if(!e.data)return e;let n=typeof e.data.total==`number`?Math.max(0,e.data.total-r):e.data.total;return{...e,data:{...e.data,list:t,total:n}}})}}function C(e){let{detail:t}=e,{info:n,publish_time:r}=t;return{id:e.id,title:n?.name||n?.text||n?.content||``,coverImage:n?.cover_image_thumbnail||n?.cover_image||n?.cover_horizontal_image_thumbnail||``,publishTime:r??0}}function w(e){let{detail:t}=e,{user_info:n,info:r,statics_cnt:i,publish_time:a,parent_content_info:o}=t;return{id:e.id,is_more_link:r?.is_more_link||!1,title:r?.name||r?.text||r?.content||``,coverImage:r?.cover_image_thumbnail||r?.cover_image||r?.cover_horizontal_image_thumbnail||``,duration:Number(r?.video_duration??0),progress:e.content_play_progress?.percent??0,seriesNum:e.content_play_progress?.series_num,authorName:n?.name||``,viewCount:r?.play_count??i?.browse_cnt??0,publishTime:a??0,type:o?.type}}const T=[`video`,`post`];function E({targetUserId:E,queryKeyPrefix:D,isMine:te=!1}){let O=ee(`components.pages.profile.components.tabs`),k=l()===`renderer`,A=D??[],[j,M]=x(`likeTab`,b.withDefault(`video`)),N=h(()=>T.includes(j)?j:`video`,[j]),[P,F]=g(!1),[I,L]=g(()=>new Set),R=t(e=>e.userId),z=c(),B=[...A,`user-like-video`],V=[...A,`user-like-post`],H=s({key:B,initialPageParam:1,async queryFn(e){return f({targetUserId:E,page:e,contentType:p.video})},options:{staleTime:0,enabled:k},getNextPageParam(e,t){if(typeof e?.data?.has_more==`boolean`)return e.data.has_more?t.length+1:void 0;if(!((e?.data?.list??[]).length===0||e?.data?.total===0))return t.length+1}});console.log({videoData:H});let U=s({key:V,options:{staleTime:0,enabled:k},initialPageParam:1,async queryFn(e){return{data:{list:[],total:0,has_more:!1}}},getNextPageParam(e,t){if(typeof e?.data?.has_more==`boolean`)return e.data.has_more?t.length+1:void 0;if(!((e?.data?.list??[]).length===0||e?.data?.total===0))return t.length+1}}),W=N===`video`?H:U,G=H.data?.pages.flatMap(e=>(e.data?.list??[]).map(w))??[],K=U.data?.pages.flatMap(e=>(e.data?.list??[]).map(C))??[],q=N===`video`?G:K,J=new Set(q.map(e=>e.id)),Y=N===`video`,{mutateAsync:X,isPending:Z}=o(async e=>await n({app_id:0,user_id:R,action:`cancel_like`,content_ids:e,content_type:Y?1:2}));m(()=>{L(new Set)},[N]),m(()=>{j!==N&&M(N)},[N,j,M]);let Q=e=>{L(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},ne=()=>{I.size===J.size&&J.size>0?L(new Set):L(new Set(J))},re=async()=>{if(!(I.size===0||Z)){if(!R){y.error(O(`likeTab.pleaseLogin`));return}try{let e=Array.from(I),t=await X(e);if(t.code===0){y.success(O(`likeTab.unlikedSuccess`));let t=new Set(e);z(Y?B:V,e=>S(e,t,e=>e.id)),L(new Set),F(!1)}else y.error(t.message||O(`likeTab.unlikeFailed`))}catch(e){console.error(`取消点赞失败`,e),y.error(O(`likeTab.operationFailed`))}}},$=async()=>{k&&await W.fetchNextPage()};return v(r,{children:[_(r,{className:``,children:N===`video`?_(d,{list:G,loading:W.isFetching,hasMore:W.hasNextPage??!1,loadMore:$,emptyText:O(`likeTab.emptyContent`),isEditMode:P,selectedIds:I,showVideoProgress:!1,onToggleSelection:Q}):_(u,{list:K,loading:W.isFetching,hasMore:W.hasNextPage??!1,loadMore:$,emptyText:O(`likeTab.emptyContent`),isEditMode:P,selectedIds:I,onToggleSelection:Q})}),P&&v(r,{style:{bottom:`calc(56px + env(safe-area-inset-bottom, 0px))`},className:`flex fixed z-10 left-0 w-full items-center justify-between px-3 py-2 bg-bg1 `,children:[v(r,{className:`flex items-center gap-2`,children:[_(i,{checked:I.size===J.size&&J.size>0,onCheckedChange:ne}),_(a,{className:`text-sm text-text1`,children:O(`likeTab.selectAll`)})]}),_(e,{className:`rounded-full py-2.5 h-auto px-6.5`,variant:I.size>0?`default`:`outline`,disabled:I.size===0||Z,onClick:re,children:O(Z?`likeTab.processing`:`likeTab.delete`)})]})]})}export{E as LikeTab};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{HydrationBoundary as e}from"../../../../../../../hooks/query/hydration-boundary.mjs";import{getLikeData as t,likeContentType as n}from"../../utils.mjs";import{LikeTab as r}from"./client.mjs";import{jsx as i}from"react/jsx-runtime";function a({queryKeyPrefix:e,targetUserId:r,resolvedLikeTab:i}){
|
|
2
|
+
import{HydrationBoundary as e}from"../../../../../../../hooks/query/hydration-boundary.mjs";import{getLikeData as t,likeContentType as n}from"../../utils.mjs";import{LikeTab as r}from"./client.mjs";import{jsx as i}from"react/jsx-runtime";function a({queryKeyPrefix:e,targetUserId:r,resolvedLikeTab:i}){return r?[{type:`infinite`,queryKey:i===`post`?[...e,`user-like-post`]:[...e,`user-like-video`],async queryFn(e){return t({targetUserId:r,page:e,contentType:n.video})},initialPageParam:1,getNextPageParam(){}}]:[]}function o({prefetch:t,resolvedLikeTab:n=`video`,...o}){return i(e,{prefetch:t??a({queryKeyPrefix:o.queryKeyPrefix??[],targetUserId:o.targetUserId,resolvedLikeTab:n}),children:i(r,{...o})})}export{o as LikeTabServer,a as buildLikeTabPrefetch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{pCommunityDeleteContent as e}from"../../../../../../../service/generated/client.mjs";import{useDeleteRequest as t,useMutation as n,usePaginated as r,useUpdateRequest as i}from"../../../../../../../hooks/query/use-query.mjs";import{useAppContext as a}from"../../../../../../../hooks/use-app-context/index.mjs";import{DeleteConfirmDialog as o}from"../../../../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{UserActivityList as s}from"../../../../../../common/list/user-activity-list/user-activity-list.mjs";import{
|
|
2
|
+
"use client";import{pCommunityDeleteContent as e}from"../../../../../../../service/generated/client.mjs";import{useDeleteRequest as t,useMutation as n,usePaginated as r,useUpdateRequest as i}from"../../../../../../../hooks/query/use-query.mjs";import{useAppContext as a}from"../../../../../../../hooks/use-app-context/index.mjs";import{DeleteConfirmDialog as o}from"../../../../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{UserActivityList as s}from"../../../../../../common/list/user-activity-list/user-activity-list.mjs";import{useState as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{toast as f}from"sonner";import{useTranslations as p}from"next-intl";function m(e,t,n){if(!e)return e;let r=0,i=e.pages.map(e=>({page:e,filteredList:(e.data?.list??[]).filter(e=>{let i=n(e)??``,a=t.has(i);return a&&(r+=1),!a})}));return{...e,pages:i.map(({page:e,filteredList:t})=>{if(!e.data)return e;let n=typeof e.data.total==`number`?Math.max(0,e.data.total-r):e.data.total;return{...e,data:{...e.data,list:t,total:n}}})}}function h({targetUserId:h,queryKeyPrefix:g,isMine:_=!1}){let v=p(`components.pages.profile.components.tabs`),y=a()===`renderer`,b=g??[],x=t(),S=i(),[C,w]=c(null),{mutateAsync:T,isPending:E}=n(async t=>await e({content_id:t})),{data:D,isFetching:O,fetchNextPage:k,hasNextPage:A}=r({key:[...b,`user-publish`],initialPageParam:1,async queryFn(e){return{data:{list:[],total:0,has_more:!1}}},options:{staleTime:0,enabled:y},getNextPageParam(e,t){let n=e?.data||{},r=n.list||[];if(typeof n.has_more==`boolean`)return n.has_more?t.length+1:void 0;if(!(r.length===0||n.total===0))return t.length+1}}),j=D?.pages.flatMap(e=>(e?.data||{}).list||[])??[];function M(e){w(e)}function N(){w(null)}async function P(){if(!(!C||E))try{await T(C);let e=new Set([C]);S([...b,`user-publish`],t=>m(t,e,e=>e.content_id)),f.success(v(`publishTab.deleteSuccess`)),w(null)}catch(e){console.error(`删除内容失败`,e),f.error(v(`publishTab.deleteFailed`))}}let F=j.map(e=>({...e,isDeleting:E&&C===e.content_id,onDelete:()=>M(e.content_id??``)})),I=async()=>{y&&await k()};function L(){x([...b,`user-publish`]),x(b)}function R(e){console.log(`分享到微信:`,e)}function z(e){console.log(`分享到QQ:`,e)}function B(e){console.log(`分享到朋友圈:`,e)}return d(l,{children:[u(s,{list:F,loading:O,hasMore:A,loadMore:I,canEdit:_,showGroupHeaders:!1,emptyText:v(`publishTab.emptyText`),onActionSuccess:L,onShareWeChat:R,onShareQQ:z,onShareMoments:B}),u(o,{open:!!C,onOpenChange:e=>!e&&N(),onCancel:N,onConfirm:P,isConfirming:E})]})}export{h as PublishTab};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{HydrationBoundary as e}from"../../../../../../../hooks/query/hydration-boundary.mjs";import{
|
|
2
|
+
import{HydrationBoundary as e}from"../../../../../../../hooks/query/hydration-boundary.mjs";import{PublishTab as t}from"./client.mjs";import{jsx as n}from"react/jsx-runtime";function r({queryKeyPrefix:e,targetUserId:t}){return t?[{type:`infinite`,queryKey:[...e,`user-publish`],async queryFn(e){return{data:{list:[],total:0,has_more:!1}}},initialPageParam:1,getNextPageParam(){}}]:[]}function i({prefetch:i,...a}){return n(e,{prefetch:i??r({queryKeyPrefix:a.queryKeyPrefix??[],targetUserId:a.targetUserId}),children:n(t,{...a})})}export{i as PublishTabServer,r as buildPublishTabPrefetch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{
|
|
2
|
+
import{gInteractionGetBrowseList as e,gInteractionGetLikeList as t}from"../../../../../service/generated/client.mjs";import n from"dayjs";const r=10,i={video:1,post:2};function a(e){if(e.cover_image)return e.cover_image;let t=``;return e.medias?.find(e=>e?(!e.is_video&&!t&&e.media_url&&(t=e.media_url),!!e.cover_image):!1)?.cover_image||t}function o(e,t){let r=e.name,i=n(t?t?.[e.content_id||``]?.create_time:e.create_time).toDate().getTime(),o=a(e);return{id:e.content_id||``,content_play_progress:{percent:0,series_num:0},detail:{user_info:{name:e.author?.nickname,avatar:e.author?.avatar},info:{name:r,content_id:e.content_id,user_id:e.user_id,content:e.content,tags:e.tags,cover_image:o,like_count:e.like_count,dislike_count:e.dislike_count,comment_count:e.comment_count,share_count:e.share_count,view_count:e.view_count,create_time:e.create_time,update_time:e.update_time,author:e.author?{user_id:e.author.user_id,username:e.author.username,nickname:e.author.nickname,avatar_url:e.author.avatar}:void 0},statics_cnt:{browse_cnt:e.view_count||0},publish_time:i,parent_content_info:{type:0}}}}function s(e,t){let r=e.is_more_link,i=n(t?t?.[e.id||``]?.create_time:e.show_at).toDate().getTime(),a=Number(e.duration??0),o=Number.isFinite(a)?Math.max(0,Math.floor(a)):0;return{id:e.id||``,content_play_progress:{percent:0,series_num:0},detail:{user_info:{name:e.source_username||e.up_user||e.director||e.actor,avatar:void 0},info:{is_more_link:r,name:e.name,content_id:e.id,content:e.description,tags:e.tags?.map(e=>e.name).filter(e=>!!e),cover_image:e.img_y||e.img_x,create_time:e.show_at,video_duration:o},statics_cnt:{browse_cnt:e.play_count||0},publish_time:i,parent_content_info:{type:0}}}}function c(e,t){let r=e.name,i=e.is_more_link,o=t[e.content_id||``].browse_time,s=n(o).toDate().getTime(),c=a(e);return{id:e.content_id||``,content_play_progress:{percent:0,series_num:0},detail:{user_info:{name:e.author?.nickname,avatar:e.author?.avatar},info:{is_more_link:i,name:r||e.content,title:r||e.content,content_id:e.content_id,user_id:e.user_id,content:e.content,tags:e.tags,cover_image:c,like_count:e.like_count,dislike_count:e.dislike_count,comment_count:e.comment_count,share_count:e.share_count,view_count:e.view_count,create_time:e.create_time,update_time:e.update_time,author:e.author?{user_id:e.author.user_id,username:e.author.username,nickname:e.author.nickname,avatar_url:e.author.avatar}:void 0},statics_cnt:{browse_cnt:e.view_count||0},publish_time:s,parent_content_info:{type:0}}}}function l(e,t){let r=e.is_more_link,i=t[e.id||``].browse_time,a=n(i).toDate().getTime(),o=Number(e.duration??0),s=Number.isFinite(o)?Math.max(0,Math.floor(o)):0,c=t[e.id||``]?.browse_duration||0,l=Number(t[e.id||``]?.browse_episode),u=0,d=0;return Number.isNaN(l)||(u=l),s&&c&&(d=Math.min(100,Math.floor(c/s*100))),{id:e.id||``,content_play_progress:{percent:d,series_num:u},detail:{user_info:{name:e.source_username||e.up_user||e.director||e.actor,avatar:void 0},info:{is_more_link:r,name:e.name,content_id:e.id,content:e.description,tags:e.tags?.map(e=>e.name).filter(e=>!!e),cover_image:e.img_y||e.img_x,create_time:e.show_at,video_duration:s},statics_cnt:{browse_cnt:e.play_count||0},publish_time:a,parent_content_info:{type:0}}}}async function u({targetUserId:e,page:n,contentType:r,pageSize:a=10}){if(!e)return{data:{list:[],total:0}};let c=await t({user_id:e,page:n,content_type:r,page_size:a}),l=c.data.like_infos?.reduce((e,t)=>(t.content_id&&(e[t.content_id]=t),e),{})||{},u=r===i.post?(c.data?.post_infos??[]).map(e=>o(e,l)):(c.data?.video_infos??[]).map(e=>s(e,l)),d=c.data?.has_more,f=typeof d==`boolean`?d:void 0;return{data:{list:u,total:c.data?.total??u.length,has_more:f}}}async function d({targetUserId:t,page:n,contentType:r,pageSize:a=10,authConfig:o}){if(!t)return{data:{list:[],total:0}};let s=await e({user_id:t,page:n,page_size:a,content_type:r},o),u=s.data.records?.reduce((e,t)=>(t.content_id&&(e[t.content_id]=t),e),{})||{},d=r===i.post?(s.data?.post_infos??[]).map(e=>c(e,u)):(s.data?.video_infos??[]).map(e=>l(e,u)),f=s.data?.has_more?!0:void 0;return{data:{list:d,total:s.data?.total??d.length,has_more:f}}}export{r as defaultPageSize,d as getHistoryData,u as getLikeData,i as likeContentType};
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* 个人主页主 Tab(本人视角)。
|
|
5
5
|
*/
|
|
6
|
-
declare const profileMainMineTabOptions: readonly ["collect", "
|
|
6
|
+
declare const profileMainMineTabOptions: readonly ["collect", "like", "history"];
|
|
7
7
|
/**
|
|
8
8
|
* 个人主页主 Tab(他人视角)。
|
|
9
9
|
*/
|
|
10
|
-
declare const profileMainProfileTabOptions: readonly ["collect", "
|
|
10
|
+
declare const profileMainProfileTabOptions: readonly ["collect", "like"];
|
|
11
11
|
/**
|
|
12
12
|
* 物料主 Tab 可选项。
|
|
13
13
|
*/
|
|
14
|
-
declare const profileMainTabOptions: readonly ["collect", "
|
|
14
|
+
declare const profileMainTabOptions: readonly ["collect", "like", "history"];
|
|
15
15
|
/**
|
|
16
16
|
* 点赞子 Tab 可选项。
|
|
17
17
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
const e=[`collect`,`
|
|
2
|
+
const e=[`collect`,`like`,`history`],t=[`collect`,`like`],n=e,r=[`video`,`post`],i=[`video`,`post`],a=[`video`,`post`,`collection`],o=[`created`,`subscribed`];export{o as profileMainCollectCollectionTabOptions,a as profileMainCollectTabOptions,i as profileMainHistoryTabOptions,r as profileMainLikeTabOptions,e as profileMainMineTabOptions,t as profileMainProfileTabOptions,n as profileMainTabOptions};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../../ui/button.mjs";import t from"../../../../utils/event-bus.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../../ui/button.mjs";import t from"../../../../utils/event-bus.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import{useAppContext as i}from"../../../../hooks/use-app-context/index.mjs";import{eventKey as a}from"../../../../constants/event-key.mjs";import{DeleteConfirmDialog as o}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useCallback as s,useEffect as c,useMemo as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{usePathname as p,useRouter as m,useSearchParams as h}from"next/navigation";const g=[`示例历史1`,`示例历史2`,`示例历史3`];function _(_){let{title:v,rows:y=1,clearText:b=`清理`,confirmDescription:x=`确认删除全部搜索历史吗?`,storageKey:S=`guest`,onHistoryClick:C}=_,w=i(),[T,E]=u([]),[D,O]=u(!1),k=m(),A=p(),j=h(),M=`search_history_${S}`,N=s(()=>{let e=localStorage.getItem(M);if(e)try{E(JSON.parse(e))}catch(e){console.error(`Failed to parse search history`,e)}else E([])},[M]);c(()=>{N()},[N]),c(()=>(t.on(a.SEARCH_HISTORY_UPDATE,N),()=>{t.off(a.SEARCH_HISTORY_UPDATE,N)}),[N]);let P=()=>{E([]),localStorage.removeItem(M),O(!1),t.emit(a.SEARCH_HISTORY_UPDATE)},F=l(()=>{let e=T.length>0?T:w===`editor`?g:[],t=y*10;return e.slice(0,t)},[T,y,w]);if(F.length===0)return null;let I=e=>{if(C)C(e);else{let t=new URLSearchParams(j.toString());t.set(`q`,e);let n=A.includes(`/search`)?A:`/search`;k.push(`${n}?${t.toString()}`)}};return f(n,{className:`px-4 py-2`,children:[f(n,{className:`flex justify-between items-center mb-2`,children:[d(r,{className:`text-[16px] font-bold text-text1`,children:v}),d(e,{variant:`ghost`,size:`sm`,className:`text-text3 text-[12px] p-0 h-auto`,onClick:()=>O(!0),children:b})]}),d(n,{className:`flex flex-wrap gap-2 overflow-hidden`,style:{maxHeight:`${y*40}px`},children:F.map((e,t)=>d(n,{className:`px-3 py-1 bg-bg2 rounded-full cursor-pointer`,onClick:()=>I(e),children:d(r,{className:`text-[14px] text-text2 truncate max-w-[150px]`,children:e})},t))}),d(o,{open:D,onOpenChange:O,onConfirm:()=>{P()},title:``,description:x})]})}export{_ as SearchHistoryClient};
|
|
@@ -9,7 +9,7 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
9
9
|
|
|
10
10
|
//#region components/biz/business/shortcut-grid/material.d.ts
|
|
11
11
|
declare const shortcutGridMaterial: DefineMaterialOption<typeof ShortcutGrid, typeof ShortcutGridClient, zod.ZodObject<{
|
|
12
|
-
title: zod.
|
|
12
|
+
title: zod.ZodString & SchemaHasDefaultValue;
|
|
13
13
|
shortcutCount: zod.ZodNumber & SchemaHasDefaultValue;
|
|
14
14
|
isShortcutTitle: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
15
15
|
shortcuts: zod.ZodArray<zod.ZodObject<{
|
|
@@ -8,7 +8,7 @@ import z$1 from "zod";
|
|
|
8
8
|
* 金刚区物料可配置字段:
|
|
9
9
|
*/
|
|
10
10
|
declare const shortcutGridInspectorPropsSchema: z$1.ZodObject<{
|
|
11
|
-
title: z$1.
|
|
11
|
+
title: z$1.ZodString & SchemaHasDefaultValue;
|
|
12
12
|
shortcutCount: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
13
13
|
isShortcutTitle: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
14
14
|
shortcuts: z$1.ZodArray<z$1.ZodObject<{
|
|
@@ -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({title:i({label:`推荐位名称`,required:!
|
|
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({title:i({label:`推荐位名称`,required:!0,defaultValue:`推荐列表`}),shortcutCount:n({label:`入口数量`,required:!0,defaultValue:4}).refine(e=>e>=3&&e<=5,`入口数量必须为 3-5`),isShortcutTitle:r({label:`是否显示入口标题`,required:!0,defaultValue:!0}),shortcuts:e(o.object({label:i({label:`入口标题`,required:!1,defaultValue:`最新`}),icon:i({label:`图标`,required:!0,defaultValue:``}),href:i({label:`跳转指向`,required:!0,defaultValue:``})}),{label:`推荐列表`,required:!0,defaultValue:[{label:`热门`,icon:`/images/2026/01/21/6967aec2d806ed47d5238861/fce0a95c-1e8f-4872-ab69-86212435e1bc.jpegxxx`,href:`/video-list?title=穷小伙刚离婚,找了他3年的女总裁蒙着面纱出现了,一身红嫁衣当众求嫁,前妻嘲笑她是丑八怪,下秒揭开面纱后全场沉默了&tags=动作`},{label:`新上架`,icon:`/images/2026/01/21/6967aec2d806ed47d5238861/fce0a95c-1e8f-4872-ab69-86212435e1bc.jpegxxx`,href:`/video-list?title=穷小伙刚离婚,找了他3年的女总裁蒙着面纱出现了,一身红嫁衣当众求嫁,前妻嘲笑她是丑八怪,下秒揭开面纱后全场沉默了&tags=动作`},{label:`排行榜`,icon:`/images/2026/01/21/6967aec2d806ed47d5238861/fce0a95c-1e8f-4872-ab69-86212435e1bc.jpegxxx`,href:`/video-list?title=穷小伙刚离婚,找了他3年的女总裁蒙着面纱出现了,一身红嫁衣当众求嫁,前妻嘲笑她是丑八怪,下秒揭开面纱后全场沉默了&tags=动作`},{label:`筛选`,icon:`/images/2026/01/21/6967aec2d806ed47d5238861/fce0a95c-1e8f-4872-ab69-86212435e1bc.jpegxxx`,href:`/video-list?title=穷小伙刚离婚,找了他3年的女总裁蒙着面纱出现了,一身红嫁衣当众求嫁,前妻嘲笑她是丑八怪,下秒揭开面纱后全场沉默了&tags=动作`}]})}),c=a(s);export{c as shortcutGridInspectorDefaultProps,s as shortcutGridInspectorPropsSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
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{useAppContext as r}from"../../../../hooks/use-app-context/index.mjs";import{useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{usePathname as s,useRouter as c}from"next/navigation";const l=[];function u(u){let{items:d=l}=u,f=c(),p=s(),m=r(),h=i(()=>m===`editor`?0:d.findIndex(e=>!!(e.domainId===`home`&&p===`/`||e.domainId===`mine`&&p.includes(`/mine`))),[d,p,m]),g=e=>{if(m!==`editor`)if(e.configType===`function`)switch(e.functionPageType){case`search`:f.push(`/search`);break;case`profile`:f.push(`/user/mine`);break;case`detail`:e.selectData&&f.push(`/video/detail/${e.selectData}`);break;case`content_list`:f.push(`/video/list?tag=${e.selectData}`);break;default:f.push(`/`)}else f.push(`/`)};return!d||d.length===0?null:a(t,{className:`fixed bottom-0 left-0 right-0 bg-bg1 border-t border-line safe-area-bottom z-50`,children:a(t,{className:`flex h-[50px] items-center justify-around`,children:d.map((r,i)=>{let s=h===i,c=r.icon;return s&&r.activeIcon&&(c=r.activeIcon),o(t,{className:`flex flex-col items-center justify-center flex-1 cursor-pointer active:opacity-70 transition-opacity`,onClick:()=>g(r),children:[a(t,{className:`relative w-6 h-6`,children:c?a(e,{src:c,alt:r.label,fill:!0,className:`object-contain`}):a(t,{className:`w-full h-full rounded-sm ${s?`bg-theme5`:`bg-text3`}`})}),a(n,{className:`text-[10px] mt-1 truncate max-w-full px-1 ${s?`text-theme5 font-medium`:`text-text3`}`,children:r.label})]},i)})})})}export{u as TabBarClient};
|
|
@@ -14,8 +14,12 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
14
14
|
declare const tabBarMaterial: DefineMaterialOption<typeof TabBarServer, typeof TabBarClient, zod.ZodObject<{
|
|
15
15
|
items: zod.ZodArray<zod.ZodObject<{
|
|
16
16
|
label: zod.ZodString & SchemaHasDefaultValue;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
domainId: zod.ZodString & SchemaHasDefaultValue;
|
|
18
|
+
icon: zod.ZodString & SchemaHasDefaultValue;
|
|
19
|
+
activeIcon: zod.ZodString & SchemaHasDefaultValue;
|
|
20
|
+
configType: zod.ZodType<"function" | "product", unknown, zod_v4_core0.$ZodTypeInternals<"function" | "product", unknown>> & SchemaHasDefaultValue;
|
|
21
|
+
functionPageType: zod.ZodType<"search" | "detail" | "profile" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"search" | "detail" | "profile" | "content_list", unknown>> & SchemaHasDefaultValue;
|
|
22
|
+
selectData: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
19
23
|
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
20
24
|
}, zod_v4_core0.$strip>, "tab-bar">;
|
|
21
25
|
//#endregion
|
|
@@ -11,8 +11,12 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
11
11
|
declare const tabBarInspectorPropsSchema: zod.ZodObject<{
|
|
12
12
|
items: zod.ZodArray<zod.ZodObject<{
|
|
13
13
|
label: zod.ZodString & SchemaHasDefaultValue;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
domainId: zod.ZodString & SchemaHasDefaultValue;
|
|
15
|
+
icon: zod.ZodString & SchemaHasDefaultValue;
|
|
16
|
+
activeIcon: zod.ZodString & SchemaHasDefaultValue;
|
|
17
|
+
configType: zod.ZodType<"function" | "product", unknown, zod_v4_core0.$ZodTypeInternals<"function" | "product", unknown>> & SchemaHasDefaultValue;
|
|
18
|
+
functionPageType: zod.ZodType<"search" | "detail" | "profile" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"search" | "detail" | "profile" | "content_list", unknown>> & SchemaHasDefaultValue;
|
|
19
|
+
selectData: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
16
20
|
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
17
21
|
}, zod_v4_core0.$strip>;
|
|
18
22
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineTextPropSchema as
|
|
2
|
+
import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSelectEnumPropSchema as n,defineTextPropSchema as r}from"../../../../utils/schema/schema.mjs";const i=t({items:e(t({label:r({label:`导航入口名称`,defaultValue:`入口`,description:`支持输入,中/英/数/符,不支持Emoji,4个字符`}),domainId:r({label:`导航入口域名ID`,defaultValue:``,description:`输入,英/数,10个字符`}),icon:r({label:`导航外显图标`,defaultValue:``,description:`支持上传,尺寸为1:1,支持jpg/png,50KB左右`}),activeIcon:r({label:`导航外显图标(选中)`,defaultValue:``,description:`支持上传,尺寸为1:1,支持jpg/png,50KB左右`}),configType:n([`product`,`function`],{label:`配置类型`,defaultValue:`function`}),functionPageType:n([`detail`,`search`,`profile`,`content_list`],{label:`功能页面类型`,defaultValue:`search`}),selectData:r({label:`选择数据`,defaultValue:``,required:!1})}),{label:`底部导航入口`,description:`注最少2个,最多5个,自动居中`,defaultValue:[{label:`首页`,domainId:`home`,icon:``,activeIcon:``,configType:`function`,functionPageType:`search`,selectData:``},{label:`我的`,domainId:`mine`,icon:``,activeIcon:``,configType:`function`,functionPageType:`profile`,selectData:``}]})});export{i as tabBarInspectorPropsSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import e from"../../../../assets/images/frame.mjs";import{jsx as
|
|
2
|
+
"use client";import{useAppContext as e}from"../../../../hooks/use-app-context/index.mjs";import t from"../../../../assets/images/frame.mjs";import n from"../../../../assets/images/subscript.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a from"next/image";const o=[];function s(s){let{title:c,items:l=o,commonPlayCount:u,commonEpisodes:d}=s,f=e();return!l||l.length===0?null:i(`div`,{className:`bg-bg1 px-3 py-3`,children:[c&&r(`div`,{className:`mb-3 flex items-center justify-between`,children:r(`h2`,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:c})}),r(`div`,{className:`flex overflow-x-auto pb-2 scrollbar-hide space-x-2`,children:l.map((e,o)=>{let s=e.showPlayCount??u?.enabled,c=e.playCountDelta||u?.delta,l=e.showEpisodes??d;return i(`div`,{className:`flex-shrink-0 w-[116.67px]`,children:[i(`div`,{className:`relative aspect-[116.67/155.56] rounded-lg overflow-hidden bg-bg2`,children:[f===`editor`||e.cover?r(a,{src:e.cover||t,alt:e.title,fill:!0,sizes:`116.67px`,className:`object-cover text-[10px] text-text3`}):r(`div`,{className:`w-full h-full flex items-center justify-center text-text3 text-xs`,children:`无封面`}),(f===`editor`?!0:!!e.badge)&&r(`div`,{className:`absolute top-0 right-0 w-8 h-8`,children:r(a,{src:e.badge||n,alt:``,fill:!0,sizes:`32px`,className:`object-contain`})}),i(`div`,{className:`absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent pb-1 pt-3 px-1 flex justify-between items-center`,children:[s&&c&&i(`div`,{className:`flex items-center gap-1 rounded bg-overlay px-1 py-0`,children:[r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`10`,viewBox:`0 0 12 10`,fill:`none`,className:`shrink-0`,"aria-hidden":!0,children:r(`path`,{d:`M7.56 5.18437L5.013 6.56737C4.893 6.63337 4.761 6.66937 4.638 6.66937C4.269 6.66937 4.002 6.38737 4.002 5.99737V3.28237C4.002 2.89237 4.269 2.61037 4.638 2.61037C4.764 2.61037 4.893 2.64637 5.013 2.70937L7.572 4.09237C7.803 4.21837 7.938 4.41637 7.938 4.63237C7.938 4.85137 7.8 5.05537 7.56 5.18437ZM9.807 9.27637L2.133 8.52937C0.954 8.52937 0 7.57537 0 6.39637V2.79937C0 1.62037 0.954 0.666368 2.133 0.666368L9.81 0.000367165C10.989 0.000367165 11.943 0.954367 11.943 2.13337V7.14337C11.9422 7.70935 11.7168 8.25188 11.3163 8.65181C10.9158 9.05174 10.373 9.27637 9.807 9.27637ZM10.875 2.13337C10.875 1.99351 10.8475 1.85502 10.7939 1.72581C10.7404 1.5966 10.662 1.47919 10.5631 1.3803C10.4642 1.2814 10.3468 1.20296 10.2176 1.14944C10.0883 1.09591 9.94986 1.06837 9.81 1.06837L2.133 1.73437C1.99314 1.73437 1.85465 1.76191 1.72544 1.81544C1.59623 1.86896 1.47883 1.9474 1.37993 2.0463C1.28104 2.14519 1.20259 2.2626 1.14907 2.39181C1.09555 2.52102 1.068 2.65951 1.068 2.79937V6.39637C1.068 6.67882 1.1802 6.94971 1.37993 7.14944C1.57966 7.34916 1.85054 7.46137 2.133 7.46137L9.807 8.20837C9.94686 8.20837 10.0853 8.18082 10.2146 8.1273C10.3438 8.07378 10.4612 7.99533 10.5601 7.89644C10.659 7.79754 10.7374 7.68014 10.7909 7.55093C10.8445 7.42171 10.872 7.28323 10.872 7.14337V2.13337H10.875Z`,fill:`white`})}),r(`span`,{className:`text-white text-[12px] leading-[20px]`,children:c})]}),l&&e.contentDescription&&r(`span`,{className:`text-white text-[12px] leading-[20px]`,children:e.contentDescription})]})]}),r(`div`,{className:`mt-2 py-2`,children:r(`h3`,{className:`text-[16px] text-text1 truncate font-bold leading-[24px]`,children:e.title})})]},o)})})]})}export{s as VideoHorizontalListClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineObjectPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a}from"../../../../utils/schema/schema.mjs";import{z as o}from"zod";const s=o.object({content:a({label:`推荐位内容`,defaultValue:``}),title:a({label:`推荐位内容名称`,defaultValue:`视频标题`}),contentDescription:a({label:`内容说明简介`,defaultValue:``}),cover:a({label:`推荐位封面`,defaultValue:``}),useVideoPoster:i({label:`沿用视频海报`,defaultValue:!0}),showPlayCount:i({label:`播放量显示`,defaultValue:!0}),playCountDelta:a({label:`播放量浮动`,defaultValue:``,required:!1}),showEpisodes:i({label:`集数展示`,defaultValue:!0}),badge:a({label:`推荐位角标`,defaultValue
|
|
2
|
+
import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineObjectPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a}from"../../../../utils/schema/schema.mjs";import{z as o}from"zod";const s=o.object({content:a({label:`推荐位内容`,defaultValue:``}),title:a({label:`推荐位内容名称`,defaultValue:`视频标题`}),contentDescription:a({label:`内容说明简介`,defaultValue:``}),cover:a({label:`推荐位封面`,defaultValue:``}),useVideoPoster:i({label:`沿用视频海报`,defaultValue:!0}),showPlayCount:i({label:`播放量显示`,defaultValue:!0}),playCountDelta:a({label:`播放量浮动`,defaultValue:``,required:!1}),showEpisodes:i({label:`集数展示`,defaultValue:!0}),badge:a({label:`推荐位角标`,defaultValue:``,description:`角标图片地址,可通过低代码平台配置上传;留空则使用默认角标图`})}),c=t({title:a({label:`推荐位名称`,defaultValue:`推荐视频`}),moduleCount:n({label:`推荐模块数`,defaultValue:1}),layout:r({enabled:i({label:`组件铺设`,defaultValue:!1}),tag:a({label:`取数范围标签`,defaultValue:`动作`,required:!1})},{label:`组件铺设`,defaultValue:{enabled:!1,tag:`动作`}}),commonPlayCount:r({enabled:i({label:`通用播放量`,defaultValue:!0}),delta:a({label:`播放量浮动值`,defaultValue:``,required:!1})},{label:`通用播放量`,defaultValue:{enabled:!0,delta:``}}),commonEpisodes:i({label:`通用集数`,defaultValue:!0}),items:e(s,{label:`推荐位模块`,defaultValue:[{content:``,title:`视频标题 1`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{content:``,title:`视频标题 2`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{content:``,title:`视频标题 3`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``}]})});export{c as videoHorizontalListInspectorPropsSchema};
|
|
@@ -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{RightArrowIcon as r}from"../../icons/right-arrow.mjs";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";import{useTranslations as s}from"next-intl";import c from"next/link";const l=[];function u({size:e=12}){return a(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`currentColor`,children:a(`path`,{d:`M8 5v14l11-7z`})})}function d(e){if(!e)return``;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}:${r.toString().padStart(2,`0`)}`}function f(f){let p=s(`components.common.list.collectionList`),{id:m,title:h,contentCount:g,contents:_=l}=f,v=_.slice(0,3);return o(t,{className:`bg-bg1 rounded-lg py-3`,children:[o(t,{className:`flex items-center justify-between mb-3 gap-2`,children:[a(n,{className:`text-sm text-text1 font-medium line-clamp-1`,children:h}),o(c,{href:`/collection/${m}`,className:`flex items-center shrink-0 gap-1 text-text3`,children:[o(n,{className:`text-xs`,children:[g,p(`collectionListItem.contentCountSuffix`)]}),a(r,{})]})]}),a(t,{className:`grid grid-cols-3 gap-2`,children:v.map((r,s)=>o(c,{href:`/${r.contentType===1?`video`:`post`}/${r.id}`,className:`flex flex-col gap-1`,children:[o(t,{className:`relative aspect-video rounded-md overflow-hidden bg-gray-100`,children:[a(e,{src:r.coverImage||`/empty/default-cover.png`,alt:r.title||h,fill:!0,className:`object-cover`}),r.isVideo&&o(i,{children:[a(t,{className:`absolute inset-0 flex items-center justify-center bg-black/20`,children:a(t,{className:`w-6 h-6 rounded-full bg-white/80 flex items-center justify-center`,children:a(u,{size:12})})}),r.isMovie&&a(t,{className:`absolute bottom-1 left-1 rounded-xs bg-black/60 px-1 text-[10px] text-white`,children:p(`collectionListItem.movieLabel`)}),r.videoDuration&&a(t,{className:`absolute bottom-1 right-1 rounded-xs bg-black/60 px-1 text-[10px] text-white`,children:d(r.videoDuration)})]})]}),a(t,{className:`flex items-center justify-between gap-1`,children:a(n,{className:`text-xs text-text1 line-clamp-1`,dangerouslySetInnerHTML:{__html:r.title||``}})})]},r.id??`${h}-${s}`))})]})}export{f as CollectionListItem};
|
|
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{RightArrowIcon as r}from"../../icons/right-arrow.mjs";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";import{useTranslations as s}from"next-intl";import c from"next/link";const l=[];function u({size:e=12}){return a(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`currentColor`,children:a(`path`,{d:`M8 5v14l11-7z`})})}function d(e){if(!e)return``;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}:${r.toString().padStart(2,`0`)}`}function f(f){let p=s(`components.common.list.collectionList`),{id:m,title:h,contentCount:g,contents:_=l}=f,v=_.slice(0,3);return o(t,{className:`bg-bg1 rounded-lg py-3`,children:[o(t,{className:`flex items-center justify-between mb-3 gap-2`,children:[a(n,{className:`text-sm text-text1 font-medium line-clamp-1`,children:h}),o(c,{href:`/collection/${m}`,className:`flex items-center shrink-0 gap-1 text-text3`,children:[o(n,{className:`text-xs`,children:[g,p(`collectionListItem.contentCountSuffix`)]}),a(r,{})]})]}),a(t,{className:`grid grid-cols-3 gap-2`,children:v.map((r,s)=>r.isPlaceholder?a(t,{className:`aspect-video rounded-md bg-bg2`},r.id??`${h}-${s}`):o(c,{href:`/${r.contentType===1?`video`:`post`}/${r.id}`,className:`flex flex-col gap-1`,children:[o(t,{className:`relative aspect-video rounded-md overflow-hidden bg-gray-100`,children:[a(e,{src:r.coverImage||`/empty/default-cover.png`,alt:r.title||h,fill:!0,className:`object-cover`}),r.isVideo&&o(i,{children:[a(t,{className:`absolute inset-0 flex items-center justify-center bg-black/20`,children:a(t,{className:`w-6 h-6 rounded-full bg-white/80 flex items-center justify-center`,children:a(u,{size:12})})}),r.isMovie&&a(t,{className:`absolute bottom-1 left-1 rounded-xs bg-black/60 px-1 text-[10px] text-white`,children:p(`collectionListItem.movieLabel`)}),r.videoDuration&&a(t,{className:`absolute bottom-1 right-1 rounded-xs bg-black/60 px-1 text-[10px] text-white`,children:d(r.videoDuration)})]})]}),a(t,{className:`flex items-center justify-between gap-1`,children:a(n,{className:`text-xs text-text1 line-clamp-1`,dangerouslySetInnerHTML:{__html:r.title||``}})})]},r.id??`${h}-${s}`))})]})}export{f as CollectionListItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../../ui/box.mjs";import{List as t}from"../../../ui/list.mjs";import{Text as n}from"../../../ui/text.mjs";import{normalizeTimeToMilliseconds as r}from"../../../ui/time.mjs";import{PostListItemSkeleton as i}from"../../skeleton/post-list-item-skeleton.mjs";import{PostListItem as a}from"./post-list-item.mjs";import{useIsClient as o}from"foxact/use-is-client";import{useMemo as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";import f from"next/link";import{orderBy as p}from"lodash-es";function m(e){let t=r(e);if(!t)return!1;let n=new Date(t),i=new Date;return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()}function h(r){let h=d(`components.ui.list`),g=o(),{list:_,loading:v,hasMore:y=!1,loadMore:b,isEditMode:x,selectedIds:S,onToggleSelection:C}=r,
|
|
2
|
+
"use client";import{Box as e}from"../../../ui/box.mjs";import{List as t}from"../../../ui/list.mjs";import{Text as n}from"../../../ui/text.mjs";import{normalizeTimeToMilliseconds as r}from"../../../ui/time.mjs";import{PostListItemSkeleton as i}from"../../skeleton/post-list-item-skeleton.mjs";import{PostListItem as a}from"./post-list-item.mjs";import{useIsClient as o}from"foxact/use-is-client";import{useMemo as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";import f from"next/link";import{orderBy as p}from"lodash-es";function m(e){let t=r(e);if(!t)return!1;let n=new Date(t),i=new Date;return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()}function h(r){let h=d(`components.ui.list`),g=o(),{list:_,loading:v,hasMore:y=!1,loadMore:b,isEditMode:x,selectedIds:S,onToggleSelection:C,emptyText:w}=r,T=s(()=>p(_,[`publishTime`],[`desc`]),[_]),{todayList:E,earlierList:D}=s(()=>{if(!g)return{todayList:[],earlierList:T};let e=[],t=[];for(let n of _)m(n.publishTime)?e.push(n):t.push(n);return{todayList:p(e,[`publishTime`],[`desc`]),earlierList:p(t,[`publishTime`],[`desc`])}},[g,_,T]),O=!!v&&_.length===0,k=g;return O?l(e,{className:`bg-bg1`,children:Array.from({length:6}).map((e,t)=>l(i,{isEditMode:x},`post-list-item-skeleton-${t}`))}):u(t,{loading:v,loadMore:b,hasMore:y,empty:`no-content`,emptyText:w||h(`postList.empty`),children:[k&&E.length>0&&u(c,{children:[l(e,{className:` `,children:l(n,{className:`text-lg text-text1`,children:h(`postList.today`)})}),E.map(e=>x?l(a,{...e,isEditMode:x,isSelected:S?.has(e.id),onToggle:()=>C?.(e.id)},e.id):l(f,{href:`/post/${e.id}`,children:l(a,{...e,isEditMode:x,isSelected:S?.has(e.id),onToggle:()=>C?.(e.id)})},e.id))]}),D.length>0&&u(c,{children:[l(e,{className:` `,children:l(n,{className:`text-lg text-text1`,children:h(`postList.earlier`)})}),D.map(e=>x?l(a,{...e,isEditMode:x,isSelected:S?.has(e.id),onToggle:()=>C?.(e.id)},e.id):l(f,{href:`/post/${e.id}`,children:l(a,{...e,isEditMode:x,isSelected:S?.has(e.id),onToggle:()=>C?.(e.id)})},e.id))]})]})}export{h as PostList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../../ui/box.mjs";import{List as t}from"../../../ui/list.mjs";import{Text as n}from"../../../ui/text.mjs";import{normalizeTimeToMilliseconds as r}from"../../../ui/time.mjs";import{VideoListItemSkeleton as i}from"../../skeleton/video-list-item-skeleton.mjs";import{VideoListItem as a}from"./video-list-item.mjs";import{useIsClient as o}from"foxact/use-is-client";import{useMemo as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";import f from"next/link";import{orderBy as p}from"lodash-es";function m(e){let t=r(e);if(!t)return!1;let n=new Date(t),i=new Date;return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()}function h(r){let h=d(`components.ui.list`),g=o(),{list:_,showVideoProgress:v,loading:y,hasMore:b=!1,loadMore:x,isEditMode:S,selectedIds:C,onToggleSelection:w}=r,
|
|
2
|
+
"use client";import{Box as e}from"../../../ui/box.mjs";import{List as t}from"../../../ui/list.mjs";import{Text as n}from"../../../ui/text.mjs";import{normalizeTimeToMilliseconds as r}from"../../../ui/time.mjs";import{VideoListItemSkeleton as i}from"../../skeleton/video-list-item-skeleton.mjs";import{VideoListItem as a}from"./video-list-item.mjs";import{useIsClient as o}from"foxact/use-is-client";import{useMemo as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";import f from"next/link";import{orderBy as p}from"lodash-es";function m(e){let t=r(e);if(!t)return!1;let n=new Date(t),i=new Date;return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()}function h(r){let h=d(`components.ui.list`),g=o(),{list:_,showVideoProgress:v,loading:y,hasMore:b=!1,loadMore:x,isEditMode:S,selectedIds:C,onToggleSelection:w,emptyText:T}=r,E=s(()=>p(_,[`publishTime`],[`desc`]),[_]),{todayList:D,earlierList:O}=s(()=>{if(!g)return{todayList:[],earlierList:E};let e=[],t=[];for(let n of _)m(n.publishTime)?e.push(n):t.push(n);return{todayList:p(e,[`publishTime`],[`desc`]),earlierList:p(t,[`publishTime`],[`desc`])}},[g,_,E]),k=!!y&&_.length===0,A=g;return k?l(e,{className:`bg-bg1`,children:Array.from({length:6}).map((e,t)=>l(i,{isEditMode:S,showVideoProgress:v},`video-list-item-skeleton-${t}`))}):u(t,{loading:y,loadMore:x,hasMore:b,empty:`no-content`,emptyText:T||h(`videoList.empty`),children:[A&&D.length>0&&u(c,{children:[l(e,{className:` `,children:l(n,{className:`text-lg text-text1`,children:h(`videoList.today`)})}),D.map(e=>S?l(a,{showVideoProgress:v,isEditMode:S,isSelected:C?.has(e.id),...e,onToggle:()=>w?.(e.id)},e.id):l(f,{href:`/video/${e.id}/${e.title}`,children:l(a,{showVideoProgress:v,isEditMode:S,isSelected:C?.has(e.id),...e,onToggle:()=>w?.(e.id)},e.id)},e.id))]}),O.length>0&&u(c,{children:[l(e,{className:` `,children:l(n,{className:`text-lg text-text1`,children:h(`videoList.earlier`)})}),O.map(e=>S?l(a,{showVideoProgress:v,isEditMode:S,isSelected:C?.has(e.id),...e,onToggle:()=>w?.(e.id)},e.id):l(f,{href:`/video/${e.id}/${e.title}`,children:l(a,{showVideoProgress:v,isEditMode:S,isSelected:C?.has(e.id),...e,onToggle:()=>w?.(e.id)},e.id)},e.id))]})]})}export{h as VideoList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetCollectionInfo as n,pCommunityCreateCollection as r,pCommunityUpdateCollection as i}from"../../../service/generated/client.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetCollectionInfo as n,pCommunityCreateCollection as r,pCommunityUpdateCollection as i}from"../../../service/generated/client.mjs";import{Box as a}from"../../ui/box.mjs";import{InputGroup as o,InputGroupAddon as s,InputGroupTextarea as c}from"../../ui/input-group.mjs";import{Field as l,FieldLabel as u}from"../../ui/field.mjs";import{useDeleteRequest as d,useRequest as f}from"../../../hooks/query/use-query.mjs";import{HeaderNav as p}from"../../common/header-nav/client.mjs";import{useEffect as m,useRef as h,useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{toast as y}from"sonner";import{useTranslations as b}from"next-intl";import{useRouter as x}from"next/navigation";function S({mode:S=`create`,collectionId:C}){let w=b(`components.pages.collectionCreate`),T=x(),{userId:E}=t(),D=d();h(null);let O=S===`edit`&&!!C,k=h(!1),[A,j]=g(!1),[M,N]=g(!1),[P,F]=g(``),[I,L]=g({title:``,description:``}),R=f([`collection-detail`,C],()=>n({collection_id:C}),{enabled:!!(O&&C)}).data?.data?.data?.collection;m(()=>{!O||k.current||!R||(L({title:R.title??``,description:R.description??``}),F(R.cover_image??``),k.current=!0)},[R,O]);function z(e,t){L(n=>({...n,[e]:t}))}async function B(){if(A)return;let e=I.title.trim(),t=I.description.trim();if(!e){y.error(w(`form.titleRequired`));return}if(O&&!C){y.error(w(`form.collectionNotFound`));return}try{j(!0);let n=y.loading(w(O?`form.saving`:`form.creating`)),a=O?await i({collection_id:C,title:e,description:t,cover_image:P}):await r({title:e,description:t,cover_image:P});if(a.code===0){y.success(w(O?`form.saveSuccess`:`form.createSuccess`),{id:n}),E&&D([`user-profile`,`mine`,E,`user-collection-created`,E]),O&&C&&D([`collection-detail`,C]),T.back();return}y.error(a.message||w(O?`form.saveFailed`:`form.createFailed`),{id:n})}catch(e){console.error(O?`编辑合集失败`:`创建合集失败`,e),y.error(w(O?`form.saveFailed`:`form.createFailed`))}finally{j(!1)}}return v(a,{className:`min-h-screen !bg-bg2`,children:[_(p,{title:w(O?`form.editTitle`:`form.createTitle`),className:`!bg-bg2`,rightChild:_(e,{onClick:B,disabled:A||M,children:w(A?O?`form.saving`:`form.creating`:O?`form.save`:`form.create`)})}),v(a,{className:`pb-3`,children:[v(l,{className:`!bg-bg2 px-3 border-none`,children:[_(u,{required:!0,children:w(`form.label`)}),v(o,{children:[_(c,{className:`!bg-bg1 p-2.5`,maxLength:50,placeholder:w(`form.titlePlaceholder`),value:I.title,onChange:e=>z(`title`,e.target.value)}),_(s,{className:`!bg-bg1`,align:`block-end`,children:_(`div`,{className:`text-right w-full`,children:v(`span`,{className:`text-xs`,children:[I.title.length,`/50`]})})})]})]}),v(l,{className:`border-none px-3 bg-bg2! `,children:[_(u,{children:w(`form.descriptionLabel`)}),v(o,{children:[_(c,{className:`!bg-bg1 p-2.5`,maxLength:100,placeholder:w(`form.descriptionPlaceholder`),value:I.description,onChange:e=>z(`description`,e.target.value)}),_(s,{className:`!bg-bg1`,align:`block-end`,children:_(`div`,{className:`text-right w-full`,children:v(`span`,{className:`text-xs`,children:[I.description.length,`/100`]})})})]})]})]})]})}export{S as CollectionCreateForm};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Checkbox as n}from"../../../ui/checkbox.mjs";import{Text as r}from"../../../ui/text.mjs";import{VideoListItem as i}from"../../../common/list/video-list/video-list-item.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{useTranslations as s}from"next-intl";import c from"next/link";const l=[];function u(e){return Number.isFinite(e)?e.toFixed(1):`--`}function d(e){return e===1}function f(f){let{title:p,coverImage:m,score:h=0,isMovie:g=!1,collectedAt:_,tags:v=l,id:y,type:b,duration:x=0,authorName:S=``,viewCount:C=0,publishTime:w,is_more_link:T=!1,seriesNum:E,isEditMode:D=!1,isSelected:O=!1,onToggleSelection:k}=f,A=s(`components.pages.collectionDetail`);function j(){k?.(y)}function M(e){e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),j())}function N(e){e.stopPropagation(),j()}return d(b)?D?a(t,{role:`button`,tabIndex:0,className:`w-full text-left`,onClick:j,onKeyDown:M,children:o(t,{className:`flex items-start gap-2`,children:[a(`button`,{type:`button`,className:`-m-2 p-2 shrink-0 self-center`,onClick:N,children:a(n,{checked:O,className:`pointer-events-none`})}),a(t,{className:`flex-1 min-w-0`,children:a(i,{id:y,title:p,coverImage:m,duration:x,authorName:S,viewCount:C,publishTime:w??_??``,is_more_link:T,seriesNum:E,showVideoProgress:!1})})]})}):a(c,{className:`block`,href:`/video/${y}/${p}`,children:a(i,{id:y,title:p,coverImage:m,duration:x,authorName:S,viewCount:C,publishTime:w??_??``,is_more_link:T,seriesNum:E,showVideoProgress:!1})}):D?a(t,{role:`button`,tabIndex:0,className:`w-full text-left`,onClick:j,onKeyDown:M,children:o(t,{className:`flex items-start gap-2 py-1.5`,children:[a(`button`,{type:`button`,className:`-m-2 p-2 shrink-0 self-center`,onClick:N,children:a(n,{checked:O,className:`pointer-events-none`})}),o(t,{className:`flex-1 min-w-0 flex items-start gap-3`,children:[a(t,{className:`relative w-32 h-20 shrink-0 rounded-lg overflow-hidden bg-gray-100`,children:a(e,{src:m||`/empty/default-cover.png`,alt:p||A(`detail.coverAlt`),fill:!0,className:`object-cover`})}),o(t,{className:`flex-1 min-w-0 flex flex-col gap-1.5`,children:[o(t,{className:`flex justify-between `,children:[a(r,{className:`text-base font-bold text-text1 line-clamp-1`,dangerouslySetInnerHTML:{__html:p}}),g&&a(r,{className:`text-xl font-bold text-[#ff9f1a]`,children:u(h)})]}),a(t,{className:`flex flex-wrap gap-1`,children:v.map(e=>a(t,{className:`px-2 py-0.5 rounded-full scale-90 text-sm text-[rgb(226,76,37)] bg-[rgba(226,76,37,.3)] `,children:e},e))})]})]})]})}):a(t,{className:`pt-2`,children:o(c,{className:`flex items-start gap-3 py-3`,href:b===1?`/video/${y}/${p}`:`/post/${y}`,children:[a(t,{className:`relative w-32 h-20 shrink-0 rounded-lg overflow-hidden bg-gray-100`,children:a(e,{src:m||`/empty/default-cover.png`,alt:p||A(`detail.coverAlt`),fill:!0,className:`object-cover`})}),o(t,{className:`flex-1 min-w-0 flex flex-col gap-1.5`,children:[o(t,{className:`flex justify-between `,children:[a(r,{className:`text-base font-bold text-text1 line-clamp-1`,dangerouslySetInnerHTML:{__html:p}}),g&&a(r,{className:`text-xl font-bold text-[#ff9f1a]`,children:u(h)})]}),a(t,{className:`flex flex-wrap gap-1`,children:v.map(e=>a(t,{className:`px-2 py-0.5 rounded-full scale-90 text-sm text-[rgb(226,76,37)] bg-[rgba(226,76,37,.3)] `,children:e},e))})]})]})})}export{f as CollectionDetailCard};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetCollectionInfo as n,gUserViewUserInfo as r,pCommunityDeleteCollection as i,pCommunityRemoveContentFromCollection as a,pCommunitySubscribeCollection as o}from"../../../service/generated/client.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetCollectionInfo as n,gUserViewUserInfo as r,pCommunityDeleteCollection as i,pCommunityRemoveContentFromCollection as a,pCommunitySubscribeCollection as o,pInteractionBatchDeleteCollects as s}from"../../../service/generated/client.mjs";import{Box as c}from"../../ui/box.mjs";import{Checkbox as ee}from"../../ui/checkbox.mjs";import{Drawer as te,DrawerContent as ne,DrawerDescription as re,DrawerTitle as ie}from"../../ui/drawer.mjs";import{List as ae}from"../../ui/list.mjs";import{Text as l}from"../../ui/text.mjs";import{useDeleteRequest as oe,useMutation as u,useRequest as d,useUpdateRequest as se}from"../../../hooks/query/use-query.mjs";import{useLoginModalStore as ce}from"../../../store/modules/login-modal-store.mjs";import{ShareDrawer as le}from"../../common/share-popup/share-drawer.mjs";import{SharePlatformEnum as f}from"../../../types/share.mjs";import p from"../../../utils/share-manager.mjs";import{HeaderNav as m}from"../../common/header-nav/client.mjs";import{MoreIcon as h}from"../../common/icons/more.mjs";import{CollectionDetailCard as g}from"./_components/collection-detail-card.mjs";import{useMemo as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{toast as x}from"sonner";import{useTranslations as ue}from"next-intl";import{useRouter as S,useSearchParams as de}from"next/navigation";function C(e){if(e.cover_image)return e.cover_image;let t=``;return e.medias?.find(e=>e?(!e.is_video&&!t&&e.media_url&&(t=e.media_url),!!e.cover_image):!1)?.cover_image||t}function w(e){let t=e.detail.info?.video_duration;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return Math.floor(t);let n=e.medias?.find(e=>{let t=e?.video_duration;return typeof t==`number`&&Number.isFinite(t)&&t>0})?.video_duration;return typeof n==`number`&&Number.isFinite(n)&&n>0?Math.floor(n):0}function T(e){let t=e.detail.info?.play_count;if(typeof t==`number`&&Number.isFinite(t))return Math.max(0,Math.floor(t));let n=e.detail.view_count;return typeof n==`number`&&Number.isFinite(n)?Math.max(0,Math.floor(n)):0}function fe(e){let t=e.detail,n=t.info,r=n?.cover_image||t.cover_image||C(e),i=n?.text||n?.title||t.title||t.content||``,a=t.author_score??0,o=t.tags??[];return{id:e.content_id?String(e.content_id):String(e.id),title:i,type:e.type,coverImage:r,score:a,collectedAt:t.create_time,tags:o,duration:w(e),viewCount:T(e),publishTime:t.create_time||t.update_time||``,is_more_link:n?.is_more_link??!1,authorName:``}}function E({id:C}){let w=ue(`components.pages.collectionDetail`),T=S(),E=de(),{userId:D,isLogin:O}=t(),{open:k}=ce(),A=oe();se();let j=d([`collection-detail`,C],()=>n({collection_id:C})),M=j.data?.data?.data?.collection?.user_id,N=!!(M&&D&&String(M)===String(D)),P=d([`user-info`,M],()=>r({target_user_id:M,user_id:M})),[F,I]=v(!1),[L,R]=v(!1),[z,B]=v(!1),[V,H]=v(()=>new Set),[U,W]=v(null),G=j.data?.data?.data?.collection,K=G?.contents,q=_(()=>K?K.map(e=>({content_id:e.content_id,id:Number(e.content_id),detail:e,type:Number(e.source_type??0),medias:e.medias,cover_image:e.cover_image})):[],[K]).map(fe),J=_(()=>new Set(q.map(e=>e.id)),[q]),Y=J.size>0&&V.size===J.size;G?.cover_image,G?.content_count,G?.is_subscribe;let{mutateAsync:pe,isPending:me}=u(async e=>await o({collection_id:C,subscribe:e})),{mutateAsync:he,isPending:ge}=u(async e=>await a({collection_id:C,content_id:e})),{mutateAsync:_e,isPending:X}=u(async e=>await i({collection_id:e})),{mutateAsync:ve,isPending:Z}=u(async e=>await s({app_id:0,user_id:D,folder_id:C,content_type:1,content_ids:e})),Q=P.data?.data;Q?.avatar,Q?.nick_name;let ye=N&&G?.is_default===!1;function be(e){W({kind:`content`,id:e.id,type:e.type,title:e.title,isCollected:!0}),I(!0)}function xe(){if(N){R(!0);return}W({kind:`collection`,id:C}),I(!0)}function Se(){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}if(!N){x.error(w(`detail.operationFailed`));return}R(!1),H(new Set),B(!0)}function Ce(){H(new Set),B(!1)}function we(e){H(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function Te(){if(Y){H(new Set);return}H(new Set(J))}async function Ee(){if(!(V.size===0||Z)){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}try{let e=await ve(Array.from(V));if(e.code===0){x.success(w(`detail.uncollectSuccess`)),A([`collection-detail`,C]),A([`user-profile`,`mine`]),A([`user-profile`,`profile`,M]),H(new Set),B(!1);return}x.error(e.message||w(`detail.uncollectFailed`))}catch(e){console.error(`批量取消收藏失败`,e),x.error(w(`detail.operationFailed`))}}}function De(e){if(typeof window>`u`)return``;if(e.kind===`collection`)return`${window.location.origin}/collection/${e.id}`;let t=e.title?encodeURIComponent(e.title):`detail`,n=e.type===1?`/video/${e.id}/${t}`:`/post/${e.id}`;return`${window.location.origin}${n}`}function $(e){if(!U)return;let t=De(U);t&&p.showSharePopup({type:e,data:{id:U.id},copyUrl:t})}function Oe(){$(f.WECHAT)}function ke(){$(f.QQ)}function Ae(){$(f.WECHAT_MOMENTS)}function je(){if(!ge){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}!U||U.kind!==`content`||he(U.id).then(e=>{if(e.code===0){x.success(w(`detail.uncollectSuccess`)),A([`collection-detail`,C]),W(e=>e&&{...e,isCollected:!1});return}x.error(e.message||w(`detail.uncollectFailed`))}).catch(e=>{console.error(`取消收藏失败`,e),x.error(w(`detail.operationFailed`))})}}function Me(){let e=new URLSearchParams(E.toString());e.set(`id`,C),e.set(`type`,`edit`),T.push(`/collection/create?${e.toString()}`),R(!1),I(!1)}async function Ne(){if(!X){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}if(!ye){x.error(w(`detail.defaultCollectionDeleteNotSupported`));return}try{let e=await _e(C);if(e.code===0){x.success(w(`detail.deleteSuccess`)),A([`collection-detail`,C]),A([`user-profile`,`mine`]),A([`user-profile`,`profile`,M]),R(!1),I(!1),T.back();return}x.error(e.message||w(`detail.deleteFailed`))}catch(e){console.error(`删除合集失败`,e),x.error(w(`detail.operationFailed`))}}}return b(c,{className:`flex flex-col bg-bg1 min-h-screen ${z?`pb-28`:`pb-6`}`,children:[y(m,{title:G?.title??``,rightChild:N?z?y(`button`,{type:`button`,onClick:Ce,className:`px-2 py-1 text-sm text-text1`,children:w(`detail.done`)}):y(`button`,{type:`button`,onClick:xe,className:`p-2`,children:y(h,{})}):void 0}),y(c,{className:`px-4 flex items-start gap-4`,children:b(c,{className:`flex-1 flex flex-col gap-2`,children:[y(c,{className:`flex items-center justify-between`,children:y(l,{className:`text-xl text-text1 font-medium line-clamp-2`,children:G?.title??w(`detail.defaultTitle`)})}),y(c,{className:`text-text2 text-sm`,children:G?.description})]})}),y(c,{className:`px-4 ${z?`pb-20`:``}`,children:y(ae,{loading:j.isLoading,hasMore:!1,emptyText:w(`detail.emptyContent`),className:`divide-y divide-text1/5`,children:q.map(e=>y(g,{...e,onOpenShare:be,isEditMode:z,isSelected:V.has(e.id),onToggleSelection:we},e.id))})}),z&&b(c,{style:{paddingBottom:`calc(12px + env(safe-area-inset-bottom, 0px))`},className:`fixed left-0 right-0 bottom-0 z-10 bg-bg1 border-t border-text1/10 px-4 pt-3 flex items-center justify-between`,children:[b(c,{className:`flex items-center gap-2`,children:[y(ee,{checked:Y,onCheckedChange:Te}),y(l,{className:`text-sm text-text1`,children:w(`detail.selectAll`)})]}),y(e,{className:`rounded-full py-2.5 h-auto px-6.5`,variant:V.size>0?`default`:`outline`,disabled:V.size===0||Z,onClick:Ee,children:w(Z?`detail.deleting`:`detail.delete`)})]}),b(te,{open:L,onOpenChange:R,children:[y(ie,{className:`hidden`,children:w(`detail.collectionManageTitle`)}),y(re,{className:`hidden`,children:w(`detail.collectionManageTitle`)}),b(ne,{className:`z-[2000]`,children:[b(c,{className:`px-4 py-5`,children:[y(l,{className:`text-sm text-text1 text-center font-medium`,children:w(`detail.collectionManageTitle`)}),b(c,{className:`mt-4 border-t border-text1/10`,children:[y(`button`,{className:`w-full text-left py-4 border-b border-text1/10`,onClick:Me,children:y(l,{className:`text-text1`,children:w(`detail.editCollection`)})}),y(`button`,{className:`w-full text-left py-4 border-b border-text1/10`,onClick:Se,children:y(l,{className:`text-text1`,children:w(`detail.manageCollection`)})}),y(`button`,{className:`w-full text-left py-4 ${X?`opacity-60 cursor-not-allowed`:``}`,onClick:Ne,disabled:X,children:y(l,{className:`text-destructive`,children:w(X?`detail.deleting`:`detail.deleteCollection`)})})]})]}),y(e,{className:`w-full h-auto py-4 text-lg text-text1`,size:`lg`,onClick:()=>R(!1),variant:`secondary`,children:w(`detail.cancel`)})]})]}),y(le,{isShowCollect:U?.kind===`content`&&N&&O,isCollected:U?.isCollected,open:F,onOpenChange:I,onShareWeChat:Oe,onShareQQ:ke,onShareMoments:Ae,onUncollect:je})]})}export{E as CollectionDetail};
|
|
@@ -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{pUserUserFeedback as r}from"../../../../service/generated/client.mjs";import{compressImage as i}from"../../../../utils/image-compression.mjs";import{uploadFile as a}from"../../../../utils/upload-file.mjs";import{Image as o}from"../../../ui/image.mjs";import{Box as s}from"../../../ui/box.mjs";import{InputGroup as c,InputGroupAddon as l,InputGroupInput as u,InputGroupTextarea as d}from"../../../ui/input-group.mjs";import{Field as f,FieldLabel as p}from"../../../ui/field.mjs";import{Text as m}from"../../../ui/text.mjs";import{HeaderNav as h}from"../../../common/header-nav/client.mjs";import{AddIcon as g}from"../../../common/icons/add.mjs";import{useRef as _,useState as v}from"react";import{XIcon as y}from"lucide-react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import{toast as S}from"sonner";import{useTranslations as C}from"next-intl";import{useRouter as w}from"next/navigation";const T=new Set([`image/jpeg`,`image/jpg`,`image/png`]),E=new Set([`jpg`,`jpeg`,`png`]);function D(e){let t=e.type.toLowerCase(),n=e.name.split(`.`).pop()?.toLowerCase()||``;return t?T.has(t):E.has(n)}function O({className:T}={}){let E=C(`components.pages.feedback.components`),O=w(),{userId:k}=n(),A=_(null),[j,M]=v({content:``,contact:``}),[N,P]=v([]),[F,I]=v(!1),[L,R]=v(!1),z=!j.content.trim();function B(e,t){M(n=>({...n,[e]:t}))}function V(){L||F||N.length>=3||A.current?.click()}async function H(e){let t=Array.from(e.target.files??[]);if(!t.length)return;let n=3-N.length;if(n<=0){e.target&&(e.target.value=``);return}let r=t.slice(0,n),o=r.filter(D);if(!o.length){S.error(E(`feedbackForm.imageTypeInvalid`)),e.target&&(e.target.value=``);return}o.length!==r.length&&S.error(E(`feedbackForm.imageTypeInvalid`));try{R(!0);let e=[],t=!1;for(let n of o)try{let t=await a(await i(n),1);e.push(t.objectKey)}catch(e){console.error(`上传截图失败`,e),t=!0}e.length&&P(t=>[...t,...e].slice(0,3)),t&&S.error(E(`feedbackForm.screenshotUploadFailed`))}catch(e){console.error(`上传截图失败`,e),S.error(E(`feedbackForm.screenshotUploadFailed`))}finally{R(!1),e.target&&(e.target.value=``)}}function U(e){L||F||P(t=>t.filter((t,n)=>n!==e))}async function W(){let e=j.content.trim(),t=j.contact.trim();if(!e){S.error(E(`feedbackForm.missingFeedback`));return}if(e.length<4){S.error(E(`feedbackForm.contentMinLength`));return}if(!N.length){S.error(E(`feedbackForm.missingScreenshot`));return}if(F)return;let n=S.loading(E(`feedbackForm.loading`));try{I(!0);let i=await r({user_id:k,feedback_content:e,feedback_screenshots:N.length?N:void 0,contact_info:t||void 0});if(i.code===0){M({content:``,contact:``}),P([]),O.push(`/settings`),S.success(E(`feedbackForm.submitsuccess`),{id:n});return}S.error(i.message||E(`feedbackForm.message`),{id:n})}catch(e){console.error(`提交反馈失败`,e),S.error(e.message||E(`feedbackForm.message`),{id:n})}finally{I(!1)}}return x(s,{className:e(`min-h-screen bg-bg2`,T),children:[b(h,{title:E(`feedbackForm.title`),className:`!bg-bg2`,rightChild:b(t,{onClick:W,disabled:F||L||z,children:E(F?`feedbackForm.loading`:`feedbackForm.submit`)})}),x(s,{className:`pb-3`,children:[x(f,{className:`bg-bg2 px-3 border-none`,children:[b(p,{required:!0,children:E(`feedbackForm.label`)}),x(c,{children:[b(d,{className:`!bg-bg1 p-2.5`,maxLength:500,placeholder:E(`feedbackForm.placeholder`),value:j.content,onChange:e=>B(`content`,e.target.value)}),b(l,{className:`!bg-bg1`,align:`block-end`,children:b(`div`,{className:`text-right w-full`,children:x(`span`,{className:`text-xs`,children:[j.content.length,`/500`]})})})]})]}),x(f,{className:`bg-bg2 px-3 border-none`,children:[b(p,{required:!0,children:E(`feedbackForm.screenshotLabel`)}),b(`input`,{ref:A,type:`file`,multiple:!0,accept:`image/jpeg,image/jpg,image/png,.jpg,.jpeg,.png`,className:`hidden`,onChange:H}),x(s,{className:`mt-2 grid grid-cols-3 gap-2`,children:[N.map((e,n)=>x(s,{className:`relative overflow-hidden rounded-lg border border-line1 !bg-bg1 aspect-
|
|
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{pUserUserFeedback as r}from"../../../../service/generated/client.mjs";import{compressImage as i}from"../../../../utils/image-compression.mjs";import{uploadFile as a}from"../../../../utils/upload-file.mjs";import{Image as o}from"../../../ui/image.mjs";import{Box as s}from"../../../ui/box.mjs";import{InputGroup as c,InputGroupAddon as l,InputGroupInput as u,InputGroupTextarea as d}from"../../../ui/input-group.mjs";import{Field as f,FieldLabel as p}from"../../../ui/field.mjs";import{Text as m}from"../../../ui/text.mjs";import{HeaderNav as h}from"../../../common/header-nav/client.mjs";import{AddIcon as g}from"../../../common/icons/add.mjs";import{useRef as _,useState as v}from"react";import{XIcon as y}from"lucide-react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import{toast as S}from"sonner";import{useTranslations as C}from"next-intl";import{useRouter as w}from"next/navigation";const T=new Set([`image/jpeg`,`image/jpg`,`image/png`]),E=new Set([`jpg`,`jpeg`,`png`]);function D(e){let t=e.type.toLowerCase(),n=e.name.split(`.`).pop()?.toLowerCase()||``;return t?T.has(t):E.has(n)}function O({className:T}={}){let E=C(`components.pages.feedback.components`),O=w(),{userId:k}=n(),A=_(null),[j,M]=v({content:``,contact:``}),[N,P]=v([]),[F,I]=v(!1),[L,R]=v(!1),z=!j.content.trim();function B(e,t){M(n=>({...n,[e]:t}))}function V(){L||F||N.length>=3||A.current?.click()}async function H(e){let t=Array.from(e.target.files??[]);if(!t.length)return;let n=3-N.length;if(n<=0){e.target&&(e.target.value=``);return}let r=t.slice(0,n),o=r.filter(D);if(!o.length){S.error(E(`feedbackForm.imageTypeInvalid`)),e.target&&(e.target.value=``);return}o.length!==r.length&&S.error(E(`feedbackForm.imageTypeInvalid`));try{R(!0);let e=[],t=!1;for(let n of o)try{let t=await a(await i(n),1);e.push(t.objectKey)}catch(e){console.error(`上传截图失败`,e),t=!0}e.length&&P(t=>[...t,...e].slice(0,3)),t&&S.error(E(`feedbackForm.screenshotUploadFailed`))}catch(e){console.error(`上传截图失败`,e),S.error(E(`feedbackForm.screenshotUploadFailed`))}finally{R(!1),e.target&&(e.target.value=``)}}function U(e){L||F||P(t=>t.filter((t,n)=>n!==e))}async function W(){let e=j.content.trim(),t=j.contact.trim();if(!e){S.error(E(`feedbackForm.missingFeedback`));return}if(e.length<4){S.error(E(`feedbackForm.contentMinLength`));return}if(!N.length){S.error(E(`feedbackForm.missingScreenshot`));return}if(F)return;let n=S.loading(E(`feedbackForm.loading`));try{I(!0);let i=await r({user_id:k,feedback_content:e,feedback_screenshots:N.length?N:void 0,contact_info:t||void 0});if(i.code===0){M({content:``,contact:``}),P([]),O.push(`/settings`),S.success(E(`feedbackForm.submitsuccess`),{id:n});return}S.error(i.message||E(`feedbackForm.message`),{id:n})}catch(e){console.error(`提交反馈失败`,e),S.error(e.message||E(`feedbackForm.message`),{id:n})}finally{I(!1)}}return x(s,{className:e(`min-h-screen bg-bg2`,T),children:[b(h,{title:E(`feedbackForm.title`),className:`!bg-bg2`,rightChild:b(t,{onClick:W,disabled:F||L||z,children:E(F?`feedbackForm.loading`:`feedbackForm.submit`)})}),x(s,{className:`pb-3`,children:[x(f,{className:`bg-bg2 px-3 border-none`,children:[b(p,{required:!0,children:E(`feedbackForm.label`)}),x(c,{children:[b(d,{className:`!bg-bg1 p-2.5 rounded-md`,maxLength:500,placeholder:E(`feedbackForm.placeholder`),value:j.content,onChange:e=>B(`content`,e.target.value)}),b(l,{className:`!bg-bg1`,align:`block-end`,children:b(`div`,{className:`text-right w-full`,children:x(`span`,{className:`text-xs`,children:[j.content.length,`/500`]})})})]})]}),x(f,{className:`bg-bg2 px-3 border-none`,children:[b(p,{required:!0,children:E(`feedbackForm.screenshotLabel`)}),b(`input`,{ref:A,type:`file`,multiple:!0,accept:`image/jpeg,image/jpg,image/png,.jpg,.jpeg,.png`,className:`hidden`,onChange:H}),x(s,{className:`mt-2 grid grid-cols-3 gap-2`,children:[N.map((e,n)=>x(s,{className:`relative overflow-hidden rounded-lg border border-line1 !bg-bg1 aspect-square`,children:[b(o,{src:e,alt:E(`feedbackForm.alt`),fill:!0,className:`object-cover`}),b(t,{size:`icon-xs`,variant:`secondary`,className:`absolute right-1 top-1 rounded-full bg-bg1/85`,onClick:()=>U(n),"aria-label":E(`feedbackForm.delete`),children:b(y,{})})]},`${e}-${n}`)),N.length<3&&x(s,{className:`flex flex-col aspect-square items-center justify-center gap-2 rounded-lg border border-dashed border-text1/10 !bg-bg1 py-3 text-center`,onClick:V,children:[b(g,{}),b(m,{className:`text-xs text-text3`,children:E(L?`feedbackForm.uploading`:`feedbackForm.addScreenshot`)})]})]})]}),x(f,{className:`bg-bg2 px-3 border-none `,children:[b(p,{children:E(`feedbackForm.contactLabel`)}),b(c,{children:b(u,{className:`!bg-bg1 p-2.5 h-auto rounded-md`,placeholder:E(`feedbackForm.placeholder1_6d0242`),value:j.contact,onChange:e=>B(`contact`,e.target.value)})})]})]})]})}export{O as FeedbackForm};
|
|
@@ -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
|
|
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
|
|
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
|
|
30
|
+
declare function Image(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { BaseImageProps, CommonImageProps, Image
|
|
32
|
+
export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|