@hazem3500/palette 0.9.142 → 0.9.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-menu.d.ts +5 -0
- package/dist/chunk-J3GQR7DO.js +1 -0
- package/dist/chunk-YTERJGYZ.js +1 -0
- package/dist/dom.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/{onboarding-MUQIIX4Z.js → onboarding-SIHSWUZ6.js} +1 -1
- package/dist/pin-groups-DNQKE7QU.js +1 -0
- package/dist/pin-groups.d.ts +6 -0
- package/dist/react.js +1 -1
- package/dist/server.js +1 -1
- package/dist/setup.js +1 -1
- package/package.json +1 -1
- package/server/setup-client.txt +62 -62
- package/dist/chunk-U4PPYJHK.js +0 -1
- package/dist/chunk-ZEJDB2HZ.js +0 -1
- package/dist/pin-groups-5EDXVGG2.js +0 -1
package/dist/chunk-ZEJDB2HZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){let i=n("details","comment-menu"),o=n("summary","icon");o.setAttribute("aria-label",e),o.setAttribute("aria-haspopup","menu"),o.setAttribute("aria-expanded","false"),o.title=e,o.append(r("more"));let l=n("div","comment-menu-items");l.popover="manual",l.setAttribute("role","menu"),l.setAttribute("aria-label",e);let s=t.map(e=>{let t=a(e.label,()=>{i.open=!1,o.focus({preventScroll:!0}),e.onSelect()},"menu-action"+(e.destructive?" destructive":""),e.icon);return t.append(n("span","",e.label)),t.setAttribute("role","menuitem"),t.tabIndex=-1,l.append(t),t});return i.addEventListener("toggle",()=>{if(o.setAttribute("aria-expanded",String(i.open)),i.open){l.showPopover();let e=o.getBoundingClientRect();l.style.left=`${Math.max(8,Math.min(e.right-l.offsetWidth,innerWidth-l.offsetWidth-8))}px`,l.style.top=`${Math.max(8,Math.min(e.bottom+6,innerHeight-l.offsetHeight-8))}px`,(s.find(e=>"true"===e.getAttribute("aria-checked"))??s[0])?.focus({preventScroll:!0})}else l.hidePopover()}),i.addEventListener("keydown",e=>{if(!i.open)return;let t,n=s.indexOf(e.target);"ArrowDown"===e.key&&(t=(n+1)%s.length),"ArrowUp"===e.key&&(t=(n-1+s.length)%s.length),"Home"===e.key&&(t=0),"End"===e.key&&(t=s.length-1),void 0!==t&&(e.preventDefault(),s[t]?.focus()),"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),i.open=!1,o.focus({preventScroll:!0})),"Tab"===e.key&&(i.open=!1)}),i.append(o,l),i}function t(t,a,i,o){let l=e(t,a.map(([e,t])=>({label:t,icon:"check",onSelect:()=>o(e)})));l.classList.add("selection-menu");let s=l.querySelector("summary");return s.className="selection-trigger",s.replaceChildren(n("span","selection-label",a.find(([e])=>e===i)?.[1]),r("chevron")),l.querySelectorAll("[role=menuitem]").forEach((e,t)=>{e.setAttribute("role","menuitemradio"),e.setAttribute("aria-checked",String(a[t][0]===i))}),l}import{E as n,F as r,G as a}from"./chunk-QFONAD5S.js";export{e as a,t as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as t,L as e}from"./chunk-QFONAD5S.js";var n=new WeakSet;function o(t){if(!n.has(t)){n.add(t);for(let e of[document,t])e.addEventListener("pointerdown",e=>{for(let n of t.querySelectorAll(".pin-stack[data-open]"))e.composedPath().includes(n)||n.removeAttribute("data-open")},!0)}}function a({threads:e,rect:n,right:a,owner:l},r){o(r.root);let i=t("div","pin-stack"),s=i.dataset.pointer=a?"right":"left",c=(l.getAttribute("aria-label")||l.textContent||"").trim().replace(/\s+/g," ").slice(0,40);i.setAttribute("role","group"),i.setAttribute("aria-label",`${e.length} comments on ${c||"this element"}`),e.length>3&&(i.dataset.more="+"+(e.length-1));let p=n.y-6-38*Math.ceil(e.length/6)<r.bounds.top;i.toggleAttribute("data-below",p),Object.assign(i.style,{left:`${a?n.x+9:n.x-9}px`,top:`${p?n.y-18:n.y+6}px`,translate:`${a?"-100%":"0"} ${p?"0":"-100%"}`});let m=!1;return i.addEventListener("pointerdown",t=>{m="mouse"!==t.pointerType&&!i.matches(".pin-stack:is([data-open],:hover,:focus-within,:has(.active,.hot))")},!0),i.addEventListener("click",t=>{m&&(m=!1,t.stopPropagation(),i.toggleAttribute("data-open",!0))},!0),e.forEach((t,n)=>{let o=r.pin(t);o.dataset.pointer=s,o.style.zIndex=String(e.length-n),i.append(o)}),i}function l(t,n,a){o(a.root);let l=a.menu(`${n.length} comments nearby`,n.map(t=>({label:`${t.comments[0]?.author.name}: ${a.summary(t)}`,icon:"comment",onSelect:()=>a.open(t)})));l.className+=" pin-cluster",l.dataset.cluster=n.map(t=>t.id).join(" ");let r=l.firstElementChild;r.className="",r.textContent=String(n.length),l.querySelectorAll(".menu-action svg").forEach((t,o)=>{let a=n[o].comments[0]?.author;a&&t.replaceWith(e(a))});let i=0,s=0;for(let{box:e}of t)i+=(e.left+e.right)/2/t.length,s+=(e.top+e.bottom)/2/t.length;let{left:c,top:p,right:m,bottom:h}=a.bounds;return Object.assign(l.style,{left:`${Math.max(c+14,Math.min(i,m-14))}px`,top:`${Math.max(p+14,Math.min(s,h-14))}px`}),l}export{l as bubble,a as stack};
|