efficient-shell 6.4.0 → 7.10.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 (90) hide show
  1. package/README.md +88 -22
  2. package/dist/Browser-VCRHLL3W.js +43 -0
  3. package/dist/Calculator-HFF54RNH.js +29 -0
  4. package/dist/ConfirmDialog-6LAVAGDE.js +1 -0
  5. package/dist/CurrencyConverter-SAIDT4WN.js +21 -0
  6. package/dist/{Documents-ADFEHEUW.js → Documents-OWPQE6D6.js} +27 -27
  7. package/dist/Files-UCNAQWGM.js +87 -0
  8. package/dist/Notepad-NNYMEU7M.js +25 -0
  9. package/dist/PdfViewer-PHABUM7K.js +1 -0
  10. package/dist/PomodoroTimer-AV3YE2WJ.js +91 -0
  11. package/dist/Preview-PWFREL75.js +182 -0
  12. package/dist/Sidebar-3IB3YIWC.js +44 -0
  13. package/dist/Spreadsheet-F5BXANOO.js +37 -0
  14. package/dist/Stock-EP2SB76N.js +16 -0
  15. package/dist/{Weather-BLO354GM.js → Weather-62FA6T6O.js} +35 -35
  16. package/dist/WorldClock-C3A6PZYM.js +32 -0
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/{chunk-YX2IMURA.js → chunk-7BX3JQBP.js} +10 -10
  21. package/dist/{chunk-MORDXCV6.js → chunk-7HLTPMQV.js} +1 -1
  22. package/dist/{chunk-4JZZLUGG.js → chunk-B4PGVDB6.js} +1 -1
  23. package/dist/chunk-B4XGJA3N.js +1 -0
  24. package/dist/{chunk-7PGHRG6J.js → chunk-BQ7GR7H6.js} +11 -11
  25. package/dist/{chunk-R5VRLW5Z.js → chunk-BXW5WAEX.js} +1 -1
  26. package/dist/{chunk-SK5DL6JX.js → chunk-FTJ2G343.js} +14 -14
  27. package/dist/{chunk-XO2AMGVU.js → chunk-GGSG7HSD.js} +1 -1
  28. package/dist/{chunk-ZEIKSMFR.js → chunk-ICN533ML.js} +8 -8
  29. package/dist/{chunk-I534M65N.js → chunk-ITCBLL72.js} +2 -2
  30. package/dist/{chunk-GWDVD3VQ.js → chunk-JQRIAZDP.js} +23 -23
  31. package/dist/{chunk-WOEFPBQF.js → chunk-KBOYLXAT.js} +1 -1
  32. package/dist/chunk-KSLOSQKN.js +29 -0
  33. package/dist/{chunk-UUYPUKP7.js → chunk-M4TRVJTO.js} +1 -1
  34. package/dist/{chunk-CXJQ42XT.js → chunk-MFDZYZZX.js} +15 -15
  35. package/dist/chunk-NGUH7T5V.js +1 -0
  36. package/dist/chunk-QRCDQPJA.js +1 -0
  37. package/dist/{chunk-5K76RQML.js → chunk-RBKIYZ7H.js} +1 -1
  38. package/dist/{chunk-GJ37JCC2.js → chunk-RUHUTZN4.js} +1 -1
  39. package/dist/{chunk-I2H2CKID.js → chunk-SCJT2XXU.js} +1 -1
  40. package/dist/{chunk-QJHWLDEN.js → chunk-THM35LAN.js} +71 -71
  41. package/dist/{chunk-5LUN632W.js → chunk-UJL5J7GX.js} +4 -4
  42. package/dist/chunk-UZJ6RYMF.js +9 -0
  43. package/dist/chunk-W6BQVATM.js +1016 -0
  44. package/dist/{chunk-VR6TR575.js → chunk-XN7CAWSZ.js} +3 -3
  45. package/dist/{chunk-IHZL3GJU.js → chunk-Y56GRZ2Q.js} +1 -1
  46. package/dist/chunk-YMWCZKUN.js +12 -0
  47. package/dist/{chunk-Q5O5UMJY.js → chunk-Z2TTHY7G.js} +2 -2
  48. package/dist/{chunk-2SSRFEOZ.js → chunk-ZGUQLVY4.js} +5 -3
  49. package/dist/{chunk-HQLAISFX.js → chunk-ZRU5F2XT.js} +4 -4
  50. package/dist/file-intake/index.js +1 -1
  51. package/dist/i18n/index.d.ts +1 -1
  52. package/dist/icons/efficient-looks.js +20 -10
  53. package/dist/icons/efficient.d.ts +7 -5
  54. package/dist/icons/efficient.js +51 -48
  55. package/dist/icons/index.d.ts +1 -1
  56. package/dist/icons/index.js +1 -1
  57. package/dist/{index-D5bms_uA.d.ts → index-Cevszdp8.d.ts} +296 -90
  58. package/dist/index.d.ts +3 -3
  59. package/dist/index.js +632 -639
  60. package/dist/locales/zh-Hans.d.ts +1 -1
  61. package/dist/locales/zh-Hans.js +1 -1
  62. package/dist/map/index.js +10 -10
  63. package/dist/markdown/index.js +4 -4
  64. package/dist/page-tabs/index.js +5 -5
  65. package/dist/pdf/index.js +1 -1
  66. package/dist/{strings-fYzxZPn4.d.ts → strings-BQtq9300.d.ts} +17 -2
  67. package/dist/telemetry/index.js +1 -1
  68. package/dist/ui/index.d.ts +2 -2
  69. package/dist/ui/index.js +1 -1
  70. package/dist/ui.css +50 -54
  71. package/package.json +1 -1
  72. package/dist/Browser-USPZWDYH.js +0 -43
  73. package/dist/Calculator-FP5HUWCW.js +0 -29
  74. package/dist/ConfirmDialog-3TIHKJRT.js +0 -1
  75. package/dist/CurrencyConverter-XD5LYOCD.js +0 -21
  76. package/dist/Files-BVUVRNC5.js +0 -87
  77. package/dist/Notepad-WJI5ODGS.js +0 -25
  78. package/dist/PdfViewer-226I3LSD.js +0 -1
  79. package/dist/PomodoroTimer-GEMQHIPJ.js +0 -91
  80. package/dist/Preview-HNSEYNZL.js +0 -182
  81. package/dist/Sidebar-PVHZPNIY.js +0 -44
  82. package/dist/Spreadsheet-6Z5ACGTT.js +0 -37
  83. package/dist/Stock-X3LIU4ZX.js +0 -16
  84. package/dist/WorldClock-BAH7QFRG.js +0 -32
  85. package/dist/chunk-5MDQNFOG.js +0 -9
  86. package/dist/chunk-DBXZS7OA.js +0 -29
  87. package/dist/chunk-K6DKX55N.js +0 -1
  88. package/dist/chunk-PFKMIPZH.js +0 -1028
  89. package/dist/chunk-S3LGKIZ3.js +0 -12
  90. package/dist/chunk-SBF5A6XV.js +0 -1
@@ -1,5 +1,5 @@
1
- import{Tooltip as e}from"./chunk-S3LGKIZ3.js";import{useBrowserLayoutEffect as r,useBrowserState as t}from"./chunk-D65T4H6J.js";import{useShellStrings as o}from"./chunk-K6DKX55N.js";import{useRef as n,useEffect as i,useCallback as l}from"react";import{jsx as s,jsxs as a,Fragment as c}from"react/jsx-runtime";var u=(e,r,t)=>Math.min(t,Math.max(r,e));function d(e,r,t,o,n){return Math.round(u("left"===t||"top"===t?e+r:e-r,o,n))}function h(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:u(n,r,t)}function f({width:t,onResize:a,orientation:c="vertical",side:f,min:m,max:v,defaultWidth:g=m,step:b=16,storageKey:p,label:w,hint:x,controls:y,className:z=""}){const N="horizontal"===c,k=o().resizeHandle,P=n(null),$=n({onResize:a,min:m,max:v,side:f});$.current={onResize:a,min:m,max:v,side:f},r(()=>{if(!p)return;const e=h(p,m,v);null!==e&&e!==t&&a(e)},[p]),i(()=>{if(!p)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(p,String(Math.round(t)))}catch{}},200);return()=>window.clearTimeout(e)},[t,p]);const M=l(()=>{P.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);i(()=>M,[M]);const C=e=>{P.current&&(e.currentTarget.hasPointerCapture?.(P.current.pointer)&&e.currentTarget.releasePointerCapture(P.current.pointer),M())},D="left"===f?"right-0":"right"===f?"left-0":"top"===f?"bottom-0":"top-0",I="left"===f?"right":"right"===f?"left":"top"===f?"bottom":"top",K=N?`absolute inset-x-0 ${D} z-10 flex h-2`:`absolute inset-y-0 ${D} z-10 flex w-2`;/* @__PURE__ */
2
- return s(e,{content:x??k.hint,side:I,delay:600,className:`${K} ${z}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":c,"aria-label":w??k.label,"aria-valuenow":Math.round(t),"aria-valuemin":m,"aria-valuemax":v,"aria-controls":y,"data-resize-handle":f,onPointerDown:e=>{0===e.button&&(e.preventDefault(),P.current={x:N?e.clientY:e.clientX,width:t,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=N?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=P.current;if(!r)return;if(0===e.buttons)return void M();const t=(N?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:l}=$.current;o(d(r.width,t,l,n,i))},onPointerUp:C,onPointerCancel:C,onLostPointerCapture:()=>{P.current&&M()},onDoubleClick:()=>a(u(g,m,v)),onKeyDown:e=>{const r=N?"ArrowDown":"ArrowRight",o=N?"ArrowUp":"ArrowLeft",n=e.key===r?b:e.key===o?-b:null,i=null!==n?d(t,n,f,m,v):"Home"===e.key?m:"End"===e.key?v:"Enter"===e.key?u(g,m,v):null;null!==i&&(e.preventDefault(),i!==t&&a(i))},className:N?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:N?`absolute inset-x-0 ${D} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${D} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}var m=(e,r,t)=>Math.min(Math.max(e,r),t);function v({sidebar:e,sidebarTop:r,sidebarBottom:n,children:i,side:l="left",storageKey:u,defaultWidth:d=256,minWidth:v=180,maxWidth:g=480,className:b="",sidebarClassName:p=("right"===l?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:w="bg-white"}){const x="right"===l,y=o().sidebar,[z,N]=t(()=>(u?h(u,v,g):null)??m(d,v,g),m(d,v,g)),k=null!=r||null!=n,P=/* @__PURE__ */a("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:z},children:[
1
+ import{Tooltip as e}from"./chunk-YMWCZKUN.js";import{useBrowserLayoutEffect as r,useBrowserState as t}from"./chunk-D65T4H6J.js";import{useShellStrings as o}from"./chunk-QRCDQPJA.js";import{useRef as n,useEffect as i,useCallback as l}from"react";import{jsx as s,jsxs as a,Fragment as c}from"react/jsx-runtime";var u=(e,r,t)=>Math.min(t,Math.max(r,e));function d(e,r,t,o,n){return Math.round(u("left"===t||"top"===t?e+r:e-r,o,n))}function h(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:u(n,r,t)}function f({width:t,onResize:a,orientation:c="vertical",side:f,min:m,max:v,defaultWidth:g=m,step:b=16,storageKey:p,label:w,hint:x,controls:y,className:z=""}){const N="horizontal"===c,k=o().resizeHandle,P=n(null),C=n({onResize:a,min:m,max:v,side:f});C.current={onResize:a,min:m,max:v,side:f},r(()=>{if(!p)return;const e=h(p,m,v);null!==e&&e!==t&&a(e)},[p]),i(()=>{if(!p)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(p,String(Math.round(t)))}catch{}},200);return()=>window.clearTimeout(e)},[t,p]);const M=l(()=>{P.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);i(()=>M,[M]);const $=e=>{P.current&&(e.currentTarget.hasPointerCapture?.(P.current.pointer)&&e.currentTarget.releasePointerCapture(P.current.pointer),M())},D="left"===f?"right-0":"right"===f?"left-0":"top"===f?"bottom-0":"top-0",R="left"===f?"right":"right"===f?"left":"top"===f?"bottom":"top",T=N?`absolute inset-x-0 ${D} z-10 flex h-2`:`absolute inset-y-0 ${D} z-10 flex w-2`;/* @__PURE__ */
2
+ return s(e,{content:x??k.hint,side:R,delay:600,className:`${T} ${z}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":c,"aria-label":w??k.label,"aria-valuenow":Math.round(t),"aria-valuemin":m,"aria-valuemax":v,"aria-controls":y,"data-resize-handle":f,onPointerDown:e=>{0===e.button&&(e.preventDefault(),P.current={x:N?e.clientY:e.clientX,width:t,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=N?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=P.current;if(!r)return;if(0===e.buttons)return void M();const t=(N?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:l}=C.current;o(d(r.width,t,l,n,i))},onPointerUp:$,onPointerCancel:$,onLostPointerCapture:()=>{P.current&&M()},onDoubleClick:()=>a(u(g,m,v)),onKeyDown:e=>{const r=N?"ArrowDown":"ArrowRight",o=N?"ArrowUp":"ArrowLeft",n=e.key===r?b:e.key===o?-b:null,i=null!==n?d(t,n,f,m,v):"Home"===e.key?m:"End"===e.key?v:"Enter"===e.key?u(g,m,v):null;null!==i&&(e.preventDefault(),i!==t&&a(i))},className:N?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:N?`absolute inset-x-0 ${D} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${D} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}var m=(e,r,t)=>Math.min(Math.max(e,r),t);function v({sidebar:e,sidebarTop:r,sidebarBottom:n,children:i,side:l="left",storageKey:u,defaultWidth:d=256,minWidth:v=180,maxWidth:g=480,className:b="",sidebarClassName:p=("right"===l?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:w="bg-white"}){const x="right"===l,y=o().sidebar,[z,N]=t(()=>(u?h(u,v,g):null)??m(d,v,g),m(d,v,g)),k=null!=r||null!=n,P=/* @__PURE__ */a("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:z},children:[
3
3
  /* @__PURE__ */a("div",{className:`flex h-full flex-col ${k?"overflow-hidden":"overflow-y-auto"} ${p}`,children:[null!=r&&/* @__PURE__ */s("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:r}),k?/* @__PURE__ */s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */s("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
4
- /* @__PURE__ */s(f,{side:l,width:z,onResize:N,min:v,max:g,defaultWidth:m(d,v,g),storageKey:u,hint:y.resize})]}),$=/* @__PURE__ */s("div",{className:`flex min-w-0 flex-1 flex-col ${w}`,children:i});/* @__PURE__ */
5
- return s("div",{className:`flex h-full w-full overflow-hidden ${b}`,children:/* @__PURE__ */a(c,x?{children:[$,P]}:{children:[P,$]})})}export{f as ResizeHandle,v as SidebarLayout};
4
+ /* @__PURE__ */s(f,{side:l,width:z,onResize:N,min:v,max:g,defaultWidth:m(d,v,g),storageKey:u,hint:y.resize})]}),C=/* @__PURE__ */s("div",{className:`flex min-w-0 flex-1 flex-col ${w}`,children:i});/* @__PURE__ */
5
+ return s("div",{className:`flex h-full w-full overflow-hidden ${b}`,children:/* @__PURE__ */a(c,x?{children:[C,P]}:{children:[P,C]})})}export{f as ResizeHandle,v as SidebarLayout};
@@ -0,0 +1,9 @@
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-THM35LAN.js";import{navIcons as r}from"./chunk-DSSLOQDW.js";import{VERSION as s}from"./chunk-B4XGJA3N.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as n,splitAround as i}from"./chunk-QRCDQPJA.js";import{Icon as a}from"./chunk-ZGUQLVY4.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=o.aboutApp,x={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},f=/* @__PURE__ */p(a,{name:"info",className:"h-4 w-4 text-gray-400",strokeWidth:1.5}),v=/* @__PURE__ */p(a,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const a=x[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=n().aboutApp,y=g.title(a.name);if(e(y,N,f),!u)return null;const b=r[a.route],k=l(b)?d(b,{className:"h-9 w-9"}):v,[j,A]=i(g.partOf);/* @__PURE__ */
2
+ return p(t,{open:!0,onClose:()=>w(!1),title:y,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
+ /* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
4
+ /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:a.name}),
5
+ /* @__PURE__ */p("p",{className:"text-2xs font-mono text-gray-400",children:g.version(a.version)}),
6
+ /* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:g[o]}),
7
+ /* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
+ /* @__PURE__ */h("p",{className:"text-2xs text-gray-500",children:[j,
9
+ /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),A]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-gray-400",children:g.shellVersion(s)})]})]})})}export{w as AboutApp,x as BUILTIN_APP_INFO};