efficient-shell 4.164.0 → 4.166.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 (68) hide show
  1. package/README.md +146 -4
  2. package/dist/{Browser-AZSXQEJ2.js → Browser-2MBG34IR.js} +13 -13
  3. package/dist/Calculator-R3WJTNZ6.js +29 -0
  4. package/dist/ConfirmDialog-ZDVMT74Y.js +1 -0
  5. package/dist/{CurrencyConverter-VT2SZDA3.js → CurrencyConverter-PEXSQQUK.js} +7 -7
  6. package/dist/{Documents-WIYSUFCQ.js → Documents-YL4RIOZO.js} +10 -10
  7. package/dist/{Files-FAO4MFCO.js → Files-3ZRUTRSB.js} +30 -30
  8. package/dist/Notepad-3ZM2FR6C.js +25 -0
  9. package/dist/PdfViewer-S2B2DZYB.js +1 -0
  10. package/dist/{PomodoroTimer-4JBDIQZK.js → PomodoroTimer-5QHA5UOY.js} +40 -40
  11. package/dist/{Preview-FBVFDTPN.js → Preview-32F4DTCK.js} +23 -23
  12. package/dist/Sidebar-QQSRLMJG.js +44 -0
  13. package/dist/Spreadsheet-GOZI7I4L.js +37 -0
  14. package/dist/{Stock-NIM7MAYG.js → Stock-XJFITZZA.js} +4 -4
  15. package/dist/{Weather-RLISJWFA.js → Weather-BDC633GV.js} +18 -18
  16. package/dist/{WorldClock-G4L5OLOT.js → WorldClock-ROOVRRCJ.js} +6 -6
  17. package/dist/apps/index.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/{chunk-6ZUAHFK3.js → chunk-3U47BTEV.js} +14 -14
  20. package/dist/{chunk-6NG4TM3E.js → chunk-4P3IWZUC.js} +14 -14
  21. package/dist/{chunk-Z43BI2JI.js → chunk-5J2TKKGH.js} +1 -1
  22. package/dist/{chunk-XY25UBVS.js → chunk-7TQ7NMT3.js} +1 -1
  23. package/dist/{chunk-YLJ7AZON.js → chunk-7YFAFXQG.js} +8 -8
  24. package/dist/chunk-AFYQTVZO.js +1 -0
  25. package/dist/chunk-BKDE67DB.js +12 -0
  26. package/dist/{chunk-T7DDT2Z6.js → chunk-CRI4UFBU.js} +6 -6
  27. package/dist/{chunk-DGWWPVEQ.js → chunk-DTRXR6JQ.js} +11 -11
  28. package/dist/{chunk-J5E4VMLJ.js → chunk-FZRQBHTK.js} +1 -1
  29. package/dist/chunk-G5J6YSN5.js +5 -0
  30. package/dist/{chunk-I3CQI462.js → chunk-HA2WG27U.js} +2 -2
  31. package/dist/{chunk-RKOTKWWU.js → chunk-HGG5M5AB.js} +1 -1
  32. package/dist/chunk-HZZNJHRH.js +1 -0
  33. package/dist/chunk-JKVDTKBE.js +988 -0
  34. package/dist/{chunk-IY4CP2HO.js → chunk-KSSAVLO7.js} +1 -1
  35. package/dist/chunk-M4DB7UBZ.js +29 -0
  36. package/dist/{chunk-YS57MJFM.js → chunk-NCQLGQYR.js} +1 -1
  37. package/dist/{chunk-U7ZDZXOJ.js → chunk-QASZIYLG.js} +1 -1
  38. package/dist/{chunk-37QZZRDT.js → chunk-QZG72OVX.js} +1 -1
  39. package/dist/chunk-SOI4LR67.js +27 -0
  40. package/dist/chunk-UVZIPXIA.js +10 -0
  41. package/dist/chunk-VRHUY4P4.js +1 -0
  42. package/dist/{chunk-TJ4YXVQQ.js → chunk-VXBJNMAA.js} +94 -94
  43. package/dist/chunk-X4FJ54PP.js +1 -0
  44. package/dist/file-intake/index.js +1 -1
  45. package/dist/{index-CFLEu3eh.d.ts → index-DcLqfJX3.d.ts} +285 -16
  46. package/dist/index.d.ts +3 -13
  47. package/dist/index.js +114 -114
  48. package/dist/map/index.js +6 -6
  49. package/dist/page-tabs/index.js +5 -5
  50. package/dist/pdf/index.js +1 -1
  51. package/dist/ui/index.d.ts +1 -1
  52. package/dist/ui/index.js +1 -1
  53. package/package.json +1 -1
  54. package/dist/Calculator-GRNWTZIZ.js +0 -29
  55. package/dist/ConfirmDialog-LSFNIGKM.js +0 -1
  56. package/dist/Notepad-APW5DX37.js +0 -25
  57. package/dist/PdfViewer-3NWOBXPP.js +0 -1
  58. package/dist/Sidebar-KRN5ZV3F.js +0 -44
  59. package/dist/Spreadsheet-IQF6QAWU.js +0 -37
  60. package/dist/chunk-4UCRT4ST.js +0 -5
  61. package/dist/chunk-ELSUXC3N.js +0 -1
  62. package/dist/chunk-HQREOTKI.js +0 -9
  63. package/dist/chunk-L2W5XPZ3.js +0 -1
  64. package/dist/chunk-LZIS72CF.js +0 -9
  65. package/dist/chunk-MAIHBBWT.js +0 -1
  66. package/dist/chunk-MHGFTCEA.js +0 -971
  67. package/dist/chunk-NNUE7M5G.js +0 -29
  68. package/dist/chunk-SVJN7WWF.js +0 -27
@@ -1,2 +1,2 @@
1
- import{toast_default as t}from"./chunk-IY4CP2HO.js";import{useShellPrefs as e}from"./chunk-T7DDT2Z6.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?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}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);F(),P(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 P(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(()=>N(t,n),2500*e)}function N(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 R(){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 F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(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 W(){return Math.random().toString(36).slice(2,11)}function q(){/* @__PURE__ */
2
- return(new Date).toISOString()}var E=null,H=[],J=!1,L=null,Y=/* @__PURE__ */new Set;function Z(){for(const t of Y)t()}function $(t){H=t,Z()}function z(){const t=E;return t?L=t.list().then(e=>{E===t&&(H=e,J=!0,Z())}).catch(()=>{E===t&&(J=!0,Z())}).finally(()=>{L=null}):(H=[],J=!0,Z(),Promise.resolve())}function K(t){E=t,H=[],J=!1,t?z():Z()}function Q(t){return Y.add(t),!E||J||L||z(),()=>{Y.delete(t)}}function U(){return H}function X(){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=W(),n=q(),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:q()}: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(Q,U,U),i=o(e=>{const n=E;if(!n)return t.addTask(e);const o="tmp-"+W(),a=q(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...H,r]),n.create({...e,name:e.name.trim()}).then(t=>$(H.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(H.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=E;if(!o)return t.updateTask(e,n);$(H.map(t=>t.id===e?{...t,...n,id:e,updatedAt:q()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=E;if(!n)return t.removeTask(e);const o=H;$(H.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!E)return t.toggleDone(e);const n=H.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{E||t.setAllTasks(e)},[t]);return null===E?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=q(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||W(),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,P as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,K as setShellTodoProvider,S as subscribePomo,X as useTodoTasks};
1
+ import{toast_default as t}from"./chunk-KSSAVLO7.js";import{useShellPrefs as e}from"./chunk-CRI4UFBU.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?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}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);F(),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 R(){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 F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function V(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 G="pomodoro_tasks",j="pomodoro_tasks_migrated";function L(){return Math.random().toString(36).slice(2,11)}function U(){/* @__PURE__ */
2
+ return(new Date).toISOString()}var W=null,q=[],E=!1,J=null,K=/* @__PURE__ */new Set;function $(){for(const t of K)t()}function z(t){q=t,$()}function H(){const t=W;return t?J=t.list().then(e=>{W===t&&(q=e,E=!0,$())}).catch(()=>{W===t&&(E=!0,$())}).finally(()=>{J=null}):(q=[],E=!0,$(),Promise.resolve())}function Q(t){W=t,q=[],E=!1,t?H():$()}function X(t){return K.add(t),!W||E||J||H(),()=>{K.delete(t)}}function Y(){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=L(),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(X,Y,Y),i=o(e=>{const n=W;if(!n)return t.addTask(e);const o="tmp-"+L(),a=U(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return z([...q,r]),n.create({...e,name:e.name.trim()}).then(t=>z(q.map(e=>e.id===o?{...r,...t}:e))).catch(()=>z(q.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=W;if(!o)return t.updateTask(e,n);z(q.map(t=>t.id===e?{...t,...n,id:e,updatedAt:U()}:t)),o.update(e,n).catch(()=>{H()})},[t]),l=o(e=>{const n=W;if(!n)return t.removeTask(e);const o=q;z(q.filter(t=>t.id!==e)),n.remove(e).catch(()=>z(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(G);if(!n)return void localStorage.setItem(j,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(G),void localStorage.setItem(j,"1");const a=U(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||L(),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(G),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,V as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,Q as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
@@ -1,4 +1,4 @@
1
- import{VERSION as e}from"./chunk-L2W5XPZ3.js";import{useWindowMenuItem as t,Modal as r}from"./chunk-TJ4YXVQQ.js";import{navIcons as o}from"./chunk-DSSLOQDW.js";import{useState as n,useCallback as s,isValidElement as i,cloneElement as a}from"react";import{jsx as l,jsxs as d}from"react/jsx-runtime";var c={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:"Multi-sheet spreadsheet editor with CSV / TSV import and export."},notepad:{name:"Notepad",version:"1.0.1",route:"/notepad",description:"Color-coded notes with checklists, desktop stickies and entity autolinking."},documents:{name:"Documents",version:"1.1.0",route:"/documents",description:"Letter-page editor for Word documents and plain-text files — images, lists, alignment."},preview:{name:"Preview",version:"1.4.1",route:"/preview",description:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar."},files:{name:"Files",version:"1.1.1",route:"/files",description:"Personal file manager with folders, uploads, quota, trash and desktop shortcut folders."},browser:{name:"Browser",version:"1.0.1",route:"/browser",description:"Minimal web browser with bookmarks, history and navigation bar."}},m=/* @__PURE__ */l("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */l("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"})}),p=/* @__PURE__ */l("svg",{className:"h-9 w-9",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */l("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5"})});function h({app:h}){const u=c[h],[x,f]=n(!1),g=s(()=>f(!0),[]);if(t(`About ${u.name}`,g,m),!x)return null;const v=o[u.route],w=i(v)?a(v,{className:"h-9 w-9"}):p;/* @__PURE__ */
1
+ import{VERSION as e}from"./chunk-VRHUY4P4.js";import{useWindowMenuItem as t,Modal as r}from"./chunk-VXBJNMAA.js";import{navIcons as o}from"./chunk-DSSLOQDW.js";import{useState as n,useCallback as s,isValidElement as i,cloneElement as a}from"react";import{jsx as l,jsxs as d}from"react/jsx-runtime";var c={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:"Multi-sheet spreadsheet editor with CSV / TSV import and export."},notepad:{name:"Notepad",version:"1.0.1",route:"/notepad",description:"Color-coded notes with checklists, desktop stickies and entity autolinking."},documents:{name:"Documents",version:"1.1.0",route:"/documents",description:"Letter-page editor for Word documents and plain-text files — images, lists, alignment."},preview:{name:"Preview",version:"1.4.1",route:"/preview",description:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar."},files:{name:"Files",version:"1.1.1",route:"/files",description:"Personal file manager with folders, uploads, quota, trash and desktop shortcut folders."},browser:{name:"Browser",version:"1.0.1",route:"/browser",description:"Minimal web browser with bookmarks, history and navigation bar."}},m=/* @__PURE__ */l("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */l("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"})}),p=/* @__PURE__ */l("svg",{className:"h-9 w-9",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */l("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5"})});function h({app:h}){const u=c[h],[x,f]=n(!1),g=s(()=>f(!0),[]);if(t(`About ${u.name}`,g,m),!x)return null;const v=o[u.route],w=i(v)?a(v,{className:"h-9 w-9"}):p;/* @__PURE__ */
2
2
  return l(r,{open:!0,onClose:()=>f(!1),title:`About ${u.name}`,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */d("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */l("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:w}),
4
4
  /* @__PURE__ */l("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:u.name}),
@@ -0,0 +1 @@
1
+ function r(){try{const r=document.documentElement;return"dark"===r.getAttribute("data-theme")||r.classList.contains("dark")}catch{return!1}}var a=["data-theme","class"];function s(){try{const r=getComputedStyle(document.documentElement).getPropertyValue("--menu-opacity")?.trim();if(r)return parseFloat(r)}catch{}return.95}var t=r;function o(){try{return document.documentElement.classList.contains("rosh-reduce-transparency")}catch{return!1}}function e(r,a){return`color-mix(in srgb, ${r} ${+(Math.round(255*Math.min(1,Math.max(0,a)))/255*100).toFixed(4)}%, transparent)`}function n(r,a={}){const n=r??s();if(o()&&"light"===a.ink)return{background:"var(--rosh-glass-light-ink-surface)",border:"1px solid var(--rosh-glass-light-ink-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};if(o())return{background:"var(--rosh-glass-surface)",border:"1px solid var(--rosh-glass-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};const d="var(--rosh-glass-surface)",i="var(--rosh-glass-surface-mid)";return t()?{background:`linear-gradient(135deg in srgb, ${e(d,.85*n)} 0%, ${e(i,.75*n)} 50%, ${e(d,.85*n)} 100%)`,backdropFilter:"blur(40px) saturate(1.6)",WebkitBackdropFilter:"blur(40px) saturate(1.6)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}:{background:`linear-gradient(135deg in srgb, ${e(d,.85*n)} 0%, ${e(i,.65*n)} 50%, ${e(d,.75*n)} 100%)`,backdropFilter:"blur(40px) saturate(1.8)",WebkitBackdropFilter:"blur(40px) saturate(1.8)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}}function d(r){return o()?"var(--rosh-glass-surface)":e("var(--rosh-glass-surface)",.85*(r??s()))}var i="border-white/20",u="glass-input-bg";export{i as GLASS_DIVIDER,u as GLASS_INPUT_BG,a as ROOT_THEME_ATTRIBUTES,d as glassFill,n as glassStyle,r as rootIsDark};