efficient-shell 10.2.1 → 10.4.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 (52) hide show
  1. package/README.md +12 -1
  2. package/dist/{Browser-YHMFQIN5.js → Browser-WZTJDJPT.js} +14 -14
  3. package/dist/Calculator-S5OP2NS6.js +29 -0
  4. package/dist/{CurrencyConverter-YQ2AZ7ZG.js → CurrencyConverter-MQ3OOVX4.js} +12 -12
  5. package/dist/{Documents-CMCZA5PH.js → Documents-KZ2V5CYE.js} +17 -17
  6. package/dist/{Files-UW65YMFW.js → Files-KV3ZHSLP.js} +77 -77
  7. package/dist/{Notepad-RSYZ7HZA.js → Notepad-U2I5IPBD.js} +9 -9
  8. package/dist/{PomodoroTimer-5KCWCL62.js → PomodoroTimer-CX677P57.js} +20 -20
  9. package/dist/{Preview-PK4QI7SK.js → Preview-VZIROQOT.js} +22 -22
  10. package/dist/{Spreadsheet-MQR4TQGV.js → Spreadsheet-676YI5OX.js} +13 -13
  11. package/dist/{Stock-DMW2REHR.js → Stock-PWPUDMK2.js} +6 -6
  12. package/dist/{Weather-PN7XVCZY.js → Weather-3N3MSFQV.js} +13 -13
  13. package/dist/{WorldClock-JYLOJCUS.js → WorldClock-6QYLEBLL.js} +6 -6
  14. package/dist/ai/index.d.ts +25 -5
  15. package/dist/ai/index.js +59 -59
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/chunk-3DVNXNTF.js +1 -0
  21. package/dist/{chunk-QL4757YL.js → chunk-4WXF5E3O.js} +3 -3
  22. package/dist/{chunk-RP3GUVAI.js → chunk-573EHCD7.js} +39 -39
  23. package/dist/chunk-ANDANM5V.js +1 -0
  24. package/dist/{chunk-YATWJMLM.js → chunk-GTNJAKFO.js} +18 -18
  25. package/dist/{chunk-O42AN43Q.js → chunk-JQYNMUZW.js} +1 -1
  26. package/dist/chunk-LNWQBSYD.js +5 -0
  27. package/dist/{chunk-XDQGIW4X.js → chunk-LYIXZFMP.js} +1 -1
  28. package/dist/{chunk-VJJMWJPZ.js → chunk-OKL56EZ5.js} +1 -1
  29. package/dist/chunk-OTGQYHVC.js +9 -0
  30. package/dist/{chunk-MTX5LMJD.js → chunk-QWWJUYZI.js} +15 -15
  31. package/dist/forms/MediaLibrary.js +1 -1
  32. package/dist/hooks/useTheme.d.ts +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +57 -57
  35. package/dist/page-tabs/index.js +5 -5
  36. package/dist/shell/ConfirmDialog.js +1 -1
  37. package/dist/shell/Dialog.d.ts +2 -2
  38. package/dist/shell/Dialog.js +1 -1
  39. package/dist/shell/Drawer.d.ts +2 -2
  40. package/dist/shell/Drawer.js +1 -1
  41. package/dist/shell/discardGuard.js +1 -1
  42. package/dist/telemetry/index.js +1 -1
  43. package/dist/templates/ErrorBoundary.d.ts +1 -1
  44. package/dist/ui/index.js +1 -1
  45. package/dist/version.js +1 -1
  46. package/package.json +1 -1
  47. package/dist/Calculator-NSYIXONM.js +0 -29
  48. package/dist/chunk-6OMCCEYA.js +0 -1
  49. package/dist/chunk-AKJHVOSD.js +0 -8
  50. package/dist/chunk-SDI2UGAG.js +0 -1
  51. package/dist/chunk-XLYCWGTK.js +0 -4
  52. /package/dist/{chunk-YMYY5G6V.js → chunk-OW7MLJ3Y.js} +0 -0
@@ -0,0 +1 @@
1
+ import{useBrowserLayoutEffect as t}from"./chunk-D65T4H6J.js";import{createContext as e,useContext as n,useRef as i,useState as r}from"react";var o=e(void 0),h=o.Provider;function l(t){const e=n(o);return t?void 0===e?document.body:e:null}function u(t,e){if("undefined"==typeof Element||!(t instanceof Element))return!1;const n=t.closest("[data-overlay-layer]");return null!==n&&!e?.contains(n)}var d="[data-modal-panel], [data-popup-panel]";function s(t,e,n){return n<e?e:Math.min(Math.max(t,e),n)}function c(){return{width:window.innerWidth,height:window.innerHeight}}function f(e,n){const o=i(null),h=i(!1);e&&!h.current&&(o.current="undefined"==typeof document?null:document.activeElement),h.current=e;const[l,u]=r(null);return t(()=>{if(!e)return void u(null);const t=(i=n.current,r=o.current,i?.parentElement?.closest(d)??r?.closest(d)??null);var i,r;if(!t)return void u(null);const h=()=>{const e=t.getBoundingClientRect(),n=c(),i=function(t,e){const n=Math.max(0,t.left),i=Math.max(0,t.top),r=Math.min(e.width,t.left+t.width),o=Math.min(e.height,t.top+t.height);return r-n<1||o-i<1?null:{left:n,top:i,width:r-n,height:o-i}}({left:e.left,top:e.top,width:e.width,height:e.height},n),r=null!==i&&i.width>=n.width-1&&i.height>=n.height-1;u(t=>{const e=r?null:i;return t===e||t&&e&&t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height?t:e})};h(),window.addEventListener("resize",h);const l="undefined"==typeof ResizeObserver?null:new ResizeObserver(h);return l?.observe(t),()=>{window.removeEventListener("resize",h),l?.disconnect()}},[e,n]),l}function a(e,n){const[i,o]=r(null);return t(()=>{const t=n.current;if(!e||!t)return void o(null);const i=()=>{const n=function(t,e,n,i=16){return{left:s(t.left+t.width/2-e.width/2,i,n.width-i-e.width),top:s(t.top+t.height/2-e.height/2,i,n.height-i-e.height)}}(e,{width:t.offsetWidth,height:t.offsetHeight},c());o(t=>t&&t.left===n.left&&t.top===n.top?t:n)};i(),window.addEventListener("resize",i);const r="undefined"==typeof ResizeObserver?null:new ResizeObserver(i);return r?.observe(t),()=>{window.removeEventListener("resize",i),r?.disconnect()}},[e,n]),i}export{h as OverlayLayerProvider,u as isInOverlayOver,l as useOverlayTarget,a as usePanelPosition,f as usePopupAnchor};
@@ -1,9 +1,9 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-RP3GUVAI.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-6OMCCEYA.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-4PAWQEXM.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 f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:n}){const o=u[n],[f,w]=m(!1),N=c(()=>w(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,N,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):v,[j,A]=a(b.partOf);/* @__PURE__ */
2
- return p(t,{open:!0,onClose:()=>w(!1),title:k,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:[
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-573EHCD7.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-ANDANM5V.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-4PAWQEXM.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 f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function N({app:n}){const o=u[n],[f,N]=m(!1),w=c(()=>N(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,w,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):v,[j,A]=a(b.partOf);/* @__PURE__ */
2
+ return p(t,{open:!0,onClose:()=>N(!1),title:k,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
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:y}),
4
4
  /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:o.name}),
5
5
  /* @__PURE__ */p("p",{className:"text-2xs font-mono text-ink-faintest",children:b.version(o.version)}),
6
6
  /* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[n]}),
7
7
  /* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
8
  /* @__PURE__ */h("p",{className:"text-2xs text-ink-faint",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-ink-faintest",children:b.shellVersion(s)})]})]})})}export{w as AboutApp,u as BUILTIN_APP_INFO};
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-ink-faintest",children:b.shellVersion(s)})]})]})})}export{N as AboutApp,u as BUILTIN_APP_INFO};