efficient-shell 4.134.0 → 4.137.1

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 (171) hide show
  1. package/LICENSE +6 -17
  2. package/README.md +84 -8
  3. package/dist/Browser-ZX5OTOKK.js +43 -0
  4. package/dist/Calculator-4SQGOQFQ.js +29 -0
  5. package/dist/ConfirmDialog-NPKW2XHM.js +1 -0
  6. package/dist/CurrencyConverter-2KOM7L6V.js +21 -0
  7. package/dist/Documents-IZTIQYPG.js +52 -0
  8. package/dist/Files-B63KKXGZ.js +89 -0
  9. package/dist/Notepad-WA77V45J.js +25 -0
  10. package/dist/PdfViewer-RBRGEKWF.js +1 -0
  11. package/dist/PomodoroTimer-SDUBKXUS.js +99 -0
  12. package/dist/Preview-D4KOA4OI.js +187 -0
  13. package/dist/Sidebar-Y57LYXXI.js +23 -0
  14. package/dist/Spreadsheet-JX5E6WH6.js +37 -0
  15. package/dist/Stock-XAQ5WMUZ.js +16 -0
  16. package/dist/Weather-HLAGJ5LV.js +60 -0
  17. package/dist/WorldClock-IRI4VCTA.js +32 -0
  18. package/dist/apps/index.js +1 -151
  19. package/dist/brand.css +1 -1
  20. package/dist/chunk-3A46NCXK.js +29 -0
  21. package/dist/chunk-44UO7FYU.js +11 -0
  22. package/dist/chunk-466CM2TJ.js +1 -0
  23. package/dist/chunk-57MIENLJ.js +1 -0
  24. package/dist/chunk-5CRAF2AD.js +2 -0
  25. package/dist/chunk-A2OQLLYK.js +6 -0
  26. package/dist/chunk-B43AGQET.js +4 -0
  27. package/dist/chunk-BR22X7E5.js +1 -0
  28. package/dist/chunk-BUTSU7FO.js +1 -0
  29. package/dist/chunk-D65T4H6J.js +1 -0
  30. package/dist/chunk-ESL5TDNA.js +1 -0
  31. package/dist/chunk-FBDZGO3V.js +1 -0
  32. package/dist/chunk-FHTLC7HH.js +1 -0
  33. package/dist/chunk-FQLMX3IE.js +948 -0
  34. package/dist/chunk-H562R4GX.js +34 -0
  35. package/dist/chunk-JN4WXTWJ.js +106 -0
  36. package/dist/chunk-LVDRBRYU.js +1 -0
  37. package/dist/chunk-LWLCNQY7.js +1 -0
  38. package/dist/chunk-MAIHBBWT.js +1 -0
  39. package/dist/chunk-NPJH5MD7.js +13 -0
  40. package/dist/chunk-OCSOMMY2.js +1 -0
  41. package/dist/chunk-OQDWLHZI.js +1 -0
  42. package/dist/chunk-OWSAMA3I.js +23 -0
  43. package/dist/chunk-PH3PRIFP.js +5 -0
  44. package/dist/chunk-TAWKWSPN.js +9 -0
  45. package/dist/chunk-U4GTZPXP.js +1 -0
  46. package/dist/chunk-UB4JIOLD.js +2 -0
  47. package/dist/chunk-UZAJ5BF6.js +9 -0
  48. package/dist/chunk-VEGMDXT4.js +1 -0
  49. package/dist/chunk-VTVSMRFX.js +1 -0
  50. package/dist/chunk-VVAGSKW7.js +1 -0
  51. package/dist/chunk-XO43FJRM.js +19 -0
  52. package/dist/chunk-Y7BOLDRM.js +69 -0
  53. package/dist/file-intake/index.js +1 -4
  54. package/dist/{index-DZ7E7bCl.d.ts → index-DVI9DMSu.d.ts} +189 -18
  55. package/dist/index.d.ts +2 -2
  56. package/dist/index.js +639 -7473
  57. package/dist/map/index.js +20 -540
  58. package/dist/markdown/index.js +6 -184
  59. package/dist/markup/index.js +1 -135
  60. package/dist/page-tabs/index.js +21 -709
  61. package/dist/sounds-OMHXVVQ4.js +1 -0
  62. package/dist/ui/index.d.ts +1 -1
  63. package/dist/ui/index.js +1 -19
  64. package/dist/ui.css +78 -10
  65. package/package.json +4 -3
  66. package/dist/Browser-O3QZGUF2.js +0 -482
  67. package/dist/Browser-O3QZGUF2.js.map +0 -1
  68. package/dist/Calculator-L6N5X3KU.js +0 -192
  69. package/dist/Calculator-L6N5X3KU.js.map +0 -1
  70. package/dist/ConfirmDialog-LYSSZSUD.js +0 -4
  71. package/dist/ConfirmDialog-LYSSZSUD.js.map +0 -1
  72. package/dist/CurrencyConverter-64MKXB3D.js +0 -236
  73. package/dist/CurrencyConverter-64MKXB3D.js.map +0 -1
  74. package/dist/Documents-5WXXYCLI.js +0 -441
  75. package/dist/Documents-5WXXYCLI.js.map +0 -1
  76. package/dist/Files-AUURUUDN.js +0 -805
  77. package/dist/Files-AUURUUDN.js.map +0 -1
  78. package/dist/Notepad-GPXJVPB7.js +0 -410
  79. package/dist/Notepad-GPXJVPB7.js.map +0 -1
  80. package/dist/PdfViewer-HKO6P4SR.js +0 -5
  81. package/dist/PdfViewer-HKO6P4SR.js.map +0 -1
  82. package/dist/PomodoroTimer-4TQBWLP2.js +0 -633
  83. package/dist/PomodoroTimer-4TQBWLP2.js.map +0 -1
  84. package/dist/Preview-FOZYPKM2.js +0 -2959
  85. package/dist/Preview-FOZYPKM2.js.map +0 -1
  86. package/dist/Sidebar-BPU7RCZP.js +0 -291
  87. package/dist/Sidebar-BPU7RCZP.js.map +0 -1
  88. package/dist/Spreadsheet-3C66BBBF.js +0 -519
  89. package/dist/Spreadsheet-3C66BBBF.js.map +0 -1
  90. package/dist/Stock-IF4IHYLU.js +0 -158
  91. package/dist/Stock-IF4IHYLU.js.map +0 -1
  92. package/dist/Weather-725PFR7T.js +0 -431
  93. package/dist/Weather-725PFR7T.js.map +0 -1
  94. package/dist/WorldClock-UU4NZIQ7.js +0 -202
  95. package/dist/WorldClock-UU4NZIQ7.js.map +0 -1
  96. package/dist/apps/index.js.map +0 -1
  97. package/dist/chunk-2TPTHAKI.js +0 -316
  98. package/dist/chunk-2TPTHAKI.js.map +0 -1
  99. package/dist/chunk-4P44JXDS.js +0 -195
  100. package/dist/chunk-4P44JXDS.js.map +0 -1
  101. package/dist/chunk-5O42JXQE.js +0 -26
  102. package/dist/chunk-5O42JXQE.js.map +0 -1
  103. package/dist/chunk-72CQWN7O.js +0 -547
  104. package/dist/chunk-72CQWN7O.js.map +0 -1
  105. package/dist/chunk-7CCHEEYC.js +0 -94
  106. package/dist/chunk-7CCHEEYC.js.map +0 -1
  107. package/dist/chunk-BE7FZOFU.js +0 -17
  108. package/dist/chunk-BE7FZOFU.js.map +0 -1
  109. package/dist/chunk-D276EMXS.js +0 -57
  110. package/dist/chunk-D276EMXS.js.map +0 -1
  111. package/dist/chunk-D7PYW2QS.js +0 -265
  112. package/dist/chunk-D7PYW2QS.js.map +0 -1
  113. package/dist/chunk-DVZWYWSD.js +0 -26
  114. package/dist/chunk-DVZWYWSD.js.map +0 -1
  115. package/dist/chunk-ET6ID4LP.js +0 -102
  116. package/dist/chunk-ET6ID4LP.js.map +0 -1
  117. package/dist/chunk-GA35NEND.js +0 -56
  118. package/dist/chunk-GA35NEND.js.map +0 -1
  119. package/dist/chunk-GIGV2ZRW.js +0 -70
  120. package/dist/chunk-GIGV2ZRW.js.map +0 -1
  121. package/dist/chunk-IPXN646P.js +0 -14
  122. package/dist/chunk-IPXN646P.js.map +0 -1
  123. package/dist/chunk-IRWSRJ4K.js +0 -48
  124. package/dist/chunk-IRWSRJ4K.js.map +0 -1
  125. package/dist/chunk-IULP5BCD.js +0 -79
  126. package/dist/chunk-IULP5BCD.js.map +0 -1
  127. package/dist/chunk-MGGY74RY.js +0 -14
  128. package/dist/chunk-MGGY74RY.js.map +0 -1
  129. package/dist/chunk-OLJDJYSU.js +0 -13678
  130. package/dist/chunk-OLJDJYSU.js.map +0 -1
  131. package/dist/chunk-PIGDNN5F.js +0 -46
  132. package/dist/chunk-PIGDNN5F.js.map +0 -1
  133. package/dist/chunk-Q2MJVSJT.js +0 -7
  134. package/dist/chunk-Q2MJVSJT.js.map +0 -1
  135. package/dist/chunk-Q3LT745N.js +0 -3710
  136. package/dist/chunk-Q3LT745N.js.map +0 -1
  137. package/dist/chunk-QAGQRNKI.js +0 -145
  138. package/dist/chunk-QAGQRNKI.js.map +0 -1
  139. package/dist/chunk-QRL64J5F.js +0 -503
  140. package/dist/chunk-QRL64J5F.js.map +0 -1
  141. package/dist/chunk-QSKCQUZE.js +0 -1103
  142. package/dist/chunk-QSKCQUZE.js.map +0 -1
  143. package/dist/chunk-R4OQIQYX.js +0 -153
  144. package/dist/chunk-R4OQIQYX.js.map +0 -1
  145. package/dist/chunk-RT6DSB5Y.js +0 -143
  146. package/dist/chunk-RT6DSB5Y.js.map +0 -1
  147. package/dist/chunk-SHQM5CK3.js +0 -549
  148. package/dist/chunk-SHQM5CK3.js.map +0 -1
  149. package/dist/chunk-T4VQHMG4.js +0 -822
  150. package/dist/chunk-T4VQHMG4.js.map +0 -1
  151. package/dist/chunk-TRCWINHF.js +0 -105
  152. package/dist/chunk-TRCWINHF.js.map +0 -1
  153. package/dist/chunk-TW7LPMVR.js +0 -16
  154. package/dist/chunk-TW7LPMVR.js.map +0 -1
  155. package/dist/chunk-W622KQTD.js +0 -465
  156. package/dist/chunk-W622KQTD.js.map +0 -1
  157. package/dist/chunk-X4Q6G253.js +0 -416
  158. package/dist/chunk-X4Q6G253.js.map +0 -1
  159. package/dist/chunk-YNKK7NE3.js +0 -171
  160. package/dist/chunk-YNKK7NE3.js.map +0 -1
  161. package/dist/chunk-YPO6RDMX.js +0 -20
  162. package/dist/chunk-YPO6RDMX.js.map +0 -1
  163. package/dist/file-intake/index.js.map +0 -1
  164. package/dist/index.js.map +0 -1
  165. package/dist/map/index.js.map +0 -1
  166. package/dist/markdown/index.js.map +0 -1
  167. package/dist/markup/index.js.map +0 -1
  168. package/dist/page-tabs/index.js.map +0 -1
  169. package/dist/sounds-NT4DEZGD.js +0 -3
  170. package/dist/sounds-NT4DEZGD.js.map +0 -1
  171. package/dist/ui/index.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ import{useShellStrings as e,splitAround as t}from"./chunk-OQDWLHZI.js";import{createContext as n,useEffect as r,useRef as o,useId as i,useContext as l,useState as a,useCallback as s,useLayoutEffect as d}from"react";import{jsxs as c,jsx as u,Fragment as m}from"react/jsx-runtime";var f=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function h(e){return Array.from(e.querySelectorAll(f)).filter(e=>null!==e.offsetParent||e===document.activeElement)}function b(e,t,n){r(()=>{if(!t)return;const r=e.current;if(!r)return;const o=document.activeElement,i=n?.current??h(r)[0]??r;i!==r||r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),i.focus();const l=e=>{if("Tab"!==e.key)return;const t=h(r);if(0===t.length)return void e.preventDefault();const n=t[0],o=t[t.length-1],i=document.activeElement;!e.shiftKey||i!==n&&r.contains(i)?e.shiftKey||i!==o&&r.contains(i)||(e.preventDefault(),n.focus()):(e.preventDefault(),o.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),(r.contains(document.activeElement)||document.activeElement===document.body)&&o?.focus?.()}},[e,t,n])}var g=0,p=null;function v(e){r(()=>{if(!e)return;const t=document.body;if(0===g){p={overflow:t.style.overflow,paddingRight:t.style.paddingRight};const e=window.innerWidth-document.documentElement.clientWidth;t.style.overflow="hidden",e>0&&(t.style.paddingRight=`${e}px`)}return g+=1,()=>{0===(g-=1)&&p&&(t.style.overflow=p.overflow,t.style.paddingRight=p.paddingRight,p=null)}},[e])}var y=/* @__PURE__ */new Set,x=null;function w(e){return y.add(e),function(){if(x||"undefined"==typeof document)return;const e=e=>{"Escape"===e.key&&k(e)&&(e.preventDefault(),e.stopPropagation())};document.addEventListener("keydown",e,!0),x=()=>document.removeEventListener("keydown",e,!0)}(),()=>{y.delete(e),0===y.size&&x&&(x(),x=null)}}function k(e){const t=Array.from(y);for(let n=t.length-1;n>=0;n--)try{if(t[n](e))return!0}catch{}return!1}var N="react-os-shell:overlay-open";function L(){"undefined"!=typeof window&&window.dispatchEvent(new Event(N))}function C(e){return"undefined"==typeof window?()=>{}:(window.addEventListener(N,e),()=>window.removeEventListener(N,e))}var E="undefined"==typeof document?r:d;function P(e){E(()=>{e&&L()},[e])}var j={window:50,windowStep:10,menu:400,pinnedWindow:999,overlay:9999,popup:1e4},W={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg"};function D({open:t,onClose:n,title:l,children:a,footer:s,blocking:d=!1,size:m="md",initialFocus:f,"aria-label":h,className:g=""}){const p=o(null),y=i(),x=!d&&!s,k=i(),N=e().dialog;return P(t),b(p,t,f),v(t),r(()=>{if(t)return w(()=>(d||n(),!0))},[t,d,n]),t?/* @__PURE__ */c("div",{className:"fixed inset-0",style:{zIndex:j.overlay},role:"presentation",children:[
2
+ /* @__PURE__ */u("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
3
+ /* @__PURE__ */u("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:d?void 0:e=>{e.target===e.currentTarget&&n()},children:/* @__PURE__ */c("div",{ref:p,role:"dialog","aria-modal":"true","aria-labelledby":l?k:void 0,"aria-label":l?void 0:h,"aria-describedby":a?y:void 0,className:`relative w-full ${W[m]} rounded-lg bg-white p-6 shadow-xl ${g}`.trim(),children:[l&&/* @__PURE__ */u("h2",{id:k,className:(x?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:l}),a&&/* @__PURE__ */u("div",{id:y,className:"mt-2 text-sm text-gray-600",children:a}),s&&/* @__PURE__ */u("div",{className:"mt-6 flex justify-end gap-3",children:s}),x&&/* @__PURE__ */u("button",{type:"button",onClick:n,"aria-label":N.close,className:"absolute right-3 top-3 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */u("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:/* @__PURE__ */u("path",{d:"M6 6l8 8M14 6l-8 8"})})})]})})]}):null}var $=n(()=>Promise.resolve(!1)),F=()=>l($),M=()=>Promise.resolve(!1),T=e=>M(e),z=()=>Promise.resolve(!1),A=e=>z(e),R=()=>Promise.resolve(null),K=e=>R(e),B={danger:{icon:"text-red-600 bg-red-100",button:"bg-red-600 hover:bg-red-700 text-white"},warning:{icon:"text-yellow-600 bg-yellow-100",button:"bg-yellow-600 hover:bg-yellow-700 text-white"},info:{icon:"text-blue-600 bg-blue-100",button:"bg-blue-600 hover:bg-blue-700 text-white"}},S="bg-white text-gray-700 border border-gray-300 px-4 py-2 text-sm font-medium rounded-lg hover:bg-gray-50";function H(){/* @__PURE__ */
4
+ return u("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */u("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}function I(){/* @__PURE__ */
5
+ return u("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */u("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}function q({children:n}){const[i,l]=a(!1),[d,f]=a({message:""}),[h,b]=a(0),g=o(),p=o(null),v=o(0),y=o([]),x=o(null),w=o(null),k=s(e=>{p.current=e.id,g.current=e.resolve,b(e.id),f(e.options),l(!0)},[]),N=s(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const n={id:++v.current,options:t,resolve:e};null===p.current?k(n):y.current.push(n)})},[k]),[L,C]=a(!1),[E,P]=a({message:""}),[j,W]=a(""),F=o(),T=s(e=>(P(e),W(""),C(!0),new Promise(e=>{F.current=e})),[]),[A,K]=a(!1),[q,O]=a({}),[Q,V]=a(""),Z=o(),G=s(e=>{const t="string"==typeof e?{message:e}:e;return O(t),V(t.defaultValue??""),K(!0),new Promise(e=>{Z.current=e})},[]);r(()=>{M=N,z=T,R=G},[N,T,G]);const J=(e,t)=>{if(p.current!==e)return;const n=g.current,r=y.current.shift();r?k(r):(p.current=null,g.current=void 0,l(!1)),n?.(t)},U=e=>{C(!1),W(""),F.current?.(e)},X=e=>{if(e){const e=Q.trim();if(!e&&!q.allowEmpty)return K(!1),void Z.current?.(null);K(!1),Z.current?.(e)}else K(!1),Z.current?.(null)},Y=d.variant||(d.confirmLabel?.toLowerCase().includes("delete")||d.message.toLowerCase().includes("delete")?"danger":"info"),_=B[Y],ee=B["warning"===E.variant?"warning":"danger"],te=E.confirmWord,ne=null==te||j===te,re=e().dialog,[oe,ie]=t(re.typeToConfirm);/* @__PURE__ */
6
+ return c($.Provider,{value:N,children:[n,
7
+ /* @__PURE__ */u(D,{open:i,onClose:()=>J(h,!1),initialFocus:x,footer:/* @__PURE__ */c(m,{children:[
8
+ /* @__PURE__ */u("button",{ref:x,type:"button",onClick:()=>J(h,!1),className:S,children:d.cancelLabel||re.cancel}),
9
+ /* @__PURE__ */u("button",{type:"button",onClick:()=>J(h,!0),className:`px-4 py-2 text-sm font-medium rounded-lg ${_.button}`,children:d.confirmLabel||re.ok})]}),children:/* @__PURE__ */c("div",{className:"flex gap-4",children:[
10
+ /* @__PURE__ */u("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${_.icon}`,children:/* @__PURE__ */u(H,{})}),
11
+ /* @__PURE__ */c("div",{className:"flex-1",children:[
12
+ /* @__PURE__ */u("h2",{className:"text-base font-semibold text-gray-900",children:d.title||re.confirmTitle}),
13
+ /* @__PURE__ */u("p",{className:"mt-2 text-sm text-gray-600",children:d.message})]})]})}),
14
+ /* @__PURE__ */c(D,{open:L,onClose:()=>U(!1),initialFocus:null!=te?void 0:w,footer:/* @__PURE__ */c(m,{children:[
15
+ /* @__PURE__ */u("button",{ref:w,type:"button",onClick:()=>U(!1),className:S,children:E.cancelLabel||re.destructiveCancel}),
16
+ /* @__PURE__ */u("button",{type:"button",onClick:()=>U(!0),disabled:!ne,className:`px-4 py-2 text-sm font-medium rounded-lg disabled:opacity-40 ${ee.button}`,children:te??E.confirmLabel??re.destructiveConfirm})]}),children:[
17
+ /* @__PURE__ */u("button",{type:"button",onClick:()=>U(!1),"aria-label":re.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */u(I,{})}),
18
+ /* @__PURE__ */c("div",{className:"flex gap-4",children:[
19
+ /* @__PURE__ */u("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${ee.icon}`,children:/* @__PURE__ */u(H,{})}),
20
+ /* @__PURE__ */c("div",{className:"flex-1",children:[
21
+ /* @__PURE__ */u("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:E.title||re.destructiveTitle}),
22
+ /* @__PURE__ */u("p",{className:"mt-2 text-sm text-gray-600",children:E.message}),null!=te&&/* @__PURE__ */c(m,{children:[
23
+ /* @__PURE__ */c("p",{className:"mt-3 text-sm text-gray-700",children:[oe,
24
+ /* @__PURE__ */u("kbd",{className:"rounded border border-gray-300 bg-gray-50 px-1.5 py-0.5 text-xs font-bold text-red-600 font-mono",children:te}),ie]}),
25
+ /* @__PURE__ */u("input",{autoFocus:!0,type:"text",value:j,onChange:e=>W(e.target.value),onKeyDown:e=>{"Enter"===e.key&&j===te&&U(!0)},placeholder:te,className:"mt-2 w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-red-500"})]})]})]})]}),
26
+ /* @__PURE__ */c(D,{open:A,onClose:()=>X(!1),title:q.title||re.promptTitle,footer:/* @__PURE__ */c(m,{children:[
27
+ /* @__PURE__ */u("button",{type:"button",onClick:()=>X(!1),className:S,children:q.cancelLabel||re.cancel}),
28
+ /* @__PURE__ */u("button",{type:"button",onClick:()=>X(!0),disabled:!q.allowEmpty&&!Q.trim(),className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 text-sm font-medium rounded-lg disabled:opacity-40",children:q.confirmLabel||re.ok})]}),children:[q.message&&/* @__PURE__ */u("p",{className:"text-sm text-gray-600",children:q.message}),
29
+ /* @__PURE__ */u("input",{autoFocus:!0,type:"text",value:Q,onChange:e=>V(e.target.value),onKeyDown:e=>{"Enter"===e.key?X(!0):"Escape"===e.key&&X(!1)},onFocus:e=>e.target.select(),placeholder:q.placeholder,className:"mt-3 w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})]})}export{q as ConfirmProvider,D as Dialog,N as OVERLAY_OPEN_EVENT,j as Z_LAYERS,T as confirm,A as confirmDestructive,L as dismissPopups,C as onOverlayOpen,K as prompt,w as registerModalEscapeInterceptor,k as runEscapeInterceptors,F as useConfirm,P as useDismissPopupsOnOpen,b as useFocusTrap,v as useScrollLock};
@@ -0,0 +1,11 @@
1
+ import{useShellStrings as e}from"./chunk-OQDWLHZI.js";import{useHydrated as t,useBrowserState as r}from"./chunk-D65T4H6J.js";import{createContext as n,useSyncExternalStore as o,useCallback as i,useContext as a,useMemo as s}from"react";import{jsxs as l,jsx as c}from"react/jsx-runtime";var d="(max-width: 767px), (pointer: coarse)";function u(){return!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(d).matches}function f(){return!1}function m(e){if("undefined"==typeof window||!window.matchMedia)return()=>{};const t=window.matchMedia(d);return t.addEventListener?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function h(){return o(m,u,f)}var w={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},p={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},g={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function v({tone:e}){const t={className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":!0};switch(e){case"success":/* @__PURE__ */
2
+ return c("svg",{...t,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})});case"error":/* @__PURE__ */
3
+ return c("svg",{...t,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});case"warning":/* @__PURE__ */
4
+ return c("svg",{...t,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})});default:/* @__PURE__ */
5
+ return c("svg",{...t,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"})})}}function y({status:t="info",title:r,subTitle:n,extra:o,icon:i,children:a,className:s=""}){const d=w[t],u=e().errors;/* @__PURE__ */
6
+ return l("div",{role:"error"===d?"alert":void 0,className:`flex flex-col items-center justify-center px-6 py-12 text-center ${s}`.trim(),children:[
7
+ /* @__PURE__ */c("div",{className:`flex h-14 w-14 items-center justify-center rounded-full ${p[d]}`,children:i??/* @__PURE__ */c(v,{tone:d})}),
8
+ /* @__PURE__ */c("h2",{className:"mt-4 text-lg font-semibold text-gray-900",children:r??g[t]?.(u)??""}),n&&/* @__PURE__ */c("p",{className:"mt-1 max-w-md text-sm text-gray-500",children:n}),a&&/* @__PURE__ */c("div",{className:"mt-4 w-full max-w-md text-left",children:a}),o&&/* @__PURE__ */c("div",{className:"mt-6 flex flex-wrap items-center justify-center gap-3",children:o})]})}function x({size:e="md",padding:t="py-12",label:r,className:n=""}){const o=/* @__PURE__ */c("div",{className:`${"sm"===e?"h-5 w-5":"lg"===e?"h-12 w-12":"h-8 w-8"} animate-spin rounded-full border-2 border-gray-200 border-t-blue-600`});return null==r?/* @__PURE__ */c("div",{className:`flex items-center justify-center ${t} ${n}`,children:o}):/* @__PURE__ */l("div",{role:"status",className:`flex flex-col items-center justify-center gap-3 ${t} ${n}`,children:[o,
9
+ /* @__PURE__ */c("p",{className:"text-sm text-gray-500",children:r})]})}var L="undefined"!=typeof window&&"undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),M={MOD:["⌘","Ctrl"],ALT:["⌥","Alt"],CMD_ENTER:["⌘⏎","Ctrl⏎"],CMD_S:["⌘S","Ctrl+S"],CMD_K:["⌘K","Ctrl+K"],CMD_DOT:["⌘.","Ctrl+."],CMD_A:["⌘A","Ctrl+A"],CMD_Z:["⌘Z","Ctrl+Z"],CMD_SHIFT_Z:["⌘⇧Z","Ctrl+Shift+Z"],ALT_SHIFT_D:["⌥⇧D","Alt+Shift+D"],ALT_SHIFT_E:["⌥⇧E","Alt+Shift+E"],ALT_SHIFT_N:["⌥⇧N","Alt+Shift+N"]},_=L?0:1,b=M.MOD[_],C=M.ALT[_],D="⇧",N="⏎",S=M.CMD_ENTER[_],E=M.CMD_S[_],T=M.CMD_K[_],k=M.CMD_DOT[_],A=M.CMD_A[_],j=M.CMD_Z[_],H=M.CMD_SHIFT_Z[_],I=M.ALT_SHIFT_D[_],F=M.ALT_SHIFT_E[_],Z=M.ALT_SHIFT_N[_],z=new Map(L?Object.values(M).map(([e,t])=>[e,t]):[]);function O(e){return t()?e:z.get(e)??e}var P="inline-flex items-center justify-center rounded border border-gray-200 bg-gray-50 font-medium text-gray-500",$={sm:"px-1 py-0.5 text-[10px]",md:"px-1.5 py-0.5 text-[11px]"};function K({keys:e,size:t="md",className:r=""}){const n=O(e);/* @__PURE__ */
10
+ return c("kbd",{className:[P,$[t],r].filter(Boolean).join(" "),children:n})}var R=n(null);function J({value:e,children:t}){/* @__PURE__ */
11
+ return c(R.Provider,{value:e,children:t})}function U(e="react-os-shell:prefs",t){const[n,o]=r(()=>{try{const r=JSON.parse(localStorage.getItem(e)||"{}");return{...t??{},...r}}catch{return{...t??{}}}},{...t??{}});return{prefs:n,save:i(t=>{o(r=>{const n={...r,...t};try{localStorage.setItem(e,JSON.stringify(n))}catch{}return n})},[e])}}var W={prefs:{},save:()=>{}};function B(){return a(R)??W}function Q(){const{prefs:e,save:t}=B(),r=i(e=>{const r=t(e);return r&&"function"==typeof r.then?r.catch(()=>{}):r},[t]);return s(()=>({prefs:e,save:r}),[e,r])}var V="react-os-shell:stale-chunk-reload-at",q=3e4,G="vite:preloadError",X="/_next/static/",Y=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function ee(e){if(e instanceof Error&&"ChunkLoadError"===e.name)return!0;const t=e instanceof Error?e.message:"string"==typeof e?e:"";return Y.test(t)}function te(e={}){if("undefined"==typeof window)return()=>{};const t=e.cooldownMs??3e4,r=e.reload??(()=>window.location.reload()),n=e.now??Date.now,o=void 0===e.storage?function(){try{const e=window.sessionStorage;return e.getItem(V),e}catch{return null}}():e.storage,i=void 0===e.chunkPathPrefix?X:e.chunkPathPrefix,a=e=>{const r=n(),i=function(e){if(!e)return null;try{const t=e.getItem(V),r=null===t?NaN:Number(t);return Number.isFinite(r)?r:null}catch{return null}}(o);return null!==i&&r-i<t?(console.error("[efficient-shell] a lazy chunk is still missing after a reload; letting the failure through:",e),!1):(function(e,t){if(e)try{e.setItem(V,String(t))}catch{}}(o,r),console.warn("[efficient-shell] a lazy chunk is no longer on the server (new deploy?); reloading onto the current build:",e),!0)},s=e=>{const t=e.payload;ee(t)&&a(t)&&(e.preventDefault(),r())};let l=!0,c=!1;const d=/* @__PURE__ */new Set,u=null===i?null:e=>{const t=function(e,t){const r=e.target;let n="";if(r instanceof window.HTMLScriptElement?n=r.src:r instanceof window.HTMLLinkElement&&function(e){const t=e.rel.toLowerCase().split(/\s+/);if(t.includes("stylesheet")||t.includes("modulepreload"))return!0;const r=(e.getAttribute("as")??"").toLowerCase();return t.includes("preload")&&("script"===r||"style"===r)}(r)?n=r.href:e instanceof window.ErrorEvent&&"SyntaxError"===e.error?.name&&(n=e.filename),!n)return null;try{const e=new URL(t,window.location.origin).href,r=new URL(n,window.location.href).href;return r.startsWith(e)?r:null}catch{return null}}(e,i);!t||c||d.has(t)||(d.add(t),async function(e){try{const t=await fetch(e,{method:"HEAD",cache:"no-store"});return 404===t.status||410===t.status||t.ok&&/\btext\/html\b/i.test(t.headers.get("content-type")??"")}catch{return!1}}(t).then(e=>{d.delete(t),e&&l&&!c&&a(t)&&(c=!0,r())}))};return window.addEventListener(G,s),u&&window.addEventListener("error",u,!0),()=>{l=!1,window.removeEventListener(G,s),u&&window.removeEventListener("error",u,!0)}}export{C as ALT,I as ALT_SHIFT_D,F as ALT_SHIFT_E,Z as ALT_SHIFT_N,A as CMD_A,k as CMD_DOT,S as CMD_ENTER,T as CMD_K,E as CMD_S,H as CMD_SHIFT_Z,j as CMD_Z,N as ENTER,K as Kbd,x as LoadingSpinner,b as MOD,X as NEXT_CHUNK_PATH_PREFIX,y as Result,D as SHIFT,q as STALE_CHUNK_RELOAD_COOLDOWN_MS,V as STALE_CHUNK_RELOAD_KEY,J as ShellPrefsProvider,G as VITE_PRELOAD_ERROR_EVENT,te as installStaleChunkReload,L as isMac,ee as isStaleChunkError,h as useIsMobile,U as useLocalStoragePrefs,Q as useShellPrefs,B as useShellPrefsAdapter,O as useShortcutLabel};
@@ -0,0 +1 @@
1
+ import{setPdfPreview as e}from"./chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"./chunk-VTVSMRFX.js";import{toast_default as n}from"./chunk-VEGMDXT4.js";var i="react-os-shell:preview-opened";async function o(o){const{filePath:a,filename:r,kind:c,onStaged:s}=o;try{const o=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(a)}`,{credentials:"include"});if(!o.ok)return n.error(`Download failed (${o.status})`),!1;const d=await o.blob();if("csv"===c){const e=await d.text();t({csv:e,filename:r}),s?.("/spreadsheet")}else{const t=URL.createObjectURL(d);e({url:t,filename:r,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(i,{detail:{filePath:a,filename:r,kind:c}})),!0}catch(e){return n.error(e?.message||"Open failed"),!1}}export{i as PREVIEW_OPENED_EVENT,o as openPreviewFile};
@@ -0,0 +1 @@
1
+ import{rootIsDark as r}from"./chunk-MAIHBBWT.js";function a(){try{const r=getComputedStyle(document.documentElement).getPropertyValue("--menu-opacity")?.trim();if(r)return parseFloat(r)}catch{}return.95}var s=r;function o(){try{return document.documentElement.classList.contains("rosh-reduce-transparency")}catch{return!1}}function t(r,a){return`color-mix(in srgb, ${r} ${+(Math.round(255*Math.min(1,Math.max(0,a)))/255*100).toFixed(4)}%, transparent)`}function e(r){const e=r??a();if(o())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)",u="var(--rosh-glass-surface-mid)";return s()?{background:`linear-gradient(135deg in srgb, ${t(n,.85*e)} 0%, ${t(u,.75*e)} 50%, ${t(n,.85*e)} 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, ${t(n,.85*e)} 0%, ${t(u,.65*e)} 50%, ${t(n,.75*e)} 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 n(r){return o()?"var(--rosh-glass-surface)":t("var(--rosh-glass-surface)",.85*(r??a()))}var u="border-white/20",d="glass-input-bg";export{u as GLASS_DIVIDER,d as GLASS_INPUT_BG,n as glassFill,e as glassStyle};
@@ -0,0 +1,2 @@
1
+ import{toast_default as t}from"./chunk-VEGMDXT4.js";import{useShellPrefs as e}from"./chunk-44UO7FYU.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(G(),F()):"none"!==t&&0!==m||G()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&F())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),G())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);G(),N(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,O={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function _(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function F(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=_(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*O[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function G(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function R(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=_(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*O[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var V="pomodoro_tasks",j="pomodoro_tasks_migrated";function E(){return Math.random().toString(36).slice(2,11)}function U(){/* @__PURE__ */
2
+ return(new Date).toISOString()}var W=null,q=[],J=!1,L=null,X=/* @__PURE__ */new Set;function Y(){for(const t of X)t()}function $(t){q=t,Y()}function z(){const t=W;return t?L=t.list().then(e=>{W===t&&(q=e,J=!0,Y())}).catch(()=>{W===t&&(J=!0,Y())}).finally(()=>{L=null}):(q=[],J=!0,Y(),Promise.resolve())}function H(t){W=t,q=[],J=!1,t?z():Y()}function K(t){return X.add(t),!W||J||L||z(),()=>{X.delete(t)}}function Q(){return q}function Z(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=E(),n=U(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:U()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(K,Q,Q),i=o(e=>{const n=W;if(!n)return t.addTask(e);const o="tmp-"+E(),a=U(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...q,r]),n.create({...e,name:e.name.trim()}).then(t=>$(q.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(q.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=W;if(!o)return t.updateTask(e,n);$(q.map(t=>t.id===e?{...t,...n,id:e,updatedAt:U()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=W;if(!n)return t.removeTask(e);const o=q;$(q.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!W)return t.toggleDone(e);const n=q.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{W||t.setAllTasks(e)},[t]);return null===W?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(j))return;const n=localStorage.getItem(V);if(!n)return void localStorage.setItem(j,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(V),void localStorage.setItem(j,"1");const a=U(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||E(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(V),localStorage.setItem(j,"1")}catch{try{localStorage.setItem(j,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,R as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,H as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
@@ -0,0 +1,6 @@
1
+ import{useShellStrings as e}from"./chunk-OQDWLHZI.js";import{Fragment as i}from"react";import{jsx as t,jsxs as a}from"react/jsx-runtime";var n=/* @__PURE__ */t("svg",{className:"h-3.5 w-3.5 shrink-0 text-gray-300",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":!0,children:/* @__PURE__ */t("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 0 1 .02-1.06L11.168 10 7.23 6.29a.75.75 0 1 1 1.04-1.08l4.5 4.25a.75.75 0 0 1 0 1.08l-4.5 4.25a.75.75 0 0 1-1.06-.02Z",clipRule:"evenodd"})}),l="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function s({items:s,separator:r,maxItems:c=0,className:m}){const o=e().breadcrumbs;if(0===s.length)return null;const h=r??n,d=[],u=s.length-1;if(c>0&&s.length>c&&c>=2){const e=Math.max(1,c-1);d.push({kind:"item",item:s[0],isLast:!1}),d.push({kind:"ellipsis"});for(let i=s.length-e;i<=u;i++)d.push({kind:"item",item:s[i],isLast:i===u})}else s.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
2
+ return t("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */t("ol",{className:"flex items-center gap-1.5 text-sm",children:d.map((e,n)=>/* @__PURE__ */a(i,{children:[n>0&&/* @__PURE__ */t("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
3
+ /* @__PURE__ */t("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */t("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
4
+ /* @__PURE__ */t("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:l,children:[e.item.icon,
5
+ /* @__PURE__ */t("span",{className:"truncate",children:e.item.label})]}):/* @__PURE__ */a("button",{type:"button",onClick:e.item.onClick,className:l,children:[e.item.icon,
6
+ /* @__PURE__ */t("span",{className:"truncate",children:e.item.label})]})})]},n))})})}export{s as Breadcrumbs};
@@ -0,0 +1,4 @@
1
+ import{useShellStrings as e}from"./chunk-OQDWLHZI.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,L]=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)),k=t(null),E=o(e=>{const r=k.current;if(!r)return;const t=(e.clientX-r.startX)*(N?-1:1);L(a(r.startWidth+t,f,p))},[f,p,N]),W=o(()=>{k.current=null,window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",W),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[E]),$=o(e=>{e.preventDefault(),k.current={startX:e.clientX,startWidth:z},window.addEventListener("pointermove",E),window.addEventListener("pointerup",W),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[z,E,W]);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",E),window.removeEventListener("pointerup",W)},[E,W]);const D=N?"left-0":"right-0",I=null!=c||null!=u,S=/* @__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 ${I?"overflow-hidden":"overflow-y-auto"} ${y}`,children:[null!=c&&/* @__PURE__ */l("div",{className:"shrink-0 px-2 pt-3 pb-2",children:c}),I?/* @__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:$,onDoubleClick:()=>L(a(w,f,p)),title:x.resize,className:`group/resize absolute inset-y-0 ${D} z-10 w-2 cursor-col-resize`,children:/* @__PURE__ */l("div",{className:`absolute inset-y-0 ${D} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})]}),T=/* @__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:[T,S]}:{children:[S,T]})})}export{d as SidebarLayout};
@@ -0,0 +1 @@
1
+ function t(t){return t.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[t]||t))}export{t as escapeHtml};
@@ -0,0 +1 @@
1
+ var e=null;function t(t,s,i="sine",o=.15){try{const n=(e||(e=new AudioContext),e),c=n.createOscillator(),r=n.createGain();c.type=i,c.frequency.value=t,r.gain.value=o,r.gain.exponentialRampToValueAtTime(.001,n.currentTime+s),c.connect(r),r.connect(n.destination),c.start(),c.stop(n.currentTime+s)}catch{}}var s={label:"Classic",success:()=>{t(523,.1,"sine",.1),setTimeout(()=>t(659,.1,"sine",.1),100),setTimeout(()=>t(784,.15,"sine",.1),200)},error:()=>{t(200,.15,"sawtooth",.08),setTimeout(()=>t(180,.15,"sawtooth",.08),150)},notification:()=>{t(880,.08,"sine",.12),setTimeout(()=>t(1100,.12,"sine",.1),100)},startup:()=>{t(392,.15,"sine",.08),setTimeout(()=>t(523,.15,"sine",.08),150),setTimeout(()=>t(659,.15,"sine",.08),300),setTimeout(()=>t(784,.25,"sine",.1),450)},logout:()=>{t(784,.15,"sine",.08),setTimeout(()=>t(659,.15,"sine",.08),150),setTimeout(()=>t(523,.15,"sine",.08),300),setTimeout(()=>t(392,.25,"sine",.06),450)},click:()=>{t(800,.05,"square",.05)},timerDone:()=>{for(let e=0;e<3;e++)setTimeout(()=>t(1e3,.15,"sine",.12),300*e),setTimeout(()=>t(800,.15,"sine",.1),300*e+150)}},i={classic:s,minimal:{label:"Minimal",success:()=>{t(1200,.06,"sine",.08)},error:()=>{t(300,.1,"triangle",.06)},notification:()=>{t(900,.06,"sine",.08)},startup:()=>{t(600,.12,"sine",.06),setTimeout(()=>t(900,.15,"sine",.06),120)},click:()=>{t(1e3,.03,"sine",.03)},timerDone:()=>{t(1e3,.2,"sine",.1),setTimeout(()=>t(1e3,.2,"sine",.1),400)},logout:()=>{t(900,.1,"sine",.06),setTimeout(()=>t(600,.15,"sine",.05),120)}},retro:{label:"Retro",success:()=>{t(440,.08,"square",.08),setTimeout(()=>t(550,.08,"square",.08),80),setTimeout(()=>t(660,.08,"square",.08),160),setTimeout(()=>t(880,.12,"square",.1),240)},error:()=>{t(150,.2,"square",.06),setTimeout(()=>t(100,.3,"square",.06),200)},notification:()=>{t(660,.06,"square",.08),setTimeout(()=>t(880,.06,"square",.08),80),setTimeout(()=>t(660,.06,"square",.08),160)},startup:()=>{[262,330,392,523].forEach((e,s)=>setTimeout(()=>t(e,.1,"square",.07),100*s))},click:()=>{t(600,.03,"square",.06)},timerDone:()=>{for(let e=0;e<4;e++)setTimeout(()=>t(880,.1,"square",.1),200*e)},logout:()=>{[523,392,330,262].forEach((e,s)=>setTimeout(()=>t(e,.1,"square",.07),100*s))}},soft:{label:"Soft",success:()=>{t(700,.2,"sine",.06),setTimeout(()=>t(900,.25,"sine",.06),200)},error:()=>{t(250,.2,"sine",.05)},notification:()=>{t(600,.15,"triangle",.06),setTimeout(()=>t(800,.2,"triangle",.05),180)},startup:()=>{t(400,.3,"sine",.05),setTimeout(()=>t(500,.3,"sine",.05),300),setTimeout(()=>t(600,.4,"sine",.06),600)},click:()=>{t(500,.04,"triangle",.03)},timerDone:()=>{t(700,.3,"triangle",.08),setTimeout(()=>t(700,.3,"triangle",.08),500),setTimeout(()=>t(900,.4,"triangle",.08),1e3)},logout:()=>{t(600,.3,"sine",.05),setTimeout(()=>t(400,.4,"sine",.04),300)}},arcade:{label:"Arcade",success:()=>{[523,659,784,1047].forEach((e,s)=>setTimeout(()=>t(e,.06,"square",.07),60*s))},error:()=>{t(100,.3,"sawtooth",.06),setTimeout(()=>t(80,.4,"sawtooth",.05),200)},notification:()=>{t(1047,.05,"square",.08),setTimeout(()=>t(784,.05,"square",.08),60),setTimeout(()=>t(1047,.08,"square",.1),120)},startup:()=>{[262,330,392,523,659,784].forEach((e,s)=>setTimeout(()=>t(e,.08,"square",.06),80*s))},click:()=>{t(1200,.02,"square",.05)},timerDone:()=>{for(let e=0;e<5;e++)setTimeout(()=>t(1200,.05,"square",.1),120*e)},logout:()=>{[784,659,523,392,262].forEach((e,s)=>setTimeout(()=>t(e,.06,"square",.06),60*s))}},silent:{label:"Silent",success:()=>{},error:()=>{},notification:()=>{},startup:()=>{},click:()=>{},timerDone:()=>{},logout:()=>{}}},o=Object.keys(i),n=["click","success","error","notification","startup","timerDone","logout"],c={click:"Click",success:"Success",error:"Error",notification:"Notification",startup:"Startup",timerDone:"Timer",logout:"Logout"},r="erp_sound_config";function u(){return"false"!==localStorage.getItem("erp_sounds")}function a(){const e=!u();return localStorage.setItem("erp_sounds",String(e)),e}function l(){try{const e=JSON.parse(localStorage.getItem(r)||"");if(e&&"object"==typeof e)return{click:"classic",success:"classic",error:"classic",notification:"classic",startup:"classic",timerDone:"classic",logout:"classic",...e}}catch{}return{click:"classic",success:"classic",error:"classic",notification:"classic",startup:"classic",timerDone:"classic",logout:"classic"}}function m(e,t){const s=l();s[e]=t,localStorage.setItem(r,JSON.stringify(s))}function f(e){const t={};n.forEach(s=>{t[s]=e}),localStorage.setItem(r,JSON.stringify(t))}function T(e){const t=l();return i[t[e]]||s}function g(){u()&&T("click").click()}function p(){u()&&T("success").success()}function q(){u()&&T("error").error()}function k(){u()&&T("notification").notification()}function S(){u()&&T("startup").startup()}function h(){u()&&T("timerDone").timerDone()}function D(){u()&&T("logout").logout()}function y(e,t){const s=i[e];s&&"function"==typeof s[t]&&s[t]()}export{i as SOUND_PACKS,o as SOUND_PACK_KEYS,n as SOUND_TYPES,c as SOUND_TYPE_LABELS,l as getSoundConfig,g as playClick,q as playError,D as playLogout,k as playNotification,S as playStartup,p as playSuccess,h as playTimerDone,y as previewSound,f as setAllSounds,m as setSoundForType,u as soundsEnabled,a as toggleSounds};
@@ -0,0 +1 @@
1
+ import{useLayoutEffect as n,useEffect as r,useSyncExternalStore as t,useRef as e,useState as u,useCallback as c}from"react";var o="undefined"!=typeof window&&"undefined"!=typeof document?n:r,f=()=>()=>{},i=()=>!0,d=()=>!1;function p(){return t(f,i,d)}function a(n,r,e=f){return t(e,n,()=>r)}function l(n,r){const u=e(null);return t(f,()=>(u.current??={value:n()}).value,()=>r)}function m(n,r){const t=p(),[f,i]=u(()=>t?n():r),d=e(t),a=e(n);a.current=n,o(()=>{t&&!d.current&&(d.current=!0,i(a.current()))},[t]);return[f,c(n=>{d.current?i(n):(d.current=!0,i("function"==typeof n?n(a.current()):n))},[])]}export{o as useBrowserLayoutEffect,m as useBrowserState,a as useBrowserValue,l as useBrowserValueOnce,p as useHydrated};
@@ -0,0 +1 @@
1
+ var t="react-os-shell:pdf-preview-update",n=null,e=0;function a(a){const d=++e,o={token:d,data:a};return n=o,{update(e){n===o&&(o.data=e),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(t,{detail:{token:d,data:e}}))}}}function d(){return n}function o(t){n===t&&(n=null)}export{t as PDF_PREVIEW_UPDATE_EVENT,o as claimPdfPreviewStage,d as peekPdfPreviewStage,a as setPdfPreview};
@@ -0,0 +1 @@
1
+ var o={0:["Clear Sky","☀️","🌙","from-sky-400 to-blue-500","from-indigo-900 to-slate-950"],1:["Mainly Clear","🌤️","🌙","from-sky-400 to-blue-500","from-indigo-900 to-slate-950"],2:["Partly Cloudy","⛅","☁️","from-sky-400 to-blue-400","from-indigo-800 to-slate-900"],3:["Overcast","☁️","☁️","from-gray-400 to-gray-500","from-gray-700 to-slate-900"],45:["Foggy","🌫️","🌫️","from-gray-400 to-gray-500","from-gray-700 to-slate-800"],48:["Foggy","🌫️","🌫️","from-gray-400 to-gray-500","from-gray-700 to-slate-800"],51:["Light Drizzle","🌦️","🌧️","from-gray-400 to-blue-500","from-gray-700 to-indigo-900"],53:["Drizzle","🌧️","🌧️","from-gray-500 to-blue-600","from-gray-700 to-indigo-900"],55:["Heavy Drizzle","🌧️","🌧️","from-gray-500 to-blue-600","from-gray-700 to-indigo-900"],61:["Light Rain","🌦️","🌧️","from-gray-400 to-blue-500","from-gray-700 to-indigo-900"],63:["Rain","🌧️","🌧️","from-gray-500 to-blue-600","from-gray-700 to-indigo-900"],65:["Heavy Rain","🌧️","🌧️","from-gray-600 to-blue-700","from-gray-700 to-indigo-950"],71:["Light Snow","🌨️","🌨️","from-blue-200 to-blue-400","from-blue-800 to-slate-900"],73:["Snow","❄️","❄️","from-blue-300 to-blue-500","from-blue-800 to-slate-900"],75:["Heavy Snow","❄️","❄️","from-blue-400 to-blue-600","from-blue-800 to-slate-900"],80:["Rain Showers","🌧️","🌧️","from-gray-500 to-blue-600","from-gray-700 to-indigo-900"],82:["Heavy Showers","🌧️","🌧️","from-gray-600 to-blue-700","from-gray-700 to-indigo-950"],95:["Thunderstorm","⛈️","⛈️","from-gray-700 to-indigo-800","from-gray-800 to-indigo-950"],96:["Thunderstorm","⛈️","⛈️","from-gray-700 to-indigo-800","from-gray-800 to-indigo-950"],99:["Thunderstorm","⛈️","⛈️","from-gray-700 to-indigo-900","from-gray-800 to-indigo-950"]},t=(t,r=!0)=>{const a=o[t]||["Unknown","❓","❓","from-gray-400 to-gray-500","from-gray-700 to-slate-800"];return[a[0],r?a[1]:a[2],r?a[3]:a[4]]},r={Sydney:{lat:-33.8688,lon:151.2093,tz:"Australia/Sydney"},Melbourne:{lat:-37.8136,lon:144.9631,tz:"Australia/Melbourne"},Auckland:{lat:-36.8485,lon:174.7633,tz:"Pacific/Auckland"},Tokyo:{lat:35.6762,lon:139.6503,tz:"Asia/Tokyo"},Shanghai:{lat:31.2304,lon:121.4737,tz:"Asia/Shanghai"},"Hong Kong":{lat:22.3193,lon:114.1694,tz:"Asia/Hong_Kong"},Singapore:{lat:1.3521,lon:103.8198,tz:"Asia/Singapore"},Bangkok:{lat:13.7563,lon:100.5018,tz:"Asia/Bangkok"},Mumbai:{lat:19.076,lon:72.8777,tz:"Asia/Kolkata"},Dubai:{lat:25.2048,lon:55.2708,tz:"Asia/Dubai"},Berlin:{lat:52.52,lon:13.405,tz:"Europe/Berlin"},Paris:{lat:48.8566,lon:2.3522,tz:"Europe/Paris"},London:{lat:51.5074,lon:-.1278,tz:"Europe/London"},"New York":{lat:40.7128,lon:-74.006,tz:"America/New_York"},Miami:{lat:25.7617,lon:-80.1918,tz:"America/New_York"},Toronto:{lat:43.6532,lon:-79.3832,tz:"America/Toronto"},Chicago:{lat:41.8781,lon:-87.6298,tz:"America/Chicago"},"Los Angeles":{lat:34.0522,lon:-118.2437,tz:"America/Los_Angeles"}},a="weather_local_cache";function e(){try{return JSON.parse(localStorage.getItem(a)||"{}")}catch{return{}}}async function n(o,t=!1){const n=r[o];if(!n)return null;if(!t){const t=e()[o];if(t&&Date.now()-t.ts<18e5)return t.data}try{const t=await fetch(`https://api.open-meteo.com/v1/forecast?latitude=${n.lat}&longitude=${n.lon}&current=temperature_2m,weather_code,is_day&daily=temperature_2m_max,temperature_2m_min&forecast_days=1&timezone=auto`),r=await t.json(),l={city:o,temp:Math.round(r.current.temperature_2m),code:r.current.weather_code,high:Math.round(r.daily.temperature_2m_max[0]),low:Math.round(r.daily.temperature_2m_min[0]),isDay:1===r.current.is_day,timezone:r.timezone||"UTC"},i=e();return i[o]={data:l,ts:Date.now()},function(o){try{localStorage.setItem(a,JSON.stringify(o))}catch{}}(i),l}catch{return null}}var l=o=>Math.round(9*o/5+32);export{r as AVAILABLE_CITIES,n as fetchCityWeather,t as getCondition,l as toFahrenheit};
@@ -0,0 +1 @@
1
+ import{requestFilesTrashView as n}from"./chunk-NPJH5MD7.js";var o=null;function r(n){o=n}function t(){return o}function u(){n()}export{t as getFilesDemoTree,u as openFilesInTrashMode,r as setFilesDemoTree};