@remit/web-client-dist 0.0.106 → 0.0.107

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 (32) hide show
  1. package/assets/{ComposeBody-DzDibeTc.js → ComposeBody-CZAt_e8h.js} +1 -1
  2. package/assets/{ErrorState-CNoaZAdt.js → ErrorState-BAcfRodQ.js} +1 -1
  3. package/assets/{OnboardingWizard-CP6zQmQ5.js → OnboardingWizard-BMVOGMYE.js} +1 -1
  4. package/assets/{account-form-helpers-C-t_FQFv.js → account-form-helpers-DghJsuWi.js} +1 -1
  5. package/assets/{accounts-ftM1h5KL.js → accounts-f5bTm0NS.js} +1 -1
  6. package/assets/{advanced-6rkturWd.js → advanced-CoBkUPKP.js} +1 -1
  7. package/assets/{appearance-BlH9-x7D.js → appearance-VbrhN0oM.js} +1 -1
  8. package/assets/{avatar-CVIptsDj.js → avatar-MyZf5vDl.js} +1 -1
  9. package/assets/{browser-ponyfill-BZ_JkfmR.js → browser-ponyfill-DgxCwkd0.js} +1 -1
  10. package/assets/{filter-status-BRQhg1dR.js → filter-status-Cr92yPtQ.js} +1 -1
  11. package/assets/{filters-BcB249Z6.js → filters-Bqti7eRf.js} +1 -1
  12. package/assets/{flagged-COOL5cBJ.js → flagged-qFDHGVBa.js} +1 -1
  13. package/assets/{folder-DApg1EbA.js → folder-iK7pXYz4.js} +1 -1
  14. package/assets/{folders-DuMOY6AI.js → folders-DLkspM-j.js} +1 -1
  15. package/assets/{index-CQJnnzNz.js → index-B4cuYRRc.js} +4 -4
  16. package/assets/index-BYdsBR4j.js +1 -0
  17. package/assets/{index-D6-Sr51N.js → index-DLonqZy_.js} +1 -1
  18. package/assets/{kbd-CdhZhfwn.js → kbd-xjQDJLFE.js} +1 -1
  19. package/assets/{mail-CNXqf1Uc.js → mail-C5F_GIb4.js} +3 -3
  20. package/assets/{onboarding-BwkiJKEU.js → onboarding-BDEv04-0.js} +1 -1
  21. package/assets/{select-BG2Seict.js → select-OaIRVTjS.js} +1 -1
  22. package/assets/{senders-eZ71WtmA.js → senders-di1XNF80.js} +1 -1
  23. package/assets/settings-BbacUr8A.js +1 -0
  24. package/assets/{settings-screen-CJhzueAq.js → settings-screen-DiPKQ-Oq.js} +1 -1
  25. package/assets/{suggested-vips-BRErNIk2.js → suggested-vips-BaMuktCh.js} +1 -1
  26. package/assets/{useDebouncedValue-CDbqj0E4.js → useDebouncedValue-z5qqib5A.js} +1 -1
  27. package/assets/{useMutation-Cr9qCvKx.js → useMutation-DVKYPHNH.js} +1 -1
  28. package/assets/{useSignature-B2I580xv.js → useSignature-8-I8TcX2.js} +1 -1
  29. package/index.html +1 -1
  30. package/package.json +1 -1
  31. package/assets/index-C9iqiv_q.js +0 -1
  32. package/assets/settings-DSejqZvW.js +0 -1
@@ -1 +1 @@
1
- import{bl as n,aa as r,al as i,V as s,r as c,j as m}from"./index-CQJnnzNz.js";import{O as l}from"./OnboardingWizard-CP6zQmQ5.js";import"./kbd-CdhZhfwn.js";import"./select-BG2Seict.js";import"./useMutation-Cr9qCvKx.js";import"./account-form-helpers-C-t_FQFv.js";async function p(e){e.recordCompleted(),await e.queryClient.refetchQueries({queryKey:n()}),e.navigateToInbox()}function v(){const e=r(),o=i(),t=s(),a=c.useCallback(u=>{p({queryClient:t,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{e({to:"/mail"})}})},[e,o,t]);return m.jsx(l,{skipWelcome:!1,onComplete:a})}export{v as component};
1
+ import{bl as n,aa as r,al as i,V as s,r as c,j as m}from"./index-B4cuYRRc.js";import{O as l}from"./OnboardingWizard-BMVOGMYE.js";import"./kbd-xjQDJLFE.js";import"./select-OaIRVTjS.js";import"./useMutation-DVKYPHNH.js";import"./account-form-helpers-DghJsuWi.js";async function p(e){e.recordCompleted(),await e.queryClient.refetchQueries({queryKey:n()}),e.navigateToInbox()}function v(){const e=r(),o=i(),t=s(),a=c.useCallback(u=>{p({queryClient:t,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{e({to:"/mail"})}})},[e,o,t]);return m.jsx(l,{skipWelcome:!1,onComplete:a})}export{v as component};
@@ -1 +1 @@
1
- import{a,j as e,C as i,b as o}from"./index-CQJnnzNz.js";const l=a("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function u({icon:s,className:n,children:t,...r}){return e.jsxs("div",{className:o("relative flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken pl-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors",n),children:[s&&e.jsx("span",{className:"shrink-0 text-fg-subtle",children:s}),e.jsx("select",{className:"min-w-0 flex-1 appearance-none bg-transparent py-0 pr-8 text-fg outline-none",...r,children:t}),e.jsx(i,{className:"pointer-events-none absolute right-2.5 size-4 text-fg-subtle"})]})}export{l as C,u as S};
1
+ import{a,j as e,C as i,b as o}from"./index-B4cuYRRc.js";const l=a("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function u({icon:s,className:n,children:t,...r}){return e.jsxs("div",{className:o("relative flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken pl-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors",n),children:[s&&e.jsx("span",{className:"shrink-0 text-fg-subtle",children:s}),e.jsx("select",{className:"min-w-0 flex-1 appearance-none bg-transparent py-0 pr-8 text-fg outline-none",...r,children:t}),e.jsx(i,{className:"pointer-events-none absolute right-2.5 size-4 text-fg-subtle"})]})}export{l as C,u as S};
@@ -1 +1 @@
1
- import{j as e,b as N,aa as z,r as c,bz as A,t as L,bA as O,am as I,bS as $,V as k,bT as q,aK as C,B as S,S as M,as as R,X as B}from"./index-CQJnnzNz.js";import{K as m}from"./kbd-CdhZhfwn.js";import{S as G,a as P}from"./settings-screen-CJhzueAq.js";import{u as E}from"./useMutation-Cr9qCvKx.js";import{E as V}from"./ErrorState-CNoaZAdt.js";import{S as K,u as Q}from"./useDebouncedValue-CDbqj0E4.js";import{c as _}from"./format-B6Elex-n.js";import"./avatar-CVIptsDj.js";function D({options:t,active:r,onSelect:x}){return e.jsx("div",{role:"tablist",className:N("flex shrink-0 gap-1 overflow-x-auto border-b border-line p-2","lg:w-44 lg:flex-col lg:gap-0 lg:overflow-visible lg:border-r lg:border-b-0 lg:py-2 lg:pr-2 lg:pl-3"),children:t.map(a=>{const d=a.id===r;return e.jsxs("button",{type:"button",role:"tab","aria-selected":d,onClick:()=>x(a.id),className:N("flex min-h-11 shrink-0 items-center gap-2 rounded-md px-3 text-left text-sm transition-colors lg:min-h-0 lg:px-2 lg:py-1",d?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface-sunken hover:text-fg"),children:[e.jsx("span",{className:"flex-1 truncate",children:a.label}),e.jsx("span",{className:N("text-2xs tabular-nums",d?"text-accent-2":"text-fg-subtle"),children:a.count??"—"})]},a.id)})})}const v={vip:"VIPs",muted:"Muted",blocked:"Blocked"},F=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"VIP"})," senders get priority surface in the daily brief and notification escalation, even when an account is quiet."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Muted"})," senders never notify and stay out of the brief. Their mail still syncs and stays searchable."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Blocked"})," senders never load images and go straight to junk."]}),e.jsxs("p",{children:["Tip: flag from the keyboard on any message — ",e.jsx(m,{children:"v"})," VIP,"," ",e.jsx(m,{children:"m"})," mute, ",e.jsx(m,{children:"b"})," block. Every rule an automation creates shows up here and can be removed."]})]});function H({query:t,onCount:r}){const{data:x,isPending:a,isError:d,error:b}=I($()),g=k(),i=E({...C(),onSettled:()=>{g.invalidateQueries({queryKey:q()})}}),l=x?.suggestions??[],p=t.trim().toLowerCase(),u=p?l.filter(n=>(n.displayName??"").toLowerCase().includes(p)||n.normalizedEmail.toLowerCase().includes(p)):l;return c.useEffect(()=>{r?.(u.length,l.length)},[r,u.length,l.length]),a?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Loading VIP suggestions…"}):d?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Couldn't load VIP suggestions",error:b})}):l.length===0?e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIP suggestions yet. As you reply to senders, they'll appear here. Press ",e.jsx(m,{children:"v"})," on any message to promote a sender to VIP."]}):u.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIPs match “",t,"”."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-row-inset py-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Suggested — promote to VIP"}),u.map(n=>e.jsx(P,{name:n.displayName??n.normalizedEmail,email:n.normalizedEmail,meta:n.replyCount>0?`${n.inboundCount} received · you replied ${n.replyCount}×`:`${n.inboundCount} received · you've never replied`,trailing:e.jsx(S,{variant:"ghost",size:"sm",icon:e.jsx(M,{className:"size-3.5"}),"aria-busy":i.isPending,onClick:()=>{i.isPending||i.mutate({path:{addressId:n.addressId},body:{flags:{vip:{value:!0,setAt:Date.now(),setBy:"user"}}}})},children:"Add VIP"})},n.addressId))]})}function U({group:t,query:r,onCount:x}){const a=Q(r.trim(),300),d=k(),[b,g]=c.useState(null),i=a.length>=2,l=R({query:{q:a,limit:50}}),{data:p,isPending:u,isError:n,error:j}=I({...l,enabled:i}),h=E({...C(),onSuccess:()=>{d.invalidateQueries({queryKey:l.queryKey})}}),f=(p?.items??[]).filter(s=>t==="muted"?s.flags?.muted?.value??!1:s.flags?.blocked?.value??!1);return c.useEffect(()=>{x?.(i?f.length:0,null)},[x,i,f.length]),i?u?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Searching…"}):n?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Search failed",error:j})}):f.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No ",v[t].toLowerCase()," senders matching “",a,"”."]}):e.jsx(e.Fragment,{children:f.map(s=>{const o=t==="muted"?s.flags?.muted:s.flags?.blocked,y=o?[`${t}`,o.setAt&&_(o.setAt,{month:"short",year:"numeric"})||null,o.reason?`— ${o.reason}`:null].filter(Boolean).join(" "):t,w=h.isPending&&h.variables?.path.addressId===s.addressId,T=h.isError&&b===s.addressId;return e.jsx(P,{name:s.displayName??s.normalizedEmail,email:s.normalizedEmail,danger:t==="blocked",meta:y,trailing:T?e.jsx(S,{variant:"secondary",size:"sm",onClick:()=>{g(s.addressId),h.mutate({path:{addressId:s.addressId},body:{flags:{[t]:null}}})},children:"Retry"}):e.jsx(S,{variant:"ghost",size:"sm",icon:e.jsx(B,{className:"size-3.5"}),"aria-busy":w,"aria-label":`Remove ${t} flag`,onClick:()=>{w||(g(s.addressId),h.mutate({path:{addressId:s.addressId},body:{flags:{[t]:null}}}))}})},s.addressId)})}):e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle space-y-2",children:[e.jsxs("p",{children:["Type 2+ characters to search ",v[t].toLowerCase()," ","senders by name or address."]}),e.jsxs("p",{className:"text-2xs text-fg-subtle",children:["Note: a dedicated flagged-address list endpoint is in the backlog. Press ",e.jsx(m,{children:"m"})," on any message to mute its sender; ",e.jsx(m,{children:"b"})," to block."]})]})}function ne(){const t=z(),[r,x]=c.useState("vip"),[a,d]=c.useState(""),[b,g]=c.useState(!0),[i,l]=c.useState(0),[p,u]=c.useState({vip:0,muted:null,blocked:null}),n=c.useCallback((s,o)=>{l(s),u(y=>({...y,vip:o}))},[]),j=c.useCallback((s,o)=>{l(s),u(y=>({...y,[r]:s}))},[r]),h=p[r],f=s=>{const o=O[s];o&&t({to:o})};return e.jsx(G,{items:A,activeId:"senders",title:"Senders & Rules",description:"Per-sender preferences — set with one key from any message, managed here.",flush:!0,help:F,helpOpen:b,onToggleHelp:()=>g(s=>!s),onSelect:f,onBackToMail:()=>{t({to:"/mail"})},children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[e.jsx(D,{active:r,onSelect:s=>{x(s),d("")},options:["vip","muted","blocked"].map(s=>({id:s,label:v[s],count:p[s]}))}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx("div",{className:"border-b border-line px-row-inset py-2",children:e.jsx(L,{icon:e.jsx(K,{className:"size-4"}),placeholder:`Filter ${v[r].toLowerCase()} by name or address`,className:"h-8 max-w-sm",value:a,onChange:s=>d(s.target.value)})}),e.jsx("div",{className:"min-h-0 flex-1 divide-y divide-line overflow-y-auto",children:r==="vip"?e.jsx(H,{query:a,onCount:n}):e.jsx(U,{group:r,query:a,onCount:j})}),e.jsxs("footer",{className:"flex items-center justify-between border-t border-line px-row-inset py-1 text-2xs text-fg-subtle",children:[e.jsx("span",{children:h!=null?`${i} of ${h} flagged senders`:`${i} flagged senders`}),e.jsxs("span",{children:[e.jsx(m,{children:"j"})," ",e.jsx(m,{children:"k"})," navigate · ",e.jsx(m,{children:"⌫"})," remove flag"]})]})]})]})})}export{ne as component};
1
+ import{j as e,b as N,aa as z,r as c,bz as A,t as L,bA as O,am as I,bS as $,V as k,bT as q,aK as C,B as S,S as M,as as R,X as B}from"./index-B4cuYRRc.js";import{K as m}from"./kbd-xjQDJLFE.js";import{S as G,a as P}from"./settings-screen-DiPKQ-Oq.js";import{u as E}from"./useMutation-DVKYPHNH.js";import{E as V}from"./ErrorState-BAcfRodQ.js";import{S as K,u as Q}from"./useDebouncedValue-z5qqib5A.js";import{c as _}from"./format-B6Elex-n.js";import"./avatar-MyZf5vDl.js";function D({options:t,active:r,onSelect:x}){return e.jsx("div",{role:"tablist",className:N("flex shrink-0 gap-1 overflow-x-auto border-b border-line p-2","lg:w-44 lg:flex-col lg:gap-0 lg:overflow-visible lg:border-r lg:border-b-0 lg:py-2 lg:pr-2 lg:pl-3"),children:t.map(a=>{const d=a.id===r;return e.jsxs("button",{type:"button",role:"tab","aria-selected":d,onClick:()=>x(a.id),className:N("flex min-h-11 shrink-0 items-center gap-2 rounded-md px-3 text-left text-sm transition-colors lg:min-h-0 lg:px-2 lg:py-1",d?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface-sunken hover:text-fg"),children:[e.jsx("span",{className:"flex-1 truncate",children:a.label}),e.jsx("span",{className:N("text-2xs tabular-nums",d?"text-accent-2":"text-fg-subtle"),children:a.count??"—"})]},a.id)})})}const v={vip:"VIPs",muted:"Muted",blocked:"Blocked"},F=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"VIP"})," senders get priority surface in the daily brief and notification escalation, even when an account is quiet."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Muted"})," senders never notify and stay out of the brief. Their mail still syncs and stays searchable."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Blocked"})," senders never load images and go straight to junk."]}),e.jsxs("p",{children:["Tip: flag from the keyboard on any message — ",e.jsx(m,{children:"v"})," VIP,"," ",e.jsx(m,{children:"m"})," mute, ",e.jsx(m,{children:"b"})," block. Every rule an automation creates shows up here and can be removed."]})]});function H({query:t,onCount:r}){const{data:x,isPending:a,isError:d,error:b}=I($()),g=k(),i=E({...C(),onSettled:()=>{g.invalidateQueries({queryKey:q()})}}),l=x?.suggestions??[],p=t.trim().toLowerCase(),u=p?l.filter(n=>(n.displayName??"").toLowerCase().includes(p)||n.normalizedEmail.toLowerCase().includes(p)):l;return c.useEffect(()=>{r?.(u.length,l.length)},[r,u.length,l.length]),a?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Loading VIP suggestions…"}):d?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Couldn't load VIP suggestions",error:b})}):l.length===0?e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIP suggestions yet. As you reply to senders, they'll appear here. Press ",e.jsx(m,{children:"v"})," on any message to promote a sender to VIP."]}):u.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIPs match “",t,"”."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-row-inset py-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Suggested — promote to VIP"}),u.map(n=>e.jsx(P,{name:n.displayName??n.normalizedEmail,email:n.normalizedEmail,meta:n.replyCount>0?`${n.inboundCount} received · you replied ${n.replyCount}×`:`${n.inboundCount} received · you've never replied`,trailing:e.jsx(S,{variant:"ghost",size:"sm",icon:e.jsx(M,{className:"size-3.5"}),"aria-busy":i.isPending,onClick:()=>{i.isPending||i.mutate({path:{addressId:n.addressId},body:{flags:{vip:{value:!0,setAt:Date.now(),setBy:"user"}}}})},children:"Add VIP"})},n.addressId))]})}function U({group:t,query:r,onCount:x}){const a=Q(r.trim(),300),d=k(),[b,g]=c.useState(null),i=a.length>=2,l=R({query:{q:a,limit:50}}),{data:p,isPending:u,isError:n,error:j}=I({...l,enabled:i}),h=E({...C(),onSuccess:()=>{d.invalidateQueries({queryKey:l.queryKey})}}),f=(p?.items??[]).filter(s=>t==="muted"?s.flags?.muted?.value??!1:s.flags?.blocked?.value??!1);return c.useEffect(()=>{x?.(i?f.length:0,null)},[x,i,f.length]),i?u?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Searching…"}):n?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Search failed",error:j})}):f.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No ",v[t].toLowerCase()," senders matching “",a,"”."]}):e.jsx(e.Fragment,{children:f.map(s=>{const o=t==="muted"?s.flags?.muted:s.flags?.blocked,y=o?[`${t}`,o.setAt&&_(o.setAt,{month:"short",year:"numeric"})||null,o.reason?`— ${o.reason}`:null].filter(Boolean).join(" "):t,w=h.isPending&&h.variables?.path.addressId===s.addressId,T=h.isError&&b===s.addressId;return e.jsx(P,{name:s.displayName??s.normalizedEmail,email:s.normalizedEmail,danger:t==="blocked",meta:y,trailing:T?e.jsx(S,{variant:"secondary",size:"sm",onClick:()=>{g(s.addressId),h.mutate({path:{addressId:s.addressId},body:{flags:{[t]:null}}})},children:"Retry"}):e.jsx(S,{variant:"ghost",size:"sm",icon:e.jsx(B,{className:"size-3.5"}),"aria-busy":w,"aria-label":`Remove ${t} flag`,onClick:()=>{w||(g(s.addressId),h.mutate({path:{addressId:s.addressId},body:{flags:{[t]:null}}}))}})},s.addressId)})}):e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle space-y-2",children:[e.jsxs("p",{children:["Type 2+ characters to search ",v[t].toLowerCase()," ","senders by name or address."]}),e.jsxs("p",{className:"text-2xs text-fg-subtle",children:["Note: a dedicated flagged-address list endpoint is in the backlog. Press ",e.jsx(m,{children:"m"})," on any message to mute its sender; ",e.jsx(m,{children:"b"})," to block."]})]})}function ne(){const t=z(),[r,x]=c.useState("vip"),[a,d]=c.useState(""),[b,g]=c.useState(!0),[i,l]=c.useState(0),[p,u]=c.useState({vip:0,muted:null,blocked:null}),n=c.useCallback((s,o)=>{l(s),u(y=>({...y,vip:o}))},[]),j=c.useCallback((s,o)=>{l(s),u(y=>({...y,[r]:s}))},[r]),h=p[r],f=s=>{const o=O[s];o&&t({to:o})};return e.jsx(G,{items:A,activeId:"senders",title:"Senders & Rules",description:"Per-sender preferences — set with one key from any message, managed here.",flush:!0,help:F,helpOpen:b,onToggleHelp:()=>g(s=>!s),onSelect:f,onBackToMail:()=>{t({to:"/mail"})},children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[e.jsx(D,{active:r,onSelect:s=>{x(s),d("")},options:["vip","muted","blocked"].map(s=>({id:s,label:v[s],count:p[s]}))}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx("div",{className:"border-b border-line px-row-inset py-2",children:e.jsx(L,{icon:e.jsx(K,{className:"size-4"}),placeholder:`Filter ${v[r].toLowerCase()} by name or address`,className:"h-8 max-w-sm",value:a,onChange:s=>d(s.target.value)})}),e.jsx("div",{className:"min-h-0 flex-1 divide-y divide-line overflow-y-auto",children:r==="vip"?e.jsx(H,{query:a,onCount:n}):e.jsx(U,{group:r,query:a,onCount:j})}),e.jsxs("footer",{className:"flex items-center justify-between border-t border-line px-row-inset py-1 text-2xs text-fg-subtle",children:[e.jsx("span",{children:h!=null?`${i} of ${h} flagged senders`:`${i} flagged senders`}),e.jsxs("span",{children:[e.jsx(m,{children:"j"})," ",e.jsx(m,{children:"k"})," navigate · ",e.jsx(m,{children:"⌫"})," remove flag"]})]})]})]})})}export{ne as component};
@@ -0,0 +1 @@
1
+ import{j as t,bk as o}from"./index-B4cuYRRc.js";const n=()=>t.jsx(o,{});export{n as component};
@@ -1 +1 @@
1
- import{a as z,r as g,j as e,b as m,B as x,X as j,d as S}from"./index-CQJnnzNz.js";import{M as B,C as N,A as w}from"./avatar-CVIptsDj.js";const v=z("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function L({items:l,activeId:t,title:i,description:n,children:r,help:s,helpOpen:d=!0,flush:o,onSelect:k,onToggleHelp:f,onBackToMail:h}){const[y,c]=g.useState(!1),[u,C]=g.useState(!1),b=!!s&&d,p=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-3 pt-3 pb-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Settings"}),e.jsx("nav",{className:"flex-1 overflow-y-auto px-2 py-1",children:l.map(a=>e.jsxs("button",{type:"button",onClick:()=>{k?.(a.id),c(!1)},className:m("flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors lg:min-h-0",a.id===t?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg"),children:[a.icon&&e.jsx("span",{className:m("shrink-0",a.id===t?"text-accent-2":"text-fg-subtle"),children:a.icon}),a.label]},a.id))})]});return e.jsxs("div",{className:"flex h-dvh w-full overflow-hidden bg-canvas font-sans text-fg",children:[e.jsxs("aside",{className:"hidden w-60 shrink-0 flex-col border-r border-line bg-surface-sunken lg:flex",children:[e.jsx("div",{className:"flex h-pane-header shrink-0 items-center border-b border-line px-2",children:e.jsxs("button",{type:"button",onClick:h,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(v,{className:"size-4 text-fg-subtle"}),"Back to mail"]})}),p]}),y&&e.jsxs("div",{className:"fixed inset-0 z-50 flex lg:hidden",children:[e.jsx("button",{type:"button","aria-label":"Close menu",className:"absolute inset-0 bg-canvas/60",onClick:()=>c(!1)}),e.jsxs("aside",{className:"relative flex w-72 max-w-[85%] flex-col border-r border-line bg-surface-sunken",children:[e.jsxs("div",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-2",children:[e.jsxs("button",{type:"button",onClick:()=>{h?.(),c(!1)},className:"flex items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(v,{className:"size-4 text-fg-subtle"}),"Back to mail"]}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(j,{className:"size-4"}),onClick:()=>c(!1),"aria-label":"Close menu"})]}),p]})]}),e.jsxs("main",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center gap-3 border-b border-line px-3 lg:px-5",children:[e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(B,{className:"size-4"}),className:"lg:hidden",onClick:()=>c(!0),"aria-label":"Open settings menu"}),e.jsx("h1",{className:"text-md font-semibold text-fg",children:i}),n&&e.jsx("p",{className:"hidden min-w-0 truncate text-xs text-fg-subtle lg:block",children:n}),s&&e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4"}),className:"ml-auto lg:hidden",onClick:()=>C(a=>!a),"aria-label":"Tips","aria-expanded":u}),s&&!b&&e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4"}),className:"hidden ml-auto lg:inline-flex",onClick:f,"aria-label":"Show tips"})]}),s&&u&&e.jsx("div",{className:"border-b border-line bg-surface-sunken px-row-inset py-3 text-xs leading-relaxed text-fg-muted lg:hidden",children:s}),o?e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:r}):e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx("div",{className:"max-w-2xl px-3 py-5 lg:px-5",children:e.jsx("div",{className:"space-y-5",children:r})})})]}),b&&e.jsxs("aside",{className:"hidden w-64 shrink-0 flex-col border-l border-line bg-surface-sunken lg:flex",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-row-inset",children:[e.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Tips & tricks"}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(j,{className:"size-3.5"}),onClick:f,"aria-label":"Collapse tips"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-row-inset py-3 text-xs leading-relaxed text-fg-muted",children:s})]})]})}function E({name:l,email:t,meta:i,caption:n,danger:r,trailing:s}){return e.jsxs("div",{className:"flex items-center gap-3 px-row-inset py-2 hover:bg-surface-sunken",children:[e.jsx("span",{className:m(r&&"rounded-full ring-2 ring-danger/40"),children:e.jsx(w,{name:l,email:t,size:"sm"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-col gap-0 sm:flex-row sm:items-baseline sm:gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium text-fg",children:l}),e.jsx("span",{className:"truncate text-2xs text-fg-subtle",children:t})]}),e.jsxs("div",{className:"text-xs text-fg-subtle",children:[i,n&&e.jsxs("span",{className:"text-fg-muted",children:[" · ",n]})]})]}),s&&e.jsx("div",{className:"shrink-0",children:s})]})}const O={healthy:{tone:"positive",label:"healthy"},error:{tone:"danger",label:"error"},muted:{tone:"neutral",label:"muted"}};function F({label:l,email:t,connector:i,syncLabel:n,state:r,errorDetail:s,trailing:d}){const o=O[r];return e.jsxs("div",{className:m("rounded-sm border border-line bg-surface",r==="muted"&&"opacity-65"),children:[e.jsxs("div",{className:"flex flex-col gap-3 px-row-inset py-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx(w,{name:l,email:t,size:"md"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-semibold text-fg",children:l}),e.jsx(S,{tone:o.tone,dot:!0,children:o.label})]}),e.jsxs("div",{className:"truncate text-xs text-fg-subtle",children:[t," · ",i," · ",n]})]})]}),d&&e.jsx("div",{className:"shrink-0",children:d})]}),s&&e.jsx("div",{className:"border-t border-line px-row-inset py-2",children:e.jsx("code",{className:"block rounded-xs bg-danger-soft px-2 py-1 text-2xs text-danger",children:s})})]})}export{F as A,L as S,E as a};
1
+ import{a as z,r as g,j as e,b as m,B as x,X as j,d as S}from"./index-B4cuYRRc.js";import{M as B,C as N,A as w}from"./avatar-MyZf5vDl.js";const v=z("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function L({items:l,activeId:t,title:i,description:n,children:r,help:s,helpOpen:d=!0,flush:o,onSelect:k,onToggleHelp:f,onBackToMail:h}){const[y,c]=g.useState(!1),[u,C]=g.useState(!1),b=!!s&&d,p=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-3 pt-3 pb-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Settings"}),e.jsx("nav",{className:"flex-1 overflow-y-auto px-2 py-1",children:l.map(a=>e.jsxs("button",{type:"button",onClick:()=>{k?.(a.id),c(!1)},className:m("flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors lg:min-h-0",a.id===t?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg"),children:[a.icon&&e.jsx("span",{className:m("shrink-0",a.id===t?"text-accent-2":"text-fg-subtle"),children:a.icon}),a.label]},a.id))})]});return e.jsxs("div",{className:"flex h-dvh w-full overflow-hidden bg-canvas font-sans text-fg",children:[e.jsxs("aside",{className:"hidden w-60 shrink-0 flex-col border-r border-line bg-surface-sunken lg:flex",children:[e.jsx("div",{className:"flex h-pane-header shrink-0 items-center border-b border-line px-2",children:e.jsxs("button",{type:"button",onClick:h,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(v,{className:"size-4 text-fg-subtle"}),"Back to mail"]})}),p]}),y&&e.jsxs("div",{className:"fixed inset-0 z-50 flex lg:hidden",children:[e.jsx("button",{type:"button","aria-label":"Close menu",className:"absolute inset-0 bg-canvas/60",onClick:()=>c(!1)}),e.jsxs("aside",{className:"relative flex w-72 max-w-[85%] flex-col border-r border-line bg-surface-sunken",children:[e.jsxs("div",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-2",children:[e.jsxs("button",{type:"button",onClick:()=>{h?.(),c(!1)},className:"flex items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(v,{className:"size-4 text-fg-subtle"}),"Back to mail"]}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(j,{className:"size-4"}),onClick:()=>c(!1),"aria-label":"Close menu"})]}),p]})]}),e.jsxs("main",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center gap-3 border-b border-line px-3 lg:px-5",children:[e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(B,{className:"size-4"}),className:"lg:hidden",onClick:()=>c(!0),"aria-label":"Open settings menu"}),e.jsx("h1",{className:"text-md font-semibold text-fg",children:i}),n&&e.jsx("p",{className:"hidden min-w-0 truncate text-xs text-fg-subtle lg:block",children:n}),s&&e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4"}),className:"ml-auto lg:hidden",onClick:()=>C(a=>!a),"aria-label":"Tips","aria-expanded":u}),s&&!b&&e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4"}),className:"hidden ml-auto lg:inline-flex",onClick:f,"aria-label":"Show tips"})]}),s&&u&&e.jsx("div",{className:"border-b border-line bg-surface-sunken px-row-inset py-3 text-xs leading-relaxed text-fg-muted lg:hidden",children:s}),o?e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:r}):e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx("div",{className:"max-w-2xl px-3 py-5 lg:px-5",children:e.jsx("div",{className:"space-y-5",children:r})})})]}),b&&e.jsxs("aside",{className:"hidden w-64 shrink-0 flex-col border-l border-line bg-surface-sunken lg:flex",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-row-inset",children:[e.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Tips & tricks"}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(j,{className:"size-3.5"}),onClick:f,"aria-label":"Collapse tips"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-row-inset py-3 text-xs leading-relaxed text-fg-muted",children:s})]})]})}function E({name:l,email:t,meta:i,caption:n,danger:r,trailing:s}){return e.jsxs("div",{className:"flex items-center gap-3 px-row-inset py-2 hover:bg-surface-sunken",children:[e.jsx("span",{className:m(r&&"rounded-full ring-2 ring-danger/40"),children:e.jsx(w,{name:l,email:t,size:"sm"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-col gap-0 sm:flex-row sm:items-baseline sm:gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium text-fg",children:l}),e.jsx("span",{className:"truncate text-2xs text-fg-subtle",children:t})]}),e.jsxs("div",{className:"text-xs text-fg-subtle",children:[i,n&&e.jsxs("span",{className:"text-fg-muted",children:[" · ",n]})]})]}),s&&e.jsx("div",{className:"shrink-0",children:s})]})}const O={healthy:{tone:"positive",label:"healthy"},error:{tone:"danger",label:"error"},muted:{tone:"neutral",label:"muted"}};function F({label:l,email:t,connector:i,syncLabel:n,state:r,errorDetail:s,trailing:d}){const o=O[r];return e.jsxs("div",{className:m("rounded-sm border border-line bg-surface",r==="muted"&&"opacity-65"),children:[e.jsxs("div",{className:"flex flex-col gap-3 px-row-inset py-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx(w,{name:l,email:t,size:"md"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-semibold text-fg",children:l}),e.jsx(S,{tone:o.tone,dot:!0,children:o.label})]}),e.jsxs("div",{className:"truncate text-xs text-fg-subtle",children:[t," · ",i," · ",n]})]})]}),d&&e.jsx("div",{className:"shrink-0",children:d})]}),s&&e.jsx("div",{className:"border-t border-line px-row-inset py-2",children:e.jsx("code",{className:"block rounded-xs bg-danger-soft px-2 py-1 text-2xs text-danger",children:s})})]})}export{F as A,L as S,E as a};
@@ -1 +1 @@
1
- import{j as t,bm as e}from"./index-CQJnnzNz.js";const o=()=>t.jsx(e,{to:"/settings/senders",replace:!0});export{o as component};
1
+ import{j as t,bm as e}from"./index-B4cuYRRc.js";const o=()=>t.jsx(e,{to:"/settings/senders",replace:!0});export{o as component};
@@ -1 +1 @@
1
- import{a as u,r as c}from"./index-CQJnnzNz.js";const n=u("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),i=(e,t)=>{const[r,o]=c.useState(e);return c.useEffect(()=>{const s=setTimeout(()=>o(e),t);return()=>clearTimeout(s)},[e,t]),r};export{n as S,i as u};
1
+ import{a as u,r as c}from"./index-B4cuYRRc.js";const n=u("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),i=(e,t)=>{const[r,o]=c.useState(e);return c.useEffect(()=>{const s=setTimeout(()=>o(e),t);return()=>clearTimeout(s)},[e,t]),r};export{n as S,i as u};
@@ -1 +1 @@
1
- import{J as l,N as d,bU as a,bV as b,K as h,V as p,r as o,a1 as m,bW as v}from"./index-CQJnnzNz.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??b();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u};
1
+ import{J as l,N as d,bU as a,bV as b,K as h,V as p,r as o,a1 as m,bW as v}from"./index-B4cuYRRc.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??b();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u};
@@ -1 +1 @@
1
- import{r as m,j as i,B as u,b as y,V as p,au as x,am as C,at as h,ay as j,bl as L,bp as k}from"./index-CQJnnzNz.js";import{L as E}from"./account-form-helpers-C-t_FQFv.js";import{u as O}from"./useMutation-Cr9qCvKx.js";const b=()=>i.jsx(E,{className:"size-3.5 animate-spin"}),f=(s,n)=>n?i.jsx("span",{className:"sr-only",children:s}):s;function M({actions:s=[],destructive:n,className:l}){const[e,o]=m.useState(!1);return e&&n?.confirm?i.jsxs("div",{className:y("flex items-center gap-2",l),children:[i.jsx("span",{className:"text-xs text-fg-muted",children:n.confirm.prompt}),i.jsx(u,{variant:"secondary",size:"sm",onClick:()=>o(!1),children:n.confirm.cancelLabel??"Cancel"}),i.jsx(u,{variant:"danger",size:"sm","aria-busy":n.busy,icon:n.busy?b():void 0,onClick:()=>{n.busy||n.onClick()},children:n.busy?n.busyLabel??"Working…":n.confirm.confirmLabel??n.label})]}):i.jsxs("div",{className:y("flex items-center gap-2",l),children:[s.map(a=>i.jsx(u,{variant:a.variant??"ghost",size:"sm","aria-busy":a.busy,"aria-label":a.iconOnly?a.label:void 0,icon:a.busy?b():a.icon,onClick:()=>{a.busy||a.onClick()},children:a.busy&&a.busyLabel?a.busyLabel:f(a.label,a.iconOnly)},a.label)),n&&i.jsx(u,{variant:"ghost",size:"sm","aria-busy":n.busy,"aria-label":n.iconOnly?n.label:void 0,icon:n.busy?b():n.icon,onClick:()=>{if(!n.busy){if(n.confirm){o(!0);return}n.onClick()}},children:n.busy&&n.busyLabel?n.busyLabel:f(n.label,n.iconOnly)})]})}const c={html:"",plainText:""},N=s=>{const n=p(),{pushError:l}=x(),{data:e}=C({...h(),staleTime:1/0}),o=m.useMemo(()=>{if(!s||!e)return c;const r=e.accounts.find(t=>t.accountId===s);return r?{html:r.signatureHtml??"",plainText:r.signaturePlainText??""}:c},[s,e]),a=O({...k(),onSuccess:()=>{n.invalidateQueries({queryKey:L()})},onError:r=>{l(j("Couldn't save signature","The signature wasn't saved.",r))}}),g=m.useCallback((r,t)=>{s&&a.mutate({path:{accountId:s},body:{signatureHtml:r,signaturePlainText:t}})},[s,a]);return{signature:o,setSignature:g,isSaving:a.isPending}};export{M as R,N as u};
1
+ import{r as m,j as i,B as u,b as y,V as p,au as x,am as C,at as h,ay as j,bl as L,bp as k}from"./index-B4cuYRRc.js";import{L as E}from"./account-form-helpers-DghJsuWi.js";import{u as O}from"./useMutation-DVKYPHNH.js";const b=()=>i.jsx(E,{className:"size-3.5 animate-spin"}),f=(s,n)=>n?i.jsx("span",{className:"sr-only",children:s}):s;function M({actions:s=[],destructive:n,className:l}){const[e,o]=m.useState(!1);return e&&n?.confirm?i.jsxs("div",{className:y("flex items-center gap-2",l),children:[i.jsx("span",{className:"text-xs text-fg-muted",children:n.confirm.prompt}),i.jsx(u,{variant:"secondary",size:"sm",onClick:()=>o(!1),children:n.confirm.cancelLabel??"Cancel"}),i.jsx(u,{variant:"danger",size:"sm","aria-busy":n.busy,icon:n.busy?b():void 0,onClick:()=>{n.busy||n.onClick()},children:n.busy?n.busyLabel??"Working…":n.confirm.confirmLabel??n.label})]}):i.jsxs("div",{className:y("flex items-center gap-2",l),children:[s.map(a=>i.jsx(u,{variant:a.variant??"ghost",size:"sm","aria-busy":a.busy,"aria-label":a.iconOnly?a.label:void 0,icon:a.busy?b():a.icon,onClick:()=>{a.busy||a.onClick()},children:a.busy&&a.busyLabel?a.busyLabel:f(a.label,a.iconOnly)},a.label)),n&&i.jsx(u,{variant:"ghost",size:"sm","aria-busy":n.busy,"aria-label":n.iconOnly?n.label:void 0,icon:n.busy?b():n.icon,onClick:()=>{if(!n.busy){if(n.confirm){o(!0);return}n.onClick()}},children:n.busy&&n.busyLabel?n.busyLabel:f(n.label,n.iconOnly)})]})}const c={html:"",plainText:""},N=s=>{const n=p(),{pushError:l}=x(),{data:e}=C({...h(),staleTime:1/0}),o=m.useMemo(()=>{if(!s||!e)return c;const r=e.accounts.find(t=>t.accountId===s);return r?{html:r.signatureHtml??"",plainText:r.signaturePlainText??""}:c},[s,e]),a=O({...k(),onSuccess:()=>{n.invalidateQueries({queryKey:L()})},onError:r=>{l(j("Couldn't save signature","The signature wasn't saved.",r))}}),g=m.useCallback((r,t)=>{s&&a.mutate({path:{accountId:s},body:{signatureHtml:r,signaturePlainText:t}})},[s,a]);return{signature:o,setSignature:g,isSaving:a.isPending}};export{M as R,N as u};
package/index.html CHANGED
@@ -31,7 +31,7 @@
31
31
  } catch (_) {}
32
32
  })();
33
33
  </script>
34
- <script type="module" crossorigin src="/assets/index-CQJnnzNz.js"></script>
34
+ <script type="module" crossorigin src="/assets/index-B4cuYRRc.js"></script>
35
35
  <link rel="stylesheet" crossorigin href="/assets/index-D6xwiajO.css">
36
36
  </head>
37
37
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client-dist",
3
- "version": "0.0.106",
3
+ "version": "0.0.107",
4
4
  "description": "Built Remit web client — static assets and the default runtime config.",
5
5
  "files": [
6
6
  "**/*"
@@ -1 +0,0 @@
1
- import{j as t,bm as o}from"./index-CQJnnzNz.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
@@ -1 +0,0 @@
1
- import{j as t,bk as o}from"./index-CQJnnzNz.js";const n=()=>t.jsx(o,{});export{n as component};