efficient-shell 4.163.0 → 4.165.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.
- package/README.md +115 -6
- package/dist/{Browser-2I27OQFE.js → Browser-ZX5GWPSM.js} +12 -12
- package/dist/{Calculator-2EB2RAT7.js → Calculator-NZH4FVRW.js} +23 -23
- package/dist/ConfirmDialog-WEVZTFLU.js +1 -0
- package/dist/{CurrencyConverter-4EEIPAVX.js → CurrencyConverter-7OPRFA5D.js} +7 -7
- package/dist/{Documents-24YAA5UU.js → Documents-QV63346J.js} +15 -15
- package/dist/{Files-BU7FY2VD.js → Files-BU5V56YF.js} +24 -24
- package/dist/{Notepad-3D4L3K5W.js → Notepad-KZIJ5ZTF.js} +10 -10
- package/dist/PdfViewer-S2B2DZYB.js +1 -0
- package/dist/{PomodoroTimer-B4OPUTJL.js → PomodoroTimer-FJV6MGE3.js} +25 -25
- package/dist/{Preview-VZSNH76G.js → Preview-PMQKG6FH.js} +13 -13
- package/dist/{Sidebar-7AY5WJZC.js → Sidebar-E6GLVCJL.js} +26 -26
- package/dist/{Spreadsheet-TAJ24BQS.js → Spreadsheet-DE5HPVE2.js} +14 -14
- package/dist/{Stock-VEPDDIMJ.js → Stock-SSNUY34E.js} +4 -4
- package/dist/{Weather-KGZF4DDW.js → Weather-T5WM66B2.js} +21 -21
- package/dist/{WorldClock-UGADOCFW.js → WorldClock-C3GT27AV.js} +7 -7
- package/dist/apps/index.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-J5HNLMGZ.js → chunk-3U47BTEV.js} +9 -9
- package/dist/{chunk-GSBX7KIS.js → chunk-4P3IWZUC.js} +13 -13
- package/dist/{chunk-PH3PRIFP.js → chunk-4UCRT4ST.js} +5 -5
- package/dist/{chunk-WURTAA2S.js → chunk-5J2TKKGH.js} +1 -1
- package/dist/{chunk-6A7BN7EN.js → chunk-A7Q4BCPI.js} +4 -4
- package/dist/{chunk-4GOHPACN.js → chunk-D7EJSASN.js} +1 -1
- package/dist/{chunk-2FZGALCU.js → chunk-DJ6UVHAZ.js} +8 -8
- package/dist/chunk-ELSUXC3N.js +1 -0
- package/dist/{chunk-TZ2EFTST.js → chunk-FGPWGHNT.js} +9 -9
- package/dist/{chunk-UMOVLVTC.js → chunk-FZRQBHTK.js} +1 -1
- package/dist/{chunk-E4JWTNG5.js → chunk-KRTZFHYW.js} +15 -15
- package/dist/{chunk-NLASNJNY.js → chunk-KSSAVLO7.js} +1 -1
- package/dist/chunk-NCQLGQYR.js +1 -0
- package/dist/{chunk-IJ3V2YOS.js → chunk-PLX2N4N6.js} +9 -9
- package/dist/{chunk-MAMJHPFN.js → chunk-QTPVA26D.js} +1 -1
- package/dist/{chunk-ZAJPQAGP.js → chunk-QZG72OVX.js} +1 -1
- package/dist/{chunk-PX435JG4.js → chunk-RKEHUV7U.js} +1 -1
- package/dist/chunk-SHVGZW2J.js +1 -0
- package/dist/chunk-SQ7BPUZG.js +9 -0
- package/dist/chunk-VDL2RLZG.js +10 -0
- package/dist/chunk-XYITV4EC.js +983 -0
- package/dist/{chunk-FWY5IRGL.js → chunk-YWXYBJ5Y.js} +2 -2
- package/dist/{chunk-TBM3ZIAN.js → chunk-ZLJCWBDF.js} +61 -61
- package/dist/file-intake/index.js +1 -1
- package/dist/{index-JQXMH_km.d.ts → index-DRkpyISn.d.ts} +239 -16
- package/dist/index.d.ts +11 -4
- package/dist/index.js +92 -92
- package/dist/map/index.js +4 -4
- package/dist/page-tabs/index.js +4 -4
- package/dist/pdf/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/ConfirmDialog-4LZXI6FM.js +0 -1
- package/dist/PdfViewer-5VBKCPCM.js +0 -1
- package/dist/chunk-A6O4Y63A.js +0 -1
- package/dist/chunk-L7ZMDZAB.js +0 -9
- package/dist/chunk-OSJ3ADF2.js +0 -1
- package/dist/chunk-QRJ2ERKR.js +0 -9
- package/dist/chunk-VWTYRICQ.js +0 -963
- package/dist/chunk-YJX2IWHB.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{toast_default as t}from"./chunk-
|
|
2
|
-
return(new Date).toISOString()}var
|
|
1
|
+
import{toast_default as t}from"./chunk-KSSAVLO7.js";import{useShellPrefs as e}from"./chunk-A7Q4BCPI.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 A(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function T(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(V(),R()):"none"!==t&&0!==m||V()}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}),V())}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);V(),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 V(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function F(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 W(){/* @__PURE__ */
|
|
2
|
+
return(new Date).toISOString()}var q=null,E=[],J=!1,K=null,Q=/* @__PURE__ */new Set;function $(){for(const t of Q)t()}function z(t){E=t,$()}function H(){const t=q;return t?K=t.list().then(e=>{q===t&&(E=e,J=!0,$())}).catch(()=>{q===t&&(J=!0,$())}).finally(()=>{K=null}):(E=[],J=!0,$(),Promise.resolve())}function U(t){q=t,E=[],J=!1,t?H():$()}function X(t){return Q.add(t),!q||J||K||H(),()=>{Q.delete(t)}}function Y(){return E}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=W(),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:W()}: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=q;if(!n)return t.addTask(e);const o="tmp-"+L(),a=W(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return z([...E,r]),n.create({...e,name:e.name.trim()}).then(t=>z(E.map(e=>e.id===o?{...r,...t}:e))).catch(()=>z(E.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=q;if(!o)return t.updateTask(e,n);z(E.map(t=>t.id===e?{...t,...n,id:e,updatedAt:W()}:t)),o.update(e,n).catch(()=>{H()})},[t]),l=o(e=>{const n=q;if(!n)return t.removeTask(e);const o=E;z(E.filter(t=>t.id!==e)),n.remove(e).catch(()=>z(o))},[t]),s=o(e=>{if(!q)return t.toggleDone(e);const n=E.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{q||t.setAllTasks(e)},[t]);return null===q?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=W(),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,P as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,F as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,A as setPomoBehaviour,b as setPomoDurations,T as setPomoFocusSound,U as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
|