efficient-shell 7.69.1 → 7.71.0
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/{Browser-LRVJXDWG.js → Browser-NFUPN5EC.js} +14 -14
- package/dist/Calculator-GQGK6DO3.js +29 -0
- package/dist/{CurrencyConverter-5TD75PPD.js → CurrencyConverter-UPCIPOFS.js} +8 -8
- package/dist/{Documents-NBWVAESC.js → Documents-JNWP623S.js} +27 -27
- package/dist/Files-ZHLMQ5IK.js +87 -0
- package/dist/{Notepad-7BCIFKPX.js → Notepad-37KKX6KP.js} +10 -10
- package/dist/{PomodoroTimer-7UMCISBX.js → PomodoroTimer-JPWZ4DDT.js} +11 -11
- package/dist/{Preview-45G54OG3.js → Preview-GESXUZK2.js} +22 -22
- package/dist/Sidebar-FS2PX6DU.js +43 -0
- package/dist/{Spreadsheet-JUMA322C.js → Spreadsheet-IFQINTC4.js} +14 -14
- package/dist/{Stock-LJYQ7DB6.js → Stock-FRUP3BIN.js} +3 -3
- package/dist/{Weather-LSXJPXLZ.js → Weather-MQOSCQQR.js} +17 -17
- package/dist/{WorldClock-K6T5CG2X.js → WorldClock-7GQYAE4T.js} +6 -6
- package/dist/ai/index.js +15 -15
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-RDLWLATO.js → chunk-3E27HV76.js} +2 -2
- package/dist/{chunk-GN5J7DL6.js → chunk-5G76CZPP.js} +2 -2
- package/dist/chunk-7FA25555.js +466 -0
- package/dist/{chunk-7B2YKMAZ.js → chunk-A5UR5LGU.js} +5 -5
- package/dist/chunk-BUIZD247.js +1 -0
- package/dist/chunk-F6FTF37T.js +46 -0
- package/dist/chunk-G5GERM76.js +2 -0
- package/dist/{chunk-T2URCE3E.js → chunk-IF3ZX46R.js} +9 -9
- package/dist/{chunk-QYMOA6TA.js → chunk-MY4HINJT.js} +1 -1
- package/dist/{chunk-QYRGAP3Y.js → chunk-MYUJDXQC.js} +1 -1
- package/dist/{chunk-54RNUSPH.js → chunk-NUTXXB74.js} +1 -1
- package/dist/{chunk-EU4BCXGA.js → chunk-RWNNFCSA.js} +1 -1
- package/dist/{chunk-DUCUZPU3.js → chunk-RZHHSQDO.js} +10 -10
- package/dist/{chunk-DIV2ISTV.js → chunk-SBA7JZ72.js} +46 -46
- package/dist/{chunk-SDL53HOW.js → chunk-U5Q7QGW6.js} +1 -1
- package/dist/{chunk-NPMRJAMS.js → chunk-U6GNXBIR.js} +383 -383
- package/dist/{chunk-6DPQAV2O.js → chunk-USHLHGAH.js} +9 -9
- package/dist/chunk-UULKUZAG.js +1 -0
- package/dist/{chunk-6I4ZV67D.js → chunk-VB2Q65XD.js} +2 -2
- package/dist/{chunk-YJIG2KT3.js → chunk-YIC644QO.js} +3 -3
- package/dist/icons/efficient-glyphs.d.ts +486 -0
- package/dist/icons/efficient-glyphs.js +1 -0
- package/dist/icons/efficient-meanings.d.ts +425 -0
- package/dist/icons/efficient-meanings.js +1 -0
- package/dist/icons/efficient.d.ts +5 -897
- package/dist/icons/efficient.js +1 -466
- package/dist/{index-Dr5yL2I_.d.ts → index-BpCIWxCw.d.ts} +16 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +540 -540
- package/dist/map/index.d.ts +9 -3
- package/dist/map/index.js +12 -12
- package/dist/map-site.css +4 -3
- package/dist/page-tabs/index.js +5 -5
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +11 -1
- package/dist/Calculator-RQFJRFJX.js +0 -29
- package/dist/Files-ZECB33WG.js +0 -87
- package/dist/Sidebar-MTO5BBBT.js +0 -43
- package/dist/chunk-246XSVQO.js +0 -1
- package/dist/chunk-DELNCIUK.js +0 -2
- package/dist/chunk-WQCUNSQL.js +0 -47
package/dist/Files-ZECB33WG.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import{openPreviewFile as e}from"./chunk-FFRODO6G.js";import{Breadcrumbs as t}from"./chunk-L5X6V677.js";import{SidebarLayout as a}from"./chunk-7B2YKMAZ.js";import"./chunk-6I4ZV67D.js";import{getFilesDemoTree as r}from"./chunk-HCUSNRV3.js";import{AboutApp as n}from"./chunk-54RNUSPH.js";import{peekFilesViewRequest as s,consumeFilesViewRequest as i,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as o,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as c,FolderGlyph as m,DesktopItemMiniIcon as h,desktopItemTypeLabel as p}from"./chunk-I7JLCPEW.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{useWindowManager as u,WindowTitle as f}from"./chunk-DIV2ISTV.js";import"./chunk-TPDOOCFS.js";import"./chunk-OKFO3XYS.js";import{toast_default as x}from"./chunk-DAMBAXPA.js";import{TH_ONE_LINE as g}from"./chunk-DUCUZPU3.js";import"./chunk-5A7MWTXX.js";import"./chunk-YJIG2KT3.js";import"./chunk-246XSVQO.js";import"./chunk-KNUR2UEG.js";import{confirm as y,prompt as b}from"./chunk-3NYPZO4K.js";import"./chunk-UVBK6YSR.js";import"./chunk-DELNCIUK.js";import"./chunk-RDLWLATO.js";import"./chunk-7IQ3B77H.js";import"./chunk-D65T4H6J.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import{Icon as k}from"./chunk-76DRQSJM.js";import"./chunk-2EJRVQ3Y.js";import"./chunk-C3QOHMR6.js";import{formatBytes as N}from"./chunk-W32SKK3D.js";import{LoadingSpinner as w}from"./chunk-2J6F4EE7.js";import{useState as v,useEffect as $,useSyncExternalStore as j,useRef as C,useCallback as D}from"react";import{jsxs as L,jsx as E,Fragment as T}from"react/jsx-runtime";var R="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",S={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function O(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function P(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function I(){const I=R.replace(/\/$/,""),F=null!==r(),[U,A]=v("/"),[W,M]=v([]),[V,K]=v([]),[z,B]=v(null),[J,H]=v(!0),[X,_]=v(!1),[Q,Y]=v(null),[G,Z]=v(!1),[q,ee]=v(()=>{const e=s();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});$(()=>{i()},[]);const[te,ae]=v([]);$(()=>{const e=()=>{i(),ee("trash")},t=e=>{i();const t=e.detail?.folderId;t&&ee({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(o,t),()=>{window.removeEventListener(l,e),window.removeEventListener(o,t)}},[]);const re=j(d,c,c),ne="object"==typeof q?q.desktopFolderId:null,se=ne?re?.folders.find(e=>e.id===ne)??null:null,ie=ne&&re?.itemsByFolder[ne]||[];$(()=>{ne&&re&&!re.folders.some(e=>e.id===ne)&&ee("files")},[ne,re]);const le=C(0),oe=C(null),{openPage:de,openEntity:ce}=u(),me=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>de(e)}):"page"===t.entityType?de(t.entityId):ce(t.entityType,t.entityId,null,t.label)},he=D((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),pe=D(async()=>{try{const e=await he(`${I}/api/quota`);if(e.ok){const t=await e.json();Y({used:t.used,limit:t.limit})}}catch{}},[he,I]),ue=D(async e=>{if(B(null),F){const t=function(e){const t=r();if(!t)return[];let a=t;for(const t of e.split("/").filter(Boolean)){const e=a.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];a=e.children}return a.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return M(t),A(e),_(!1),H(!1),void("/"===e&&K(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}H(!0);try{const t=await he(`${I}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Failed to list (${t.status})`)}const a=await t.json(),r=a.entries||[];M(r),A(a.path||e),_(!1),"/"===(a.path||e)&&K(r.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){_(!0)}finally{H(!1)}pe()},[he,I,pe,F]),fe=D(async()=>{if(F)return ae([]),void H(!1);H(!0),B(null);try{const e=await he(`${I}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void x.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();ae(t.entries||[]),_(!1)}catch{_(!0)}finally{H(!1)}pe()},[he,I,pe,F]);$(()=>{"files"===q?ue(U):"trash"===q&&fe()},[U,q]);const xe=async e=>{const t=O(U,e.name);try{const a=await he(`${I}/api/file?path=${encodeURIComponent(t)}`);if(!a.ok)return void x.error(`Download failed (${a.status})`);const r=await a.blob(),n=URL.createObjectURL(r),s=document.createElement("a");s.href=n,s.download=e.name,s.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){x.error(e?.message||"Download failed")}},ge=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const a=await he(`${I}/api/upload?path=${encodeURIComponent(U)}`,{method:"POST",body:t});if(!a.ok){const t=await a.json().catch(()=>({}));if(413===a.status){const a=Math.max(0,(t.limit||0)-(t.used||0));x.error(`Quota exceeded — ${N(a)} free, ${e.name} is ${N(t.attempted||e.size)}`)}else x.error(`Upload ${e.name}: ${t.error||a.status}`)}}catch(t){x.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}ue(U)},ye=()=>{le.current=0,Z(!1)};if($(()=>{const e=()=>ye();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),X)/* @__PURE__ */
|
|
2
|
-
return L("div",{className:"flex flex-col h-full bg-white",children:[
|
|
3
|
-
/* @__PURE__ */E(f,{title:"Files - offline"}),
|
|
4
|
-
/* @__PURE__ */E("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */L("div",{className:"max-w-md",children:[
|
|
5
|
-
/* @__PURE__ */E(k,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
|
|
6
|
-
/* @__PURE__ */E("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
|
|
7
|
-
/* @__PURE__ */L("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
|
|
8
|
-
/* @__PURE__ */E("span",{className:"font-mono",children:I}),". Make sure the server is running — see ",
|
|
9
|
-
/* @__PURE__ */E("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
|
|
10
|
-
/* @__PURE__ */E("button",{onClick:()=>ue(U),className:"px-3 h-8 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})})]});const be="/"===U?[]:U.split("/").filter(Boolean),ke=Q&&Q.limit>0?Math.min(100,Math.round(Q.used/Q.limit*100)):0,Ne=ke>90?"bg-red-500":ke>75?"bg-amber-500":"bg-blue-500",we=[{label:"My files",onClick:()=>A("/")},...be.map((e,t)=>({label:e,onClick:()=>A("/"+be.slice(0,t+1).join("/"))}))],ve=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),$e=e=>/* @__PURE__ */E("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */E("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),je=/* @__PURE__ */L("nav",{className:"p-2",children:[
|
|
11
|
-
/* @__PURE__ */E("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Locations"}),
|
|
12
|
-
/* @__PURE__ */L("button",{onClick:()=>{ee("files"),A("/")},className:ve("files"===q&&"/"===U),children:[$e("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),V.map(e=>/* @__PURE__ */L("button",{onClick:()=>{ee("files"),A("/"+e)},className:ve("files"===q&&U==="/"+e),children:[$e("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
|
|
13
|
-
/* @__PURE__ */E("span",{className:"truncate",children:e})]},e)),!F&&/* @__PURE__ */L("button",{onClick:()=>ee("trash"),className:ve("trash"===q),children:[$e("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),re&&re.folders.length>0&&/* @__PURE__ */L(T,{children:[
|
|
14
|
-
/* @__PURE__ */E("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Desktop"}),re.folders.map(e=>/* @__PURE__ */L("button",{onClick:()=>ee({desktopFolderId:e.id}),className:ve(ne===e.id),children:[
|
|
15
|
-
/* @__PURE__ */E(m,{className:"h-4 w-4 shrink-0 text-amber-500"}),
|
|
16
|
-
/* @__PURE__ */E("span",{className:"truncate",children:e.name}),e.itemCount>0&&/* @__PURE__ */E("span",{className:"ml-auto text-2xs text-gray-400 tabular-nums",children:e.itemCount})]},e.id))]})]});/* @__PURE__ */
|
|
17
|
-
return L("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{F||"object"==typeof q||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),le.current++,G||Z(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{le.current>0&&le.current--,0===le.current&&Z(!1)},onDrop:e=>{e.preventDefault(),ye(),F||"object"==typeof q||e.dataTransfer.files?.length&&ge(e.dataTransfer.files)},children:[
|
|
18
|
-
/* @__PURE__ */E(f,{title:se?`Files - ${se.name}`:"Files"+("/"===U?"":" - "+U)}),
|
|
19
|
-
/* @__PURE__ */E(n,{app:"files"}),
|
|
20
|
-
/* @__PURE__ */E("input",{ref:oe,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ge(e.target.files),oe.current&&(oe.current.value="")}}),
|
|
21
|
-
/* @__PURE__ */E("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */E(a,{sidebar:je,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */L("div",{className:"flex h-full min-w-0 flex-col",children:[
|
|
22
|
-
/* @__PURE__ */L("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */L(T,"files"===q?{children:[
|
|
23
|
-
/* @__PURE__ */E("button",{onClick:()=>A(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),a=t.lastIndexOf("/");return a<=0?"/":t.slice(0,a)}(U)),disabled:"/"===U,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */E(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
24
|
-
/* @__PURE__ */E("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */E(t,{items:we,maxItems:5})}),
|
|
25
|
-
/* @__PURE__ */E("button",{onClick:()=>ue(U),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */E(k,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!F&&/* @__PURE__ */L(T,{children:[
|
|
26
|
-
/* @__PURE__ */L("button",{onClick:()=>ee("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
|
|
27
|
-
/* @__PURE__ */E(k,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
|
|
28
|
-
/* @__PURE__ */L("button",{onClick:async()=>{const e=await b({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void x.error("Folder names cannot contain slashes");const t=O(U,e),a=await he(`${I}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!a.ok){const e=await a.json().catch(()=>({}));return void x.error(e.error||`Create folder failed (${a.status})`)}ue(U)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
|
|
29
|
-
/* @__PURE__ */E(k,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
|
|
30
|
-
/* @__PURE__ */L("button",{onClick:()=>oe.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
|
|
31
|
-
/* @__PURE__ */E(k,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===q?{children:[
|
|
32
|
-
/* @__PURE__ */E("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */E(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
33
|
-
/* @__PURE__ */E("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
|
|
34
|
-
/* @__PURE__ */E("button",{onClick:fe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */E(k,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
|
|
35
|
-
/* @__PURE__ */E("button",{onClick:async()=>{if(0===te.length)return;if(!await y({title:"Empty trash",message:`${te.length} item${1===te.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await he(`${I}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void x.error(t.error||`Empty trash failed (${e.status})`)}fe()},disabled:0===te.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
|
|
36
|
-
/* @__PURE__ */E("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */E(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
37
|
-
/* @__PURE__ */E(m,{className:"h-4 w-4 text-amber-500 ml-1"}),
|
|
38
|
-
/* @__PURE__ */E("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:se?.name??"Desktop folder"}),
|
|
39
|
-
/* @__PURE__ */E("span",{className:"text-2xs text-gray-400 px-2",children:"Desktop shortcuts"})]}),Q&&/* @__PURE__ */L(T,{children:[
|
|
40
|
-
/* @__PURE__ */E("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
41
|
-
/* @__PURE__ */L("div",{className:"flex items-center gap-2",title:`${N(Q.used)} of ${N(Q.limit)} used`,children:[
|
|
42
|
-
/* @__PURE__ */E("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */E("div",{className:`h-full ${Ne} transition-all`,style:{width:`${ke}%`}})}),
|
|
43
|
-
/* @__PURE__ */L("span",{className:"text-2xs text-gray-500 tabular-nums whitespace-nowrap",children:[N(Q.used)," / ",N(Q.limit)]})]})]})]}),
|
|
44
|
-
/* @__PURE__ */E("div",{className:"flex-1 overflow-auto",children:"object"==typeof q?0===ie.length?/* @__PURE__ */E("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
|
|
45
|
-
/* @__PURE__ */E("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
|
|
46
|
-
/* @__PURE__ */E("th",{className:`${g} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
47
|
-
/* @__PURE__ */E("th",{className:`${g} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
|
|
48
|
-
/* @__PURE__ */E("th",{className:`${g} w-56`})]})}),
|
|
49
|
-
/* @__PURE__ */E("tbody",{children:ie.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
|
|
50
|
-
return L("tr",{onClick:()=>B(t),onDoubleClick:()=>me(e),className:"cursor-default border-b border-gray-100 "+(z===t?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
51
|
-
/* @__PURE__ */L("td",{className:"px-3 h-8 flex items-center gap-2",children:[
|
|
52
|
-
/* @__PURE__ */E(h,{item:e}),
|
|
53
|
-
/* @__PURE__ */E("span",{className:"truncate",title:e.label,children:e.label})]}),
|
|
54
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-xs text-gray-500",children:p(e)}),
|
|
55
|
-
/* @__PURE__ */L("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
56
|
-
/* @__PURE__ */E("button",{onClick:t=>{t.stopPropagation(),me(e)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Open"}),
|
|
57
|
-
/* @__PURE__ */E("button",{onClick:t=>{t.stopPropagation(),re?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Move to desktop"}),
|
|
58
|
-
/* @__PURE__ */E("button",{onClick:t=>{t.stopPropagation(),re?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"trash"===q?J&&0===te.length?/* @__PURE__ */E(w,{size:"sm",padding:"p-6",label:"Loading"}):0===te.length?/* @__PURE__ */E("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
|
|
59
|
-
/* @__PURE__ */E("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
|
|
60
|
-
/* @__PURE__ */E("th",{className:`${g} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
61
|
-
/* @__PURE__ */E("th",{className:`${g} text-left font-medium px-3 h-8`,children:"Original location"}),
|
|
62
|
-
/* @__PURE__ */E("th",{className:`${g} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
63
|
-
/* @__PURE__ */E("th",{className:`${g} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
|
|
64
|
-
/* @__PURE__ */E("th",{className:`${g} w-44`})]})}),
|
|
65
|
-
/* @__PURE__ */E("tbody",{children:te.map(e=>/* @__PURE__ */L("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
|
|
66
|
-
/* @__PURE__ */L("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */E(k,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */E(k,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
|
|
67
|
-
/* @__PURE__ */E("span",{className:"truncate",title:e.name,children:e.name})]}),
|
|
68
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-gray-500 text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
|
|
69
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:N(e.size)}),
|
|
70
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:e.deletedAt?P(e.deletedAt):"—"}),
|
|
71
|
-
/* @__PURE__ */L("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
72
|
-
/* @__PURE__ */E("button",{onClick:()=>(async e=>{const t=await he(`${I}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Restore failed (${t.status})`)}x.success(`Restored "${e.name}"`),fe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
|
|
73
|
-
/* @__PURE__ */E("button",{onClick:()=>(async e=>{if(!await y({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await he(`${I}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Delete failed (${t.status})`)}fe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):J&&0===W.length?/* @__PURE__ */E(w,{size:"sm",padding:"p-6",label:"Loading"}):0===W.length?/* @__PURE__ */L("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!F&&/* @__PURE__ */L(T,{children:[" Drop files here or click ",
|
|
74
|
-
/* @__PURE__ */E("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
|
|
75
|
-
/* @__PURE__ */E("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
|
|
76
|
-
/* @__PURE__ */E("th",{className:`${g} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
77
|
-
/* @__PURE__ */E("th",{className:`${g} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
78
|
-
/* @__PURE__ */E("th",{className:`${g} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),
|
|
79
|
-
/* @__PURE__ */E("th",{className:`${g} w-32`})]})}),
|
|
80
|
-
/* @__PURE__ */E("tbody",{children:W.map(t=>/* @__PURE__ */L("tr",{onClick:()=>B(t.name),onDoubleClick:()=>{"folder"===t.kind?A(O(U,t.name)):(async t=>{if(F)return;const a=O(U,t.name),r=(t.name.split(".").pop()||"").toLowerCase(),n=S[r];n?await e({filePath:a,filename:t.name,kind:n,onStaged:e=>de(e)}):xe(t)})(t)},className:"cursor-default border-b border-gray-100 "+(z===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
81
|
-
/* @__PURE__ */L("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */E(k,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */E(k,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
|
|
82
|
-
/* @__PURE__ */E("span",{className:"truncate",title:t.name,children:t.name})]}),
|
|
83
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:"folder"===t.kind?"—":N(t.size)}),
|
|
84
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:P(t.modifiedAt)}),
|
|
85
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!F&&/* @__PURE__ */L(T,{children:["file"===t.kind&&/* @__PURE__ */E("button",{onClick:e=>{e.stopPropagation(),xe(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs",children:"Download"}),
|
|
86
|
-
/* @__PURE__ */E("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await b({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void x.error("Names cannot contain slashes");const a=O(U,e.name),r=O(U,t),n=await he(`${I}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:a,to:r})});if(!n.ok){const e=await n.json().catch(()=>({}));return void x.error(e.error||`Rename failed (${n.status})`)}ue(U)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Rename"}),
|
|
87
|
-
/* @__PURE__ */E("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await y({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=O(U,e.name),a=await he(`${I}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!a.ok){const e=await a.json().catch(()=>({}));return void x.error(e.error||`Delete failed (${a.status})`)}ue(U)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),G&&/* @__PURE__ */E("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */E("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{I as default};
|
package/dist/Sidebar-MTO5BBBT.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,RAIL_WIDTH_KEY as n,toggleOpenSection as i,writeStored as l}from"./chunk-I74FRKHQ.js";import{partitionNav as o,openGlobalSearch as s,flyoutGroups as c,visibleSectionItems as d,rowsContainRoute as m,visibleNavChildren as h,BrandMark as u}from"./chunk-2ZRX3NRH.js";import{ResizeHandle as p}from"./chunk-6I4ZV67D.js";import{IconButton_default as b}from"./chunk-EU4BCXGA.js";import{RAIL_MENU_GAP as g,navSections as f,startMenuCategories as y,TAB_STRIP_H as x,RAIL_COLLAPSED_INSET as v,RAIL_W as k,RAIL_MAX_W as N,RAIL_MIN_W as C,navIcons as w,sectionIcons as j}from"./chunk-TPDOOCFS.js";import"./chunk-5A7MWTXX.js";import{PopupMenu as S,PopupMenuItem as z,PopupMenuDivider as L,PopupMenuLabel as $}from"./chunk-YJIG2KT3.js";import"./chunk-UVBK6YSR.js";import"./chunk-RDLWLATO.js";import"./chunk-7IQ3B77H.js";import"./chunk-D65T4H6J.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import{Icon as A}from"./chunk-76DRQSJM.js";import{useShellStrings as I}from"./chunk-2EJRVQ3Y.js";import"./chunk-C3QOHMR6.js";import"./chunk-2J6F4EE7.js";import{useMemo as R,useState as W,useRef as H,useEffect as K,isValidElement as T,cloneElement as M}from"react";import{jsx as B,jsxs as O,Fragment as D}from"react/jsx-runtime";var J="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function Q(e,t,a){const r=Math.max(8,a-t.bottom);return{left:e+g,bottom:r,maxHeight:a-r-8,overflowY:"auto"}}var _=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),E="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function P({open:e}){/* @__PURE__ */
|
|
2
|
-
return B(A,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function X({dir:e}){/* @__PURE__ */
|
|
3
|
-
return B(A,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function F({className:e}){/* @__PURE__ */
|
|
4
|
-
return B(A,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var Y=e=>.75+1.75*e+"rem";function G({width:G,collapsed:U,onToggleCollapsed:V,onResize:Z,onHome:q,onOpen:ee,activeRoute:te,profile:ae,user:re,onLogout:ne,onSwitchToDesktop:ie,onReportBug:le,onClose:oe,navSections:se=f,navIcons:ce=w,sectionIcons:de=j,categories:me=y,productName:he,productIcon:ue,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:ge=null,logoIsLight:fe=null}){const ye=I().layout,{hasAnyPerm:xe}=e(),ve=R(()=>o(se,me,xe),[se,me,xe]),[ke,Ne]=W(()=>t(a(r))),Ce=e=>Ne(t=>{const a=i(t,e);return l(r,JSON.stringify([...a])),a}),[we,je]=W(null),[Se,ze]=W(!1),Le=H(null);K(()=>{U||je(null)},[U]);const $e=(e,t)=>{je(null),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Ae=(e,t)=>{const a=t[e];/* @__PURE__ */
|
|
5
|
-
return B("span",{className:E,"aria-hidden":"true",children:a&&T(a)?M(a,{className:"size-[18px]"}):a})},Ie=(e,t)=>{const a=h(e,xe),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=ke.has(n),l=!i&&m(a,te,xe);/* @__PURE__ */
|
|
6
|
-
return O("div",{children:[
|
|
7
|
-
/* @__PURE__ */O("button",{type:"button",onClick:()=>Ce(n),"aria-expanded":i,className:_(l,!1),style:t>0?{paddingLeft:Y(t)}:void 0,children:[0===t&&Ae(e.to,ce),
|
|
8
|
-
/* @__PURE__ */B("span",{className:"min-w-0 flex-1 truncate",children:r}),
|
|
9
|
-
/* @__PURE__ */B(P,{open:i})]}),i&&/* @__PURE__ */B("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>Ie(e,t+1))}),e.dividerAfter&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:Y(t)},"aria-hidden":"true"})]},e.to)}const n=e.to===te;/* @__PURE__ */
|
|
10
|
-
return O("div",{children:[
|
|
11
|
-
/* @__PURE__ */O("button",{type:"button",onClick:t=>$e(e,t),onAuxClick:t=>{1===t.button&&$e(e,t)},"aria-current":n?"page":void 0,className:_(n,!1),style:t>0?{paddingLeft:Y(t)}:void 0,children:[0===t&&Ae(e.to,ce),
|
|
12
|
-
/* @__PURE__ */B("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:Y(t)},"aria-hidden":"true"})]},e.to)},Re=(e,t)=>{const a=t?e.items:d(e,xe);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */B("span",{className:E,"aria-hidden":"true",children:e.icon}):Ae(e.label,de),n=e.menuLabel??e.label,i=m(a,te,xe),l="dividerAfter"in e&&e.dividerAfter;if(U)/* @__PURE__ */
|
|
13
|
-
return O("div",{children:[
|
|
14
|
-
/* @__PURE__ */B("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":we?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();je(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:_(i||we?.label===e.label,!0),children:r}),l&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const o=ke.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
15
|
-
return O("div",{children:[
|
|
16
|
-
/* @__PURE__ */O("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:_(!o&&i,!1),children:[r,
|
|
17
|
-
/* @__PURE__ */B("span",{className:"min-w-0 flex-1 truncate",children:n}),
|
|
18
|
-
/* @__PURE__ */B(P,{open:o})]}),
|
|
19
|
-
/* @__PURE__ */B("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&a.map(e=>Ie(e,1))}),l&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},We=ae?.first_name?`${ae.first_name} ${ae.last_name||""}`.trim():re?.email||"",He=(ae?.first_name?.charAt(0)||re?.email?.charAt(0)||"?").toUpperCase(),Ke=ae?.avatar_url?/* @__PURE__ */B("img",{src:ae.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */B("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:He}),Te=Se?Le.current?.getBoundingClientRect():void 0,Me=U?"":"px-3",Be=U?{paddingInline:v}:void 0,Oe=`${U?ye.expandSidebar:ye.collapseSidebar} (${J?"⌘":"Ctrl"} .)`,De=q?{run:q,label:ye.goHome,title:ye.goHome}:oe?null:{run:V,label:U?ye.expandSidebar:ye.collapseSidebar,title:Oe},Je=/* @__PURE__ */O(D,{children:[ue&&/* @__PURE__ */B(u,{src:ue,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:ge,isLight:fe,size:28,decorative:!0}),!U&&/* @__PURE__ */O("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
20
|
-
/* @__PURE__ */B("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:he??"Apps"}),pe&&/* @__PURE__ */B("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),Qe=ve.erpSections.length>0||ve.systemSections.length>0||ve.virtualSections.length>0;/* @__PURE__ */
|
|
21
|
-
return O("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:G},children:[
|
|
22
|
-
/* @__PURE__ */O("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(U?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:x},children:[De?/* @__PURE__ */B("button",{type:"button",onClick:De.run,"aria-label":De.label,title:De.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(U?"justify-center p-0.5":"-ml-1 p-1"),children:Je}):/* @__PURE__ */B("span",{className:"flex min-w-0 items-center gap-2",children:Je}),oe?/* @__PURE__ */B(b,{onClick:oe,"aria-label":ye.closeMenu,children:/* @__PURE__ */B(A,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!U&&/* @__PURE__ */B("button",{type:"button",onClick:V,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${J?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */B(X,{dir:"left"})})]}),
|
|
23
|
-
/* @__PURE__ */B("div",{className:`shrink-0 pt-3 ${Me}`,style:Be,children:U?/* @__PURE__ */B("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${J?"⌘K":"Ctrl K"})`,className:_(!1,!0),children:/* @__PURE__ */B(F,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */O("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
24
|
-
/* @__PURE__ */B(F,{className:"size-3.5 text-gray-500"}),
|
|
25
|
-
/* @__PURE__ */B("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ye.search}),
|
|
26
|
-
/* @__PURE__ */B("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:J?"⌘K":"Ctrl K"})]})}),
|
|
27
|
-
/* @__PURE__ */O("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Me} ${U?"space-y-1":"space-y-0.5"}`,style:Be,children:[U&&/* @__PURE__ */B("button",{type:"button",onClick:V,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${J?"⌘":"Ctrl"} .)`,className:`${_(!1,!0)} mb-3`,children:/* @__PURE__ */B(X,{dir:"right"})}),ve.topItems.map(e=>{if(!U)return Ie(e,0);const t=h(e,xe),a=e.to===te||m(t,te,xe),r=e.menuLabel??e.label;/* @__PURE__ */
|
|
28
|
-
return O("div",{children:[
|
|
29
|
-
/* @__PURE__ */B("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void $e(e,a);const r=a.currentTarget.getBoundingClientRect();je(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:_(a,!0),children:Ae(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ve.topItems.length>0&&Qe&&!ve.topItems[ve.topItems.length-1].dividerAfter&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ve.erpSections.map(e=>Re(e,!1)),ve.systemSections.map(e=>Re(e,!1)),ve.virtualSections.map(e=>Re(e,!0)),ve.footerSections.length>0&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ve.footerSections.map(e=>Re(e,!1))]}),
|
|
30
|
-
/* @__PURE__ */B("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Me}`,style:Be,children:/* @__PURE__ */O("button",{ref:Le,type:"button",onClick:()=>ze(e=>!e),"aria-haspopup":"menu","aria-expanded":Se,"aria-label":U?ye.accountMenu(We):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(U?"justify-center py-2":"px-2 py-2"),children:[Ke,!U&&/* @__PURE__ */O("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
31
|
-
/* @__PURE__ */B("span",{className:"block truncate text-sm font-semibold text-gray-800",children:We}),re?.email&&We!==re.email&&/* @__PURE__ */B("span",{className:"block truncate text-2xs text-gray-500",children:re.email})]})]})}),Z&&!U&&!oe&&/* @__PURE__ */B(p,{side:"left",width:G,onResize:Z,min:C,max:N,defaultWidth:k,storageKey:n,label:ye.resizeSidebar}),Se&&Te&&/* @__PURE__ */O(S,{portal:!0,minWidth:224,onClose:()=>ze(!1),style:Q(G,Te,window.innerHeight),children:[U&&/* @__PURE__ */O("div",{className:"border-b border-gray-200 px-3 py-3",children:[
|
|
32
|
-
/* @__PURE__ */B("p",{className:"truncate text-sm font-semibold text-gray-800",children:We}),re?.email&&/* @__PURE__ */B("p",{className:"truncate text-xs text-gray-500",children:re.email})]}),
|
|
33
|
-
/* @__PURE__ */O(z,{onClick:()=>{ze(!1),ee("/profile",!1)},children:[
|
|
34
|
-
/* @__PURE__ */B(A,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ve.footerItems.map(e=>/* @__PURE__ */O(z,{onClick:()=>{ze(!1),$e(e)},children:[
|
|
35
|
-
/* @__PURE__ */B("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),le&&/* @__PURE__ */O(z,{onClick:()=>{ze(!1),le()},children:[
|
|
36
|
-
/* @__PURE__ */B(A,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
|
|
37
|
-
/* @__PURE__ */B(L,{}),ie&&/* @__PURE__ */O(D,{children:[
|
|
38
|
-
/* @__PURE__ */O(z,{onClick:()=>{ze(!1),ie()},children:[
|
|
39
|
-
/* @__PURE__ */B(A,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
|
|
40
|
-
/* @__PURE__ */B(L,{})]}),
|
|
41
|
-
/* @__PURE__ */O(z,{danger:!0,onClick:()=>{ze(!1),ne()},children:[
|
|
42
|
-
/* @__PURE__ */B(A,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),we&&U&&/* @__PURE__ */B(S,{portal:!0,minWidth:220,onClose:()=>je(null),style:{left:G+g,top:Math.min(we.top,window.innerHeight-48*Math.min(we.items.length,10)-16)},children:c(we.items,xe).map((e,t)=>/* @__PURE__ */O("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */B(L,{}),e.heading&&/* @__PURE__ */B($,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */O(z,{onClick:()=>$e(e),children:[Ae(e.to,ce),
|
|
43
|
-
/* @__PURE__ */B("span",{className:e.to===te?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{Q as accountMenuPosition,G as default};
|
package/dist/chunk-246XSVQO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="7.69.1",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-DELNCIUK.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isAriaDisabled as e,swallowPress as a,describedByWith as r,OffWithReason as i}from"./chunk-RDLWLATO.js";import{buttonClasses as s}from"./chunk-K7PQXJO7.js";import{SpinnerRing as l}from"./chunk-2J6F4EE7.js";import{forwardRef as d,useId as n}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var o=d(function({variant:d="primary",size:o="md",loading:m=!1,leftIcon:p,rightIcon:b,block:f=!1,disabled:u,type:h="button",children:k,className:x="",disabledReason:y,onClick:N,pressed:v,"aria-disabled":g,"aria-describedby":j,...w},z){const C=n(),E=u||m,I=null!=y&&""!==y,J=E&&I,L=!E&&e(g),O=L&&I,R=J||O?C:void 0,A=/* @__PURE__ */t("button",{ref:z,type:h,disabled:E,"aria-busy":m||void 0,"aria-disabled":!!L||g,"aria-describedby":r(j,R),onClick:L?a:N,className:s({variant:d,size:o,block:f,pressed:v??(!0===w["aria-pressed"]||"true"===w["aria-pressed"]),className:x}),...w,children:[m?/* @__PURE__ */c(l,{className:"h-3.5 w-3.5",ink:""}):p,k,!m&&b]});return O?/* @__PURE__ */c(i,{reason:y,id:C,block:f,children:A}):J?/* @__PURE__ */t("span",{className:f?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[A,
|
|
2
|
-
/* @__PURE__ */c("span",{id:R,className:"text-xs text-red-600",children:y})]}):A});export{o as Button_default};
|
package/dist/chunk-WQCUNSQL.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import{inputClasses as e}from"./chunk-CU3GY5Y2.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-76DRQSJM.js";import{useShellStrings as n}from"./chunk-2EJRVQ3Y.js";import{SpinnerRing as a}from"./chunk-2J6F4EE7.js";import{forwardRef as s,useCallback as i,useState as l,useId as o}from"react";import{jsx as c,jsxs as d,Fragment as m}from"react/jsx-runtime";var u=s(function({invalid:t,autoGrow:r,className:n="",onInput:a,rows:s=3,size:l,readOnly:o,...d},m){const u=i(e=>{if(r){const t=e.currentTarget;t.style.height="auto",t.style.height=`${t.scrollHeight}px`}a?.(e)},[r,a]);/* @__PURE__ */
|
|
2
|
-
return c("textarea",{ref:m,"aria-invalid":t||void 0,rows:s,onInput:u,readOnly:o,className:e({invalid:t,size:l,readOnly:o,multiline:!0,className:`${r?"resize-none overflow-hidden":""} ${n}`.trim()}),...d})}),h={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},p={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function g({tone:e}){const t={className:"h-5 w-5","aria-hidden":!0};switch(e){case"success":/* @__PURE__ */
|
|
3
|
-
return c(r,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
|
|
4
|
-
return c(r,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
|
|
5
|
-
return c(r,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
|
|
6
|
-
return c(r,{name:"info",look:"mini",...t})}}function x({tone:e="info",emphasis:t="subtle",title:a,children:s,icon:i,action:l,onDismiss:o,sticky:u=!1,className:x=""}){const b=h[e],f="solid"===t,y=n().banner,v=f?p[e]:b.box,N=u?"sticky top-0 z-30":"",k=/* @__PURE__ */d(m,{children:[a&&/* @__PURE__ */c("div",{className:("font-semibold "+(f?"":"text-gray-900")).trim(),children:a}),s&&/* @__PURE__ */c("div",{className:`${f?"":"text-gray-700"} ${a?"mt-0.5":""}`.trim(),children:s})]});/* @__PURE__ */
|
|
7
|
-
return d("div",{role:"danger"===e?"alert":"status",className:`${N} flex items-start gap-3 rounded-lg border px-4 py-3 ${v} ${x}`.trim(),children:[
|
|
8
|
-
/* @__PURE__ */c("span",{className:`mt-0.5 shrink-0 ${f?"":b.icon}`.trim(),children:i??/* @__PURE__ */c(g,{tone:e})}),null==l?/* @__PURE__ */c("div",{className:"min-w-0 flex-1 text-sm",children:k}):
|
|
9
|
-
/* @__PURE__ */d("div",{className:"flex min-w-0 flex-1 flex-wrap items-start gap-x-3 gap-y-2",children:[
|
|
10
|
-
/* @__PURE__ */c("div",{className:"min-w-0 grow basis-48 text-sm",children:k}),
|
|
11
|
-
/* @__PURE__ */c("div",{className:"shrink-0 self-center",children:l})]}),o&&/* @__PURE__ */c("button",{type:"button",onClick:o,"aria-label":y.dismiss,className:"shrink-0 "+(f?"opacity-80 hover:opacity-100":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */c(r,{name:"close",className:"h-4 w-4",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})}function b({summary:e,busy:t=!1,open:n,onOpenChange:a,label:s="Steps",className:i="",children:m}){const[u,h]=l(null),p=o(),g=n??u??t;/* @__PURE__ */
|
|
12
|
-
return d("div",{className:`text-xs text-gray-500 ${i}`.trim(),children:[
|
|
13
|
-
/* @__PURE__ */d("button",{type:"button",onClick:()=>{h(!g),a?.(!g)},"aria-expanded":g,"aria-controls":g?p:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
|
|
14
|
-
/* @__PURE__ */c(r,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(g?"rotate-90":"")}),
|
|
15
|
-
/* @__PURE__ */c("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:e})]}),g&&/* @__PURE__ */c("ol",{id:p,"aria-label":s,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:m})]})}var f={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},y={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function v({status:e}){switch(e){case"active":/* @__PURE__ */
|
|
16
|
-
return c(a,{className:"size-3 motion-reduce:animate-none"});case"complete":/* @__PURE__ */
|
|
17
|
-
return c(r,{name:"check-circle",size:14,tone:"success"});case"failed":/* @__PURE__ */
|
|
18
|
-
return c(r,{name:"close-circle",size:14,tone:"danger"});case"stopped":/* @__PURE__ */
|
|
19
|
-
return c(r,{name:"no-symbol",size:14,tone:"muted"});case"waiting":/* @__PURE__ */
|
|
20
|
-
return c(r,{name:"pause",size:14,tone:"warning"});case"skipped":/* @__PURE__ */
|
|
21
|
-
return c(r,{name:"remove",size:14,tone:"muted"});default:/* @__PURE__ */
|
|
22
|
-
return c("span",{className:"block size-3 rounded-full border border-gray-300"})}}function N({label:e,description:t,status:r="complete",statusWord:n,icon:a,children:s}){/* @__PURE__ */
|
|
23
|
-
return d("li",{className:`flex items-start gap-2 ${f[r]}`,"data-status":r,children:[
|
|
24
|
-
/* @__PURE__ */c("span",{"aria-hidden":"true",className:"mt-1 flex size-3.5 shrink-0 items-center justify-center",children:a??/* @__PURE__ */c(v,{status:r})}),
|
|
25
|
-
/* @__PURE__ */d("div",{className:"min-w-0 flex-1",children:[
|
|
26
|
-
/* @__PURE__ */d("span",{className:"sr-only",children:[n??y[r],": "]}),
|
|
27
|
-
/* @__PURE__ */c("div",{className:"break-words",children:e}),t&&/* @__PURE__ */c("div",{className:"break-words text-gray-500",children:t}),s&&/* @__PURE__ */c("div",{className:"mt-1",children:s})]})]})}var k=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,w=e=>t(e.trim());function $(e){const t=[];let r,n=0,a=0;for(k.lastIndex=0;null!==(r=k.exec(e));)r.index>n&&t.push(e.slice(n,r.index)),void 0!==r[1]?t.push(
|
|
28
|
-
/* @__PURE__ */d("span",{className:"text-gray-400",children:["[",r[1],"]"]},a++)):void 0!==r[3]?t.push(
|
|
29
|
-
/* @__PURE__ */c("a",{href:w(r[4])?r[4]:void 0,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:r[3]},a++)):void 0!==r[5]?t.push(
|
|
30
|
-
/* @__PURE__ */c("strong",{className:"font-semibold text-gray-900",children:r[5]},a++)):void 0!==r[6]?t.push(
|
|
31
|
-
/* @__PURE__ */c("code",{className:"rounded bg-gray-200 px-1 py-0.5 font-mono text-[0.85em] text-gray-800",children:r[6]},a++)):void 0!==r[7]&&t.push(/* @__PURE__ */c("em",{children:r[7]},a++)),n=k.lastIndex;return n<e.length&&t.push(e.slice(n)),t}function z({alt:e}){const t=e.replace(/^screenshot:\s*/i,""),a=n().markdown;/* @__PURE__ */
|
|
32
|
-
return d("div",{className:"my-1 flex items-start gap-2 rounded-lg border border-dashed border-gray-300 bg-gray-50 px-3 py-3 text-gray-500",children:[
|
|
33
|
-
/* @__PURE__ */c(r,{name:"camera",look:"mini",className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),
|
|
34
|
-
/* @__PURE__ */d("span",{className:"text-xs",children:[
|
|
35
|
-
/* @__PURE__ */c("span",{className:"font-medium text-gray-600",children:`${a.screenshot} — `}),t]})]})}function j(e,t){const r=[];for(const n of e){const e=t.exec(n);e?r.push(e[1]):r.length&&(r[r.length-1]+=" "+n.trim())}return r}var I=e=>e.replace(/^\s*\|/,"").replace(/\|\s*$/,"").split("|").map(e=>e.trim());function C(e,t){const r=e.split("\n"),n=r[0],a=/^(#{2,4})\s+(.*)$/.exec(n);if(a&&1===r.length){const e=a[1].length;/* @__PURE__ */
|
|
36
|
-
return c(`h${e}`,{className:2===e?"mt-2 text-sm font-semibold uppercase tracking-wide text-gray-500":3===e?"mt-1 text-base font-semibold text-gray-900":"mt-1 text-sm font-semibold text-gray-900",children:$(a[2])},t)}if(1===r.length&&/^---+$/.test(n))/* @__PURE__ */
|
|
37
|
-
return c("hr",{className:"border-gray-200"},t);if(function(e){return e.length>=2&&e[0].includes("|")&&/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/.test(e[1])&&e[1].includes("-")}(r))return function(e,t){const r=I(e[0]),n=e.slice(2).map(I);/* @__PURE__ */
|
|
38
|
-
return c("div",{className:"my-1 overflow-x-auto rounded-lg border border-gray-200",children:/* @__PURE__ */d("table",{className:"w-full border-collapse text-sm",children:[
|
|
39
|
-
/* @__PURE__ */c("thead",{children:/* @__PURE__ */c("tr",{className:"bg-gray-50",children:r.map((e,t)=>/* @__PURE__ */c("th",{className:"border-b border-gray-200 px-3 py-2 text-left font-semibold text-gray-700",children:$(e)},t))})}),
|
|
40
|
-
/* @__PURE__ */c("tbody",{children:n.map((e,t)=>/* @__PURE__ */c("tr",{className:"even:bg-gray-50/50",children:e.map((e,t)=>/* @__PURE__ */c("td",{className:"border-t border-gray-100 px-3 h-8 align-top text-gray-700",children:$(e)},t))},t))})]})},t)}(r,t);if(/^>\s?/.test(n)){const e=r.map(e=>e.replace(/^>\s?/,"")).join(" ");/* @__PURE__ */
|
|
41
|
-
return c("div",{className:"my-1 rounded-r-lg border-l-4 border-blue-300 bg-blue-50/60 px-3 py-2 text-gray-700",children:$(e)},t)}const s=/^!\[([^\]]*)\]\(([^)]+)\)$/.exec(n);if(s&&1===r.length)/* @__PURE__ */
|
|
42
|
-
return c(z,{alt:s[1]},t);if(/^[-*]\s+/.test(n)){const e=j(r,/^[-*]\s+(.*)$/);/* @__PURE__ */
|
|
43
|
-
return c("ul",{className:"list-disc space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */c("li",{children:$(e)},t))},t)}const i=/^(\d+)\.\s+/.exec(n);if(i){const e=j(r,/^\d+\.\s+(.*)$/);/* @__PURE__ */
|
|
44
|
-
return c("ol",{start:Number(i[1]),className:"list-decimal space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */c("li",{className:"pl-1",children:$(e)},t))},t)}/* @__PURE__ */
|
|
45
|
-
return c("p",{children:$(r.join(" "))},t)}var D=/^( {0,3})(`{3,}|~{3,})[ \t]*(.*?)[ \t]*$/;function E(e){const t=e.replace(/\r\n/g,"\n").split("\n"),r=[];let n=[];const a=()=>{for(const e of n.join("\n").split(/\n{2,}/)){const t=e.replace(/\s+$/,"");""!==t.trim()&&r.push({text:t})}n=[]};for(let e=0;e<t.length;e+=1){const s=D.exec(t[e]);if(!(null!==s&&!("`"===s[2][0]&&s[3].includes("`")))){n.push(t[e]);continue}a();const[,i,l,o]=s,c=[];for(e+=1;e<t.length;e+=1){const r=D.exec(t[e]);if(null!==r&&r[2][0]===l[0]&&r[2].length>=l.length&&""===r[3])break;c.push(i?t[e].replace(new RegExp(`^ {0,${i.length}}`),""):t[e])}r.push({fence:{lang:o.split(/[ \t]/)[0],code:c.join("\n")}})}return a(),r}function J({children:e,className:t}){/* @__PURE__ */
|
|
46
|
-
return c("div",{className:`space-y-3 text-sm leading-relaxed text-gray-700 ${t??""}`.trim(),children:E(e??"").map((e,t)=>"fence"in e?function({lang:e,code:t},r){/* @__PURE__ */
|
|
47
|
-
return c("pre",{"data-language":e||void 0,className:"my-1 overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:/* @__PURE__ */c("code",{children:t})},r)}(e.fence,t):C(e.text,t))})}export{x as Banner,J as Markdown,b as StepChain,N as StepChainItem,u as Textarea_default};
|