@funhub/platform 0.1.154 → 0.1.156
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/marquee-enter.mjs +2 -0
- package/dist/assets/images/marquee.mjs +1 -1
- package/dist/components/biz/basics/search/shared/components/search-box.mjs +1 -1
- package/dist/components/biz/basics/search/variants/basic-search/runtime/client.mjs +1 -1
- package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
- package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/marquee/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/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-history/client.mjs +1 -1
- package/dist/components/common/image-crop-modal/image-crop-modal.mjs +2 -2
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/pages/publish/components/upload-progress.mjs +1 -1
- package/dist/components/pages/search/hot-recommend.mjs +1 -1
- package/dist/components/pages/search/style.module.mjs +3 -31
- package/dist/components/pages/search/top-header.mjs +1 -1
- package/dist/components/pages/search-result/search-all.mjs +1 -1
- package/dist/components/pages/search-result/search-tab.mjs +1 -1
- package/dist/components/pages/search-result/search-user.mjs +1 -1
- package/dist/components/pages/search-result/search-video.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/pages/video-list/index.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.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/item.mjs +1 -1
- package/dist/components/ui/loading.d.mts +42 -0
- package/dist/pages.mjs +1 -1
- package/dist/ui.d.mts +2 -2
- package/dist/ui.mjs +1 -1
- package/dist/utils/image-crop.mjs +1 -1
- package/dist/utils/tools.mjs +1 -1
- package/package.json +28 -28
- package/dist/components/common/image-crop/image-crop.mjs +0 -2
- package/dist/components/common/image-crop/show-image-crop.mjs +0 -2
- package/dist/components/ui/dots-loading.d.mts +0 -25
- package/dist/components/ui/dots-loading.mjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gCommunityGetHotContentList as t,gContentGetHotVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gCommunityGetHotContentList as t,gContentGetHotVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{Text as a}from"../../ui/text.mjs";import{Skeleton as o}from"../../ui/skeleton.mjs";import{useRequest as s}from"../../../hooks/query/use-query.mjs";import{getPostDetailPagePath as c}from"../../../utils/tools.mjs";import l from"../../common/at-element/index.mjs";import{useCardDecoration as u}from"../../../hooks/use-card-decoration.mjs";import d from"../../ui/rate.mjs";import f from"./style.module.mjs";import{memo as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useTranslations as g}from"next-intl";import _ from"next/link";const v=p(({list:e})=>{let t=g(`components.pages.search`),{getCalculationScore:n}=u();return e.length===0?m(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(254,201,207,0.5) 0%, rgba(254,201,207,0.1) 100%)`,borderColor:`rgba(255,119,131,0.2)`},children:h(i,{children:[m(a,{className:`leading-[26px] block text-theme5 text-[18px] font-bold`,children:t(`hotRecommend.hotVideosTitle`)}),h(`div`,{className:`flex flex-col gap-[8px]`,children:[m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`})]})]})}):h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(254,201,207,0.5) 0%, rgba(254,201,207,0.1) 100%)`,borderColor:`rgba(255,119,131,0.2)`},children:[m(a,{className:`leading-[26px] block text-theme5 text-[18px] font-bold`,children:t(`hotRecommend.hotVideosTitle`)}),e.map((e,t)=>h(_,{className:`w-full flex items-center justify-between mt-[12px] shrink-0`,href:c({id:e.video_id,contentType:0}),children:[h(i,{className:`w-[76px] h-[102px] rounded-[8px] overflow-hidden relative bg-bg2`,children:[m(r,{src:e.cover||``,fill:!0,alt:e.name||``,objectFit:`cover`}),m(i,{className:`w-[18px] h-[18px] rounded-tl-[8px] rounded-br-[8px] flex items-center justify-center overflow-hidden absolute left-0 top-0 z-[1]`,style:{background:t>2?`linear-gradient( 218deg, #909BB7 0%, #5D7198 100%)`:`linear-gradient( 175deg, #FD4C5E 0%, #F05D19 100%)`},children:m(a,{className:`text-[12px] leading-[12px] text-white`,children:t+1})})]}),h(i,{className:`flex-1 flex flex-col ml-[12px]`,children:[m(a,{className:`leading-[26px] text-text1 text-[18px] font-bold max-w-[200px] line-clamp-1 mb-[4px]`,children:e.name}),h(i,{className:`flex items-center`,style:{transform:`scale(0.6)`,transformOrigin:`left center`},children:[m(d,{allowHalf:!0,value:n({score:String(e.score??0)})}),m(a,{className:`ml-[8px] text-[24px] text-[#F59E0B] font-bold leading-[24px]`,children:e.score?(Number(e.score)/10).toFixed(1):0})]}),m(i,{className:`w-fit mt-[4px] h-[20px] leading-[20px] px-[6px] text-text2 text-[12px] bg-line1 rounded-[4px]`,children:e.cat_name})]})]},String(e.video_id??t)))]})}),y=p(({list:e})=>{let t=g(`components.pages.search`);return e.length===0?h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(153,215,255,0.5) 0%, rgba(153,215,255,0.1) 100%)`,borderColor:`rgba(31,167,255,0.2)`},children:[m(a,{className:`leading-[26px] block text-theme1 text-[18px] font-bold mb-[4px]`,children:t(`hotRecommend.hotPostsTitle`)}),h(`div`,{className:`flex flex-col gap-[8px]`,children:[m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`}),m(o,{className:`w-full h-[28px] mt-[8px]`})]})]}):h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(153,215,255,0.5) 0%, rgba(153,215,255,0.1) 100%)`,borderColor:`rgba(31,167,255,0.2)`},children:[m(a,{className:`leading-[26px] block text-theme1 text-[18px] font-bold mb-[4px]`,children:t(`hotRecommend.hotPostsTitle`)}),e.map((e,t)=>h(_,{className:`w-full h-[48px] mt-[8px] flex items-center`,href:c({id:e.content_id,contentType:1}),children:[h(a,{className:`text-[16px] leading-[24px] font-bold ${t<3?`text-theme1`:`text-text3`}`,children:[t+1,`.`]}),m(a,{className:`ml-[8px] text-[16px] text-text1 leading-[24px] line-clamp-1 max-w-[260px] ${f.hotInfoTitle}`,children:m(l,{text:e.title??``,atUsers:[]})})]},String(e.content_id??t)))]})});function b({isShow:r}){let{userInfo:a}=e(),{data:o}=s([`hotVideo`],()=>n({user_id:a.user_id})),c=o?.data?.hot_video_list??[],{data:l}=s([`hotContent`],()=>t({user_id:a.user_id})),u=l?.data?.hot_content_list??[];return r?h(i,{className:`w-full px-[12px] flex gap-x-[12px] flex-nowrap pb-[24px] ${f.gScrollBoxX}`,children:[m(v,{list:c}),m(y,{list:u})]}):null}export{b as default};
|
|
@@ -1,34 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import e from"../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=`.style-
|
|
3
|
-
position: relative;
|
|
4
|
-
z-index: 1;
|
|
5
|
-
height: 100%;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
font-size: 3.255814vw;
|
|
9
|
-
color: var(--color-text1) !important;
|
|
10
|
-
font-weight: 400;
|
|
11
|
-
padding-left: 8.372093vw;
|
|
12
|
-
line-height: 4.651163vw;
|
|
13
|
-
padding-top: 1.395349vw;
|
|
14
|
-
padding-bottom: 1.395349vw;
|
|
15
|
-
}
|
|
16
|
-
.style-module_searchInput__5zpUG .adm-input-element {
|
|
17
|
-
font-size: 14px;
|
|
18
|
-
color: var(--color-text1) !important;
|
|
19
|
-
font-weight: normal;
|
|
20
|
-
padding-left: 36px;
|
|
21
|
-
line-height: 20px;
|
|
22
|
-
padding-top: 6px;
|
|
23
|
-
padding-bottom: 6px;
|
|
24
|
-
}
|
|
25
|
-
.style-module_searchInput__5zpUG .adm-input-element::placeholder {
|
|
26
|
-
color: var(--color-text3) !important;
|
|
27
|
-
}
|
|
28
|
-
.style-module_searchInput__5zpUG .adm-input-clear {
|
|
29
|
-
margin-right: 6px;
|
|
30
|
-
}
|
|
31
|
-
.style-module_customSearchHistory__sDuK0 {
|
|
2
|
+
import e from"../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=`.style-module_customSearchHistory__sDuK0 {
|
|
32
3
|
display: flex;
|
|
33
4
|
flex-direction: column-reverse;
|
|
34
5
|
align-items: flex-end;
|
|
@@ -112,4 +83,5 @@ import e from"../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-
|
|
|
112
83
|
}
|
|
113
84
|
.style-module_gScrollBoxX__CRiTV::-webkit-scrollbar {
|
|
114
85
|
display: none; /* Chrome, Safari and Opera */
|
|
115
|
-
}
|
|
86
|
+
}
|
|
87
|
+
`,n={customSearchHistory:`style-module_customSearchHistory__sDuK0`,hotInfoTitle:`style-module_hotInfoTitle__fVniI`,gScrollBoxX:`style-module_gScrollBoxX__CRiTV`};e(t);export{n as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{isPCEnv as a}from"../../../utils/tools.mjs";import{LeftArrowIcon as o}from"../../common/icons/left-arrow.mjs";import s from"../../../assets/icons/search.mjs";import c from"../../../assets/icons/clear.mjs";import{memo as l,useCallback as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useSearchParams as p}from"next/navigation";import{useTranslations as m}from"next-intl";function h(){}const g=l(({setSearchInputVal:l,initInputVal:g,initInputVersion:_,addSearchHistory:v,clearCallback:y=h})=>{let b=m(`components.pages.search`),x=e(),[S,C]=i(`search-input-val`,``),w=p().get(`q`),T=e=>{let t=e.target.value;C(t)},E=u(e=>{l(e),v(e)},[v,l]);r(()=>{g&&(C(g),E(g))},[g,_],`search-init-input-effect`),r(()=>{w&&(C(w),E(w))},[w],`search-url-params-effect`);function D(){if(n.dismiss(),window.location.search.split(`from_code=`)[1]){x.push(`/`);return}x.back()}return d(`div`,{className:`app-top-nav relative w-full h-[55px]`,children:d(`header`,{className:`fixed top-0 left-0 right-0 z-50 bg-bg1`,style:{willChange:`transform`,transform:`translateZ(0)`},children:f(`div`,{className:`mx-auto flex h-[55px] items-center gap-[12px] px-[12px] py-[8px]`,children:[d(`button`,{type:`button`,"aria-label":`返回`,className:`flex shrink-0 items-center justify-center text-text1`,onClick:D,children:d(o,{className:`h-[16px] w-[16px]`})}),d(`div`,{className:`h-[40px] flex-1 rounded-[20px] bg-[linear-gradient(175deg,rgba(253,76,94,0.4)_0%,rgba(255,119,131,0.4)_100%)] p-px`,children:f(`div`,{className:`relative h-full w-full overflow-hidden rounded-[19px] bg-bg1`,children:[d(`div`,{className:`absolute inset-0 bg-bg2 opacity-50`}),d(s,{className:`absolute left-[12px] top-1/2 z-[1] h-[14px] w-[14px] -translate-y-1/2 text-text3`}),d(t,{placeholder:b(`topHeader.placeholder`),maxLength:20,value:S,className:`!relative !z-[1] !h-full !w-full !rounded-none !border-0 !bg-transparent !px-0 !pl-[34px] !pr-[34px] !py-0 !text-[14px] !leading-[22px] !text-text1 placeholder:!text-text3`,onChange:T,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!S)return;E(S)}}}),S&&d(c,{className:`absolute right-[12px] top-1/2 z-10 h-[15px] w-[15px] -translate-y-1/2 text-text3`,onClick:()=>{a()||(C(``),l(``),y())}})]})}),d(`button`,{type:`button`,className:`flex shrink-0 items-center justify-center text-[16px] leading-[24px] text-text1`,onClick:()=>{S&&E(S)},children:b(`topHeader.search`)})]})})})});export{g as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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{SearchResultSkeleton as a}from"./search-result-skeleton.mjs";import o from"./search-user.mjs";import s from"./search-video.mjs";import{useMemo as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";function f(e,t=1){return JSON.stringify({type:1,keywords:e,sort:t})}function p({searchInputVal:p,sort:m,refreshVersion:h}){let g=d(`components.pages.search.searchResult`),_=c(()=>f(p,m),[p,m]),{data:v,isFetching:y,isLoading:b}=i(c(()=>[...t({data_type:2,extra_params:_,page:1,page_size:10}),h],[h,_]),async()=>(await e({data_type:2,extra_params:_,page:1,page_size:10})).data??{}),x=c(()=>v?.videos?.list??[],[v]),S=c(()=>!!v?.videos?.has_more,[v]),C=c(()=>v?.users?.list??[],[v]),w=x.length===0&&C.length===0&&!y;return x.length===0&&C.length===0&&(b||y)?l(a,{}):w?l(n,{className:`w-full pt-[12px]`,children:l(r,{loading:y,empty:`nodata`,emptyText:g(`searchAll.emptyResult`)})}):u(n,{className:`w-full
|
|
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{SearchResultSkeleton as a}from"./search-result-skeleton.mjs";import o from"./search-user.mjs";import s from"./search-video.mjs";import{useMemo as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";function f(e,t=1){return JSON.stringify({type:1,keywords:e,sort:t})}function p({searchInputVal:p,sort:m,refreshVersion:h}){let g=d(`components.pages.search.searchResult`),_=c(()=>f(p,m),[p,m]),{data:v,isFetching:y,isLoading:b}=i(c(()=>[...t({data_type:2,extra_params:_,page:1,page_size:10}),h],[h,_]),async()=>(await e({data_type:2,extra_params:_,page:1,page_size:10})).data??{}),x=c(()=>v?.videos?.list??[],[v]),S=c(()=>!!v?.videos?.has_more,[v]),C=c(()=>v?.users?.list??[],[v]),w=x.length===0&&C.length===0&&!y;return x.length===0&&C.length===0&&(b||y)?l(a,{}):w?l(n,{className:`w-full pt-[12px]`,children:l(r,{loading:y,empty:`nodata`,emptyText:g(`searchAll.emptyResult`)})}):u(n,{className:`w-full`,children:[C.length>0&&l(o,{mode:`all`,list:C}),l(s,{mode:`all`,list:x,hasMore:S})]})}export{p as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{Box as t}from"../../ui/box.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{Box as t}from"../../ui/box.mjs";import{Text as n}from"../../ui/text.mjs";import{Popover as r,PopoverContent as i,PopoverTrigger as a}from"../../ui/popover.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-[54px] left-0 right-0 z-40`,children:[d(t,{className:`flex items-center`,children:h.map(e=>d(n,{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(r,{open:v,onOpenChange:y,children:[d(a,{"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(i,{side:`bottom`,align:`end`,className:`w-[100vw] bg-muted`,children:[d(n,{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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import t from"../../../utils/event-bus.mjs";import{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{
|
|
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{Text as c}from"../../ui/text.mjs";import{Skeleton as l}from"../../ui/skeleton.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 h from"../../../assets/images/user/default_avatar.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";const T=typeof h==`string`?h:h.src;function E(){return x(a,{className:`w-full`,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(l,{className:`w-[56px] h-[56px] rounded-[28px]`}),S(a,{className:`ml-[8px]`,children:[x(l,{className:`w-[120px] h-[18px] mb-[8px]`}),x(l,{className:`w-[72px] h-[14px]`})]})]}),x(l,{className:`w-[76px] h-[34px] rounded-[18px]`})]},`search-user-skeleton-${t}`))})}const D=g(({item:e,onUpdate:t})=>{let r=C(`components.pages.search.searchResult`),{userInfo:o}=n();return _(n=>{t({...e,is_following:n?1:0})},[e,t]),x(a,{className:`w-full h-[56px] bg-bg1 flex flex-row items-center justify-between mb-[12px] px-[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||T,fill:!0,objectFit:`cover`,alt:e.nick_name})}),S(a,{className:`flex flex-col ml-[8px]`,children:[x(c,{as:`span`,className:`text-text1 text-[16px] leading-[24px] h-[24px] font-bold w-[200px] inline-block truncate`,children:e.nick_name}),S(c,{as:`span`,className:`text-text2 leading-[22px] text-[14px]`,children:[e.follower_count??0,r(`searchUser.followersSuffix`)]})]})]})})});D.displayName=`UserItem`;const O=g(({list:n})=>{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}))},[]),l=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 l.length===0?null:S(a,{className:`w-full pt-[12px]`,children:[l.map((e,t)=>x(D,{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(c,{as:`span`,children:`查看更多`}),x(m,{className:`w-[12px] h-[12px]`})]})})]})});O.displayName=`SearchUserWithLimit`;const k=g(({inputVal:e,sort:t,refreshVersion:n})=>{let i=C(`components.pages.search.searchResult`),c=f(),l=_(async n=>await r({data_type:2,extra_params:JSON.stringify({type:4,keywords:e,sort:t}),page:n||1,page_size:20}),[e,t]),p=y(()=>[`searchByKeyForUser`,e,4,t,n],[e,t,n]),m=u({key:p,initialPageParam:1,async queryFn(e){return(await l(e))?.data?.users??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),h=d(),g=_((e,t)=>{e&&h(p,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)}))})},[h,p]),v=async e=>{try{await m.fetchNextPage()}catch(e){console.error(`获取用户列表失败`,e)}},b=(m?.data?.pages??[]).flatMap(e=>e.list??[]),S=!!(m?.isPending||m?.isFetching);return S&&b.length===0?x(E,{}):x(a,{className:`w-full`,children:x(s,{loading:S,hasMore:m?.hasNextPage??!1,loadMore:v,empty:`nodata`,emptyText:i(`searchUser.emptyResult`),children:b.map((e,t)=>x(o,{children:x(D,{item:e,onUpdate:e=>{c(()=>{g(e.user_id||``,!!e.is_following)})}})},String(e.user_id??t)))})})});k.displayName=`SearchUserWithPagination`;const A=g(e=>e.mode===`all`?x(O,{list:e.list??[]}):x(k,{inputVal:e.inputVal??``,sort:e.sort??1,refreshVersion:e.refreshVersion??0}));A.displayName=`SearchUser`;export{A as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import t from"../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{Item as a}from"../../ui/item.mjs";import{List as o}from"../../ui/list.mjs";import{Text as s}from"../../ui/text.mjs";import{usePaginated as c}from"../../../hooks/query/use-query.mjs";import{eventKey as l}from"../../../constants/event-key.mjs";import{formatVideoDuration as u,getPostDetailPagePath as d}from"../../../utils/tools.mjs";import{apiCollectCustom as f}from"../../../utils/api-collect.mjs";import p from"../../../assets/icons/view.mjs";import
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import t from"../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{Item as a}from"../../ui/item.mjs";import{List as o}from"../../ui/list.mjs";import{Text as s}from"../../ui/text.mjs";import{usePaginated as c}from"../../../hooks/query/use-query.mjs";import{eventKey as l}from"../../../constants/event-key.mjs";import{formatVideoDuration as u,getPostDetailPagePath as d}from"../../../utils/tools.mjs";import{apiCollectCustom as f}from"../../../utils/api-collect.mjs";import p from"../../../assets/icons/view.mjs";import{SearchVideoCardSkeleton as m}from"../../common/skeleton/search-video-card-skeleton.mjs";import h from"../../../assets/icons/right_arrow.mjs";import{memo as g,useCallback as _,useMemo as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{useTranslations as x}from"next-intl";import S from"next/link";const C=g(()=>y(m,{count:3}));C.displayName=`SearchVideoListSkeleton`;function w(e){let t=Number(e||0);return Number.isNaN(t)||t<=0?`0`:t>=1e4?`${(t/1e4).toFixed(1)}w`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function T(e){let t=Number(e.episode_count||0),n=Number.isFinite(t)&&t>0,r=String(e.update_status??``).trim();return!n||t<=1?u(Number(e.duration||0)):r===`1`?`${t}集全`:`更新至${t}集`}const E=g(({item:e})=>{let t=e.name||``,n=e.img_x||e.img_y||``,a=T(e);return b(S,{className:`mb-[12px] block w-full border-b border-line1 px-[12px] pb-[12px]`,href:d({id:e.video_id,contentType:0}),onClick:()=>{e.video_id},children:[b(i,{className:`relative w-full overflow-hidden rounded-[12px] bg-neutral-800`,style:{aspectRatio:`16/9`},children:[n&&y(r,{src:n,alt:t||`封面`,fill:!0,objectFit:`cover`}),y(i,{className:`absolute inset-x-0 bottom-0 h-[40px] bg-gradient-to-t from-black/80 to-transparent z-0 pointer-events-none`}),b(i,{className:`absolute bottom-0 left-[8px] mb-[6px] z-10 flex items-center gap-[4px]`,children:[y(p,{className:`h-[14px] w-[14px] text-white`}),y(s,{as:`span`,className:`text-[12px] font-medium text-white drop-shadow-md`,children:w(e.play_count)})]}),a&&y(i,{className:`absolute bottom-0 right-[8px] mb-[6px] z-10 flex items-center`,children:y(s,{as:`span`,className:`text-[12px] font-medium text-white drop-shadow-md`,children:a})})]}),b(i,{className:`flex items-center justify-between gap-[12px] pt-[10px]`,children:[b(i,{className:`flex-1 min-w-0`,children:[y(s,{as:`h3`,className:`text-[16px] font-semibold leading-[24px] text-text1 line-clamp-1`,children:t}),e.description&&y(s,{as:`p`,className:`mt-[4px] text-[13px] leading-[20px] text-text2 line-clamp-1`,children:e.description})]}),y(s,{className:`shrink-0 rounded-[20px] border border-[#FD4C5E] px-[24px] py-[8px] text-[14px] font-normal text-[#FD4C5E]`,children:`观看`})]})]})});E.displayName=`VideoItem`;const D=g(({list:e})=>y(i,{className:`w-full pt-[12px]`,children:e.map((e,t)=>y(E,{item:e},String(e.video_id??t)))}));D.displayName=`VideoListContent`;const O=g(({list:n,hasMore:r})=>{let a=_(()=>{t.emit(l.EXCHANGE_SEARCH_TYPE,`video`)},[]);return b(i,{className:`w-full`,children:[y(D,{list:n}),r&&y(i,{className:`w-full flex items-center justify-center`,children:b(e,{variant:`ghost`,className:`w-fit h-[46px] leading-[46px] mx-auto mt-[-12px] text-[14px] text-text2`,onClick:a,children:[y(s,{as:`span`,children:`查看更多`}),y(h,{className:`w-[12px] h-[12px]`})]})})]})});O.displayName=`SearchVideoWithAll`;const k=g(({inputVal:e,sort:t,refreshVersion:r})=>{let s=x(`components.pages.search.searchResult`),l=_(async r=>await n({data_type:2,extra_params:JSON.stringify({type:3,keywords:e,sort:t}),page:r||1,page_size:20}),[e,t]),u=c({key:v(()=>[`searchByKeyForVideoInfo`,e,3,t,r],[e,t,r]),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=v(()=>{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;return f&&d.length===0?y(C,{}):y(i,{className:`w-full`,children:y(o,{loading:f,hasMore:u.hasNextPage??!1,loadMore:async e=>{try{await u.fetchNextPage()}catch(e){console.error(`获取内容列表失败`,e)}},empty:`nodata`,emptyText:s(`searchVideoInfo.noRelevantContent`),children:d.map((e,t)=>y(a,{className:`p-0`,children:y(E,{item:e})},String(e.video_id??t)))})})});k.displayName=`SearchVideoWithPagination`;const A=g(e=>e.mode===`all`?y(O,{list:e.list,hasMore:e.hasMore}):y(k,{inputVal:e.inputVal,sort:e.sort,refreshVersion:e.refreshVersion}));A.displayName=`SearchVideo`;export{A as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import{gContentGetAppChannels as n,gContentGetVideoDetail as r}from"../../../service/generated/client.mjs";import{useRouter as i}from"../../../utils/use-compatible-router.mjs";import{EmptyState as a}from"../../ui/empty.mjs";import{notifyBridgeEpisodeChanged as
|
|
2
|
+
"use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import{gContentGetAppChannels as n,gContentGetVideoDetail as r}from"../../../service/generated/client.mjs";import{useRouter as i}from"../../../utils/use-compatible-router.mjs";import{EmptyState as a}from"../../ui/empty.mjs";import{buildVideoPlayerSrc as o}from"../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as s}from"../../../utils/login-modal-bridge.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{queryKey as l}from"../../../constants/query-key.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import p from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{VideoDetailMaterialRuntimeProvider as m}from"../../biz/business/detail/shared/runtime-context-provider.mjs";import{resolveMaterialProps as h,videoDetailMaterials as ee}from"../../biz/business/detail/shared/registry.mjs";import{DetailHero as te}from"../../biz/business/detail/shared/video-hero.mjs";import{Fragment as ne,useCallback as g,useEffect as _,useMemo as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import{useParams as re,useSearchParams as ie}from"next/navigation";import{useTranslations as ae}from"next-intl";const S=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-info-title-tags-episodes`,componentName:`video-detail-info-title-tags-episodes`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{title:`猜你喜欢`,rows:2,columns:3,smartTagEnabled:!1,smartTagIds:[`腐剧`],showPlayCount:!0,playCountDelta:0,showEpisode:!0,enableInfinite:!1,items:[{contentId:`d6a35ba3279e6f0d`,contentName:`贺总的私宠罪妻`,titleMode:`custom`,title:`贺总的私宠罪妻`,description:`简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百`,coverMode:`upload`,coverUrl:`/truss/20260227/69a136457d10f.jpgxxx`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`b0f42fed731239a7`,contentName:`少年江湖物语`,titleMode:`custom`,title:`少年江湖物语`,description:`网剧《少年江湖物语》讲述了一个江湖中邪不压正,青春正好,有情有爱的温暖故事。剧中有魔教教主,有天下第一剑客,有身世成谜的江湖大夫,有忠心耿耿的小丫鬟,更有艳压秦淮的当红花魁,众多看似完全没有交集的人物纷纷亮相登场,搅乱江湖一池春水。`,coverMode:`content`,coverUrl:`/md-204/uploads/default/other/2024-08-26/14664d2c31e61c201a29cd4abba267c5.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c2304e94ec0ba208`,contentName:`王的男人`,titleMode:`custom`,title:`王的男人`,description:`朝鲜第十代王燕山王君时期,艺人长生(甘宇成饰)和孔吉(李俊基饰)因为不肯加入当地的艺人团,来到京城汉阳谋生。此时暴君燕山君(郑镇荣饰)沉迷于宠妾张绿水(姜成妍饰),朝纲混乱,民不聊生。长生与孔吉二人在街头开始表演讽刺君主的喜剧,大受欢迎,却遭逮捕。后要求到王面前表演,求得一笑。结果,多亏孔吉的急中生智,燕山君才笑了出来。两人随即被留在宫中取乐,孔吉更是因为美色令王倍加宠爱。他们不停表演,大臣们却各自心怀鬼胎,导致了杀戮局面。最终,君王和艺人的命运又将如何呢?`,coverMode:`content`,coverUrl:`/md-204/resource/8c/8cb28f46831558fbeb2f34b2076c3b4e.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c7ffc6a558ae8683`,contentName:`怒`,titleMode:`custom`,title:`怒`,description:`炎炎夏日,东京八王子郊外社区,一对夫妇惨遭杀害。事后凶手用血在墙上写下大大的“怒”字,随后逃亡,销声匿迹长达一年之久。而在此期间,三个身份不明的男子和身边的人相遇了。曾自甘堕落的爱子(宫崎葵饰)被父亲(渡边谦饰)领回海滨小镇,邂逅了不善言辞的哲也(松山研一饰)。在东京工作的同性恋优马(妻夫木聪饰)将柔情似水的直人(绫野刚饰)带回了家,他不相信对方,却又尝试去相信。随母亲搬到冲绳的小泉(广濑铃饰)跟着同学辰哉(佐久本宝饰)登上一座荒岛,在废墟中遇到了背包客田中(森山未来饰),他们短暂成为朋友,而可怕的命运突然降临泉的头上。不久之后,通缉令遍布全国,三个男子的真实身份引人生疑……本片根据吉田修一的同名原作改编。`,coverMode:`content`,coverUrl:`/md-204/resource/24/24ef267eef2c35b5e4cf12dac8b55c14.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`98217427ed96ec51`,contentName:`熔炉`,titleMode:`custom`,title:`熔炉`,description:`来自首尔的哑语美术老师仁浩(孔宥饰)来到雾津,应聘慈爱聋哑人学校。天降大雾,他意外撞车,维修时邂逅了人权组织成员柔珍(郑有美饰)。仁浩妻子早亡,8岁女儿天生哮喘由祖母照看,所以他不辞辛苦谋职养家。然而,双胞胎的校长与教导主任竟逼仁浩索贿5千万韩元。同时,仁浩逐渐发现学校笼罩着一种紧张压抑的气氛,令人窒息。有三个孩子引人关注:聪颖的金妍斗(金贤秀饰)、贪吃的陈宥利(郑仁絮饰)和弟弟自杀身亡的全民秀(白承焕饰),民秀总是满脸淤青。下课后,仁浩还听到女厕所中有呼喊与哭泣,在门卫的阻拦下他未深究。之后。他意外目睹了校长行贿警察,教导员毒打民秀,宿导溺罚妍斗的行径。一个惊天的隐秘被慢慢揭开,真相令韩国震惊……本片取材于2005年光州一所聋哑障碍人学校的真实事件,改编自韩国作家孔枝泳的同名小说。`,coverMode:`content`,coverUrl:`/md-204/resource/b4/b410ccdcd86936455b9460a9152aaa47.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`caa2b4eb4eb40de0`,contentName:`再次来寻我`,titleMode:`custom`,title:`再次来寻我`,description:`在宇回到曾经与初恋志勋相遇的303号房,这里即将被拆迁,他在房间里回忆和志勋的点点滴滴,突然被书桌上的电话所吸引,一拿起话筒听到的竟是志勋的声音!在房子主人的同意下,在宇带着电话离开了303室,在回家的途中他发现自己像走在一个陌生的地方,而对面走来的竟是已消失已久的志勋…`,coverMode:`content`,coverUrl:`/md-204/resource/2b/2b43375f2248c1a012847d4507fd21a3.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0}]}}];function C(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function w({detailId:f,initialInformation:w,isWebView:T=!1,materialConfig:E}){let D=ae(`components.pages.videoDetail`),O=i(),oe=re(),se=ie(),k=oe.level,A=Array.isArray(k)?k:typeof k==`string`?[k]:[],j=A.findIndex(e=>e===`episode`),ce=j>=0?A[j+1]:A[2],M=Math.max(1,Number(ce)||1),[le,N]=d(`detail-current-series-num-${f}`,M);_(()=>{N(M)},[M,N]);let P=Math.max(1,Number(le)||1),F=Math.max(0,P-1),{data:I,isPending:L,isFetching:R,isError:z,isSuccess:B}=c(v(()=>[`video-detail`,f],[f]),async()=>f?await r({id:f}):null,{enabled:!!f}),V=v(()=>{let e=I?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[I?.data?.video]),H=w??V??null,[U,W]=d(`detail-information-${f}`,H),ue=U?.links?.[F]?.id||``,G=!!f&&!U&&(L||R),K=!f||!!U||z||B,[de,fe]=d(`info-detail-active-tab-${f}`,`video`),[q,J]=d(`info-detail-comment-add-count-${f}`,0),[Y,pe]=d(`info-detail-comment-total-${f}`,void 0);_(()=>{!U&&V&&W(V)},[U,V,W]);let X=g(e=>{W(t=>t&&{...t,...e})},[W]);u(()=>{U?.id&&U.id},[U?.id],`detail-page-report-${f}`),_(()=>{!U||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:U.id||f,author_id:U.up_user,object_type:U.content_type,object_category:U.content_type,object_tags:U.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,U]),_(()=>{J(0)},[ue,J]),v(()=>(typeof Y==`number`?Y:0)+q,[q,Y]);let me=g(()=>{},[!1,fe]);g(()=>{J(e=>e+1)},[J]),_(()=>{},[!1,me,U?.id,se]);let Z=g(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(typeof window>`u`)return;let n=String(U?.id||f||``).trim();if(!n)return;let r=T||window.isWebView===!0,i=`/${r?`webview`:`video`}/${n}/${encodeURIComponent(U?.name||``)}/episode/${t}`,{search:a,hash:c,pathname:l}=window.location,u=`${i}${a}${c}`,d=`${l}${a}${c}`,p=C(l,n);if(d!==u){if(r){let e=U?.links?.[Math.max(0,t-1)],r=o(String(e?.m3u8_url||e?.preview_m3u8_url||``).trim());s({poster:String(U?.img_y||U?.img_x||U?.preview_images?.[0]||``).trim(),src:r,title:String(U?.title||U?.name||``).trim(),contentId:n,episode:t}),P!==t&&N(t);return}p&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,u),N(t)):O.replace(u,{scroll:!1});return}P!==t&&N(t)},[P,f,U?.id,U?.img_x,U?.img_y,U?.links,U?.name,U?.preview_images,U?.title,T,O,N]),Q=U?.status===`1`,{data:he}=c([l.CHANNEL],()=>n()),ge=e(he?.data),$=v(()=>{if(E!==void 0){let e=new Map(S.map(e=>[e.componentName,e]));return E.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return S},[E]),_e=v(()=>({information:U??void 0,currentSeriesNum:P,onEpisodeChange:Z,onUpdateInformation:X,detailId:f,episodeIndex:F,isShow:!0,isWebView:T,isInformationLoading:G,isInformationResolved:K}),[P,f,F,Z,X,U,G,K,T,!0]),ve=g(e=>{if(!U)return null;let t=ee[e.componentName];if(!t)return null;let n=t.clientComponent,r=h(t,e.props);return r.isValid?b(n,{...r.props}):b(`div`,{children:`组件配置错误`})},[U]);return x(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${T?``:`pt-11`}`,children:[!T&&b(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:b(p,{data:{list:ge}})}),b(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:x(y,{children:[U&&!Q&&b(a,{type:`no-content`,text:D(`videoDetailClient.videoUnavailable`)}),U&&Q&&x(y,{children:[!T&&b(te,{isVideo:!0,information:U,episodeIndex:F}),b(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,x(`div`,{className:t(`w-full`,!1),children:[b(m,{value:_e,children:$.map(e=>b(ne,{children:ve(e)},e.id))}),!1]}),!1]}),!U&&b(a,{type:`no-content`,text:D(`videoDetailClient.videoDeleted`)})]})})]})}export{w as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{pContentGetNewstVideoList as e,
|
|
2
|
+
import{pContentGetNewstVideoList as e,pContentGetTopRatedVideoList as t}from"../../../service/generated/client.mjs";import{pContentGetNewstVideoListKey as n,pContentGetTopRatedVideoListKey as r}from"../../../service/generated/tanstack.mjs";import{HydrationBoundary as i}from"../../../hooks/query/hydration-boundary.mjs";import{revalidate as a}from"../../../constants/revalidate.mjs";import{getNextVideoListPageParam as o,resolveNextCursor as s}from"./types.mjs";import c from"./video-list-client.mjs";import{jsx as l}from"react/jsx-runtime";async function u({title:u=`列表页`,tags:d=[]}={}){let f={page_size:10,tags:d.length?d:void 0};return l(i,{prefetch:[{type:`infinite`,queryKey:r(f),queryFn:async e=>{let n=(await t({page_size:10,cursor:e||void 0,tags:d.length?d:void 0},{revalidate:a.TIME})).data,r=Array.isArray(n?.videos)?n.videos:[];return{list:r,nextCursor:r.length<10?``:s(n)}},initialPageParam:``,getNextPageParam:e=>o(e)},{type:`infinite`,queryKey:n(f),queryFn:async t=>{let n=(await e({page_size:10,cursor:t||void 0,tags:d.length?d:void 0},{revalidate:a.TIME})).data,r=Array.isArray(n?.videos)?n.videos:[];return{list:r,nextCursor:r.length<10?``:s(n)}},initialPageParam:``,getNextPageParam:e=>o(e)}],children:l(c,{title:u,tags:d})})}export{u as VideoListPage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{pContentGetNewstVideoList as t,pContentGetTopRatedVideoList as n}from"../../../service/generated/client.mjs";import{pContentGetNewstVideoListKey as r,pContentGetTopRatedVideoListKey as i}from"../../../service/generated/tanstack.mjs";import{useRouter as a}from"../../../utils/use-compatible-router.mjs";import{Box as o}from"../../ui/box.mjs";import{InfiniteScroll as s}from"../../ui/infinite-scroll.mjs";import{Text as c}from"../../ui/text.mjs";import{usePaginated as l}from"../../../hooks/query/use-query.mjs";import u from"../../../assets/icons/left_arrow.mjs";import{getNextVideoListPageParam as d,resolveNextCursor as f}from"./types.mjs";import{VideoListItemComponent as p}from"./video-list-item.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{pContentGetNewstVideoList as t,pContentGetTopRatedVideoList as n}from"../../../service/generated/client.mjs";import{pContentGetNewstVideoListKey as r,pContentGetTopRatedVideoListKey as i}from"../../../service/generated/tanstack.mjs";import{useRouter as a}from"../../../utils/use-compatible-router.mjs";import{Box as o}from"../../ui/box.mjs";import{InfiniteScroll as s}from"../../ui/infinite-scroll.mjs";import{Text as c}from"../../ui/text.mjs";import{usePaginated as l}from"../../../hooks/query/use-query.mjs";import u from"../../../assets/icons/left_arrow.mjs";import{getNextVideoListPageParam as d,resolveNextCursor as f}from"./types.mjs";import{VideoListItemComponent as p}from"./video-list-item.mjs";import{VideoListSkeleton as m}from"./video-list-skeleton.mjs";import{useEffect as h,useMemo as g,useState as _}from"react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import b from"next/link";const x=[];function S({title:S=`列表页`,tags:C=x}){let w=a(),[T,E]=_(`hot`),D=g(()=>({page_size:10,tags:C.length?C:void 0}),[C]),{data:O,fetchNextPage:k,hasNextPage:A,isPending:j,isFetching:M}=l({key:g(()=>T===`hot`?i(D):r(D),[D,T]),queryFn:async e=>{let r={page_size:10,cursor:e||void 0,tags:C.length?C:void 0},i=(T===`hot`?await n(r):await t(r)).data,a=Array.isArray(i?.videos)?i.videos:[];return{list:a,nextCursor:a.length<10?``:f(i)}},getNextPageParam:d,initialPageParam:``,options:{staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1,refetchOnReconnect:!1}}),N=g(()=>O?.pages?.flatMap(e=>e.list)??[],[O?.pages]),P=(O?.pages?.length??0)>0,F=g(()=>P?A??!1:!0,[P,A]),I=N.length===0&&(!P||j||M);h(()=>{typeof window>`u`||window.scrollTo({top:0,behavior:`auto`})},[T]);function L(){w.back()}let R=g(()=>N.map(e=>{let t=e.id??e.mid??``;return v(b,{href:`/video/${t}/${e.name??``}`,children:v(p,{item:e})},t)}),[N]);return I?v(m,{}):y(o,{as:`main`,className:`min-h-[100dvh] bg-bg1`,children:[y(o,{className:`fixed top-0 left-0 right-0 z-20 bg-bg1`,children:[y(o,{as:`header`,className:`flex items-center gap-2 px-4 py-3`,children:[v(u,{className:`w-[16px] h-[16px]`,onClick:L}),v(c,{as:`h1`,className:`flex-1 min-w-0 flex justify-center overflow-hidden text-[18px] pr-[16px]`,children:v(c,{className:`block max-w-full truncate`,children:S})})]}),y(o,{as:`nav`,className:`px-4 pb-2 flex gap-2`,children:[v(e,{type:`button`,onClick:()=>E(`hot`),className:`h-[30px] px-[12px] text-[14px] rounded-[50px] ${T===`hot`?`bg-theme5 text-text1`:`bg-transparent text-text2`}`,children:`最热`}),v(e,{type:`button`,onClick:()=>E(`latest`),className:`h-[30px] px-[12px] text-[14px] rounded-[50px] ${T===`latest`?`bg-theme5 text-text1`:`bg-transparent text-text2`}`,children:`最新`})]})]}),v(s,{loadMore:()=>k().then(()=>void 0),hasMore:F,noMoreText:`没有更多了`,threshold:300,className:`pt-[88px]`,children:v(o,{className:`grid grid-cols-2 gap-3 p-4`,children:R})},T)]})}export{S 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?: "default" | "destructive" | "secondary" | "outline" | "ghost" |
|
|
9
|
+
variant?: "link" | "default" | "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?: "default" | "destructive" | "secondary" | "outline" | "ghost" |
|
|
10
|
+
variant?: "link" | "default" | "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 NextImage from "next/image";
|
|
5
5
|
|
|
6
6
|
//#region components/ui/image.d.ts
|
|
7
7
|
/** BaseImageProps 属性定义。 */
|
|
8
|
-
type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof
|
|
8
|
+
type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof NextImage>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
|
|
9
9
|
type CommonImageProps = BaseImageProps & {
|
|
10
10
|
/** 图片地址,支持普通 URL、默认资源路径和加密地址。 */src: string; /** 图片替代文本。 */
|
|
11
11
|
alt?: string; /** 图片类名。 */
|
|
@@ -27,6 +27,6 @@ type ImagePropsWithSize = CommonImageProps & {
|
|
|
27
27
|
/** ImageProps 属性定义。 */
|
|
28
28
|
type ImageProps = ImagePropsWithFill | ImagePropsWithSize;
|
|
29
29
|
/** 图片组件:支持 bnc 解密、默认资源域名拼接与错误占位。 */
|
|
30
|
-
declare function Image
|
|
30
|
+
declare function Image(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { BaseImageProps, CommonImageProps, Image
|
|
32
|
+
export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../utils/cn.mjs";import{Separator as t}from"./separator.mjs";import"react";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";import{mergeProps as i}from"@base-ui/react/merge-props";import{useRender as a}from"@base-ui/react/use-render";function o({className:t,...r}){return n(`div`,{role:`list`,"data-slot":`item-group`,className:e(`gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col`,t),...r})}function s({className:r,...i}){return n(t,{"data-slot":`item-separator`,orientation:`horizontal`,className:e(`my-2`,r),...i})}const c=r(`[a]:hover:bg-muted rounded-lg border text-sm w-full group/item focus-visible:border-ring focus-visible:ring-ring/50 flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:ring-[3px] [a]:transition-colors`,{variants:{variant:{default:`border-
|
|
2
|
+
"use client";import{cn as e}from"../../utils/cn.mjs";import{Separator as t}from"./separator.mjs";import"react";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";import{mergeProps as i}from"@base-ui/react/merge-props";import{useRender as a}from"@base-ui/react/use-render";function o({className:t,...r}){return n(`div`,{role:`list`,"data-slot":`item-group`,className:e(`gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col`,t),...r})}function s({className:r,...i}){return n(t,{"data-slot":`item-separator`,orientation:`horizontal`,className:e(`my-2`,r),...i})}const c=r(`[a]:hover:bg-muted rounded-lg border text-sm w-full group/item focus-visible:border-ring focus-visible:ring-ring/50 flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:ring-[3px] [a]:transition-colors`,{variants:{variant:{default:`border-0`,outline:`border-border`,muted:`bg-muted/50 border-transparent`},size:{default:`gap-2.5 px-3 py-2.5`,sm:`gap-2.5 px-3 py-2.5`,xs:`gap-2 px-2.5 py-2 [[data-slot=dropdown-menu-content]_&]:p-0`}},defaultVariants:{variant:`default`,size:`default`}});function l({className:t,variant:n=`default`,size:r=`default`,render:o,...s}){return a({defaultTagName:`div`,props:i({className:e(c({variant:n,size:r,className:t}))},s),render:o,state:{slot:`item`,variant:n,size:r}})}const u=r(`gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none`,{variants:{variant:{default:`bg-transparent`,icon:`[&_svg:not([class*='w-']):not([class*='h-'])]:w-4 [&_svg:not([class*='w-']):not([class*='h-'])]:h-4`,image:`w-10 h-10 overflow-hidden rounded-sm group-data-[size=sm]/item:w-8 group-data-[size=sm]/item:h-8 group-data-[size=xs]/item:w-6 group-data-[size=xs]/item:h-6 [&_img]:w-full [&_img]:h-full [&_img]:object-cover`}},defaultVariants:{variant:`default`}});function d({className:t,variant:r=`default`,...i}){return n(`div`,{"data-slot":`item-media`,"data-variant":r,className:e(u({variant:r,className:t})),...i})}function f({className:t,...r}){return n(`div`,{"data-slot":`item-content`,className:e(`gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none`,t),...r})}function p({className:t,...r}){return n(`div`,{"data-slot":`item-title`,className:e(`gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center`,t),...r})}function m({className:t,...r}){return n(`p`,{"data-slot":`item-description`,className:e(`text-muted-foreground text-left text-sm leading-normal group-data-[size=xs]/item:text-xs [&>a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4`,t),...r})}function h({className:t,...r}){return n(`div`,{"data-slot":`item-actions`,className:e(`gap-2 flex items-center`,t),...r})}function g({className:t,...r}){return n(`div`,{"data-slot":`item-header`,className:e(`gap-2 flex basis-full items-center justify-between`,t),...r})}function _({className:t,...r}){return n(`div`,{"data-slot":`item-footer`,className:e(`gap-2 flex basis-full items-center justify-between`,t),...r})}export{l as Item,h as ItemActions,f as ItemContent,m as ItemDescription,_ as ItemFooter,o as ItemGroup,g as ItemHeader,d as ItemMedia,s as ItemSeparator,p as ItemTitle};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/ui/loading.d.ts
|
|
6
|
+
type LoadingSize = 'small' | 'medium' | 'large';
|
|
7
|
+
interface LoadingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'className'> {
|
|
8
|
+
/**
|
|
9
|
+
* 提示文本
|
|
10
|
+
* @default 来自 i18n: components.ui.loading.label
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 自定义类名
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 大小
|
|
19
|
+
* @default "medium"
|
|
20
|
+
*/
|
|
21
|
+
size?: LoadingSize;
|
|
22
|
+
/**
|
|
23
|
+
* 是否显示文本
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
showLabel?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 自定义颜色
|
|
29
|
+
* @default ""
|
|
30
|
+
*/
|
|
31
|
+
color?: string;
|
|
32
|
+
}
|
|
33
|
+
declare function Loading({
|
|
34
|
+
label,
|
|
35
|
+
className,
|
|
36
|
+
size,
|
|
37
|
+
showLabel,
|
|
38
|
+
color,
|
|
39
|
+
...rest
|
|
40
|
+
}: LoadingProps): react_jsx_runtime0.JSX.Element;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Loading };
|
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{AuthGuard as u}from"./components/pages/login/auth-guard.mjs";import d from"./components/pages/post-detail/page.mjs";import{UserProfilePage as f}from"./components/pages/profile/index.mjs";import p from"./components/pages/publish/page.mjs";import{SearchPage as m}from"./components/pages/search/index.mjs";import h from"./components/pages/search-result/page-client.mjs";import{SettingsPage as g}from"./components/pages/settings/index.mjs";import{UserFollowPage as _}from"./components/pages/user-follow/index.mjs";import v from"./components/pages/video-detail/page.mjs";import{
|
|
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{AuthGuard as u}from"./components/pages/login/auth-guard.mjs";import d from"./components/pages/post-detail/page.mjs";import{UserProfilePage as f}from"./components/pages/profile/index.mjs";import p from"./components/pages/publish/page.mjs";import{SearchPage as m}from"./components/pages/search/index.mjs";import h from"./components/pages/search-result/page-client.mjs";import{SettingsPage as g}from"./components/pages/settings/index.mjs";import{UserFollowPage as _}from"./components/pages/user-follow/index.mjs";import v from"./components/pages/video-detail/page.mjs";import{VideoListSkeleton as y}from"./components/pages/video-list/video-list-skeleton.mjs";import{VideoListPage as b}from"./components/pages/video-list/index.mjs";export{u as AuthGuard,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,d as PostDetailPage,p as PublishPage,m as SearchPage,h as SearchResultPage,g as SettingsPage,_ as UserFollowPage,f as UserProfilePage,v as VideoDetailPage,b as VideoListPage,y as VideoListSkeleton};
|
package/dist/ui.d.mts
CHANGED
|
@@ -17,7 +17,6 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./component
|
|
|
17
17
|
import { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor } from "./components/ui/combobox.mjs";
|
|
18
18
|
import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "./components/ui/context-menu.mjs";
|
|
19
19
|
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./components/ui/dialog.mjs";
|
|
20
|
-
import { DotsLoading } from "./components/ui/dots-loading.mjs";
|
|
21
20
|
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from "./components/ui/drawer.mjs";
|
|
22
21
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/ui/dropdown-menu.mjs";
|
|
23
22
|
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, EmptyType } from "./components/ui/empty.mjs";
|
|
@@ -31,6 +30,7 @@ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGr
|
|
|
31
30
|
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./components/ui/item.mjs";
|
|
32
31
|
import { Kbd, KbdGroup } from "./components/ui/kbd.mjs";
|
|
33
32
|
import { List, ListItem } from "./components/ui/list.mjs";
|
|
33
|
+
import { Loading } from "./components/ui/loading.mjs";
|
|
34
34
|
import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./components/ui/menubar.mjs";
|
|
35
35
|
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "./components/ui/native-select.mjs";
|
|
36
36
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/ui/pagination.mjs";
|
|
@@ -55,4 +55,4 @@ import { ToggleGroup, ToggleGroupItem } from "./components/ui/toggle-group.mjs";
|
|
|
55
55
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/ui/tooltip.mjs";
|
|
56
56
|
import { WheelPicker, WheelPickerClassNames, WheelPickerOption, WheelPickerWrapper } from "./components/ui/wheel-picker.mjs";
|
|
57
57
|
import { toast } from "sonner";
|
|
58
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BaseImageProps, Box, BoxAs, BoxComponentProps, BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CommonImageProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger,
|
|
58
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BaseImageProps, Box, BoxAs, BoxComponentProps, BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CommonImageProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, EmptyType, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize, InfiniteScroll, InfiniteScrollProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, List, ListItem, Loading, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, NativeSelectOptGroup, NativeSelectOption, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextAs, TextComponentProps, TextProps, Textarea, Time, TimeMode, TimeProps, TimeValue, TimeValueUnit, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WheelPicker, WheelPickerClassNames, WheelPickerOption, WheelPickerWrapper, badgeVariants, buttonGroupVariants, buttonVariants, normalizeTimeToMilliseconds, tabsListVariants, toast, toggleVariants, useCarousel, useComboboxAnchor };
|
package/dist/ui.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{Accordion as e,AccordionContent as t,AccordionItem as n,AccordionTrigger as r}from"./components/ui/accordion.mjs";import{Alert as i,AlertAction as a,AlertDescription as o,AlertTitle as s}from"./components/ui/alert.mjs";import{Button as c,buttonVariants as l}from"./components/ui/button.mjs";import{AlertDialog as u,AlertDialogAction as d,AlertDialogCancel as f,AlertDialogContent as p,AlertDialogDescription as m,AlertDialogFooter as h,AlertDialogHeader as g,AlertDialogMedia as _,AlertDialogOverlay as v,AlertDialogPortal as y,AlertDialogTitle as b,AlertDialogTrigger as x}from"./components/ui/alert-dialog.mjs";import{AspectRatio as S}from"./components/ui/aspect-ratio.mjs";import{Image as C}from"./components/ui/image.mjs";import{Avatar as w,AvatarBadge as T,AvatarFallback as E,AvatarGroup as D,AvatarGroupCount as O,AvatarImage as k}from"./components/ui/avatar.mjs";import{Badge as A,badgeVariants as j}from"./components/ui/badge.mjs";import{Box as M}from"./components/ui/box.mjs";import{Breadcrumb as N,BreadcrumbEllipsis as P,BreadcrumbItem as F,BreadcrumbLink as I,BreadcrumbList as L,BreadcrumbPage as R,BreadcrumbSeparator as z}from"./components/ui/breadcrumb.mjs";import{Separator as B}from"./components/ui/separator.mjs";import{ButtonGroup as V,ButtonGroupSeparator as H,ButtonGroupText as U,buttonGroupVariants as W}from"./components/ui/button-group.mjs";import{Card as G,CardAction as K,CardContent as q,CardDescription as J,CardFooter as Y,CardHeader as X,CardTitle as Z}from"./components/ui/card.mjs";import{Carousel as Q,CarouselContent as $,CarouselItem as ee,CarouselNext as te,CarouselPrevious as ne,useCarousel as re}from"./components/ui/carousel.mjs";import{Checkbox as ie}from"./components/ui/checkbox.mjs";import{Collapsible as ae,CollapsibleContent as oe,CollapsibleTrigger as se}from"./components/ui/collapsible.mjs";import{Input as ce}from"./components/ui/input.mjs";import{Textarea as le}from"./components/ui/textarea.mjs";import{InputGroup as ue,InputGroupAddon as de,InputGroupButton as fe,InputGroupInput as pe,InputGroupText as me,InputGroupTextarea as he}from"./components/ui/input-group.mjs";import{Combobox as ge,ComboboxChip as _e,ComboboxChips as ve,ComboboxChipsInput as ye,ComboboxCollection as be,ComboboxContent as xe,ComboboxEmpty as Se,ComboboxGroup as Ce,ComboboxInput as we,ComboboxItem as Te,ComboboxLabel as Ee,ComboboxList as De,ComboboxSeparator as Oe,ComboboxTrigger as ke,ComboboxValue as Ae,useComboboxAnchor as je}from"./components/ui/combobox.mjs";import{ContextMenu as Me,ContextMenuCheckboxItem as Ne,ContextMenuContent as Pe,ContextMenuGroup as Fe,ContextMenuItem as Ie,ContextMenuLabel as Le,ContextMenuPortal as Re,ContextMenuRadioGroup as ze,ContextMenuRadioItem as Be,ContextMenuSeparator as Ve,ContextMenuShortcut as He,ContextMenuSub as Ue,ContextMenuSubContent as We,ContextMenuSubTrigger as Ge,ContextMenuTrigger as Ke}from"./components/ui/context-menu.mjs";import{Dialog as qe,DialogClose as Je,DialogContent as Ye,DialogDescription as Xe,DialogFooter as Ze,DialogHeader as Qe,DialogOverlay as $e,DialogPortal as et,DialogTitle as tt,DialogTrigger as nt}from"./components/ui/dialog.mjs";import{DotsLoading as rt}from"./components/ui/dots-loading.mjs";import{Drawer as it,DrawerClose as at,DrawerContent as ot,DrawerDescription as st,DrawerFooter as ct,DrawerHeader as lt,DrawerOverlay as ut,DrawerPortal as dt,DrawerTitle as ft,DrawerTrigger as pt}from"./components/ui/drawer.mjs";import{DropdownMenu as mt,DropdownMenuCheckboxItem as ht,DropdownMenuContent as gt,DropdownMenuGroup as _t,DropdownMenuItem as vt,DropdownMenuLabel as yt,DropdownMenuPortal as bt,DropdownMenuRadioGroup as xt,DropdownMenuRadioItem as St,DropdownMenuSeparator as Ct,DropdownMenuShortcut as wt,DropdownMenuSub as Tt,DropdownMenuSubContent as Et,DropdownMenuSubTrigger as Dt,DropdownMenuTrigger as Ot}from"./components/ui/dropdown-menu.mjs";import{Empty as kt,EmptyContent as At,EmptyDescription as jt,EmptyHeader as Mt,EmptyMedia as Nt,EmptyState as Pt,EmptyTitle as Ft}from"./components/ui/empty.mjs";import{Label as It}from"./components/ui/label.mjs";import{Field as Lt,FieldContent as Rt,FieldDescription as zt,FieldError as Bt,FieldGroup as Vt,FieldLabel as Ht,FieldLegend as Ut,FieldSeparator as Wt,FieldSet as Gt,FieldTitle as Kt}from"./components/ui/field.mjs";import{HoverCard as qt,HoverCardContent as Jt,HoverCardTrigger as Yt}from"./components/ui/hover-card.mjs";import{InfiniteScroll as Xt}from"./components/ui/infinite-scroll.mjs";import{Item as Zt,ItemActions as Qt,ItemContent as $t,ItemDescription as en,ItemFooter as tn,ItemGroup as nn,ItemHeader as rn,ItemMedia as an,ItemSeparator as on,ItemTitle as sn}from"./components/ui/item.mjs";import{Kbd as cn,KbdGroup as ln}from"./components/ui/kbd.mjs";import{List as un,ListItem as dn}from"./components/ui/list.mjs";import{Menubar as fn,MenubarCheckboxItem as pn,MenubarContent as mn,MenubarGroup as hn,MenubarItem as gn,MenubarLabel as _n,MenubarMenu as vn,MenubarPortal as yn,MenubarRadioGroup as bn,MenubarRadioItem as xn,MenubarSeparator as Sn,MenubarShortcut as Cn,MenubarSub as wn,MenubarSubContent as Tn,MenubarSubTrigger as En,MenubarTrigger as Dn}from"./components/ui/menubar.mjs";import{NativeSelect as On,NativeSelectOptGroup as kn,NativeSelectOption as An}from"./components/ui/native-select.mjs";import{Pagination as jn,PaginationContent as Mn,PaginationEllipsis as Nn,PaginationItem as Pn,PaginationLink as Fn,PaginationNext as In,PaginationPrevious as Ln}from"./components/ui/pagination.mjs";import{Popover as Rn,PopoverContent as zn,PopoverDescription as Bn,PopoverHeader as Vn,PopoverTitle as Hn,PopoverTrigger as Un}from"./components/ui/popover.mjs";import{Progress as Wn,ProgressIndicator as Gn,ProgressLabel as Kn,ProgressTrack as qn,ProgressValue as Jn}from"./components/ui/progress.mjs";import{RadioGroup as Yn,RadioGroupItem as Xn}from"./components/ui/radio-group.mjs";import{ScrollArea as Zn,ScrollBar as Qn}from"./components/ui/scroll-area.mjs";import{Select as $n,SelectContent as er,SelectGroup as tr,SelectItem as nr,SelectLabel as rr,SelectScrollDownButton as ir,SelectScrollUpButton as ar,SelectSeparator as or,SelectTrigger as sr,SelectValue as cr}from"./components/ui/select.mjs";import{Sheet as lr,SheetClose as ur,SheetContent as dr,SheetDescription as fr,SheetFooter as pr,SheetHeader as mr,SheetTitle as hr,SheetTrigger as gr}from"./components/ui/sheet.mjs";import{Skeleton as _r}from"./components/ui/skeleton.mjs";import{Slider as vr}from"./components/ui/slider.mjs";import{Toaster as yr}from"./components/ui/sonner.mjs";import{Spinner as br}from"./components/ui/spinner.mjs";import{Switch as xr}from"./components/ui/switch.mjs";import{Table as Sr,TableBody as Cr,TableCaption as wr,TableCell as Tr,TableFooter as Er,TableHead as Dr,TableHeader as Or,TableRow as kr}from"./components/ui/table.mjs";import{Tabs as Ar,TabsContent as jr,TabsList as Mr,TabsTrigger as Nr,tabsListVariants as Pr}from"./components/ui/tabs.mjs";import{Text as Fr}from"./components/ui/text.mjs";import{Time as Ir,normalizeTimeToMilliseconds as Lr}from"./components/ui/time.mjs";import{Toggle as Rr,toggleVariants as zr}from"./components/ui/toggle.mjs";import{ToggleGroup as Br,ToggleGroupItem as Vr}from"./components/ui/toggle-group.mjs";import{Tooltip as Hr,TooltipContent as Ur,TooltipProvider as Wr,TooltipTrigger as Gr}from"./components/ui/tooltip.mjs";import{WheelPicker as Kr,WheelPickerWrapper as qr}from"./components/ui/wheel-picker.mjs";import{toast as Jr}from"sonner";export{e as Accordion,t as AccordionContent,n as AccordionItem,r as AccordionTrigger,i as Alert,a as AlertAction,o as AlertDescription,u as AlertDialog,d as AlertDialogAction,f as AlertDialogCancel,p as AlertDialogContent,m as AlertDialogDescription,h as AlertDialogFooter,g as AlertDialogHeader,_ as AlertDialogMedia,v as AlertDialogOverlay,y as AlertDialogPortal,b as AlertDialogTitle,x as AlertDialogTrigger,s as AlertTitle,S as AspectRatio,w as Avatar,T as AvatarBadge,E as AvatarFallback,D as AvatarGroup,O as AvatarGroupCount,k as AvatarImage,A as Badge,M as Box,N as Breadcrumb,P as BreadcrumbEllipsis,F as BreadcrumbItem,I as BreadcrumbLink,L as BreadcrumbList,R as BreadcrumbPage,z as BreadcrumbSeparator,c as Button,V as ButtonGroup,H as ButtonGroupSeparator,U as ButtonGroupText,G as Card,K as CardAction,q as CardContent,J as CardDescription,Y as CardFooter,X as CardHeader,Z as CardTitle,Q as Carousel,$ as CarouselContent,ee as CarouselItem,te as CarouselNext,ne as CarouselPrevious,ie as Checkbox,ae as Collapsible,oe as CollapsibleContent,se as CollapsibleTrigger,ge as Combobox,_e as ComboboxChip,ve as ComboboxChips,ye as ComboboxChipsInput,be as ComboboxCollection,xe as ComboboxContent,Se as ComboboxEmpty,Ce as ComboboxGroup,we as ComboboxInput,Te as ComboboxItem,Ee as ComboboxLabel,De as ComboboxList,Oe as ComboboxSeparator,ke as ComboboxTrigger,Ae as ComboboxValue,Me as ContextMenu,Ne as ContextMenuCheckboxItem,Pe as ContextMenuContent,Fe as ContextMenuGroup,Ie as ContextMenuItem,Le as ContextMenuLabel,Re as ContextMenuPortal,ze as ContextMenuRadioGroup,Be as ContextMenuRadioItem,Ve as ContextMenuSeparator,He as ContextMenuShortcut,Ue as ContextMenuSub,We as ContextMenuSubContent,Ge as ContextMenuSubTrigger,Ke as ContextMenuTrigger,qe as Dialog,Je as DialogClose,Ye as DialogContent,Xe as DialogDescription,Ze as DialogFooter,Qe as DialogHeader,$e as DialogOverlay,et as DialogPortal,tt as DialogTitle,nt as DialogTrigger,rt as DotsLoading,it as Drawer,at as DrawerClose,ot as DrawerContent,st as DrawerDescription,ct as DrawerFooter,lt as DrawerHeader,ut as DrawerOverlay,dt as DrawerPortal,ft as DrawerTitle,pt as DrawerTrigger,mt as DropdownMenu,ht as DropdownMenuCheckboxItem,gt as DropdownMenuContent,_t as DropdownMenuGroup,vt as DropdownMenuItem,yt as DropdownMenuLabel,bt as DropdownMenuPortal,xt as DropdownMenuRadioGroup,St as DropdownMenuRadioItem,Ct as DropdownMenuSeparator,wt as DropdownMenuShortcut,Tt as DropdownMenuSub,Et as DropdownMenuSubContent,Dt as DropdownMenuSubTrigger,Ot as DropdownMenuTrigger,kt as Empty,At as EmptyContent,jt as EmptyDescription,Mt as EmptyHeader,Nt as EmptyMedia,Pt as EmptyState,Ft as EmptyTitle,Lt as Field,Rt as FieldContent,zt as FieldDescription,Bt as FieldError,Vt as FieldGroup,Ht as FieldLabel,Ut as FieldLegend,Wt as FieldSeparator,Gt as FieldSet,Kt as FieldTitle,qt as HoverCard,Jt as HoverCardContent,Yt as HoverCardTrigger,C as Image,Xt as InfiniteScroll,ce as Input,ue as InputGroup,de as InputGroupAddon,fe as InputGroupButton,pe as InputGroupInput,me as InputGroupText,he as InputGroupTextarea,Zt as Item,Qt as ItemActions,$t as ItemContent,en as ItemDescription,tn as ItemFooter,nn as ItemGroup,rn as ItemHeader,an as ItemMedia,on as ItemSeparator,sn as ItemTitle,cn as Kbd,ln as KbdGroup,It as Label,un as List,dn as ListItem,fn as Menubar,pn as MenubarCheckboxItem,mn as MenubarContent,hn as MenubarGroup,gn as MenubarItem,_n as MenubarLabel,vn as MenubarMenu,yn as MenubarPortal,bn as MenubarRadioGroup,xn as MenubarRadioItem,Sn as MenubarSeparator,Cn as MenubarShortcut,wn as MenubarSub,Tn as MenubarSubContent,En as MenubarSubTrigger,Dn as MenubarTrigger,On as NativeSelect,kn as NativeSelectOptGroup,An as NativeSelectOption,jn as Pagination,Mn as PaginationContent,Nn as PaginationEllipsis,Pn as PaginationItem,Fn as PaginationLink,In as PaginationNext,Ln as PaginationPrevious,Rn as Popover,zn as PopoverContent,Bn as PopoverDescription,Vn as PopoverHeader,Hn as PopoverTitle,Un as PopoverTrigger,Wn as Progress,Gn as ProgressIndicator,Kn as ProgressLabel,qn as ProgressTrack,Jn as ProgressValue,Yn as RadioGroup,Xn as RadioGroupItem,Zn as ScrollArea,Qn as ScrollBar,$n as Select,er as SelectContent,tr as SelectGroup,nr as SelectItem,rr as SelectLabel,ir as SelectScrollDownButton,ar as SelectScrollUpButton,or as SelectSeparator,sr as SelectTrigger,cr as SelectValue,B as Separator,lr as Sheet,ur as SheetClose,dr as SheetContent,fr as SheetDescription,pr as SheetFooter,mr as SheetHeader,hr as SheetTitle,gr as SheetTrigger,_r as Skeleton,vr as Slider,br as Spinner,xr as Switch,Sr as Table,Cr as TableBody,wr as TableCaption,Tr as TableCell,Er as TableFooter,Dr as TableHead,Or as TableHeader,kr as TableRow,Ar as Tabs,jr as TabsContent,Mr as TabsList,Nr as TabsTrigger,Fr as Text,le as Textarea,Ir as Time,yr as Toaster,Rr as Toggle,Br as ToggleGroup,Vr as ToggleGroupItem,Hr as Tooltip,Ur as TooltipContent,Wr as TooltipProvider,Gr as TooltipTrigger,Kr as WheelPicker,qr as WheelPickerWrapper,j as badgeVariants,W as buttonGroupVariants,l as buttonVariants,Lr as normalizeTimeToMilliseconds,Pr as tabsListVariants,Jr as toast,zr as toggleVariants,re as useCarousel,je as useComboboxAnchor};
|
|
2
|
+
import{Accordion as e,AccordionContent as t,AccordionItem as n,AccordionTrigger as r}from"./components/ui/accordion.mjs";import{Alert as i,AlertAction as a,AlertDescription as o,AlertTitle as s}from"./components/ui/alert.mjs";import{Button as c,buttonVariants as l}from"./components/ui/button.mjs";import{AlertDialog as u,AlertDialogAction as d,AlertDialogCancel as f,AlertDialogContent as p,AlertDialogDescription as m,AlertDialogFooter as h,AlertDialogHeader as g,AlertDialogMedia as _,AlertDialogOverlay as v,AlertDialogPortal as y,AlertDialogTitle as b,AlertDialogTrigger as x}from"./components/ui/alert-dialog.mjs";import{AspectRatio as S}from"./components/ui/aspect-ratio.mjs";import{Image as C}from"./components/ui/image.mjs";import{Avatar as w,AvatarBadge as T,AvatarFallback as E,AvatarGroup as D,AvatarGroupCount as O,AvatarImage as k}from"./components/ui/avatar.mjs";import{Badge as A,badgeVariants as j}from"./components/ui/badge.mjs";import{Box as M}from"./components/ui/box.mjs";import{Breadcrumb as N,BreadcrumbEllipsis as P,BreadcrumbItem as F,BreadcrumbLink as I,BreadcrumbList as L,BreadcrumbPage as R,BreadcrumbSeparator as z}from"./components/ui/breadcrumb.mjs";import{Separator as B}from"./components/ui/separator.mjs";import{ButtonGroup as V,ButtonGroupSeparator as H,ButtonGroupText as U,buttonGroupVariants as W}from"./components/ui/button-group.mjs";import{Card as G,CardAction as K,CardContent as q,CardDescription as J,CardFooter as Y,CardHeader as X,CardTitle as Z}from"./components/ui/card.mjs";import{Carousel as Q,CarouselContent as $,CarouselItem as ee,CarouselNext as te,CarouselPrevious as ne,useCarousel as re}from"./components/ui/carousel.mjs";import{Checkbox as ie}from"./components/ui/checkbox.mjs";import{Collapsible as ae,CollapsibleContent as oe,CollapsibleTrigger as se}from"./components/ui/collapsible.mjs";import{Input as ce}from"./components/ui/input.mjs";import{Textarea as le}from"./components/ui/textarea.mjs";import{InputGroup as ue,InputGroupAddon as de,InputGroupButton as fe,InputGroupInput as pe,InputGroupText as me,InputGroupTextarea as he}from"./components/ui/input-group.mjs";import{Combobox as ge,ComboboxChip as _e,ComboboxChips as ve,ComboboxChipsInput as ye,ComboboxCollection as be,ComboboxContent as xe,ComboboxEmpty as Se,ComboboxGroup as Ce,ComboboxInput as we,ComboboxItem as Te,ComboboxLabel as Ee,ComboboxList as De,ComboboxSeparator as Oe,ComboboxTrigger as ke,ComboboxValue as Ae,useComboboxAnchor as je}from"./components/ui/combobox.mjs";import{ContextMenu as Me,ContextMenuCheckboxItem as Ne,ContextMenuContent as Pe,ContextMenuGroup as Fe,ContextMenuItem as Ie,ContextMenuLabel as Le,ContextMenuPortal as Re,ContextMenuRadioGroup as ze,ContextMenuRadioItem as Be,ContextMenuSeparator as Ve,ContextMenuShortcut as He,ContextMenuSub as Ue,ContextMenuSubContent as We,ContextMenuSubTrigger as Ge,ContextMenuTrigger as Ke}from"./components/ui/context-menu.mjs";import{Dialog as qe,DialogClose as Je,DialogContent as Ye,DialogDescription as Xe,DialogFooter as Ze,DialogHeader as Qe,DialogOverlay as $e,DialogPortal as et,DialogTitle as tt,DialogTrigger as nt}from"./components/ui/dialog.mjs";import{Drawer as rt,DrawerClose as it,DrawerContent as at,DrawerDescription as ot,DrawerFooter as st,DrawerHeader as ct,DrawerOverlay as lt,DrawerPortal as ut,DrawerTitle as dt,DrawerTrigger as ft}from"./components/ui/drawer.mjs";import{DropdownMenu as pt,DropdownMenuCheckboxItem as mt,DropdownMenuContent as ht,DropdownMenuGroup as gt,DropdownMenuItem as _t,DropdownMenuLabel as vt,DropdownMenuPortal as yt,DropdownMenuRadioGroup as bt,DropdownMenuRadioItem as xt,DropdownMenuSeparator as St,DropdownMenuShortcut as Ct,DropdownMenuSub as wt,DropdownMenuSubContent as Tt,DropdownMenuSubTrigger as Et,DropdownMenuTrigger as Dt}from"./components/ui/dropdown-menu.mjs";import{Empty as Ot,EmptyContent as kt,EmptyDescription as At,EmptyHeader as jt,EmptyMedia as Mt,EmptyState as Nt,EmptyTitle as Pt}from"./components/ui/empty.mjs";import{Label as Ft}from"./components/ui/label.mjs";import{Field as It,FieldContent as Lt,FieldDescription as Rt,FieldError as zt,FieldGroup as Bt,FieldLabel as Vt,FieldLegend as Ht,FieldSeparator as Ut,FieldSet as Wt,FieldTitle as Gt}from"./components/ui/field.mjs";import{HoverCard as Kt,HoverCardContent as qt,HoverCardTrigger as Jt}from"./components/ui/hover-card.mjs";import{InfiniteScroll as Yt}from"./components/ui/infinite-scroll.mjs";import{Item as Xt,ItemActions as Zt,ItemContent as Qt,ItemDescription as $t,ItemFooter as en,ItemGroup as tn,ItemHeader as nn,ItemMedia as rn,ItemSeparator as an,ItemTitle as on}from"./components/ui/item.mjs";import{Kbd as sn,KbdGroup as cn}from"./components/ui/kbd.mjs";import{List as ln,ListItem as un}from"./components/ui/list.mjs";import{Text as dn}from"./components/ui/text.mjs";import fn from"./components/ui/loading.mjs";import{Menubar as pn,MenubarCheckboxItem as mn,MenubarContent as hn,MenubarGroup as gn,MenubarItem as _n,MenubarLabel as vn,MenubarMenu as yn,MenubarPortal as bn,MenubarRadioGroup as xn,MenubarRadioItem as Sn,MenubarSeparator as Cn,MenubarShortcut as wn,MenubarSub as Tn,MenubarSubContent as En,MenubarSubTrigger as Dn,MenubarTrigger as On}from"./components/ui/menubar.mjs";import{NativeSelect as kn,NativeSelectOptGroup as An,NativeSelectOption as jn}from"./components/ui/native-select.mjs";import{Pagination as Mn,PaginationContent as Nn,PaginationEllipsis as Pn,PaginationItem as Fn,PaginationLink as In,PaginationNext as Ln,PaginationPrevious as Rn}from"./components/ui/pagination.mjs";import{Popover as zn,PopoverContent as Bn,PopoverDescription as Vn,PopoverHeader as Hn,PopoverTitle as Un,PopoverTrigger as Wn}from"./components/ui/popover.mjs";import{Progress as Gn,ProgressIndicator as Kn,ProgressLabel as qn,ProgressTrack as Jn,ProgressValue as Yn}from"./components/ui/progress.mjs";import{RadioGroup as Xn,RadioGroupItem as Zn}from"./components/ui/radio-group.mjs";import{ScrollArea as Qn,ScrollBar as $n}from"./components/ui/scroll-area.mjs";import{Select as er,SelectContent as tr,SelectGroup as nr,SelectItem as rr,SelectLabel as ir,SelectScrollDownButton as ar,SelectScrollUpButton as or,SelectSeparator as sr,SelectTrigger as cr,SelectValue as lr}from"./components/ui/select.mjs";import{Sheet as ur,SheetClose as dr,SheetContent as fr,SheetDescription as pr,SheetFooter as mr,SheetHeader as hr,SheetTitle as gr,SheetTrigger as _r}from"./components/ui/sheet.mjs";import{Skeleton as vr}from"./components/ui/skeleton.mjs";import{Slider as yr}from"./components/ui/slider.mjs";import{Toaster as br}from"./components/ui/sonner.mjs";import{Spinner as xr}from"./components/ui/spinner.mjs";import{Switch as Sr}from"./components/ui/switch.mjs";import{Table as Cr,TableBody as wr,TableCaption as Tr,TableCell as Er,TableFooter as Dr,TableHead as Or,TableHeader as kr,TableRow as Ar}from"./components/ui/table.mjs";import{Tabs as jr,TabsContent as Mr,TabsList as Nr,TabsTrigger as Pr,tabsListVariants as Fr}from"./components/ui/tabs.mjs";import{Time as Ir,normalizeTimeToMilliseconds as Lr}from"./components/ui/time.mjs";import{Toggle as Rr,toggleVariants as zr}from"./components/ui/toggle.mjs";import{ToggleGroup as Br,ToggleGroupItem as Vr}from"./components/ui/toggle-group.mjs";import{Tooltip as Hr,TooltipContent as Ur,TooltipProvider as Wr,TooltipTrigger as Gr}from"./components/ui/tooltip.mjs";import{WheelPicker as Kr,WheelPickerWrapper as qr}from"./components/ui/wheel-picker.mjs";import{toast as Jr}from"sonner";export{e as Accordion,t as AccordionContent,n as AccordionItem,r as AccordionTrigger,i as Alert,a as AlertAction,o as AlertDescription,u as AlertDialog,d as AlertDialogAction,f as AlertDialogCancel,p as AlertDialogContent,m as AlertDialogDescription,h as AlertDialogFooter,g as AlertDialogHeader,_ as AlertDialogMedia,v as AlertDialogOverlay,y as AlertDialogPortal,b as AlertDialogTitle,x as AlertDialogTrigger,s as AlertTitle,S as AspectRatio,w as Avatar,T as AvatarBadge,E as AvatarFallback,D as AvatarGroup,O as AvatarGroupCount,k as AvatarImage,A as Badge,M as Box,N as Breadcrumb,P as BreadcrumbEllipsis,F as BreadcrumbItem,I as BreadcrumbLink,L as BreadcrumbList,R as BreadcrumbPage,z as BreadcrumbSeparator,c as Button,V as ButtonGroup,H as ButtonGroupSeparator,U as ButtonGroupText,G as Card,K as CardAction,q as CardContent,J as CardDescription,Y as CardFooter,X as CardHeader,Z as CardTitle,Q as Carousel,$ as CarouselContent,ee as CarouselItem,te as CarouselNext,ne as CarouselPrevious,ie as Checkbox,ae as Collapsible,oe as CollapsibleContent,se as CollapsibleTrigger,ge as Combobox,_e as ComboboxChip,ve as ComboboxChips,ye as ComboboxChipsInput,be as ComboboxCollection,xe as ComboboxContent,Se as ComboboxEmpty,Ce as ComboboxGroup,we as ComboboxInput,Te as ComboboxItem,Ee as ComboboxLabel,De as ComboboxList,Oe as ComboboxSeparator,ke as ComboboxTrigger,Ae as ComboboxValue,Me as ContextMenu,Ne as ContextMenuCheckboxItem,Pe as ContextMenuContent,Fe as ContextMenuGroup,Ie as ContextMenuItem,Le as ContextMenuLabel,Re as ContextMenuPortal,ze as ContextMenuRadioGroup,Be as ContextMenuRadioItem,Ve as ContextMenuSeparator,He as ContextMenuShortcut,Ue as ContextMenuSub,We as ContextMenuSubContent,Ge as ContextMenuSubTrigger,Ke as ContextMenuTrigger,qe as Dialog,Je as DialogClose,Ye as DialogContent,Xe as DialogDescription,Ze as DialogFooter,Qe as DialogHeader,$e as DialogOverlay,et as DialogPortal,tt as DialogTitle,nt as DialogTrigger,rt as Drawer,it as DrawerClose,at as DrawerContent,ot as DrawerDescription,st as DrawerFooter,ct as DrawerHeader,lt as DrawerOverlay,ut as DrawerPortal,dt as DrawerTitle,ft as DrawerTrigger,pt as DropdownMenu,mt as DropdownMenuCheckboxItem,ht as DropdownMenuContent,gt as DropdownMenuGroup,_t as DropdownMenuItem,vt as DropdownMenuLabel,yt as DropdownMenuPortal,bt as DropdownMenuRadioGroup,xt as DropdownMenuRadioItem,St as DropdownMenuSeparator,Ct as DropdownMenuShortcut,wt as DropdownMenuSub,Tt as DropdownMenuSubContent,Et as DropdownMenuSubTrigger,Dt as DropdownMenuTrigger,Ot as Empty,kt as EmptyContent,At as EmptyDescription,jt as EmptyHeader,Mt as EmptyMedia,Nt as EmptyState,Pt as EmptyTitle,It as Field,Lt as FieldContent,Rt as FieldDescription,zt as FieldError,Bt as FieldGroup,Vt as FieldLabel,Ht as FieldLegend,Ut as FieldSeparator,Wt as FieldSet,Gt as FieldTitle,Kt as HoverCard,qt as HoverCardContent,Jt as HoverCardTrigger,C as Image,Yt as InfiniteScroll,ce as Input,ue as InputGroup,de as InputGroupAddon,fe as InputGroupButton,pe as InputGroupInput,me as InputGroupText,he as InputGroupTextarea,Xt as Item,Zt as ItemActions,Qt as ItemContent,$t as ItemDescription,en as ItemFooter,tn as ItemGroup,nn as ItemHeader,rn as ItemMedia,an as ItemSeparator,on as ItemTitle,sn as Kbd,cn as KbdGroup,Ft as Label,ln as List,un as ListItem,fn as Loading,pn as Menubar,mn as MenubarCheckboxItem,hn as MenubarContent,gn as MenubarGroup,_n as MenubarItem,vn as MenubarLabel,yn as MenubarMenu,bn as MenubarPortal,xn as MenubarRadioGroup,Sn as MenubarRadioItem,Cn as MenubarSeparator,wn as MenubarShortcut,Tn as MenubarSub,En as MenubarSubContent,Dn as MenubarSubTrigger,On as MenubarTrigger,kn as NativeSelect,An as NativeSelectOptGroup,jn as NativeSelectOption,Mn as Pagination,Nn as PaginationContent,Pn as PaginationEllipsis,Fn as PaginationItem,In as PaginationLink,Ln as PaginationNext,Rn as PaginationPrevious,zn as Popover,Bn as PopoverContent,Vn as PopoverDescription,Hn as PopoverHeader,Un as PopoverTitle,Wn as PopoverTrigger,Gn as Progress,Kn as ProgressIndicator,qn as ProgressLabel,Jn as ProgressTrack,Yn as ProgressValue,Xn as RadioGroup,Zn as RadioGroupItem,Qn as ScrollArea,$n as ScrollBar,er as Select,tr as SelectContent,nr as SelectGroup,rr as SelectItem,ir as SelectLabel,ar as SelectScrollDownButton,or as SelectScrollUpButton,sr as SelectSeparator,cr as SelectTrigger,lr as SelectValue,B as Separator,ur as Sheet,dr as SheetClose,fr as SheetContent,pr as SheetDescription,mr as SheetFooter,hr as SheetHeader,gr as SheetTitle,_r as SheetTrigger,vr as Skeleton,yr as Slider,xr as Spinner,Sr as Switch,Cr as Table,wr as TableBody,Tr as TableCaption,Er as TableCell,Dr as TableFooter,Or as TableHead,kr as TableHeader,Ar as TableRow,jr as Tabs,Mr as TabsContent,Nr as TabsList,Pr as TabsTrigger,dn as Text,le as Textarea,Ir as Time,br as Toaster,Rr as Toggle,Br as ToggleGroup,Vr as ToggleGroupItem,Hr as Tooltip,Ur as TooltipContent,Wr as TooltipProvider,Gr as TooltipTrigger,Kr as WheelPicker,qr as WheelPickerWrapper,j as badgeVariants,W as buttonGroupVariants,l as buttonVariants,Lr as normalizeTimeToMilliseconds,Fr as tabsListVariants,Jr as toast,zr as toggleVariants,re as useCarousel,je as useComboboxAnchor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defaultImageCompressionQuality as e
|
|
2
|
+
import{defaultImageCompressionQuality as e}from"./image-compression.mjs";async function t(t,r,i={}){let{fileType:a=`image/jpeg`,quality:o=e,maxWidth:s,maxHeight:c,circular:l=!1}=i,u=await n(t),d=document.createElement(`canvas`),f=d.getContext(`2d`);if(!f)throw Error(`无法获取 canvas 上下文`);let p=r.width,m=r.height;if(s||c){let e=s?p/s:1,t=c?m/c:1,n=Math.max(e,t);n>1&&(p/=n,m/=n)}return d.width=p,d.height=m,l&&(f.beginPath(),f.arc(p/2,m/2,p/2,0,2*Math.PI),f.closePath(),f.clip()),f.drawImage(u,r.x,r.y,r.width,r.height,0,0,p,m),new Promise((e,t)=>{d.toBlob(n=>{n?e(n):t(Error(`无法生成图片 Blob`))},a,o)})}function n(e){return new Promise((t,n)=>{let r=new Image;r.addEventListener(`load`,()=>t(r)),r.addEventListener(`error`,e=>n(e)),r.src=e})}export{t as getCroppedImg};
|
package/dist/utils/tools.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
function e(e){if(typeof e!=`number`||Number.isNaN(e))return`00:00`;e<0&&(e=0);let t=e,n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=e=>e.toString().padStart(2,`0`);return n>0?`${a(n)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}function t(
|
|
2
|
+
function e(e){if(typeof e!=`number`||Number.isNaN(e))return`00:00`;e<0&&(e=0);let t=e,n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=e=>e.toString().padStart(2,`0`);return n>0?`${a(n)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}function t(){return/iPhone|iPad|iPod/i.test(navigator.userAgent)}function n({id:e,contentType:t}){return t===0?`/video/${e}`:`/post/${e}`}function r(e){let{text:t=``,atUsers:n=[]}=e;return t.replace(/<@_user>(\w+)<\/@_user>/g,(e,t)=>`<span class="mention" data-id="${t}">@${n.find(e=>e.userId===t||e.user_id===t)?.name||``}</span>`)}function i(e,t){return t?.includes(`download`)||!e?!1:![`Mobile`,`Android`,`iPhone`,`iPad`,`iPod`,`BlackBerry`,`Windows Phone`,`Opera Mini`,`IEMobile`,`Mobile Safari`,`webOS`,`Kindle`,`Silk`,`Fennec`,`Maemo`,`Tablet`,`HarmonyOS`,`OpenHarmony`].some(t=>e.includes(t))}function a(){return i(navigator?.userAgent)}export{e as formatVideoDuration,n as getPostDetailPagePath,t as isMobileIOS,a as isPCEnv,r as replaceAtUserElementHtmlStr};
|