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
|
|
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
|
|
2
|
-
const
|
|
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
|
-
},
|
|
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
|
-
}`,
|
|
20
|
-
function
|
|
21
|
-
if (
|
|
22
|
-
const t =
|
|
23
|
-
t.id =
|
|
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
|
|
26
|
-
return typeof
|
|
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
|
|
29
|
-
return typeof Element > "u" ||
|
|
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
|
|
32
|
-
return !
|
|
31
|
+
function j(e, t) {
|
|
32
|
+
return !e || !t ? !1 : Object.keys(e).every((n) => e[n] === t[n]);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
let t =
|
|
34
|
+
function tt(e) {
|
|
35
|
+
let t = e.parentElement;
|
|
36
36
|
for (; t; ) {
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
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
|
|
45
|
-
const t =
|
|
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:
|
|
49
|
+
width: i,
|
|
50
50
|
height: o,
|
|
51
|
-
scaleX:
|
|
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
|
|
58
|
-
return
|
|
57
|
+
function yt(e) {
|
|
58
|
+
return xt(tt(e));
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
const
|
|
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: (
|
|
64
|
-
y: (
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
67
|
-
fill:
|
|
68
|
-
stroke:
|
|
69
|
-
strokeWidth: parseFloat(
|
|
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(
|
|
73
|
-
borderTop: (parseFloat(
|
|
74
|
-
radius:
|
|
75
|
-
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
|
|
79
|
-
const
|
|
80
|
-
let o =
|
|
81
|
-
return t.viewportWidth && (o = Math.min(o, t.left / t.scaleX +
|
|
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 -
|
|
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
|
|
87
|
-
return
|
|
86
|
+
function et(e) {
|
|
87
|
+
return e.left > e.right ? "left" : "right";
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
const { tip: t, box:
|
|
91
|
-
if (!
|
|
92
|
-
const { width:
|
|
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
|
|
96
|
-
if (!(
|
|
97
|
-
const
|
|
98
|
-
return { placement: "manual", tx:
|
|
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:
|
|
101
|
+
return { placement: "manual", tx: p, ty: m, bx: n.x, by: n.y, w: r, h: f };
|
|
102
102
|
}
|
|
103
|
-
const
|
|
104
|
-
let
|
|
103
|
+
const C = (S) => c ? S === "top" ? c.top : c.bottom : m;
|
|
104
|
+
let y = o;
|
|
105
105
|
if (o === "auto") {
|
|
106
|
-
let
|
|
107
|
-
const { scaleX:
|
|
108
|
-
if (
|
|
109
|
-
const
|
|
110
|
-
|
|
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 (
|
|
113
|
-
const
|
|
114
|
-
|
|
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
|
-
|
|
116
|
+
y = `${S}-${W}`;
|
|
117
117
|
}
|
|
118
|
-
const [
|
|
118
|
+
const [d, _] = y.split("-"), w = C(d);
|
|
119
119
|
return {
|
|
120
|
-
placement:
|
|
121
|
-
tx:
|
|
122
|
-
ty:
|
|
123
|
-
bx:
|
|
124
|
-
by:
|
|
125
|
-
w:
|
|
126
|
-
h:
|
|
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
|
|
130
|
-
function
|
|
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
|
|
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 || !
|
|
139
|
-
return
|
|
140
|
-
const
|
|
141
|
-
const
|
|
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
|
-
|
|
144
|
-
|
|
143
|
+
m[c] = e[c] + (t[c] - e[c]) * p;
|
|
144
|
+
i(m), f < 1 && (o = requestAnimationFrame(l));
|
|
145
145
|
};
|
|
146
|
-
return o = requestAnimationFrame(
|
|
146
|
+
return o = requestAnimationFrame(l), { cancel: u };
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
const { geometry: t, strokeWidth:
|
|
150
|
-
let
|
|
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
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
else if (
|
|
156
|
-
|
|
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 [
|
|
161
|
-
|
|
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
|
|
165
|
-
left: (
|
|
166
|
-
right: (
|
|
167
|
-
top: (
|
|
168
|
-
bottom: (
|
|
169
|
-
}[
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
),
|
|
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 ${
|
|
176
|
-
stroke:
|
|
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
|
-
|
|
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:
|
|
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
|
|
195
|
-
return
|
|
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
|
|
198
|
-
return
|
|
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
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
},
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
|
|
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
|
|
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 && (
|
|
221
|
-
|
|
222
|
-
else if (Object.assign(
|
|
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
|
-
}),
|
|
227
|
-
|
|
228
|
-
else if (Object.assign(
|
|
229
|
-
left: `${
|
|
230
|
-
top: `${
|
|
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 &&
|
|
233
|
-
const
|
|
234
|
-
|
|
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
|
|
237
|
-
|
|
238
|
-
const
|
|
239
|
-
geometry:
|
|
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
|
|
245
|
-
if (
|
|
246
|
-
const
|
|
247
|
-
|
|
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: `${-
|
|
250
|
-
top: `${-
|
|
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:
|
|
260
|
-
placement:
|
|
261
|
-
tip:
|
|
262
|
-
slotTip:
|
|
263
|
-
boxStyle:
|
|
264
|
-
svgStyle:
|
|
265
|
-
tail:
|
|
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
|
|
273
|
-
if (!
|
|
274
|
-
|
|
301
|
+
function _() {
|
|
302
|
+
if (!n || !o) {
|
|
303
|
+
(l !== null || a !== null) && (l = null, w(null));
|
|
275
304
|
return;
|
|
276
305
|
}
|
|
277
|
-
const
|
|
278
|
-
|
|
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:
|
|
285
|
-
room:
|
|
312
|
+
targetRect: i,
|
|
313
|
+
room: s,
|
|
286
314
|
tailLength: t.tailLength
|
|
287
|
-
})
|
|
315
|
+
});
|
|
316
|
+
$t(l, b) || (l = b, w(l));
|
|
288
317
|
}
|
|
289
|
-
function
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
318
|
+
function w(s) {
|
|
319
|
+
r?.cancel(), r = Et(
|
|
320
|
+
a,
|
|
321
|
+
s,
|
|
293
322
|
t.transitionDuration,
|
|
294
|
-
(
|
|
295
|
-
|
|
323
|
+
(b) => {
|
|
324
|
+
a = b, y();
|
|
296
325
|
}
|
|
297
326
|
);
|
|
298
327
|
}
|
|
299
|
-
function
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
328
|
+
function S(s) {
|
|
329
|
+
const b = wt(s, u);
|
|
330
|
+
return j(
|
|
331
|
+
b,
|
|
303
332
|
o
|
|
304
|
-
)
|
|
333
|
+
) ? !1 : (o = b, !0);
|
|
305
334
|
}
|
|
306
|
-
function
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
309
|
-
|
|
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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
)
|
|
325
|
-
|
|
326
|
-
|
|
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
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
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
|
-
|
|
381
|
+
const M = S(s);
|
|
382
|
+
C = J(s), !(!b && !v && !F && !T && !M && a) && _();
|
|
383
|
+
}
|
|
384
|
+
function $() {
|
|
385
|
+
W();
|
|
335
386
|
}
|
|
336
|
-
|
|
337
|
-
|
|
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
|
|
343
|
-
|
|
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
|
|
349
|
-
A(),
|
|
412
|
+
function P() {
|
|
413
|
+
A(), g();
|
|
350
414
|
}
|
|
351
415
|
return {
|
|
352
|
-
update:
|
|
353
|
-
setConfig(
|
|
354
|
-
t = { ...t, ...
|
|
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
|
-
|
|
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
|
|
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(
|
|
379
|
-
const
|
|
380
|
-
const { class:
|
|
381
|
-
return
|
|
382
|
-
}),
|
|
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
|
|
396
|
-
return
|
|
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
|
|
399
|
-
getBoxEl: () =>
|
|
400
|
-
onChange: (
|
|
401
|
-
Object.assign(
|
|
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
|
-
|
|
406
|
-
target:
|
|
407
|
-
placement:
|
|
408
|
-
targetAnchor:
|
|
409
|
-
maxWidth:
|
|
410
|
-
tailLength:
|
|
411
|
-
tailBaseWidth:
|
|
412
|
-
padding:
|
|
413
|
-
shadow:
|
|
414
|
-
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
|
-
|
|
481
|
+
st(
|
|
418
482
|
() => [
|
|
419
|
-
|
|
420
|
-
typeof
|
|
421
|
-
typeof
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
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
|
-
),
|
|
497
|
+
), at(() => {
|
|
434
498
|
k();
|
|
435
|
-
}),
|
|
436
|
-
|
|
499
|
+
}), ct(() => {
|
|
500
|
+
m.destroy();
|
|
437
501
|
});
|
|
438
502
|
function c() {
|
|
439
|
-
|
|
503
|
+
m.update();
|
|
440
504
|
}
|
|
441
505
|
t({ update: c });
|
|
442
|
-
const
|
|
506
|
+
const C = Y(
|
|
443
507
|
() => ({
|
|
444
508
|
...u.value,
|
|
445
|
-
...
|
|
509
|
+
...r.boxStyle
|
|
446
510
|
})
|
|
447
|
-
),
|
|
448
|
-
return (
|
|
511
|
+
), y = Y(() => r.svgStyle);
|
|
512
|
+
return (d, _) => (H(), q("div", ut({
|
|
449
513
|
ref_key: "rootRef",
|
|
450
|
-
ref:
|
|
514
|
+
ref: l,
|
|
451
515
|
class: ["pointing-bubble", "pointing-bubble__inner", o.value],
|
|
452
|
-
"data-placement":
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
placement:
|
|
456
|
-
tip:
|
|
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
|
-
|
|
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
|
-
|
|
529
|
+
e.target && r.tail ? (H(), q("svg", {
|
|
466
530
|
key: 0,
|
|
467
531
|
class: "pointing-bubble__svg",
|
|
468
|
-
style:
|
|
532
|
+
style: ft(y.value)
|
|
469
533
|
}, [
|
|
470
|
-
|
|
534
|
+
X("path", {
|
|
471
535
|
class: "pointing-bubble__path",
|
|
472
|
-
d:
|
|
473
|
-
fill:
|
|
474
|
-
}, null, 8,
|
|
475
|
-
|
|
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:
|
|
542
|
+
d: r.tail.stroke,
|
|
479
543
|
fill: "none",
|
|
480
|
-
stroke:
|
|
481
|
-
"stroke-width":
|
|
544
|
+
stroke: r.boxStroke,
|
|
545
|
+
"stroke-width": r.boxStrokeWidth,
|
|
482
546
|
"stroke-linejoin": "round",
|
|
483
547
|
"stroke-linecap": "butt"
|
|
484
|
-
}, null, 8,
|
|
485
|
-
], 4)) :
|
|
486
|
-
], 16,
|
|
548
|
+
}, null, 8, Mt)) : U("", !0)
|
|
549
|
+
], 4)) : U("", !0)
|
|
550
|
+
], 16, Tt));
|
|
487
551
|
}
|
|
488
|
-
}),
|
|
489
|
-
install(
|
|
490
|
-
const
|
|
491
|
-
|
|
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
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
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
|
};
|