vue-pointing-bubble 0.5.0 → 0.5.1

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.
@@ -9,5 +9,5 @@ export { easeGeometry } from './ease';
9
9
  export type { EaseHandle } from './ease';
10
10
  export { buildTailPaths } from './tail';
11
11
  export type { BuildTailOptions } from './tail';
12
- export { createBubbleController } from './createBubbleController';
12
+ export { createBubbleController, isBubbleVisible, } from './createBubbleController';
13
13
  export type { BubbleRenderState, BubbleControllerOptions, BubbleController, } from './createBubbleController';
@@ -30,5 +30,7 @@ export interface BubbleController {
30
30
  getState: () => BubbleRenderState;
31
31
  destroy: () => void;
32
32
  }
33
+ /** True when the bubble chrome is painted (not display/visibility/opacity hidden). */
34
+ export declare function isBubbleVisible(el: HTMLElement): boolean;
33
35
  export declare function createBubbleController(options: BubbleControllerOptions): BubbleController;
34
36
  export type { BubbleTarget };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("vue"),N={target:null,placement:"auto",targetAnchor:"center",tailLength:45,tailBaseWidth:24,padding:8,shadow:!0,transitionDuration:200},j="pointing-bubble-styles",Q=`:where(.pointing-bubble__inner) {
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("vue"),Z={target:null,placement:"auto",targetAnchor:"center",tailLength:45,tailBaseWidth:24,padding:8,shadow:!0,transitionDuration:200},U="pointing-bubble-styles",ot=`:where(.pointing-bubble__inner) {
2
2
  box-sizing: border-box;
3
3
  width: var(--pb-width, max-content);
4
4
  max-width: var(--pb-max-width, none);
@@ -6,4 +6,4 @@
6
6
  background: white;
7
7
  border: 2px solid gray;
8
8
  border-radius: 8px;
9
- }`,tt="drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25))";function et(n=document){if(n.getElementById(j))return;const t=n.createElement("style");t.id=j,t.textContent=Q,n.head.prepend(t)}function q(n){return typeof n=="object"&&n!==null&&typeof n.x=="number"&&typeof n.y=="number"&&n.nodeType!==1}function R(n){return typeof Element>"u"||n==null?null:typeof n=="string"?document.querySelector(n):n instanceof Element?n:null}function I(n,t){return!n||!t?!1:Object.keys(n).every(e=>n[e]===t[e])}function U(n){let t=n.parentElement;for(;t;){const e=getComputedStyle(t).position;if(e&&e!=="static")return t;if(t===document.documentElement)break;t=t.parentElement}return document.documentElement}function nt(n){const t=n.getBoundingClientRect(),e=getComputedStyle(n),i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return{left:t.left,top:t.top,width:i,height:o,scaleX:i?t.width/i:1,scaleY:o?t.height/o:1,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}function ot(n){return nt(U(n))}function lt(n,t){const e=getComputedStyle(n),{scaleX:i,scaleY:o,left:u,top:d}=t,r=n.getBoundingClientRect();return{x:(r.left-u)/i,y:(r.top-d)/o,width:r.width/i,height:r.height/o,fill:e.backgroundColor,stroke:e.borderTopColor,strokeWidth:parseFloat(e.borderTopWidth)||0,borderLeft:(parseFloat(e.borderLeftWidth)||0)/i,borderTop:(parseFloat(e.borderTopWidth)||0)/o,radius:e.borderTopLeftRadius,zIndex:e.zIndex}}function D(n,t,e){const i=n.x-e;let o=i,u=t.width?t.width-n.x-e:1/0;return t.viewportWidth&&(o=Math.min(o,t.left/t.scaleX+i),u=Math.min(u,(t.viewportWidth-t.left)/t.scaleX-n.x-e)),{left:Math.max(0,o),right:Math.max(0,u)}}function X(n){return n.left>n.right?"left":"right"}function H(n){const{tip:t,box:e,frame:i,placement:o,targetRect:u,room:d,tailLength:r}=n;if(!e.width||!e.height)return null;const{width:s,height:p}=e,{x:h,y:m}=t,W=o==="manual",c=n.targetAnchor==="edge"?u:null;if(W){if(c){const b=e.x+s/2,k=e.y+p/2;if(!(b>=c.left&&b<=c.right&&k>=c.top&&k<=c.bottom)){const g=Math.min(c.right,Math.max(c.left,b)),l=Math.min(c.bottom,Math.max(c.top,k));return{placement:"manual",tx:g,ty:l,bx:e.x,by:e.y,w:s,h:p}}}return{placement:"manual",tx:h,ty:m,bx:e.x,by:e.y,w:s,h:p}}const _=b=>c?b==="top"?c.top:c.bottom:m;let B=o;if(o==="auto"){let b=m>(i.height||600)/2?"top":"bottom",k=X(d);const{scaleX:M,scaleY:g}=i;if(i.viewportHeight){const l=i.top+(_("top")-p-r)*g>=0,x=i.top+(_("bottom")+p+r)*g<=i.viewportHeight;b==="top"&&!l&&x?b="bottom":b==="bottom"&&!x&&l&&(b="top")}if(i.viewportWidth){const l=i.left+(h-s-r)*M>=0,x=i.left+(h+s+r)*M<=i.viewportWidth;k==="left"&&!l&&x?k="right":k==="right"&&!x&&l&&(k="left")}B=`${b}-${k}`}const[a,$]=B.split("-"),w=_(a);return{placement:B,tx:h,ty:w,bx:$==="left"?h-s-r:h+r,by:a==="top"?w-p-r:w+r,w:s,h:p}}const it=["tx","ty","bx","by"],rt=["tx","ty"];function st(){return typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches}function at(n,t,e,i){let o=0;const u=()=>{typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(o)};if(!t||!n||e<=0||typeof requestAnimationFrame>"u"||st())return i(t),{cancel:u};const d=performance.now(),r=s=>{const p=Math.min(1,(s-d)/e),h=1-Math.pow(1-p,3),m={...t},W=t.placement==="manual"?rt:it;for(const c of W)m[c]=n[c]+(t[c]-n[c])*h;i(m),p<1&&(o=requestAnimationFrame(r))};return o=requestAnimationFrame(r),{cancel:u}}function G(n){const{geometry:t,strokeWidth:e,radius:i,tailBaseWidth:o}=n,{placement:u,tx:d,ty:r,bx:s,by:p,w:h,h:m}=t,W=parseFloat(i)*(i.endsWith("%")?Math.min(h,m)/100:1)||0,c=o/2,_=(S,y,P)=>y>P?(y+P)/2:Math.min(P,Math.max(y,S));let B=null,a=0;if(u==="manual"){const S=Math.max(s-d,d-(s+h),0),y=Math.max(p-r,r-(p+m),0);if(S>0&&S>=y)B=d<s?"left":"right",a=r;else if(y>0)B=r<p?"top":"bottom",a=d;else return null}else if(u!=="none"){const[S,y]=u.split("-");B=y==="left"?"right":"left",a=p+m*(S==="top"?.65:.35)}else return null;const $=B==="top"||B==="bottom",w={left:(S,y)=>[s-y,S],right:(S,y)=>[s+h+y,S],top:(S,y)=>[S,p-y],bottom:(S,y)=>[S,p+m+y]}[B],b=$?s:p,k=$?s+h:p+m,M=_(a,b+c+e/2+W,k-c-e/2-W),g=([S,y])=>`${S} ${y}`,l=e>0?-e/2:0,x=2,C=2,v=M-c,L=M+c,F=w(v-x,l),A=w(v,l),E=w(L,l),T=w(L+x,l),O=w(v,-(e+C)),V=w(L,-(e+C)),K=w(v,1),J=w(L,1);return{fill:`M ${g(O)} L ${g(K)} L ${g(A)} L ${d} ${r} L ${g(E)} L ${g(J)} L ${g(V)} Z`,stroke:e?`M ${g(F)} L ${g(A)} L ${d} ${r} L ${g(E)} L ${g(T)}`:null}}function ct(n){return{hasTarget:n,placement:"none",tip:null,slotTip:null,boxStyle:{},svgStyle:{},tail:null,boxFill:"",boxStroke:"",boxStrokeWidth:0,boxZIndex:"auto"}}function Y(n,t){return n===t?!0:!n||!t?!1:n.x===t.x&&n.y===t.y}function ut(n,t){return n.hasTarget===t.hasTarget&&n.placement===t.placement&&n.boxFill===t.boxFill&&n.boxStroke===t.boxStroke&&n.boxStrokeWidth===t.boxStrokeWidth&&n.boxZIndex===t.boxZIndex&&Y(n.tip,t.tip)&&Y(n.slotTip,t.slotTip)&&I(n.boxStyle,t.boxStyle)&&I(n.svgStyle,t.svgStyle)&&n.tail?.fill===t.tail?.fill&&n.tail?.stroke===t.tail?.stroke}function Z(n){et();let t={...N},e=null,i=null,o=null,u={left:0,top:0,width:0,height:0,scaleX:1,scaleY:1,viewportWidth:0,viewportHeight:0},d=null,r=null,s=null,p=null,h=null,m=null,W=ct(!1);const c=()=>{const l=_();ut(W,l)||(W=l,n.onChange?.(W))};function _(){const l=t.target!=null,x=t.placement==="manual",C=l?d?.placement??"none":"none",v={"--pb-padding":typeof t.padding=="number"?`${t.padding}px`:t.padding};if(t.maxWidth!=null&&(v["--pb-max-width"]=`${t.maxWidth}px`),t.shadow&&(v.filter=tt),!l)v["--pb-width"]="fit-content";else if(Object.assign(v,{position:"absolute",pointerEvents:"auto",overflow:"visible"}),x)v["--pb-width"]="fit-content";else if(Object.assign(v,{left:`${d?.bx??0}px`,top:`${d?.by??0}px`,margin:"0"}),t.maxWidth==null&&e){const E=D(e,u,t.tailLength),T=r?.placement??t.placement,O=T==="auto"?X(E):T.split("-")[1];v["--pb-max-width"]=`${E[O]}px`}const L=o?.zIndex;L&&L!=="auto"&&(v.zIndex=L);const F=l&&d&&o?G({geometry:d,strokeWidth:o.strokeWidth,radius:o.radius,tailBaseWidth:t.tailBaseWidth}):null;let A={};if(F&&d&&u.width&&u.height){const E=o?.borderLeft??0,T=o?.borderTop??0;A={position:"absolute",left:`${-d.bx-E}px`,top:`${-d.by-T}px`,width:`${u.width}px`,height:`${u.height}px`,overflow:"visible",pointerEvents:"none",zIndex:o?.zIndex??"auto"}}return{hasTarget:l,placement:C,tip:e,slotTip:r?{x:r.tx,y:r.ty}:e,boxStyle:v,svgStyle:A,tail:F,boxFill:o?.fill??"",boxStroke:o?.stroke??"",boxStrokeWidth:o?.strokeWidth??0,boxZIndex:o?.zIndex??"auto"}}function B(){if(!e||!o){r=null,a(null);return}const l=D(e,u,t.tailLength);r=H({tip:e,box:o,frame:u,placement:t.placement,targetAnchor:t.targetAnchor,targetRect:i,room:l,tailLength:t.tailLength}),a(r)}function a(l){s?.cancel(),s=at(d,l,t.transitionDuration,x=>{d=x,c()})}function $(l){const x=lt(l,u);I(x,o)||(o=x)}function w(){const l=n.getBoxEl();if(t.target==null||!l){e=null,i=null,o=null,r=null,d=null,c();return}u=ot(l);const x=typeof t.target=="string"?U(l).querySelector(t.target)??R(t.target):R(t.target);if(x){const C=x.getBoundingClientRect(),{scaleX:v,scaleY:L,left:F,top:A}=u,E={left:(C.left-F)/v,top:(C.top-A)/L,right:(C.right-F)/v,bottom:(C.bottom-A)/L};I(E,i)||(i=E),e={x:(E.left+E.right)/2,y:(E.top+E.bottom)/2}}else if(q(t.target))i=null,e={x:t.target.x,y:t.target.y};else{i=null,e=null,o=null,r=null,d=null,c();return}$(l),B()}function b(){w()}typeof window<"u"&&(window.addEventListener("resize",b),window.addEventListener("scroll",b,!0));const k=w;function M(){const l=n.getBoxEl();l!==m&&(m=l,p?.disconnect(),h?.disconnect(),p=null,h=null,l&&(typeof ResizeObserver<"u"&&(p=new ResizeObserver(()=>k()),p.observe(l)),typeof MutationObserver<"u"&&(h=new MutationObserver(()=>k()),h.observe(l,{attributes:!0,attributeFilter:["style"]}))))}function g(){M(),k()}return{update:g,setConfig(l){t={...t,...l},g()},getConfig:()=>t,getState:()=>W,destroy(){s?.cancel(),p?.disconnect(),h?.disconnect(),m=null,typeof window<"u"&&(window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0))}}}const dt=["data-placement"],pt=["d","fill"],ft=["d","stroke","stroke-width"],z=f.defineComponent({name:"PointingBubble",inheritAttrs:!1,__name:"PointingBubble",props:{target:{default:null},placement:{default:"auto"},targetAnchor:{default:"center"},maxWidth:{default:void 0},tailLength:{default:45},tailBaseWidth:{default:24},padding:{default:8},shadow:{type:Boolean,default:!0},transitionDuration:{default:200}},setup(n,{expose:t}){const e=n,i=f.useAttrs(),o=f.computed(()=>i.class),u=f.computed(()=>i.style),d=f.computed(()=>{const{class:a,style:$,...w}=i;return w}),r=f.ref(null),s=f.reactive({hasTarget:!1,placement:"none",tip:null,slotTip:null,boxStyle:{},svgStyle:{},tail:null,boxFill:"",boxStroke:"",boxStrokeWidth:0,boxZIndex:"auto"});function p(a){return a==null?null:typeof a=="string"||typeof Element<"u"&&a instanceof Element?a:typeof a=="object"&&"$el"in a&&a.$el instanceof Element?a.$el:typeof a=="object"&&typeof a.x=="number"&&typeof a.y=="number"?a:null}const h=f.getCurrentInstance(),m=Z({getBoxEl:()=>r.value,onChange:a=>{Object.assign(s,a),h?.update()}});function W(){m.setConfig({target:p(e.target),placement:e.placement,targetAnchor:e.targetAnchor,maxWidth:e.maxWidth,tailLength:e.tailLength,tailBaseWidth:e.tailBaseWidth,padding:e.padding,shadow:e.shadow,transitionDuration:e.transitionDuration})}f.watch(()=>[e.target,typeof e.target=="object"&&e.target&&"x"in e.target?e.target.x:null,typeof e.target=="object"&&e.target&&"y"in e.target?e.target.y:null,e.placement,e.targetAnchor,e.maxWidth,e.tailLength,e.tailBaseWidth,e.padding,e.shadow,e.transitionDuration],W,{flush:"post"}),f.onMounted(()=>{W()}),f.onBeforeUnmount(()=>{m.destroy()});function c(){m.update()}t({update:c});const _=f.computed(()=>({...u.value,...s.boxStyle})),B=f.computed(()=>s.svgStyle);return(a,$)=>(f.openBlock(),f.createElementBlock("div",f.mergeProps({ref_key:"rootRef",ref:r,class:["pointing-bubble","pointing-bubble__inner",o.value],"data-placement":s.placement},d.value,{style:_.value}),[f.renderSlot(a.$slots,"default",{placement:s.placement,tip:s.slotTip},()=>[$[0]||($[0]=f.createElementVNode("p",{style:{margin:0,fontSize:"14px",fontWeight:600,color:"#1e293b"}}," Callout content ",-1))]),n.target&&s.tail?(f.openBlock(),f.createElementBlock("svg",{key:0,class:"pointing-bubble__svg",style:f.normalizeStyle(B.value)},[f.createElementVNode("path",{class:"pointing-bubble__path",d:s.tail.fill,fill:s.boxFill},null,8,pt),s.tail.stroke?(f.openBlock(),f.createElementBlock("path",{key:0,class:"pointing-bubble__path",d:s.tail.stroke,fill:"none",stroke:s.boxStroke,"stroke-width":s.boxStrokeWidth,"stroke-linejoin":"round","stroke-linecap":"butt"},null,8,ft)):f.createCommentVNode("",!0)],4)):f.createCommentVNode("",!0)],16,dt))}}),ht={install(n,t={}){const e=t.name??"PointingBubble";n.component(e,z),n.component("Callout",z)}};exports.Callout=z;exports.DEFAULT_BUBBLE_CONFIG=N;exports.PointingBubble=z;exports.PointingBubblePlugin=ht;exports.buildTailPaths=G;exports.computeGeometry=H;exports.createBubbleController=Z;exports.default=z;exports.isPoint=q;exports.resolveElement=R;
9
+ }`,lt="drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25))";function it(e=document){if(e.getElementById(U))return;const t=e.createElement("style");t.id=U,t.textContent=ot,e.head.prepend(t)}function K(e){return typeof e=="object"&&e!==null&&typeof e.x=="number"&&typeof e.y=="number"&&e.nodeType!==1}function q(e){return typeof Element>"u"||e==null?null:typeof e=="string"?document.querySelector(e):e instanceof Element?e:null}function Y(e,t){return!e||!t?!1:Object.keys(e).every(n=>e[n]===t[n])}function J(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t).position;if(n&&n!=="static")return t;if(t===document.documentElement)break;t=t.parentElement}return document.documentElement}function rt(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),l=parseFloat(n.width)||0,o=parseFloat(n.height)||0;return{left:t.left,top:t.top,width:l,height:o,scaleX:l?t.width/l:1,scaleY:o?t.height/o:1,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}function st(e){return rt(J(e))}function at(e,t){const n=getComputedStyle(e),{scaleX:l,scaleY:o,left:u,top:a}=t,i=e.getBoundingClientRect();return{x:(i.left-u)/l,y:(i.top-a)/o,width:i.width/l,height:i.height/o,fill:n.backgroundColor,stroke:n.borderTopColor,strokeWidth:parseFloat(n.borderTopWidth)||0,borderLeft:(parseFloat(n.borderLeftWidth)||0)/l,borderTop:(parseFloat(n.borderTopWidth)||0)/o,radius:n.borderTopLeftRadius,zIndex:n.zIndex}}function V(e,t,n){const l=e.x-n;let o=l,u=t.width?t.width-e.x-n:1/0;return t.viewportWidth&&(o=Math.min(o,t.left/t.scaleX+l),u=Math.min(u,(t.viewportWidth-t.left)/t.scaleX-e.x-n)),{left:Math.max(0,o),right:Math.max(0,u)}}function Q(e){return e.left>e.right?"left":"right"}function tt(e){const{tip:t,box:n,frame:l,placement:o,targetRect:u,room:a,tailLength:i}=e;if(!n.width||!n.height)return null;const{width:r,height:f}=n,{x:h,y:g}=t,E=o==="manual",c=e.targetAnchor==="edge"?u:null;if(E){if(c){const k=n.x+r/2,B=n.y+f/2;if(!(k>=c.left&&k<=c.right&&B>=c.top&&B<=c.bottom)){const b=Math.min(c.right,Math.max(c.left,k)),W=Math.min(c.bottom,Math.max(c.top,B));return{placement:"manual",tx:b,ty:W,bx:n.x,by:n.y,w:r,h:f}}}return{placement:"manual",tx:h,ty:g,bx:n.x,by:n.y,w:r,h:f}}const _=k=>c?k==="top"?c.top:c.bottom:g;let w=o;if(o==="auto"){let k=g>(l.height||600)/2?"top":"bottom",B=Q(a);const{scaleX:$,scaleY:b}=l;if(l.viewportHeight){const W=l.top+(_("top")-f-i)*b>=0,A=l.top+(_("bottom")+f+i)*b<=l.viewportHeight;k==="top"&&!W&&A?k="bottom":k==="bottom"&&!A&&W&&(k="top")}if(l.viewportWidth){const W=l.left+(h-r-i)*$>=0,A=l.left+(h+r+i)*$<=l.viewportWidth;B==="left"&&!W&&A?B="right":B==="right"&&!A&&W&&(B="left")}w=`${k}-${B}`}const[d,T]=w.split("-"),v=_(d);return{placement:w,tx:h,ty:v,bx:T==="left"?h-r-i:h+i,by:d==="top"?v-f-i:v+i,w:r,h:f}}const ct=["tx","ty","bx","by"],ut=["tx","ty"];function dt(){return typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches}function ft(e,t,n,l){let o=0;const u=()=>{typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(o)};if(!t||!e||n<=0||typeof requestAnimationFrame>"u"||dt())return l(t),{cancel:u};const a=performance.now(),i=r=>{const f=Math.min(1,(r-a)/n),h=1-Math.pow(1-f,3),g={...t},E=t.placement==="manual"?ut:ct;for(const c of E)g[c]=e[c]+(t[c]-e[c])*h;l(g),f<1&&(o=requestAnimationFrame(i))};return o=requestAnimationFrame(i),{cancel:u}}function et(e){const{geometry:t,strokeWidth:n,radius:l,tailBaseWidth:o}=e,{placement:u,tx:a,ty:i,bx:r,by:f,w:h,h:g}=t,E=parseFloat(l)*(l.endsWith("%")?Math.min(h,g)/100:1)||0,c=o/2,_=(y,m,P)=>m>P?(m+P)/2:Math.min(P,Math.max(m,y));let w=null,d=0;if(u==="manual"){const y=Math.max(r-a,a-(r+h),0),m=Math.max(f-i,i-(f+g),0);if(y>0&&y>=m)w=a<r?"left":"right",d=i;else if(m>0)w=i<f?"top":"bottom",d=a;else return null}else if(u!=="none"){const[y,m]=u.split("-");w=m==="left"?"right":"left",d=f+g*(y==="top"?.65:.35)}else return null;const T=w==="top"||w==="bottom",v={left:(y,m)=>[r-m,y],right:(y,m)=>[r+h+m,y],top:(y,m)=>[y,f-m],bottom:(y,m)=>[y,f+g+m]}[w],k=T?r:f,B=T?r+h:f+g,$=_(d,k+c+n/2+E,B-c-n/2-E),b=([y,m])=>`${y} ${m}`,W=n>0?-n/2:0,A=2,j=2,s=$-c,x=$+c,z=v(s-A,W),S=v(s,W),C=v(x,W),M=v(x+A,W),F=v(s,-(n+j)),O=v(x,-(n+j)),L=v(s,1),I=v(x,1);return{fill:`M ${b(F)} L ${b(L)} L ${b(S)} L ${a} ${i} L ${b(C)} L ${b(I)} L ${b(O)} Z`,stroke:n?`M ${b(z)} L ${b(S)} L ${a} ${i} L ${b(C)} L ${b(M)}`:null}}const pt=["left","top","right","bottom","width","height","transform","translate","inset","inset-inline","inset-block"];function ht(e){return{hasTarget:e,placement:"none",tip:null,slotTip:null,boxStyle:{},svgStyle:{},tail:null,boxFill:"",boxStroke:"",boxStrokeWidth:0,boxZIndex:"auto"}}function N(e,t){return e===t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function mt(e,t){return e===t?!0:!e||!t?!1:e.placement===t.placement&&e.tx===t.tx&&e.ty===t.ty&&e.bx===t.bx&&e.by===t.by&&e.w===t.w&&e.h===t.h}function gt(e,t){return e.hasTarget===t.hasTarget&&e.placement===t.placement&&e.boxFill===t.boxFill&&e.boxStroke===t.boxStroke&&e.boxStrokeWidth===t.boxStrokeWidth&&e.boxZIndex===t.boxZIndex&&N(e.tip,t.tip)&&N(e.slotTip,t.slotTip)&&Y(e.boxStyle,t.boxStyle)&&Y(e.svgStyle,t.svgStyle)&&e.tail?.fill===t.tail?.fill&&e.tail?.stroke===t.tail?.stroke}function X(e){if(typeof e.checkVisibility=="function")return e.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0});const t=getComputedStyle(e);return!(t.display==="none"||t.visibility==="hidden"||parseFloat(t.opacity)===0)}function G(e){const t=e.style;return pt.map(n=>t.getPropertyValue(n)).join("|")}function nt(e){it();let t={...Z},n=null,l=null,o=null,u={left:0,top:0,width:0,height:0,scaleX:1,scaleY:1,viewportWidth:0,viewportHeight:0},a=null,i=null,r=null,f=null,h=null,g=null,E=ht(!1),c=!1,_="";const w=()=>{const s=d();gt(E,s)||(E=s,e.onChange?.(E))};function d(){const s=t.target!=null,x=t.placement==="manual",z=s?a?.placement??"none":"none",S={"--pb-padding":typeof t.padding=="number"?`${t.padding}px`:t.padding};if(t.maxWidth!=null&&(S["--pb-max-width"]=`${t.maxWidth}px`),t.shadow&&(S.filter=lt),!s)S["--pb-width"]="fit-content";else if(Object.assign(S,{position:"absolute",pointerEvents:"auto",overflow:"visible"}),x)S["--pb-width"]="fit-content";else if(Object.assign(S,{left:`${a?.bx??0}px`,top:`${a?.by??0}px`,margin:"0"}),t.maxWidth==null&&n){const O=V(n,u,t.tailLength),L=i?.placement??t.placement,I=L==="auto"?Q(O):L.split("-")[1];S["--pb-max-width"]=`${O[I]}px`}const C=o?.zIndex;C&&C!=="auto"&&(S.zIndex=C);const M=s&&a&&o?et({geometry:a,strokeWidth:o.strokeWidth,radius:o.radius,tailBaseWidth:t.tailBaseWidth}):null;let F={};if(M&&a&&u.width&&u.height){const O=o?.borderLeft??0,L=o?.borderTop??0;F={position:"absolute",left:`${-a.bx-O}px`,top:`${-a.by-L}px`,width:`${u.width}px`,height:`${u.height}px`,overflow:"visible",pointerEvents:"none",zIndex:o?.zIndex??"auto"}}return{hasTarget:s,placement:z,tip:n,slotTip:i?{x:i.tx,y:i.ty}:n,boxStyle:S,svgStyle:F,tail:M,boxFill:o?.fill??"",boxStroke:o?.stroke??"",boxStrokeWidth:o?.strokeWidth??0,boxZIndex:o?.zIndex??"auto"}}function T(){if(!n||!o){(i!==null||a!==null)&&(i=null,v(null));return}const s=V(n,u,t.tailLength),x=tt({tip:n,box:o,frame:u,placement:t.placement,targetAnchor:t.targetAnchor,targetRect:l,room:s,tailLength:t.tailLength});mt(i,x)||(i=x,v(i))}function v(s){r?.cancel(),r=ft(a,s,t.transitionDuration,x=>{a=x,w()})}function k(s){const x=at(s,u);return Y(x,o)?!1:(o=x,!0)}function B(){const s=e.getBoxEl();if(!s){n=null,l=null,o=null,i=null,a=null,c=!1,w();return}if(!X(s)){r?.cancel(),c=!0;return}const x=c;if(c=!1,t.target==null){n=null,l=null,o=null,i=null,a=null,w();return}const z=u;u=st(s);const S=!Y(u,z),C=typeof t.target=="string"?J(s).querySelector(t.target)??q(t.target):q(t.target);let M=!1,F=!1;if(C){const L=C.getBoundingClientRect(),{scaleX:I,scaleY:y,left:m,top:P}=u,R={left:(L.left-m)/I,top:(L.top-P)/y,right:(L.right-m)/I,bottom:(L.bottom-P)/y};F=!Y(R,l),F&&(l=R);const H={x:(R.left+R.right)/2,y:(R.top+R.bottom)/2};M=!N(n,H),n=H}else if(K(t.target)){F=l!=null,l=null;const L={x:t.target.x,y:t.target.y};M=!N(n,L),n=L}else{n=null,l=null,o=null,i=null,a=null,w();return}const O=k(s);_=G(s),!(!x&&!S&&!M&&!F&&!O&&a)&&T()}function $(){B()}typeof window<"u"&&(window.addEventListener("resize",$),window.addEventListener("scroll",$,!0));const b=B;function W(s){const x=e.getBoxEl();if(!x)return;if(s.some(C=>C.attributeName==="class"||C.attributeName==="hidden")){if(!X(x)){r?.cancel(),c=!0;return}b();return}const S=G(x);S!==_&&(_=S,b())}function A(){const s=e.getBoxEl();s!==g&&(g=s,f?.disconnect(),h?.disconnect(),f=null,h=null,s&&(typeof ResizeObserver<"u"&&(f=new ResizeObserver(()=>b()),f.observe(s)),typeof MutationObserver<"u"&&(h=new MutationObserver(W),h.observe(s,{attributes:!0,attributeFilter:["style","class","hidden"]}))))}function j(){A(),b()}return{update:j,setConfig(s){t={...t,...s},j()},getConfig:()=>t,getState:()=>E,destroy(){r?.cancel(),f?.disconnect(),h?.disconnect(),g=null,typeof window<"u"&&(window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0))}}}const bt=["data-placement"],xt=["d","fill"],yt=["d","stroke","stroke-width"],D=p.defineComponent({name:"PointingBubble",inheritAttrs:!1,__name:"PointingBubble",props:{target:{default:null},placement:{default:"auto"},targetAnchor:{default:"center"},maxWidth:{default:void 0},tailLength:{default:45},tailBaseWidth:{default:24},padding:{default:8},shadow:{type:Boolean,default:!0},transitionDuration:{default:200}},setup(e,{expose:t}){const n=e,l=p.useAttrs(),o=p.computed(()=>l.class),u=p.computed(()=>l.style),a=p.computed(()=>{const{class:d,style:T,...v}=l;return v}),i=p.ref(null),r=p.reactive({hasTarget:!1,placement:"none",tip:null,slotTip:null,boxStyle:{},svgStyle:{},tail:null,boxFill:"",boxStroke:"",boxStrokeWidth:0,boxZIndex:"auto"});function f(d){return d==null?null:typeof d=="string"||typeof Element<"u"&&d instanceof Element?d:typeof d=="object"&&"$el"in d&&d.$el instanceof Element?d.$el:typeof d=="object"&&typeof d.x=="number"&&typeof d.y=="number"?d:null}const h=p.getCurrentInstance(),g=nt({getBoxEl:()=>i.value,onChange:d=>{Object.assign(r,d),h?.update()}});function E(){g.setConfig({target:f(n.target),placement:n.placement,targetAnchor:n.targetAnchor,maxWidth:n.maxWidth,tailLength:n.tailLength,tailBaseWidth:n.tailBaseWidth,padding:n.padding,shadow:n.shadow,transitionDuration:n.transitionDuration})}p.watch(()=>[n.target,typeof n.target=="object"&&n.target&&"x"in n.target?n.target.x:null,typeof n.target=="object"&&n.target&&"y"in n.target?n.target.y:null,n.placement,n.targetAnchor,n.maxWidth,n.tailLength,n.tailBaseWidth,n.padding,n.shadow,n.transitionDuration],E,{flush:"post"}),p.onMounted(()=>{E()}),p.onBeforeUnmount(()=>{g.destroy()});function c(){g.update()}t({update:c});const _=p.computed(()=>({...u.value,...r.boxStyle})),w=p.computed(()=>r.svgStyle);return(d,T)=>(p.openBlock(),p.createElementBlock("div",p.mergeProps({ref_key:"rootRef",ref:i,class:["pointing-bubble","pointing-bubble__inner",o.value],"data-placement":r.placement},a.value,{style:_.value}),[p.renderSlot(d.$slots,"default",{placement:r.placement,tip:r.slotTip},()=>[T[0]||(T[0]=p.createElementVNode("p",{style:{margin:0,fontSize:"14px",fontWeight:600,color:"#1e293b"}}," Callout content ",-1))]),e.target&&r.tail?(p.openBlock(),p.createElementBlock("svg",{key:0,class:"pointing-bubble__svg",style:p.normalizeStyle(w.value)},[p.createElementVNode("path",{class:"pointing-bubble__path",d:r.tail.fill,fill:r.boxFill},null,8,xt),r.tail.stroke?(p.openBlock(),p.createElementBlock("path",{key:0,class:"pointing-bubble__path",d:r.tail.stroke,fill:"none",stroke:r.boxStroke,"stroke-width":r.boxStrokeWidth,"stroke-linejoin":"round","stroke-linecap":"butt"},null,8,yt)):p.createCommentVNode("",!0)],4)):p.createCommentVNode("",!0)],16,bt))}}),wt={install(e,t={}){const n=t.name??"PointingBubble";e.component(n,D),e.component("Callout",D)}};exports.Callout=D;exports.DEFAULT_BUBBLE_CONFIG=Z;exports.PointingBubble=D;exports.PointingBubblePlugin=wt;exports.buildTailPaths=et;exports.computeGeometry=tt;exports.createBubbleController=nt;exports.default=D;exports.isPoint=K;exports.resolveElement=q;
@@ -1,5 +1,5 @@
1
- import { defineComponent as J, useAttrs as Q, computed as T, ref as tt, reactive as et, getCurrentInstance as nt, watch as ot, onMounted as it, onBeforeUnmount as lt, openBlock as O, createElementBlock as j, mergeProps as rt, renderSlot as st, createElementVNode as D, normalizeStyle as at, createCommentVNode as Y } from "vue";
2
- const ct = {
1
+ import { defineComponent as nt, useAttrs as ot, computed as Y, ref as it, reactive as lt, getCurrentInstance as rt, watch as st, onMounted as at, onBeforeUnmount as ct, openBlock as H, createElementBlock as q, mergeProps as ut, renderSlot as dt, createElementVNode as X, normalizeStyle as ft, createCommentVNode as U } from "vue";
2
+ const pt = {
3
3
  target: null,
4
4
  placement: "auto",
5
5
  targetAnchor: "center",
@@ -8,7 +8,7 @@ const ct = {
8
8
  padding: 8,
9
9
  shadow: !0,
10
10
  transitionDuration: 200
11
- }, P = "pointing-bubble-styles", ut = `:where(.pointing-bubble__inner) {
11
+ }, V = "pointing-bubble-styles", ht = `:where(.pointing-bubble__inner) {
12
12
  box-sizing: border-box;
13
13
  width: var(--pb-width, max-content);
14
14
  max-width: var(--pb-max-width, none);
@@ -16,169 +16,182 @@ const ct = {
16
16
  background: white;
17
17
  border: 2px solid gray;
18
18
  border-radius: 8px;
19
- }`, dt = "drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25))";
20
- function pt(n = document) {
21
- if (n.getElementById(P)) return;
22
- const t = n.createElement("style");
23
- t.id = P, t.textContent = ut, n.head.prepend(t);
19
+ }`, mt = "drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25))";
20
+ function gt(e = document) {
21
+ if (e.getElementById(V)) return;
22
+ const t = e.createElement("style");
23
+ t.id = V, t.textContent = ht, e.head.prepend(t);
24
24
  }
25
- function ft(n) {
26
- return typeof n == "object" && n !== null && typeof n.x == "number" && typeof n.y == "number" && n.nodeType !== 1;
25
+ function bt(e) {
26
+ return typeof e == "object" && e !== null && typeof e.x == "number" && typeof e.y == "number" && e.nodeType !== 1;
27
27
  }
28
- function X(n) {
29
- return typeof Element > "u" || n == null ? null : typeof n == "string" ? document.querySelector(n) : n instanceof Element ? n : null;
28
+ function Z(e) {
29
+ return typeof Element > "u" || e == null ? null : typeof e == "string" ? document.querySelector(e) : e instanceof Element ? e : null;
30
30
  }
31
- function z(n, t) {
32
- return !n || !t ? !1 : Object.keys(n).every((e) => n[e] === t[e]);
31
+ function j(e, t) {
32
+ return !e || !t ? !1 : Object.keys(e).every((n) => e[n] === t[n]);
33
33
  }
34
- function U(n) {
35
- let t = n.parentElement;
34
+ function tt(e) {
35
+ let t = e.parentElement;
36
36
  for (; t; ) {
37
- const e = getComputedStyle(t).position;
38
- if (e && e !== "static") return t;
37
+ const n = getComputedStyle(t).position;
38
+ if (n && n !== "static") return t;
39
39
  if (t === document.documentElement) break;
40
40
  t = t.parentElement;
41
41
  }
42
42
  return document.documentElement;
43
43
  }
44
- function ht(n) {
45
- const t = n.getBoundingClientRect(), e = getComputedStyle(n), l = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
44
+ function xt(e) {
45
+ const t = e.getBoundingClientRect(), n = getComputedStyle(e), i = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
46
46
  return {
47
47
  left: t.left,
48
48
  top: t.top,
49
- width: l,
49
+ width: i,
50
50
  height: o,
51
- scaleX: l ? t.width / l : 1,
51
+ scaleX: i ? t.width / i : 1,
52
52
  scaleY: o ? t.height / o : 1,
53
53
  viewportWidth: window.innerWidth,
54
54
  viewportHeight: window.innerHeight
55
55
  };
56
56
  }
57
- function mt(n) {
58
- return ht(U(n));
57
+ function yt(e) {
58
+ return xt(tt(e));
59
59
  }
60
- function bt(n, t) {
61
- const e = getComputedStyle(n), { scaleX: l, scaleY: o, left: u, top: d } = t, r = n.getBoundingClientRect();
60
+ function wt(e, t) {
61
+ const n = getComputedStyle(e), { scaleX: i, scaleY: o, left: u, top: a } = t, l = e.getBoundingClientRect();
62
62
  return {
63
- x: (r.left - u) / l,
64
- y: (r.top - d) / o,
65
- width: r.width / l,
66
- height: r.height / o,
67
- fill: e.backgroundColor,
68
- stroke: e.borderTopColor,
69
- strokeWidth: parseFloat(e.borderTopWidth) || 0,
63
+ x: (l.left - u) / i,
64
+ y: (l.top - a) / o,
65
+ width: l.width / i,
66
+ height: l.height / o,
67
+ fill: n.backgroundColor,
68
+ stroke: n.borderTopColor,
69
+ strokeWidth: parseFloat(n.borderTopWidth) || 0,
70
70
  // Abspos SVG is positioned against the padding edge; path math uses the
71
71
  // border box from getBoundingClientRect — subtract these when offsetting.
72
- borderLeft: (parseFloat(e.borderLeftWidth) || 0) / l,
73
- borderTop: (parseFloat(e.borderTopWidth) || 0) / o,
74
- radius: e.borderTopLeftRadius,
75
- zIndex: e.zIndex
72
+ borderLeft: (parseFloat(n.borderLeftWidth) || 0) / i,
73
+ borderTop: (parseFloat(n.borderTopWidth) || 0) / o,
74
+ radius: n.borderTopLeftRadius,
75
+ zIndex: n.zIndex
76
76
  };
77
77
  }
78
- function q(n, t, e) {
79
- const l = n.x - e;
80
- let o = l, u = t.width ? t.width - n.x - e : 1 / 0;
81
- return t.viewportWidth && (o = Math.min(o, t.left / t.scaleX + l), u = Math.min(
78
+ function G(e, t, n) {
79
+ const i = e.x - n;
80
+ let o = i, u = t.width ? t.width - e.x - n : 1 / 0;
81
+ return t.viewportWidth && (o = Math.min(o, t.left / t.scaleX + i), u = Math.min(
82
82
  u,
83
- (t.viewportWidth - t.left) / t.scaleX - n.x - e
83
+ (t.viewportWidth - t.left) / t.scaleX - e.x - n
84
84
  )), { left: Math.max(0, o), right: Math.max(0, u) };
85
85
  }
86
- function Z(n) {
87
- return n.left > n.right ? "left" : "right";
86
+ function et(e) {
87
+ return e.left > e.right ? "left" : "right";
88
88
  }
89
- function gt(n) {
90
- const { tip: t, box: e, frame: l, placement: o, targetRect: u, room: d, tailLength: r } = n;
91
- if (!e.width || !e.height) return null;
92
- const { width: s, height: p } = e, { x: f, y: h } = t, k = o === "manual", c = n.targetAnchor === "edge" ? u : null;
89
+ function vt(e) {
90
+ const { tip: t, box: n, frame: i, placement: o, targetRect: u, room: a, tailLength: l } = e;
91
+ if (!n.width || !n.height) return null;
92
+ const { width: r, height: f } = n, { x: p, y: m } = t, k = o === "manual", c = e.targetAnchor === "edge" ? u : null;
93
93
  if (k) {
94
94
  if (c) {
95
- const m = e.x + s / 2, S = e.y + p / 2;
96
- if (!(m >= c.left && m <= c.right && S >= c.top && S <= c.bottom)) {
97
- const b = Math.min(c.right, Math.max(c.left, m)), i = Math.min(c.bottom, Math.max(c.top, S));
98
- return { placement: "manual", tx: b, ty: i, bx: e.x, by: e.y, w: s, h: p };
95
+ const S = n.x + r / 2, W = n.y + f / 2;
96
+ if (!(S >= c.left && S <= c.right && W >= c.top && W <= c.bottom)) {
97
+ const g = Math.min(c.right, Math.max(c.left, S)), E = Math.min(c.bottom, Math.max(c.top, W));
98
+ return { placement: "manual", tx: g, ty: E, bx: n.x, by: n.y, w: r, h: f };
99
99
  }
100
100
  }
101
- return { placement: "manual", tx: f, ty: h, bx: e.x, by: e.y, w: s, h: p };
101
+ return { placement: "manual", tx: p, ty: m, bx: n.x, by: n.y, w: r, h: f };
102
102
  }
103
- const $ = (m) => c ? m === "top" ? c.top : c.bottom : h;
104
- let W = o;
103
+ const C = (S) => c ? S === "top" ? c.top : c.bottom : m;
104
+ let y = o;
105
105
  if (o === "auto") {
106
- let m = h > (l.height || 600) / 2 ? "top" : "bottom", S = Z(d);
107
- const { scaleX: A, scaleY: b } = l;
108
- if (l.viewportHeight) {
109
- const i = l.top + ($("top") - p - r) * b >= 0, g = l.top + ($("bottom") + p + r) * b <= l.viewportHeight;
110
- m === "top" && !i && g ? m = "bottom" : m === "bottom" && !g && i && (m = "top");
106
+ let S = m > (i.height || 600) / 2 ? "top" : "bottom", W = et(a);
107
+ const { scaleX: $, scaleY: g } = i;
108
+ if (i.viewportHeight) {
109
+ const E = i.top + (C("top") - f - l) * g >= 0, A = i.top + (C("bottom") + f + l) * g <= i.viewportHeight;
110
+ S === "top" && !E && A ? S = "bottom" : S === "bottom" && !A && E && (S = "top");
111
111
  }
112
- if (l.viewportWidth) {
113
- const i = l.left + (f - s - r) * A >= 0, g = l.left + (f + s + r) * A <= l.viewportWidth;
114
- S === "left" && !i && g ? S = "right" : S === "right" && !g && i && (S = "left");
112
+ if (i.viewportWidth) {
113
+ const E = i.left + (p - r - l) * $ >= 0, A = i.left + (p + r + l) * $ <= i.viewportWidth;
114
+ W === "left" && !E && A ? W = "right" : W === "right" && !A && E && (W = "left");
115
115
  }
116
- W = `${m}-${S}`;
116
+ y = `${S}-${W}`;
117
117
  }
118
- const [a, L] = W.split("-"), y = $(a);
118
+ const [d, _] = y.split("-"), w = C(d);
119
119
  return {
120
- placement: W,
121
- tx: f,
122
- ty: y,
123
- bx: L === "left" ? f - s - r : f + r,
124
- by: a === "top" ? y - p - r : y + r,
125
- w: s,
126
- h: p
120
+ placement: y,
121
+ tx: p,
122
+ ty: w,
123
+ bx: _ === "left" ? p - r - l : p + l,
124
+ by: d === "top" ? w - f - l : w + l,
125
+ w: r,
126
+ h: f
127
127
  };
128
128
  }
129
- const xt = ["tx", "ty", "bx", "by"], yt = ["tx", "ty"];
130
- function wt() {
129
+ const St = ["tx", "ty", "bx", "by"], kt = ["tx", "ty"];
130
+ function Wt() {
131
131
  return typeof matchMedia < "u" && matchMedia("(prefers-reduced-motion: reduce)").matches;
132
132
  }
133
- function vt(n, t, e, l) {
133
+ function Et(e, t, n, i) {
134
134
  let o = 0;
135
135
  const u = () => {
136
136
  typeof cancelAnimationFrame < "u" && cancelAnimationFrame(o);
137
137
  };
138
- if (!t || !n || e <= 0 || typeof requestAnimationFrame > "u" || wt())
139
- return l(t), { cancel: u };
140
- const d = performance.now(), r = (s) => {
141
- const p = Math.min(1, (s - d) / e), f = 1 - Math.pow(1 - p, 3), h = { ...t }, k = t.placement === "manual" ? yt : xt;
138
+ if (!t || !e || n <= 0 || typeof requestAnimationFrame > "u" || Wt())
139
+ return i(t), { cancel: u };
140
+ const a = performance.now(), l = (r) => {
141
+ const f = Math.min(1, (r - a) / n), p = 1 - Math.pow(1 - f, 3), m = { ...t }, k = t.placement === "manual" ? kt : St;
142
142
  for (const c of k)
143
- h[c] = n[c] + (t[c] - n[c]) * f;
144
- l(h), p < 1 && (o = requestAnimationFrame(r));
143
+ m[c] = e[c] + (t[c] - e[c]) * p;
144
+ i(m), f < 1 && (o = requestAnimationFrame(l));
145
145
  };
146
- return o = requestAnimationFrame(r), { cancel: u };
146
+ return o = requestAnimationFrame(l), { cancel: u };
147
147
  }
148
- function St(n) {
149
- const { geometry: t, strokeWidth: e, radius: l, tailBaseWidth: o } = n, { placement: u, tx: d, ty: r, bx: s, by: p, w: f, h } = t, k = parseFloat(l) * (l.endsWith("%") ? Math.min(f, h) / 100 : 1) || 0, c = o / 2, $ = (v, x, R) => x > R ? (x + R) / 2 : Math.min(R, Math.max(x, v));
150
- let W = null, a = 0;
148
+ function Bt(e) {
149
+ const { geometry: t, strokeWidth: n, radius: i, tailBaseWidth: o } = e, { placement: u, tx: a, ty: l, bx: r, by: f, w: p, h: m } = t, k = parseFloat(i) * (i.endsWith("%") ? Math.min(p, m) / 100 : 1) || 0, c = o / 2, C = (x, h, O) => h > O ? (h + O) / 2 : Math.min(O, Math.max(h, x));
150
+ let y = null, d = 0;
151
151
  if (u === "manual") {
152
- const v = Math.max(s - d, d - (s + f), 0), x = Math.max(p - r, r - (p + h), 0);
153
- if (v > 0 && v >= x)
154
- W = d < s ? "left" : "right", a = r;
155
- else if (x > 0)
156
- W = r < p ? "top" : "bottom", a = d;
152
+ const x = Math.max(r - a, a - (r + p), 0), h = Math.max(f - l, l - (f + m), 0);
153
+ if (x > 0 && x >= h)
154
+ y = a < r ? "left" : "right", d = l;
155
+ else if (h > 0)
156
+ y = l < f ? "top" : "bottom", d = a;
157
157
  else
158
158
  return null;
159
159
  } else if (u !== "none") {
160
- const [v, x] = u.split("-");
161
- W = x === "left" ? "right" : "left", a = p + h * (v === "top" ? 0.65 : 0.35);
160
+ const [x, h] = u.split("-");
161
+ y = h === "left" ? "right" : "left", d = f + m * (x === "top" ? 0.65 : 0.35);
162
162
  } else
163
163
  return null;
164
- const L = W === "top" || W === "bottom", y = {
165
- left: (v, x) => [s - x, v],
166
- right: (v, x) => [s + f + x, v],
167
- top: (v, x) => [v, p - x],
168
- bottom: (v, x) => [v, p + h + x]
169
- }[W], m = L ? s : p, S = L ? s + f : p + h, A = $(
170
- a,
171
- m + c + e / 2 + k,
172
- S - c - e / 2 - k
173
- ), b = ([v, x]) => `${v} ${x}`, i = e > 0 ? -e / 2 : 0, g = 2, _ = 2, w = A - c, B = A + c, M = y(w - g, i), C = y(w, i), E = y(B, i), F = y(B + g, i), I = y(w, -(e + _)), G = y(B, -(e + _)), K = y(w, 1), V = y(B, 1);
164
+ const _ = y === "top" || y === "bottom", w = {
165
+ left: (x, h) => [r - h, x],
166
+ right: (x, h) => [r + p + h, x],
167
+ top: (x, h) => [x, f - h],
168
+ bottom: (x, h) => [x, f + m + h]
169
+ }[y], S = _ ? r : f, W = _ ? r + p : f + m, $ = C(
170
+ d,
171
+ S + c + n / 2 + k,
172
+ W - c - n / 2 - k
173
+ ), g = ([x, h]) => `${x} ${h}`, E = n > 0 ? -n / 2 : 0, A = 2, P = 2, s = $ - c, b = $ + c, z = w(s - A, E), v = w(s, E), L = w(b, E), F = w(b + A, E), T = w(s, -(n + P)), M = w(b, -(n + P)), B = w(s, 1), I = w(b, 1);
174
174
  return {
175
- fill: `M ${b(I)} L ${b(K)} L ${b(C)} L ${d} ${r} L ${b(E)} L ${b(V)} L ${b(G)} Z`,
176
- stroke: e ? `M ${b(M)} L ${b(C)} L ${d} ${r} L ${b(E)} L ${b(F)}` : null
175
+ fill: `M ${g(T)} L ${g(B)} L ${g(v)} L ${a} ${l} L ${g(L)} L ${g(I)} L ${g(M)} Z`,
176
+ stroke: n ? `M ${g(z)} L ${g(v)} L ${a} ${l} L ${g(L)} L ${g(F)}` : null
177
177
  };
178
178
  }
179
- function kt(n) {
179
+ const Lt = [
180
+ "left",
181
+ "top",
182
+ "right",
183
+ "bottom",
184
+ "width",
185
+ "height",
186
+ "transform",
187
+ "translate",
188
+ "inset",
189
+ "inset-inline",
190
+ "inset-block"
191
+ ];
192
+ function Ct(e) {
180
193
  return {
181
- hasTarget: n,
194
+ hasTarget: e,
182
195
  placement: "none",
183
196
  tip: null,
184
197
  slotTip: null,
@@ -191,15 +204,31 @@ function kt(n) {
191
204
  boxZIndex: "auto"
192
205
  };
193
206
  }
194
- function H(n, t) {
195
- return n === t ? !0 : !n || !t ? !1 : n.x === t.x && n.y === t.y;
207
+ function D(e, t) {
208
+ return e === t ? !0 : !e || !t ? !1 : e.x === t.x && e.y === t.y;
196
209
  }
197
- function Wt(n, t) {
198
- return n.hasTarget === t.hasTarget && n.placement === t.placement && n.boxFill === t.boxFill && n.boxStroke === t.boxStroke && n.boxStrokeWidth === t.boxStrokeWidth && n.boxZIndex === t.boxZIndex && H(n.tip, t.tip) && H(n.slotTip, t.slotTip) && z(n.boxStyle, t.boxStyle) && z(n.svgStyle, t.svgStyle) && n.tail?.fill === t.tail?.fill && n.tail?.stroke === t.tail?.stroke;
210
+ function $t(e, t) {
211
+ return e === t ? !0 : !e || !t ? !1 : e.placement === t.placement && e.tx === t.tx && e.ty === t.ty && e.bx === t.bx && e.by === t.by && e.w === t.w && e.h === t.h;
199
212
  }
200
- function Et(n) {
201
- pt();
202
- let t = { ...ct }, e = null, l = null, o = null, u = {
213
+ function _t(e, t) {
214
+ return e.hasTarget === t.hasTarget && e.placement === t.placement && e.boxFill === t.boxFill && e.boxStroke === t.boxStroke && e.boxStrokeWidth === t.boxStrokeWidth && e.boxZIndex === t.boxZIndex && D(e.tip, t.tip) && D(e.slotTip, t.slotTip) && j(e.boxStyle, t.boxStyle) && j(e.svgStyle, t.svgStyle) && e.tail?.fill === t.tail?.fill && e.tail?.stroke === t.tail?.stroke;
215
+ }
216
+ function K(e) {
217
+ if (typeof e.checkVisibility == "function")
218
+ return e.checkVisibility({
219
+ checkOpacity: !0,
220
+ checkVisibilityCSS: !0
221
+ });
222
+ const t = getComputedStyle(e);
223
+ return !(t.display === "none" || t.visibility === "hidden" || parseFloat(t.opacity) === 0);
224
+ }
225
+ function J(e) {
226
+ const t = e.style;
227
+ return Lt.map((n) => t.getPropertyValue(n)).join("|");
228
+ }
229
+ function At(e) {
230
+ gt();
231
+ let t = { ...pt }, n = null, i = null, o = null, u = {
203
232
  left: 0,
204
233
  top: 0,
205
234
  width: 0,
@@ -208,46 +237,46 @@ function Et(n) {
208
237
  scaleY: 1,
209
238
  viewportWidth: 0,
210
239
  viewportHeight: 0
211
- }, d = null, r = null, s = null, p = null, f = null, h = null, k = kt(!1);
212
- const c = () => {
213
- const i = $();
214
- Wt(k, i) || (k = i, n.onChange?.(k));
240
+ }, a = null, l = null, r = null, f = null, p = null, m = null, k = Ct(!1), c = !1, C = "";
241
+ const y = () => {
242
+ const s = d();
243
+ _t(k, s) || (k = s, e.onChange?.(k));
215
244
  };
216
- function $() {
217
- const i = t.target != null, g = t.placement === "manual", _ = i ? d?.placement ?? "none" : "none", w = {
245
+ function d() {
246
+ const s = t.target != null, b = t.placement === "manual", z = s ? a?.placement ?? "none" : "none", v = {
218
247
  "--pb-padding": typeof t.padding == "number" ? `${t.padding}px` : t.padding
219
248
  };
220
- if (t.maxWidth != null && (w["--pb-max-width"] = `${t.maxWidth}px`), t.shadow && (w.filter = dt), !i)
221
- w["--pb-width"] = "fit-content";
222
- else if (Object.assign(w, {
249
+ if (t.maxWidth != null && (v["--pb-max-width"] = `${t.maxWidth}px`), t.shadow && (v.filter = mt), !s)
250
+ v["--pb-width"] = "fit-content";
251
+ else if (Object.assign(v, {
223
252
  position: "absolute",
224
253
  pointerEvents: "auto",
225
254
  overflow: "visible"
226
- }), g)
227
- w["--pb-width"] = "fit-content";
228
- else if (Object.assign(w, {
229
- left: `${d?.bx ?? 0}px`,
230
- top: `${d?.by ?? 0}px`,
255
+ }), b)
256
+ v["--pb-width"] = "fit-content";
257
+ else if (Object.assign(v, {
258
+ left: `${a?.bx ?? 0}px`,
259
+ top: `${a?.by ?? 0}px`,
231
260
  margin: "0"
232
- }), t.maxWidth == null && e) {
233
- const E = q(e, u, t.tailLength), F = r?.placement ?? t.placement, I = F === "auto" ? Z(E) : F.split("-")[1];
234
- w["--pb-max-width"] = `${E[I]}px`;
261
+ }), t.maxWidth == null && n) {
262
+ const M = G(n, u, t.tailLength), B = l?.placement ?? t.placement, I = B === "auto" ? et(M) : B.split("-")[1];
263
+ v["--pb-max-width"] = `${M[I]}px`;
235
264
  }
236
- const B = o?.zIndex;
237
- B && B !== "auto" && (w.zIndex = B);
238
- const M = i && d && o ? St({
239
- geometry: d,
265
+ const L = o?.zIndex;
266
+ L && L !== "auto" && (v.zIndex = L);
267
+ const F = s && a && o ? Bt({
268
+ geometry: a,
240
269
  strokeWidth: o.strokeWidth,
241
270
  radius: o.radius,
242
271
  tailBaseWidth: t.tailBaseWidth
243
272
  }) : null;
244
- let C = {};
245
- if (M && d && u.width && u.height) {
246
- const E = o?.borderLeft ?? 0, F = o?.borderTop ?? 0;
247
- C = {
273
+ let T = {};
274
+ if (F && a && u.width && u.height) {
275
+ const M = o?.borderLeft ?? 0, B = o?.borderTop ?? 0;
276
+ T = {
248
277
  position: "absolute",
249
- left: `${-d.bx - E}px`,
250
- top: `${-d.by - F}px`,
278
+ left: `${-a.bx - M}px`,
279
+ top: `${-a.by - B}px`,
251
280
  width: `${u.width}px`,
252
281
  height: `${u.height}px`,
253
282
  overflow: "visible",
@@ -256,111 +285,146 @@ function Et(n) {
256
285
  };
257
286
  }
258
287
  return {
259
- hasTarget: i,
260
- placement: _,
261
- tip: e,
262
- slotTip: r ? { x: r.tx, y: r.ty } : e,
263
- boxStyle: w,
264
- svgStyle: C,
265
- tail: M,
288
+ hasTarget: s,
289
+ placement: z,
290
+ tip: n,
291
+ slotTip: l ? { x: l.tx, y: l.ty } : n,
292
+ boxStyle: v,
293
+ svgStyle: T,
294
+ tail: F,
266
295
  boxFill: o?.fill ?? "",
267
296
  boxStroke: o?.stroke ?? "",
268
297
  boxStrokeWidth: o?.strokeWidth ?? 0,
269
298
  boxZIndex: o?.zIndex ?? "auto"
270
299
  };
271
300
  }
272
- function W() {
273
- if (!e || !o) {
274
- r = null, a(null);
301
+ function _() {
302
+ if (!n || !o) {
303
+ (l !== null || a !== null) && (l = null, w(null));
275
304
  return;
276
305
  }
277
- const i = q(e, u, t.tailLength);
278
- r = gt({
279
- tip: e,
306
+ const s = G(n, u, t.tailLength), b = vt({
307
+ tip: n,
280
308
  box: o,
281
309
  frame: u,
282
310
  placement: t.placement,
283
311
  targetAnchor: t.targetAnchor,
284
- targetRect: l,
285
- room: i,
312
+ targetRect: i,
313
+ room: s,
286
314
  tailLength: t.tailLength
287
- }), a(r);
315
+ });
316
+ $t(l, b) || (l = b, w(l));
288
317
  }
289
- function a(i) {
290
- s?.cancel(), s = vt(
291
- d,
292
- i,
318
+ function w(s) {
319
+ r?.cancel(), r = Et(
320
+ a,
321
+ s,
293
322
  t.transitionDuration,
294
- (g) => {
295
- d = g, c();
323
+ (b) => {
324
+ a = b, y();
296
325
  }
297
326
  );
298
327
  }
299
- function L(i) {
300
- const g = bt(i, u);
301
- z(
302
- g,
328
+ function S(s) {
329
+ const b = wt(s, u);
330
+ return j(
331
+ b,
303
332
  o
304
- ) || (o = g);
333
+ ) ? !1 : (o = b, !0);
305
334
  }
306
- function y() {
307
- const i = n.getBoxEl();
308
- if (t.target == null || !i) {
309
- e = null, l = null, o = null, r = null, d = null, c();
335
+ function W() {
336
+ const s = e.getBoxEl();
337
+ if (!s) {
338
+ n = null, i = null, o = null, l = null, a = null, c = !1, y();
310
339
  return;
311
340
  }
312
- u = mt(i);
313
- const g = typeof t.target == "string" ? U(i).querySelector(t.target) ?? X(t.target) : X(t.target);
314
- if (g) {
315
- const _ = g.getBoundingClientRect(), { scaleX: w, scaleY: B, left: M, top: C } = u, E = {
316
- left: (_.left - M) / w,
317
- top: (_.top - C) / B,
318
- right: (_.right - M) / w,
319
- bottom: (_.bottom - C) / B
341
+ if (!K(s)) {
342
+ r?.cancel(), c = !0;
343
+ return;
344
+ }
345
+ const b = c;
346
+ if (c = !1, t.target == null) {
347
+ n = null, i = null, o = null, l = null, a = null, y();
348
+ return;
349
+ }
350
+ const z = u;
351
+ u = yt(s);
352
+ const v = !j(
353
+ u,
354
+ z
355
+ ), L = typeof t.target == "string" ? tt(s).querySelector(t.target) ?? Z(t.target) : Z(t.target);
356
+ let F = !1, T = !1;
357
+ if (L) {
358
+ const B = L.getBoundingClientRect(), { scaleX: I, scaleY: x, left: h, top: O } = u, R = {
359
+ left: (B.left - h) / I,
360
+ top: (B.top - O) / x,
361
+ right: (B.right - h) / I,
362
+ bottom: (B.bottom - O) / x
320
363
  };
321
- z(
322
- E,
323
- l
324
- ) || (l = E), e = {
325
- x: (E.left + E.right) / 2,
326
- y: (E.top + E.bottom) / 2
364
+ T = !j(
365
+ R,
366
+ i
367
+ ), T && (i = R);
368
+ const N = {
369
+ x: (R.left + R.right) / 2,
370
+ y: (R.top + R.bottom) / 2
327
371
  };
328
- } else if (ft(t.target))
329
- l = null, e = { x: t.target.x, y: t.target.y };
330
- else {
331
- l = null, e = null, o = null, r = null, d = null, c();
372
+ F = !D(n, N), n = N;
373
+ } else if (bt(t.target)) {
374
+ T = i != null, i = null;
375
+ const B = { x: t.target.x, y: t.target.y };
376
+ F = !D(n, B), n = B;
377
+ } else {
378
+ n = null, i = null, o = null, l = null, a = null, y();
332
379
  return;
333
380
  }
334
- L(i), W();
381
+ const M = S(s);
382
+ C = J(s), !(!b && !v && !F && !T && !M && a) && _();
383
+ }
384
+ function $() {
385
+ W();
335
386
  }
336
- function m() {
337
- y();
387
+ typeof window < "u" && (window.addEventListener("resize", $), window.addEventListener("scroll", $, !0));
388
+ const g = W;
389
+ function E(s) {
390
+ const b = e.getBoxEl();
391
+ if (!b) return;
392
+ if (s.some(
393
+ (L) => L.attributeName === "class" || L.attributeName === "hidden"
394
+ )) {
395
+ if (!K(b)) {
396
+ r?.cancel(), c = !0;
397
+ return;
398
+ }
399
+ g();
400
+ return;
401
+ }
402
+ const v = J(b);
403
+ v !== C && (C = v, g());
338
404
  }
339
- typeof window < "u" && (window.addEventListener("resize", m), window.addEventListener("scroll", m, !0));
340
- const S = y;
341
405
  function A() {
342
- const i = n.getBoxEl();
343
- i !== h && (h = i, p?.disconnect(), f?.disconnect(), p = null, f = null, i && (typeof ResizeObserver < "u" && (p = new ResizeObserver(() => S()), p.observe(i)), typeof MutationObserver < "u" && (f = new MutationObserver(() => S()), f.observe(i, {
406
+ const s = e.getBoxEl();
407
+ s !== m && (m = s, f?.disconnect(), p?.disconnect(), f = null, p = null, s && (typeof ResizeObserver < "u" && (f = new ResizeObserver(() => g()), f.observe(s)), typeof MutationObserver < "u" && (p = new MutationObserver(E), p.observe(s, {
344
408
  attributes: !0,
345
- attributeFilter: ["style"]
409
+ attributeFilter: ["style", "class", "hidden"]
346
410
  }))));
347
411
  }
348
- function b() {
349
- A(), S();
412
+ function P() {
413
+ A(), g();
350
414
  }
351
415
  return {
352
- update: b,
353
- setConfig(i) {
354
- t = { ...t, ...i }, b();
416
+ update: P,
417
+ setConfig(s) {
418
+ t = { ...t, ...s }, P();
355
419
  },
356
420
  getConfig: () => t,
357
421
  getState: () => k,
358
422
  destroy() {
359
- s?.cancel(), p?.disconnect(), f?.disconnect(), h = null, typeof window < "u" && (window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0));
423
+ r?.cancel(), f?.disconnect(), p?.disconnect(), m = null, typeof window < "u" && (window.removeEventListener("resize", $), window.removeEventListener("scroll", $, !0));
360
424
  }
361
425
  };
362
426
  }
363
- const Bt = ["data-placement"], Lt = ["d", "fill"], $t = ["d", "stroke", "stroke-width"], N = /* @__PURE__ */ J({
427
+ const Tt = ["data-placement"], Ft = ["d", "fill"], Mt = ["d", "stroke", "stroke-width"], Q = /* @__PURE__ */ nt({
364
428
  name: "PointingBubble",
365
429
  inheritAttrs: !1,
366
430
  __name: "PointingBubble",
@@ -375,11 +439,11 @@ const Bt = ["data-placement"], Lt = ["d", "fill"], $t = ["d", "stroke", "stroke-
375
439
  shadow: { type: Boolean, default: !0 },
376
440
  transitionDuration: { default: 200 }
377
441
  },
378
- setup(n, { expose: t }) {
379
- const e = n, l = Q(), o = T(() => l.class), u = T(() => l.style), d = T(() => {
380
- const { class: a, style: L, ...y } = l;
381
- return y;
382
- }), r = tt(null), s = et({
442
+ setup(e, { expose: t }) {
443
+ const n = e, i = ot(), o = Y(() => i.class), u = Y(() => i.style), a = Y(() => {
444
+ const { class: d, style: _, ...w } = i;
445
+ return w;
446
+ }), l = it(null), r = lt({
383
447
  hasTarget: !1,
384
448
  placement: "none",
385
449
  tip: null,
@@ -392,114 +456,114 @@ const Bt = ["data-placement"], Lt = ["d", "fill"], $t = ["d", "stroke", "stroke-
392
456
  boxStrokeWidth: 0,
393
457
  boxZIndex: "auto"
394
458
  });
395
- function p(a) {
396
- return a == null ? null : typeof a == "string" || typeof Element < "u" && a instanceof Element ? a : typeof a == "object" && "$el" in a && a.$el instanceof Element ? a.$el : typeof a == "object" && typeof a.x == "number" && typeof a.y == "number" ? a : null;
459
+ function f(d) {
460
+ return d == null ? null : typeof d == "string" || typeof Element < "u" && d instanceof Element ? d : typeof d == "object" && "$el" in d && d.$el instanceof Element ? d.$el : typeof d == "object" && typeof d.x == "number" && typeof d.y == "number" ? d : null;
397
461
  }
398
- const f = nt(), h = Et({
399
- getBoxEl: () => r.value,
400
- onChange: (a) => {
401
- Object.assign(s, a), f?.update();
462
+ const p = rt(), m = At({
463
+ getBoxEl: () => l.value,
464
+ onChange: (d) => {
465
+ Object.assign(r, d), p?.update();
402
466
  }
403
467
  });
404
468
  function k() {
405
- h.setConfig({
406
- target: p(e.target),
407
- placement: e.placement,
408
- targetAnchor: e.targetAnchor,
409
- maxWidth: e.maxWidth,
410
- tailLength: e.tailLength,
411
- tailBaseWidth: e.tailBaseWidth,
412
- padding: e.padding,
413
- shadow: e.shadow,
414
- transitionDuration: e.transitionDuration
469
+ m.setConfig({
470
+ target: f(n.target),
471
+ placement: n.placement,
472
+ targetAnchor: n.targetAnchor,
473
+ maxWidth: n.maxWidth,
474
+ tailLength: n.tailLength,
475
+ tailBaseWidth: n.tailBaseWidth,
476
+ padding: n.padding,
477
+ shadow: n.shadow,
478
+ transitionDuration: n.transitionDuration
415
479
  });
416
480
  }
417
- ot(
481
+ st(
418
482
  () => [
419
- e.target,
420
- typeof e.target == "object" && e.target && "x" in e.target ? e.target.x : null,
421
- typeof e.target == "object" && e.target && "y" in e.target ? e.target.y : null,
422
- e.placement,
423
- e.targetAnchor,
424
- e.maxWidth,
425
- e.tailLength,
426
- e.tailBaseWidth,
427
- e.padding,
428
- e.shadow,
429
- e.transitionDuration
483
+ n.target,
484
+ typeof n.target == "object" && n.target && "x" in n.target ? n.target.x : null,
485
+ typeof n.target == "object" && n.target && "y" in n.target ? n.target.y : null,
486
+ n.placement,
487
+ n.targetAnchor,
488
+ n.maxWidth,
489
+ n.tailLength,
490
+ n.tailBaseWidth,
491
+ n.padding,
492
+ n.shadow,
493
+ n.transitionDuration
430
494
  ],
431
495
  k,
432
496
  { flush: "post" }
433
- ), it(() => {
497
+ ), at(() => {
434
498
  k();
435
- }), lt(() => {
436
- h.destroy();
499
+ }), ct(() => {
500
+ m.destroy();
437
501
  });
438
502
  function c() {
439
- h.update();
503
+ m.update();
440
504
  }
441
505
  t({ update: c });
442
- const $ = T(
506
+ const C = Y(
443
507
  () => ({
444
508
  ...u.value,
445
- ...s.boxStyle
509
+ ...r.boxStyle
446
510
  })
447
- ), W = T(() => s.svgStyle);
448
- return (a, L) => (O(), j("div", rt({
511
+ ), y = Y(() => r.svgStyle);
512
+ return (d, _) => (H(), q("div", ut({
449
513
  ref_key: "rootRef",
450
- ref: r,
514
+ ref: l,
451
515
  class: ["pointing-bubble", "pointing-bubble__inner", o.value],
452
- "data-placement": s.placement
453
- }, d.value, { style: $.value }), [
454
- st(a.$slots, "default", {
455
- placement: s.placement,
456
- tip: s.slotTip
516
+ "data-placement": r.placement
517
+ }, a.value, { style: C.value }), [
518
+ dt(d.$slots, "default", {
519
+ placement: r.placement,
520
+ tip: r.slotTip
457
521
  }, () => [
458
- L[0] || (L[0] = D("p", { style: {
522
+ _[0] || (_[0] = X("p", { style: {
459
523
  margin: 0,
460
524
  fontSize: "14px",
461
525
  fontWeight: 600,
462
526
  color: "#1e293b"
463
527
  } }, " Callout content ", -1))
464
528
  ]),
465
- n.target && s.tail ? (O(), j("svg", {
529
+ e.target && r.tail ? (H(), q("svg", {
466
530
  key: 0,
467
531
  class: "pointing-bubble__svg",
468
- style: at(W.value)
532
+ style: ft(y.value)
469
533
  }, [
470
- D("path", {
534
+ X("path", {
471
535
  class: "pointing-bubble__path",
472
- d: s.tail.fill,
473
- fill: s.boxFill
474
- }, null, 8, Lt),
475
- s.tail.stroke ? (O(), j("path", {
536
+ d: r.tail.fill,
537
+ fill: r.boxFill
538
+ }, null, 8, Ft),
539
+ r.tail.stroke ? (H(), q("path", {
476
540
  key: 0,
477
541
  class: "pointing-bubble__path",
478
- d: s.tail.stroke,
542
+ d: r.tail.stroke,
479
543
  fill: "none",
480
- stroke: s.boxStroke,
481
- "stroke-width": s.boxStrokeWidth,
544
+ stroke: r.boxStroke,
545
+ "stroke-width": r.boxStrokeWidth,
482
546
  "stroke-linejoin": "round",
483
547
  "stroke-linecap": "butt"
484
- }, null, 8, $t)) : Y("", !0)
485
- ], 4)) : Y("", !0)
486
- ], 16, Bt));
548
+ }, null, 8, Mt)) : U("", !0)
549
+ ], 4)) : U("", !0)
550
+ ], 16, Tt));
487
551
  }
488
- }), At = {
489
- install(n, t = {}) {
490
- const e = t.name ?? "PointingBubble";
491
- n.component(e, N), n.component("Callout", N);
552
+ }), It = {
553
+ install(e, t = {}) {
554
+ const n = t.name ?? "PointingBubble";
555
+ e.component(n, Q), e.component("Callout", Q);
492
556
  }
493
557
  };
494
558
  export {
495
- N as Callout,
496
- ct as DEFAULT_BUBBLE_CONFIG,
497
- N as PointingBubble,
498
- At as PointingBubblePlugin,
499
- St as buildTailPaths,
500
- gt as computeGeometry,
501
- Et as createBubbleController,
502
- N as default,
503
- ft as isPoint,
504
- X as resolveElement
559
+ Q as Callout,
560
+ pt as DEFAULT_BUBBLE_CONFIG,
561
+ Q as PointingBubble,
562
+ It as PointingBubblePlugin,
563
+ Bt as buildTailPaths,
564
+ vt as computeGeometry,
565
+ At as createBubbleController,
566
+ Q as default,
567
+ bt as isPoint,
568
+ Z as resolveElement
505
569
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-pointing-bubble",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Vue 3 callout / speech bubble whose SVG tail points exactly at coordinates or a DOM element.",
5
5
  "type": "module",
6
6
  "sideEffects": false,