efficient-shell 4.161.0 → 4.163.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.
Files changed (61) hide show
  1. package/README.md +161 -2
  2. package/dist/{Browser-56UAG7EF.js → Browser-2I27OQFE.js} +14 -14
  3. package/dist/Calculator-2EB2RAT7.js +29 -0
  4. package/dist/ConfirmDialog-4LZXI6FM.js +1 -0
  5. package/dist/{CurrencyConverter-XT37LTUQ.js → CurrencyConverter-4EEIPAVX.js} +7 -7
  6. package/dist/{Documents-6DCVHA5H.js → Documents-24YAA5UU.js} +14 -14
  7. package/dist/{Files-R5QVRKMV.js → Files-BU7FY2VD.js} +24 -24
  8. package/dist/{Notepad-5IVPFPDK.js → Notepad-3D4L3K5W.js} +9 -9
  9. package/dist/PdfViewer-5VBKCPCM.js +1 -0
  10. package/dist/{PomodoroTimer-DBOGYNE4.js → PomodoroTimer-B4OPUTJL.js} +13 -13
  11. package/dist/{Preview-ZW6SHMLE.js → Preview-VZSNH76G.js} +15 -15
  12. package/dist/{Sidebar-PS3KIZNN.js → Sidebar-7AY5WJZC.js} +27 -27
  13. package/dist/{Spreadsheet-HUJKMGJK.js → Spreadsheet-TAJ24BQS.js} +13 -13
  14. package/dist/{Stock-ZDS7COTN.js → Stock-VEPDDIMJ.js} +4 -4
  15. package/dist/{Weather-X6QGZVE6.js → Weather-KGZF4DDW.js} +7 -7
  16. package/dist/{WorldClock-5MWMG2UP.js → WorldClock-UGADOCFW.js} +7 -7
  17. package/dist/apps/index.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/chunk-2FZGALCU.js +21 -0
  20. package/dist/{chunk-7B5HMN5K.js → chunk-4GOHPACN.js} +1 -1
  21. package/dist/{chunk-YNBAOTST.js → chunk-6A7BN7EN.js} +4 -4
  22. package/dist/chunk-6KO2U66R.js +3 -0
  23. package/dist/chunk-A6O4Y63A.js +1 -0
  24. package/dist/{chunk-7U37VFLE.js → chunk-E4JWTNG5.js} +19 -19
  25. package/dist/{chunk-A3XBNDFH.js → chunk-FWY5IRGL.js} +2 -2
  26. package/dist/{chunk-X4VJWQTO.js → chunk-GSBX7KIS.js} +21 -21
  27. package/dist/{chunk-65HF6TOM.js → chunk-IJ3V2YOS.js} +8 -8
  28. package/dist/{chunk-M74BPJXH.js → chunk-J5HNLMGZ.js} +13 -13
  29. package/dist/chunk-L7ZMDZAB.js +9 -0
  30. package/dist/{chunk-TOENMGDE.js → chunk-MAMJHPFN.js} +1 -1
  31. package/dist/{chunk-VBQOHZEM.js → chunk-NLASNJNY.js} +1 -1
  32. package/dist/{chunk-753UFF7V.js → chunk-PX435JG4.js} +1 -1
  33. package/dist/chunk-QRJ2ERKR.js +9 -0
  34. package/dist/chunk-TBM3ZIAN.js +112 -0
  35. package/dist/{chunk-JIHTLW46.js → chunk-TZ2EFTST.js} +6 -6
  36. package/dist/{chunk-GAXAMRUZ.js → chunk-UMOVLVTC.js} +1 -1
  37. package/dist/chunk-VWTYRICQ.js +963 -0
  38. package/dist/{chunk-HGALBDOZ.js → chunk-WURTAA2S.js} +1 -1
  39. package/dist/chunk-YJX2IWHB.js +1 -0
  40. package/dist/{chunk-C3BIYUIZ.js → chunk-ZAJPQAGP.js} +1 -1
  41. package/dist/file-intake/index.js +1 -1
  42. package/dist/{index-D-KwOzhB.d.ts → index-JQXMH_km.d.ts} +546 -69
  43. package/dist/index.d.ts +47 -49
  44. package/dist/index.js +645 -645
  45. package/dist/map/index.js +3 -3
  46. package/dist/page-tabs/index.d.ts +9 -1
  47. package/dist/page-tabs/index.js +5 -5
  48. package/dist/pdf/index.js +1 -1
  49. package/dist/ui/index.d.ts +1 -1
  50. package/dist/ui/index.js +1 -1
  51. package/package.json +3 -2
  52. package/dist/Calculator-MDKSVQWZ.js +0 -29
  53. package/dist/ConfirmDialog-JRHVCPKS.js +0 -1
  54. package/dist/PdfViewer-7YLJE5RU.js +0 -1
  55. package/dist/chunk-CFZRCRHL.js +0 -113
  56. package/dist/chunk-KCCRQ3Z4.js +0 -18
  57. package/dist/chunk-LID5IFAT.js +0 -1
  58. package/dist/chunk-RQ6BKTSJ.js +0 -1
  59. package/dist/chunk-SJZN26D3.js +0 -942
  60. package/dist/chunk-VNEH2Y6H.js +0 -9
  61. package/dist/chunk-ZP7WIUAR.js +0 -4
@@ -1,9 +0,0 @@
1
- import{onOverlayOpen as e,Z_LAYERS as t,registerModalEscapeInterceptor as n}from"./chunk-OSJ3ADF2.js";import{rootIsDark as r}from"./chunk-MAIHBBWT.js";import{useHydrated as o,useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{createContext as a,forwardRef as s,useContext as l,useRef as u,useId as c,useState as d,useEffect as p,useMemo as m,useCallback as h}from"react";import{createPortal as f}from"react-dom";import{jsx as g,jsxs as y,Fragment as b}from"react/jsx-runtime";function x(){try{const e=getComputedStyle(document.documentElement).getPropertyValue("--menu-opacity")?.trim();if(e)return parseFloat(e)}catch{}return.95}var w=r;function v(){try{return document.documentElement.classList.contains("rosh-reduce-transparency")}catch{return!1}}function k(e,t){return`color-mix(in srgb, ${e} ${+(Math.round(255*Math.min(1,Math.max(0,t)))/255*100).toFixed(4)}%, transparent)`}function C(e,t={}){const n=e??x();if(v()&&"light"===t.ink)return{background:"var(--rosh-glass-light-ink-surface)",border:"1px solid var(--rosh-glass-light-ink-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};if(v())return{background:"var(--rosh-glass-surface)",border:"1px solid var(--rosh-glass-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};const r="var(--rosh-glass-surface)",o="var(--rosh-glass-surface-mid)";return w()?{background:`linear-gradient(135deg in srgb, ${k(r,.85*n)} 0%, ${k(o,.75*n)} 50%, ${k(r,.85*n)} 100%)`,backdropFilter:"blur(40px) saturate(1.6)",WebkitBackdropFilter:"blur(40px) saturate(1.6)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}:{background:`linear-gradient(135deg in srgb, ${k(r,.85*n)} 0%, ${k(o,.65*n)} 50%, ${k(r,.75*n)} 100%)`,backdropFilter:"blur(40px) saturate(1.8)",WebkitBackdropFilter:"blur(40px) saturate(1.8)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}}function $(e){return v()?"var(--rosh-glass-surface)":k("var(--rosh-glass-surface)",.85*(e??x()))}var M="border-white/20",N="glass-input-bg",L=/* @__PURE__ */new Set(["text","search","url","tel","email","password","number","date","datetime-local","month","week","time"]),B="data-native-context-menu";function E(e,t){return e&&"function"==typeof e.closest?e.closest(t):null}function T(e){const t=e;if(!t||"function"!=typeof t.closest)return!1;if(E(t,`[${B}]`))return!0;if(E(t,"textarea"))return!0;if(E(t,"img, picture, canvas, video, audio"))return!0;const n=E(t,"input");if(n){const e=(n.type||"text").toLowerCase();if(L.has(e))return!0}const r=E(t,"[contenteditable]");if(r){const e=(r.getAttribute("contenteditable")||"").toLowerCase();if(""===e||"true"===e||"plaintext-only"===e)return!0}return!1}var W=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:","blob:"]);function A(e,t,n){const r=E(e,"a[href]"),o=(t||"").trim(),i=function(e,t){if(e&&"#"!==e)try{const n=new URL(e,t??("undefined"!=typeof document?document.baseURI:void 0));return W.has(n.protocol)?n.href:void 0}catch{return}}(r?.getAttribute("href"),n);return{kind:o?"selection":i?"link":"default",...o?{selectionText:o}:{},...i?{linkUrl:i}:{}}}function F(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function S(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function R(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function D(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function H(e,t,n,r,o,i=!1,a=8){const s=t+o,l=e-o-n,u=l>=a;return i&&u?{left:l,flipped:!0}:s+n<=r-a?{left:s,flipped:!1}:u?{left:l,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function P(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var I=a(null);function j({children:n,style:r,className:i="",onClose:a,minWidth:s=180,portal:l=!1}){const h=u(null),y=c(),[b,x]=d([]),w=u();p(()=>()=>clearTimeout(w.current),[]);const v=o(),k=m(()=>{const e=()=>clearTimeout(w.current);return{id:y,depth:0,path:b,open:(t,n)=>{e(),x(e=>F(e,t,n))},scheduleClose:t=>{e(),w.current=setTimeout(()=>x(e=>S(e,t)),200)},closeBelow:t=>{e(),x(e=>S(e,t))},cancelClose:e,closeTree:()=>{e(),x([]),a?.()},root:h}},[y,b,a]);p(()=>{if(!a)return;const t=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${y}"]`)||h.current&&!h.current.contains(e.target)&&a()},n=e=>{"Escape"===e.key&&a()};window.addEventListener("pointerdown",t),window.addEventListener("keydown",n);const r=e(a);return()=>{window.removeEventListener("pointerdown",t),window.removeEventListener("keydown",n),r()}},[a,y]),p(()=>{const e=h.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const $=P(),M=/(^|[\s:])!?z-/.test(i),N=/* @__PURE__ */g("div",{ref:h,"data-popup-menu-tree":y,className:`fixed rounded-2xl ${"tight"===$?"py-1":"large"===$?"py-2":"py-1.5"} ${i}`,onContextMenu:e=>{T(e.target)||e.preventDefault()},style:{...M?{}:{zIndex:t.menu},minWidth:s,animation:"popup-in 0.12s ease-out",...C(),...r},children:/* @__PURE__ */g(I.Provider,{value:k,children:n})});return l?v?f(N,document.body):null:N}function z(e,t,n,r=!1){const o=P(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":"max(0.25rem, calc(var(--menu-padding-y, 0.5rem) - 0.1rem))";return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i}}}var q=s(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,tabIndex:a,id:s,onMouseEnter:u},c){const d=l(I),p=z(r,o,n);/* @__PURE__ */
2
- return g("button",{ref:c,id:s,role:i,tabIndex:a,onClick:()=>{e?.(),d&&d.depth>0&&d.closeTree()},onMouseEnter:()=>{d?.scheduleClose(d.depth),u?.()},disabled:o,className:p.className,style:p.style,children:t})}),U=/* @__PURE__ */g("svg",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})});function J(e){let n=t.menu;for(let t=e;t&&t!==document.body;t=t.parentElement){const e=parseInt(getComputedStyle(t).zIndex,10);Number.isNaN(e)||(n=e)}return n}function K(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function O({label:e,icon:t,children:r,disabled:o,className:a="",minWidth:s=180,maxHeight:d}){const x=l(I),w=c(),v=u(null),k=u(null),$=u(),M=u(!1),N=`${w}-menu`;p(()=>()=>clearTimeout($.current),[]);const L=x?.depth??0,B=x?.path[L],E=!!B&&B.key===w&&!o,W=h(e=>{if(!x||o||!v.current)return;clearTimeout($.current),M.current=e;const t=v.current.getBoundingClientRect(),n=v.current.closest("[data-popup-submenu-panel]")??v.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=L>0&&(x.path[L-1]?.flipped??!1),a=H(r.left,r.right,s,window.innerWidth,4,i);x.open(L,{key:w,y:t.top,...a})},[x,o,L,w,s]),A=e=>{x?.closeBelow(L),v.current?.focus()};p(()=>{if(E)return n(e=>"Escape"===e.key&&(!(x&&x.path.length>L+1)&&(A(),!0)))}),i(()=>{if(!E||!B)return;const e=()=>{const e=k.current;if(!e||!v.current)return;const t=v.current.closest("[data-popup-submenu-panel]")??v.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??v.current.getBoundingClientRect(),r=L>0&&(x?.path[L-1]?.flipped??!1),o=e.offsetWidth||s,i=H(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=D(v.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),p(()=>{E&&M.current&&(M.current=!1,K(k.current)[0]?.focus())},[E]);const F=m(()=>x&&{...x,depth:L+1},[x,L]);if(!x)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const S=z(!1,o,a,E),R=P();/* @__PURE__ */
3
- return y(b,{children:[
4
- /* @__PURE__ */y("button",{ref:v,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":E,"aria-controls":E?N:void 0,disabled:o,"data-popup-submenu-row":!0,className:S.className,style:S.style,onClick:e=>{const t=0===e.detail;E?t&&K(k.current)[0]?.focus():W(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),W(!0))},onMouseEnter:()=>{o||(x.cancelClose(),E?x.closeBelow(L+1):(clearTimeout($.current),$.current=setTimeout(()=>W(!1),120)))},onMouseLeave:()=>{clearTimeout($.current),x.scheduleClose(L)},children:[t,
5
- /* @__PURE__ */g("span",{className:"min-w-0 flex-1 truncate",children:e}),U]}),E&&f(
6
- /* @__PURE__ */g("div",{ref:k,id:N,role:"menu","data-popup-menu-tree":x.id,"data-popup-submenu-panel":!0,className:"fixed rounded-2xl overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===R?"py-1":"large"===R?"py-2":"py-1.5"),style:{left:B.left,top:B.y,minWidth:s,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:J(x.root.current)+L+1,animation:(B.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...C()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=K(k.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),A())},onMouseEnter:()=>{x.cancelClose(),clearTimeout($.current)},onMouseLeave:()=>x.scheduleClose(L+1),onContextMenu:e=>{T(e.target)||e.preventDefault()},children:/* @__PURE__ */g(I.Provider,{value:F,children:r})}),document.body)]})}function V(){const e=P();/* @__PURE__ */
7
- return g("div",{className:`border-t ${M} ${"tight"===e?"my-0.5":"large"===e?"my-1.5":"my-1"} mx-3`})}function G({children:e}){const t=P(),n="tight"===t?"0.125rem":"large"===t?"0.375rem":"0.25rem";/* @__PURE__ */
8
- return g("div",{className:"text-xs font-medium uppercase tracking-wide",style:{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:n,paddingBottom:n},children:e})}function Q({d:e,className:t="h-4 w-4 text-gray-400"}){/* @__PURE__ */
9
- return g("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{M as GLASS_DIVIDER,N as GLASS_INPUT_BG,Q as MenuIcon,B as NATIVE_MENU_ATTR,j as PopupMenu,V as PopupMenuDivider,q as PopupMenuItem,G as PopupMenuLabel,O as PopupSubmenu,D as clampMenuTop,S as closeMenuBelow,A as describeContextTarget,$ as glassFill,C as glassStyle,z as itemLook,T as keepsNativeMenu,H as menuPanelLeft,F as openMenuLevel,R as resolveMenuLevels};
@@ -1,4 +0,0 @@
1
- import{useShellStrings as e}from"./chunk-RQ6BKTSJ.js";import{useBrowserState as r}from"./chunk-D65T4H6J.js";import{useRef as t,useCallback as o,useEffect as n}from"react";import{jsxs as i,jsx as l,Fragment as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(Math.max(e,r),t);function d({sidebar:d,sidebarTop:c,sidebarBottom:u,children:m,side:h="left",storageKey:v,defaultWidth:w=256,minWidth:f=180,maxWidth:p=480,className:b="",sidebarClassName:y=("right"===h?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:g="bg-white"}){const N="right"===h,x=e().sidebar,[z,k]=r(()=>{if(v){let e=null;try{e=window.localStorage.getItem(v)}catch{}const r=e?parseInt(e,10):NaN;if(!Number.isNaN(r))return a(r,f,p)}return a(w,f,p)},a(w,f,p)),E=t(null),L=o(e=>{const r=E.current;if(!r)return;const t=(e.clientX-r.startX)*(N?-1:1);k(a(r.startWidth+t,f,p))},[f,p,N]),$=o(()=>{E.current=null,window.removeEventListener("pointermove",L),window.removeEventListener("pointerup",$),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[L]),S=o(e=>{e.preventDefault(),E.current={startX:e.clientX,startWidth:z},window.addEventListener("pointermove",L),window.addEventListener("pointerup",$),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[z,L,$]);n(()=>{if(!v)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(v,String(Math.round(z)))}catch{}},200);return()=>window.clearTimeout(e)},[z,v]),n(()=>()=>{window.removeEventListener("pointermove",L),window.removeEventListener("pointerup",$)},[L,$]);const T=N?"left-0":"right-0",W=null!=c||null!=u,D=/* @__PURE__ */i("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:z},children:[
2
- /* @__PURE__ */i("div",{className:`flex h-full flex-col ${W?"overflow-hidden":"overflow-y-auto"} ${y}`,children:[null!=c&&/* @__PURE__ */l("div",{className:"shrink-0 px-2 pt-3 pb-2",children:c}),W?/* @__PURE__ */l("div",{className:"min-h-0 flex-1 overflow-y-auto",children:d}):d,null!=u&&/* @__PURE__ */l("div",{className:"mt-auto shrink-0 border-t border-gray-200 px-2 py-3",children:u})]}),
3
- /* @__PURE__ */l("div",{onPointerDown:S,onDoubleClick:()=>k(a(w,f,p)),title:x.resize,className:`group/resize absolute inset-y-0 ${T} z-10 w-2 cursor-col-resize`,children:/* @__PURE__ */l("div",{className:`absolute inset-y-0 ${T} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})]}),X=/* @__PURE__ */l("div",{className:`flex min-w-0 flex-1 flex-col ${g}`,children:m});/* @__PURE__ */
4
- return l("div",{className:`flex h-full w-full overflow-hidden ${b}`,children:/* @__PURE__ */i(s,N?{children:[X,D]}:{children:[D,X]})})}export{d as SidebarLayout};