@hazem3500/komo 0.9.17 → 0.9.19

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.
@@ -1 +1 @@
1
- import{b as e,c as t}from"./chunk-URGMAMH5.js";import{i as a,j as n,k as s}from"./chunk-ANKCS6NI.js";async function r(e,t=""){let r;try{let a=await e.request(`project/sites${t}`);r=[...a.fixed,...a.sites]}catch{return null}let i=a("div","approved-sites-editor");i.dataset.open="false";let o=a("span","approved-sites-count"),l=s("Sites with comments",()=>{let e="true"!==i.dataset.open;i.dataset.open=String(e),l.setAttribute("aria-expanded",String(e)),c.inert=!e},"approved-sites-toggle");l.replaceChildren(a("span","","Sites with comments"),o,n("chevron")),l.setAttribute("aria-expanded","false");let c=a("div","approved-sites-reveal");c.id=`approved-sites-${crypto.randomUUID()}`,c.inert=!0,l.setAttribute("aria-controls",c.id);let p=a("div","approved-sites-body"),d=a("ul","approved-site-list"),u=a("p","account-usage-status");u.setAttribute("role","status");let v=a("div","approved-site-add"),m=a("input");m.type="text",m.inputMode="url",m.spellcheck=!1,m.placeholder="your-site.com",m.setAttribute("aria-label","Site to approve"),m.setAttribute("autocomplete","off");let b=a("div","account-usage-note account-sites-note");b.append(n("info"),a("span","","Only these sites can show comments. Add * to cover preview links."));let h=async a=>{let n=r;r=a,f(),u.textContent="";try{let n=await e.request(`project/sites${t}`,"PATCH",{sites:a});return r=[...n.fixed,...n.sites],f(),!0}catch(e){return r=n,f(),u.textContent=e instanceof Error?e.message:"Try again.",!1}},y=s("Add",async()=>{let e;try{e=function(e){let t=e.trim().replace(/\/$/,"").toLowerCase();if(/^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?$/.test(t))return t;let a=/^https:\/\/([^/?#@\s]+)$/.exec(t.includes("://")?t:`https://${t}`),[n="",...s]=(a?.[1]??"").split(".");if(!a||s.length<1||s.join(".").includes("*")||n.split("*").length>2||n.includes("*")&&s.length<2)throw new Error("That doesn’t look like a site. Try your-site.com or *-preview.your-site.com.");return`https://${a[1]}`}(m.value)}catch(e){return void(u.textContent=e.message)}if(r.includes(e))return m.value="",void(u.textContent="Already on the list.");let t=m.value;m.value="",y.disabled=!0,await h([...r,e])||(m.value||=t),y.disabled=!1,m.focus()},"secondary");m.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),y.click())}),v.append(m,y);let g=e=>{let t=a("li","approved-site"),n=a("span","",e.replace(/^https:\/\//,""));return n.title=e,t.append(n,s(`Remove ${e}`,()=>{h(r.filter(t=>t!==e))},"icon","close")),t},f=()=>{o.textContent=String(r.length),d.replaceChildren(...r.map(g))};return f(),p.append(d,v,b,u),c.append(p),i.append(l,c),i}var i=new WeakMap;function o(e,n="usage",o=!0,l=!1){let c=a("section","account-usage");c.setAttribute("aria-label","Account usage");let p=(e="")=>{let t=a("span",`usage-skeleton ${e}`);return t.setAttribute("aria-hidden","true"),t},d=e.user?.id,u=e.token,v=()=>e.user?.id===d&&e.token===u,m=i.get(e);m||i.set(e,m=new Map);let b=JSON.stringify([d,u,n]),h=m.get(b);h||m.set(b,h={});let y=e=>{c.setAttribute("aria-busy","false"),c.replaceChildren(a("h3","",`${e.hosted?"Starter plan":"Self-hosted"}${l?" · Local":""}`));let{used:t,limit:n}=e.comments,s=a("div","account-usage-label account-comments"),r=a("span","account-comment-count");if(r.append(a("span","",null===n?`${t.toLocaleString()} / Unlimited`:`${t.toLocaleString()} / ${n.toLocaleString()}`)),s.title="Includes replies and deleted comments.",null!==n){let e=a("span","account-usage-ring");e.setAttribute("role","meter"),e.setAttribute("aria-label","Project comments"),e.setAttribute("aria-valuemin","0"),e.setAttribute("aria-valuemax",String(n)),e.setAttribute("aria-valuenow",String(Math.min(t,n))),e.setAttribute("aria-valuetext",`${t} of ${n} comments used, including replies and deleted comments`),e.style.setProperty("--usage",(n>0?100*Math.min(t/n,1):0)+"%"),e.dataset.full=String(t>=n),r.append(e)}if(s.append(a("span","","Project comments"),r),c.append(s),e.projects){let{used:t,limit:n}=e.projects;if(null===n){let e=a("div","account-usage-label");return e.append(a("span","","Projects"),a("span","",`${t.toLocaleString()} / Unlimited`)),void c.append(e)}let s=a("div","account-projects"),r=a("div","account-usage-label"),i=a("span","account-project-count");i.append(a("strong","",String(t)),a("span","",`of ${n}`)),r.append(a("span","","Projects"),i);let o=a("div","account-project-slots");o.setAttribute("role","meter"),o.setAttribute("aria-label","Projects"),o.setAttribute("aria-valuemin","0"),o.setAttribute("aria-valuemax",String(n)),o.setAttribute("aria-valuenow",String(t)),o.setAttribute("aria-valuetext",`${t} of ${n} projects used`);for(let e=0;e<n;e++){let n=a("span");n.dataset.used=String(e<t),o.append(n)}s.append(r,o),c.append(s)}},g=async()=>{if(!v())return c.replaceChildren(),void c.setAttribute("aria-busy","false");h.value?y(h.value):(()=>{let e=a("div","usage-skeleton-heading");e.append(p("usage-skeleton-title"));let t=a("div","account-usage-label account-comments"),n=a("span","account-comment-count");n.append(p("usage-skeleton-count"),p("usage-skeleton-ring")),t.append(p("usage-skeleton-label"),n);let s=a("div","account-projects"),r=a("div","account-usage-label");r.append(p("usage-skeleton-label"),p("usage-skeleton-count"));let i=a("div","account-project-slots");i.setAttribute("aria-hidden","true"),i.append(a("span"),a("span"),a("span")),s.append(r,i);let o=a("span","sr-only","Loading account usage");o.setAttribute("role","status"),c.setAttribute("aria-busy","true"),c.replaceChildren(e,t,s,o)})(),c.setAttribute("aria-busy","true");try{let t,a=h.pending??=e.request(n);try{t=await a}finally{h.pending===a&&(h.pending=void 0)}if(!v())return delete h.value,c.replaceChildren(),void c.setAttribute("aria-busy","false");if(h.value=t,!c.isConnected)return;y(t),o&&e.user?.verified&&(async()=>{let t=n.includes("?")?n.slice(n.indexOf("?")):"",a=await r(e,t);a&&h.value&&c.isConnected&&v()&&c.append(a)})().catch(()=>{})}catch(e){if(e instanceof t&&(401===e.status||403===e.status)&&delete h.value,!v())return delete h.value,c.replaceChildren(),void c.setAttribute("aria-busy","false");if(!c.isConnected)return;h.value?y(h.value):c.replaceChildren(),c.setAttribute("aria-busy","false");let n=a("span","account-usage-status",h.value?"Couldn’t refresh usage":"Usage unavailable");n.setAttribute("role","status"),c.append(n,s("Retry",()=>{g()},"secondary"))}};return g(),c}function l(t,r,i){let o=a("section","account-sites project-management");o.dataset.open="false";let l=s("Project settings",()=>{let e="true"!==o.dataset.open;o.dataset.open=String(e),l.setAttribute("aria-expanded",String(e)),c.inert=!e,c.setAttribute("aria-hidden",String(!e))},"account-sites-summary");l.append(n("chevron")),l.setAttribute("aria-expanded","false");let c=a("div","account-sites-reveal");c.id=`project-settings-${crypto.randomUUID()}`,l.setAttribute("aria-controls",c.id),c.inert=!0,c.setAttribute("aria-hidden","true");let p=a("div","account-sites-clip");c.append(p);let d=a("div","account-sites-content"),u=a("p","account-usage-status");u.setAttribute("role","status");let v=r?`?workspace=${encodeURIComponent(r)}`:"",m=(e,a="GET",n)=>t.request(`project${e}${v}`,a,n);o.hidden=!0,p.append(d,u),o.append(l,c);let b,h=async e=>{let t=Array.from(o.querySelectorAll("button"));t.forEach(e=>e.disabled=!0),u.textContent="";try{await e()}catch(e){u.textContent=e instanceof Error?e.message:"Try again."}finally{t.forEach(e=>e.disabled=!1)}},y=async()=>{let e,n={format:"komo-export",version:1,project:b.project,exportedAt:(new Date).toISOString(),tables:{}};for(let a of["threads","comments","reactions","users"]){n.tables[a]=[];let s=0;for(;null!==s;){let i=await t.request(`project/export?table=${a}&offset=${s}${void 0===e?"":`&revision=${e}`}${r?`&workspace=${encodeURIComponent(r)}`:""}`);e=i.revision,n.tables[a].push(...i.rows),s=i.next}}let s=URL.createObjectURL(new Blob([JSON.stringify(n,null,2)],{type:"application/json"})),i=a("a");i.href=s,i.download=`${b.project}-comments.json`,i.click(),setTimeout(()=>URL.revokeObjectURL(s),1e3),u.textContent="Export downloaded."},g=async()=>{b=await m(""),o.hidden=!1,d.replaceChildren();let t=a("div","account-name-label");t.append(a("span","","Access"));let n,r=[["public","Anyone with the link"],["private","Invited Google accounts"]],l=()=>{let a=e("Project access",r,b.access,e=>{h(async()=>{let t=b.access;b.access=e,l();try{await m("","PATCH",{access:e}),u.textContent="Access updated."}catch(e){throw b.access=t,l(),e}})});n?n.replaceWith(a):t.append(a),n=a};l(),d.append(t);let c=await m("/webhook"),p=a("details","project-webhook");p.append(a("summary","","Comment webhooks"));let v=a("p","project-help","Send signed events to your HTTPS endpoint. Signing secrets are encrypted and shown only when entered.");p.append(v),c.deliveryAvailable||(v.textContent="Secure webhook delivery is not available on this server yet.");let f=a("label","account-name-label","HTTPS endpoint"),w=a("input");w.type="url",w.autocomplete="off",w.placeholder="https://example.com/komo-webhook",w.value=c.url,f.append(w),p.append(f);let A=a("label","account-name-label",c.secretConfigured?"Replace signing secret":"Signing secret"),C=a("input");C.type="password",C.autocomplete="new-password",C.minLength=32,C.maxLength=256,A.append(C),p.append(A);let k=new Map;for(let e of c.supportedEvents){let t=a("label","account-name-label",e),n=a("input");n.type="checkbox",n.checked=c.events.includes(e),k.set(e,n),t.prepend(n),p.append(t)}let x=a("label","account-name-label","Enable delivery"),j=a("input");j.type="checkbox",j.checked=c.enabled,j.disabled=!c.deliveryAvailable&&!c.enabled,x.prepend(j),p.append(x),p.append(s("Save webhook settings",()=>{h(async()=>{await m("/webhook","PATCH",{url:w.value,secret:C.value,events:[...k].filter(([,e])=>e.checked).map(([e])=>e),enabled:j.checked}),C.value="",u.textContent="Webhook settings saved."})},"secondary")),d.append(p);let S=a("label","account-name-label","Invite someone"),$=a("input");$.type="email",$.placeholder="name@example.com",$.autocomplete="email",S.append($);let E=a("input");E.readOnly=!0,E.hidden=!0,E.setAttribute("aria-label","Invitation link");let T=s("Create invitation",()=>{h(async()=>{if(!$.checkValidity()||!$.value)throw Error("Enter an email address.");let e=await m("/invites","POST",{email:$.value});E.value=e.url,E.hidden=!1,P.hidden=!1,u.textContent="Share this link. It expires in 7 days."})},"secondary"),P=s("Copy invitation",()=>{h(async()=>{await navigator.clipboard.writeText(E.value),u.textContent="Invitation copied."})},"secondary");P.hidden=!0,d.append(S,T,E,P);for(let e of b.members){let t=a("div","project-member");t.append(a("span","",e.name),s(`Remove ${e.name}`,()=>{h(async()=>{await m("/members","DELETE",{user:e.id}),await g(),u.textContent="Member removed."})},"secondary")),d.append(t)}for(let e of b.invites){let t=a("div","project-member");t.append(a("span","",e.email),s("Revoke invitation",()=>{h(async()=>{await m("/invites","DELETE",{email:e.email}),await g(),u.textContent="Invitation revoked."})},"secondary")),d.append(t)}d.append(s("Download comments",()=>{h(y)},"secondary"));let L=a("a","project-help","Move to self-hosting");L.href="https://komo.offbr.co/hosting/#migration",L.target="_blank",L.rel="noopener noreferrer",d.append(L);let R=a("details","project-danger");R.append(a("summary","","Free space or delete project")),R.append(a("p","",`Export first. These actions permanently remove comments. Type ${b.project} to confirm.`));let U=a("input");U.placeholder=b.project,U.setAttribute("aria-label","Confirm project key"),R.append(U),R.append(s("Delete resolved threads",()=>{h(async()=>{await m("/clear-resolved","POST",{confirm:U.value}),i?.(!1),u.textContent="Resolved threads deleted.",U.value=""})},"secondary destructive")),b.hosted&&R.append(s("Delete project",()=>{h(async()=>{await m("","DELETE",{confirm:U.value}),i?.(!0),d.replaceChildren(),u.textContent="Project deleted. Its project slot is available again."})},"secondary destructive")),d.append(R)};return g().catch(e=>{403!==e?.status&&(o.hidden=!1,u.textContent="Project settings unavailable.",d.append(s("Retry",()=>{h(g)},"secondary")))}),o}function c(e,t){let r=a("section","onboarding-panel"),i=a("p","account-usage-status");i.setAttribute("role","status");let l=e=>{i.textContent=e instanceof Error?e.message:"Try again."},c=async()=>{let p=encodeURIComponent(t.workspace),d=a("div","account-sites"),u=a("div","account-sites-summary");u.append(a("span","","Approved sites"),n("chevron")),d.append(u),d.setAttribute("aria-busy","true"),i.textContent="",r.replaceChildren(o(e,`usage?workspace=${p}`,!1),d,i);try{let o=await e.request(`workspace?workspace=${p}`);if(!r.isConnected)return;i.textContent="";let c=a("section","account-sites");c.dataset.open="false";let u=s("",()=>{let e="true"!==c.dataset.open;c.dataset.open=String(e),u.setAttribute("aria-expanded",String(e)),v.inert=!e,v.setAttribute("aria-hidden",String(!e))},"account-sites-summary");u.setAttribute("aria-expanded","false");let v=a("div","account-sites-reveal");v.id=`approved-sites-${crypto.randomUUID()}`,v.inert=!0,v.setAttribute("aria-hidden","true"),u.setAttribute("aria-controls",v.id);let m=a("div","account-sites-clip"),b=a("span","account-sites-count");u.append(a("span","","Approved sites"),b,n("chevron"));let h=a("div","account-sites-content"),y=a("div","approved-sites"),g=()=>{b.textContent=String(o.sites.length),y.replaceChildren(...o.sites.map(e=>a("span","",new URL(e).host)))};g();let f=a("label","account-name-label","Website"),w=a("input");w.type="url",w.placeholder="https://your-site.com",w.setAttribute("autocomplete","url"),w.value=t.site||o.suggested.find(e=>!o.sites.includes(e))||"",f.append(w);let A=s("Approve site",async()=>{let a;try{let e=new URL(w.value.trim());if("https:"!==e.protocol||e.username||e.password)throw Error("Enter an HTTPS website address.");a=e.origin}catch(e){return void l(e)}let n=[...o.sites],s=w.value;o.sites.includes(a)||o.sites.push(a),g(),w.value="",A.disabled=!0;try{await e.request("workspace/sites","POST",{project:t.workspace,origin:a}),t.site=void 0,i.textContent="Site approved"}catch(e){o.sites=n,g(),w.value||(w.value=s),l(e)}finally{A.disabled=!1}},"secondary");w.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),A.click())});let C=a("div","account-usage-note account-sites-note");C.append(n("info"),a("span","","Approved sites can show and share comments. Localhost comments are visible by default.")),h.append(y,f,A,C),m.append(h),v.append(m),c.append(u,v),d.replaceWith(c)}catch(e){l(e),r.append(s("Retry",()=>{c()},"secondary"))}};if(t.invite){let n=s("Accept invitation",async()=>{n.disabled=!0;try{await e.request("project/join","POST",{invite:t.invite}),t.invite=void 0,r.replaceChildren(a("p","","You’re in. Return to the website to leave comments."))}catch(e){l(e),n.disabled=!1}},"primary");r.append(n,i)}else if(t.workspace)c();else if(t.code||t.claimKey){let a=s(t.code?"Create project":"Enable comments",async()=>{a.disabled=!0;let n=a.textContent;a.textContent=t.code?"Creating project…":"Enabling comments…";try{if(t.code){let a=await e.request("setup/complete","POST",{code:t.code});t.workspace=a.project,t.code=void 0,history.replaceState(null,"",`/setup?workspace=${encodeURIComponent(a.project)}`),await c(),i.textContent="Project ready. Return to your terminal."}else await e.request("owner/claim","POST",{key:t.claimKey}),t.claimKey=void 0,r.replaceChildren(o(e),i),i.textContent="Comments are ready."}catch(e){l(e),a.disabled=!1,a.textContent=n}},"primary");r.append(a,i)}else r.append(o(e));return r}export{o as accountUsage,c as onboardingPanel,l as projectManagement};
1
+ import{b as e,c as t}from"./chunk-ILX63XAJ.js";import{j as a,k as n,l as s}from"./chunk-PLSWBSSX.js";async function r(e,t=""){let r;try{let a=await e.request(`project/sites${t}`);r=[...a.fixed,...a.sites]}catch{return null}let i=a("div","approved-sites-editor");i.dataset.open="false";let o=a("span","approved-sites-count"),l=s("Sites with comments",()=>{let e="true"!==i.dataset.open;i.dataset.open=String(e),l.setAttribute("aria-expanded",String(e)),c.inert=!e},"approved-sites-toggle");l.replaceChildren(a("span","","Sites with comments"),o,n("chevron")),l.setAttribute("aria-expanded","false");let c=a("div","approved-sites-reveal");c.id=`approved-sites-${crypto.randomUUID()}`,c.inert=!0,l.setAttribute("aria-controls",c.id);let p=a("div","approved-sites-body"),d=a("ul","approved-site-list"),u=a("p","account-usage-status");u.setAttribute("role","status");let v=a("div","approved-site-add"),m=a("input");m.type="text",m.inputMode="url",m.spellcheck=!1,m.placeholder="your-site.com",m.setAttribute("aria-label","Site to approve"),m.setAttribute("autocomplete","off");let b=a("div","account-usage-note account-sites-note");b.append(n("info"),a("span","","Only these sites can show comments. Add * to cover preview links."));let h=async a=>{let n=r;r=a,f(),u.textContent="";try{let n=await e.request(`project/sites${t}`,"PATCH",{sites:a});return r=[...n.fixed,...n.sites],f(),!0}catch(e){return r=n,f(),u.textContent=e instanceof Error?e.message:"Try again.",!1}},y=s("Add",async()=>{let e;try{e=function(e){let t=e.trim().replace(/\/$/,"").toLowerCase();if(/^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?$/.test(t))return t;let a=/^https:\/\/([^/?#@\s]+)$/.exec(t.includes("://")?t:`https://${t}`),[n="",...s]=(a?.[1]??"").split(".");if(!a||s.length<1||s.join(".").includes("*")||n.split("*").length>2||n.includes("*")&&s.length<2)throw new Error("That doesn’t look like a site. Try your-site.com or *-preview.your-site.com.");return`https://${a[1]}`}(m.value)}catch(e){return void(u.textContent=e.message)}if(r.includes(e))return m.value="",void(u.textContent="Already on the list.");let t=m.value;m.value="",y.disabled=!0,await h([...r,e])||(m.value||=t),y.disabled=!1,m.focus()},"secondary");m.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),y.click())}),v.append(m,y);let g=e=>{let t=a("li","approved-site"),n=a("span","",e.replace(/^https:\/\//,""));return n.title=e,t.append(n,s(`Remove ${e}`,()=>{h(r.filter(t=>t!==e))},"icon","close")),t},f=()=>{o.textContent=String(r.length),d.replaceChildren(...r.map(g))};return f(),p.append(d,v,b,u),c.append(p),i.append(l,c),i}var i=new WeakMap;function o(e,n="usage",o=!0,l=!1){let c=a("section","account-usage");c.setAttribute("aria-label","Account usage");let p=(e="")=>{let t=a("span",`usage-skeleton ${e}`);return t.setAttribute("aria-hidden","true"),t},d=e.user?.id,u=e.token,v=()=>e.user?.id===d&&e.token===u,m=i.get(e);m||i.set(e,m=new Map);let b=JSON.stringify([d,u,n]),h=m.get(b);h||m.set(b,h={});let y=e=>{c.setAttribute("aria-busy","false"),c.replaceChildren(a("h3","",`${e.hosted?"Starter plan":"Self-hosted"}${l?" · Local":""}`));let{used:t,limit:n}=e.comments,s=a("div","account-usage-label account-comments"),r=a("span","account-comment-count");if(r.append(a("span","",null===n?`${t.toLocaleString()} / Unlimited`:`${t.toLocaleString()} / ${n.toLocaleString()}`)),s.title="Includes replies and deleted comments.",null!==n){let e=a("span","account-usage-ring");e.setAttribute("role","meter"),e.setAttribute("aria-label","Project comments"),e.setAttribute("aria-valuemin","0"),e.setAttribute("aria-valuemax",String(n)),e.setAttribute("aria-valuenow",String(Math.min(t,n))),e.setAttribute("aria-valuetext",`${t} of ${n} comments used, including replies and deleted comments`),e.style.setProperty("--usage",(n>0?100*Math.min(t/n,1):0)+"%"),e.dataset.full=String(t>=n),r.append(e)}if(s.append(a("span","","Project comments"),r),c.append(s),e.projects){let{used:t,limit:n}=e.projects;if(null===n){let e=a("div","account-usage-label");return e.append(a("span","","Projects"),a("span","",`${t.toLocaleString()} / Unlimited`)),void c.append(e)}let s=a("div","account-projects"),r=a("div","account-usage-label"),i=a("span","account-project-count");i.append(a("strong","",String(t)),a("span","",`of ${n}`)),r.append(a("span","","Projects"),i);let o=a("div","account-project-slots");o.setAttribute("role","meter"),o.setAttribute("aria-label","Projects"),o.setAttribute("aria-valuemin","0"),o.setAttribute("aria-valuemax",String(n)),o.setAttribute("aria-valuenow",String(t)),o.setAttribute("aria-valuetext",`${t} of ${n} projects used`);for(let e=0;e<n;e++){let n=a("span");n.dataset.used=String(e<t),o.append(n)}s.append(r,o),c.append(s)}},g=async()=>{if(!v())return c.replaceChildren(),void c.setAttribute("aria-busy","false");h.value?y(h.value):(()=>{let e=a("div","usage-skeleton-heading");e.append(p("usage-skeleton-title"));let t=a("div","account-usage-label account-comments"),n=a("span","account-comment-count");n.append(p("usage-skeleton-count"),p("usage-skeleton-ring")),t.append(p("usage-skeleton-label"),n);let s=a("div","account-projects"),r=a("div","account-usage-label");r.append(p("usage-skeleton-label"),p("usage-skeleton-count"));let i=a("div","account-project-slots");i.setAttribute("aria-hidden","true"),i.append(a("span"),a("span"),a("span")),s.append(r,i);let o=a("span","sr-only","Loading account usage");o.setAttribute("role","status"),c.setAttribute("aria-busy","true"),c.replaceChildren(e,t,s,o)})(),c.setAttribute("aria-busy","true");try{let t,a=h.pending??=e.request(n);try{t=await a}finally{h.pending===a&&(h.pending=void 0)}if(!v())return delete h.value,c.replaceChildren(),void c.setAttribute("aria-busy","false");if(h.value=t,!c.isConnected)return;y(t),o&&e.user?.verified&&(async()=>{let t=n.includes("?")?n.slice(n.indexOf("?")):"",a=await r(e,t);a&&h.value&&c.isConnected&&v()&&c.append(a)})().catch(()=>{})}catch(e){if(e instanceof t&&(401===e.status||403===e.status)&&delete h.value,!v())return delete h.value,c.replaceChildren(),void c.setAttribute("aria-busy","false");if(!c.isConnected)return;h.value?y(h.value):c.replaceChildren(),c.setAttribute("aria-busy","false");let n=a("span","account-usage-status",h.value?"Couldn’t refresh usage":"Usage unavailable");n.setAttribute("role","status"),c.append(n,s("Retry",()=>{g()},"secondary"))}};return g(),c}function l(t,r,i){let o=a("section","account-sites project-management");o.dataset.open="false";let l=s("Project settings",()=>{let e="true"!==o.dataset.open;o.dataset.open=String(e),l.setAttribute("aria-expanded",String(e)),c.inert=!e,c.setAttribute("aria-hidden",String(!e))},"account-sites-summary");l.append(n("chevron")),l.setAttribute("aria-expanded","false");let c=a("div","account-sites-reveal");c.id=`project-settings-${crypto.randomUUID()}`,l.setAttribute("aria-controls",c.id),c.inert=!0,c.setAttribute("aria-hidden","true");let p=a("div","account-sites-clip");c.append(p);let d=a("div","account-sites-content"),u=a("p","account-usage-status");u.setAttribute("role","status");let v=r?`?workspace=${encodeURIComponent(r)}`:"",m=(e,a="GET",n)=>t.request(`project${e}${v}`,a,n);o.hidden=!0,p.append(d,u),o.append(l,c);let b,h=async e=>{let t=Array.from(o.querySelectorAll("button"));t.forEach(e=>e.disabled=!0),u.textContent="";try{await e()}catch(e){u.textContent=e instanceof Error?e.message:"Try again."}finally{t.forEach(e=>e.disabled=!1)}},y=async()=>{let e,n={format:"komo-export",version:1,project:b.project,exportedAt:(new Date).toISOString(),tables:{}};for(let a of["threads","comments","reactions","users"]){n.tables[a]=[];let s=0;for(;null!==s;){let i=await t.request(`project/export?table=${a}&offset=${s}${void 0===e?"":`&revision=${e}`}${r?`&workspace=${encodeURIComponent(r)}`:""}`);e=i.revision,n.tables[a].push(...i.rows),s=i.next}}let s=URL.createObjectURL(new Blob([JSON.stringify(n,null,2)],{type:"application/json"})),i=a("a");i.href=s,i.download=`${b.project}-comments.json`,i.click(),setTimeout(()=>URL.revokeObjectURL(s),1e3),u.textContent="Export downloaded."},g=async()=>{b=await m(""),o.hidden=!1,d.replaceChildren();let t=a("div","account-name-label");t.append(a("span","","Access"));let n,r=[["public","Anyone with the link"],["private","Invited Google accounts"]],l=()=>{let a=e("Project access",r,b.access,e=>{h(async()=>{let t=b.access;b.access=e,l();try{await m("","PATCH",{access:e}),u.textContent="Access updated."}catch(e){throw b.access=t,l(),e}})});n?n.replaceWith(a):t.append(a),n=a};l(),d.append(t);let c=await m("/webhook"),p=a("details","project-webhook");p.append(a("summary","","Comment webhooks"));let v=a("p","project-help","Send signed events to your HTTPS endpoint. Signing secrets are encrypted and shown only when entered.");p.append(v),c.deliveryAvailable||(v.textContent="Secure webhook delivery is not available on this server yet.");let f=a("label","account-name-label","HTTPS endpoint"),w=a("input");w.type="url",w.autocomplete="off",w.placeholder="https://example.com/komo-webhook",w.value=c.url,f.append(w),p.append(f);let A=a("label","account-name-label",c.secretConfigured?"Replace signing secret":"Signing secret"),k=a("input");k.type="password",k.autocomplete="new-password",k.minLength=32,k.maxLength=256,A.append(k),p.append(A);let C=new Map;for(let e of c.supportedEvents){let t=a("label","account-name-label",e),n=a("input");n.type="checkbox",n.checked=c.events.includes(e),C.set(e,n),t.prepend(n),p.append(t)}let x=a("label","account-name-label","Enable delivery"),j=a("input");j.type="checkbox",j.checked=c.enabled,j.disabled=!c.deliveryAvailable&&!c.enabled,x.prepend(j),p.append(x),p.append(s("Save webhook settings",()=>{h(async()=>{await m("/webhook","PATCH",{url:w.value,secret:k.value,events:[...C].filter(([,e])=>e.checked).map(([e])=>e),enabled:j.checked}),k.value="",u.textContent="Webhook settings saved."})},"secondary")),d.append(p);let S=a("label","account-name-label","Invite someone"),$=a("input");$.type="email",$.placeholder="name@example.com",$.autocomplete="email",S.append($);let E=a("input");E.readOnly=!0,E.hidden=!0,E.setAttribute("aria-label","Invitation link");let T=s("Create invitation",()=>{h(async()=>{if(!$.checkValidity()||!$.value)throw Error("Enter an email address.");let e=await m("/invites","POST",{email:$.value});E.value=e.url,E.hidden=!1,P.hidden=!1,u.textContent="Share this link. It expires in 7 days."})},"secondary"),P=s("Copy invitation",()=>{h(async()=>{await navigator.clipboard.writeText(E.value),u.textContent="Invitation copied."})},"secondary");P.hidden=!0,d.append(S,T,E,P);for(let e of b.members){let t=a("div","project-member");t.append(a("span","",e.name),s(`Remove ${e.name}`,()=>{h(async()=>{await m("/members","DELETE",{user:e.id}),await g(),u.textContent="Member removed."})},"secondary")),d.append(t)}for(let e of b.invites){let t=a("div","project-member");t.append(a("span","",e.email),s("Revoke invitation",()=>{h(async()=>{await m("/invites","DELETE",{email:e.email}),await g(),u.textContent="Invitation revoked."})},"secondary")),d.append(t)}d.append(s("Download comments",()=>{h(y)},"secondary"));let L=a("a","project-help","Move to self-hosting");L.href="https://komo.offbr.co/hosting/#migration",L.target="_blank",L.rel="noopener noreferrer",d.append(L);let R=a("details","project-danger");R.append(a("summary","","Free space or delete project")),R.append(a("p","",`Export first. These actions permanently remove comments. Type ${b.project} to confirm.`));let U=a("input");U.placeholder=b.project,U.setAttribute("aria-label","Confirm project key"),R.append(U),R.append(s("Delete resolved threads",()=>{h(async()=>{await m("/clear-resolved","POST",{confirm:U.value}),i?.(!1),u.textContent="Resolved threads deleted.",U.value=""})},"secondary destructive")),b.hosted&&R.append(s("Delete project",()=>{h(async()=>{await m("","DELETE",{confirm:U.value}),i?.(!0),d.replaceChildren(),u.textContent="Project deleted. Its project slot is available again."})},"secondary destructive")),d.append(R)};return g().catch(e=>{403!==e?.status&&(o.hidden=!1,u.textContent="Project settings unavailable.",d.append(s("Retry",()=>{h(g)},"secondary")))}),o}function c(e,t){let r=a("section","onboarding-panel"),i=a("p","account-usage-status");i.setAttribute("role","status");let l=e=>{i.textContent=e instanceof Error?e.message:"Try again."},c=async()=>{let p=encodeURIComponent(t.workspace),d=a("div","account-sites"),u=a("div","account-sites-summary");u.append(a("span","","Approved sites"),n("chevron")),d.append(u),d.setAttribute("aria-busy","true"),i.textContent="",r.replaceChildren(o(e,`usage?workspace=${p}`,!1),d,i);try{let o=await e.request(`workspace?workspace=${p}`);if(!r.isConnected)return;i.textContent="";let c=a("section","account-sites");c.dataset.open="false";let u=s("",()=>{let e="true"!==c.dataset.open;c.dataset.open=String(e),u.setAttribute("aria-expanded",String(e)),v.inert=!e,v.setAttribute("aria-hidden",String(!e))},"account-sites-summary");u.setAttribute("aria-expanded","false");let v=a("div","account-sites-reveal");v.id=`approved-sites-${crypto.randomUUID()}`,v.inert=!0,v.setAttribute("aria-hidden","true"),u.setAttribute("aria-controls",v.id);let m=a("div","account-sites-clip"),b=a("span","account-sites-count");u.append(a("span","","Approved sites"),b,n("chevron"));let h=a("div","account-sites-content"),y=a("div","approved-sites"),g=()=>{b.textContent=String(o.sites.length),y.replaceChildren(...o.sites.map(e=>a("span","",new URL(e).host)))};g();let f=a("label","account-name-label","Website"),w=a("input");w.type="url",w.placeholder="https://your-site.com",w.setAttribute("autocomplete","url"),w.value=t.site||o.suggested.find(e=>!o.sites.includes(e))||"",f.append(w);let A=s("Approve site",async()=>{let a;try{let e=new URL(w.value.trim());if("https:"!==e.protocol||e.username||e.password)throw Error("Enter an HTTPS website address.");a=e.origin}catch(e){return void l(e)}let n=[...o.sites],s=w.value;o.sites.includes(a)||o.sites.push(a),g(),w.value="",A.disabled=!0;try{await e.request("workspace/sites","POST",{project:t.workspace,origin:a}),t.site=void 0,i.textContent="Site approved"}catch(e){o.sites=n,g(),w.value||(w.value=s),l(e)}finally{A.disabled=!1}},"secondary");w.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),A.click())});let k=a("div","account-usage-note account-sites-note");k.append(n("info"),a("span","","Approved sites can show and share comments. Localhost comments are visible by default.")),h.append(y,f,A,k),m.append(h),v.append(m),c.append(u,v),d.replaceWith(c)}catch(e){l(e),r.append(s("Retry",()=>{c()},"secondary"))}};if(t.invite){let n=s("Accept invitation",async()=>{n.disabled=!0;try{await e.request("project/join","POST",{invite:t.invite}),t.invite=void 0,r.replaceChildren(a("p","","You’re in. Return to the website to leave comments."))}catch(e){l(e),n.disabled=!1}},"primary");r.append(n,i)}else if(t.workspace)c();else if(t.code||t.claimKey){let a=s(t.code?"Create project":"Enable comments",async()=>{a.disabled=!0;let n=a.textContent;a.textContent=t.code?"Creating project…":"Enabling comments…";try{if(t.code){let a=await e.request("setup/complete","POST",{code:t.code});t.workspace=a.project,t.code=void 0,history.replaceState(null,"",`/setup?workspace=${encodeURIComponent(a.project)}`),await c(),i.textContent="Project ready. Return to your terminal."}else await e.request("owner/claim","POST",{key:t.claimKey}),t.claimKey=void 0,r.replaceChildren(o(e),i),i.textContent="Comments are ready."}catch(e){l(e),a.disabled=!1,a.textContent=n}},"primary");r.append(a,i)}else r.append(o(e));return r}export{o as accountUsage,c as onboardingPanel,l as projectManagement};
package/dist/react.js CHANGED
@@ -1 +1 @@
1
- "use client";import{b as e,c as n,f as t,z as r}from"./chunk-JXIYWNFL.js";import{b as o}from"./chunk-MEWRC57H.js";import"./chunk-URGMAMH5.js";import"./chunk-DH22G2S5.js";import"./chunk-53M6AOAX.js";import"./chunk-WGISPOJV.js";import"./chunk-ANKCS6NI.js";import{useEffect as s,useRef as c}from"react";function u(e){let n=c(null);s(()=>{if(n.current&&function(e,n){return[...new Set([...Object.keys(e),...Object.keys(n)])].every(t=>{if("shortcuts"===t||"features"===t||"frame"===t){let r=e[t]??{},o=n[t]??{};return Object.keys({...r,...o}).every(e=>Object.is(r[e],o[e]))}if("design"===t){let t=e.design,r=n.design;if(!t||!r)return t===r;let o=t.themes??[],s=r.themes??[];return t.tokens===r.tokens&&t.components===r.components&&o.length===s.length&&o.every((e,n)=>e===s[n])}if("onboarding"!==t)return Object.is(e[t],n[t]);let r=e.onboarding,o=n.onboarding;return r&&o?Object.keys({...r,...o}).every(e=>"sites"===e?r.sites?.length===o.sites?.length&&(r.sites??[]).every((e,n)=>e===o.sites?.[n]):Object.is(r[e],o[e])):r===o})}(n.current.config,e)||(n.current?.controller.destroy(),n.current=null,!1===e.enabled))return;let t={...e,...e.onboarding?{onboarding:{...e.onboarding,...e.onboarding.sites?{sites:[...e.onboarding.sites]}:{}}}:{}};n.current={config:t,controller:o(t)}}),s(()=>()=>{n.current?.controller.destroy(),n.current=null},[])}function i(t){let r=c(null),o=c(null);return o.current||(o.current=e=>{r.current=e}),s(()=>{if(!0===t.enabled&&r.current)return e(r.current,t.component,t.props,t.onChange)},[t.enabled,t.component]),s(()=>{!0===t.enabled&&n(r.current,t.component,t.props,t.onChange)},[t.enabled,t.component,t.props,t.onChange]),{ref:o.current,"data-komo-inspectable":t.component.id}}function l(e){s(()=>{if(!0!==e.enabled)return;let n=e.root??document.documentElement;return t(n,e.tokens)},[e.root,e.tokens,e.enabled])}export{r as cssVariableTokens,u as useKomo,l as useKomoDesignTokens,i as useKomoInspectable};
1
+ "use client";import{b as e,c as n,f as t,z as r}from"./chunk-JXIYWNFL.js";import{b as o}from"./chunk-Q7LTQCKY.js";import"./chunk-ILX63XAJ.js";import"./chunk-DH22G2S5.js";import"./chunk-53M6AOAX.js";import"./chunk-WGISPOJV.js";import"./chunk-PLSWBSSX.js";import{useEffect as s,useRef as c}from"react";function u(e){let n=c(null);s(()=>{if(n.current&&function(e,n){return[...new Set([...Object.keys(e),...Object.keys(n)])].every(t=>{if("shortcuts"===t||"features"===t||"frame"===t){let r=e[t]??{},o=n[t]??{};return Object.keys({...r,...o}).every(e=>Object.is(r[e],o[e]))}if("design"===t){let t=e.design,r=n.design;if(!t||!r)return t===r;let o=t.themes??[],s=r.themes??[];return t.tokens===r.tokens&&t.components===r.components&&o.length===s.length&&o.every((e,n)=>e===s[n])}if("onboarding"!==t)return Object.is(e[t],n[t]);let r=e.onboarding,o=n.onboarding;return r&&o?Object.keys({...r,...o}).every(e=>"sites"===e?r.sites?.length===o.sites?.length&&(r.sites??[]).every((e,n)=>e===o.sites?.[n]):Object.is(r[e],o[e])):r===o})}(n.current.config,e)||(n.current?.controller.destroy(),n.current=null,!1===e.enabled))return;let t={...e,...e.onboarding?{onboarding:{...e.onboarding,...e.onboarding.sites?{sites:[...e.onboarding.sites]}:{}}}:{}};n.current={config:t,controller:o(t)}}),s(()=>()=>{n.current?.controller.destroy(),n.current=null},[])}function i(t){let r=c(null),o=c(null);return o.current||(o.current=e=>{r.current=e}),s(()=>{if(!0===t.enabled&&r.current)return e(r.current,t.component,t.props,t.onChange)},[t.enabled,t.component]),s(()=>{!0===t.enabled&&n(r.current,t.component,t.props,t.onChange)},[t.enabled,t.component,t.props,t.onChange]),{ref:o.current,"data-komo-inspectable":t.component.id}}function l(e){s(()=>{if(!0!==e.enabled)return;let n=e.root??document.documentElement;return t(n,e.tokens)},[e.root,e.tokens,e.enabled])}export{r as cssVariableTokens,u as useKomo,l as useKomoDesignTokens,i as useKomoInspectable};
package/dist/setup.js CHANGED
@@ -1 +1 @@
1
- import{a as o,c as n}from"./chunk-MEWRC57H.js";import"./chunk-URGMAMH5.js";import"./chunk-DH22G2S5.js";import"./chunk-53M6AOAX.js";import"./chunk-WGISPOJV.js";import"./chunk-ANKCS6NI.js";function r(r){return(s={})=>n(o({...r,...s}))}export{r as defineKomo};
1
+ import{a as o,c as n}from"./chunk-Q7LTQCKY.js";import"./chunk-ILX63XAJ.js";import"./chunk-DH22G2S5.js";import"./chunk-53M6AOAX.js";import"./chunk-WGISPOJV.js";import"./chunk-PLSWBSSX.js";function r(r){return(s={})=>n(o({...r,...s}))}export{r as defineKomo};
@@ -1 +1 @@
1
- import{a as e,b as t,c as r,j as n,k as i,l as o,m as a}from"./chunk-WGISPOJV.js";import{c as l,h as c,l as u,o as d}from"./chunk-ANKCS6NI.js";import{createRoot as s}from"react-dom/client";import{flushSync as m}from"react-dom";import{createElement as p}from"react";import*as h from"react";var f=({size:e=24,color:t="currentColor",...r})=>h.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},h.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));f.displayName="ChevronSelectorVertical";import*as g from"react";var b=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M18 6 6 18M6 6l12 12"}));b.displayName="XClose";import*as y from"react";var v=({size:e=24,color:t="currentColor",...r})=>y.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},y.createElement("path",{d:"M19 12H5m0 0 7 7m-7-7 7-7"}));v.displayName="ArrowLeft";import*as k from"react";var x=({size:e=24,color:t="currentColor",...r})=>k.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},k.createElement("path",{d:"m9 18 6-6-6-6"}));x.displayName="ChevronRight";import{useEffect as w,useId as _,useLayoutEffect as N,useRef as T,useState as E}from"react";import{useState as C}from"react";import{Fragment as M,jsx as L,jsxs as S}from"react/jsx-runtime";function A({items:l,defaultActiveId:u,activeId:d,edge:s="bottom",alignEnd:m=!1,onActiveChange:p,label:h="App navigation",moreLabel:g="More",backLabel:y="Back",className:k="",style:x}){let A=_(),[I,P]=E({kind:"collapsed"}),[$,W]=E(u??l[0]?.id),[O,R]=E(null),z=T(null),H=T(null),Y=T(s),q="left"===s||"right"===s;N(()=>{let e=H.current;if(!e||!O)return;let t=0,r=0,n=document.documentElement.clientWidth,i=window.innerHeight;for(let o=e.parentNode;o instanceof Element&&o!==document.body;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode){let e=getComputedStyle(o),a=o.getBoundingClientRect();"visible"!==e.overflowX&&(t=Math.max(t,a.left),n=Math.min(n,a.right)),"visible"!==e.overflowY&&(r=Math.max(r,a.top),i=Math.min(i,a.bottom))}e.style.maxWidth=`${Math.max(0,n-t-16)}px`,e.style.left=`${O.x}px`,e.style.top=`${O.y}px`;let o=e.getBoundingClientRect(),a=Math.max(t+8-o.left,Math.min(0,n-8-o.right)),l=Math.max(r+8-o.top,Math.min(0,i-8-o.bottom));e.style.left=`${O.x+a}px`,e.style.top=`${O.y+l}px`},[O]);let D=T(null),F=T(null),X=T(I),K=T("more"),V=T(!1),G=T(!1),J=T(!1),Q=T(null),U=T(void 0),Z=T(void 0),ee=T(!1),te=T(!1),re=function(){!i.current&&o();let[e]=C(n.current);return e}(),ne=d??$,ie="collapsed"!==I.kind,oe=l.filter(e=>!1!==e.showInBar),ae=oe.find(e=>"dismiss"===e.id),le=oe.filter(e=>"dismiss"!==e.id),ce=l.filter(e=>e.children?.length),ue=T(new Map),de=T(new Map),se=oe.map(e=>e.id).join("|");function me(){clearTimeout(U.current),R(null)}function pe(){me(),clearTimeout(Z.current),ee.current=!1}function he(e,t,r=!1){clearTimeout(U.current);let n=z.current,i=F.current;if(!n||!i||ie||G.current||J.current&&!r)return;let o=n.getBoundingClientRect(),a=e.getBoundingClientRect(),l={label:t,x:"left"===s?o.width+8:"right"===s?-8:a.left-o.left+a.width/2,y:"top"===s?o.height+8:"bottom"===s?-8:a.top-o.top+a.height/2};clearTimeout(Z.current);let c=()=>{ee.current=!0,R(l)};r||ee.current?c():U.current=setTimeout(c,400)}function fe(e,t,r){pe(),ie||(K.current=t,V.current=r),Q.current="first",P(e)}function ge(e=!0,t=K.current){pe(),J.current=!0,Q.current=e&&V.current?t:null,P({kind:"collapsed"})}function be(){"group"===I.kind&&(Q.current=I.id,P({kind:"main"}))}function ye(e,t){let r=!!e.children?.length,n=ne===e.id||!!e.children?.some(e=>e.id===ne),i=!t&&e.keepOpenOnSelect,o=(t,r=!1)=>L(j,{label:e.label,icon:r,reduced:!!re,children:t}),a=n&&e.activeIcon?e.activeIcon:e.icon,l=S(M,{children:[L("span",{className:"morphing-menu__icon","aria-hidden":"true",style:i?{display:"grid"}:void 0,children:i?o(a,!0):a}),!t&&L("span",{className:"morphing-menu__label",style:i?{display:"grid"}:void 0,children:i?o(e.label):e.label}),!t&&r&&L(B,{})]}),c={className:t?"morphing-menu__shortcut":"morphing-menu__row","data-menu-item":e.id,"aria-label":e.label,"aria-current":n?r?"true":"page":void 0,"aria-expanded":r?"group"===I.kind&&I.id===e.id:void 0,"aria-controls":r?`${A}-group-${e.id}`:void 0,onClick:t=>r?fe({kind:"group",id:e.id},e.id,0===t.detail):function(e){W(e.id),p?.(e.id),ie&&!e.keepOpenOnSelect?ge(!0,"group"===I.kind?I.id:e.id):pe(),e.onSelect?.()}(e),onPointerEnter:r=>{t&&"mouse"===r.pointerType&&he(r.currentTarget,e.label)},onPointerLeave:me,onPointerDown:pe,onFocus:r=>{t&&r.currentTarget.matches(":focus-visible")&&he(r.currentTarget,e.label,!0)},onBlur:me};return e.href&&!r?L("a",{href:e.href,...c,children:l},e.id):L("button",{type:"button",...c,children:l},e.id)}N(()=>{let t=new Map,r=[...F.current?.querySelectorAll("[data-menu-item]")??[]].map(e=>{let r=e.dataset.menuItem,n=[e.offsetLeft,e.offsetTop];return t.set(r,n),{node:e,id:r,position:n,before:ue.current.get(r)}});for(let{node:t,id:n,position:i,before:o}of r)re||V.current?(de.current.get(n)?.complete(),de.current.delete(n)):o&&(o[0]!==i[0]||o[1]!==i[1])&&(de.current.get(n)?.complete(),de.current.set(n,a(t,{x:[o[0]-i[0],0],y:[o[1]-i[1],0]},e)));for(let[e,r]of de.current)t.has(e)||(r.stop(),de.current.delete(e));ue.current=t},[se,s,I,re]),w(()=>()=>{for(let e of de.current.values())e.stop()},[]),N(()=>{let n=z.current,i=D.current,o=F.current;if(!n||!i||!o)return;let l=Y.current!==s;Y.current=s;let c=X.current;X.current=I;let u=[...n.querySelectorAll(".morphing-menu__panel")],d=u.find(e=>"false"===e.getAttribute("aria-hidden")),m=[],p=!1,h=e=>(m.push(e),e),f=()=>({width:d?.offsetWidth??o.offsetWidth,height:d?.offsetHeight??o.offsetHeight}),g=l||c.kind!==I.kind||"group"===c.kind&&"group"===I.kind&&c.id!==I.id,b="collapsed"===c.kind!=("collapsed"===I.kind),y=re||!g;if(y)(()=>{let e=f();i.style.width=`${e.width}px`,i.style.height=`${e.height}px`})();else if(b&&!ie)h(a(i,f(),r));else if(b){let r=Math.min(o.offsetWidth,o.offsetWidth>250?280:200);h(a(i,{width:r,height:o.offsetHeight>52?32:28},t)).finished.then(()=>{p||h(a(i,f(),{...e,bounce:ie?.24:.15}))}).catch(()=>{})}else h(a(i,f(),{...e,duration:.25,bounce:.1}));h(a(o,{opacity:ie?0:1,scale:ie&&!re?.8:1,filter:ie&&!re?"blur(8px)":"blur(0px)"},{duration:y?0:ie?.15:.22,delay:y||ie?0:.08,...ie?{}:{ease:"easeOut"}}));for(let t of u){let r=t===d;for(let[n,i]of[...t.querySelectorAll(".morphing-menu__row")].entries())r&&b&&!y&&Object.assign(i.style,{opacity:"0",transform:"translateY(48px)",filter:"blur(4px)"}),h(a(i,{opacity:r?1:0,y:r||re?0:16,filter:r||re?"blur(0px)":"blur(2px)"},{...e,duration:y?0:r?b?.4:.25:.12,bounce:b?.3:0,delay:!y&&r?(b?.2:0)+.02*n:0}))}let v=[...(ie?d:o)?.querySelectorAll("[data-menu-item]")??[]],k=Q.current;Q.current=null,k&&(G.current=!0,(("first"===k?v[0]:v.find(e=>e.dataset.menuItem===k))??(ie?void 0:v.find(e=>"more"===e.dataset.menuItem)))?.focus({preventScroll:!0}),G.current=!1);let x=()=>P(e=>({...e}));return window.addEventListener("resize",x),()=>{p=!0,m.forEach(e=>e.stop()),window.removeEventListener("resize",x)}},[I,re,s,l.length,oe.length]),w(()=>{if(!ie)return;let e=new AbortController;return c(z.current,"pointerdown",e=>{e.target instanceof Node&&!e.composedPath().includes(z.current)&&ge(!1)},{signal:e.signal}),()=>e.abort()},[ie]),w(()=>()=>{clearTimeout(U.current),clearTimeout(Z.current)},[]);let ve=S("button",{type:"button",className:"morphing-menu__row","data-menu-item":"close",onClick:()=>ge(!0,"more"),children:[L(b,{"aria-hidden":"true"}),L("span",{className:"morphing-menu__label",children:"Close drawer"})]});return S("nav",{ref:z,"aria-label":h,className:["morphing-menu",k].filter(Boolean).join(" "),"data-view":I.kind,"data-edge":s,"data-vertical":q,"data-align-end":m,style:{"--mm-count":oe.length+1,...x},onPointerMove:e=>{if(!J.current||"mouse"!==e.pointerType||!e.movementX&&!e.movementY)return;J.current=!1;let t=e.target instanceof Element?e.target.closest(".morphing-menu__shortcut"):null;t&&he(t,t.getAttribute("aria-label")??"")},onKeyDown:e=>{"Escape"===e.key&&(J.current=!0,pe(),ie&&(e.preventDefault(),e.stopPropagation(),"group"===I.kind?be():ge()))},onBlur:e=>{e.relatedTarget instanceof Node&&e.currentTarget.contains(e.relatedTarget)||(ie?e.relatedTarget instanceof Node&&ge(!1):te.current||pe())},children:[S("div",{ref:D,className:"morphing-menu__shell",children:[S("div",{ref:F,className:"morphing-menu__bar","aria-hidden":ie,inert:ie,onPointerEnter:e=>{"mouse"===e.pointerType&&(te.current=!0,clearTimeout(Z.current))},onPointerLeave:e=>{"mouse"===e.pointerType&&(te.current=!1,me(),clearTimeout(Z.current),Z.current=setTimeout(()=>{ee.current=!1},300))},children:[le.map(e=>ye(e,!0)),L("button",{type:"button",className:"morphing-menu__shortcut","data-menu-item":"more","aria-label":g,"aria-expanded":ie,"aria-controls":`${A}-main`,onClick:e=>fe({kind:"main"},"more",0===e.detail),onPointerEnter:e=>{"mouse"===e.pointerType&&he(e.currentTarget,g)},onPointerLeave:me,onPointerDown:pe,onBlur:me,onFocus:e=>{e.currentTarget.matches(":focus-visible")&&he(e.currentTarget,g,!0)},children:L(f,{"aria-hidden":"true"})}),ae&&ye(ae,!0)]}),S("div",{id:`${A}-main`,className:"morphing-menu__panel","aria-hidden":"main"!==I.kind,inert:"main"!==I.kind,children:[[...l].sort((e,t)=>(e.expandedOrder??0)-(t.expandedOrder??0)).map(e=>ye(e,!1)),ve]}),ce.map(e=>{let t="group"===I.kind&&I.id===e.id;return S("div",{id:`${A}-group-${e.id}`,className:"morphing-menu__panel","aria-label":e.label,"aria-hidden":!t,inert:!t,children:[S("button",{type:"button",className:"morphing-menu__row","data-menu-item":"back",onClick:be,children:[L(v,{"aria-hidden":"true"}),L("span",{children:y})]}),e.children.map(e=>ye(e,!1)),ve]},e.id)})]}),O&&!ie&&L("div",{ref:H,className:"morphing-menu__tooltip","aria-hidden":"true",style:{left:O.x,top:O.y},children:O.label})]})}function B(){return L(x,{className:"morphing-menu__chevron","aria-hidden":"true"})}function j({label:e,icon:t,reduced:r,children:n}){let i=T(null),o=T(null);return N(()=>{let n=i.current,a=o.current;if(o.current={label:e,node:n.cloneNode(!0)},!a||a.label===e||r)return;let l=a.node;l.setAttribute("aria-hidden","true"),n.parentElement.append(l);let c={duration:200,easing:"cubic-bezier(.22,1,.36,1)"},u=n.animate([{opacity:0,transform:t?"scale(.7)":"translateY(4px)",filter:"blur(2px)"},{opacity:1,transform:"none",filter:"blur(0px)"}],c),d=l.animate([{opacity:1,transform:"none",filter:"blur(0px)"},{opacity:0,transform:t?"scale(.7)":"translateY(-4px)",filter:"blur(2px)"}],c);return d.finished.then(()=>l.remove()).catch(()=>{}),()=>{u.cancel(),d.cancel(),l.remove()}},[e,t,r]),L("span",{ref:i,style:{gridArea:"1 / 1",display:"flex",alignItems:"center"},children:n})}function I(e){if("glyph"in e)return p("span",{style:{display:"contents"},dangerouslySetInnerHTML:{__html:l[e.glyph]}});let{user:t}=e,r=t&&d(t);return p("span",{className:"review-avatar"},t?u(t.name):I({glyph:"person"}),r&&p("img",{key:r,src:r,alt:"",referrerPolicy:"no-referrer",decoding:"async",onError:e=>{e.currentTarget.hidden=!0}}))}var P=e=>p(A,{...e,items:e.items.map(e=>({...e,icon:I(e.icon)}))});function $(e,t){e.replaceChildren();let r=s(e);return m(()=>r.render(P(t))),{render:e=>r.render(P(e)),unmount:()=>r.unmount()}}export{$ as mountToolbar};
1
+ import{a as e,b as t,c as r,j as n,k as i,l as o,m as a}from"./chunk-WGISPOJV.js";import{c as l,i as c,m as u,p as d}from"./chunk-PLSWBSSX.js";import{createRoot as s}from"react-dom/client";import{flushSync as m}from"react-dom";import{createElement as p}from"react";import*as h from"react";var f=({size:e=24,color:t="currentColor",...r})=>h.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},h.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));f.displayName="ChevronSelectorVertical";import*as g from"react";var b=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M18 6 6 18M6 6l12 12"}));b.displayName="XClose";import*as y from"react";var v=({size:e=24,color:t="currentColor",...r})=>y.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},y.createElement("path",{d:"M19 12H5m0 0 7 7m-7-7 7-7"}));v.displayName="ArrowLeft";import*as k from"react";var x=({size:e=24,color:t="currentColor",...r})=>k.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},k.createElement("path",{d:"m9 18 6-6-6-6"}));x.displayName="ChevronRight";import{useEffect as w,useId as _,useLayoutEffect as T,useRef as N,useState as E}from"react";import{useState as C}from"react";import{Fragment as L,jsx as M,jsxs as S}from"react/jsx-runtime";function B({items:l,defaultActiveId:u,activeId:d,edge:s="bottom",alignEnd:m=!1,onActiveChange:p,label:h="App navigation",moreLabel:g="More",backLabel:y="Back",className:k="",style:x}){let B=_(),[A,$]=E({kind:"collapsed"}),[I,W]=E(u??l[0]?.id),[O,R]=E(null),z=N(null),H=N(null),Y=N(s),q="left"===s||"right"===s;T(()=>{let e=H.current;if(!e||!O)return;let t=0,r=0,n=document.documentElement.clientWidth,i=window.innerHeight;for(let o=e.parentNode;o instanceof Element&&o!==document.body;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode){let e=getComputedStyle(o),a=o.getBoundingClientRect();"visible"!==e.overflowX&&(t=Math.max(t,a.left),n=Math.min(n,a.right)),"visible"!==e.overflowY&&(r=Math.max(r,a.top),i=Math.min(i,a.bottom))}e.style.maxWidth=`${Math.max(0,n-t-16)}px`,e.style.left=`${O.x}px`,e.style.top=`${O.y}px`;let o=e.getBoundingClientRect(),a=Math.max(t+8-o.left,Math.min(0,n-8-o.right)),l=Math.max(r+8-o.top,Math.min(0,i-8-o.bottom));e.style.left=`${O.x+a}px`,e.style.top=`${O.y+l}px`},[O]);let D=N(null),X=N(null),F=N(A),V=N("more"),G=N(!1),J=N(!1),K=N(!1),Q=N(null),U=N(void 0),Z=N(void 0),ee=N(!1),te=N(!1),re=function(){!i.current&&o();let[e]=C(n.current);return e}(),ne=d??I,ie="collapsed"!==A.kind,oe=l.filter(e=>!1!==e.showInBar),ae=oe.find(e=>"dismiss"===e.id),le=oe.filter(e=>"dismiss"!==e.id),ce=l.filter(e=>e.children?.length),ue=N(new Map),de=N(new Map),se=oe.map(e=>e.id).join("|");function me(){clearTimeout(U.current),R(null)}function pe(){me(),clearTimeout(Z.current),ee.current=!1}function he(e,t,r=!1){clearTimeout(U.current);let n=z.current,i=X.current;if(!n||!i||ie||J.current||K.current&&!r)return;let o=n.getBoundingClientRect(),a=e.getBoundingClientRect(),l={label:t,x:"left"===s?o.width+8:"right"===s?-8:a.left-o.left+a.width/2,y:"top"===s?o.height+8:"bottom"===s?-8:a.top-o.top+a.height/2};clearTimeout(Z.current);let c=()=>{ee.current=!0,R(l)};r||ee.current?c():U.current=setTimeout(c,400)}function fe(e,t,r){pe(),ie||(V.current=t,G.current=r),Q.current="first",$(e)}function ge(e=!0,t=V.current){pe(),K.current=!0,Q.current=e&&G.current?t:null,$({kind:"collapsed"})}function be(){"group"===A.kind&&(Q.current=A.id,$({kind:"main"}))}function ye(e,t){let r=!!e.children?.length,n=ne===e.id||!!e.children?.some(e=>e.id===ne),i=!t&&e.keepOpenOnSelect,o=(t,r=!1)=>M(j,{label:e.label,icon:r,reduced:!!re,children:t}),a=n&&e.activeIcon?e.activeIcon:e.icon,l=S(L,{children:[M("span",{className:"morphing-menu__icon","aria-hidden":"true",style:i?{display:"grid"}:void 0,children:i?o(a,!0):a}),!t&&M("span",{className:"morphing-menu__label",style:i?{display:"grid"}:void 0,children:i?o(e.label):e.label}),!t&&r&&M(P,{})]}),c={className:t?"morphing-menu__shortcut":"morphing-menu__row","data-menu-item":e.id,"aria-label":e.label,"aria-current":n?r?"true":"page":void 0,"aria-expanded":r?"group"===A.kind&&A.id===e.id:void 0,"aria-controls":r?`${B}-group-${e.id}`:void 0,onClick:t=>r?fe({kind:"group",id:e.id},e.id,0===t.detail):function(e){W(e.id),p?.(e.id),ie&&!e.keepOpenOnSelect?ge(!0,"group"===A.kind?A.id:e.id):pe(),e.onSelect?.()}(e),onPointerEnter:r=>{t&&"mouse"===r.pointerType&&he(r.currentTarget,e.label)},onPointerLeave:me,onPointerDown:pe,onFocus:r=>{t&&r.currentTarget.matches(":focus-visible")&&he(r.currentTarget,e.label,!0)},onBlur:me};return e.href&&!r?M("a",{href:e.href,...c,children:l},e.id):M("button",{type:"button",...c,children:l},e.id)}T(()=>{let t=new Map,r=[...X.current?.querySelectorAll("[data-menu-item]")??[]].map(e=>{let r=e.dataset.menuItem,n=[e.offsetLeft,e.offsetTop];return t.set(r,n),{node:e,id:r,position:n,before:ue.current.get(r)}});for(let{node:t,id:n,position:i,before:o}of r)re||G.current?(de.current.get(n)?.complete(),de.current.delete(n)):o&&(o[0]!==i[0]||o[1]!==i[1])&&(de.current.get(n)?.complete(),de.current.set(n,a(t,{x:[o[0]-i[0],0],y:[o[1]-i[1],0]},e)));for(let[e,r]of de.current)t.has(e)||(r.stop(),de.current.delete(e));ue.current=t},[se,s,A,re]),w(()=>()=>{for(let e of de.current.values())e.stop()},[]),T(()=>{let n=z.current,i=D.current,o=X.current;if(!n||!i||!o)return;let l=Y.current!==s;Y.current=s;let c=F.current;F.current=A;let u=[...n.querySelectorAll(".morphing-menu__panel")],d=u.find(e=>"false"===e.getAttribute("aria-hidden")),m=[],p=!1,h=e=>(m.push(e),e),f=()=>({width:d?.offsetWidth??o.offsetWidth,height:d?.offsetHeight??o.offsetHeight}),g=l||c.kind!==A.kind||"group"===c.kind&&"group"===A.kind&&c.id!==A.id,b="collapsed"===c.kind!=("collapsed"===A.kind),y=re||!g;if(y)(()=>{let e=f();i.style.width=`${e.width}px`,i.style.height=`${e.height}px`})();else if(b&&!ie)h(a(i,f(),r));else if(b){let r=Math.min(o.offsetWidth,o.offsetWidth>250?280:200);h(a(i,{width:r,height:o.offsetHeight>52?32:28},t)).finished.then(()=>{p||h(a(i,f(),{...e,bounce:ie?.24:.15}))}).catch(()=>{})}else h(a(i,f(),{...e,duration:.25,bounce:.1}));h(a(o,{opacity:ie?0:1,scale:ie&&!re?.8:1,filter:ie&&!re?"blur(8px)":"blur(0px)"},{duration:y?0:ie?.15:.22,delay:y||ie?0:.08,...ie?{}:{ease:"easeOut"}}));for(let t of u){let r=t===d;for(let[n,i]of[...t.querySelectorAll(".morphing-menu__row")].entries())r&&b&&!y&&Object.assign(i.style,{opacity:"0",transform:"translateY(48px)",filter:"blur(4px)"}),h(a(i,{opacity:r?1:0,y:r||re?0:16,filter:r||re?"blur(0px)":"blur(2px)"},{...e,duration:y?0:r?b?.4:.25:.12,bounce:b?.3:0,delay:!y&&r?(b?.2:0)+.02*n:0}))}let v=[...(ie?d:o)?.querySelectorAll("[data-menu-item]")??[]],k=Q.current;Q.current=null,k&&(J.current=!0,(("first"===k?v[0]:v.find(e=>e.dataset.menuItem===k))??(ie?void 0:v.find(e=>"more"===e.dataset.menuItem)))?.focus({preventScroll:!0}),J.current=!1);let x=()=>$(e=>({...e}));return window.addEventListener("resize",x),()=>{p=!0,m.forEach(e=>e.stop()),window.removeEventListener("resize",x)}},[A,re,s,l.length,oe.length]),w(()=>{if(!ie)return;let e=new AbortController;return c(z.current,"pointerdown",e=>{e.target instanceof Node&&!e.composedPath().includes(z.current)&&ge(!1)},{signal:e.signal}),()=>e.abort()},[ie]),w(()=>()=>{clearTimeout(U.current),clearTimeout(Z.current)},[]);let ve=S("button",{type:"button",className:"morphing-menu__row","data-menu-item":"close",onClick:()=>ge(!0,"more"),children:[M(b,{"aria-hidden":"true"}),M("span",{className:"morphing-menu__label",children:"Close drawer"})]});return S("nav",{ref:z,"aria-label":h,className:["morphing-menu",k].filter(Boolean).join(" "),"data-view":A.kind,"data-edge":s,"data-vertical":q,"data-align-end":m,style:{"--mm-count":oe.length+1,...x},onPointerMove:e=>{if(!K.current||"mouse"!==e.pointerType||!e.movementX&&!e.movementY)return;K.current=!1;let t=e.target instanceof Element?e.target.closest(".morphing-menu__shortcut"):null;t&&he(t,t.getAttribute("aria-label")??"")},onKeyDown:e=>{"Escape"===e.key&&(K.current=!0,pe(),ie&&(e.preventDefault(),e.stopPropagation(),"group"===A.kind?be():ge()))},onBlur:e=>{e.relatedTarget instanceof Node&&e.currentTarget.contains(e.relatedTarget)||(ie?e.relatedTarget instanceof Node&&ge(!1):te.current||pe())},children:[S("div",{ref:D,className:"morphing-menu__shell",children:[S("div",{ref:X,className:"morphing-menu__bar","aria-hidden":ie,inert:ie,onPointerEnter:e=>{"mouse"===e.pointerType&&(te.current=!0,clearTimeout(Z.current))},onPointerLeave:e=>{"mouse"===e.pointerType&&(te.current=!1,me(),clearTimeout(Z.current),Z.current=setTimeout(()=>{ee.current=!1},300))},children:[le.map(e=>ye(e,!0)),M("button",{type:"button",className:"morphing-menu__shortcut","data-menu-item":"more","aria-label":g,"aria-expanded":ie,"aria-controls":`${B}-main`,onClick:e=>fe({kind:"main"},"more",0===e.detail),onPointerEnter:e=>{"mouse"===e.pointerType&&he(e.currentTarget,g)},onPointerLeave:me,onPointerDown:pe,onBlur:me,onFocus:e=>{e.currentTarget.matches(":focus-visible")&&he(e.currentTarget,g,!0)},children:M(f,{"aria-hidden":"true"})}),ae&&ye(ae,!0)]}),S("div",{id:`${B}-main`,className:"morphing-menu__panel","aria-hidden":"main"!==A.kind,inert:"main"!==A.kind,children:[[...l].sort((e,t)=>(e.expandedOrder??0)-(t.expandedOrder??0)).map(e=>ye(e,!1)),ve]}),ce.map(e=>{let t="group"===A.kind&&A.id===e.id;return S("div",{id:`${B}-group-${e.id}`,className:"morphing-menu__panel","aria-label":e.label,"aria-hidden":!t,inert:!t,children:[S("button",{type:"button",className:"morphing-menu__row","data-menu-item":"back",onClick:be,children:[M(v,{"aria-hidden":"true"}),M("span",{children:y})]}),e.children.map(e=>ye(e,!1)),ve]},e.id)})]}),O&&!ie&&M("div",{ref:H,className:"morphing-menu__tooltip","aria-hidden":"true",style:{left:O.x,top:O.y},children:O.label})]})}function P(){return M(x,{className:"morphing-menu__chevron","aria-hidden":"true"})}function j({label:e,icon:t,reduced:r,children:n}){let i=N(null),o=N(null);return T(()=>{let n=i.current,a=o.current;if(o.current={label:e,node:n.cloneNode(!0)},!a||a.label===e||r)return;let l=a.node;l.setAttribute("aria-hidden","true"),n.parentElement.append(l);let c={duration:200,easing:"cubic-bezier(.22,1,.36,1)"},u=n.animate([{opacity:0,transform:t?"scale(.7)":"translateY(4px)",filter:"blur(2px)"},{opacity:1,transform:"none",filter:"blur(0px)"}],c),d=l.animate([{opacity:1,transform:"none",filter:"blur(0px)"},{opacity:0,transform:t?"scale(.7)":"translateY(-4px)",filter:"blur(2px)"}],c);return d.finished.then(()=>l.remove()).catch(()=>{}),()=>{u.cancel(),d.cancel(),l.remove()}},[e,t,r]),M("span",{ref:i,style:{gridArea:"1 / 1",display:"flex",alignItems:"center"},children:n})}function A(e){if("glyph"in e)return p("span",{style:{display:"contents"},dangerouslySetInnerHTML:{__html:l[e.glyph]}});let{user:t}=e,r=t&&d(t);return p("span",{className:"review-avatar"},t?u(t.name):A({glyph:"person"}),r&&p("img",{key:r,src:r,alt:"",referrerPolicy:"no-referrer",decoding:"async",onError:e=>{e.currentTarget.hidden=!0}}))}var $=e=>p(B,{...e,items:e.items.map(e=>({...e,icon:A(e.icon)}))});function I(e,t){e.replaceChildren();let r=s(e);return m(()=>r.render($(t))),{render:e=>r.render($(e)),unmount:()=>r.unmount()}}export{I as mountToolbar};
package/dist/types.d.ts CHANGED
@@ -134,9 +134,10 @@ export interface CommentsOptions {
134
134
  pickRoots?: () => Element[];
135
135
  /**
136
136
  * Frame view scales body-level portals (dialogs, overlays, toasts) with the
137
- * page. By default it frames each position: fixed child of body without an
138
- * inline transform; script-positioned popovers already follow their framed
139
- * anchors. `include` overrides that choice per body child.
137
+ * page, including fixed descendants of portal wrappers. Script-positioned
138
+ * popovers keep their viewport placement while their contents scale.
139
+ * `include` overrides the default per body child; true maps the whole child
140
+ * through the frame, and false leaves its subtree alone.
140
141
  */
141
142
  frame?: {
142
143
  include?(element: HTMLElement): boolean;
@@ -152,6 +153,13 @@ export interface CommentsOptions {
152
153
  * identity. All optional; see DesignSystem.
153
154
  */
154
155
  design?: DesignSystem;
156
+ /**
157
+ * Optional persistent owner for a picked comment target, e.g. a domain card.
158
+ * Return a connected ancestor in the same dialog/popover boundary. By default
159
+ * data-comment-anchor owners and uniquely identified semantic cards are used.
160
+ * Click/area offsets remain relative to that owner; Design inspection stays precise.
161
+ */
162
+ anchorTarget?: (element: Element) => Element | undefined;
155
163
  /** Resolve an anchor to a repository-relative source path. */
156
164
  source?: (element: Element) => string | undefined;
157
165
  /** Defaults to GitHub's source viewer. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hazem3500/komo",
3
- "version": "0.9.17",
3
+ "version": "0.9.19",
4
4
  "description": "Point, area, and threaded comments for website branches.",
5
5
  "type": "module",
6
6
  "license": "MIT",