efficient-shell 12.4.1 → 12.7.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 +5 -5
- package/dist/{Browser-24JRQIPQ.js → Browser-AKBOECNB.js} +14 -14
- package/dist/{Calculator-AHBFZ4EN.js → Calculator-OJLVM42W.js} +22 -22
- package/dist/{CurrencyConverter-PZYRBADV.js → CurrencyConverter-UVOKFPMG.js} +7 -7
- package/dist/{Files-AZ4Q4LMK.js → Files-CRQDRSFS.js} +88 -88
- package/dist/{Notepad-UPHHH3YU.js → Notepad-P6JFXK3G.js} +9 -9
- package/dist/{PomodoroTimer-WGN2KNSB.js → PomodoroTimer-UOV4CCYH.js} +63 -63
- package/dist/{Preview-K4TNRLKM.js → Preview-XF5FKLVZ.js} +17 -17
- package/dist/{Stock-5GEEDQVT.js → Stock-6D4I2EWM.js} +3 -3
- package/dist/{Weather-WMQQXWHH.js → Weather-BCOAQJDT.js} +17 -17
- package/dist/{WorldClock-IK3WTHVW.js → WorldClock-WX3O3EDU.js} +5 -5
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-NIBE57KV.js → chunk-2HZQZTW5.js} +1 -1
- package/dist/{chunk-LCC3NXQX.js → chunk-34SPT4I6.js} +6 -6
- package/dist/chunk-6EHPEBGP.js +5 -0
- package/dist/chunk-AHJAJLSK.js +99 -0
- package/dist/{chunk-WUGQAZMC.js → chunk-EZPSNUYR.js} +4 -4
- package/dist/{chunk-VWQNCYGQ.js → chunk-MM5AFQ24.js} +8 -8
- package/dist/{chunk-ZB2H2JJ2.js → chunk-NC36LJCA.js} +4 -4
- package/dist/{chunk-CURXYF2R.js → chunk-PM4Y2FMQ.js} +3 -3
- package/dist/chunk-PWYLGTZS.js +1 -0
- package/dist/{chunk-EF3NPTHG.js → chunk-QNYZTD7V.js} +1 -1
- package/dist/{chunk-CAXOKGMB.js → chunk-SCU2CWNJ.js} +11 -11
- package/dist/chunk-SZT72QMD.js +28 -0
- package/dist/chunk-TX5FZBPQ.js +4 -0
- package/dist/chunk-UVGEOQI4.js +13 -0
- package/dist/{chunk-AAIUJJDQ.js → chunk-WVHGHMW3.js} +1 -1
- package/dist/{chunk-5HJIFCDQ.js → chunk-ZKQWS2ML.js} +3 -3
- package/dist/data/EntityList.d.ts +4 -0
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListFooter.d.ts +7 -12
- package/dist/data/ListFooter.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/index.d.ts +28 -6
- package/dist/index.js +530 -531
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-4H5NTMOF.js +0 -4
- package/dist/chunk-C4IJONGO.js +0 -1
- package/dist/chunk-I5CSYOOZ.js +0 -28
- package/dist/chunk-PMJMYH5O.js +0 -5
- package/dist/chunk-UWF45S5L.js +0 -99
- package/dist/chunk-VIOILTE4.js +0 -13
- /package/dist/{chunk-2762IAB7.js → chunk-7B5KFESH.js} +0 -0
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-
|
|
1
|
+
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-2HZQZTW5.js";import{subscribePomo as o,getPomoSnapshot as a,setPomoDurations as n,setPomoAlarm as r,setPomoAlarmConfig as s,setPomoBehaviour as i,setPomoFocusSound as l,useTodoTasks as c,migratePomodoroTasksOnce as u,pomoSwitchMode as d,pomoPause as m,pomoStart as h,ALARM_OPTIONS as p,playAlarm as g,FOCUS_SOUND_OPTIONS as k,previewFocusSound as f}from"./chunk-TS36J7RW.js";import{PLACEHOLDER_INK as b}from"./chunk-AYZY3YNC.js";import{pad2 as x}from"./chunk-LF27WIN2.js";import{useWidgetSettings as v}from"./chunk-AHJAJLSK.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-Y4RERPFN.js";import"./chunk-5A7MWTXX.js";import"./chunk-ZDMZM7HD.js";import"./chunk-HE767CVB.js";import"./chunk-SCU2CWNJ.js";import"./chunk-6EHPEBGP.js";import"./chunk-N7JX27JE.js";import"./chunk-3DVNXNTF.js";import"./chunk-7B5KFESH.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-5JUG74UR.js";import"./chunk-SCGBCBXP.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as y}from"./chunk-KC3EX26K.js";import"./chunk-CDAJKLGL.js";import"./chunk-JPNAEN53.js";import"./chunk-IFQXTIMY.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UJJXWLHE.js";import"./chunk-XWFLIGDQ.js";import{Icon as N}from"./chunk-UIWGVOFH.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-CJH2BGXY.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-TRWHVG3A.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-43MCNASD.js";import"./chunk-C3QOHMR6.js";import{useSyncExternalStore as C,useEffect as S,useMemo as w,useState as j,useRef as B,useCallback as M}from"react";import{jsxs as T,Fragment as P,jsx as A}from"react/jsx-runtime";var I="pomodoro_appearance",D="pomodoro_active_task_id",L={focus:"Pomodoro",short:"Short Break",long:"Long Break"},V={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var W=25,J=5,R=15,$=!1,E=!1,F=4,H=!0,U=!0,G="bell",Q=100,X=1,K="none",Y=50,_=(e,t,o,a)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(o,Math.round(e))):a;function Z(){const t=C(o,a,a),{prefs:g,save:f}=y(),b=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:_(t.focusMinutes,1,120,W),shortBreakMinutes:_(t.shortBreakMinutes,1,120,J),longBreakMinutes:_(t.longBreakMinutes,1,120,R),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:$,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:E,longBreakInterval:_(t.longBreakInterval,1,20,F),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:H,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:U,alarmSound:p.some(e=>e.id===t.alarmSound)?t.alarmSound:G,alarmVolume:_(t.alarmVolume,0,100,Q),alarmRepeat:_(t.alarmRepeat,1,5,X),focusSound:k.some(e=>e.id===t.focusSound)?t.focusSound:K,focusVolume:_(t.focusVolume,0,100,Y)}}(g.pomodoro_settings);S(()=>{n({focus:60*b.focusMinutes,short:60*b.shortBreakMinutes,long:60*b.longBreakMinutes})},[b.focusMinutes,b.shortBreakMinutes,b.longBreakMinutes]),S(()=>{r(b.alarmSound),s(b.alarmVolume,b.alarmRepeat)},[b.alarmSound,b.alarmVolume,b.alarmRepeat]),S(()=>{i({autoStartBreaks:b.autoStartBreaks,autoStartPomodoros:b.autoStartPomodoros,longBreakInterval:b.longBreakInterval})},[b.autoStartBreaks,b.autoStartPomodoros,b.longBreakInterval]),S(()=>{l(b.focusSound,b.focusVolume)},[b.focusSound,b.focusVolume]),S(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const Z=c(),z=Z.tasks,q=w(()=>/* @__PURE__ */(new Date).toISOString().slice(0,10),[]),ee=function(e,t){return w(()=>t?(e=>{const t=[],o=[];for(const a of e)(a.done?o:t).push(a);return[...t,...o]})(e):e,[e,t])}(w(()=>z.filter(e=>!!e.dueDate&&(e.dueDate===q||e.dueDate<q&&!e.done)),[z,q]),b.checkToBottom),[te,oe]=j(()=>localStorage.getItem(D)),[ae,ne]=j(!1),[re,se]=j(null),ie=B(!1);S(()=>{ie.current||(ie.current=!0,u(z,Z.setAllTasks))},[]),S(()=>{try{te?localStorage.setItem(D,te):localStorage.removeItem(D)}catch{}},[te]),S(()=>{if(!re)return;const e=()=>se(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[re]);const le=B(t.streak);S(()=>{if(t.streak>le.current&&te){const e=z.find(e=>e.id===te);if(e){const t=(e.completed??0)+1,o=e.estimated??0,a=b.autoCheckTasks&&o>0&&t>=o;Z.updateTask(te,{completed:t,done:e.done||a})}}le.current=t.streak},[t.streak,te,b.autoCheckTasks,z,Z]);const ue=ee.reduce((e,t)=>e+(t.completed??0),0),de=ee.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),me=ee.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),he=t.running&&"focus"===t.mode?t.remaining:0,pe=me*b.focusMinutes*60+he,ge=new Date(Date.now()+1e3*pe).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}),ke=(pe/3600).toFixed(1),fe=te?z.find(e=>e.id===te)??null:null,be=x(Math.floor(t.remaining/60)),xe=x(t.remaining%60),[ve,ye]=j(()=>e(I)),[Ne,Ce]=j(!1),[Se,we]=j(ve),[je,Be]=j(b);v(M(()=>{we({...ve}),Be({...b}),Ce(!0)},[ve,b]));const Me="focus"!==t.mode,Te=V[t.mode],Pe=Me?(Ae=Te,Ie=ve.activeOpacity/100,`rgba(${parseInt(Ae.slice(1,3),16)}, ${parseInt(Ae.slice(3,5),16)}, ${parseInt(Ae.slice(5,7),16)}, ${Ie})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${ve.activeOpacity/100})`;var Ae,Ie;const De={primary:Me?"text-white":"text-gray-900",secondary:Me?"text-white/85":"text-gray-700",muted:Me?"text-white/65":"text-gray-500",tabActive:Me?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:Me?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:Me?"border-white/30":"border-gray-200",softDivider:Me?"border-white/20":"border-gray-200",iconBtn:Me?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:Me?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},Le=Me?Te:"#0f172a";/* @__PURE__ */
|
|
2
2
|
return T(P,{children:[
|
|
3
3
|
/* @__PURE__ */T("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${De.primary}`,style:{backgroundColor:Pe,backdropFilter:ve.activeBlur>0?`blur(${ve.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */
|
|
4
|
+
/* @__PURE__ */A("div",{className:"px-3 pt-3 flex justify-center gap-2",children:["focus","short","long"].map(e=>/* @__PURE__ */A("button",{onClick:()=>d(e),className:`px-3 py-1 text-sm font-bold rounded transition-colors ${t.mode===e?De.tabActive:De.tabInactive}`,children:L[e]},e))}),
|
|
5
5
|
/* @__PURE__ */T("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[be,":",xe]}),
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
6
|
+
/* @__PURE__ */A("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */A("button",{onClick:()=>t.running?m():h(),className:"bg-surface px-12 py-3 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__ */A("div",{className:"px-3 py-3 text-center",children:fe?/* @__PURE__ */T(P,{children:[
|
|
8
8
|
/* @__PURE__ */T("div",{className:`text-xs leading-tight ${De.muted}`,children:["#",(fe.completed??0)+1]}),
|
|
9
|
-
/* @__PURE__ */
|
|
9
|
+
/* @__PURE__ */A("div",{className:`text-base font-medium leading-tight truncate mt-0.5 ${De.primary}`,children:fe.name})]}):/* @__PURE__ */A("div",{className:`text-xs italic ${De.muted}`,children:"No task selected"})}),
|
|
10
10
|
/* @__PURE__ */T("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
11
|
+
/* @__PURE__ */A("h3",{className:`text-base font-bold tracking-tight ${De.primary}`,children:"Tasks"}),
|
|
12
|
+
/* @__PURE__ */A("button",{className:`rounded p-1 transition-colors ${De.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */A(N,{name:"more-vertical",look:"solid",className:"h-4 w-4"})})]}),
|
|
13
|
+
/* @__PURE__ */A("div",{className:`border-t mx-3 mt-2 ${De.divider}`}),
|
|
14
14
|
/* @__PURE__ */T("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[ee.map(e=>{const t=e.id===te;/* @__PURE__ */
|
|
15
15
|
return T("div",{onClick:()=>oe(e.id),className:"bg-surface text-ink-strong rounded-md flex items-center pr-2 py-3 shadow-sm cursor-pointer transition-shadow hover:shadow-(--elevation-panel) "+(t?"border-l-4 border-gray-700 pl-2":"pl-3 border-l-4 border-transparent"),children:[
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */A("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,Z.toggleDone(o)},className:"shrink-0",children:e.done?/* @__PURE__ */A("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:Le},children:/* @__PURE__ */A("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__ */A("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */A("circle",{cx:"12",cy:"12",r:"10"})})}),
|
|
17
|
+
/* @__PURE__ */A("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
|
|
18
18
|
/* @__PURE__ */T("span",{className:"text-sm tabular-nums mr-2 shrink-0",children:[
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */A("span",{className:"font-bold text-gray-500",children:e.completed??0}),
|
|
20
|
+
/* @__PURE__ */A("span",{className:"text-gray-400",children:" / "}),
|
|
21
|
+
/* @__PURE__ */A("span",{className:"text-gray-400",children:e.estimated??"–"})]}),
|
|
22
22
|
/* @__PURE__ */T("div",{className:"relative",children:[
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */A("button",{onClick:t=>{t.stopPropagation(),se(re===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */A(N,{name:"more-vertical",look:"solid",className:"h-4 w-4 text-ink-faint"})}),re===e.id&&/* @__PURE__ */A("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__ */A("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,Z.removeTask(o),te===o&&oe(null),se(null)},className:"block w-full px-3 h-8 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),ae?/* @__PURE__ */A(ce,{onSubmit:(e,t)=>{const o=e.trim();if(!o)return;const a=Z.addTask({name:o,estimated:t,completed:0,dueDate:q});te||oe(a),ne(!1)},onCancel:()=>ne(!1),accentColor:Le}):/* @__PURE__ */T("button",{onClick:()=>ne(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${De.addTaskBtn}`,children:[
|
|
24
|
+
/* @__PURE__ */A(N,{name:"add-circle",className:"h-5 w-5",strokeWidth:2}),"Add Task"]})]}),
|
|
25
25
|
/* @__PURE__ */T("div",{className:`border-t px-3 py-3 flex items-center justify-center gap-5 text-sm ${De.softDivider}`,children:[
|
|
26
26
|
/* @__PURE__ */T("span",{className:De.secondary,children:["Pomos: ",
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */A("span",{className:`font-bold ${De.primary}`,children:ue}),
|
|
28
|
+
/* @__PURE__ */A("span",{className:De.muted,children:" / "}),
|
|
29
|
+
/* @__PURE__ */A("span",{className:`font-bold ${De.primary}`,children:de})]}),pe>0&&/* @__PURE__ */T("span",{className:De.secondary,children:["Finish At: ",
|
|
30
|
+
/* @__PURE__ */A("span",{className:`font-bold ${De.primary}`,children:ge}),
|
|
31
31
|
/* @__PURE__ */T("span",{className:De.muted,children:[" (",ke,"h)"]})]})]})]}),
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */A(O,{open:Ne,onClose:()=>Ce(!1),onSave:()=>{ye(Se),localStorage.setItem(I,JSON.stringify(Se)),f({pomodoro_settings:je}),Ce(!1)},configAppearance:Se,setConfigAppearance:we,configPrefs:je,setConfigPrefs:Be})]})}function O({open:e,onClose:o,onSave:a,configAppearance:n,setConfigAppearance:r,configPrefs:s,setConfigPrefs:i}){const l=(e,t)=>i(o=>({...o,[e]:t}));/* @__PURE__ */
|
|
33
33
|
return T(t,{open:e,onClose:o,title:"Pomodoro Settings",appearance:n,onAppearanceChange:r,onSave:a,children:[
|
|
34
|
-
/* @__PURE__ */T(z,{icon:/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */T(z,{icon:/* @__PURE__ */A(se,{}),label:"TIMER",children:[
|
|
35
35
|
/* @__PURE__ */T("div",{children:[
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */A("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
|
|
37
37
|
/* @__PURE__ */T("div",{className:"grid grid-cols-3 gap-3",children:[
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */T(z,{icon:/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */T(z,{icon:/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */A(te,{label:"Pomodoro",value:s.focusMinutes,onChange:e=>l("focusMinutes",e),max:120}),
|
|
39
|
+
/* @__PURE__ */A(te,{label:"Short Break",value:s.shortBreakMinutes,onChange:e=>l("shortBreakMinutes",e),max:120}),
|
|
40
|
+
/* @__PURE__ */A(te,{label:"Long Break",value:s.longBreakMinutes,onChange:e=>l("longBreakMinutes",e),max:120})]})]}),
|
|
41
|
+
/* @__PURE__ */A(q,{label:"Auto Start Breaks",children:/* @__PURE__ */A(ne,{checked:s.autoStartBreaks,onChange:e=>l("autoStartBreaks",e)})}),
|
|
42
|
+
/* @__PURE__ */A(q,{label:"Auto Start Pomodoros",children:/* @__PURE__ */A(ne,{checked:s.autoStartPomodoros,onChange:e=>l("autoStartPomodoros",e)})}),
|
|
43
|
+
/* @__PURE__ */A(q,{label:"Long Break interval",children:/* @__PURE__ */A(oe,{value:s.longBreakInterval,onChange:e=>l("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
|
|
44
|
+
/* @__PURE__ */T(z,{icon:/* @__PURE__ */A(ie,{}),label:"TASK",children:[
|
|
45
|
+
/* @__PURE__ */A(q,{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__ */A(ne,{checked:s.autoCheckTasks,onChange:e=>l("autoCheckTasks",e)})}),
|
|
46
|
+
/* @__PURE__ */A(q,{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__ */A(ne,{checked:s.checkToBottom,onChange:e=>l("checkToBottom",e)})})]}),
|
|
47
|
+
/* @__PURE__ */T(z,{icon:/* @__PURE__ */A(le,{}),label:"SOUND",children:[
|
|
48
|
+
/* @__PURE__ */A(q,{label:"Alarm Sound",children:/* @__PURE__ */T("div",{className:"flex items-center gap-2",children:[
|
|
49
|
+
/* @__PURE__ */A(ae,{value:s.alarmSound,onChange:e=>l("alarmSound",e),options:p.map(e=>({id:e.id,label:e.label}))}),"off"!==s.alarmSound&&/* @__PURE__ */A("button",{type:"button",onClick:()=>g(s.alarmSound,{volume:s.alarmVolume,repeat:1}),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
50
|
+
/* @__PURE__ */A(ee,{value:s.alarmVolume,onChange:e=>l("alarmVolume",e)}),
|
|
51
|
+
/* @__PURE__ */A(q,{label:"repeat",children:/* @__PURE__ */A(oe,{value:s.alarmRepeat,onChange:e=>l("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
|
|
52
|
+
/* @__PURE__ */A(q,{label:"Focus Sound",children:/* @__PURE__ */T("div",{className:"flex items-center gap-2",children:[
|
|
53
|
+
/* @__PURE__ */A(ae,{value:s.focusSound,onChange:e=>l("focusSound",e),options:k}),"none"!==s.focusSound&&/* @__PURE__ */A("button",{type:"button",onClick:()=>f(s.focusSound,s.focusVolume),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
54
|
+
/* @__PURE__ */A(ee,{value:s.focusVolume,onChange:e=>l("focusVolume",e)})]})]})}function z({icon:e,label:t,children:o}){/* @__PURE__ */
|
|
55
55
|
return T("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
|
|
56
56
|
/* @__PURE__ */T("div",{className:"flex items-center gap-2 mb-3 text-ink-faintest",children:[e,
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */A("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
|
|
58
|
+
/* @__PURE__ */A("div",{className:"space-y-3",children:o})]})}function q({label:e,info:t,children:o}){/* @__PURE__ */
|
|
59
59
|
return T("div",{className:"flex items-center justify-between gap-3",children:[
|
|
60
60
|
/* @__PURE__ */T("div",{className:"flex items-center gap-2 min-w-0",children:[
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */A("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */A(re,{title:t})]}),
|
|
62
|
+
/* @__PURE__ */A("div",{className:"shrink-0",children:o})]})}function ee({value:e,onChange:t}){/* @__PURE__ */
|
|
63
63
|
return T("div",{className:"flex items-center justify-end gap-3",children:[
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */A("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
|
|
65
|
+
/* @__PURE__ */A("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function te({label:e,value:t,onChange:o,min:a=1,max:n=99}){/* @__PURE__ */
|
|
66
66
|
return T("label",{className:"flex flex-col",children:[
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
return
|
|
67
|
+
/* @__PURE__ */A("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
|
|
68
|
+
/* @__PURE__ */A(oe,{value:t,onChange:o,min:a,max:n})]})}function oe({value:e,onChange:t,min:o=1,max:a=99,className:n=""}){/* @__PURE__ */
|
|
69
|
+
return A("input",{type:"number",min:o,max:a,value:e,onChange:e=>t(Math.max(o,Math.min(a,parseInt(e.target.value,10)||o))),className:`bg-gray-100 border-0 rounded-md px-2 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${n}`})}function ae({value:e,onChange:t,options:o}){/* @__PURE__ */
|
|
70
70
|
return T("div",{className:"relative",children:[
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
return
|
|
74
|
-
return
|
|
71
|
+
/* @__PURE__ */A("select",{value:e,onChange:e=>t(e.target.value),className:"appearance-none bg-gray-100 border-0 rounded-md pl-3 pr-8 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:o.map(e=>/* @__PURE__ */A("option",{value:e.id,children:e.label},e.id))}),
|
|
72
|
+
/* @__PURE__ */A(N,{name:"chevron-down",className:`absolute right-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 pointer-events-none ${b}`,strokeWidth:2.5})]})}function ne({checked:e,onChange:t}){/* @__PURE__ */
|
|
73
|
+
return A("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t(!e),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(e?"bg-emerald-500":"bg-gray-300"),children:/* @__PURE__ */A("span",{className:"absolute h-5 w-5 rounded-full bg-white shadow transition-transform "+(e?"translate-x-[22px]":"translate-x-0.5")})})}function re({title:e}){/* @__PURE__ */
|
|
74
|
+
return A("span",{title:e,className:"inline-flex items-center justify-center w-4 h-4 rounded-full bg-gray-300 text-on-accent text-3xs font-bold cursor-help",children:"i"})}function se(){/* @__PURE__ */
|
|
75
75
|
return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */A("circle",{cx:"12",cy:"12",r:"9"}),
|
|
77
|
+
/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7v5l3 2"})]})}function ie(){/* @__PURE__ */
|
|
78
78
|
return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */A("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),
|
|
80
|
+
/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4"})]})}function le(){/* @__PURE__ */
|
|
81
81
|
return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5L6 9H2v6h4l5 4V5z"}),
|
|
83
|
+
/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 8.5a5 5 0 010 7M19 5a9 9 0 010 14"})]})}function ce({onSubmit:e,onCancel:t,accentColor:o}){const[a,n]=j(""),[r,s]=j(1),i=()=>e(a,r);/* @__PURE__ */
|
|
84
84
|
return T("div",{className:"bg-surface text-ink-strong rounded-md p-3 shadow-(--elevation-panel)",children:[
|
|
85
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */A("input",{autoFocus:!0,value:a,onChange:e=>n(e.target.value),placeholder:"What are you working on?",onKeyDown:e=>{"Enter"===e.key&&i(),"Escape"===e.key&&t()},className:"w-full text-base font-medium bg-transparent border-0 outline-none placeholder-gray-400"}),
|
|
86
86
|
/* @__PURE__ */T("div",{className:"flex items-center justify-between mt-2",children:[
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */A("span",{className:"text-xs font-semibold text-gray-500",children:"Est Pomodoros"}),
|
|
88
|
+
/* @__PURE__ */A("input",{type:"number",min:1,max:20,value:r,onChange:e=>s(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"})]}),
|
|
89
89
|
/* @__PURE__ */T("div",{className:"flex gap-2 mt-3 justify-end",children:[
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */A("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
91
|
+
/* @__PURE__ */A("button",{onClick:i,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:o},children:"Save"})]})]})}export{Z as default};
|