@shumai-one/shumai 0.3.1 → 0.3.2
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/bin/{chunk-sr9bty78.js → chunk-4hdnrwh1.js} +1 -1
- package/bin/{chunk-rrhq3t4s.js → chunk-4htdb0xp.js} +1 -1
- package/bin/{chunk-5e1xqaj4.js → chunk-6t3gdd7e.js} +1 -1
- package/bin/{chunk-7d4scsf6.js → chunk-7kzqkp5z.js} +1 -1
- package/bin/{chunk-8n60m9x3.js → chunk-7sh6409h.js} +1 -1
- package/bin/{chunk-8yz1expv.js → chunk-8e5zvy88.js} +1 -1
- package/bin/{chunk-mqbxagfd.js → chunk-9c7fxjej.js} +1 -1
- package/bin/{chunk-6gy7c4d7.js → chunk-beay9amy.js} +1 -1
- package/bin/{chunk-zx9cv3t8.js → chunk-d3s00sn0.js} +1 -1
- package/bin/{chunk-qgq96tbp.js → chunk-jstc7pka.js} +1 -1
- package/bin/{chunk-0ed7h2xm.js → chunk-k0a35mg9.js} +1 -1
- package/bin/{chunk-h270n69j.js → chunk-mm1j72a8.js} +1 -1
- package/bin/chunk-qn96vbke.js +2 -0
- package/bin/{chunk-vt4zpasm.js → chunk-rrxjvewm.js} +1 -1
- package/bin/{chunk-5s7c0qww.js → chunk-s5rfya1p.js} +1 -1
- package/bin/{chunk-ph11924k.js → chunk-scsy69bp.js} +1 -1
- package/bin/{chunk-nqh128dt.js → chunk-v2kfr8fx.js} +2 -2
- package/bin/{chunk-rfh4ppaa.js → chunk-xwmsxg5x.js} +1 -1
- package/bin/{chunk-pgae67hk.js → chunk-z0ej44ak.js} +2 -2
- package/bin/{chunk-a9t667xv.js → chunk-zemgtnk0.js} +1 -1
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +209 -195
- package/package.json +7 -7
- package/bin/chunk-bmqw3j2d.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as V}from"./chunk-
|
|
1
|
+
import{j as V}from"./chunk-k0a35mg9.js";import"./chunk-qn96vbke.js";import"./chunk-d3s00sn0.js";import"./chunk-8e5zvy88.js";import"./chunk-nzy3pjjm.js";import"./chunk-mm1j72a8.js";import"./chunk-9c7fxjej.js";import"./chunk-zhd2mkbr.js";import"./chunk-bdjhb77e.js";import"./chunk-p9xfyqh1.js";import"./chunk-31mjcykb.js";import"./chunk-hfp4hpca.js";import"./chunk-wrz9e73c.js";import"./chunk-1nh6xgek.js";import"./chunk-3rcc5s99.js";import"./chunk-20y3wte3.js";import{yf as U}from"./chunk-vnfmh5ke.js";import"./chunk-qc6dmzn0.js";import{Bf as N}from"./chunk-ve7v8wtv.js";import"./chunk-7y8dng8t.js";import"./chunk-3t7mjvdv.js";import"./chunk-z0ej44ak.js";import"./chunk-tsncwscz.js";import"./chunk-h2wsm7h3.js";import"./chunk-etces6ff.js";import"./chunk-yahb7wan.js";import"./chunk-mahxw48e.js";import"./chunk-wap08p4j.js";import{bh as K}from"./chunk-nr89225z.js";import{Ah as H,Mh as J,gh as Z,ih as q,nh as D,oh as G}from"./chunk-b1e3tec3.js";import{Xk as Y}from"./chunk-ws07a9kv.js";var W=Y(Z(),1);function _(){let{projectId:h}=$.useParams(),{teamId:v,ensureTeamIdForProject:w}=K();W.useEffect(()=>{w(h)},[h,w]);let{data:A}=G(U(h)),b=A?.rootFolder,{data:X}=D({queryKey:["folders",b],queryFn:async()=>{let B=await J.api.folders[":folderId"].$get({param:{folderId:b}});if(!B.ok)throw Error("failed to fetch folder");return await B.json()},enabled:!!b});if(!v||!b||!X)return q(N,{});return q(V,{teamId:v,projectId:h,projectName:A.name??"",assetId:b,rootFolderId:b})}var $=H("/projects/$projectId/")({component:_});export{$ as Route};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Eh as O,Fh as R,Kh as $,Mh as D,gh as
|
|
2
|
-
`);X=h.pop()||"";for(let u of h){let Y=u.trim();if(!Y)continue;if(Y.startsWith("data: ")){let y=Y.slice(6);try{let Q=JSON.parse(y);if(Q.type==="session"){if(!H.getState().currentSessionId)p({currentSessionId:Q.sessionId})}else if(Q.type==="entry"){let w=Q.entry,L=w;if(L.role==="toolResult"&&typeof L.toolName==="string"&&["create_file","create_folder","create_version"].includes(L.toolName)&&!L.isError)T?.();p((N)=>{let z=N.messages.some((q)=>q.id===w.id),Z=N.messages.filter((q)=>{if(w.role==="user"&&!z)return!(q.id.startsWith("temp-")&&!q.id.startsWith("temp-context-"));if(w.role==="custom"&&w.customType==="context_display_info"&&!z)return!q.id.startsWith("temp-context-");return!0}),B=Z.findIndex((q)=>q.id===w.id);if(B!==-1){let q=[...Z];return q[B]=w,{messages:q}}else return{messages:[...Z,w]}})}else if(Q.type==="done"){if(Q.status==="failed")$.error(Q.error||"Workflow failed")}}catch(Q){console.error("Error parsing SSE line:",Q)}}}}H.getState().fetchHistorySessions(c)}catch(K){let G=K instanceof Error?K.message:"Failed to send message";$.error(G),p((k)=>({messages:k.messages.filter((W)=>W.id!==J)}))}finally{p({isStreaming:!1})}},abortActiveSession:async(c)=>{let{currentSessionId:j,isStreaming:f}=H.getState();if(!j||!f)return;try{if((await D.api.teams[":teamId"].chat.sessions[":sessionId"].abort.$post({param:{teamId:c,sessionId:j}})).ok)$.success("Agent execution stopped");else throw Error("Failed to abort agent execution")}catch(F){let T=F instanceof Error?F.message:"Failed to abort execution";$.error(T)}}}));var U=b(
|
|
1
|
+
import{Eh as O,Fh as R,Kh as $,Mh as D,gh as l,nh as v}from"./chunk-b1e3tec3.js";import{Xk as b}from"./chunk-ws07a9kv.js";var E=null,I=R((p)=>({projectState:null,setProjectState:(c)=>{if(E)clearTimeout(E),E=null;p({projectState:c})},clearProjectState:()=>{if(E)clearTimeout(E);E=setTimeout(()=>{p({projectState:null}),E=null},10)}}));var H=R((p)=>({isChatbotOpen:!1,setIsChatbotOpen:(c)=>p({isChatbotOpen:c}),isHistoryMode:!1,setIsHistoryMode:(c)=>p({isHistoryMode:c}),currentSessionId:null,setCurrentSessionId:(c)=>p({currentSessionId:c}),chatAssets:[],addAssets:(c)=>p((j)=>{let f=new Set(j.chatAssets.map((T)=>T.id)),F=c.filter((T)=>!f.has(T.id));return{chatAssets:[...j.chatAssets,...F]}}),removeAsset:(c)=>p((j)=>({chatAssets:j.chatAssets.filter((f)=>f.id!==c)})),clearAssets:()=>p({chatAssets:[]}),messages:[],setMessages:(c)=>p({messages:c}),historySessions:[],setHistorySessions:(c)=>p({historySessions:c}),isStreaming:!1,setIsStreaming:(c)=>p({isStreaming:c}),selectedAgentId:null,setSelectedAgentId:(c)=>p({selectedAgentId:c}),inputText:"",setInputText:(c)=>p({inputText:c}),scrollTop:0,isAtBottom:!0,setScrollState:(c,j)=>p({scrollTop:c,isAtBottom:j}),fetchHistorySessions:async(c)=>{try{let j=await D.api.teams[":teamId"].chat.sessions.$get({param:{teamId:c},query:{first:"50"}});if(j.ok){let f=await j.json();p({historySessions:f.data||[]})}}catch(j){console.error("Failed to fetch history sessions:",j)}},loadSession:async(c,j)=>{try{let f=await D.api.teams[":teamId"].chat.sessions[":sessionId"].messages.$get({param:{teamId:c,sessionId:j}});if(f.ok){let F=await f.json(),P=H.getState().historySessions.find((J)=>J.id===j)?.agentId||null;p({currentSessionId:j,messages:F,isHistoryMode:!1,scrollTop:0,isAtBottom:!0,...P?{selectedAgentId:P}:{}})}else throw Error("Failed to load session messages")}catch(f){let F=f instanceof Error?f.message:"Failed to load session";$.error(F)}},deleteSession:async(c,j)=>{try{if((await D.api.teams[":teamId"].chat.sessions[":sessionId"].$delete({param:{teamId:c,sessionId:j}})).ok)$.success("Session deleted successfully"),p((F)=>({historySessions:F.historySessions.filter((T)=>T.id!==j),currentSessionId:F.currentSessionId===j?null:F.currentSessionId,messages:F.currentSessionId===j?[]:F.messages}));else throw Error("Failed to delete session")}catch(f){let F=f instanceof Error?f.message:"Failed to delete session";$.error(F)}},startNewSession:()=>{p({currentSessionId:null,messages:[],chatAssets:[],inputText:"",scrollTop:0,isAtBottom:!0})},sendMessage:async(c,j,f,F,T)=>{let P=H.getState();if(P.isStreaming)return;let J=`temp-${Date.now()}`,C={id:J,role:"user",content:[{type:"text",text:j}],timestamp:Date.now()},V=[...P.messages];if(P.chatAssets.length>0){let G={id:`temp-context-${Date.now()}`,role:"custom",customType:"context_display_info",details:{assets:P.chatAssets.map((k)=>({id:k.id,name:k.name,type:k.type}))},timestamp:Date.now()-1};V.push(G)}V.push(C),p({messages:V,isStreaming:!0,chatAssets:[],isAtBottom:!0});let A=P.chatAssets.map((K)=>K.id),_=P.selectedAgentId;if(!_){$.error("No agent selected");return}try{let K=await D.api.teams[":teamId"].chat.$post({param:{teamId:c},json:{agentId:_,textPrompt:j,assetIds:A,sessionId:P.currentSessionId||void 0,contextAssetId:F,projectId:f}});if(!K.ok)throw Error("Failed to start chat");let G=K.headers.get("x-session-id");if(G&&!P.currentSessionId)p({currentSessionId:G});let k=K.body?.getReader();if(!k)throw Error("No stream body");let W=new TextDecoder,X="";while(!0){let{done:M,value:S}=await k.read();if(M)break;X+=W.decode(S,{stream:!0});let h=X.split(`
|
|
2
|
+
`);X=h.pop()||"";for(let u of h){let Y=u.trim();if(!Y)continue;if(Y.startsWith("data: ")){let y=Y.slice(6);try{let Q=JSON.parse(y);if(Q.type==="session"){if(!H.getState().currentSessionId)p({currentSessionId:Q.sessionId})}else if(Q.type==="entry"){let w=Q.entry,L=w;if(L.role==="toolResult"&&typeof L.toolName==="string"&&["create_file","create_folder","create_version"].includes(L.toolName)&&!L.isError)T?.();p((N)=>{let z=N.messages.some((q)=>q.id===w.id),Z=N.messages.filter((q)=>{if(w.role==="user"&&!z)return!(q.id.startsWith("temp-")&&!q.id.startsWith("temp-context-"));if(w.role==="custom"&&w.customType==="context_display_info"&&!z)return!q.id.startsWith("temp-context-");return!0}),B=Z.findIndex((q)=>q.id===w.id);if(B!==-1){let q=[...Z];return q[B]=w,{messages:q}}else return{messages:[...Z,w]}})}else if(Q.type==="done"){if(Q.status==="failed")$.error(Q.error||"Workflow failed")}}catch(Q){console.error("Error parsing SSE line:",Q)}}}}H.getState().fetchHistorySessions(c)}catch(K){let G=K instanceof Error?K.message:"Failed to send message";$.error(G),p((k)=>({messages:k.messages.filter((W)=>W.id!==J)}))}finally{p({isStreaming:!1})}},abortActiveSession:async(c)=>{let{currentSessionId:j,isStreaming:f}=H.getState();if(!j||!f)return;try{if((await D.api.teams[":teamId"].chat.sessions[":sessionId"].abort.$post({param:{teamId:c,sessionId:j}})).ok)$.success("Agent execution stopped");else throw Error("Failed to abort agent execution")}catch(F){let T=F instanceof Error?F.message:"Failed to abort execution";$.error(T)}}}));var U=b(l(),1);function x(p){let c=p.match(/teams\/([^/]+)/);if(c)return{teamId:c[1]};let j=p.match(/projects\/([^/]+)/);if(j)return{projectId:j[1]};return{}}function s(){let[p,c]=U.useState(),j=O({select:(P)=>P.location.pathname}),{teamId:f,projectId:F}=x(j),{data:T}=v({queryKey:["projects",F,"team"],queryFn:async()=>{let P=await D.api.projects[":projectId"].team.$get({param:{projectId:F}});if(!P.ok)throw Error("failed to fetch project team");return await P.json()},enabled:!!F});return U.useEffect(()=>{if(f)c(f);else if(T?.teamId)c(T.teamId)},[f,T]),p}
|
|
3
3
|
export{s as ig,I as jg,H as kg};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as RB,i as bB}from"./chunk-
|
|
1
|
+
import{h as RB,i as bB}from"./chunk-rrxjvewm.js";import{k as gB}from"./chunk-qn96vbke.js";import{o as LB,r as MB}from"./chunk-8e5zvy88.js";import"./chunk-nzy3pjjm.js";import{P as NB}from"./chunk-9c7fxjej.js";import"./chunk-zhd2mkbr.js";import"./chunk-bdjhb77e.js";import{Wa as DB}from"./chunk-31mjcykb.js";import"./chunk-hfp4hpca.js";import"./chunk-3rcc5s99.js";import"./chunk-20y3wte3.js";import{Cf as kB}from"./chunk-ve7v8wtv.js";import"./chunk-7y8dng8t.js";import{jg as VB,kg as wB}from"./chunk-z0ej44ak.js";import"./chunk-tsncwscz.js";import{qg as EB}from"./chunk-etces6ff.js";import{rg as $B}from"./chunk-yahb7wan.js";import"./chunk-mahxw48e.js";import"./chunk-wap08p4j.js";import{bh as PB}from"./chunk-nr89225z.js";import{Ah as TB,Gi as _B,Mh as q,Wh as p,ak as UB,eh as d,gh as XB,hh as zB,hi as ZB,ih as G,ik as yB,jh as D,kh as HB,nh as j,ph as QB,vh as qB,xh as YB}from"./chunk-b1e3tec3.js";import{Xk as KB}from"./chunk-ws07a9kv.js";var $=KB(XB(),1);var tB=({item:J})=>{if(J.preview?.thumbnailUrl)return G("img",{src:J.preview.thumbnailUrl,alt:"Preview",className:"w-full h-full object-cover"});if(J.preview?.proxyType==="audio"||J.proxyType==="audio")return G("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:G(ZB,{className:"w-5 h-5 text-muted-foreground"})});return G("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:G(_B,{className:"w-5 h-5 text-muted-foreground"})})},OB=({projectId:J,currentAssetId:X,parentFolderId:Q,initialFiles:_,initialNextCursor:w})=>{let{ref:z,inView:k}=$B({threshold:0,rootMargin:"200px"}),T=$.useRef(null),N=$.useRef(!1),[O,y]=$.useState(_),[Z,R]=$.useState(w),[b,S]=$.useState(!!w),[L,P]=$.useState(!1);return $.useEffect(()=>{y(_),R(w),S(!!w),N.current=!1},[_,w]),$.useEffect(()=>{(async()=>{if(!Z||L||!k||!b)return;P(!0);try{let W=await q.api.folders[":folderId"].search.$post({param:{folderId:Q},json:{assetType:"file",after:Z,first:200,recursively:!1,conditions:[]}});if(!W.ok)throw Error("Failed to fetch next page");let g=await W.json(),M=g.data||[];y((f)=>[...f,...M]),R(g.pageInfo?.cursor||void 0),S(!!g.pageInfo?.cursor&&M.length>0)}catch(W){console.error("Error fetching next page:",W)}finally{P(!1)}})()},[k,Z,b,L,Q]),$.useEffect(()=>{N.current=!1},[X]),$.useEffect(()=>{if(O.some((W)=>W?.id===X)&&T.current&&!N.current)T.current.scrollIntoView({block:"center",inline:"center",behavior:"smooth"}),N.current=!0},[O,X]),G("div",{className:"h-24 md:h-full w-full md:w-24 bg-gray-100 dark:bg-gray-950 flex flex-row md:flex-col flex-shrink-0 select-none",children:D("div",{className:"flex-1 overflow-x-auto overflow-y-hidden md:overflow-y-auto md:overflow-x-hidden px-4 md:px-0 py-2 md:py-4 flex flex-row md:flex-col items-center gap-3 no-scrollbar",children:[O.map((H)=>{if(!H)return null;let W=H.id===X;return G("div",{ref:H.id===X?T:null,className:"flex-shrink-0",children:G(YB,{to:"/projects/$projectId/files/$fileId",params:{projectId:J,fileId:H.id},search:{version:void 0},className:UB("rounded-lg border overflow-hidden flex items-center justify-center transition-all bg-muted/30 block",W?"w-[62px] h-[62px] opacity-100":"w-[52px] h-[52px] opacity-60 hover:opacity-100"),children:G(tB,{item:H})})},H.id)}),b&&G("div",{ref:z,className:"px-2 md:px-0 py-2 md:py-4 flex justify-center items-center h-full md:w-full flex-shrink-0",children:L&&G(p,{className:"h-5 w-5 animate-spin text-muted-foreground"})})]})})};var Y=KB(XB(),1);function eB(){let{projectId:J,fileId:X}=WB.useParams(),Q=WB.useSearch(),_=Q.version,w=Q.start,z=_||X,k=Q.cmpLeft,T=Q.cmpRight,N=Q.cmpActive??"left",O=!!Q.compare&&!!k&&!!T,y=Y.useRef(null),{teamId:Z,ensureTeamIdForProject:R}=PB(),[b,S]=Y.useState(360),[L,P]=Y.useState([]),{fileViewRightSidebarCollapsed:H}=EB(),{isChatbotOpen:W}=wB(),[g,M]=Y.useState(0),[f,C]=Y.useState(null),[l,AB]=Y.useState(null),[xB,jB]=Y.useState(void 0),[A,I]=Y.useState({show:!1,files:[],nextCursor:void 0,folderId:void 0}),SB=q.api.files[":fileId"].metadata.$patch,{mutate:CB}=QB({mutationFn:async(B)=>{let K=await SB(B);if(!K.ok)throw Error("Failed to patch metadata");return await K.json()}}),hB=HB(),{members:FB,fetchMembers:n}=NB();Y.useEffect(()=>{R(J)},[J,R]),Y.useEffect(()=>{if(Z)n(Z,!0)},[Z,n]);let{data:o,isLoading:vB,isError:pB,isFetching:fB}=j({queryKey:["files",X],queryFn:async()=>{let B=await q.api.files[":fileId"].$get({param:{fileId:X}});if(!B.ok)throw Error("Failed to fetch stack");return await B.json()},enabled:!!Z,placeholderData:d}),{data:IB,isLoading:mB,isError:uB,isFetching:cB}=j({queryKey:["files",_],queryFn:async()=>{let B=await q.api.files[":fileId"].$get({param:{fileId:_}});if(!B.ok)throw Error("Failed to fetch version");return await B.json()},enabled:!!Z&&!!_,placeholderData:d}),{data:dB}=j({queryKey:["version_stacks",X,"versions"],queryFn:async()=>{let B=await q.api.version_stacks[":stackId"].versions.$get({param:{stackId:X}});if(!B.ok)throw Error("Failed to fetch versions");return await B.json()},enabled:!!J&&!!X&&(!!_||O)}),{data:x}=j({queryKey:["projects",J],queryFn:async()=>{let B=await q.api.projects[":projectId"].$get({param:{projectId:J}});if(!B.ok)throw Error("Failed to fetch project");return await B.json()}}),h=qB(),{setProjectState:a,clearProjectState:r}=VB(),lB=vB||!!_&&mB,nB=pB||!!_&&uB,oB=fB||!!_&&cB,U=IB||o,V=_?dB:o?.versionStack?.versions;Y.useEffect(()=>{if(U&&x&&Z)a({teamId:Z,projectId:J,projectName:x.name??"",ancestorFolders:U.ancestorFolders??[],currentAsset:{name:U.name,type:"file",version:V?V.find((B)=>B.id===z)?.version??V.length:void 0,proxyType:U.proxyType},isRootFolder:!1,fileId:X,downloadInfo:{originalKey:U.media?.original?.key,videoTranscodes:U.media?.videoTranscodes?.map((B)=>({key:B.key,width:B.width,height:B.height,isRaw:B.isRaw}))},versions:V,compareMode:O,canCompareVersions:(V?.length??0)>=2,onCompareVersions:()=>{let B=LB(V);if(!B)return;h({to:"/projects/$projectId/files/$fileId",params:{projectId:J,fileId:X},search:(K)=>({...K,version:void 0,compare:!0,cmpLeft:B.left.id,cmpRight:B.right.id,cmpActive:"left"})})},onFolderClick:(B)=>{h({to:"/projects/$projectId/folders/$folderId",params:{projectId:J,folderId:B}})}});return()=>r()},[Z,J,x,U,V,z,X,O,a,r,h]);let E=U?.ancestorFolders?.[0]?.id??x?.rootFolder??"";if(Y.useEffect(()=>{if(!E||!z)return;if(A.folderId===E)return;let B=!0;return(async()=>{try{let F="",t=!1,e=[],BB=void 0;for(let GB=0;GB<5;GB++){let JB=await q.api.folders[":folderId"].search.$post({param:{folderId:E},json:{assetType:"file",after:F,first:200,recursively:!1,conditions:[]}});if(!JB.ok)throw Error("Failed to search parent folder for carousel");let v=await JB.json(),c=v.data||[];if(e.push(...c),c.some((sB)=>sB.id===z)){t=!0,BB=v.pageInfo?.cursor||void 0;break}if(!v.pageInfo?.cursor||c.length<200)break;F=v.pageInfo.cursor}if(B)if(t)I({show:!0,files:e,nextCursor:BB,folderId:E});else I({show:!1,files:[],nextCursor:void 0,folderId:E})}catch(F){if(console.error(F),B)I({show:!1,files:[],nextCursor:void 0,folderId:E})}})(),()=>{B=!1}},[E,z,A.folderId]),Y.useEffect(()=>{M(0),C(null),P([])},[U?.id]),Y.useEffect(()=>{C(null),P([])},[l?.id]),lB&&!U)return G(kB,{});if(nB||!U||!x||!Z)return G("div",{children:yB.file_not_found()});let m=O?l:U,i=m?.id??z,aB=(B,K)=>{if(!Z)return;CB({param:{fileId:i},json:[{key:B,value:K}]},{onSuccess:()=>{hB.invalidateQueries({queryKey:["files",i]})}})},u=(B)=>{h({to:"/projects/$projectId/files/$fileId",params:{projectId:J,fileId:X},search:(K)=>({...K,...B})})},rB=()=>{u({compare:void 0,cmpLeft:void 0,cmpRight:void 0,cmpActive:void 0,version:N==="left"?k:T})},iB=(B)=>{C(B.id||null);let K=B.annotations;if(K&&K.length>0)P(K);else P([]);if(O){if(B.second!==null&&B.second!==void 0)jB({second:B.second,nonce:Date.now()});return}if(B.second!==null&&B.second!==void 0)y.current?.seekTo(B.second),y.current?.pause();else if(K&&K.length>0)y.current?.pause()},s=()=>{P([]),C(null)};return G("div",{className:"h-full flex flex-1 flex-col bg-background",children:D("div",{className:"h-full flex flex-1 overflow-hidden",children:[D("div",{className:"flex-1 relative",children:[oB&&!O&&G("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/50",children:G(p,{className:"h-8 w-8 animate-spin text-foreground"})}),O&&k&&T?G(bB,{versions:V??[],leftId:k,rightId:T,activeSide:N,annotations:L,seekRequest:xB,onActiveSideChange:(B)=>u({cmpActive:B}),onSwitchVersion:(B,K)=>u(B==="left"?{cmpLeft:K}:{cmpRight:K}),onExit:rB,onActiveAssetChange:AB,onPlay:s,onTimeUpdate:M}):G(RB,{file:U,mediaControllerRef:y,onPlay:s,onTimeUpdate:M,annotations:L,startTime:w,children:A.show&&G(OB,{projectId:J,currentAssetId:z,parentFolderId:E,initialFiles:A.files,initialNextCursor:A.nextCursor})})]}),(!H||W)&&D(zB,{children:[G(DB,{onResize:(B)=>{S((K)=>Math.max(300,Math.min(600,K-B)))},className:"hidden md:block"}),G("div",{style:{width:b},className:"flex-shrink-0 bg-background flex flex-col",children:W?G(gB,{projectId:J,contextAssetId:z}):G(MB,{teamId:Z,projectId:J,file:m,onSaveField:aB,members:FB,onCommentSelect:iB,currentTime:g,onTyping:()=>{if(O)return;y.current?.pause()},selectedCommentId:f,hideAnnotationControl:m?.proxyType==="audio"})})]})]})})}var WB=TB("/projects/$projectId/files/$fileId")({component:eB});export{WB as Route};
|
package/bin/shumai-app.html
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<meta name="theme-color" content="#ffffff" />
|
|
26
26
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
27
27
|
<title>Shumai</title>
|
|
28
|
-
<link rel="stylesheet" crossorigin href="./chunk-kgb16ggd.css"><script type="module" crossorigin src="./chunk-
|
|
28
|
+
<link rel="stylesheet" crossorigin href="./chunk-kgb16ggd.css"><script type="module" crossorigin src="./chunk-v2kfr8fx.js"></script></head>
|
|
29
29
|
<body>
|
|
30
30
|
<div id="root"></div>
|
|
31
31
|
|