efficient-shell 4.163.0 → 4.164.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 +44 -4
- package/dist/{Browser-2I27OQFE.js → Browser-AZSXQEJ2.js} +14 -14
- package/dist/Calculator-GRNWTZIZ.js +29 -0
- package/dist/ConfirmDialog-LSFNIGKM.js +1 -0
- package/dist/{CurrencyConverter-4EEIPAVX.js → CurrencyConverter-VT2SZDA3.js} +7 -7
- package/dist/{Documents-24YAA5UU.js → Documents-WIYSUFCQ.js} +12 -12
- package/dist/{Files-BU7FY2VD.js → Files-FAO4MFCO.js} +30 -30
- package/dist/{Notepad-3D4L3K5W.js → Notepad-APW5DX37.js} +11 -11
- package/dist/PdfViewer-3NWOBXPP.js +1 -0
- package/dist/{PomodoroTimer-B4OPUTJL.js → PomodoroTimer-4JBDIQZK.js} +27 -27
- package/dist/{Preview-VZSNH76G.js → Preview-FBVFDTPN.js} +24 -24
- package/dist/Sidebar-KRN5ZV3F.js +44 -0
- package/dist/{Spreadsheet-TAJ24BQS.js → Spreadsheet-IQF6QAWU.js} +12 -12
- package/dist/{Stock-VEPDDIMJ.js → Stock-NIM7MAYG.js} +3 -3
- package/dist/{Weather-KGZF4DDW.js → Weather-RLISJWFA.js} +14 -14
- package/dist/{WorldClock-UGADOCFW.js → WorldClock-G4L5OLOT.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-ZAJPQAGP.js → chunk-37QZZRDT.js} +1 -1
- package/dist/{chunk-PH3PRIFP.js → chunk-4UCRT4ST.js} +5 -5
- package/dist/{chunk-GSBX7KIS.js → chunk-6NG4TM3E.js} +16 -16
- package/dist/{chunk-J5HNLMGZ.js → chunk-6ZUAHFK3.js} +11 -11
- package/dist/{chunk-2FZGALCU.js → chunk-DGWWPVEQ.js} +6 -6
- package/dist/chunk-ELSUXC3N.js +1 -0
- package/dist/chunk-HQREOTKI.js +9 -0
- package/dist/{chunk-FWY5IRGL.js → chunk-I3CQI462.js} +2 -2
- package/dist/{chunk-NLASNJNY.js → chunk-IY4CP2HO.js} +1 -1
- package/dist/{chunk-UMOVLVTC.js → chunk-J5E4VMLJ.js} +1 -1
- package/dist/chunk-L2W5XPZ3.js +1 -0
- package/dist/chunk-LZIS72CF.js +9 -0
- package/dist/{chunk-VWTYRICQ.js → chunk-MHGFTCEA.js} +498 -490
- package/dist/{chunk-E4JWTNG5.js → chunk-NNUE7M5G.js} +12 -12
- package/dist/{chunk-4GOHPACN.js → chunk-RKOTKWWU.js} +1 -1
- package/dist/{chunk-TZ2EFTST.js → chunk-SVJN7WWF.js} +8 -8
- package/dist/{chunk-6A7BN7EN.js → chunk-T7DDT2Z6.js} +3 -3
- package/dist/{chunk-TBM3ZIAN.js → chunk-TJ4YXVQQ.js} +97 -97
- package/dist/{chunk-PX435JG4.js → chunk-U7ZDZXOJ.js} +1 -1
- package/dist/{chunk-MAMJHPFN.js → chunk-XY25UBVS.js} +1 -1
- package/dist/{chunk-IJ3V2YOS.js → chunk-YLJ7AZON.js} +9 -9
- package/dist/chunk-YS57MJFM.js +1 -0
- package/dist/{chunk-WURTAA2S.js → chunk-Z43BI2JI.js} +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/{index-JQXMH_km.d.ts → index-CFLEu3eh.d.ts} +135 -12
- package/dist/index.d.ts +11 -4
- package/dist/index.js +99 -99
- package/dist/map/index.js +6 -6
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-2EB2RAT7.js +0 -29
- package/dist/ConfirmDialog-4LZXI6FM.js +0 -1
- package/dist/PdfViewer-5VBKCPCM.js +0 -1
- package/dist/Sidebar-7AY5WJZC.js +0 -44
- package/dist/chunk-A6O4Y63A.js +0 -1
- package/dist/chunk-L7ZMDZAB.js +0 -9
- package/dist/chunk-OSJ3ADF2.js +0 -1
- package/dist/chunk-QRJ2ERKR.js +0 -9
- package/dist/chunk-YJX2IWHB.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{getNumberingConfigs as e}from"./chunk-
|
|
2
|
-
/* @__PURE__ */g("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */m("button",{onClick:()=>{
|
|
1
|
+
import{getNumberingConfigs as e}from"./chunk-XY25UBVS.js";import{SidebarLayout as t}from"./chunk-LZIS72CF.js";import{AboutApp as r}from"./chunk-RKOTKWWU.js";import{toast_default as n}from"./chunk-IY4CP2HO.js";import"./chunk-L2W5XPZ3.js";import{useWindowManager as o,client_default as i}from"./chunk-TJ4YXVQQ.js";import{useShellPrefs as l}from"./chunk-T7DDT2Z6.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import{timeAgo as s}from"./chunk-S2AZZGFF.js";import"./chunk-4UCRT4ST.js";import"./chunk-6KO2U66R.js";import"./chunk-NNUE7M5G.js";import"./chunk-HQREOTKI.js";import"./chunk-ELSUXC3N.js";import"./chunk-MAIHBBWT.js";import"./chunk-YS57MJFM.js";import"./chunk-D65T4H6J.js";import{useRef as c,useEffect as a,useState as d,useCallback as p}from"react";import{useQuery as u}from"@tanstack/react-query";import{jsxs as m,Fragment as h,jsx as g}from"react/jsx-runtime";var x=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var y={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},b=/\[([ xX]?)\]/g;function f(){const{openEntity:f}=o(),{prefs:k,save:v}=l(),{data:N}=u({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),w=c({});a(()=>{if(!N)return;const e={};for(const t of N){const r=y[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}w.current=e},[N]);const T=k.notepad_notes||[],[_,j]=d(null),[C,L]=d(""),[S,$]=d(""),[W,X]=d("yellow"),[M,O]=d(!1),[B,D]=d(!1),I=c(null),U=c(),H=T.find(e=>e.id===_);a(()=>{if(!_&&T.length>0){const e=T[0];j(e.id),L(e.title),$(e.content),X(e.color)}},[T.length]);const q=p(e=>{v({notepad_notes:e})},[v]),E=p(()=>{if(!_||!M)return;const e=T.map(e=>e.id===_?{...e,title:C,content:S,color:W,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);q(e),O(!1)},[_,M,C,S,W,T,q]);a(()=>{if(M)return U.current&&clearTimeout(U.current),U.current=setTimeout(E,800),()=>{U.current&&clearTimeout(U.current)}},[M,E]),a(()=>()=>{M&&E()},[]);const F=e=>{M&&E(),j(e.id),L(e.title),$(e.content),X(e.color),O(!1),D(!1)},K=e=>{const t=S.slice(0,e),r=S.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=S.slice(e+r[0].length);$(t+n+o),O(!0)},P=async(e,t)=>{const r=w.current[e];if(!r)return;const o=`${e}#${t}`;try{const{data:e}=await i.get(r.endpoint,{params:{search:o,page_size:1}}),t=(e?.results??e??[])[0];t?f(r.entityType,t.id,t,o):n.error(`${o} not found`)}catch{n.error(`Failed to look up ${o}`)}},R="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",V=/* @__PURE__ */m(h,{children:[
|
|
2
|
+
/* @__PURE__ */g("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */m("button",{onClick:()=>{M&&E();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!1,updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...T];q(t),j(e.id),L(""),$(""),X("yellow"),O(!1),D(!0),setTimeout(()=>I.current?.focus(),50)},className:"w-full flex items-center justify-center gap-1.5 rounded-lg bg-blue-600 text-white px-3 py-1.5 text-sm font-medium hover:bg-blue-700 transition-colors",children:[
|
|
3
3
|
/* @__PURE__ */g("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),"New Note"]})}),
|
|
4
|
-
/* @__PURE__ */g("div",{className:"flex-1 overflow-y-auto",children:0===
|
|
5
|
-
return m("button",{onClick:()=>
|
|
4
|
+
/* @__PURE__ */g("div",{className:"flex-1 overflow-y-auto",children:0===T.length?/* @__PURE__ */g("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):T.map(e=>{const t=(r=e.color,x.find(e=>e.key===r)||x[0]);var r;/* @__PURE__ */
|
|
5
|
+
return m("button",{onClick:()=>F(e),className:"w-full text-left px-3 py-2.5 border-b border-gray-100 transition-colors "+(_===e.id?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
6
6
|
/* @__PURE__ */m("div",{className:"flex items-center gap-2",children:[
|
|
7
7
|
/* @__PURE__ */g("div",{className:`w-2.5 h-2.5 rounded-full shrink-0 ${t.dot}`}),
|
|
8
8
|
/* @__PURE__ */g("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"}),e.sticky&&/* @__PURE__ */g("svg",{className:"h-3 w-3 text-amber-500 shrink-0",fill:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */g("path",{d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})]}),
|
|
@@ -10,16 +10,16 @@ return m("button",{onClick:()=>J(e),className:"w-full text-left px-3 py-2.5 bord
|
|
|
10
10
|
/* @__PURE__ */g("p",{className:"text-[10px] text-gray-300 mt-0.5 ml-4.5",children:s(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
|
|
11
11
|
return m("div",{className:"h-full",children:[
|
|
12
12
|
/* @__PURE__ */g(r,{app:"notepad"}),
|
|
13
|
-
/* @__PURE__ */g(t,{sidebar:
|
|
13
|
+
/* @__PURE__ */g(t,{sidebar:V,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:_?/* @__PURE__ */m("div",{className:"flex-1 flex flex-col min-w-0",children:[
|
|
14
14
|
/* @__PURE__ */m("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
|
|
15
|
-
/* @__PURE__ */g("input",{value:C,onChange:e=>{L(e.target.value),
|
|
16
|
-
/* @__PURE__ */g("div",{className:"flex gap-1",children:x.map(e=>/* @__PURE__ */g("button",{onClick:()=>{
|
|
17
|
-
/* @__PURE__ */g("button",{onClick:()=>(e=>{const t=
|
|
18
|
-
/* @__PURE__ */g("button",{onClick:()=>(e=>{const t=
|
|
19
|
-
return g("div",{className:a?"line-through text-gray-400":"",children:n},r)})})(
|
|
15
|
+
/* @__PURE__ */g("input",{value:C,onChange:e=>{L(e.target.value),O(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
|
|
16
|
+
/* @__PURE__ */g("div",{className:"flex gap-1",children:x.map(e=>/* @__PURE__ */g("button",{onClick:()=>{X(e.key),O(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${W===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
|
|
17
|
+
/* @__PURE__ */g("button",{onClick:()=>(e=>{const t=T.map(t=>t.id===e?{...t,sticky:!t.sticky}:t);q(t);const r=t.find(t=>t.id===e);n.success(r?.sticky?"Pinned to desktop":"Removed from desktop")})(_),title:H?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(H?.sticky?"text-amber-500 hover:text-amber-600":"text-gray-300 hover:text-amber-400"),children:/* @__PURE__ */g("svg",{className:"h-4 w-4",fill:H?.sticky?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})}),
|
|
18
|
+
/* @__PURE__ */g("button",{onClick:()=>(e=>{const t=T.filter(t=>t.id!==e);if(q(t),_===e){const e=t[0];e?F(e):(j(null),L(""),$(""))}})(_),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */g("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})})})]}),B?/* @__PURE__ */g("textarea",{ref:I,value:S,onChange:e=>{$(e.target.value),O(!0)},onBlur:()=>{D(!1),M&&E()},placeholder:R,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */g("div",{onClick:()=>{D(!0),setTimeout(()=>I.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:S?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],l=/([A-Z]{2,4})#(\d{4,6})/g;let s;for(;null!==(s=l.exec(e));){const e=s[1],t=s[2];if(w.current[e]){const n=s.index,o=s[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */g("button",{onClick:()=>P(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}b.lastIndex=0;let c=0;for(let e=0;e<r;e++)c+=t[e].length+1;for(;null!==(s=b.exec(e));){const e="x"===s[1]||"X"===s[1],t=s.index,n=c+t;i.push({idx:t,len:s[0].length,render:()=>/* @__PURE__ */g("button",{onClick:()=>K(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */g("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */g("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */g("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */g("span",{children:""},`empty-${r}`));const a=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
|
|
19
|
+
return g("div",{className:a?"line-through text-gray-400":"",children:n},r)})})(S):/* @__PURE__ */g("p",{className:"text-gray-300 whitespace-pre-line",children:R})}),
|
|
20
20
|
/* @__PURE__ */m("div",{className:"px-4 py-1.5 border-t border-gray-100 flex items-center gap-4 text-[10px] text-gray-400",children:[
|
|
21
21
|
/* @__PURE__ */g("span",{children:"[] checkbox"}),
|
|
22
22
|
/* @__PURE__ */g("span",{children:"SO#35001 entity link"}),
|
|
23
|
-
/* @__PURE__ */g("span",{className:"ml-auto",children:
|
|
23
|
+
/* @__PURE__ */g("span",{className:"ml-auto",children:B?"Editing":"Click to edit"})]})]}):/* @__PURE__ */g("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */m("div",{className:"text-center text-gray-400",children:[
|
|
24
24
|
/* @__PURE__ */g("svg",{className:"h-12 w-12 mx-auto mb-3 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),
|
|
25
25
|
/* @__PURE__ */g("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-6ZUAHFK3.js";import"./chunk-IY4CP2HO.js";import"./chunk-YS57MJFM.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-
|
|
1
|
+
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-U7ZDZXOJ.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-I3CQI462.js";import"./chunk-IY4CP2HO.js";import{useWidgetSettings as x}from"./chunk-TJ4YXVQQ.js";import{useShellPrefs as k}from"./chunk-T7DDT2Z6.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-4UCRT4ST.js";import"./chunk-6KO2U66R.js";import"./chunk-NNUE7M5G.js";import"./chunk-HQREOTKI.js";import"./chunk-ELSUXC3N.js";import"./chunk-MAIHBBWT.js";import"./chunk-YS57MJFM.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",I="pomodoro_active_task_id",P={focus:"Pomodoro",short:"Short Break",long:"Long Break"},A={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var L=25,$=5,D=15,V=!1,_=!1,R=4,E=!0,O=!0,W="bell",F=100,U=1,z="none",H=50,J=(e,t,a,o)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(a,Math.round(e))):o;function Q(){const t=v(a,o,o),{prefs:p,save:b}=k(),Q=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:J(t.focusMinutes,1,120,L),shortBreakMinutes:J(t.shortBreakMinutes,1,120,$),longBreakMinutes:J(t.longBreakMinutes,1,120,D),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:V,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:_,longBreakInterval:J(t.longBreakInterval,1,20,R),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:E,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:O,alarmSound:g.some(e=>e.id===t.alarmSound)?t.alarmSound:W,alarmVolume:J(t.alarmVolume,0,100,F),alarmRepeat:J(t.alarmRepeat,1,5,U),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:z,focusVolume:J(t.focusVolume,0,100,H)}}(p.pomodoro_settings);y(()=>{r({focus:60*Q.focusMinutes,short:60*Q.shortBreakMinutes,long:60*Q.longBreakMinutes})},[Q.focusMinutes,Q.shortBreakMinutes,Q.longBreakMinutes]),y(()=>{n(Q.alarmSound),l(Q.alarmVolume,Q.alarmRepeat)},[Q.alarmSound,Q.alarmVolume,Q.alarmRepeat]),y(()=>{s({autoStartBreaks:Q.autoStartBreaks,autoStartPomodoros:Q.autoStartPomodoros,longBreakInterval:Q.longBreakInterval})},[Q.autoStartBreaks,Q.autoStartPomodoros,Q.longBreakInterval]),y(()=>{i(Q.focusSound,Q.focusVolume)},[Q.focusSound,Q.focusVolume]),y(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const K=c(),Y=K.tasks,Z=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(()=>Y.filter(e=>!!e.dueDate&&(e.dueDate===Z||e.dueDate<Z&&!e.done)),[Y,Z]),Q.checkToBottom),[G,ee]=w(()=>localStorage.getItem(I)),[te,ae]=w(!1),[oe,re]=w(null),ne=C(!1);y(()=>{ne.current||(ne.current=!0,d(Y,K.setAllTasks))},[]),y(()=>{try{G?localStorage.setItem(I,G):localStorage.removeItem(I)}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=Y.find(e=>e.id===G);if(e){const t=(e.completed??0)+1,a=e.estimated??0,o=Q.autoCheckTasks&&a>0&&t>=a;K.updateTask(G,{completed:t,done:e.done||o})}}se.current=t.streak},[t.streak,G,Q.autoCheckTasks,Y,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*Q.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?Y.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(Q);x(S(()=>{we({...xe}),Se({...Q}),ye(!0)},[xe,Q]));const Be="focus"!==t.mode,Me=A[t.mode],Te=Be?(je=Me,Ie=xe.activeOpacity/100,`rgba(${parseInt(je.slice(1,3),16)}, ${parseInt(je.slice(3,5),16)}, ${parseInt(je.slice(5,7),16)}, ${Ie})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${xe.activeOpacity/100})`;var je,Ie;const Pe={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
|
-
/* @__PURE__ */B("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${
|
|
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?
|
|
3
|
+
/* @__PURE__ */B("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${Pe.primary}`,style:{backgroundColor:Te,backdropFilter:xe.activeBlur>0?`blur(${xe.activeBlur}px)`:void 0},children:[
|
|
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?Pe.tabActive:Pe.tabInactive}`,children:P[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
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
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 ${
|
|
9
|
-
/* @__PURE__ */T("div",{className:`text-[15px] font-medium leading-tight truncate mt-0.5 ${
|
|
8
|
+
/* @__PURE__ */B("div",{className:`text-xs leading-tight ${Pe.muted}`,children:["#",(pe.completed??0)+1]}),
|
|
9
|
+
/* @__PURE__ */T("div",{className:`text-[15px] font-medium leading-tight truncate mt-0.5 ${Pe.primary}`,children:pe.name})]}):/* @__PURE__ */T("div",{className:`text-xs italic ${Pe.muted}`,children:"No task selected"})}),
|
|
10
10
|
/* @__PURE__ */B("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
|
|
11
|
-
/* @__PURE__ */T("h3",{className:`text-base font-bold tracking-tight ${
|
|
12
|
-
/* @__PURE__ */T("button",{className:`rounded p-1 transition-colors ${
|
|
11
|
+
/* @__PURE__ */T("h3",{className:`text-base font-bold tracking-tight ${Pe.primary}`,children:"Tasks"}),
|
|
12
|
+
/* @__PURE__ */T("button",{className:`rounded p-1 transition-colors ${Pe.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */B("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:[
|
|
13
13
|
/* @__PURE__ */T("circle",{cx:"12",cy:"5",r:"1.4"}),
|
|
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
|
-
/* @__PURE__ */T("div",{className:`border-t mx-3 mt-2 ${
|
|
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===
|
|
16
|
+
/* @__PURE__ */T("div",{className:`border-t mx-3 mt-2 ${Pe.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__ */
|
|
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,
|
|
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: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,20 +26,20 @@ 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,
|
|
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:Z});G||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 ${Pe.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"]})]}),
|
|
33
|
-
/* @__PURE__ */B("div",{className:`border-t px-3 py-2.5 flex items-center justify-center gap-5 text-sm ${
|
|
34
|
-
/* @__PURE__ */B("span",{className:
|
|
35
|
-
/* @__PURE__ */T("span",{className:`font-bold ${
|
|
36
|
-
/* @__PURE__ */T("span",{className:
|
|
37
|
-
/* @__PURE__ */T("span",{className:`font-bold ${
|
|
38
|
-
/* @__PURE__ */T("span",{className:`font-bold ${
|
|
39
|
-
/* @__PURE__ */B("span",{className:
|
|
40
|
-
/* @__PURE__ */T(
|
|
33
|
+
/* @__PURE__ */B("div",{className:`border-t px-3 py-2.5 flex items-center justify-center gap-5 text-sm ${Pe.softDivider}`,children:[
|
|
34
|
+
/* @__PURE__ */B("span",{className:Pe.secondary,children:["Pomos: ",
|
|
35
|
+
/* @__PURE__ */T("span",{className:`font-bold ${Pe.primary}`,children:ie}),
|
|
36
|
+
/* @__PURE__ */T("span",{className:Pe.muted,children:" / "}),
|
|
37
|
+
/* @__PURE__ */T("span",{className:`font-bold ${Pe.primary}`,children:ce})]}),me>0&&/* @__PURE__ */B("span",{className:Pe.secondary,children:["Finish At: ",
|
|
38
|
+
/* @__PURE__ */T("span",{className:`font-bold ${Pe.primary}`,children:he}),
|
|
39
|
+
/* @__PURE__ */B("span",{className:Pe.muted,children:[" (",ge,"h)"]})]})]})]}),
|
|
40
|
+
/* @__PURE__ */T(X,{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 X({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(
|
|
42
|
+
/* @__PURE__ */B(K,{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:[
|
|
@@ -48,18 +48,18 @@ return B(t,{open:e,onClose:a,title:"Pomodoro Settings",appearance:r,onAppearance
|
|
|
48
48
|
/* @__PURE__ */T(q,{label:"Long Break",value:l.longBreakMinutes,onChange:e=>i("longBreakMinutes",e),max:120})]})]}),
|
|
49
49
|
/* @__PURE__ */T(Y,{label:"Auto Start Breaks",children:/* @__PURE__ */T(te,{checked:l.autoStartBreaks,onChange:e=>i("autoStartBreaks",e)})}),
|
|
50
50
|
/* @__PURE__ */T(Y,{label:"Auto Start Pomodoros",children:/* @__PURE__ */T(te,{checked:l.autoStartPomodoros,onChange:e=>i("autoStartPomodoros",e)})}),
|
|
51
|
-
/* @__PURE__ */T(Y,{label:"Long Break interval",children:/* @__PURE__ */T(
|
|
52
|
-
/* @__PURE__ */B(
|
|
51
|
+
/* @__PURE__ */T(Y,{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
53
|
/* @__PURE__ */T(Y,{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
54
|
/* @__PURE__ */T(Y,{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(
|
|
55
|
+
/* @__PURE__ */B(K,{icon:/* @__PURE__ */T(ne,{}),label:"SOUND",children:[
|
|
56
56
|
/* @__PURE__ */T(Y,{label:"Alarm Sound",children:/* @__PURE__ */B("div",{className:"flex items-center gap-2",children:[
|
|
57
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"})]})}),
|
|
58
58
|
/* @__PURE__ */T(Z,{value:l.alarmVolume,onChange:e=>i("alarmVolume",e)}),
|
|
59
|
-
/* @__PURE__ */T(Y,{label:"repeat",children:/* @__PURE__ */T(
|
|
59
|
+
/* @__PURE__ */T(Y,{label:"repeat",children:/* @__PURE__ */T(G,{value:l.alarmRepeat,onChange:e=>i("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
|
|
60
60
|
/* @__PURE__ */T(Y,{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(Z,{value:l.focusVolume,onChange:e=>i("focusVolume",e)})]})]})}function
|
|
62
|
+
/* @__PURE__ */T(Z,{value:l.focusVolume,onChange:e=>i("focusVolume",e)})]})]})}function K({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})]}),
|
|
@@ -73,7 +73,7 @@ return B("div",{className:"flex items-center justify-end gap-3",children:[
|
|
|
73
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(
|
|
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__ */
|
|
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{
|
|
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{Q as default};
|