efficient-shell 4.156.1 → 4.159.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 (42) hide show
  1. package/README.md +29 -4
  2. package/dist/{Browser-WBZPCS6W.js → Browser-OQCHLKM3.js} +12 -12
  3. package/dist/{Calculator-5DF4PSEG.js → Calculator-YBL65JNM.js} +22 -22
  4. package/dist/{CurrencyConverter-BEI6UUDD.js → CurrencyConverter-6VFY4GF6.js} +7 -7
  5. package/dist/{Documents-5WGBDLTF.js → Documents-IPXRU4CT.js} +5 -5
  6. package/dist/Files-3MGL4ZT7.js +89 -0
  7. package/dist/Notepad-RJ2DYW2O.js +25 -0
  8. package/dist/{PomodoroTimer-3BDFGHC6.js → PomodoroTimer-6OQ33FY3.js} +26 -26
  9. package/dist/{Preview-O52DJFV6.js → Preview-3WRPZWDU.js} +14 -14
  10. package/dist/{Sidebar-H6R3AK5G.js → Sidebar-FUPFF7BT.js} +23 -23
  11. package/dist/{Spreadsheet-7PMGYBO6.js → Spreadsheet-6NK53IZV.js} +13 -13
  12. package/dist/{Stock-PEZB3WXV.js → Stock-ZFLDG6TT.js} +3 -3
  13. package/dist/{Weather-6EJFJQIX.js → Weather-BBPTXGQA.js} +17 -17
  14. package/dist/{WorldClock-5BMGEL2A.js → WorldClock-CQGQ2Y6N.js} +6 -6
  15. package/dist/apps/index.js +1 -1
  16. package/dist/brand.css +1 -1
  17. package/dist/{chunk-ELCH5NDO.js → chunk-CK245P3T.js} +4 -4
  18. package/dist/{chunk-XC64WV33.js → chunk-DLD4AKVT.js} +36 -36
  19. package/dist/{chunk-5DVD4E4P.js → chunk-EI4WZOP3.js} +1 -1
  20. package/dist/chunk-J7AAGG7P.js +942 -0
  21. package/dist/chunk-L4KRS7N3.js +1 -0
  22. package/dist/{chunk-DRN636EP.js → chunk-M4AKWGQM.js} +1 -1
  23. package/dist/chunk-S2AZZGFF.js +1 -0
  24. package/dist/chunk-VNEH2Y6H.js +9 -0
  25. package/dist/{chunk-LGDG4YMF.js → chunk-VRW5JNMR.js} +6 -6
  26. package/dist/{chunk-KAESEFKM.js → chunk-Z3LPT4HB.js} +1 -1
  27. package/dist/format/index.d.ts +1 -0
  28. package/dist/format/index.js +1 -0
  29. package/dist/{index-C-inEe7F.d.ts → index-D0K5U1Pb.d.ts} +80 -49
  30. package/dist/index-DCUzlKPZ.d.ts +194 -0
  31. package/dist/index.d.ts +3 -2
  32. package/dist/index.js +645 -645
  33. package/dist/page-tabs/index.js +5 -5
  34. package/dist/ui/index.d.ts +2 -1
  35. package/dist/ui/index.js +1 -1
  36. package/dist/ui.css +7 -0
  37. package/package.json +6 -1
  38. package/dist/Files-62DPJ4NN.js +0 -89
  39. package/dist/Notepad-U67M72JS.js +0 -25
  40. package/dist/chunk-ESXQJ7YI.js +0 -934
  41. package/dist/chunk-J7LKJIZC.js +0 -9
  42. package/dist/chunk-O5BOGWO3.js +0 -1
@@ -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 l,useContext as s,useRef as u,useId as c,useState as d,useEffect as p,useMemo as m,useCallback as f}from"react";import{createPortal as h}from"react-dom";import{jsx as g,jsxs as y,Fragment as x}from"react/jsx-runtime";function b(){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){const t=e??b();if(v())return{background:"var(--rosh-glass-surface)",border:"1px solid var(--rosh-glass-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};const n="var(--rosh-glass-surface)",r="var(--rosh-glass-surface-mid)";return w()?{background:`linear-gradient(135deg in srgb, ${k(n,.85*t)} 0%, ${k(r,.75*t)} 50%, ${k(n,.85*t)} 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(n,.85*t)} 0%, ${k(r,.65*t)} 50%, ${k(n,.75*t)} 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??b()))}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 l=t+o,s=e-o-n,u=s>=a;return i&&u?{left:s,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:u?{left:s,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:l=180,portal:s=!1}){const f=u(null),y=c(),[x,b]=d([]),w=u();p(()=>()=>clearTimeout(w.current),[]);const v=o(),k=m(()=>{const e=()=>clearTimeout(w.current);return{id:y,depth:0,path:x,open:(t,n)=>{e(),b(e=>F(e,t,n))},scheduleClose:t=>{e(),w.current=setTimeout(()=>b(e=>S(e,t)),200)},closeBelow:t=>{e(),b(e=>S(e,t))},cancelClose:e,closeTree:()=>{e(),b([]),a?.()},root:f}},[y,x,a]);p(()=>{if(!a)return;const t=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${y}"]`)||f.current&&!f.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=f.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:f,"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:l,animation:"popup-in 0.12s ease-out",...C(),...r},children:/* @__PURE__ */g(I.Provider,{value:k,children:n})});return s?v?h(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=l(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,tabIndex:a,id:l,onMouseEnter:u},c){const d=s(I),p=z(r,o,n);/* @__PURE__ */
2
- return g("button",{ref:c,id:l,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:l=180,maxHeight:d}){const b=s(I),w=c(),v=u(null),k=u(null),$=u(),M=u(!1),N=`${w}-menu`;p(()=>()=>clearTimeout($.current),[]);const L=b?.depth??0,B=b?.path[L],E=!!B&&B.key===w&&!o,W=f(e=>{if(!b||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&&(b.path[L-1]?.flipped??!1),a=H(r.left,r.right,l,window.innerWidth,4,i);b.open(L,{key:w,y:t.top,...a})},[b,o,L,w,l]),A=e=>{b?.closeBelow(L),v.current?.focus()};p(()=>{if(E)return n(e=>"Escape"===e.key&&(!(b&&b.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&&(b?.path[L-1]?.flipped??!1),o=e.offsetWidth||l,i=H(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,s=D(v.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${s}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(()=>b&&{...b,depth:L+1},[b,L]);if(!b)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const S=z(!1,o,a,E),R=P();/* @__PURE__ */
3
- return y(x,{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||(b.cancelClose(),E?b.closeBelow(L+1):(clearTimeout($.current),$.current=setTimeout(()=>W(!1),120)))},onMouseLeave:()=>{clearTimeout($.current),b.scheduleClose(L)},children:[t,
5
- /* @__PURE__ */g("span",{className:"min-w-0 flex-1 truncate",children:e}),U]}),E&&h(
6
- /* @__PURE__ */g("div",{ref:k,id:N,role:"menu","data-popup-menu-tree":b.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:l,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:J(b.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:()=>{b.cancelClose(),clearTimeout($.current)},onMouseLeave:()=>b.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 +0,0 @@
1
- var r="4.156.1",a=r;export{a as APP_VERSION,r as VERSION};