efficient-shell 4.168.0 → 4.173.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 (82) hide show
  1. package/README.md +406 -9
  2. package/dist/{Browser-PZPREN6H.js → Browser-X7UTQJOX.js} +13 -13
  3. package/dist/Calculator-IAJLLX67.js +29 -0
  4. package/dist/ConfirmDialog-EBZ5LHVS.js +1 -0
  5. package/dist/{CurrencyConverter-3BTIZ2LT.js → CurrencyConverter-RODHLQMG.js} +5 -5
  6. package/dist/{Documents-YAOM3L47.js → Documents-BJFZHHBZ.js} +8 -8
  7. package/dist/{Files-2UHYDMLL.js → Files-PL5NE4PQ.js} +27 -27
  8. package/dist/{Notepad-OWL75AYX.js → Notepad-52LDWEK2.js} +10 -10
  9. package/dist/PdfViewer-IIXXT7SF.js +1 -0
  10. package/dist/{PomodoroTimer-SCPEOG6W.js → PomodoroTimer-C3KCTCMB.js} +30 -30
  11. package/dist/{Preview-5R3QZSJU.js → Preview-O3N26GG6.js} +31 -31
  12. package/dist/{Sidebar-C5RXL72L.js → Sidebar-QNGQA6J5.js} +24 -24
  13. package/dist/Spreadsheet-HVKVNQN6.js +37 -0
  14. package/dist/{Stock-UGDIALNB.js → Stock-YOGVYL6F.js} +6 -6
  15. package/dist/{Weather-CR2MN5XF.js → Weather-4OQOBM4C.js} +13 -13
  16. package/dist/{WorldClock-JBNJ7C7J.js → WorldClock-K5KLOOD7.js} +5 -5
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/chunk-6TDPY7WG.js +3 -0
  21. package/dist/{chunk-SOI4LR67.js → chunk-A6ZY4XSQ.js} +7 -7
  22. package/dist/{chunk-4P3IWZUC.js → chunk-AYZ4LP2A.js} +9 -9
  23. package/dist/{chunk-A7Q4BCPI.js → chunk-CQN5CFKA.js} +6 -6
  24. package/dist/chunk-EXXHI5DO.js +12 -0
  25. package/dist/{chunk-M4DB7UBZ.js → chunk-FIGVDYJR.js} +16 -16
  26. package/dist/chunk-FWOPZB6I.js +1 -0
  27. package/dist/{chunk-XKHAP6N2.js → chunk-MFR4GZSB.js} +15 -15
  28. package/dist/{chunk-JLPJBO7K.js → chunk-MVUYJAZT.js} +1 -1
  29. package/dist/{chunk-YWXYBJ5Y.js → chunk-MYNLN25H.js} +2 -2
  30. package/dist/{chunk-KSSAVLO7.js → chunk-OZMDKNVR.js} +1 -1
  31. package/dist/{chunk-N3ZXQE4M.js → chunk-PGVUO7GB.js} +5 -5
  32. package/dist/chunk-RN5V7MDO.js +995 -0
  33. package/dist/chunk-S5QF4VFG.js +1 -0
  34. package/dist/{chunk-5J2TKKGH.js → chunk-SXRJYJ7M.js} +1 -1
  35. package/dist/{chunk-QZG72OVX.js → chunk-TLYGAHZN.js} +1 -1
  36. package/dist/{chunk-CUX4XGLS.js → chunk-U2SEGSNG.js} +1 -1
  37. package/dist/{chunk-FZRQBHTK.js → chunk-U6IUYOYS.js} +1 -1
  38. package/dist/{chunk-3U47BTEV.js → chunk-UOZMVS4Y.js} +11 -11
  39. package/dist/{chunk-S2AZZGFF.js → chunk-W32SKK3D.js} +1 -1
  40. package/dist/chunk-W33ZFDRR.js +1 -0
  41. package/dist/chunk-X5LH3UOJ.js +112 -0
  42. package/dist/{chunk-6MBERZOS.js → chunk-XHWT4DH2.js} +3 -3
  43. package/dist/chunk-XJX3NA37.js +1 -0
  44. package/dist/chunk-YKZHOXI4.js +2 -0
  45. package/dist/{chunk-FVXBJGY5.js → chunk-Z3JO7MDE.js} +5 -5
  46. package/dist/{chunk-PLX2N4N6.js → chunk-ZDCOC4IH.js} +9 -9
  47. package/dist/file-intake/index.js +1 -1
  48. package/dist/format/index.d.ts +1 -1
  49. package/dist/format/index.js +1 -1
  50. package/dist/icons/efficient.d.ts +355 -0
  51. package/dist/icons/efficient.js +470 -0
  52. package/dist/icons/heroicons.d.ts +6 -0
  53. package/dist/icons/heroicons.js +1 -0
  54. package/dist/icons/index.d.ts +64 -0
  55. package/dist/icons/index.js +2 -0
  56. package/dist/icons/lucide.d.ts +6 -0
  57. package/dist/icons/lucide.js +1 -0
  58. package/dist/{index-CbLbd__n.d.ts → index-Dod08dsC.d.ts} +302 -11
  59. package/dist/{index-DCUzlKPZ.d.ts → index-DpUDK9zG.d.ts} +5 -0
  60. package/dist/index.d.ts +16 -6
  61. package/dist/index.js +650 -645
  62. package/dist/map/index.js +3 -3
  63. package/dist/page-tabs/index.js +5 -5
  64. package/dist/pdf/index.js +1 -1
  65. package/dist/registry-FHdUeVww.d.ts +71 -0
  66. package/dist/sounds-FO772MN2.js +1 -0
  67. package/dist/ui/index.d.ts +4 -2
  68. package/dist/ui/index.js +1 -1
  69. package/dist/ui.css +81 -0
  70. package/package.json +27 -1
  71. package/dist/Calculator-NXMUEH5D.js +0 -29
  72. package/dist/ConfirmDialog-ZDVMT74Y.js +0 -1
  73. package/dist/PdfViewer-S2B2DZYB.js +0 -1
  74. package/dist/Spreadsheet-XT4HF7MQ.js +0 -37
  75. package/dist/chunk-6KO2U66R.js +0 -3
  76. package/dist/chunk-7U3F53IG.js +0 -1
  77. package/dist/chunk-BUTSU7FO.js +0 -1
  78. package/dist/chunk-GVZLCY3B.js +0 -994
  79. package/dist/chunk-JYLI2WXW.js +0 -12
  80. package/dist/chunk-LW27IM3S.js +0 -112
  81. package/dist/chunk-NCQLGQYR.js +0 -1
  82. package/dist/sounds-OMHXVVQ4.js +0 -1
@@ -1,12 +1,12 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-JLPJBO7K.js";import{subscribePomo as a,getPomoSnapshot as o,setPomoDurations as r,setPomoAlarm as n,setPomoAlarmConfig as l,setPomoBehaviour as s,setPomoFocusSound as i,useTodoTasks as c,migratePomodoroTasksOnce as d,pomoSwitchMode as u,pomoPause as m,pomoStart as h,ALARM_OPTIONS as g,playAlarm as p,FOCUS_SOUND_OPTIONS as f,previewFocusSound as b}from"./chunk-YWXYBJ5Y.js";import"./chunk-KSSAVLO7.js";import{useWidgetSettings as x}from"./chunk-LW27IM3S.js";import{useShellPrefs as k}from"./chunk-A7Q4BCPI.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-JYLI2WXW.js";import"./chunk-6KO2U66R.js";import"./chunk-M4DB7UBZ.js";import"./chunk-N3ZXQE4M.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-NCQLGQYR.js";import"./chunk-D65T4H6J.js";import{useSyncExternalStore as v,useEffect as y,useMemo as N,useState as w,useRef as C,useCallback as S}from"react";import{jsxs as B,Fragment as M,jsx as T}from"react/jsx-runtime";var j="pomodoro_appearance",P="pomodoro_active_task_id",I={focus:"Pomodoro",short:"Short Break",long:"Long Break"},L={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var A=25,$=5,D=15,V=!1,W=!1,_=4,R=!0,O=!0,E="bell",F=100,J=1,Q="none",X=50,Y=(e,t,a,o)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(a,Math.round(e))):o;function z(){const t=v(a,o,o),{prefs:p,save:b}=k(),z=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:Y(t.focusMinutes,1,120,A),shortBreakMinutes:Y(t.shortBreakMinutes,1,120,$),longBreakMinutes:Y(t.longBreakMinutes,1,120,D),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:V,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:W,longBreakInterval:Y(t.longBreakInterval,1,20,_),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:R,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:O,alarmSound:g.some(e=>e.id===t.alarmSound)?t.alarmSound:E,alarmVolume:Y(t.alarmVolume,0,100,F),alarmRepeat:Y(t.alarmRepeat,1,5,J),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:Q,focusVolume:Y(t.focusVolume,0,100,X)}}(p.pomodoro_settings);y(()=>{r({focus:60*z.focusMinutes,short:60*z.shortBreakMinutes,long:60*z.longBreakMinutes})},[z.focusMinutes,z.shortBreakMinutes,z.longBreakMinutes]),y(()=>{n(z.alarmSound),l(z.alarmVolume,z.alarmRepeat)},[z.alarmSound,z.alarmVolume,z.alarmRepeat]),y(()=>{s({autoStartBreaks:z.autoStartBreaks,autoStartPomodoros:z.autoStartPomodoros,longBreakInterval:z.longBreakInterval})},[z.autoStartBreaks,z.autoStartPomodoros,z.longBreakInterval]),y(()=>{i(z.focusSound,z.focusVolume)},[z.focusSound,z.focusVolume]),y(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const K=c(),Z=K.tasks,U=N(()=>/* @__PURE__ */(new Date).toISOString().slice(0,10),[]),q=function(e,t){return N(()=>t?(e=>{const t=[],a=[];for(const o of e)(o.done?a:t).push(o);return[...t,...a]})(e):e,[e,t])}(N(()=>Z.filter(e=>!!e.dueDate&&(e.dueDate===U||e.dueDate<U&&!e.done)),[Z,U]),z.checkToBottom),[G,ee]=w(()=>localStorage.getItem(P)),[te,ae]=w(!1),[oe,re]=w(null),ne=C(!1);y(()=>{ne.current||(ne.current=!0,d(Z,K.setAllTasks))},[]),y(()=>{try{G?localStorage.setItem(P,G):localStorage.removeItem(P)}catch{}},[G]),y(()=>{if(!oe)return;const e=()=>re(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[oe]);const se=C(t.streak);y(()=>{if(t.streak>se.current&&G){const e=Z.find(e=>e.id===G);if(e){const t=(e.completed??0)+1,a=e.estimated??0,o=z.autoCheckTasks&&a>0&&t>=a;K.updateTask(G,{completed:t,done:e.done||o})}}se.current=t.streak},[t.streak,G,z.autoCheckTasks,Z,K]);const ie=q.reduce((e,t)=>e+(t.completed??0),0),ce=q.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),de=q.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),ue=t.running&&"focus"===t.mode?t.remaining:0,me=de*z.focusMinutes*60+ue,he=new Date(Date.now()+1e3*me).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}),ge=(me/3600).toFixed(1),pe=G?Z.find(e=>e.id===G)??null:null,fe=String(Math.floor(t.remaining/60)).padStart(2,"0"),be=String(t.remaining%60).padStart(2,"0"),[xe,ke]=w(()=>e(j)),[ve,ye]=w(!1),[Ne,we]=w(xe),[Ce,Se]=w(z);x(S(()=>{we({...xe}),Se({...z}),ye(!0)},[xe,z]));const Be="focus"!==t.mode,Me=L[t.mode],Te=Be?(je=Me,Pe=xe.activeOpacity/100,`rgba(${parseInt(je.slice(1,3),16)}, ${parseInt(je.slice(3,5),16)}, ${parseInt(je.slice(5,7),16)}, ${Pe})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${xe.activeOpacity/100})`;var je,Pe;const Ie={primary:Be?"text-white":"text-gray-900",secondary:Be?"text-white/85":"text-gray-700",muted:Be?"text-white/65":"text-gray-500",tabActive:Be?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:Be?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:Be?"border-white/30":"border-gray-200",softDivider:Be?"border-white/20":"border-gray-200",iconBtn:Be?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:Be?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},Le=Be?Me:"#0f172a";/* @__PURE__ */
1
+ import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-MVUYJAZT.js";import{subscribePomo as a,getPomoSnapshot as o,setPomoDurations as r,setPomoAlarm as n,setPomoAlarmConfig as l,setPomoBehaviour as s,setPomoFocusSound as i,useTodoTasks as c,migratePomodoroTasksOnce as d,pomoSwitchMode as u,pomoPause as m,pomoStart as h,ALARM_OPTIONS as p,playAlarm as g,FOCUS_SOUND_OPTIONS as f,previewFocusSound as b}from"./chunk-MYNLN25H.js";import{useWidgetSettings as x}from"./chunk-X5LH3UOJ.js";import"./chunk-DSSLOQDW.js";import"./chunk-6TDPY7WG.js";import"./chunk-OZMDKNVR.js";import{useShellPrefs as k}from"./chunk-CQN5CFKA.js";import"./chunk-5A7MWTXX.js";import"./chunk-EXXHI5DO.js";import"./chunk-PGVUO7GB.js";import"./chunk-HZZNJHRH.js";import"./chunk-D65T4H6J.js";import"./chunk-FIGVDYJR.js";import"./chunk-AFYQTVZO.js";import"./chunk-X4FJ54PP.js";import"./chunk-S5QF4VFG.js";import"./chunk-YKZHOXI4.js";import{useSyncExternalStore as v,useEffect as y,useMemo as N,useState as w,useRef as C,useCallback as S}from"react";import{jsxs as B,Fragment as M,jsx as T}from"react/jsx-runtime";var j="pomodoro_appearance",P="pomodoro_active_task_id",I={focus:"Pomodoro",short:"Short Break",long:"Long Break"},A={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var L=25,V=5,D=15,$=!1,F=!1,O=4,_=!0,R=!0,W="bell",H=100,E=1,J="none",X=50,Y=(e,t,a,o)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(a,Math.round(e))):o;function Z(){const t=v(a,o,o),{prefs:g,save:b}=k(),Z=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:Y(t.focusMinutes,1,120,L),shortBreakMinutes:Y(t.shortBreakMinutes,1,120,V),longBreakMinutes:Y(t.longBreakMinutes,1,120,D),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:$,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:F,longBreakInterval:Y(t.longBreakInterval,1,20,O),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:_,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:R,alarmSound:p.some(e=>e.id===t.alarmSound)?t.alarmSound:W,alarmVolume:Y(t.alarmVolume,0,100,H),alarmRepeat:Y(t.alarmRepeat,1,5,E),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:J,focusVolume:Y(t.focusVolume,0,100,X)}}(g.pomodoro_settings);y(()=>{r({focus:60*Z.focusMinutes,short:60*Z.shortBreakMinutes,long:60*Z.longBreakMinutes})},[Z.focusMinutes,Z.shortBreakMinutes,Z.longBreakMinutes]),y(()=>{n(Z.alarmSound),l(Z.alarmVolume,Z.alarmRepeat)},[Z.alarmSound,Z.alarmVolume,Z.alarmRepeat]),y(()=>{s({autoStartBreaks:Z.autoStartBreaks,autoStartPomodoros:Z.autoStartPomodoros,longBreakInterval:Z.longBreakInterval})},[Z.autoStartBreaks,Z.autoStartPomodoros,Z.longBreakInterval]),y(()=>{i(Z.focusSound,Z.focusVolume)},[Z.focusSound,Z.focusVolume]),y(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const G=c(),K=G.tasks,U=N(()=>/* @__PURE__ */(new Date).toISOString().slice(0,10),[]),Q=function(e,t){return N(()=>t?(e=>{const t=[],a=[];for(const o of e)(o.done?a:t).push(o);return[...t,...a]})(e):e,[e,t])}(N(()=>K.filter(e=>!!e.dueDate&&(e.dueDate===U||e.dueDate<U&&!e.done)),[K,U]),Z.checkToBottom),[q,ee]=w(()=>localStorage.getItem(P)),[te,ae]=w(!1),[oe,re]=w(null),ne=C(!1);y(()=>{ne.current||(ne.current=!0,d(K,G.setAllTasks))},[]),y(()=>{try{q?localStorage.setItem(P,q):localStorage.removeItem(P)}catch{}},[q]),y(()=>{if(!oe)return;const e=()=>re(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[oe]);const se=C(t.streak);y(()=>{if(t.streak>se.current&&q){const e=K.find(e=>e.id===q);if(e){const t=(e.completed??0)+1,a=e.estimated??0,o=Z.autoCheckTasks&&a>0&&t>=a;G.updateTask(q,{completed:t,done:e.done||o})}}se.current=t.streak},[t.streak,q,Z.autoCheckTasks,K,G]);const ie=Q.reduce((e,t)=>e+(t.completed??0),0),ce=Q.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),de=Q.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),ue=t.running&&"focus"===t.mode?t.remaining:0,me=de*Z.focusMinutes*60+ue,he=new Date(Date.now()+1e3*me).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}),pe=(me/3600).toFixed(1),ge=q?K.find(e=>e.id===q)??null:null,fe=String(Math.floor(t.remaining/60)).padStart(2,"0"),be=String(t.remaining%60).padStart(2,"0"),[xe,ke]=w(()=>e(j)),[ve,ye]=w(!1),[Ne,we]=w(xe),[Ce,Se]=w(Z);x(S(()=>{we({...xe}),Se({...Z}),ye(!0)},[xe,Z]));const Be="focus"!==t.mode,Me=A[t.mode],Te=Be?(je=Me,Pe=xe.activeOpacity/100,`rgba(${parseInt(je.slice(1,3),16)}, ${parseInt(je.slice(3,5),16)}, ${parseInt(je.slice(5,7),16)}, ${Pe})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${xe.activeOpacity/100})`;var je,Pe;const Ie={primary:Be?"text-white":"text-gray-900",secondary:Be?"text-white/85":"text-gray-700",muted:Be?"text-white/65":"text-gray-500",tabActive:Be?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:Be?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:Be?"border-white/30":"border-gray-200",softDivider:Be?"border-white/20":"border-gray-200",iconBtn:Be?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:Be?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},Ae=Be?Me:"#0f172a";/* @__PURE__ */
2
2
  return B(M,{children:[
3
3
  /* @__PURE__ */B("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${Ie.primary}`,style:{backgroundColor:Te,backdropFilter:xe.activeBlur>0?`blur(${xe.activeBlur}px)`:void 0},children:[
4
4
  /* @__PURE__ */T("div",{className:"px-3 pt-3 flex justify-center gap-1.5",children:["focus","short","long"].map(e=>/* @__PURE__ */T("button",{onClick:()=>u(e),className:`px-2.5 py-1 text-[13px] font-bold rounded transition-colors ${t.mode===e?Ie.tabActive:Ie.tabInactive}`,children:I[e]},e))}),
5
5
  /* @__PURE__ */B("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[fe,":",be]}),
6
- /* @__PURE__ */T("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */T("button",{onClick:()=>t.running?m():h(),className:"bg-white px-12 py-2.5 rounded-md font-bold text-base shadow-[0_4px_0_rgba(0,0,0,0.12)] hover:shadow-[0_3px_0_rgba(0,0,0,0.12)] active:translate-y-1 active:shadow-none transition-all",style:{color:Le,letterSpacing:"0.08em"},children:t.running?"PAUSE":"START"})}),
7
- /* @__PURE__ */T("div",{className:"px-3 py-3 text-center",children:pe?/* @__PURE__ */B(M,{children:[
8
- /* @__PURE__ */B("div",{className:`text-xs leading-tight ${Ie.muted}`,children:["#",(pe.completed??0)+1]}),
9
- /* @__PURE__ */T("div",{className:`text-[15px] font-medium leading-tight truncate mt-0.5 ${Ie.primary}`,children:pe.name})]}):/* @__PURE__ */T("div",{className:`text-xs italic ${Ie.muted}`,children:"No task selected"})}),
6
+ /* @__PURE__ */T("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */T("button",{onClick:()=>t.running?m():h(),className:"bg-white px-12 py-2.5 rounded-md font-bold text-base shadow-[0_4px_0_rgba(0,0,0,0.12)] hover:shadow-[0_3px_0_rgba(0,0,0,0.12)] active:translate-y-1 active:shadow-none transition-all",style:{color:Ae,letterSpacing:"0.08em"},children:t.running?"PAUSE":"START"})}),
7
+ /* @__PURE__ */T("div",{className:"px-3 py-3 text-center",children:ge?/* @__PURE__ */B(M,{children:[
8
+ /* @__PURE__ */B("div",{className:`text-xs leading-tight ${Ie.muted}`,children:["#",(ge.completed??0)+1]}),
9
+ /* @__PURE__ */T("div",{className:`text-[15px] font-medium leading-tight truncate mt-0.5 ${Ie.primary}`,children:ge.name})]}):/* @__PURE__ */T("div",{className:`text-xs italic ${Ie.muted}`,children:"No task selected"})}),
10
10
  /* @__PURE__ */B("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
11
11
  /* @__PURE__ */T("h3",{className:`text-base font-bold tracking-tight ${Ie.primary}`,children:"Tasks"}),
12
12
  /* @__PURE__ */T("button",{className:`rounded p-1 transition-colors ${Ie.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */B("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:[
@@ -14,9 +14,9 @@ return B(M,{children:[
14
14
  /* @__PURE__ */T("circle",{cx:"12",cy:"12",r:"1.4"}),
15
15
  /* @__PURE__ */T("circle",{cx:"12",cy:"19",r:"1.4"})]})})]}),
16
16
  /* @__PURE__ */T("div",{className:`border-t mx-3 mt-2 ${Ie.divider}`}),
17
- /* @__PURE__ */B("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[q.map(e=>{const t=e.id===G;/* @__PURE__ */
17
+ /* @__PURE__ */B("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[Q.map(e=>{const t=e.id===q;/* @__PURE__ */
18
18
  return B("div",{onClick:()=>ee(e.id),className:"bg-white text-gray-800 rounded-md flex items-center pr-2 py-2.5 shadow-sm cursor-pointer transition-shadow hover:shadow-md "+(t?"border-l-4 border-gray-700 pl-2":"pl-3 border-l-4 border-transparent"),children:[
19
- /* @__PURE__ */T("button",{onClick:t=>{var a;t.stopPropagation(),a=e.id,K.toggleDone(a)},className:"shrink-0",children:e.done?/* @__PURE__ */T("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:Le},children:/* @__PURE__ */T("path",{d:"M10 0a10 10 0 100 20 10 10 0 000-20zm-1 14.5l-4.5-4.5 1.4-1.4 3.1 3.1 6.1-6.1 1.4 1.4z"})}):/* @__PURE__ */T("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */T("circle",{cx:"12",cy:"12",r:"10"})})}),
19
+ /* @__PURE__ */T("button",{onClick:t=>{var a;t.stopPropagation(),a=e.id,G.toggleDone(a)},className:"shrink-0",children:e.done?/* @__PURE__ */T("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:Ae},children:/* @__PURE__ */T("path",{d:"M10 0a10 10 0 100 20 10 10 0 000-20zm-1 14.5l-4.5-4.5 1.4-1.4 3.1 3.1 6.1-6.1 1.4 1.4z"})}):/* @__PURE__ */T("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */T("circle",{cx:"12",cy:"12",r:"10"})})}),
20
20
  /* @__PURE__ */T("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
21
21
  /* @__PURE__ */B("span",{className:"text-sm tabular-nums mr-1.5 shrink-0",children:[
22
22
  /* @__PURE__ */T("span",{className:"font-bold text-gray-500",children:e.completed??0}),
@@ -26,7 +26,7 @@ return B("div",{onClick:()=>ee(e.id),className:"bg-white text-gray-800 rounded-m
26
26
  /* @__PURE__ */T("button",{onClick:t=>{t.stopPropagation(),re(oe===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */B("svg",{className:"h-4 w-4 text-gray-500",viewBox:"0 0 24 24",fill:"currentColor",children:[
27
27
  /* @__PURE__ */T("circle",{cx:"12",cy:"5",r:"1.4"}),
28
28
  /* @__PURE__ */T("circle",{cx:"12",cy:"12",r:"1.4"}),
29
- /* @__PURE__ */T("circle",{cx:"12",cy:"19",r:"1.4"})]})}),oe===e.id&&/* @__PURE__ */T("div",{className:"absolute right-0 top-full mt-1 bg-white text-gray-800 rounded shadow-lg border border-gray-200 z-10 min-w-[110px] overflow-hidden",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */T("button",{onClick:t=>{var a;t.stopPropagation(),a=e.id,K.removeTask(a),G===a&&ee(null),re(null)},className:"block w-full px-3 py-1.5 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),te?/* @__PURE__ */T(le,{onSubmit:(e,t)=>{const a=e.trim();if(!a)return;const o=K.addTask({name:a,estimated:t,completed:0,dueDate:U});G||ee(o),ae(!1)},onCancel:()=>ae(!1),accentColor:Le}):/* @__PURE__ */B("button",{onClick:()=>ae(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${Ie.addTaskBtn}`,children:[
29
+ /* @__PURE__ */T("circle",{cx:"12",cy:"19",r:"1.4"})]})}),oe===e.id&&/* @__PURE__ */T("div",{className:"absolute right-0 top-full mt-1 bg-white text-gray-800 rounded shadow-lg border border-gray-200 z-10 min-w-[110px] overflow-hidden",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */T("button",{onClick:t=>{var a;t.stopPropagation(),a=e.id,G.removeTask(a),q===a&&ee(null),re(null)},className:"block w-full px-3 py-1.5 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),te?/* @__PURE__ */T(le,{onSubmit:(e,t)=>{const a=e.trim();if(!a)return;const o=G.addTask({name:a,estimated:t,completed:0,dueDate:U});q||ee(o),ae(!1)},onCancel:()=>ae(!1),accentColor:Ae}):/* @__PURE__ */B("button",{onClick:()=>ae(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${Ie.addTaskBtn}`,children:[
30
30
  /* @__PURE__ */B("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
31
31
  /* @__PURE__ */T("circle",{cx:"12",cy:"12",r:"10"}),
32
32
  /* @__PURE__ */T("path",{strokeLinecap:"round",d:"M8 12h8M12 8v8"})]}),"Add Task"]})]}),
@@ -36,44 +36,44 @@ return B("div",{onClick:()=>ee(e.id),className:"bg-white text-gray-800 rounded-m
36
36
  /* @__PURE__ */T("span",{className:Ie.muted,children:" / "}),
37
37
  /* @__PURE__ */T("span",{className:`font-bold ${Ie.primary}`,children:ce})]}),me>0&&/* @__PURE__ */B("span",{className:Ie.secondary,children:["Finish At: ",
38
38
  /* @__PURE__ */T("span",{className:`font-bold ${Ie.primary}`,children:he}),
39
- /* @__PURE__ */B("span",{className:Ie.muted,children:[" (",ge,"h)"]})]})]})]}),
40
- /* @__PURE__ */T(H,{open:ve,onClose:()=>ye(!1),onSave:()=>{ke(Ne),localStorage.setItem(j,JSON.stringify(Ne)),b({pomodoro_settings:Ce}),ye(!1)},configAppearance:Ne,setConfigAppearance:we,configPrefs:Ce,setConfigPrefs:Se})]})}function H({open:e,onClose:a,onSave:o,configAppearance:r,setConfigAppearance:n,configPrefs:l,setConfigPrefs:s}){const i=(e,t)=>s(a=>({...a,[e]:t}));/* @__PURE__ */
39
+ /* @__PURE__ */B("span",{className:Ie.muted,children:[" (",pe,"h)"]})]})]})]}),
40
+ /* @__PURE__ */T(z,{open:ve,onClose:()=>ye(!1),onSave:()=>{ke(Ne),localStorage.setItem(j,JSON.stringify(Ne)),b({pomodoro_settings:Ce}),ye(!1)},configAppearance:Ne,setConfigAppearance:we,configPrefs:Ce,setConfigPrefs:Se})]})}function z({open:e,onClose:a,onSave:o,configAppearance:r,setConfigAppearance:n,configPrefs:l,setConfigPrefs:s}){const i=(e,t)=>s(a=>({...a,[e]:t}));/* @__PURE__ */
41
41
  return B(t,{open:e,onClose:a,title:"Pomodoro Settings",appearance:r,onAppearanceChange:n,onSave:o,children:[
42
- /* @__PURE__ */B(K,{icon:/* @__PURE__ */T(oe,{}),label:"TIMER",children:[
42
+ /* @__PURE__ */B(G,{icon:/* @__PURE__ */T(oe,{}),label:"TIMER",children:[
43
43
  /* @__PURE__ */B("div",{children:[
44
44
  /* @__PURE__ */T("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
45
45
  /* @__PURE__ */B("div",{className:"grid grid-cols-3 gap-3",children:[
46
- /* @__PURE__ */T(q,{label:"Pomodoro",value:l.focusMinutes,onChange:e=>i("focusMinutes",e),max:120}),
47
- /* @__PURE__ */T(q,{label:"Short Break",value:l.shortBreakMinutes,onChange:e=>i("shortBreakMinutes",e),max:120}),
48
- /* @__PURE__ */T(q,{label:"Long Break",value:l.longBreakMinutes,onChange:e=>i("longBreakMinutes",e),max:120})]})]}),
49
- /* @__PURE__ */T(Z,{label:"Auto Start Breaks",children:/* @__PURE__ */T(te,{checked:l.autoStartBreaks,onChange:e=>i("autoStartBreaks",e)})}),
50
- /* @__PURE__ */T(Z,{label:"Auto Start Pomodoros",children:/* @__PURE__ */T(te,{checked:l.autoStartPomodoros,onChange:e=>i("autoStartPomodoros",e)})}),
51
- /* @__PURE__ */T(Z,{label:"Long Break interval",children:/* @__PURE__ */T(G,{value:l.longBreakInterval,onChange:e=>i("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
52
- /* @__PURE__ */B(K,{icon:/* @__PURE__ */T(re,{}),label:"TASK",children:[
53
- /* @__PURE__ */T(Z,{label:"Auto Check Tasks",info:'If you enable "Auto Check Tasks", the active task will be automatically checked when the actual pomodoro count reaches the estimated count.',children:/* @__PURE__ */T(te,{checked:l.autoCheckTasks,onChange:e=>i("autoCheckTasks",e)})}),
54
- /* @__PURE__ */T(Z,{label:"Check to Bottom",info:'If you enable "Check to Bottom", the checked task will be automatically moved to the bottom of the task list.',children:/* @__PURE__ */T(te,{checked:l.checkToBottom,onChange:e=>i("checkToBottom",e)})})]}),
55
- /* @__PURE__ */B(K,{icon:/* @__PURE__ */T(ne,{}),label:"SOUND",children:[
56
- /* @__PURE__ */T(Z,{label:"Alarm Sound",children:/* @__PURE__ */B("div",{className:"flex items-center gap-2",children:[
57
- /* @__PURE__ */T(ee,{value:l.alarmSound,onChange:e=>i("alarmSound",e),options:g.map(e=>({id:e.id,label:e.label}))}),"off"!==l.alarmSound&&/* @__PURE__ */T("button",{type:"button",onClick:()=>p(l.alarmSound,{volume:l.alarmVolume,repeat:1}),className:"px-2 py-1 text-[11px] rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
46
+ /* @__PURE__ */T(Q,{label:"Pomodoro",value:l.focusMinutes,onChange:e=>i("focusMinutes",e),max:120}),
47
+ /* @__PURE__ */T(Q,{label:"Short Break",value:l.shortBreakMinutes,onChange:e=>i("shortBreakMinutes",e),max:120}),
48
+ /* @__PURE__ */T(Q,{label:"Long Break",value:l.longBreakMinutes,onChange:e=>i("longBreakMinutes",e),max:120})]})]}),
49
+ /* @__PURE__ */T(K,{label:"Auto Start Breaks",children:/* @__PURE__ */T(te,{checked:l.autoStartBreaks,onChange:e=>i("autoStartBreaks",e)})}),
50
+ /* @__PURE__ */T(K,{label:"Auto Start Pomodoros",children:/* @__PURE__ */T(te,{checked:l.autoStartPomodoros,onChange:e=>i("autoStartPomodoros",e)})}),
51
+ /* @__PURE__ */T(K,{label:"Long Break interval",children:/* @__PURE__ */T(q,{value:l.longBreakInterval,onChange:e=>i("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
52
+ /* @__PURE__ */B(G,{icon:/* @__PURE__ */T(re,{}),label:"TASK",children:[
53
+ /* @__PURE__ */T(K,{label:"Auto Check Tasks",info:'If you enable "Auto Check Tasks", the active task will be automatically checked when the actual pomodoro count reaches the estimated count.',children:/* @__PURE__ */T(te,{checked:l.autoCheckTasks,onChange:e=>i("autoCheckTasks",e)})}),
54
+ /* @__PURE__ */T(K,{label:"Check to Bottom",info:'If you enable "Check to Bottom", the checked task will be automatically moved to the bottom of the task list.',children:/* @__PURE__ */T(te,{checked:l.checkToBottom,onChange:e=>i("checkToBottom",e)})})]}),
55
+ /* @__PURE__ */B(G,{icon:/* @__PURE__ */T(ne,{}),label:"SOUND",children:[
56
+ /* @__PURE__ */T(K,{label:"Alarm Sound",children:/* @__PURE__ */B("div",{className:"flex items-center gap-2",children:[
57
+ /* @__PURE__ */T(ee,{value:l.alarmSound,onChange:e=>i("alarmSound",e),options:p.map(e=>({id:e.id,label:e.label}))}),"off"!==l.alarmSound&&/* @__PURE__ */T("button",{type:"button",onClick:()=>g(l.alarmSound,{volume:l.alarmVolume,repeat:1}),className:"px-2 py-1 text-[11px] rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
58
58
  /* @__PURE__ */T(U,{value:l.alarmVolume,onChange:e=>i("alarmVolume",e)}),
59
- /* @__PURE__ */T(Z,{label:"repeat",children:/* @__PURE__ */T(G,{value:l.alarmRepeat,onChange:e=>i("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
60
- /* @__PURE__ */T(Z,{label:"Focus Sound",children:/* @__PURE__ */B("div",{className:"flex items-center gap-2",children:[
59
+ /* @__PURE__ */T(K,{label:"repeat",children:/* @__PURE__ */T(q,{value:l.alarmRepeat,onChange:e=>i("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
60
+ /* @__PURE__ */T(K,{label:"Focus Sound",children:/* @__PURE__ */B("div",{className:"flex items-center gap-2",children:[
61
61
  /* @__PURE__ */T(ee,{value:l.focusSound,onChange:e=>i("focusSound",e),options:f}),"none"!==l.focusSound&&/* @__PURE__ */T("button",{type:"button",onClick:()=>b(l.focusSound,l.focusVolume),className:"px-2 py-1 text-[11px] rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
62
- /* @__PURE__ */T(U,{value:l.focusVolume,onChange:e=>i("focusVolume",e)})]})]})}function K({icon:e,label:t,children:a}){/* @__PURE__ */
62
+ /* @__PURE__ */T(U,{value:l.focusVolume,onChange:e=>i("focusVolume",e)})]})]})}function G({icon:e,label:t,children:a}){/* @__PURE__ */
63
63
  return B("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
64
64
  /* @__PURE__ */B("div",{className:"flex items-center gap-1.5 mb-3 text-gray-400",children:[e,
65
65
  /* @__PURE__ */T("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
66
- /* @__PURE__ */T("div",{className:"space-y-3",children:a})]})}function Z({label:e,info:t,children:a}){/* @__PURE__ */
66
+ /* @__PURE__ */T("div",{className:"space-y-3",children:a})]})}function K({label:e,info:t,children:a}){/* @__PURE__ */
67
67
  return B("div",{className:"flex items-center justify-between gap-3",children:[
68
68
  /* @__PURE__ */B("div",{className:"flex items-center gap-1.5 min-w-0",children:[
69
69
  /* @__PURE__ */T("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */T(ae,{title:t})]}),
70
70
  /* @__PURE__ */T("div",{className:"shrink-0",children:a})]})}function U({value:e,onChange:t}){/* @__PURE__ */
71
71
  return B("div",{className:"flex items-center justify-end gap-3",children:[
72
72
  /* @__PURE__ */T("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
73
- /* @__PURE__ */T("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function q({label:e,value:t,onChange:a,min:o=1,max:r=99}){/* @__PURE__ */
73
+ /* @__PURE__ */T("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function Q({label:e,value:t,onChange:a,min:o=1,max:r=99}){/* @__PURE__ */
74
74
  return B("label",{className:"flex flex-col",children:[
75
75
  /* @__PURE__ */T("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
76
- /* @__PURE__ */T(G,{value:t,onChange:a,min:o,max:r})]})}function G({value:e,onChange:t,min:a=1,max:o=99,className:r=""}){/* @__PURE__ */
76
+ /* @__PURE__ */T(q,{value:t,onChange:a,min:o,max:r})]})}function q({value:e,onChange:t,min:a=1,max:o=99,className:r=""}){/* @__PURE__ */
77
77
  return T("input",{type:"number",min:a,max:o,value:e,onChange:e=>t(Math.max(a,Math.min(o,parseInt(e.target.value,10)||a))),className:`bg-gray-100 border-0 rounded-md px-2 py-1.5 text-sm font-medium text-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${r}`})}function ee({value:e,onChange:t,options:a}){/* @__PURE__ */
78
78
  return B("div",{className:"relative",children:[
79
79
  /* @__PURE__ */T("select",{value:e,onChange:e=>t(e.target.value),className:"appearance-none bg-gray-100 border-0 rounded-md pl-3 pr-8 py-1.5 text-sm font-medium text-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:a.map(e=>/* @__PURE__ */T("option",{value:e.id,children:e.label},e.id))}),
@@ -96,4 +96,4 @@ return B("div",{className:"bg-white text-gray-800 rounded-md p-3 shadow-md",chil
96
96
  /* @__PURE__ */T("input",{type:"number",min:1,max:20,value:n,onChange:e=>l(Math.max(1,Math.min(20,parseInt(e.target.value,10)||1))),className:"w-16 bg-gray-100 rounded px-2 py-1 text-sm text-right border-0 focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),
97
97
  /* @__PURE__ */B("div",{className:"flex gap-2 mt-3 justify-end",children:[
98
98
  /* @__PURE__ */T("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
99
- /* @__PURE__ */T("button",{onClick:s,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:a},children:"Save"})]})]})}export{z as default};
99
+ /* @__PURE__ */T("button",{onClick:s,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:a},children:"Save"})]})]})}export{Z as default};