@funhub/platform 0.1.46 → 0.1.48
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/dist/assets/icons/search/filter.mjs +2 -0
- package/dist/biz.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/index.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/video-slide.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/schema/index.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/runtime/client.mjs +1 -1
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/runtime/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/material.d.mts +1 -1
- package/dist/components/biz/business/channel-list/schema.d.mts +1 -1
- package/dist/components/biz/business/channel-list/schema.mjs +1 -1
- package/dist/components/biz/business/comment/comment-list.mjs +1 -1
- package/dist/components/biz/business/detail/detail-operate.mjs +1 -1
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs +1 -1
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs +1 -1
- package/dist/components/biz/business/fullscreen-feed/variants/shared/runtime-compat.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/index.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/index.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/post-card/variants/basic-post-card/index.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/shell.d.mts +6 -0
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/client.mjs +1 -1
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/runtime/client.mjs +1 -1
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/runtime/client.mjs +1 -1
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/runtime/client.mjs +1 -1
- package/dist/components/biz/utils/transformers/data.mjs +1 -1
- package/dist/components/common/funhub-provider/funhub-provider.mjs +1 -1
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/feed-series/feed-series-client.mjs +1 -1
- package/dist/components/pages/feed-series/page.mjs +1 -1
- package/dist/components/pages/login/index.mjs +1 -1
- package/dist/components/pages/profile/layout.d.mts +0 -4
- package/dist/components/pages/profile/page.d.mts +1 -1
- package/dist/components/pages/profile/page.mjs +1 -1
- package/dist/components/pages/search-result/index.d.mts +2 -0
- package/dist/components/pages/search-result/page-client.d.mts +10 -0
- package/dist/components/pages/search-result/page-client.mjs +2 -0
- package/dist/components/pages/search-result/search-all.mjs +2 -0
- package/dist/components/pages/search-result/search-tab.mjs +2 -0
- package/dist/components/pages/search-result/search-user.mjs +2 -0
- package/dist/components/pages/search-result/search-video.mjs +2 -0
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/video-detail/page.mjs +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/components/ui/popover.d.mts +1 -0
- package/dist/components/ui/popover.mjs +1 -1
- package/dist/components/ui/tabs.mjs +1 -1
- package/dist/constants/event-key.mjs +1 -1
- package/dist/pages.d.mts +3 -1
- package/dist/pages.mjs +1 -1
- package/package.json +1 -1
- package/dist/components/biz/business/index.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-container/client.mjs +0 -2
- package/dist/components/pages/profile/layout.mjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
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};
|
|
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,{profileId:r,currentUserId:u,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,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{gUserViewUserInfo as e}from"../../../../../service/generated/client.mjs";import{profileMainCollectCollectionTabOptions as t,profileMainCollectTabOptions as n,profileMainHistoryTabOptions as r,profileMainLikeTabOptions as i,profileMainMineTabOptions as a,profileMainProfileTabOptions as o}from"./variants.mjs";import{UserProfileMainShell as s}from"./shell.mjs";import{CollectTabServer as c}from"./tabs/collect-tab/server.mjs";import{HistoryTabServer as l}from"./tabs/history-tab/server.mjs";import{LikeTabServer as u}from"./tabs/like-tab/server.mjs";import{jsx as d}from"react/jsx-runtime";function
|
|
2
|
+
import{gUserViewUserInfo as e}from"../../../../../service/generated/client.mjs";import{profileMainCollectCollectionTabOptions as t,profileMainCollectTabOptions as n,profileMainHistoryTabOptions as r,profileMainLikeTabOptions as i,profileMainMineTabOptions as a,profileMainProfileTabOptions as o}from"./variants.mjs";import{UserProfileMainShell as s}from"./shell.mjs";import{CollectTabServer as c}from"./tabs/collect-tab/server.mjs";import{HistoryTabServer as l}from"./tabs/history-tab/server.mjs";import{LikeTabServer as u}from"./tabs/like-tab/server.mjs";import{jsx as d}from"react/jsx-runtime";import{cookies as f}from"next/headers";function p({isMine:e,tab:t}){let n=e?a:o;return t&&n.includes(t)?t:n[0]}function m(e,t,n){return e&&t.includes(e)?e:n}function h(e,t){let n={};if(e&&(n.Authorization=`Bearer ${e}`),t&&(n[`X-User-Id`]=t),Object.keys(n).length!==0)return{headers:n}}async function g({cookieToken:e,cookieUserId:t,token:n,currentUserId:r,authConfig:i}){let a=``,o=``;try{let e=await f();a=e.get(`token`)?.value||``,o=e.get(`userId`)?.value||``}catch{}let s=e||a,c=t||o,l=n||s,u=r||c;return{token:l,currentUserId:u,authConfig:i||h(l,u)}}function _(e,t){return e&&(t===`collect`||t===`like`)}function v(e){let{mode:t=`renderer`,...n}=e;return d(y,{...n,mode:t})}async function y({mode:a=`renderer`,id:o,showCreateAction:f=!1,requireLogin:h=!1,cookieToken:v,cookieUserId:y,className:b,token:x=``,currentUserId:S=``,authConfig:C,tab:w,likeTab:T,historyTab:E,collectTab:D,collectCollectionTab:O}){let k=a===`editor`,A=await g({cookieToken:v,cookieUserId:y,token:x,currentUserId:S,authConfig:C}),j=A.token,M=A.currentUserId,N=A.authConfig,P=!!j,F=o==null||!!M&&o===M,I=!F&&!!o,L=F?M:o?String(o):void 0,R=F?[`user-profile`,`mine`]:[`user-profile`,`profile`,o],z=p({isMine:F,tab:w}),B=`content`;if(h&&F&&!P&&(B=`login-required`),!k&&B===`content`&&_(I,z)){let t=(await e({target_user_id:String(o),user_id:M||String(o)},N))?.data??{},n=Number(t.collections_open??1)>0,r=Number(t.like_open??1)>0;z===`collect`&&!n&&(B=`privacy-collect`),z===`like`&&!r&&(B=`privacy-like`)}let V=k?[]:void 0,H=null;if(B===`content`)switch(z){case`like`:H=d(u,{mode:a,isMine:F,targetUserId:L,queryKeyPrefix:R,resolvedLikeTab:m(T,i,`video`),prefetch:V});break;case`history`:H=d(l,{mode:a,targetUserId:L,queryKeyPrefix:R,resolvedHistoryTab:m(E,r,`video`),authConfig:N,prefetch:V});break;default:H=d(c,{mode:a,isMine:F,userId:L,showCreateAction:f&&F,queryKeyPrefix:R,resolvedCollectTab:m(D,n,`video`),resolvedCollectCollectionTab:m(O,t,`created`),authConfig:N,prefetch:V});break}return d(s,{profileId:o,currentUserId:M,isMine:F,renderMode:B,className:b,children:H})}export{v as UserProfileMain};
|
|
@@ -5,6 +5,10 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
5
5
|
//#region components/biz/business/profile/profile-main/shell.d.ts
|
|
6
6
|
type UserProfileMainRenderMode = 'content' | 'login-required' | 'privacy-collect' | 'privacy-like';
|
|
7
7
|
interface UserProfileMainShellProps extends PropsWithChildren {
|
|
8
|
+
/** 用户 ID。 */
|
|
9
|
+
profileId?: string;
|
|
10
|
+
/** 当前登录用户 ID。 */
|
|
11
|
+
currentUserId?: string;
|
|
8
12
|
/** 是否为本人视角。 */
|
|
9
13
|
isMine: boolean;
|
|
10
14
|
/** 当前内容区渲染模式。 */
|
|
@@ -16,6 +20,8 @@ interface UserProfileMainShellProps extends PropsWithChildren {
|
|
|
16
20
|
* 用户资料主体客户端壳层,仅负责主 Tab 交互与占位渲染。
|
|
17
21
|
*/
|
|
18
22
|
declare function UserProfileMainShell({
|
|
23
|
+
profileId,
|
|
24
|
+
currentUserId,
|
|
19
25
|
isMine,
|
|
20
26
|
renderMode,
|
|
21
27
|
className,
|
|
@@ -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{
|
|
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{Box as r}from"../../../../ui/box.mjs";import{EmptyState as i}from"../../../../ui/empty.mjs";import{Tabs as a,TabsList as o,TabsTrigger as s}from"../../../../ui/tabs.mjs";import{Text as c}from"../../../../ui/text.mjs";import{useLoginModalStore as l}from"../../../../../store/modules/login-modal-store.mjs";import{profileMainMineTabOptions as u,profileMainProfileTabOptions as d}from"./variants.mjs";import{useEffect as f,useMemo as p,useRef as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{useTranslations as _}from"next-intl";import{useRouter as v}from"next/navigation";import{parseAsString as y,useQueryState as b}from"nuqs";function x(e){return e?[...u]:[...d]}function S(e,t){let n=x(t);return n.includes(e)?e:n[0]}function C(e){let t=window.getComputedStyle(e);return/auto|scroll|overlay/.test(t.overflowY)}function w(e){if(typeof window>`u`)return null;let t=e?.parentElement??null;for(;t;){if(C(t))return t;t=t.parentElement}let n=document.getElementById(`app-scroll-container`);return n instanceof HTMLElement?n:null}function T(e){return typeof window>`u`?0:e?e.scrollTop:window.scrollY||window.pageYOffset||0}function E(e,t){if(!(typeof window>`u`)){if(e){e.scrollTo({top:t});return}window.scrollTo({top:t,left:0})}}function D({profileId:u,currentUserId:d,isMine:C,renderMode:D,className:O,children:k}){let A=v(),j=_(`components.pages.profile`),M=m(null),N=m(!1),P=l(e=>e.open),F=l(e=>e.isOpen),I=n(e=>e.isLogin),L=n(e=>e.userId),R=x(C),[z,B]=b(`tab`,y.withDefault(`collect`)),V=p(()=>S(z,C),[C,z]),H=C?d||L||``:u,U=p(()=>`profile-scroll:${H||(C?`mine`:`guest`)}:${V}`,[C,V,H]);f(()=>{z!==V&&B(V,{shallow:!1})},[V,B,z]),f(()=>{if(F&&!I){N.current=!0;return}!F&&N.current&&(N.current=!1,I&&A.refresh())},[F,A,I]),f(()=>{if(typeof window>`u`)return;let e=w(M.current),t=window.sessionStorage.getItem(U),n=t?Number(t):0;Number.isFinite(n)&&n>0&&requestAnimationFrame(()=>{E(e,n)});let r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{window.sessionStorage.setItem(U,String(T(e))),r=!1}))};return e?(e.addEventListener(`scroll`,i,{passive:!0}),()=>{e.removeEventListener(`scroll`,i)}):(window.addEventListener(`scroll`,i,{passive:!0}),()=>{window.removeEventListener(`scroll`,i)})},[U]);let W={collect:j(`client.collect`),like:j(`client.like`),history:j(`client.history`)},G=k;return D===`login-required`?G=g(r,{className:`flex gap-4 flex-col items-center justify-center py-10 text-center`,children:[h(c,{className:`text-base text-text1`,children:j(`client.loginToView`)}),h(t,{size:`lg`,variant:`secondary`,onClick:P,children:j(`client.loginNow`)})]}):D===`privacy-collect`?G=h(i,{type:`no-content`,text:j(`client.collectionNotPublic`)}):D===`privacy-like`&&(G=h(i,{type:`no-content`,text:j(`client.likeNotPublic`)})),g(r,{ref:M,className:e(O),children:[h(r,{className:`border-b bg-bg1 sticky z-10 top-0 border-text1/5 h-10`,children:h(a,{value:V,onValueChange:e=>{B(e,{shallow:!1})},className:`w-fit`,children:h(o,{variant:`default`,className:`inline-flex h-9`,children:R.map(e=>h(s,{value:e,className:`p-2.5 !text-base !w-fit data-active:!text-lg data-active:font-bold`,children:W[e]},e))})})}),h(r,{className:`p-2`,children:G})]})}export{D as UserProfileMainShell};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{useUserStore as t}from"../../../../../../../store/modules/user-store.mjs";import{pInteractionCheckFollow as n}from"../../../../../../../service/generated/client.mjs";import{pxToVw as r}from"../../../../../../../utils/helper.mjs";import{Avatar as i,AvatarFallback as a,AvatarImage as o}from"../../../../../../ui/avatar.mjs";import{Box as s}from"../../../../../../ui/box.mjs";import{Text as c}from"../../../../../../ui/text.mjs";import l from"../../../../../../ui/link.mjs";import{useRequest as u}from"../../../../../../../hooks/query/use-query.mjs";import
|
|
2
|
+
"use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{useUserStore as t}from"../../../../../../../store/modules/user-store.mjs";import{pInteractionCheckFollow as n}from"../../../../../../../service/generated/client.mjs";import{pxToVw as r}from"../../../../../../../utils/helper.mjs";import{Avatar as i,AvatarFallback as a,AvatarImage as o}from"../../../../../../ui/avatar.mjs";import{Box as s}from"../../../../../../ui/box.mjs";import{Text as c}from"../../../../../../ui/text.mjs";import l from"../../../../../../ui/link.mjs";import{useRequest as u}from"../../../../../../../hooks/query/use-query.mjs";import d from"../../../../../../../assets/icons/follow_nor.mjs";import f from"../../../../../../../assets/icons/follow_sel.mjs";import{defaultProps as p}from"../defaults/default-props.mjs";import{RecommendedUsersSkeleton as m}from"./recommended-users-skeleton.mjs";import{useEffect as h,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";const x={},S={list:[]};function C({props:C=x,styles:w,data:T=S}){function E(e){let t=new Set;return e.filter(e=>e.user_id?t.has(e.user_id)?!1:(t.add(e.user_id),!0):!0)}let D={...p,...C},{userId:O,isLogin:k}=t(),{title:A,avatarSize:j,followButtonSize:M,itemGap:N,listPadding:P,nameFontSize:F}=D,[I,L]=v(()=>E(T.list||[])),R=_(T.list),z=g(()=>I.map(e=>e.user_id).filter(Boolean),[I]),B=g(()=>z.join(`,`),[z]),{data:V}=u(g(()=>[`recommended-users`,`follow-status`,O,B],[B,O]),()=>n({follower_id:O,followee_ids:z}),{staleTime:0,enabled:!!k&&!!O&&z.length>0}),H=!!V?.data?.is_following_map;h(()=>{R.current!==T.list&&(R.current=T.list,L(E(T.list||[])))},[T.list]),h(()=>{let e=V?.data?.is_following_map;!e||Object.keys(e).length===0||L(t=>t.filter(e=>e.user_id?!(k&&O&&e.user_id===O):!0).map(t=>!t.user_id||e[t.user_id]===void 0?t:{...t,isFollow:!!e[t.user_id]}))},[V?.data?.is_following_map,k,O]);let U=w?e(w,{}):void 0,W=M+12;return b(s,{style:U,className:`mb-[16px]`,children:[y(c,{as:`h2`,className:`text-[18px] font-bold text-text1 mb-[8px] px-[12px] pt-[16px]`,children:A}),I&&I.length>0?y(s,{className:`overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,style:{scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitOverflowScrolling:`touch`},children:y(s,{className:`flex h-[62px]`,style:{paddingLeft:r(P),gap:r(N)},children:I.map((e,t)=>b(l,{href:`/profile/${e.user_id}`,className:`flex flex-col items-center shrink-0`,style:{paddingRight:t===I.length-1?r(P):0},children:[b(s,{className:`relative flex flex-col items-center`,children:[b(i,{size:`lg`,children:[e.avatar?y(o,{src:e.avatar,alt:e.nick_name}):null,y(a,{})]}),y(s,{className:`absolute`,style:{width:r(W),height:r(W),bottom:`-${r(W/2)}`,border:`${r(6)} solid rgba(255,255,255,0)`,boxSizing:`border-box`,borderRadius:`9999px`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:k?H?1:.6:1},children:k&&H&&e.isFollow?y(f,{width:M,height:M}):y(d,{width:M,height:M})})]}),y(c,{className:`text-center mt-[8px] text-text1 whitespace-nowrap overflow-hidden text-ellipsis`,style:{fontSize:r(F),maxWidth:r(j+20)},title:e.nick_name,children:e.nick_name})]},e.user_id||`user-${t}`))})}):y(m,{avatarSize:j,followButtonSize:M,itemGap:N,listPadding:P,nameFontSize:F,itemCount:7})]})}export{C as default};
|
package/dist/components/biz/business/search-bar/variants/basic-search-bar/runtime/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import
|
|
2
|
+
"use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import i from"../../../../../basics/search/variants/basic-search/index.mjs";import{defaultProps as a}from"../defaults/default-props.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=a.gap}={...a,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...x},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(i,{props:h,events:{onClick:b}})]})}export{u as default};
|
package/dist/components/biz/business/search-bar/variants/filter-search-bar/runtime/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import
|
|
2
|
+
"use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import i from"../../../../../basics/search/variants/filter-search/index.mjs";import{defaultProps as a}from"../defaults/default-props.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=a.gap}={...a,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...x},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(i,{props:h,events:{onClick:b}})]})}export{u as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import
|
|
2
|
+
"use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import i from"../../../../../basics/search/variants/tag-search/index.mjs";import{defaultProps as a}from"../defaults/default-props.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=a.gap}={...a,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=(e,t)=>{f?.onTagClick?.(e,t)},S=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...S},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(i,{props:h,events:{onClick:b,onTagClick:x}})]})}export{u as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{
|
|
2
|
+
import e from"../../business/banner/variants/basic-banner/runtime/client.mjs";import{schema as t}from"../../business/banner/variants/basic-banner/schema/index.mjs";import n from"../../business/feature-grid/variants/basic-feature-grid/runtime/client.mjs";import{schema as r}from"../../business/feature-grid/variants/basic-feature-grid/schema/index.mjs";import i from"../../business/fullscreen-feed/variants/fullscreen-post-feed/runtime/client.mjs";import{schema as a}from"../../business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import o from"../../business/fullscreen-feed/variants/fullscreen-video-feed/runtime/client.mjs";import{schema as s}from"../../business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import c from"../../business/home-recommend/variants/home-recommend-grid/runtime/client.mjs";import{schema as l}from"../../business/home-recommend/variants/home-recommend-grid/schema/index.mjs";import u from"../../business/home-recommend/variants/home-recommend-waterfall/runtime/client.mjs";import{schema as d}from"../../business/home-recommend/variants/home-recommend-waterfall/schema/index.mjs";import f from"../../business/post-card/variants/basic-post-card/runtime/client.mjs";import{schema as p}from"../../business/post-card/variants/basic-post-card/schema/index.mjs";import m from"../../business/recommended-users/variants/basic-recommended-users/runtime/client.mjs";import{schema as h}from"../../business/recommended-users/variants/basic-recommended-users/schema/index.mjs";let g=function(e){return e[e.Banner=1]=`Banner`,e[e.CardGrid=2]=`CardGrid`,e[e.FeatureGrid=3]=`FeatureGrid`,e[e.RecommendedUsers=4]=`RecommendedUsers`,e}({});const _={[g.Banner]:{schemaName:`BasicBannerSchema`,componentName:`BasicBanner`},[g.FeatureGrid]:{schemaName:`BasicFeatureGridSchema`,componentName:`BasicFeatureGrid`},[g.RecommendedUsers]:{schemaName:`BasicRecommendedUsersSchema`,componentName:`BasicRecommendedUsers`}},v={1:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},2:{schemaName:`HomeRecommendWaterfallSchema`,componentName:`HomeRecommendWaterfall`},3:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},4:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},5:{schemaName:`HomeRecommendWaterfallSchema`,componentName:`HomeRecommendWaterfall`},6:{schemaName:`FullscreenVideoFeedSchema`,componentName:`FullscreenVideoClient`}},y={schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},b={6:{schemaName:`FullscreenPostFeedSchema`,componentName:`FullscreenFeedClient`}},x={schemaName:`BasicPostCardSchema`,componentName:`BasicPostCard`},S={BasicBannerSchema:t,BasicFeatureGridSchema:r,BasicPostCardSchema:p,BasicRecommendedUsersSchema:h,FullscreenPostFeedSchema:a,FullscreenVideoFeedSchema:s,HomeRecommendGridSchema:l,HomeRecommendWaterfallSchema:d},C={BasicBanner:e,BasicFeatureGrid:n,BasicPostCard:f,BasicRecommendedUsers:m,FullscreenFeedClient:i,FullscreenVideoClient:o,HomeRecommendGrid:c,HomeRecommendWaterfall:u};function w(e,t){return e.type===g.CardGrid?t?v[e.show_style]??y:b[e.show_style]??x:_[e.type]}function T(e,t){let n=w(e,t),r=S[n.schemaName];if(!r)return console.warn(`[extractDataByComponentType] 未找到 Schema: ${n.schemaName}`),null;let i=C[n.componentName];if(!i)return console.warn(`[extractDataByComponentType] 未找到组件: ${n.componentName}`),null;let a=r.dataSchema?.dataBinding?.field;if(!a)return console.warn(`[extractDataByComponentType] Schema ${n.schemaName} 缺少 dataBinding.field`),null;let o=e.data?.[a],s=Array.isArray(o)?o:[],c={component:i,data:{title:e.cn_name,list:s,icons:e.data?.icons??[],block_id:String(e.id??``),channel_id:String(e.channel_id??``),show_style:e.show_style}};return e.data?.cursor&&(c.data.cursor=String(e.data?.cursor??``)),e.show_style===6&&(c.data.bottom=56,c.data.top=42),c}function E(e,t){return!Array.isArray(e)||e.length===0?[]:e.map(e=>T(e,t)).filter(e=>e!==null)}export{g as ComponentType,E as extractDataByComponentType};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gUserGetUserInfo as t}from"../../../service/generated/client.mjs";import{Toaster as n}from"../../ui/sonner.mjs";import{useRequest as r}from"../../../hooks/query/use-query.mjs";import{MediaPreview as i}from"../media-preview/index.mjs";import{CollectionPopupHost as a}from"../collection-popup/index.mjs";import{IntlProvider as o}from"../intl-provider/intl-provider.mjs";import{BlockedDialog as s}from"../blocked-dialog/blocked-dialog.mjs";import{LoginDialog as c}from"../login-dialog/login-dialog.mjs";import{useEffect as l,useRef as u,useState as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import{
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gUserGetUserInfo as t}from"../../../service/generated/client.mjs";import{Toaster as n}from"../../ui/sonner.mjs";import{useRequest as r}from"../../../hooks/query/use-query.mjs";import{MediaPreview as i}from"../media-preview/index.mjs";import{CollectionPopupHost as a}from"../collection-popup/index.mjs";import{IntlProvider as o}from"../intl-provider/intl-provider.mjs";import{BlockedDialog as s}from"../blocked-dialog/blocked-dialog.mjs";import{LoginDialog as c}from"../login-dialog/login-dialog.mjs";import{useEffect as l,useRef as u,useState as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import{useRouter as h}from"next/navigation";import{QueryClient as g,QueryClientProvider as _}from"@tanstack/react-query";import{NuqsAdapter as v}from"nuqs/adapters/next/app";function y(){let{userId:n,setUserInfo:i}=e(),a={code:0,message:``,data:{}},{data:o}=r([`user-init`,n],()=>n?t({user_id:n}):Promise.resolve(a),{enabled:!!n});return l(()=>{if(!n)return;let e=o?.data;e&&i(e)},[i,n,o]),null}function b(t){let{queryClient:r,intl:b,children:x}=t,[S]=d(()=>new g),C=r??S,w=h(),T=e(e=>e.isLogin&&!!e.token&&!!e.userId),E=u(T);l(()=>{E.current&&!T&&(C.clear(),w.refresh()),E.current=T},[T,C,w]);let D=m(f,{children:[p(y,{}),x,p(s,{}),p(c,{}),p(a,{}),p(n,{position:`top-center`}),p(i,{})]});return p(_,{client:C,children:p(v,{children:p(o,{...b,children:D})})})}export{b as FunhubProvider};
|
|
@@ -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,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
|
|
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{useLoginModalStore as oe}from"../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as se,useMutation as u,useRequest as d,useUpdateRequest as ce}from"../../../hooks/query/use-query.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}=oe(),A=se();ce();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{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{useFollowIdsState as t}from"../../../store/modules/follow-ids-store.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetAppChannels as r,gContentGetVideoDetail as i}from"../../../service/generated/client.mjs";import{
|
|
2
|
+
"use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{useFollowIdsState as t}from"../../../store/modules/follow-ids-store.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetAppChannels as r,gContentGetVideoDetail as i}from"../../../service/generated/client.mjs";import{useLoginModalStore as a}from"../../../store/modules/login-modal-store.mjs";import{useRequest as o}from"../../../hooks/query/use-query.mjs";import{queryKey as s}from"../../../constants/query-key.mjs";import{useKeepAliveState as c}from"../../common/keep-scroll-position/index.mjs";import{batchQueryContentInteractions as l}from"../../../hooks/use-content-operate.mjs";import u from"../../biz/basics/fullscreen-feed/runtime/client.mjs";import ee from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{SeriesEpisodes as d}from"../../common/series-episodes/index.mjs";import{useCallback as f,useEffect as te,useLayoutEffect as p,useMemo as m,useRef as ne,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import{useTranslations as y}from"next-intl";function b(e,t){return(e||[]).map((e,n)=>({id:e.id||`${t||`episode`}-${n+1}`,name:e.name||String(n+1),preview_m3u8_url:e.preview_m3u8_url||e.preview_m3u8url||``,m3u8_url:e.m3u8_url||e.m3u8url||``}))}function x(e,t,n){let r=e.id||``,i=t||r,a=b(e.links,i),o=e.static,s=e.score===void 0||e.score===null?void 0:Number(e.score),c=e.duration===void 0||e.duration===null?void 0:Number(e.duration),l={id:i,mid:i,name:e.name||``,img_x:e.img_x||``,img_y:e.img_y||``,img_type:e.img_type||``,cat_id:e.cat_id||``,cat_name:e.cat_name||``,status:e.status||``,status_text:e.status_text||``,show_at:e.show_at||``,tags:[],update_status:e.update_status||``,description:e.description||``,language:e.language||``,director:e.director||``,issue_date:e.issue_date||``,actor:e.actor||``,up_user:e.up_user||``,money:e.money||``,source_username:e.source_username||``,task_id:e.task_id||``,file_status:e.file_status||``,score:Number.isFinite(s)?s:void 0,duration:Number.isFinite(c)?c:void 0,episode_cnt:a.length||0,links:[],static:{browse_cnt:Number(o?.browse_cnt||0),collect_cnt:Number(o?.collect_cnt||0),comment_cnt:Number(e.comment_count??o?.comment_cnt??0),like_cnt:Number(o?.like_cnt||0),share_cnt:Number(o?.share_cnt||0),dislike_cnt:Number(o?.dislike_cnt||0)},type:e.type??e.content_type,author:{avatar:``,user_id:``,nick_name:``,user_name:``,is_verified:!1}};if(a.length===0)return{seriesTitle:l.name,seriesList:[],contents:[{...l,links:[]}]};let u=a.map((e,t)=>{let r=e.id||`${i||`episode`}-${t+1}`,o=n(t+1),s=[e,...a.filter(t=>t.id!==e.id)];return{...l,id:r,mid:i,episode_name:o,links:s}});return{seriesTitle:l.name,seriesList:a,contents:u}}function S({params:b,initialContents:S}){let C=y(`components.pages.feedSeries`),w=y(`components.common.seriesEpisodes`),{locale:T,seriesId:E,episodeNum:D=`1`}=b,{userInfo:re,isLogin:O}=n(),{followIds:ie,setFollowIds:k}=t(),A=m(()=>S??[],[S]),[j,M]=h({}),{data:ae}=o([s.CHANNEL],()=>r()),oe=e(ae?.data),N=m(()=>`feed-series:${T||`default`}:${E}`,[T,E]),se=m(()=>{let e=Number.parseInt(D??`1`,10);return Number.isNaN(e)?0:Math.max(0,e-1)},[D]),[P,ce]=c(`${N}-active-index`,se),[le,ue]=c(`${N}-user-interacted`,!1),[de,fe]=c(`${N}-series-title-toggle`,!1),[F,I]=h(!1),L=ne(null),[R,z]=h(0),B=_(`div`,{ref:L,className:`fixed top-0 left-0 right-0 z-40`,children:_(ee,{data:{list:oe}})});p(()=>{let e=L.current;if(!e)return;let t=()=>{z(Math.max(0,Math.round(e.getBoundingClientRect().height)))};t();let n=new ResizeObserver(()=>t());return n.observe(e),()=>{n.disconnect()}},[]);let{data:V,isFetching:H}=o(m(()=>[`feed-series-detail`,E],[E]),async()=>E?await i({id:E}):null,{enabled:!!E&&A.length===0}),U=m(()=>V?.data?.video,[V]),W=m(()=>U?x(U,E,e=>w(`episodeLabel`,{episode:e})):null,[U,E,w]),G=m(()=>A.length>0?A:W?.contents??[],[W?.contents,A]),K=m(()=>Object.keys(j).length===0?G:G.map(e=>{let t=j[e.id];return t?{...e,...t,static:t.static?{...e.static,...t.static}:e.static,author:t.author?{...e.author,...t.author}:e.author}:e}),[G,j]),q=W?.seriesTitle??(A[0]?.name||``),J=W?.seriesList??[],{data:Y}=o(m(()=>[`feed-series-interactions`,E,O],[O,E]),async()=>await l([E],1),{enabled:!!O&&!!E}),X=m(()=>Y?.interaction_list,[Y]);te(()=>{if(!X||X.length===0)return;let e=X.find(e=>e.content_id===E)||X[0];e&&M(t=>{let n=!1,r={...t};for(let t of G){let i=r[t.id],a={...i,is_liked:e.is_liked||!1,is_dislike:e.is_disliked??e.is_dislike??!1,is_collected:e.is_collected||!1,is_followed:e.is_followed||!1};(!i||i.is_liked!==a.is_liked||i.is_dislike!==a.is_dislike||i.is_collected!==a.is_collected||i.is_followed!==a.is_followed)&&(n=!0,r[t.id]=a)}return n?r:t})},[X,G,E]);let Z=f(({})=>{},[]),pe=f(()=>{a.getState().open()},[]),me=f((e,t)=>{let n=t.is_liked!==void 0||t.is_dislike!==void 0||t.is_collected!==void 0||t.is_followed!==void 0||t.static?.like_cnt!==void 0||t.static?.dislike_cnt!==void 0||t.static?.collect_cnt!==void 0||t.static?.comment_cnt!==void 0;M(r=>{if(!n)return{...r,[e]:{...r[e],...t,static:t.static?{...r[e]?.static,...t.static}:r[e]?.static,author:t.author?{...r[e]?.author,...t.author}:r[e]?.author}};let i=!1,a={...r};for(let e of G){let n=e.id,r=a[n],o=t.static?{...r?.static||{},...t.static}:r?.static,s=t.author?{...r?.author||{},...t.author}:r?.author,c={...r,...t,static:o,author:s},l=!1;if(t.is_liked!==void 0&&r?.is_liked!==t.is_liked&&(l=!0),t.is_dislike!==void 0&&r?.is_dislike!==t.is_dislike&&(l=!0),t.is_collected!==void 0&&r?.is_collected!==t.is_collected&&(l=!0),t.is_followed!==void 0&&r?.is_followed!==t.is_followed&&(l=!0),t.static){let e=r?.static||{};t.static.like_cnt!==void 0&&e.like_cnt!==t.static.like_cnt&&(l=!0),t.static.dislike_cnt!==void 0&&e.dislike_cnt!==t.static.dislike_cnt&&(l=!0),t.static.collect_cnt!==void 0&&e.collect_cnt!==t.static.collect_cnt&&(l=!0),t.static.comment_cnt!==void 0&&e.comment_cnt!==t.static.comment_cnt&&(l=!0)}if(t.author&&r?.author){let e=r.author,n=t.author;for(let t of Object.keys(n))if(e?.[t]!==n[t]){l=!0;break}}l&&(i=!0,a[n]=c)}return i?a:r})},[G]),Q=f((e,t)=>{ce(e),Z({episodeId:E,episodeNum:e+1,mode:t===`jump`?`replace`:`push`})},[Z,E]),he=f(()=>({showSeriesButton:!0,seriesTitle:q,seriesText:`${P+1}/${J.length||K.length}`,onSeriesClick:()=>I(!0)}),[P,K.length,J.length,q]),$=m(()=>K[P]?.links?.[0]?.id||``,[P,K]);return E?H&&G.length===0?v(g,{children:[B,v(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:[C(`feedSeriesClient.episodeLoading`),`...`]})]}):!H&&G.length===0?v(g,{children:[B,_(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:C(`feedSeriesClient.noEpisodes`)})]}):v(g,{children:[B,_(u,{items:K,activeIndex:P,top:R,videoConfig:{loop:!1,autoNext:!0},userInteracted:le,onUserInteracted:()=>ue(!0),onActiveIndexChange:Q,onDataUpdate:me,getNavigationInfo:he,currentUserId:re.userId||void 0,followIds:ie,onFollowIdsChange:k,commentContentId:E,onRequireLogin:pe,activeEpisodeId:$}),F&&_(d,{mode:`selector`,variant:`sheet`,open:F,title:C(`feedSeriesClient.episodeSelectorTitle`),updateStatus:U?.update_status,seriesList:J,activeEpisodeId:$,showEpisodeTitle:de,onToggleTitle:fe,onClose:()=>I(!1),onSelectEpisode:(e,t)=>{I(!1),Q(Math.max(0,t-1),`jump`)}})]}):v(g,{children:[B,v(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:[C(`feedSeriesClient.missingEpisode`),` `,`ID`]})]})}export{S as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{
|
|
2
|
+
import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{normalizeEpisodeNumber as t,warmupProcessM3u8Auto as n}from"../../common/video-player/process-m3u8-cache.mjs";import{HydrationBoundary as r}from"../../../hooks/query/hydration-boundary.mjs";import{defaultLocale as i,isValidLocale as a,resolveLocaleByPriority as o,resolveLocaleFromAcceptLanguage as s}from"../../../i18n.mjs";import{getTranslator as c}from"../../../i18n/translator.mjs";import l from"./feed-series-client.mjs";import{Suspense as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{cookies as p,headers as m}from"next/headers";function h(e){return a(e)?e:i}function g(e){return c(e)(`components.pages.feedSeries.page.videoLoading`)}function _({loadingText:e}){return f(`div`,{className:`relative h-screen w-full overflow-hidden bg-black text-white`,children:[d(`div`,{className:`absolute inset-0 bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.14),rgba(0,0,0,0.9)_55%)]`}),d(`div`,{className:`absolute left-0 top-0 z-20 w-full px-4 pt-[max(env(safe-area-inset-top),14px)]`,children:d(`div`,{className:`h-10 w-full animate-pulse rounded-full bg-white/15`})}),d(`div`,{className:`pointer-events-none absolute inset-0 z-10 flex items-center justify-center`,children:f(`div`,{className:`relative flex h-[92px] w-[92px] items-center justify-center`,children:[d(`span`,{className:`absolute h-[68px] w-[68px] rounded-full bg-black/55 backdrop-blur-sm`}),d(`span`,{className:`h-10 w-10 animate-spin rounded-full border-[3px] border-white/25 border-t-white`})]})}),d(`div`,{className:`pointer-events-none absolute left-0 right-0 top-[calc(50%+62px)] z-10 text-center text-xs text-white/70`,children:e}),f(`div`,{className:`absolute right-3 bottom-10 z-20 flex flex-col items-center gap-4`,children:[d(`div`,{className:`h-12 w-12 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`})]}),f(`div`,{className:`absolute bottom-0 left-0 right-[56px] z-20 p-4`,children:[d(`div`,{className:`mb-3 h-5 w-[120px] animate-pulse rounded bg-white/20`}),d(`div`,{className:`mb-2 h-4 w-[75%] animate-pulse rounded bg-white/15`}),d(`div`,{className:`mb-4 h-4 w-[58%] animate-pulse rounded bg-white/15`}),d(`div`,{className:`h-10 w-full animate-pulse rounded-lg bg-white/20`})]})]})}async function v(i){let a=i?.params||{},o=a.seriesId||``,s=t(a.episodeNum,1),c=[];if(o){let t=await e({id:o});n(t?.data?.video?.links,s),c.push({queryKey:[`feed-series-detail`,o],queryFn:()=>Promise.resolve(t)})}return d(r,{prefetch:c,children:d(l,{...i})})}async function y(e){let t=await p(),n=await m();return d(u,{fallback:d(_,{loadingText:g(h(o(t.get(`NEXT_LOCALE`)?.value,s(n.get(`accept-language`)),i)))}),children:d(v,{...e})})}export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{hashPassword as e}from"../../../utils/common.mjs";import{pUserLogin as t}from"../../../service/generated/client.mjs";import{Box as n}from"../../ui/box.mjs";import{
|
|
2
|
+
"use client";import{hashPassword as e}from"../../../utils/common.mjs";import{pUserLogin as t}from"../../../service/generated/client.mjs";import{Box as n}from"../../ui/box.mjs";import{useLoginModalStore as r}from"../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as i}from"../../../hooks/query/use-query.mjs";import{useSetAuthFields as a}from"../../../hooks/use-auth.mjs";import{Forgot as o}from"./forgot.mjs";import{LoginClient as s}from"./login-client.mjs";import{Password as c}from"./password.mjs";import{Register as l}from"./register.mjs";import{ResetPassword as u}from"./reset-password.mjs";import{Verify as d}from"./verify.mjs";import{useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{toast as h}from"sonner";import{useTranslations as g}from"next-intl";function _(_){let{initialStep:v=`login`}=_,{close:y,resolveLogin:b}=r(),[x,S]=f(v),[C,w]=f(``),T=a(),[E,D]=f(``),O=i(),k=g(`components.pages.login`);return m(n,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col fixed top-0 left-0 right-0 bottom-0 z-50`,children:[x===`login`&&p(s,{onRegister:()=>S(`register`),onForgotPassword:()=>S(`forgot`),errorText:E,onSubmit:async n=>{D(``);try{let r=e(n.password),{data:i}=await t({email:n.email,password:r});T({token:i.token,expireTime:i.expire_time,userId:i.user_id}),h.success(k(`index.loginSuccess`)),O([`user-profile`,`mine`]),b(!0)}catch(e){D(e.message??k(`index.loginFailed`))}},onClose:()=>{y()}}),x===`register`&&p(l,{onLogin:()=>S(`login`),onClose:()=>S(`login`),onVerify:e=>{w(e),S(`verify`)}}),x===`forgot`&&p(o,{onLogin:()=>S(`login`),onClose:()=>S(`login`),onVerify:e=>{w(e),S(`verify`)}}),x===`reset-password`&&p(u,{onClose:()=>{y()},onPassword:e=>{w(e??``),S(`password`)}}),x===`verify`&&p(d,{email:C,onClose:()=>S(`register`),onPassword:e=>{w(e),S(`password`)}}),x===`password`&&p(c,{email:C,onClose:()=>S(`verify`)})]})}export{_ as Login};
|
|
@@ -24,10 +24,6 @@ interface UserProfilePageProps {
|
|
|
24
24
|
collectTab?: string;
|
|
25
25
|
/** 收藏合集 Tab */
|
|
26
26
|
collectCollectionTab?: string;
|
|
27
|
-
/** 服务端透传的登录 Token。 */
|
|
28
|
-
cookieToken?: string;
|
|
29
|
-
/** 服务端透传的当前用户 ID。 */
|
|
30
|
-
cookieUserId?: string;
|
|
31
27
|
}
|
|
32
28
|
//#endregion
|
|
33
29
|
export { UserProfilePageProps };
|
|
@@ -10,6 +10,6 @@ interface UserProfilePageComponentProps extends UserProfilePageProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* 用户资料页服务端组件。
|
|
12
12
|
*/
|
|
13
|
-
declare function UserProfilePage(props: UserProfilePageComponentProps):
|
|
13
|
+
declare function UserProfilePage(props: UserProfilePageComponentProps): react_jsx_runtime0.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { UserProfilePage };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{UserProfileHeader as e}from"../../biz/business/profile/profile-header/server.mjs";import{UserProfileMain as t}from"../../biz/business/profile/profile-main/server.mjs";import{
|
|
2
|
+
import{UserProfileHeader as e}from"../../biz/business/profile/profile-header/server.mjs";import{UserProfileMain as t}from"../../biz/business/profile/profile-main/server.mjs";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{id:o,showCreateAction:s,showBackButton:c,requireLogin:l,tab:u,likeTab:d,historyTab:f,collectTab:p,collectCollectionTab:m}=a;return i(n,{children:[r(e,{id:o,showBackButton:c,requireLogin:l}),r(t,{id:o,showCreateAction:s,requireLogin:l,tab:u,likeTab:d,historyTab:f,collectTab:p,collectCollectionTab:m})]})}export{a as UserProfilePage};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region components/pages/search-result/page-client.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* 搜索结果页
|
|
7
|
+
*/
|
|
8
|
+
declare function SearchResultPageClient(): react_jsx_runtime0.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SearchResultPageClient };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{Box as r}from"../../ui/box.mjs";import{eventKey as i}from"../../../constants/event-key.mjs";import{useSearchHistory as a}from"../../../hooks/use-search-history.mjs";import o from"../search/top-header.mjs";import s from"./search-user.mjs";import c from"./search-video.mjs";import l from"./search-all.mjs";import{SORT_OPTIONS as u,SearchTab as d}from"./search-tab.mjs";import{useEffect as f,useMemo as p,useState as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useSearchParams as v}from"next/navigation";const y=[{label:`综合`,value:`all`},{label:`视频`,value:`video`},{label:`用户`,value:`user`}];function b(){let{userInfo:b}=n(),x=b?.user_id||`guest`,S=v().get(`q`)?.toString()||``,C=S?decodeURIComponent(S):``,[w,T]=m(C),[E]=m(C),[D]=m(0),[O,k]=m(y[0].value),[A,j]=m(u[0].value),[,M]=m([]),{addHistory:N}=a({storageKey:x}),P=p(()=>w.trim()!==``,[w]);return f(()=>(t.on(i.EXCHANGE_SEARCH_TYPE,k),()=>{t.off(i.EXCHANGE_SEARCH_TYPE,k)}),[k]),_(r,{className:`w-full min-h-screen bg-bg1 pb-[12px] overscroll-y-none`,children:[g(o,{setSearchInputVal:t=>{t!==w&&(M([]),T(t),e({q:t}))},initInputVal:E,initInputVersion:D,addSearchHistory:N}),g(d,{searchType:O,tabList:y,onChange:e=>{k(e),M([])},sort:A,onSortChange:j}),P&&_(h,{children:[O===`user`&&g(s,{mode:`user`,inputVal:w}),O===`all`&&g(l,{searchInputVal:w,sort:A}),O===`video`&&g(c,{searchType:O,inputVal:w})]}),!P&&g(r,{className:`w-full pt-[12px]`})]})}export{b as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{gContentGetRecommendVideoList as e}from"../../../service/generated/client.mjs";import{gContentGetRecommendVideoListKey as t}from"../../../service/generated/tanstack.mjs";import{Box as n}from"../../ui/box.mjs";import{List as r}from"../../ui/list.mjs";import{useRequest as i}from"../../../hooks/query/use-query.mjs";import a from"./search-user.mjs";import o from"./search-video.mjs";import{useMemo as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{useTranslations as u}from"next-intl";function d(e,t=1){return JSON.stringify({type:1,keywords:e,sort:t})}function f({searchInputVal:f,sort:p}){let m=u(`components.pages.search.searchResult`),h=s(()=>d(f,p),[f,p]),{data:g,isFetching:_}=i(t({data_type:2,extra_params:h,page:1,page_size:10}),async()=>(await e({data_type:2,extra_params:h,page:1,page_size:10})).data??{}),v=s(()=>g?.videos?.list??[],[g]),y=s(()=>g?.users?.list??[],[g]);return v.length===0&&y.length===0&&!_?c(n,{className:`w-full pt-[12px]`,children:c(r,{loading:_,empty:`nodata`,emptyText:m(`searchAll.emptyResult`)})}):l(n,{className:`w-full pt-[12px]`,children:[y.length>0&&c(a,{mode:`all`,list:y}),c(o,{list:v})]})}export{f as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{Box as t}from"../../ui/box.mjs";import{Popover as n,PopoverContent as r,PopoverTrigger as i}from"../../ui/popover.mjs";import{Text as a}from"../../ui/text.mjs";import o from"../../../assets/icons/search/filter.mjs";import{memo as s,useState as c}from"react";import{ChevronUpIcon as l}from"lucide-react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";const p=[{label:`综合`,value:1},{label:`最新`,value:2},{label:`最热`,value:3}],m=s(({searchType:s,onChange:m,tabList:h,sort:g,onSortChange:_})=>{let[v,y]=c(!1);return f(u,{children:[f(t,{as:`nav`,className:`w-full h-[42px] bg-bg1 flex items-center justify-between px-[3px] fixed top-[55px] left-0 right-0 z-40`,children:[d(t,{className:`flex items-center`,children:h.map(e=>d(a,{className:`h-[30px] rounded-[15px] leading-[30px] px-[9px] text-[16px] bg-transparent transition-all duration-150 ${s===e.value?`text-theme5 !text-[20px] font-bold`:`text-text2`}`,onClick:()=>{s!==e.value&&m(e.value)},children:e.label},e.value))}),f(n,{open:v,onOpenChange:y,children:[d(i,{"aria-label":`排序筛选`,className:`shrink-0 w-7 h-7 rounded-[min(var(--radius-md),12px)] inline-flex items-center justify-center`,children:d(o,{className:`w-[16px] h-[16px]`})}),f(r,{side:`bottom`,align:`end`,className:`w-[100vw] bg-muted`,children:[d(a,{as:`p`,className:`text-[14px] font-medium text-text1 mb-[12px]`,children:`排序方式`}),f(t,{className:`flex flex-col gap-[8px]`,children:[d(t,{className:`flex justify-between gap-[8px]`,children:p.map(t=>d(e,{variant:g===t.value?`default`:`outline`,size:`sm`,className:`w-[100px]`,onClick:()=>{_(t.value),y(!1)},children:t.label},t.value))}),f(e,{variant:`ghost`,size:`sm`,className:`w-full justify-center gap-[4px] text-text2`,onClick:()=>y(!1),children:[d(l,{className:`w-[14px] h-[14px]`}),`收起`]})]})]})]})]}),d(t,{className:`w-full h-[42px]`})]})});m.displayName=`SearchTab`;export{p as SORT_OPTIONS,m as SearchTab};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetRecommendVideoList as r}from"../../../service/generated/client.mjs";import{Image as i}from"../../ui/image.mjs";import{Box as a}from"../../ui/box.mjs";import{Item as o}from"../../ui/item.mjs";import{List as s}from"../../ui/list.mjs";import{Skeleton as c}from"../../ui/skeleton.mjs";import{Text as l}from"../../ui/text.mjs";import{usePaginated as u,useUpdateRequest as d}from"../../../hooks/query/use-query.mjs";import{useRequireLogin as f}from"../../../hooks/use-auth.mjs";import{eventKey as p}from"../../../constants/event-key.mjs";import m from"../../../assets/icons/right_arrow.mjs";import{FollowButton as h}from"../(follow)/_components/follow-button/index.mjs";import{memo as g,useCallback as _,useEffect as v,useMemo as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";import{useTranslations as C}from"next-intl";import w from"next/link";function T(){return x(a,{className:`w-full px-[12px] pt-[12px]`,children:Array.from({length:6}).map((e,t)=>S(a,{className:`w-full h-[56px] flex items-center justify-between mb-[12px]`,children:[S(a,{className:`flex items-center`,children:[x(c,{className:`w-[56px] h-[56px] rounded-[28px]`}),S(a,{className:`ml-[8px]`,children:[x(c,{className:`w-[120px] h-[18px] mb-[8px]`}),x(c,{className:`w-[72px] h-[14px]`})]})]}),x(c,{className:`w-[76px] h-[34px] rounded-[18px]`})]},`search-user-skeleton-${t}`))})}const E=g(({item:e,onUpdate:t})=>{let r=C(`components.pages.search.searchResult`),{userInfo:o}=n(),s=_(n=>{t({...e,is_following:n?1:0})},[e,t]);return S(a,{className:`w-full h-[56px] bg-bg1 flex flex-row items-center justify-between mb-[12px]`,children:[S(w,{className:`cursor-pointer flex flex-row items-center justify-center`,href:`/profile/${e.user_id}`,children:[x(a,{className:`w-[56px] h-[56px] rounded-[28px] overflow-hidden bg-bg2 relative`,children:x(i,{src:e.avatar||``,fill:!0,objectFit:`cover`,alt:e.nick_name})}),S(a,{className:`flex flex-col ml-[8px]`,children:[x(`span`,{className:`text-text1 text-[16px] leading-[24px] h-[24px] font-bold overflow-hidden max-w-[200px] line-clamp-1`,children:e.nick_name}),S(`span`,{className:`text-text2 leading-[22px] text-[14px]`,children:[e.follower_count??0,r(`searchUser.followersSuffix`)]})]})]}),o.user_id!==e.user_id&&x(h,{userId:e.user_id,hasFollow:!!e.is_following,onChange:s})]})});E.displayName=`UserItem`;const D=g(({list:n})=>{C(`components.pages.search.searchResult`);let r=f(),[i,o]=b({});v(()=>{o({})},[n]);let s=_(e=>{e.user_id&&o(t=>({...t,[e.user_id]:e.is_following?1:0}))},[]),c=y(()=>n.slice(0,3).map(e=>{let t=e.user_id||``;return!t||i[t]===void 0?e:{...e,is_following:i[t]}}),[i,n,3]),u=n.length>3,d=_(()=>{t.emit(p.EXCHANGE_SEARCH_TYPE,`user`)},[]);return c.length===0?null:S(a,{className:`w-full pt-[12px]`,children:[x(a,{className:`px-[12px]`,children:c.map((e,t)=>x(E,{item:e,onUpdate:e=>{r(()=>s(e))}},String(e.user_id??t)))}),u&&x(a,{className:`w-full flex items-center justify-center`,children:S(e,{variant:`ghost`,className:`w-fit h-[46px] leading-[46px] mx-auto mt-[-12px] text-[14px] text-text2`,onClick:d,children:[x(l,{as:`span`,children:`查看更多`}),x(m,{className:`w-[12px] h-[12px]`})]})})]})});D.displayName=`SearchUserWithLimit`;const O=g(({inputVal:e})=>{let t=C(`components.pages.search.searchResult`),n=f(),i=_(async t=>await r({data_type:2,extra_params:JSON.stringify({type:4,keywords:e}),page:t||1,page_size:20}),[e]),c=y(()=>[`searchByKeyForUser`,e,4],[e]),l=u({key:c,initialPageParam:1,async queryFn(e){return(await i(e))?.data?.users??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),p=d(),m=_((e,t)=>{e&&p(c,n=>n&&{...n,pages:n.pages.map(n=>({...n,list:(n.list??[]).map(n=>n.user_id===e?{...n,is_following:t?1:0}:n)}))})},[p,c]),h=async e=>{if(e)try{await l.fetchNextPage()}catch(e){console.error(`获取用户列表失败`,e)}},g=(l?.data?.pages??[]).flatMap(e=>e.list??[]),v=!!(l?.isPending||l?.isFetching);return v&&g.length===0?x(T,{}):x(a,{className:`w-full px-[12px] pt-[12px]`,children:x(s,{loading:v,hasMore:l?.hasNextPage??!1,loadMore:h,empty:`nodata`,emptyText:t(`searchUser.emptyResult`),children:g.map((e,t)=>x(o,{children:x(E,{item:e,onUpdate:e=>{n(()=>{m(e.user_id||``,!!e.is_following)})}})},String(e.user_id??t)))})})});O.displayName=`SearchUserWithPagination`;const k=g(e=>e.mode===`all`?x(D,{list:e.list??[]}):x(O,{inputVal:e.inputVal??``}));k.displayName=`SearchUser`;export{k as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{gContentGetRecommendVideoList as t}from"../../../service/generated/client.mjs";import{Image as n}from"../../ui/image.mjs";import{Box as r}from"../../ui/box.mjs";import{EmptyState as i}from"../../ui/empty.mjs";import{Text as a}from"../../ui/text.mjs";import{usePaginated as o}from"../../../hooks/query/use-query.mjs";import{getPostDetailPagePath as s}from"../../../utils/tools.mjs";import{apiCollectCustom as c}from"../../../utils/api-collect.mjs";import{VideoListItemSkeleton as l}from"../../common/skeleton/video-list-item-skeleton.mjs";import{useCardDecoration as u}from"../../../hooks/use-card-decoration.mjs";import d from"../../ui/rate.mjs";import{memo as f,useCallback as p,useMemo as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{useTranslations as _}from"next-intl";import v from"next/link";const y=f(()=>h(r,{className:`w-full px-[12px] pt-[12px]`,children:Array.from({length:3}).map((e,t)=>h(l,{},`search-video-skeleton-${t}`))}));y.displayName=`SearchVideoListSkeleton`;const b=f(({item:e})=>{let{getCalculationScore:t}=u();return g(v,{className:`w-full flex items-center justify-between mb-[12px] pb-[12px] border-b border-line1 cursor-pointer px-[12px]`,href:s({id:e.video_id,contentType:0}),onClick:()=>{e.video_id},children:[h(r,{className:`w-[76px] h-[102px] shrink-0 rounded-[8px] overflow-hidden relative bg-bg2`,children:h(n,{src:e.img_y||e.img_x||``,fill:!0,objectFit:`cover`,alt:e.name||``})}),g(r,{className:`flex-1 min-w-0 flex flex-col ml-[12px]`,children:[h(`span`,{className:`leading-[26px] text-text1 text-[18px] font-bold max-w-[200px] line-clamp-1 mb-[4px]`,children:e.name||``}),g(r,{className:`flex items-center`,style:{transform:`scale(0.6)`,transformOrigin:`left center`},children:[h(d,{allowHalf:!0,value:t({score:String(e.score??0)})}),h(`span`,{className:`ml-[8px] text-[24px] text-[#F59E0B] font-bold leading-[24px]`,children:e.score?(Number(e.score)/10).toFixed(1):0})]}),g(r,{className:`w-full mt-[4px] flex items-center shrink-0 pr-[12px]`,children:[h(r,{className:`w-fit h-[20px] leading-[20px] px-[6px] text-text3 text-[12px] bg-line1 rounded-[4px] shrink-0 mr-[10px]`,children:e.group_name}),h(`span`,{className:`text-text2 text-[14px] leading-[22px] flex-1 min-w-0 line-clamp-1`,children:e.description})]})]})]})});b.displayName=`VideoItem`;const x=f(({list:e})=>h(r,{className:`w-full px-[12px] pt-[12px]`,children:e.map((e,t)=>h(b,{item:e},String(e.video_id??t)))}));x.displayName=`VideoListContent`;const S=f(({searchType:n,inputVal:s})=>{let c=_(`components.pages.search.searchResult`),l=p(async e=>await t({data_type:2,extra_params:JSON.stringify({type:n===`video`?3:2,keywords:s}),page:e||1,page_size:20}),[s,n]),u=o({key:m(()=>[`searchByKeyForVideoInfo`,s,n===`video`?3:2],[s,n]),initialPageParam:1,async queryFn(e){return(await l(e))?.data?.videos??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),d=m(()=>{let e=u.data?.pages??[],t=[];for(let n of e){let e=n.list??[];t.push(...e)}return t},[u.data?.pages]),f=u.isPending||u.isFetching,v=f&&d.length===0,b=async e=>{if(e!==!1)try{await u.fetchNextPage()}catch(e){console.error(`获取内容列表失败`,e)}};return v?h(y,{}):d.length===0?h(i,{type:`no-content`,text:c(`searchVideoInfo.noRelevantContent`),className:`mt-[12px]`}):g(r,{className:`w-full`,children:[h(x,{list:d}),u.hasNextPage&&h(r,{className:`w-full px-[12px] py-[12px] flex justify-center`,children:h(e,{variant:`ghost`,size:`sm`,onClick:()=>b(),disabled:f,children:h(a,{as:`span`,children:c(f?`searchVideoSearch.loading`:`searchVideoSearch.loadMore`)})})})]})});S.displayName=`SearchVideoWithFetch`;const C=f(e=>`list`in e&&e.list!==void 0?h(x,{list:e.list}):h(S,{searchType:e.searchType,inputVal:e.inputVal}));C.displayName=`SearchVideo`;export{C as default};
|
|
@@ -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{AlertDialog as n,AlertDialogAction as r,AlertDialogCancel as i,AlertDialogContent as a,AlertDialogDescription as ee,AlertDialogFooter as o,AlertDialogHeader as s}from"../../../ui/alert-dialog.mjs";import{useUserStore as c}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as l,pUserUserPrivacySettings as u}from"../../../../service/generated/client.mjs";import{Box as d}from"../../../ui/box.mjs";import{List as f}from"../../../ui/list.mjs";import{Switch as p}from"../../../ui/switch.mjs";import{
|
|
2
|
+
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{Button as t}from"../../../ui/button.mjs";import{AlertDialog as n,AlertDialogAction as r,AlertDialogCancel as i,AlertDialogContent as a,AlertDialogDescription as ee,AlertDialogFooter as o,AlertDialogHeader as s}from"../../../ui/alert-dialog.mjs";import{useUserStore as c}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as l,pUserUserPrivacySettings as u}from"../../../../service/generated/client.mjs";import{Box as d}from"../../../ui/box.mjs";import{List as f}from"../../../ui/list.mjs";import{Switch as p}from"../../../ui/switch.mjs";import{useLoginModalStore as m}from"../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as h,useRequest as g}from"../../../../hooks/query/use-query.mjs";import{locales as _,persistLocalePreference as v}from"../../../../i18n.mjs";import{HeaderNav as y}from"../../../common/header-nav/client.mjs";import{ResetPasswordDrawer as b}from"./reset-password-drawer.mjs";import{useEffect as x,useRef as S,useState as C}from"react";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{useLocale as te,useTranslations as E}from"next-intl";import ne from"next/link";function D(e){return{collection:Number(e?.collections_open??0)>0,follower:Number(e?.follower_open??0)>0,following:Number(e?.following_open??0)>0,like:Number(e?.like_open??0)>0}}function O(e){return{collections_open:e.collection?1:0,follower_open:e.follower?1:0,following_open:e.following?1:0,like_open:e.like?1:0}}function k({className:k}={}){let A=E(`components.pages.settings.components`),j=te(),{open:M}=m(),N=c(e=>e.isLogin),P=c(e=>e.token),F=c(e=>e.logout),I=c(e=>e.userId),L=(N||!!P)&&!!I,R=D(),[z,B]=C(R),V=S(R),[H,U]=C(!1),[W,G]=C(!1),K=h(),q=[`user-privacy-settings`,I],J=j===`zh-CN`?`en`:`zh-CN`,Y=_.find(e=>e.code===J)?.name||J,{data:X}=g(q,()=>l({user_id:I}),{enabled:!!I}),Z=X?.data;x(()=>{if(!Z)return;let e=D(Z);B(e),V.current=e},[Z]),x(()=>{V.current=z},[z]);async function re(e){let t=await u({user_id:I,...O(e)});if(t.code!==0)throw Error(t.message||`隐私设置更新失败`);K(q)}async function Q(e,t){let n=V.current,r={...n,[e]:t};B(r);try{await re(r)}catch(e){console.error(`update settings failed:`,e),B(n)}}let ie=h();function ae(){ie([`user-profile`,`mine`]),F(),window.location.href=`/user/mine`}function oe(e){G(e)}function se(){G(!0)}function ce(){G(!1)}function le(){G(!1),ae()}function $(e){U(e)}function ue(){if(!L){M();return}U(!0)}function de(e){L||(e.preventDefault(),e.stopPropagation(),M())}function fe(){v(J),window.location.reload()}function pe(e){Q(`collection`,e)}function me(e){Q(`like`,e)}function he(e){Q(`following`,e)}function ge(e){Q(`follower`,e)}return T(d,{className:e(k),children:[w(y,{className:`!bg-bg2`,title:A(`settings.title`)}),w(b,{open:H,onOpenChange:$}),T(d,{className:`flex flex-col gap-2 `,children:[w(f,{className:`bg-bg2 py-2`,children:w(ne,{href:`/feedback`,onClick:de,children:w(f.Item,{title:A(`settings.feedbackTitle`),arrow:!0})})}),w(f,{className:`bg-bg2 py-2`,children:w(f.Item,{title:A(`settings.resetPasswordTitle`),arrow:!0,onClick:ue})}),w(f,{className:`bg-bg2 py-2`,children:w(f.Item,{title:A(`settings.languageTitle`),extra:T(t,{size:`sm`,variant:`outline`,onClick:fe,children:[A(`settings.switchTo`),` `,Y]})})}),L?T(f,{className:`bg-bg2 py-2`,children:[w(f.Item,{title:A(`settings.privacySettingsTitle`),extra:T(`span`,{className:`text-xs`,children:[A(`settings.whenOff`),`,`,A(`settings.listPrivateHint`)]})}),w(f.Item,{className:`pl-8 mt-2`,title:A(`settings.collectionsTitle`),extra:w(p,{checked:z.collection,onCheckedChange:pe})}),w(f.Item,{className:`pl-8`,title:A(`settings.like`),extra:w(p,{checked:z.like,onCheckedChange:me})}),w(f.Item,{className:`pl-8`,title:A(`settings.follow`),extra:w(p,{checked:z.following,onCheckedChange:he})}),w(f.Item,{className:`pl-8`,title:A(`settings.followersTitle`),extra:w(p,{checked:z.follower,onCheckedChange:ge})})]}):null]}),H||!L?null:w(d,{className:`fixed bottom-0 w-full left-0`,children:w(t,{className:`h-auto text-base py-4 w-full`,variant:`secondary`,onClick:se,children:A(`settings.button`)})}),w(n,{open:W,onOpenChange:oe,children:T(a,{size:`sm`,children:[w(s,{children:w(ee,{children:A(`settings.logoutConfirmMessage`)})}),T(o,{children:[w(i,{onClick:ce,children:A(`settings.cancel`)}),w(r,{onClick:le,children:A(`settings.confirm`)})]})]})})]})}export{k as Settings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{
|
|
2
|
+
import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{normalizeEpisodeNumber as t,warmupProcessM3u8Auto as n}from"../../common/video-player/process-m3u8-cache.mjs";import{HydrationBoundary as r}from"../../../hooks/query/hydration-boundary.mjs";import{revalidate as i}from"../../../constants/revalidate.mjs";import{DetailStructuredData as a}from"../../biz/business/detail/detail-structured-data.mjs";import o from"./video-detail-client.mjs";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";async function u({params:u,isWebView:d=!1,materialConfig:f}){let{level:p}=await u,m=p?.[0]||``,h=p.findIndex(e=>e===`episode`),g=t(h>=0?p?.[h+1]:void 0,1),_=null,v=null;if(m){_=await e({id:m},{revalidate:i.TIME});let t=_?.data?.video;t&&typeof t==`object`&&(await n(t.links,g),v={...t,mid:t.mid||t.id||``,content_type:0,episode_cnt:t.links?.length||0})}return l(s,{children:[v&&c(a,{information:v,detailId:m}),c(r,{prefetch:m&&_?[{queryKey:[`video-detail`,m],queryFn:()=>Promise.resolve(_)}]:[],children:c(o,{detailId:m,isWebView:d,materialConfig:f})})]})}export{u as default};
|
|
@@ -6,7 +6,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
|
|
|
6
6
|
//#region components/ui/badge.d.ts
|
|
7
7
|
/** badgeVariants 工具定义。 */
|
|
8
8
|
declare const badgeVariants: (props?: ({
|
|
9
|
-
variant?: "
|
|
9
|
+
variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
11
|
/** Badge 组件。 */
|
|
12
12
|
declare function Badge({
|
|
@@ -7,7 +7,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
|
|
|
7
7
|
//#region components/ui/button.d.ts
|
|
8
8
|
/** buttonVariants 工具定义。 */
|
|
9
9
|
declare const buttonVariants: (props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
11
11
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
12
12
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
13
13
|
/** Button 组件属性。 */
|
|
@@ -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 Image 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 Image>, '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(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare function Image$1(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|
|
32
|
+
export { BaseImageProps, CommonImageProps, Image$1 as Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../utils/cn.mjs";import"react";import{jsx as t}from"react/jsx-runtime";import{Popover as n}from"@base-ui/react/popover";function r({...e}){return t(n.Root,{"data-slot":`popover`,...e})}function i({...e}){return t(n.Trigger,{"data-slot":`popover-trigger`,...e})}function a({className:r,align:i=`center`,alignOffset:a=0,side:o=`bottom`,sideOffset:s=4,...
|
|
2
|
+
"use client";import{cn as e}from"../../utils/cn.mjs";import"react";import{jsx as t}from"react/jsx-runtime";import{Popover as n}from"@base-ui/react/popover";function r({...e}){return t(n.Root,{"data-slot":`popover`,...e})}function i({...e}){return t(n.Trigger,{"data-slot":`popover-trigger`,...e})}function a({className:r,align:i=`center`,alignOffset:a=0,side:o=`bottom`,sideOffset:s=4,style:c,...l}){let u={"--tw-ring-offset-shadow":`0 0 #0000`,"--tw-ring-shadow":`0 0 #0000`};return t(n.Portal,{children:t(n.Positioner,{align:i,alignOffset:a,side:o,sideOffset:s,className:`isolate z-50`,children:t(n.Popup,{"data-slot":`popover-content`,className:e(`bg-popover text-popover-foreground data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95 data-[open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-center ring-foreground/10 flex flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 z-50 w-72 outline-none`,r),style:{...u,...c},...l})})})}function o({className:n,...r}){return t(`div`,{"data-slot":`popover-header`,className:e(`flex flex-col gap-0.5 text-sm`,n),...r})}function s({className:r,...i}){return t(n.Title,{"data-slot":`popover-title`,className:e(`font-medium`,r),...i})}function c({className:r,...i}){return t(n.Description,{"data-slot":`popover-description`,className:e(`text-muted-foreground`,r),...i})}export{r as Popover,a as PopoverContent,c as PopoverDescription,o as PopoverHeader,s as PopoverTitle,i as PopoverTrigger};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../utils/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";import{Tabs as r}from"@base-ui/react/tabs";function i({className:n,orientation:i=`horizontal`,...a}){return t(r.Root,{"data-slot":`tabs`,"data-orientation":i,className:e(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,n),...a})}const a=n(`group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,{variants:{variant:{default:` gap-2 rounded-none bg-transparent p-0 group-data-[orientation=horizontal]/tabs:h-10`,tag:`gap-2 rounded-none bg-transparent p-0 group-data-[orientation=horizontal]/tabs:h-8`,segment:`gap-1 rounded-sm bg-bg2 p-1 group-data-[orientation=horizontal]/tabs:h-8`}},defaultVariants:{variant:`default`}});function o({className:n,variant:i=`default`,...o}){return t(r.List,{"data-slot":`tabs-list`,"data-variant":i,className:e(a({variant:i}),n),...o})}function s({className:n,...i}){return t(r.Tab,{"data-slot":`tabs-trigger`,className:e(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-sm font-medium leading-none transition-all focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='w-']):not([class*='h-'])]:w-4 [&_svg:not([class*='w-']):not([class*='h-'])]:h-4`,`group-data-[variant=default]:pb-1`,`text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground`,`group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start`,`group-data-[variant=default]/tabs-list:h-full group-data-[variant=default]/tabs-list:px-3 group-data-[variant=default]/tabs-list:py-2 group-data-[variant=default]/tabs-list:data-[active]:text-foreground`,`group-data-[variant=tag]/tabs-list:rounded-md group-data-[variant=tag]/tabs-list:px-3 group-data-[variant=tag]/tabs-list:py-1`,`group-data-[variant=tag]/tabs-list:data-[active]:bg-theme5 group-data-[variant=tag]/tabs-list:data-[active]:text-white`,`group-data-[variant=segment]/tabs-list:rounded-sm group-data-[variant=segment]/tabs-list:px-3 group-data-[variant=segment]/tabs-list:py-1`,`group-data-[variant=segment]/tabs-list:text-xs group-data-[variant=segment]/tabs-list:text-text3 group-data-[variant=segment]/tabs-list:data-[active]:bg-text1/10 group-data-[variant=segment]/tabs-list:data-[active]:text-text1`,`
|
|
2
|
+
"use client";import{cn as e}from"../../utils/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";import{Tabs as r}from"@base-ui/react/tabs";function i({className:n,orientation:i=`horizontal`,...a}){return t(r.Root,{"data-slot":`tabs`,"data-orientation":i,className:e(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,n),...a})}const a=n(`group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,{variants:{variant:{default:` gap-2 rounded-none bg-transparent p-0 group-data-[orientation=horizontal]/tabs:h-10`,tag:`gap-2 rounded-none bg-transparent p-0 group-data-[orientation=horizontal]/tabs:h-8`,segment:`gap-1 rounded-sm bg-bg2 p-1 group-data-[orientation=horizontal]/tabs:h-8`}},defaultVariants:{variant:`default`}});function o({className:n,variant:i=`default`,...o}){return t(r.List,{"data-slot":`tabs-list`,"data-variant":i,className:e(a({variant:i}),n),...o})}function s({className:n,...i}){return t(r.Tab,{"data-slot":`tabs-trigger`,className:e(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-sm font-medium leading-none transition-all focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='w-']):not([class*='h-'])]:w-4 [&_svg:not([class*='w-']):not([class*='h-'])]:h-4`,`group-data-[variant=default]:pb-1`,`text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground`,`group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start`,`group-data-[variant=default]/tabs-list:h-full group-data-[variant=default]/tabs-list:px-3 group-data-[variant=default]/tabs-list:py-2 group-data-[variant=default]/tabs-list:data-[active]:text-foreground`,`group-data-[variant=tag]/tabs-list:rounded-md group-data-[variant=tag]/tabs-list:px-3 group-data-[variant=tag]/tabs-list:py-1`,`group-data-[variant=tag]/tabs-list:data-[active]:bg-theme5 group-data-[variant=tag]/tabs-list:data-[active]:text-white`,`group-data-[variant=segment]/tabs-list:rounded-sm group-data-[variant=segment]/tabs-list:px-3 group-data-[variant=segment]/tabs-list:py-1`,`group-data-[variant=segment]/tabs-list:text-xs group-data-[variant=segment]/tabs-list:text-text3 group-data-[variant=segment]/tabs-list:data-[active]:bg-text1/10 group-data-[variant=segment]/tabs-list:data-[active]:text-text1`,`group-data-[orientation=horizontal]/tabs:after:h-0.5`,`group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5`,`group-data-[variant=default]/tabs-list:after:w-12 group-data-[variant=default]/tabs-list:after:left-1/2 group-data-[variant=default]/tabs-list:after:-translate-x-1/2 group-data-[variant=default]/tabs-list:data-[active]:after:opacity-100`,`group-data-[variant=tag]/tabs-list:after:hidden group-data-[variant=segment]/tabs-list:after:hidden`,`after:absolute after:!bottom-0 after:opacity-0 after:transition-opacity after:bg-text1`,n),...i})}function c({className:n,...i}){return t(r.Panel,{"data-slot":`tabs-content`,className:e(`text-sm flex-1 outline-none`,n),...i})}export{i as Tabs,c as TabsContent,o as TabsList,s as TabsTrigger,a as tabsListVariants};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
const e={ITEM_INFO_CHANGE:`ITEM_INFO_CHANGE`,DOCUMENT_CLICK:`DOCUMENT_CLICK`,DOCUMENT_TOUCH:`DOCUMENT_TOUCH`,DOCUMENT_SCROLL:`DOCUMENT_SCROLL`,SHOW_LOGIN_POPUP:`SHOW_LOGIN_POPUP`,WAIT_LOADING_SHOW:`WAIT_LOADING_SHOW`,SHOW_POPUP_VIDEO:`SHOW_POPUP_VIDEO`,EXCHANGE_SEARCH_TYPE:`EXCHANGE_SEARCH_TYPE`,CHANNEL_LIST_CHANGE:`CHANNEL_LIST_CHANGE`,USER_INFO_LOAD_COMPLETE:`USER_INFO_LOAD_COMPLETE`,SEARCH_HISTORY_UPDATE:`SEARCH_HISTORY_UPDATE`};export{e as eventKey};
|
|
2
|
+
const e={ITEM_INFO_CHANGE:`ITEM_INFO_CHANGE`,DOCUMENT_CLICK:`DOCUMENT_CLICK`,DOCUMENT_TOUCH:`DOCUMENT_TOUCH`,DOCUMENT_SCROLL:`DOCUMENT_SCROLL`,SHOW_LOGIN_POPUP:`SHOW_LOGIN_POPUP`,WAIT_LOADING_SHOW:`WAIT_LOADING_SHOW`,SHOW_POPUP_VIDEO:`SHOW_POPUP_VIDEO`,EXCHANGE_SEARCH_TYPE:`EXCHANGE_SEARCH_TYPE`,EXCHANGE_SEARCH_SORT:`EXCHANGE_SEARCH_SORT`,CHANNEL_LIST_CHANGE:`CHANNEL_LIST_CHANGE`,USER_INFO_LOAD_COMPLETE:`USER_INFO_LOAD_COMPLETE`,SEARCH_HISTORY_UPDATE:`SEARCH_HISTORY_UPDATE`};export{e as eventKey};
|
package/dist/pages.d.mts
CHANGED
|
@@ -16,10 +16,12 @@ import { UserProfilePage } from "./components/pages/profile/index.mjs";
|
|
|
16
16
|
import { PublishPage } from "./components/pages/publish/page.mjs";
|
|
17
17
|
import "./components/pages/publish/index.mjs";
|
|
18
18
|
import { SearchPage } from "./components/pages/search/index.mjs";
|
|
19
|
+
import { SearchResultPageClient } from "./components/pages/search-result/page-client.mjs";
|
|
20
|
+
import "./components/pages/search-result/index.mjs";
|
|
19
21
|
import { SettingsPage } from "./components/pages/settings/index.mjs";
|
|
20
22
|
import { UserFollowPage } from "./components/pages/user-follow/index.mjs";
|
|
21
23
|
import { VideoDetailMaterialConfig } from "./components/pages/video-detail/video-detail-client.mjs";
|
|
22
24
|
import { VideoDetailPage } from "./components/pages/video-detail/page.mjs";
|
|
23
25
|
import "./components/pages/video-detail/index.mjs";
|
|
24
26
|
import { VideoListPage } from "./components/pages/video-list/index.mjs";
|
|
25
|
-
export { CollectionAddPage, CollectionCreatePage, CollectionDetailPage, EditPage, FansPage, FeedSeriesPage, FeedbackPage, FollowedPage, FullscreenFeedPage, HomePage, PostDetailPage, PublishPage, SearchPage, SettingsPage, UserFollowPage, UserProfilePage, type VideoDetailMaterialConfig, VideoDetailPage, VideoListPage };
|
|
27
|
+
export { CollectionAddPage, CollectionCreatePage, CollectionDetailPage, EditPage, FansPage, FeedSeriesPage, FeedbackPage, FollowedPage, FullscreenFeedPage, HomePage, PostDetailPage, PublishPage, SearchPage, SearchResultPageClient as SearchResultPage, SettingsPage, UserFollowPage, UserProfilePage, type VideoDetailMaterialConfig, VideoDetailPage, VideoListPage };
|
package/dist/pages.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{FansPage as e}from"./components/pages/(follow)/fans/index.mjs";import{FollowedPage as t}from"./components/pages/(follow)/followed/index.mjs";import{CollectionAddPage as n}from"./components/pages/collection-add/index.mjs";import{CollectionCreatePage as r}from"./components/pages/collection-create/index.mjs";import{CollectionDetailPage as i}from"./components/pages/collection-detail/index.mjs";import{EditPage as a}from"./components/pages/edit/index.mjs";import o from"./components/pages/feed-series/page.mjs";import{FeedbackPage as s}from"./components/pages/feedback/index.mjs";import{FullscreenFeedPage as c}from"./components/pages/fullscreen-feed/index.mjs";import{HomePage as l}from"./components/pages/home/index.mjs";import u from"./components/pages/post-detail/page.mjs";import{UserProfilePage as d}from"./components/pages/profile/index.mjs";import f from"./components/pages/publish/page.mjs";import{SearchPage as p}from"./components/pages/search/index.mjs";import{SettingsPage as
|
|
2
|
+
import{FansPage as e}from"./components/pages/(follow)/fans/index.mjs";import{FollowedPage as t}from"./components/pages/(follow)/followed/index.mjs";import{CollectionAddPage as n}from"./components/pages/collection-add/index.mjs";import{CollectionCreatePage as r}from"./components/pages/collection-create/index.mjs";import{CollectionDetailPage as i}from"./components/pages/collection-detail/index.mjs";import{EditPage as a}from"./components/pages/edit/index.mjs";import o from"./components/pages/feed-series/page.mjs";import{FeedbackPage as s}from"./components/pages/feedback/index.mjs";import{FullscreenFeedPage as c}from"./components/pages/fullscreen-feed/index.mjs";import{HomePage as l}from"./components/pages/home/index.mjs";import u from"./components/pages/post-detail/page.mjs";import{UserProfilePage as d}from"./components/pages/profile/index.mjs";import f from"./components/pages/publish/page.mjs";import{SearchPage as p}from"./components/pages/search/index.mjs";import m from"./components/pages/search-result/page-client.mjs";import{SettingsPage as h}from"./components/pages/settings/index.mjs";import{UserFollowPage as g}from"./components/pages/user-follow/index.mjs";import _ from"./components/pages/video-detail/page.mjs";import{VideoListPage as v}from"./components/pages/video-list/index.mjs";export{n as CollectionAddPage,r as CollectionCreatePage,i as CollectionDetailPage,a as EditPage,e as FansPage,o as FeedSeriesPage,s as FeedbackPage,t as FollowedPage,c as FullscreenFeedPage,l as HomePage,u as PostDetailPage,f as PublishPage,p as SearchPage,m as SearchResultPage,h as SettingsPage,g as UserFollowPage,d as UserProfilePage,_ as VideoDetailPage,v as VideoListPage};
|