efficient-shell 4.155.1 → 4.155.3
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 +1 -1
- package/dist/{Browser-HNSQP7PK.js → Browser-TIDINTH6.js} +13 -13
- package/dist/{Calculator-PWWTNCT7.js → Calculator-5DF4PSEG.js} +23 -23
- package/dist/ConfirmDialog-7Q2OOU4W.js +1 -0
- package/dist/{CurrencyConverter-OH4WAA74.js → CurrencyConverter-BEI6UUDD.js} +5 -5
- package/dist/{Documents-HG6NJCIB.js → Documents-RAMFBU5W.js} +3 -3
- package/dist/{Files-22E36TVC.js → Files-MNQESP7F.js} +30 -30
- package/dist/{Notepad-YHSWKS4C.js → Notepad-4NPCRBGL.js} +11 -11
- package/dist/PdfViewer-VIT7Y55M.js +1 -0
- package/dist/{PomodoroTimer-BXJZKA4W.js → PomodoroTimer-3BDFGHC6.js} +26 -26
- package/dist/{Preview-6X5QAHHR.js → Preview-B4YSLMYC.js} +16 -16
- package/dist/{Sidebar-44I3DD2U.js → Sidebar-H6R3AK5G.js} +24 -24
- package/dist/{Spreadsheet-K6QSHFVS.js → Spreadsheet-MGNBOJBM.js} +11 -11
- package/dist/{Stock-HGSIZXAT.js → Stock-PEZB3WXV.js} +3 -3
- package/dist/{Weather-3VS65TQO.js → Weather-6EJFJQIX.js} +19 -19
- package/dist/{WorldClock-NI5OTEBV.js → WorldClock-5BMGEL2A.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-NSXQF4YC.js → chunk-26RS37FG.js} +1 -1
- package/dist/{chunk-RGFEKAPC.js → chunk-36QR65KW.js} +2 -2
- package/dist/{chunk-VGTI3BJ4.js → chunk-B2TBCVHH.js} +1 -1
- package/dist/{chunk-AC54EYVA.js → chunk-DRN636EP.js} +1 -1
- package/dist/{chunk-O35K6ZWH.js → chunk-ELCH5NDO.js} +3 -3
- package/dist/{chunk-V73HRX73.js → chunk-F23LRPOG.js} +484 -487
- package/dist/{chunk-4DT7B7GZ.js → chunk-FHIF6IUV.js} +1 -1
- package/dist/{chunk-ZVAQKPRB.js → chunk-HF4IZFFX.js} +11 -11
- package/dist/{chunk-MXLPLKRG.js → chunk-KASHUEJV.js} +4 -4
- package/dist/{chunk-JHXGBYJO.js → chunk-LGDG4YMF.js} +6 -6
- package/dist/chunk-LVTPUYJO.js +1 -0
- package/dist/{chunk-ZYUWLZUG.js → chunk-PDTZTADH.js} +15 -15
- package/dist/{chunk-ZTXFXS6V.js → chunk-T6MKFQRH.js} +6 -6
- package/dist/{chunk-TULPGC2I.js → chunk-UPI2GKKD.js} +9 -9
- package/dist/chunk-VVI77XNV.js +1 -0
- package/dist/{chunk-DRRIYS3R.js → chunk-XC64WV33.js} +60 -60
- package/dist/{chunk-ZP2V72LB.js → chunk-XN76YBX3.js} +8 -8
- package/dist/{chunk-C47EJ4MB.js → chunk-YW2RNWY4.js} +1 -1
- package/dist/{chunk-JLSOLX5J.js → chunk-ZJ66QFOH.js} +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/{index-ak9Cps7c.d.ts → index-C-inEe7F.d.ts} +5 -43
- package/dist/index.d.ts +2 -2
- package/dist/index.js +645 -645
- package/dist/map/index.js +1 -1
- 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/ConfirmDialog-UVIZK7EY.js +0 -1
- package/dist/PdfViewer-W65LHKXZ.js +0 -1
- package/dist/chunk-FEWQDVQJ.js +0 -1
- package/dist/chunk-YIXQGB75.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-VVI77XNV.js";import{Fragment as i}from"react";import{jsx as t,jsxs as a}from"react/jsx-runtime";var n=/* @__PURE__ */t("svg",{className:"h-3.5 w-3.5 shrink-0 text-gray-300",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":!0,children:/* @__PURE__ */t("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 0 1 .02-1.06L11.168 10 7.23 6.29a.75.75 0 1 1 1.04-1.08l4.5 4.25a.75.75 0 0 1 0 1.08l-4.5 4.25a.75.75 0 0 1-1.06-.02Z",clipRule:"evenodd"})}),l="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function s({items:s,separator:r,maxItems:c=0,className:m}){const o=e().breadcrumbs;if(0===s.length)return null;const h=r??n,d=[],u=s.length-1;if(c>0&&s.length>c&&c>=2){const e=Math.max(1,c-1);d.push({kind:"item",item:s[0],isLast:!1}),d.push({kind:"ellipsis"});for(let i=s.length-e;i<=u;i++)d.push({kind:"item",item:s[i],isLast:i===u})}else s.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
2
|
return t("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */t("ol",{className:"flex items-center gap-1.5 text-sm",children:d.map((e,n)=>/* @__PURE__ */a(i,{children:[n>0&&/* @__PURE__ */t("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
3
|
/* @__PURE__ */t("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */t("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
4
|
/* @__PURE__ */t("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:l,children:[e.item.icon,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{toast_default as t}from"./chunk-
|
|
2
|
-
return(new Date).toISOString()}var
|
|
1
|
+
import{toast_default as t}from"./chunk-B2TBCVHH.js";import{useShellPrefs as e}from"./chunk-T6MKFQRH.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);F(),N(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=O(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*_[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function V(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=O(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var G="pomodoro_tasks",H="pomodoro_tasks_migrated";function j(){return Math.random().toString(36).slice(2,11)}function W(){/* @__PURE__ */
|
|
2
|
+
return(new Date).toISOString()}var q=null,E=[],J=!1,K=null,L=/* @__PURE__ */new Set;function Q(){for(const t of L)t()}function $(t){E=t,Q()}function z(){const t=q;return t?K=t.list().then(e=>{q===t&&(E=e,J=!0,Q())}).catch(()=>{q===t&&(J=!0,Q())}).finally(()=>{K=null}):(E=[],J=!0,Q(),Promise.resolve())}function U(t){q=t,E=[],J=!1,t?z():Q()}function X(t){return L.add(t),!q||J||K||z(),()=>{L.delete(t)}}function Y(){return E}function Z(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=j(),n=W(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:W()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(X,Y,Y),i=o(e=>{const n=q;if(!n)return t.addTask(e);const o="tmp-"+j(),a=W(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...E,r]),n.create({...e,name:e.name.trim()}).then(t=>$(E.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(E.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=q;if(!o)return t.updateTask(e,n);$(E.map(t=>t.id===e?{...t,...n,id:e,updatedAt:W()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=q;if(!n)return t.removeTask(e);const o=E;$(E.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!q)return t.toggleDone(e);const n=E.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{q||t.setAllTasks(e)},[t]);return null===q?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(H))return;const n=localStorage.getItem(G);if(!n)return void localStorage.setItem(H,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(G),void localStorage.setItem(H,"1");const a=W(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||j(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(G),localStorage.setItem(H,"1")}catch{try{localStorage.setItem(H,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,V as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,U as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{currentShellStrings as t}from"./chunk-
|
|
1
|
+
import{currentShellStrings as t}from"./chunk-VVI77XNV.js";var e="http://www.w3.org/2000/svg",n={},o=/* @__PURE__ */new Map;function s(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var r={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",loading:"M12 3a9 9 0 019 9",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function i(t,n){const o=document.createElementNS(e,"svg");o.setAttribute("class",n),o.setAttribute("fill","none"),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2");const s=document.createElementNS(e,"path");return s.setAttribute("stroke-linecap","round"),"loading"!==t&&s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",r[t]),o.appendChild(s),o}function a(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function c(t,e,r){const c={...n,...r},l=c.placement??"top",d=c.sticky??!1,u=`${l}|${t}|${e}`;if(c.dedupe){const t=o.get(u);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==t&&!1!==c.sound&&import("./sounds-OMHXVVQ4.js").then(e=>{"success"===t?e.playSuccess():"error"===t?e.playError():e.playNotification()}).catch(()=>{});const m="bottom"===l?s("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col-reverse gap-2 items-center pointer-events-none"):s("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col gap-2 items-center pointer-events-none"),p="bottom"===l?"translateY(10px)":"translateY(-10px)",f=a("pointer-events-auto cursor-pointer rosh-toast");f.style.opacity="0",f.style.transform=`${p} scale(0.95)`,f.setAttribute("role","error"===t?"alert":"status"),f.setAttribute("aria-atomic","true"),f.appendChild(i(t,`h-4 w-4 rosh-tone-${t}${"loading"===t?" animate-spin":""}`));const h=document.createElement("span");let y;h.textContent=e,f.appendChild(h),m.appendChild(f),requestAnimationFrame(()=>{f.style.opacity="1",f.style.transform="translateY(0) scale(1)"});let v=!1;const g=()=>{v||(v=!0,y&&clearTimeout(y),o.delete(u),f.style.opacity="0",f.style.transform=`${p} scale(0.95)`,setTimeout(()=>f.remove(),300))},b=c.duration??("info"===t?4500:3e3),x=()=>{y&&clearTimeout(y),d||(y=setTimeout(g,b))};return x(),f.addEventListener("mouseenter",()=>{y&&clearTimeout(y)}),f.addEventListener("mouseleave",()=>{v||x()}),f.addEventListener("click",g),o.set(u,{el:f,restart:x,dismiss:g}),{dismiss:g}}var l={success:(t,e)=>c("success",t,e),error:(t,e)=>c("error",t,e),warning:(t,e)=>c("warning",t,e),info:(t,e)=>c("info",t,e),notify:(e,o)=>function(e,o){!1!==(o?.sound??n.sound)&&import("./sounds-OMHXVVQ4.js").then(t=>t.playNotification()).catch(()=>{});const r=s("notif-container","fixed top-4 right-4 z-[9999] flex flex-col gap-3 items-end pointer-events-none"),c=a("pointer-events-auto cursor-pointer rosh-notif");c.style.opacity="0",c.style.transform="translateX(30px) scale(0.95)";const l=a("rosh-notif-badge");l.appendChild(i("bell","h-5 w-5"));const d=a("rosh-notif-body");d.append(a("rosh-notif-title",t().toast.notification),a("notif-msg rosh-notif-msg",e));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",c.append(l,d,u);const m=()=>{c.style.opacity="0",c.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>c.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),c.addEventListener("click",m),r.appendChild(c),requestAnimationFrame(()=>{c.style.opacity="1",c.style.transform="translateX(0) scale(1)"}),setTimeout(m,o?.duration??1e4)}(e,o),promise:(t,e,n)=>{const o=c("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),c("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),c("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{n={...t}}};export{l as toast_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-XC64WV33.js";import{keepsNativeMenu as a}from"./chunk-J7LKJIZC.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{glassStyle as e}from"./chunk-J7LKJIZC.js";import{useDismissPopupsOnOpen as r,Z_LAYERS as t}from"./chunk-OSJ3ADF2.js";import{useShellStrings as a}from"./chunk-
|
|
1
|
+
import{glassStyle as e}from"./chunk-J7LKJIZC.js";import{useDismissPopupsOnOpen as r,Z_LAYERS as t}from"./chunk-OSJ3ADF2.js";import{useShellStrings as a}from"./chunk-VVI77XNV.js";import{useState as n,useEffect as l,useRef as o,useCallback as s}from"react";import{jsx as i,jsxs as d}from"react/jsx-runtime";import{createPortal as c}from"react-dom";var m={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function h(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function p(e,r,t){return!1===e?"framed":null==e||null==r?"plate-light":r?"light"===t?"plate-dark":"bare":"dark"===t?"plate-light":"bare"}var u={"plate-light":"bg-white shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]","plate-dark":"bg-neutral-900 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow-strong)]",framed:"border border-black/10 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]",bare:""};function g(e,r,t){return"bare"===e?{}:"framed"===e?{borderRadius:r}:{borderRadius:r,padding:t}}function x({src:e,fallbackSrc:r,fallbackHasAlpha:t=null,fallbackIsLight:a=null,fallbackAdaptive:o,alt:s,slot:d="compact",surface:c="light",size:x,width:b,height:f,decorative:y=!1,fallbackMode:v="monogram",adaptive:k=!1,hasAlpha:w=null,isLight:N=null,treatmentPadding:L=4,treatmentRadius:j=8,className:C="",style:E}){const[_,A]=n(e||r||"");l(()=>{A(e||r||"")},[e,r]);const $=Boolean(r&&_===r&&_!==e),D=($?o??k:k)?p($?t:w,$?a:N,c):"bare",K=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==x&&null==b&&null==f?m[d]:"","dark"===c?"text-white":"text-gray-700",u[D],C].filter(Boolean).join(" "),B={...g(D,j,L),...null==x?{width:b,height:f}:{width:x,height:x},...E};return _?/* @__PURE__ */i("span",{className:K,"data-brand-treatment":D,style:B,children:/* @__PURE__ */i("img",{src:_,alt:y?"":s,"data-brand-slot":d,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>A(e=>r&&e!==r?r:"")})}):"none"===v?null:/* @__PURE__ */i("span",{"data-brand-fallback":!0,"data-brand-slot":d,"aria-label":y?void 0:s,"aria-hidden":y||void 0,role:y?void 0:"img",className:`${K} rounded-md bg-gray-100 font-semibold`,style:B,children:y?null:h(s)})}var b="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z",f="react-os-shell:open-global-search";function y(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(f))}function v({providers:m,typeIcons:h,placeholder:p,onSelect:u}={}){const g=a().search,x=p??g.placeholder,[y,v]=n(!1),[k,w]=n(""),[N,L]=n([]),[j,C]=n(!1),[E,_]=n(0),A=o(null),$=o();l(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),v(e=>!e)),"Escape"===e.key&&y&&v(!1)},r=()=>v(!0);return window.addEventListener("keydown",e),window.addEventListener(f,r),()=>{window.removeEventListener("keydown",e),window.removeEventListener(f,r)}},[y]),r(y),l(()=>{y?setTimeout(()=>A.current?.focus(),50):(w(""),L([]))},[y]),l(()=>{if($.current&&clearTimeout($.current),k.length<2)L([]);else{if(m&&0!==m.length)return $.current=setTimeout(async()=>{C(!0);try{const e=await Promise.all(m.map(e=>e(k).catch(()=>[])));L(e.flat()),_(0)}catch{L([])}C(!1)},250),()=>{$.current&&clearTimeout($.current)};L([])}},[k,m]);const D=s(e=>{v(!1),u?.(e)},[u]);return y?c(
|
|
2
2
|
/* @__PURE__ */d("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:t.overlay},onClick:()=>v(!1),children:[
|
|
3
3
|
/* @__PURE__ */i("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
4
4
|
/* @__PURE__ */d("div",{className:"relative z-10 w-full max-w-xl rounded-2xl overflow-hidden",onClick:e=>e.stopPropagation(),style:e(),children:[
|
|
5
5
|
/* @__PURE__ */d("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
6
6
|
/* @__PURE__ */i("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */i("path",{strokeLinecap:"round",strokeLinejoin:"round",d:b})}),
|
|
7
|
-
/* @__PURE__ */i("input",{ref:A,type:"text",value:k,onChange:e=>w(e.target.value),onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),_(e=>Math.min(e+1,N.length-1))):"ArrowUp"===e.key?(e.preventDefault(),_(e=>Math.max(e-1,0))):"Enter"===e.key&&N[
|
|
7
|
+
/* @__PURE__ */i("input",{ref:A,type:"text",value:k,onChange:e=>w(e.target.value),onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),_(e=>Math.min(e+1,N.length-1))):"ArrowUp"===e.key?(e.preventDefault(),_(e=>Math.max(e-1,0))):"Enter"===e.key&&N[E]&&D(N[E])},placeholder:x,className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),
|
|
8
8
|
/* @__PURE__ */i("kbd",{className:"hidden sm:inline-flex items-center rounded border border-gray-300 px-1.5 py-0.5 text-[10px] font-medium text-gray-400",children:g.escBadge})]}),
|
|
9
|
-
/* @__PURE__ */d("div",{className:"max-h-[50vh] overflow-y-auto",children:[j&&/* @__PURE__ */i("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:g.searching}),!j&&k.length>=2&&0===N.length&&/* @__PURE__ */i("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:g.noResults}),!j&&N.length>0&&/* @__PURE__ */i("ul",{className:"py-2",children:N.map((e,r)=>/* @__PURE__ */i("li",{children:/* @__PURE__ */d("button",{className:"flex items-center gap-3 w-full px-4 py-2.5 text-left transition-colors "+(r===
|
|
9
|
+
/* @__PURE__ */d("div",{className:"max-h-[50vh] overflow-y-auto",children:[j&&/* @__PURE__ */i("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:g.searching}),!j&&k.length>=2&&0===N.length&&/* @__PURE__ */i("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:g.noResults}),!j&&N.length>0&&/* @__PURE__ */i("ul",{className:"py-2",children:N.map((e,r)=>/* @__PURE__ */i("li",{children:/* @__PURE__ */d("button",{className:"flex items-center gap-3 w-full px-4 py-2.5 text-left transition-colors "+(r===E?"bg-blue-50":"hover:bg-gray-50"),onClick:()=>D(e),onMouseEnter:()=>_(r),children:[
|
|
10
10
|
/* @__PURE__ */i("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */i("path",{strokeLinecap:"round",strokeLinejoin:"round",d:h?.[e.type]||b})}),
|
|
11
11
|
/* @__PURE__ */d("div",{className:"flex-1 min-w-0",children:[
|
|
12
12
|
/* @__PURE__ */i("p",{className:"text-sm font-medium text-gray-900 truncate",children:e.label}),e.sub&&/* @__PURE__ */i("p",{className:"text-xs text-gray-400 truncate",children:e.sub})]}),
|