efficient-shell 7.11.1 → 7.13.2

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 (48) hide show
  1. package/dist/{Browser-HQSYADOK.js → Browser-K57UUI7M.js} +15 -15
  2. package/dist/Calculator-DICFEP4L.js +29 -0
  3. package/dist/ConfirmDialog-JMQI6CGW.js +1 -0
  4. package/dist/{CurrencyConverter-SAIDT4WN.js → CurrencyConverter-CSXJ4T4P.js} +8 -8
  5. package/dist/{Documents-YFYTJGI3.js → Documents-MZ7BEGNG.js} +5 -5
  6. package/dist/{Files-FUOFGLH4.js → Files-P4PB4GMS.js} +80 -80
  7. package/dist/{Notepad-U5PUVVNQ.js → Notepad-7QFTPWIM.js} +10 -10
  8. package/dist/PomodoroTimer-MYTQX74U.js +91 -0
  9. package/dist/{Preview-GB65GSM3.js → Preview-K62QJSSB.js} +28 -28
  10. package/dist/Sidebar-PYURV2S2.js +44 -0
  11. package/dist/{Spreadsheet-2BFHRSTA.js → Spreadsheet-LEDD423O.js} +11 -11
  12. package/dist/{Stock-EP2SB76N.js → Stock-3H2PR3XA.js} +7 -7
  13. package/dist/{Weather-62FA6T6O.js → Weather-LQOFFWMT.js} +17 -17
  14. package/dist/{WorldClock-C3A6PZYM.js → WorldClock-TJCZHIL2.js} +4 -4
  15. package/dist/apps/index.js +1 -1
  16. package/dist/bin/ui-check.js +1 -1
  17. package/dist/brand.css +1 -1
  18. package/dist/chunk-6ZLZP6GV.js +1023 -0
  19. package/dist/{chunk-YMWCZKUN.js → chunk-A7TXAKTX.js} +4 -4
  20. package/dist/{chunk-THM35LAN.js → chunk-AEAPCPOG.js} +107 -107
  21. package/dist/{chunk-Y56GRZ2Q.js → chunk-E3FQXACV.js} +1 -1
  22. package/dist/{chunk-SSFONNV7.js → chunk-ERJTO4DO.js} +1 -1
  23. package/dist/{chunk-MFDZYZZX.js → chunk-GNCH3JEH.js} +7 -7
  24. package/dist/{chunk-GGSG7HSD.js → chunk-HDGFEYPU.js} +1 -1
  25. package/dist/{chunk-ICN533ML.js → chunk-IQDY2YFN.js} +10 -10
  26. package/dist/{chunk-NGUH7T5V.js → chunk-JTNKC4CR.js} +1 -1
  27. package/dist/chunk-OESIYQSY.js +1 -0
  28. package/dist/{chunk-UJL5J7GX.js → chunk-OV7F663H.js} +4 -4
  29. package/dist/chunk-PM4GMFN3.js +1 -0
  30. package/dist/{chunk-KSLOSQKN.js → chunk-QBXX5A7U.js} +15 -15
  31. package/dist/{chunk-KPFDT626.js → chunk-YNKJZKFF.js} +3 -3
  32. package/dist/{index-CRqXW8tD.d.ts → index-CGgt7t0J.d.ts} +71 -7
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.js +631 -631
  35. package/dist/map/index.js +3 -3
  36. package/dist/markdown/index.js +6 -6
  37. package/dist/page-tabs/index.js +5 -5
  38. package/dist/telemetry/index.js +1 -1
  39. package/dist/ui/index.d.ts +1 -1
  40. package/dist/ui/index.js +1 -1
  41. package/dist/ui.css +48 -24
  42. package/package.json +1 -1
  43. package/dist/Calculator-HFF54RNH.js +0 -29
  44. package/dist/ConfirmDialog-6LAVAGDE.js +0 -1
  45. package/dist/PomodoroTimer-AV3YE2WJ.js +0 -91
  46. package/dist/Sidebar-3IB3YIWC.js +0 -44
  47. package/dist/chunk-GIRABDNU.js +0 -1
  48. package/dist/chunk-TJJ5JPZ2.js +0 -1016
@@ -1,91 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-GGSG7HSD.js";import{subscribePomo as a,getPomoSnapshot as o,setPomoDurations as n,setPomoAlarm as r,setPomoAlarmConfig as s,setPomoBehaviour as l,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-ITCBLL72.js";import{useWidgetSettings as k}from"./chunk-THM35LAN.js";import"./chunk-DSSLOQDW.js";import"./chunk-SCJT2XXU.js";import"./chunk-RUHUTZN4.js";import{useShellPrefs as x}from"./chunk-ZRU5F2XT.js";import"./chunk-5A7MWTXX.js";import"./chunk-YMWCZKUN.js";import"./chunk-KSLOSQKN.js";import"./chunk-ICN533ML.js";import"./chunk-UVBK6YSR.js";import"./chunk-NGUH7T5V.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import"./chunk-KNUR2UEG.js";import"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import{Icon as v}from"./chunk-ZGUQLVY4.js";import{useSyncExternalStore as y,useEffect as N,useMemo as C,useState as w,useRef as S,useCallback as B}from"react";import{jsxs as M,Fragment as T,jsx as j}from"react/jsx-runtime";var I="pomodoro_appearance",P="pomodoro_active_task_id",A={focus:"Pomodoro",short:"Short Break",long:"Long Break"},L={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var $=25,D=5,V=15,R=!1,U=!1,_=4,W=!0,E=!0,F="bell",H=100,O=1,G="none",K=50,Q=(e,t,a,o)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(a,Math.round(e))):o;function z(){const t=y(a,o,o),{prefs:p,save:b}=x(),z=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:Q(t.focusMinutes,1,120,$),shortBreakMinutes:Q(t.shortBreakMinutes,1,120,D),longBreakMinutes:Q(t.longBreakMinutes,1,120,V),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:R,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:U,longBreakInterval:Q(t.longBreakInterval,1,20,_),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:W,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:E,alarmSound:g.some(e=>e.id===t.alarmSound)?t.alarmSound:F,alarmVolume:Q(t.alarmVolume,0,100,H),alarmRepeat:Q(t.alarmRepeat,1,5,O),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:G,focusVolume:Q(t.focusVolume,0,100,K)}}(p.pomodoro_settings);N(()=>{n({focus:60*z.focusMinutes,short:60*z.shortBreakMinutes,long:60*z.longBreakMinutes})},[z.focusMinutes,z.shortBreakMinutes,z.longBreakMinutes]),N(()=>{r(z.alarmSound),s(z.alarmVolume,z.alarmRepeat)},[z.alarmSound,z.alarmVolume,z.alarmRepeat]),N(()=>{l({autoStartBreaks:z.autoStartBreaks,autoStartPomodoros:z.autoStartPomodoros,longBreakInterval:z.longBreakInterval})},[z.autoStartBreaks,z.autoStartPomodoros,z.longBreakInterval]),N(()=>{i(z.focusSound,z.focusVolume)},[z.focusSound,z.focusVolume]),N(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const J=c(),Z=J.tasks,Y=C(()=>/* @__PURE__ */(new Date).toISOString().slice(0,10),[]),q=function(e,t){return C(()=>t?(e=>{const t=[],a=[];for(const o of e)(o.done?a:t).push(o);return[...t,...a]})(e):e,[e,t])}(C(()=>Z.filter(e=>!!e.dueDate&&(e.dueDate===Y||e.dueDate<Y&&!e.done)),[Z,Y]),z.checkToBottom),[ee,te]=w(()=>localStorage.getItem(P)),[ae,oe]=w(!1),[ne,re]=w(null),se=S(!1);N(()=>{se.current||(se.current=!0,d(Z,J.setAllTasks))},[]),N(()=>{try{ee?localStorage.setItem(P,ee):localStorage.removeItem(P)}catch{}},[ee]),N(()=>{if(!ne)return;const e=()=>re(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[ne]);const ie=S(t.streak);N(()=>{if(t.streak>ie.current&&ee){const e=Z.find(e=>e.id===ee);if(e){const t=(e.completed??0)+1,a=e.estimated??0,o=z.autoCheckTasks&&a>0&&t>=a;J.updateTask(ee,{completed:t,done:e.done||o})}}ie.current=t.streak},[t.streak,ee,z.autoCheckTasks,Z,J]);const ce=q.reduce((e,t)=>e+(t.completed??0),0),de=q.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),ue=q.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),me=t.running&&"focus"===t.mode?t.remaining:0,he=ue*z.focusMinutes*60+me,ge=new Date(Date.now()+1e3*he).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}),pe=(he/3600).toFixed(1),fe=ee?Z.find(e=>e.id===ee)??null:null,be=String(Math.floor(t.remaining/60)).padStart(2,"0"),ke=String(t.remaining%60).padStart(2,"0"),[xe,ve]=w(()=>e(I)),[ye,Ne]=w(!1),[Ce,we]=w(xe),[Se,Be]=w(z);k(B(()=>{we({...xe}),Be({...z}),Ne(!0)},[xe,z]));const Me="focus"!==t.mode,Te=L[t.mode],je=Me?(Ie=Te,Pe=xe.activeOpacity/100,`rgba(${parseInt(Ie.slice(1,3),16)}, ${parseInt(Ie.slice(3,5),16)}, ${parseInt(Ie.slice(5,7),16)}, ${Pe})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${xe.activeOpacity/100})`;var Ie,Pe;const Ae={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
- return M(T,{children:[
3
- /* @__PURE__ */M("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${Ae.primary}`,style:{backgroundColor:je,backdropFilter:xe.activeBlur>0?`blur(${xe.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */j("div",{className:"px-3 pt-3 flex justify-center gap-2",children:["focus","short","long"].map(e=>/* @__PURE__ */j("button",{onClick:()=>u(e),className:`px-3 py-1 text-sm font-bold rounded transition-colors ${t.mode===e?Ae.tabActive:Ae.tabInactive}`,children:A[e]},e))}),
5
- /* @__PURE__ */M("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[be,":",ke]}),
6
- /* @__PURE__ */j("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */j("button",{onClick:()=>t.running?m():h(),className:"bg-white 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__ */j("div",{className:"px-3 py-3 text-center",children:fe?/* @__PURE__ */M(T,{children:[
8
- /* @__PURE__ */M("div",{className:`text-xs leading-tight ${Ae.muted}`,children:["#",(fe.completed??0)+1]}),
9
- /* @__PURE__ */j("div",{className:`text-base font-medium leading-tight truncate mt-0.5 ${Ae.primary}`,children:fe.name})]}):/* @__PURE__ */j("div",{className:`text-xs italic ${Ae.muted}`,children:"No task selected"})}),
10
- /* @__PURE__ */M("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
11
- /* @__PURE__ */j("h3",{className:`text-base font-bold tracking-tight ${Ae.primary}`,children:"Tasks"}),
12
- /* @__PURE__ */j("button",{className:`rounded p-1 transition-colors ${Ae.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */j(v,{name:"more-vertical",look:"solid",className:"h-4 w-4"})})]}),
13
- /* @__PURE__ */j("div",{className:`border-t mx-3 mt-2 ${Ae.divider}`}),
14
- /* @__PURE__ */M("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[q.map(e=>{const t=e.id===ee;/* @__PURE__ */
15
- return M("div",{onClick:()=>te(e.id),className:"bg-white text-gray-800 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__ */j("button",{onClick:t=>{var a;t.stopPropagation(),a=e.id,J.toggleDone(a)},className:"shrink-0",children:e.done?/* @__PURE__ */j("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:Le},children:/* @__PURE__ */j("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__ */j("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */j("circle",{cx:"12",cy:"12",r:"10"})})}),
17
- /* @__PURE__ */j("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
18
- /* @__PURE__ */M("span",{className:"text-sm tabular-nums mr-2 shrink-0",children:[
19
- /* @__PURE__ */j("span",{className:"font-bold text-gray-500",children:e.completed??0}),
20
- /* @__PURE__ */j("span",{className:"text-gray-400",children:" / "}),
21
- /* @__PURE__ */j("span",{className:"text-gray-400",children:e.estimated??"–"})]}),
22
- /* @__PURE__ */M("div",{className:"relative",children:[
23
- /* @__PURE__ */j("button",{onClick:t=>{t.stopPropagation(),re(ne===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */j(v,{name:"more-vertical",look:"solid",className:"h-4 w-4 text-gray-500"})}),ne===e.id&&/* @__PURE__ */j("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__ */j("button",{onClick:t=>{var a;t.stopPropagation(),a=e.id,J.removeTask(a),ee===a&&te(null),re(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__ */j(le,{onSubmit:(e,t)=>{const a=e.trim();if(!a)return;const o=J.addTask({name:a,estimated:t,completed:0,dueDate:Y});ee||te(o),oe(!1)},onCancel:()=>oe(!1),accentColor:Le}):/* @__PURE__ */M("button",{onClick:()=>oe(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${Ae.addTaskBtn}`,children:[
24
- /* @__PURE__ */j(v,{name:"add-circle",className:"h-5 w-5",strokeWidth:2}),"Add Task"]})]}),
25
- /* @__PURE__ */M("div",{className:`border-t px-3 py-3 flex items-center justify-center gap-5 text-sm ${Ae.softDivider}`,children:[
26
- /* @__PURE__ */M("span",{className:Ae.secondary,children:["Pomos: ",
27
- /* @__PURE__ */j("span",{className:`font-bold ${Ae.primary}`,children:ce}),
28
- /* @__PURE__ */j("span",{className:Ae.muted,children:" / "}),
29
- /* @__PURE__ */j("span",{className:`font-bold ${Ae.primary}`,children:de})]}),he>0&&/* @__PURE__ */M("span",{className:Ae.secondary,children:["Finish At: ",
30
- /* @__PURE__ */j("span",{className:`font-bold ${Ae.primary}`,children:ge}),
31
- /* @__PURE__ */M("span",{className:Ae.muted,children:[" (",pe,"h)"]})]})]})]}),
32
- /* @__PURE__ */j(X,{open:ye,onClose:()=>Ne(!1),onSave:()=>{ve(Ce),localStorage.setItem(I,JSON.stringify(Ce)),b({pomodoro_settings:Se}),Ne(!1)},configAppearance:Ce,setConfigAppearance:we,configPrefs:Se,setConfigPrefs:Be})]})}function X({open:e,onClose:a,onSave:o,configAppearance:n,setConfigAppearance:r,configPrefs:s,setConfigPrefs:l}){const i=(e,t)=>l(a=>({...a,[e]:t}));/* @__PURE__ */
33
- return M(t,{open:e,onClose:a,title:"Pomodoro Settings",appearance:n,onAppearanceChange:r,onSave:o,children:[
34
- /* @__PURE__ */M(J,{icon:/* @__PURE__ */j(ne,{}),label:"TIMER",children:[
35
- /* @__PURE__ */M("div",{children:[
36
- /* @__PURE__ */j("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
37
- /* @__PURE__ */M("div",{className:"grid grid-cols-3 gap-3",children:[
38
- /* @__PURE__ */j(q,{label:"Pomodoro",value:s.focusMinutes,onChange:e=>i("focusMinutes",e),max:120}),
39
- /* @__PURE__ */j(q,{label:"Short Break",value:s.shortBreakMinutes,onChange:e=>i("shortBreakMinutes",e),max:120}),
40
- /* @__PURE__ */j(q,{label:"Long Break",value:s.longBreakMinutes,onChange:e=>i("longBreakMinutes",e),max:120})]})]}),
41
- /* @__PURE__ */j(Z,{label:"Auto Start Breaks",children:/* @__PURE__ */j(ae,{checked:s.autoStartBreaks,onChange:e=>i("autoStartBreaks",e)})}),
42
- /* @__PURE__ */j(Z,{label:"Auto Start Pomodoros",children:/* @__PURE__ */j(ae,{checked:s.autoStartPomodoros,onChange:e=>i("autoStartPomodoros",e)})}),
43
- /* @__PURE__ */j(Z,{label:"Long Break interval",children:/* @__PURE__ */j(ee,{value:s.longBreakInterval,onChange:e=>i("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
44
- /* @__PURE__ */M(J,{icon:/* @__PURE__ */j(re,{}),label:"TASK",children:[
45
- /* @__PURE__ */j(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__ */j(ae,{checked:s.autoCheckTasks,onChange:e=>i("autoCheckTasks",e)})}),
46
- /* @__PURE__ */j(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__ */j(ae,{checked:s.checkToBottom,onChange:e=>i("checkToBottom",e)})})]}),
47
- /* @__PURE__ */M(J,{icon:/* @__PURE__ */j(se,{}),label:"SOUND",children:[
48
- /* @__PURE__ */j(Z,{label:"Alarm Sound",children:/* @__PURE__ */M("div",{className:"flex items-center gap-2",children:[
49
- /* @__PURE__ */j(te,{value:s.alarmSound,onChange:e=>i("alarmSound",e),options:g.map(e=>({id:e.id,label:e.label}))}),"off"!==s.alarmSound&&/* @__PURE__ */j("button",{type:"button",onClick:()=>p(s.alarmSound,{volume:s.alarmVolume,repeat:1}),className:"px-2 py-1 text-2xs rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
50
- /* @__PURE__ */j(Y,{value:s.alarmVolume,onChange:e=>i("alarmVolume",e)}),
51
- /* @__PURE__ */j(Z,{label:"repeat",children:/* @__PURE__ */j(ee,{value:s.alarmRepeat,onChange:e=>i("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
52
- /* @__PURE__ */j(Z,{label:"Focus Sound",children:/* @__PURE__ */M("div",{className:"flex items-center gap-2",children:[
53
- /* @__PURE__ */j(te,{value:s.focusSound,onChange:e=>i("focusSound",e),options:f}),"none"!==s.focusSound&&/* @__PURE__ */j("button",{type:"button",onClick:()=>b(s.focusSound,s.focusVolume),className:"px-2 py-1 text-2xs rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
54
- /* @__PURE__ */j(Y,{value:s.focusVolume,onChange:e=>i("focusVolume",e)})]})]})}function J({icon:e,label:t,children:a}){/* @__PURE__ */
55
- return M("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
56
- /* @__PURE__ */M("div",{className:"flex items-center gap-2 mb-3 text-gray-400",children:[e,
57
- /* @__PURE__ */j("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
58
- /* @__PURE__ */j("div",{className:"space-y-3",children:a})]})}function Z({label:e,info:t,children:a}){/* @__PURE__ */
59
- return M("div",{className:"flex items-center justify-between gap-3",children:[
60
- /* @__PURE__ */M("div",{className:"flex items-center gap-2 min-w-0",children:[
61
- /* @__PURE__ */j("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */j(oe,{title:t})]}),
62
- /* @__PURE__ */j("div",{className:"shrink-0",children:a})]})}function Y({value:e,onChange:t}){/* @__PURE__ */
63
- return M("div",{className:"flex items-center justify-end gap-3",children:[
64
- /* @__PURE__ */j("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
65
- /* @__PURE__ */j("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:n=99}){/* @__PURE__ */
66
- return M("label",{className:"flex flex-col",children:[
67
- /* @__PURE__ */j("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
68
- /* @__PURE__ */j(ee,{value:t,onChange:a,min:o,max:n})]})}function ee({value:e,onChange:t,min:a=1,max:o=99,className:n=""}){/* @__PURE__ */
69
- return j("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 h-8 text-sm font-medium text-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${n}`})}function te({value:e,onChange:t,options:a}){/* @__PURE__ */
70
- return M("div",{className:"relative",children:[
71
- /* @__PURE__ */j("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-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:a.map(e=>/* @__PURE__ */j("option",{value:e.id,children:e.label},e.id))}),
72
- /* @__PURE__ */j(v,{name:"chevron-down",className:"absolute right-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400 pointer-events-none",strokeWidth:2.5})]})}function ae({checked:e,onChange:t}){/* @__PURE__ */
73
- return j("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__ */j("span",{className:"absolute h-5 w-5 rounded-full bg-white shadow transition-transform "+(e?"translate-x-[22px]":"translate-x-0.5")})})}function oe({title:e}){/* @__PURE__ */
74
- return j("span",{title:e,className:"inline-flex items-center justify-center w-4 h-4 rounded-full bg-gray-300 text-white text-3xs font-bold cursor-help",children:"i"})}function ne(){/* @__PURE__ */
75
- return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
76
- /* @__PURE__ */j("circle",{cx:"12",cy:"12",r:"9"}),
77
- /* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7v5l3 2"})]})}function re(){/* @__PURE__ */
78
- return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
79
- /* @__PURE__ */j("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),
80
- /* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4"})]})}function se(){/* @__PURE__ */
81
- return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
82
- /* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5L6 9H2v6h4l5 4V5z"}),
83
- /* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 8.5a5 5 0 010 7M19 5a9 9 0 010 14"})]})}function le({onSubmit:e,onCancel:t,accentColor:a}){const[o,n]=w(""),[r,s]=w(1),l=()=>e(o,r);/* @__PURE__ */
84
- return M("div",{className:"bg-white text-gray-800 rounded-md p-3 shadow-(--elevation-panel)",children:[
85
- /* @__PURE__ */j("input",{autoFocus:!0,value:o,onChange:e=>n(e.target.value),placeholder:"What are you working on?",onKeyDown:e=>{"Enter"===e.key&&l(),"Escape"===e.key&&t()},className:"w-full text-base font-medium bg-transparent border-0 outline-none placeholder-gray-400"}),
86
- /* @__PURE__ */M("div",{className:"flex items-center justify-between mt-2",children:[
87
- /* @__PURE__ */j("span",{className:"text-xs font-semibold text-gray-500",children:"Est Pomodoros"}),
88
- /* @__PURE__ */j("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
- /* @__PURE__ */M("div",{className:"flex gap-2 mt-3 justify-end",children:[
90
- /* @__PURE__ */j("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
91
- /* @__PURE__ */j("button",{onClick:l,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:a},children:"Save"})]})]})}export{z as default};
@@ -1,44 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,toggleOpenSection as n,writeStored as i}from"./chunk-S2PS4IOT.js";import{partitionNav as l,BrandMark as s,openGlobalSearch as o,visibleNavChildren as c,visibleSectionItems as d,rowsContainRoute as m}from"./chunk-BQ7GR7H6.js";import{navSections as h,startMenuCategories as u,TAB_STRIP_H as p,navIcons as b,sectionIcons as g}from"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import{PopupMenu as f,PopupMenuItem as y,PopupMenuDivider as x}from"./chunk-ICN533ML.js";import"./chunk-UVBK6YSR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import{useShellStrings as v}from"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import{Icon as N}from"./chunk-ZGUQLVY4.js";import{useMemo as k,useState as w,useRef as C,useEffect as j,isValidElement as S,cloneElement as L}from"react";import{jsx as z,jsxs as A}from"react/jsx-runtime";var $="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),I=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),W="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function R({open:e}){/* @__PURE__ */
2
- return z(N,{name:"chevron-down",className:"size-4 shrink-0 text-gray-400 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function B({dir:e}){/* @__PURE__ */
3
- return z(N,"left"===e?{name:"chevron-double-left",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}function M({className:e}){/* @__PURE__ */
4
- return z(N,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}function T({width:T,collapsed:H,onToggleCollapsed:K,onOpen:Q,activeRoute:D,profile:O,user:_,onLogout:P,onSwitchToDesktop:G,onReportBug:J,navSections:U=h,navIcons:V=b,sectionIcons:X=g,categories:Y=u,productName:E,productIcon:F,tagline:Z,adaptiveLogo:q=!1,logoHasAlpha:ee=null,logoIsLight:te=null}){const ae=v().layout,{hasAnyPerm:re}=e(),ne=k(()=>l(U,Y,re),[U,Y,re]),[ie,le]=w(()=>t(a(r))),se=e=>le(t=>{const a=n(t,e);return i(r,JSON.stringify([...a])),a}),[oe,ce]=w(null),[de,me]=w(!1),he=C(null);j(()=>{H||ce(null)},[H]);const ue=(e,t)=>{ce(null),e.onSelect?e.onSelect():Q(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},pe=(e,t)=>{const a=t[e];/* @__PURE__ */
5
- return z("span",{className:W,"aria-hidden":"true",children:a&&S(a)?L(a,{className:"size-[18px]"}):a})},be=(e,t)=>{const a=c(e,re),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=ie.has(n),l=!i&&m(a,D,re);/* @__PURE__ */
6
- return A("div",{children:[
7
- /* @__PURE__ */A("button",{type:"button",onClick:()=>se(n),"aria-expanded":i,className:I(l,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&pe(e.to,V),
8
- /* @__PURE__ */z("span",{className:"min-w-0 flex-1 truncate",children:r}),
9
- /* @__PURE__ */z(R,{open:i})]}),i&&/* @__PURE__ */z("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>be(e,t+1))}),e.dividerAfter&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}const n=e.to===D;/* @__PURE__ */
10
- return A("div",{children:[
11
- /* @__PURE__ */A("button",{type:"button",onClick:t=>ue(e,t),onAuxClick:t=>{1===t.button&&ue(e,t)},"aria-current":n?"page":void 0,className:I(n,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&pe(e.to,V),
12
- /* @__PURE__ */z("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)},ge=(e,t)=>{const a=t?e.items:d(e,re);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */z("span",{className:W,"aria-hidden":"true",children:e.icon}):pe(e.label,X),n=e.menuLabel??e.label,i=m(a,D,re),l="dividerAfter"in e&&e.dividerAfter;if(H)/* @__PURE__ */
13
- return A("div",{children:[
14
- /* @__PURE__ */z("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":oe?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();ce(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:I(i||oe?.label===e.label,!0),children:r}),l&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const s=ie.has(e.label),o=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
- return A("div",{children:[
16
- /* @__PURE__ */A("button",{type:"button",onClick:()=>se(e.label),"aria-expanded":s,"aria-controls":o,className:I(!s&&i,!1),children:[r,
17
- /* @__PURE__ */z("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
- /* @__PURE__ */z(R,{open:s})]}),
19
- /* @__PURE__ */z("div",{id:o,role:"group","aria-label":n,hidden:!s,className:"space-y-0.5 pt-0.5",children:s&&a.map(e=>be(e,1))}),l&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},fe=O?.first_name?`${O.first_name} ${O.last_name||""}`.trim():_?.email||"",ye=(O?.first_name?.charAt(0)||_?.email?.charAt(0)||"?").toUpperCase(),xe=O?.avatar_url?/* @__PURE__ */z("img",{src:O.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */z("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:ye}),ve=de?he.current?.getBoundingClientRect():void 0,Ne="px-3",ke=ne.erpSections.length>0||ne.systemSections.length>0||ne.virtualSections.length>0;/* @__PURE__ */
20
- return A("aside",{"aria-label":ae.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:T},children:[
21
- /* @__PURE__ */A("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(H?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:p},children:[
22
- /* @__PURE__ */A("span",{className:"flex min-w-0 items-center gap-2",children:[F&&/* @__PURE__ */z(s,{src:F,alt:"",slot:"compact",surface:"light",adaptive:q,hasAlpha:ee,isLight:te,size:28,decorative:!0}),!H&&/* @__PURE__ */A("span",{className:"min-w-0 leading-tight",children:[
23
- /* @__PURE__ */z("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:E??"Apps"}),Z&&/* @__PURE__ */z("span",{className:"block truncate text-2xs font-medium text-gray-500",children:Z})]})]}),!H&&/* @__PURE__ */z("button",{type:"button",onClick:K,"aria-label":ae.collapseSidebar,title:`${ae.collapseSidebar} (${$?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */z(B,{dir:"left"})})]}),
24
- /* @__PURE__ */z("div",{className:`shrink-0 pt-3 ${Ne}`,children:H?/* @__PURE__ */z("button",{type:"button",onClick:o,"aria-label":ae.search,title:`${ae.search} (${$?"⌘K":"Ctrl K"})`,className:I(!1,!0),children:/* @__PURE__ */z(M,{className:"size-[18px]"})}):/* @__PURE__ */A("button",{type:"button",onClick:o,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
25
- /* @__PURE__ */z(M,{className:"size-3.5 text-gray-500"}),
26
- /* @__PURE__ */z("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ae.search}),
27
- /* @__PURE__ */z("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:$?"⌘K":"Ctrl K"})]})}),
28
- /* @__PURE__ */A("nav",{"aria-label":ae.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Ne} ${H?"space-y-1":"space-y-0.5"}`,children:[H&&/* @__PURE__ */z("button",{type:"button",onClick:K,"aria-label":ae.expandSidebar,title:`${ae.expandSidebar} (${$?"⌘":"Ctrl"} .)`,className:`${I(!1,!0)} mb-3`,children:/* @__PURE__ */z(B,{dir:"right"})}),ne.topItems.map(e=>{if(!H)return be(e,0);const t=c(e,re),a=e.to===D||m(t,D,re),r=e.menuLabel??e.label;/* @__PURE__ */
29
- return A("div",{children:[
30
- /* @__PURE__ */z("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void ue(e,a);const r=a.currentTarget.getBoundingClientRect();ce(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:I(a,!0),children:pe(e.to,V)}),e.dividerAfter&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ne.topItems.length>0&&ke&&!ne.topItems[ne.topItems.length-1].dividerAfter&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ne.erpSections.map(e=>ge(e,!1)),ne.systemSections.map(e=>ge(e,!1)),ne.virtualSections.map(e=>ge(e,!0)),ne.footerSections.length>0&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ne.footerSections.map(e=>ge(e,!1))]}),
31
- /* @__PURE__ */z("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Ne}`,children:/* @__PURE__ */A("button",{ref:he,type:"button",onClick:()=>me(e=>!e),"aria-haspopup":"menu","aria-expanded":de,"aria-label":H?ae.accountMenu(fe):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(H?"justify-center py-2":"px-2 py-2"),children:[xe,!H&&/* @__PURE__ */A("span",{className:"min-w-0 flex-1 text-left",children:[
32
- /* @__PURE__ */z("span",{className:"block truncate text-sm font-semibold text-gray-800",children:fe}),_?.email&&fe!==_.email&&/* @__PURE__ */z("span",{className:"block truncate text-2xs text-gray-500",children:_.email})]})]})}),de&&ve&&/* @__PURE__ */A(f,{portal:!0,minWidth:224,onClose:()=>me(!1),style:{left:ve.left,bottom:window.innerHeight-ve.top+8},children:[H&&/* @__PURE__ */A("div",{className:"border-b border-gray-200 px-3 py-3",children:[
33
- /* @__PURE__ */z("p",{className:"truncate text-sm font-semibold text-gray-800",children:fe}),_?.email&&/* @__PURE__ */z("p",{className:"truncate text-xs text-gray-500",children:_.email})]}),
34
- /* @__PURE__ */A(y,{onClick:()=>{me(!1),Q("/profile",!1)},children:[
35
- /* @__PURE__ */z(N,{name:"account",className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ae.profile]}),ne.footerItems.map(e=>/* @__PURE__ */A(y,{onClick:()=>{me(!1),ue(e)},children:[
36
- /* @__PURE__ */z("span",{className:"h-4 w-4 text-gray-400 [&>svg]:size-4","aria-hidden":"true",children:V[e.to]}),e.menuLabel??e.label]},e.to)),J&&/* @__PURE__ */A(y,{onClick:()=>{me(!1),J()},children:[
37
- /* @__PURE__ */z(N,{name:"error",className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ae.reportIssue]}),
38
- /* @__PURE__ */z(x,{}),
39
- /* @__PURE__ */A(y,{onClick:()=>{me(!1),G()},children:[
40
- /* @__PURE__ */z(N,{name:"desktop",className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ae.switchToDesktop]}),
41
- /* @__PURE__ */z(x,{}),
42
- /* @__PURE__ */A(y,{danger:!0,onClick:()=>{me(!1),P()},children:[
43
- /* @__PURE__ */z(N,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ae.signOut]})]}),oe&&H&&/* @__PURE__ */z(f,{portal:!0,minWidth:220,onClose:()=>ce(null),style:{left:T+6,top:Math.min(oe.top,window.innerHeight-48*Math.min(oe.items.length,10)-16)},children:oe.items.flatMap(e=>{const t=c(e,re);return(t.length>0?t:[e]).map(e=>/* @__PURE__ */A(y,{onClick:()=>ue(e),children:[pe(e.to,V),
44
- /* @__PURE__ */z("span",{className:e.to===D?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))})})]})}export{T as default};
@@ -1 +0,0 @@
1
- var r="7.11.1",a=r;export{a as APP_VERSION,r as VERSION};