New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@svelte-plugins/tooltips

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svelte-plugins/tooltips - npm Package Compare versions

Comparing version

to
2.1.1

@@ -1,2 +0,2 @@

(function(w,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("svelte")):typeof define=="function"&&define.amd?define(["exports","svelte"],v):(w=typeof globalThis<"u"?globalThis:w||self,v(w.SvelteTooltips={},w.svelte))})(this,function(w,v){"use strict";var ro=Object.defineProperty;var fo=(w,v,k)=>v in w?ro(w,v,{enumerable:!0,configurable:!0,writable:!0,value:k}):w[v]=k;var z=(w,v,k)=>(fo(w,typeof v!="symbol"?v+"":v,k),k);function k(){}function Lt(t,o){for(const e in o)t[e]=o[e];return t}function it(t){return t()}function nt(){return Object.create(null)}function M(t){t.forEach(it)}function lt(t){return typeof t=="function"}function at(t,o){return t!=t?o==o:t!==o||t&&typeof t=="object"||typeof t=="function"}function zt(t){return Object.keys(t).length===0}function st(t,o,e,i){if(t){const n=rt(t,o,e,i);return t[0](n)}}function rt(t,o,e,i){return t[1]&&i?Lt(e.ctx.slice(),t[1](i(o))):e.ctx}function ft(t,o,e,i){if(t[2]&&i){const n=t[2](i(e));if(o.dirty===void 0)return n;if(typeof n=="object"){const a=[],c=Math.max(o.dirty.length,n.length);for(let r=0;r<c;r+=1)a[r]=o.dirty[r]|n[r];return a}return o.dirty|n}return o.dirty}function ct(t,o,e,i,n,a){if(n){const c=rt(o,e,i,a);t.p(c,n)}}function pt(t){if(t.ctx.length>32){const o=[],e=t.ctx.length/32;for(let i=0;i<e;i++)o[i]=-1;return o}return-1}function Ct(t,o){t.appendChild(o)}function ut(t,o,e){const i=St(t);if(!i.getElementById(o)){const n=O("style");n.id=o,n.textContent=e,Nt(i,n)}}function St(t){if(!t)return document;const o=t.getRootNode?t.getRootNode():t.ownerDocument;return o&&o.host?o:t.ownerDocument}function Nt(t,o){return Ct(t.head||t,o),o.sheet}function P(t,o,e){t.insertBefore(o,e||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function O(t){return document.createElement(t)}function Rt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ht(t){return document.createTextNode(t)}function At(){return ht(" ")}function X(){return ht("")}function j(t,o,e){e==null?t.removeAttribute(o):t.getAttribute(o)!==e&&t.setAttribute(o,e)}function Wt(t){return Array.from(t.childNodes)}function h(t,o,e,i){e==null?t.style.removeProperty(o):t.style.setProperty(o,e,i?"important":"")}function L(t,o,e){t.classList.toggle(o,!!e)}class mt{constructor(o=!1){z(this,"is_svg",!1);z(this,"e");z(this,"n");z(this,"t");z(this,"a");this.is_svg=o,this.e=this.n=null}c(o){this.h(o)}m(o,e,i=null){this.e||(this.is_svg?this.e=Rt(e.nodeName):this.e=O(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(o)),this.i(i)}h(o){this.e.innerHTML=o,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(o){for(let e=0;e<this.n.length;e+=1)P(this.t,this.n[e],o)}p(o){this.d(),this.h(o),this.i(this.a)}d(){this.n.forEach(E)}}let Q;function H(t){Q=t}const N=[],I=[];let R=[];const dt=[],Bt=Promise.resolve();let $=!1;function Mt(){$||($=!0,Bt.then(vt))}function tt(t){R.push(t)}const ot=new Set;let A=0;function vt(){if(A!==0)return;const t=Q;do{try{for(;A<N.length;){const o=N[A];A++,H(o),Ot(o.$$)}}catch(o){throw N.length=0,A=0,o}for(H(null),N.length=0,A=0;I.length;)I.pop()();for(let o=0;o<R.length;o+=1){const e=R[o];ot.has(e)||(ot.add(e),e())}R.length=0}while(N.length);for(;dt.length;)dt.pop()();$=!1,ot.clear(),H(t)}function Ot(t){if(t.fragment!==null){t.update(),M(t.before_update);const o=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,o),t.after_update.forEach(tt)}}function jt(t){const o=[],e=[];R.forEach(i=>t.indexOf(i)===-1?o.push(i):e.push(i)),e.forEach(i=>i()),R=o}const Z=new Set;let C;function Ht(){C={r:0,c:[],p:C}}function It(){C.r||M(C.c),C=C.p}function D(t,o){t&&t.i&&(Z.delete(t),t.i(o))}function Y(t,o,e,i){if(t&&t.o){if(Z.has(t))return;Z.add(t),C.c.push(()=>{Z.delete(t),i&&(e&&t.d(1),i())}),t.o(o)}else i&&i()}function Dt(t,o,e){const{fragment:i,after_update:n}=t.$$;i&&i.m(o,e),tt(()=>{const a=t.$$.on_mount.map(it).filter(lt);t.$$.on_destroy?t.$$.on_destroy.push(...a):M(a),t.$$.on_mount=[]}),n.forEach(tt)}function Vt(t,o){const e=t.$$;e.fragment!==null&&(jt(e.after_update),M(e.on_destroy),e.fragment&&e.fragment.d(o),e.on_destroy=e.fragment=null,e.ctx=[])}function Ut(t,o){t.$$.dirty[0]===-1&&(N.push(t),Mt(),t.$$.dirty.fill(0)),t.$$.dirty[o/31|0]|=1<<o%31}function bt(t,o,e,i,n,a,c=null,r=[-1]){const s=Q;H(t);const l=t.$$={fragment:null,ctx:[],props:a,update:k,not_equal:n,bound:nt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(s?s.$$.context:[])),callbacks:nt(),dirty:r,skip_bound:!1,root:o.target||s.$$.root};c&&c(l.root);let f=!1;if(l.ctx=e?e(t,o.props||{},(m,b,...d)=>{const x=d.length?d[0]:b;return l.ctx&&n(l.ctx[m],l.ctx[m]=x)&&(!l.skip_bound&&l.bound[m]&&l.bound[m](x),f&&Ut(t,m)),b}):[],l.update(),f=!0,M(l.before_update),l.fragment=i?i(l.ctx):!1,o.target){if(o.hydrate){const m=Wt(o.target);l.fragment&&l.fragment.l(m),m.forEach(E)}else l.fragment&&l.fragment.c();o.intro&&D(t.$$.fragment),Dt(t,o.target,o.anchor),vt()}H(s)}class gt{constructor(){z(this,"$$");z(this,"$$set")}$destroy(){Vt(this,1),this.$destroy=k}$on(o,e){if(!lt(e))return k;const i=this.$$.callbacks[o]||(this.$$.callbacks[o]=[]);return i.push(e),()=>{const n=i.indexOf(e);n!==-1&&i.splice(n,1)}}$set(o){this.$$set&&!zt(o)&&(this.$$.skip_bound=!0,this.$$set(o),this.$$.skip_bound=!1)}}const Ft="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ft);const yt=t=>t.replace(/-_$/g,"").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z])(?=[a-z])/g,"$1-$2").toLowerCase(),wt=(t,o)=>{const i=t.getBoundingClientRect().width+2,n=window.getComputedStyle(t),a=parseInt(n.getPropertyValue("padding-left"),10),c=parseInt(n.getPropertyValue("padding-right"),10),r=a+c,s=i-r;return Math.round(Math.min(o,s||o))},_t=(t,o=null,e)=>{const i=t.getBoundingClientRect(),n=window.innerWidth||document.documentElement.clientWidth,a=window.innerHeight||document.documentElement.clientHeight;let c=i.bottom>0&&i.top<a&&i.right>0&&i.left<n;if(o){const r=o.getBoundingClientRect();return e==="top"||e==="bottom"?c=r.bottom+r.height<a&&r.top<a:c=r.right+r.width<n&&r.left<n,c}return c},et=(t,o,e,i)=>{if(!t||!o)return i;let n=0,a=0,c=0,r=0,s=0,l=t;for(;l!==document.body;){const x=window.getComputedStyle(l),q=x.position;q==="fixed"?(c+=l.getBoundingClientRect().top+window.scrollY,s+=l.getBoundingClientRect().left+window.scrollX):q==="sticky"?(r+=l.getBoundingClientRect().top,s+=l.getBoundingClientRect().left+window.scrollX):(q==="absolute"||q==="relative")&&(n-=parseFloat(x.top)||0,a-=parseFloat(x.left)||0),l=l.parentElement}const f=t.getBoundingClientRect(),m=o.getBoundingClientRect();let b=f.top+n+r-c,d=f.left+a-s;switch(e){case"top":i.top=b,i.left=d+f.width/2;break;case"bottom":i.top=b-m.height,i.left=d+f.width/2;break;case"left":i.left=d,i.top=b+f.height/2;break;case"right":i.left=d+f.width-m.width,i.top=b+f.height/2;break}return i.top+=window.scrollY,i.left+=window.scrollX,i},xt={left:"right",right:"left",top:"bottom",bottom:"top"};function Xt(t){ut(t,"svelte-1fqbu6l",`:root{--tooltip-arrow-size:10px;--tooltip-background-color:rgba(0, 0, 0, 0.9);--tooltip-border-radius:4px;--tooltip-box-shadow:0 1px 20px rgba(0, 0, 0, 0.25);--tooltip-font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
(function(_,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("svelte")):typeof define=="function"&&define.amd?define(["exports","svelte"],b):(_=typeof globalThis<"u"?globalThis:_||self,b(_.SvelteTooltips={},_.svelte))})(this,function(_,b){"use strict";var ro=Object.defineProperty;var fo=(_,b,q)=>b in _?ro(_,b,{enumerable:!0,configurable:!0,writable:!0,value:q}):_[b]=q;var C=(_,b,q)=>(fo(_,typeof b!="symbol"?b+"":b,q),q);function q(){}function Pt(t,o){for(const e in o)t[e]=o[e];return t}function it(t){return t()}function nt(){return Object.create(null)}function B(t){t.forEach(it)}function lt(t){return typeof t=="function"}function at(t,o){return t!=t?o==o:t!==o||t&&typeof t=="object"||typeof t=="function"}function zt(t){return Object.keys(t).length===0}function st(t,o,e,i){if(t){const n=rt(t,o,e,i);return t[0](n)}}function rt(t,o,e,i){return t[1]&&i?Pt(e.ctx.slice(),t[1](i(o))):e.ctx}function ft(t,o,e,i){if(t[2]&&i){const n=t[2](i(e));if(o.dirty===void 0)return n;if(typeof n=="object"){const a=[],c=Math.max(o.dirty.length,n.length);for(let r=0;r<c;r+=1)a[r]=o.dirty[r]|n[r];return a}return o.dirty|n}return o.dirty}function ct(t,o,e,i,n,a){if(n){const c=rt(o,e,i,a);t.p(c,n)}}function pt(t){if(t.ctx.length>32){const o=[],e=t.ctx.length/32;for(let i=0;i<e;i++)o[i]=-1;return o}return-1}function Ct(t,o){t.appendChild(o)}function ut(t,o,e){const i=St(t);if(!i.getElementById(o)){const n=O("style");n.id=o,n.textContent=e,Nt(i,n)}}function St(t){if(!t)return document;const o=t.getRootNode?t.getRootNode():t.ownerDocument;return o&&o.host?o:t.ownerDocument}function Nt(t,o){return Ct(t.head||t,o),o.sheet}function P(t,o,e){t.insertBefore(o,e||null)}function T(t){t.parentNode&&t.parentNode.removeChild(t)}function O(t){return document.createElement(t)}function Rt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ht(t){return document.createTextNode(t)}function Mt(){return ht(" ")}function X(){return ht("")}function j(t,o,e){e==null?t.removeAttribute(o):t.getAttribute(o)!==e&&t.setAttribute(o,e)}function At(t){return Array.from(t.childNodes)}function h(t,o,e,i){e==null?t.style.removeProperty(o):t.style.setProperty(o,e,i?"important":"")}function z(t,o,e){t.classList.toggle(o,!!e)}class mt{constructor(o=!1){C(this,"is_svg",!1);C(this,"e");C(this,"n");C(this,"t");C(this,"a");this.is_svg=o,this.e=this.n=null}c(o){this.h(o)}m(o,e,i=null){this.e||(this.is_svg?this.e=Rt(e.nodeName):this.e=O(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(o)),this.i(i)}h(o){this.e.innerHTML=o,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(o){for(let e=0;e<this.n.length;e+=1)P(this.t,this.n[e],o)}p(o){this.d(),this.h(o),this.i(this.a)}d(){this.n.forEach(T)}}let Q;function H(t){Q=t}const N=[],I=[];let R=[];const dt=[],Wt=Promise.resolve();let $=!1;function Bt(){$||($=!0,Wt.then(vt))}function tt(t){R.push(t)}const ot=new Set;let M=0;function vt(){if(M!==0)return;const t=Q;do{try{for(;M<N.length;){const o=N[M];M++,H(o),Ot(o.$$)}}catch(o){throw N.length=0,M=0,o}for(H(null),N.length=0,M=0;I.length;)I.pop()();for(let o=0;o<R.length;o+=1){const e=R[o];ot.has(e)||(ot.add(e),e())}R.length=0}while(N.length);for(;dt.length;)dt.pop()();$=!1,ot.clear(),H(t)}function Ot(t){if(t.fragment!==null){t.update(),B(t.before_update);const o=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,o),t.after_update.forEach(tt)}}function jt(t){const o=[],e=[];R.forEach(i=>t.indexOf(i)===-1?o.push(i):e.push(i)),e.forEach(i=>i()),R=o}const Z=new Set;let S;function Ht(){S={r:0,c:[],p:S}}function It(){S.r||B(S.c),S=S.p}function D(t,o){t&&t.i&&(Z.delete(t),t.i(o))}function Y(t,o,e,i){if(t&&t.o){if(Z.has(t))return;Z.add(t),S.c.push(()=>{Z.delete(t),i&&(e&&t.d(1),i())}),t.o(o)}else i&&i()}function Dt(t,o,e){const{fragment:i,after_update:n}=t.$$;i&&i.m(o,e),tt(()=>{const a=t.$$.on_mount.map(it).filter(lt);t.$$.on_destroy?t.$$.on_destroy.push(...a):B(a),t.$$.on_mount=[]}),n.forEach(tt)}function Vt(t,o){const e=t.$$;e.fragment!==null&&(jt(e.after_update),B(e.on_destroy),e.fragment&&e.fragment.d(o),e.on_destroy=e.fragment=null,e.ctx=[])}function Ut(t,o){t.$$.dirty[0]===-1&&(N.push(t),Bt(),t.$$.dirty.fill(0)),t.$$.dirty[o/31|0]|=1<<o%31}function bt(t,o,e,i,n,a,c=null,r=[-1]){const s=Q;H(t);const l=t.$$={fragment:null,ctx:[],props:a,update:q,not_equal:n,bound:nt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(s?s.$$.context:[])),callbacks:nt(),dirty:r,skip_bound:!1,root:o.target||s.$$.root};c&&c(l.root);let f=!1;if(l.ctx=e?e(t,o.props||{},(m,g,...d)=>{const x=d.length?d[0]:g;return l.ctx&&n(l.ctx[m],l.ctx[m]=x)&&(!l.skip_bound&&l.bound[m]&&l.bound[m](x),f&&Ut(t,m)),g}):[],l.update(),f=!0,B(l.before_update),l.fragment=i?i(l.ctx):!1,o.target){if(o.hydrate){const m=At(o.target);l.fragment&&l.fragment.l(m),m.forEach(T)}else l.fragment&&l.fragment.c();o.intro&&D(t.$$.fragment),Dt(t,o.target,o.anchor),vt()}H(s)}class gt{constructor(){C(this,"$$");C(this,"$$set")}$destroy(){Vt(this,1),this.$destroy=q}$on(o,e){if(!lt(e))return q;const i=this.$$.callbacks[o]||(this.$$.callbacks[o]=[]);return i.push(e),()=>{const n=i.indexOf(e);n!==-1&&i.splice(n,1)}}$set(o){this.$$set&&!zt(o)&&(this.$$.skip_bound=!0,this.$$set(o),this.$$.skip_bound=!1)}}const Ft="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ft);const yt=t=>t.replace(/-_$/g,"").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z])(?=[a-z])/g,"$1-$2").toLowerCase(),wt=(t,o)=>{const i=t.getBoundingClientRect().width+2,n=window.getComputedStyle(t),a=parseInt(n.getPropertyValue("padding-left"),10),c=parseInt(n.getPropertyValue("padding-right"),10),r=a+c,s=i-r;return Math.round(Math.min(o,s||o))},_t=(t,o=null,e)=>{const i=t.getBoundingClientRect(),n=window.innerWidth||document.documentElement.clientWidth,a=window.innerHeight||document.documentElement.clientHeight;let c=i.bottom>0&&i.top<a&&i.right>0&&i.left<n;if(o){const r=o.getBoundingClientRect();return e==="top"||e==="bottom"?c=r.bottom+r.height<a&&r.top<a:c=r.right+r.width<n&&r.left<n,c}return c},et=(t,o,e,i)=>{if(!t||!o)return i;let n=0,a=0,c=0,r=0,s=0,l=t;for(;l!==document.body;){const x=window.getComputedStyle(l),k=x.position;k==="fixed"?(c+=l.getBoundingClientRect().top+window.scrollY,s+=l.getBoundingClientRect().left+window.scrollX):k==="sticky"?(r+=l.getBoundingClientRect().top,s+=l.getBoundingClientRect().left+window.scrollX):(k==="absolute"||k==="relative")&&(n-=parseFloat(x.top)||0,a-=parseFloat(x.left)||0,k==="relative"&&(n-=l.offsetTop,a-=l.offsetLeft));const E=x.transform;if(E&&E!=="none"){const v=new DOMMatrix(E);n-=v.m42,a-=v.m41}l=l.parentElement}const f=t.getBoundingClientRect(),m=o.getBoundingClientRect();let g=f.top+n+r-c,d=f.left+a-s;switch(e){case"top":i.top=g,i.left=d+f.width/2;break;case"bottom":i.top=g-m.height,i.left=d+f.width/2;break;case"left":i.left=d,i.top=g+f.height/2;break;case"right":i.left=d+f.width-m.width,i.top=g+f.height/2;break}return i.top+=window.scrollY,i.left+=window.scrollX,i},xt={left:"right",right:"left",top:"bottom",bottom:"top"};function Xt(t){ut(t,"svelte-1fqbu6l",`:root{--tooltip-arrow-size:10px;--tooltip-background-color:rgba(0, 0, 0, 0.9);--tooltip-border-radius:4px;--tooltip-box-shadow:0 1px 20px rgba(0, 0, 0, 0.25);--tooltip-font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
'Helvetica Neue', sans-serif;--tooltip-font-size:14px;--tooltip-font-weight:500;--tooltip-line-height:1.25rem;--tooltip-color:#fff;--tooltip-offset-x:0px;--tooltip-offset-y:0px;--tooltip-padding:12px;--tooltip-pointer-events:none;--tooltip-white-space-hidden:nowrap;--tooltip-white-space-shown:normal;--tooltip-z-index:100}.tooltip.svelte-1fqbu6l{background-color:var(--tooltip-background-color);box-shadow:var(--tooltip-box-shadow);border-radius:var(--tooltip-border-radius);color:var(--tooltip-color);opacity:0;font-family:var(--tooltip-font-family);font-size:var(--tooltip-font-size);font-style:normal;font-weight:var(--tooltip-font-weight);line-height:var(--tooltip-line-height);padding:var(--tooltip-padding);pointer-events:var(--tooltip-pointer-events);position:absolute;text-align:left;visibility:hidden;white-space:var(--tooltip-white-space-hidden);z-index:var(--tooltip-z-index)}.tooltip.show.svelte-1fqbu6l{opacity:1;visibility:visible;white-space:var(--tooltip-white-space-shown)}.tooltip.bottom.svelte-1fqbu6l:after,.tooltip.left.svelte-1fqbu6l:after,.tooltip.right.svelte-1fqbu6l:after,.tooltip.top.svelte-1fqbu6l:after{border:var(--tooltip-arrow-size) solid var(--tooltip-background-color);content:' ';position:absolute}.tooltip.arrowless.svelte-1fqbu6l:after{border:0 !important}.tooltip.bottom.svelte-1fqbu6l,.tooltip.top.svelte-1fqbu6l{--tooltip-offset-x:0px;--tooltip-offset-y:12px}.tooltip.left.svelte-1fqbu6l,.tooltip.right.svelte-1fqbu6l{--tooltip-offset-x:12px;--tooltip-offset-y:0px}.tooltip.bottom.svelte-1fqbu6l{bottom:0;left:50%;transform:translate(

@@ -59,3 +59,3 @@ calc(-50% + var(--tooltip-offset-x)),

calc(100% + var(--tooltip-offset-y))
) scale(1, 1)}`)}function Zt(t){let o;const e=t[20].default,i=st(e,t,t[19],null);return{c(){i&&i.c()},m(n,a){i&&i.m(n,a),o=!0},p(n,a){i&&i.p&&(!o||a&524288)&&ct(i,e,n,n[19],o?ft(e,n[19],a,null):pt(n[19]),null)},i(n){o||(D(i,n),o=!0)},o(n){Y(i,n),o=!1},d(n){i&&i.d(n)}}}function Yt(t){let o,e,i,n,a;const c=t[20].default,r=st(c,t,t[19],null);let s=!t[12]&&kt(t);return{c(){o=O("span"),r&&r.c(),e=At(),i=O("div"),s&&s.c(),j(o,"class","tooltip-container"),j(i,"class",n="tooltip animation-"+t[9]+" "+t[0]+" "+t[4]+" svelte-1fqbu6l"),h(i,"bottom","auto"),h(i,"right","auto"),h(i,"left",t[11].left+"px"),h(i,"min-width",t[8]+"px"),h(i,"max-width",t[3]+"px"),h(i,"text-align",t[2]),h(i,"top",t[11].top+"px"),L(i,"arrowless",!t[5]),L(i,"show",t[10])},m(l,f){P(l,o,f),r&&r.m(o,null),t[21](o),P(l,e,f),P(l,i,f),s&&s.m(i,null),t[22](i),a=!0},p(l,f){r&&r.p&&(!a||f&524288)&&ct(r,c,l,l[19],a?ft(c,l[19],f,null):pt(l[19]),null),l[12]?s&&(s.d(1),s=null):s?s.p(l,f):(s=kt(l),s.c(),s.m(i,null)),(!a||f&529&&n!==(n="tooltip animation-"+l[9]+" "+l[0]+" "+l[4]+" svelte-1fqbu6l"))&&j(i,"class",n),(!a||f&2048)&&h(i,"left",l[11].left+"px"),(!a||f&256)&&h(i,"min-width",l[8]+"px"),(!a||f&8)&&h(i,"max-width",l[3]+"px"),(!a||f&4)&&h(i,"text-align",l[2]),(!a||f&2048)&&h(i,"top",l[11].top+"px"),(!a||f&561)&&L(i,"arrowless",!l[5]),(!a||f&1553)&&L(i,"show",l[10])},i(l){a||(D(r,l),a=!0)},o(l){Y(r,l),a=!1},d(l){l&&(E(o),E(e),E(i)),r&&r.d(l),t[21](null),s&&s.d(),t[22](null)}}}function kt(t){let o,e;return{c(){o=new mt(!1),e=X(),o.a=e},m(i,n){o.m(t[1],i,n),P(i,e,n)},p(i,n){n&2&&o.p(i[1])},d(i){i&&(E(e),o.d())}}}function Kt(t){let o,e,i,n;const a=[Yt,Zt],c=[];function r(s,l){return s[1]?0:1}return o=r(t),e=c[o]=a[o](t),{c(){e.c(),i=X()},m(s,l){c[o].m(s,l),P(s,i,l),n=!0},p(s,[l]){let f=o;o=r(s),o===f?c[o].p(s,l):(Ht(),Y(c[f],1,1,()=>{c[f]=null}),It(),e=c[o],e?e.p(s,l):(e=c[o]=a[o](s),e.c()),D(e,1),e.m(i.parentNode,i))},i(s){n||(D(e),n=!0)},o(s){Y(e),n=!1},d(s){s&&E(i),c[o].d(s)}}}function Gt(t,o,e){let i,{$$slots:n={},$$scope:a}=o,{action:c="hover"}=o,{content:r=""}=o,{align:s="left"}=o,{position:l="top"}=o,{maxWidth:f=200}=o,{style:m=null}=o,{theme:b=""}=o,{animation:d=""}=o,{delay:x=200}=o,{arrow:q=!0}=o,{autoPosition:S=!1}=o,{show:_=!1}=o,g=null,y=null,V=0,T=null,U=l,W=null,B=null,p=!1,F={bottom:0,top:0,right:0,left:0};const K=()=>{p?J():G()},G=()=>{const u=d?x:0;S&&!_t(g,y,l)&&e(0,l=xt[l]),e(11,F=et(g,y,l,F)),d&&e(9,W=d),B=setTimeout(()=>e(10,p=!0),u)},J=()=>{e(10,p=!1),e(0,l=U),e(9,W=null),B&&(clearTimeout(B),B=null)},Tt=()=>{g!==null&&(Pt(),c==="click"&&g.addEventListener("click",K),c==="hover"&&(g.addEventListener("mouseenter",G),g.addEventListener("mouseleave",J)))},Pt=()=>{g!==null&&(g.removeEventListener("click",K),g.removeEventListener("mouseenter",G),g.removeEventListener("mouseleave",J))};v.onMount(()=>{if(Tt(),et(),y!==null&&(i&&!T&&(T=new r.component({target:y,props:r.props})),e(8,V=wt(y,f)),m&&typeof m=="object"))for(let u in m){const ao=yt(u),so=m[u];y.style.setProperty(`--tooltip-${ao}`,so)}}),v.onDestroy(()=>{T&&(T.$destroy(),T=null),Pt()});function no(u){I[u?"unshift":"push"](()=>{g=u,e(7,g)})}function lo(u){I[u?"unshift":"push"](()=>{y=u,e(6,y)})}return t.$$set=u=>{"action"in u&&e(13,c=u.action),"content"in u&&e(1,r=u.content),"align"in u&&e(2,s=u.align),"position"in u&&e(0,l=u.position),"maxWidth"in u&&e(3,f=u.maxWidth),"style"in u&&e(14,m=u.style),"theme"in u&&e(4,b=u.theme),"animation"in u&&e(15,d=u.animation),"delay"in u&&e(16,x=u.delay),"arrow"in u&&e(5,q=u.arrow),"autoPosition"in u&&e(17,S=u.autoPosition),"show"in u&&e(18,_=u.show),"$$scope"in u&&e(19,a=u.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&e(12,i=typeof r=="object"),t.$$.dirty&8192&&Tt(),t.$$.dirty&262208&&(y&&_?G():J())},[l,r,s,f,b,q,y,g,V,W,p,F,i,c,m,d,x,S,_,a,n,no,lo]}const Jt=class extends gt{constructor(o){super(),bt(this,o,Gt,Kt,at,{action:13,content:1,align:2,position:0,maxWidth:3,style:14,theme:4,animation:15,delay:16,arrow:5,autoPosition:17,show:18},Xt)}};function Qt(t){ut(t,"svelte-hla1ha",`:root{--tooltip-arrow-size:10px;--tooltip-background-color:rgba(0, 0, 0, 0.9);--tooltip-border-radius:4px;--tooltip-box-shadow:0 1px 20px rgba(0, 0, 0, 0.25);--tooltip-font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
) scale(1, 1)}`)}function Zt(t){let o;const e=t[20].default,i=st(e,t,t[19],null);return{c(){i&&i.c()},m(n,a){i&&i.m(n,a),o=!0},p(n,a){i&&i.p&&(!o||a&524288)&&ct(i,e,n,n[19],o?ft(e,n[19],a,null):pt(n[19]),null)},i(n){o||(D(i,n),o=!0)},o(n){Y(i,n),o=!1},d(n){i&&i.d(n)}}}function Yt(t){let o,e,i,n,a;const c=t[20].default,r=st(c,t,t[19],null);let s=!t[12]&&kt(t);return{c(){o=O("span"),r&&r.c(),e=Mt(),i=O("div"),s&&s.c(),j(o,"class","tooltip-container"),j(i,"class",n="tooltip animation-"+t[9]+" "+t[0]+" "+t[4]+" svelte-1fqbu6l"),h(i,"bottom","auto"),h(i,"right","auto"),h(i,"left",t[11].left+"px"),h(i,"min-width",t[8]+"px"),h(i,"max-width",t[3]+"px"),h(i,"text-align",t[2]),h(i,"top",t[11].top+"px"),z(i,"arrowless",!t[5]),z(i,"show",t[10])},m(l,f){P(l,o,f),r&&r.m(o,null),t[21](o),P(l,e,f),P(l,i,f),s&&s.m(i,null),t[22](i),a=!0},p(l,f){r&&r.p&&(!a||f&524288)&&ct(r,c,l,l[19],a?ft(c,l[19],f,null):pt(l[19]),null),l[12]?s&&(s.d(1),s=null):s?s.p(l,f):(s=kt(l),s.c(),s.m(i,null)),(!a||f&529&&n!==(n="tooltip animation-"+l[9]+" "+l[0]+" "+l[4]+" svelte-1fqbu6l"))&&j(i,"class",n),(!a||f&2048)&&h(i,"left",l[11].left+"px"),(!a||f&256)&&h(i,"min-width",l[8]+"px"),(!a||f&8)&&h(i,"max-width",l[3]+"px"),(!a||f&4)&&h(i,"text-align",l[2]),(!a||f&2048)&&h(i,"top",l[11].top+"px"),(!a||f&561)&&z(i,"arrowless",!l[5]),(!a||f&1553)&&z(i,"show",l[10])},i(l){a||(D(r,l),a=!0)},o(l){Y(r,l),a=!1},d(l){l&&(T(o),T(e),T(i)),r&&r.d(l),t[21](null),s&&s.d(),t[22](null)}}}function kt(t){let o,e;return{c(){o=new mt(!1),e=X(),o.a=e},m(i,n){o.m(t[1],i,n),P(i,e,n)},p(i,n){n&2&&o.p(i[1])},d(i){i&&(T(e),o.d())}}}function Kt(t){let o,e,i,n;const a=[Yt,Zt],c=[];function r(s,l){return s[1]?0:1}return o=r(t),e=c[o]=a[o](t),{c(){e.c(),i=X()},m(s,l){c[o].m(s,l),P(s,i,l),n=!0},p(s,[l]){let f=o;o=r(s),o===f?c[o].p(s,l):(Ht(),Y(c[f],1,1,()=>{c[f]=null}),It(),e=c[o],e?e.p(s,l):(e=c[o]=a[o](s),e.c()),D(e,1),e.m(i.parentNode,i))},i(s){n||(D(e),n=!0)},o(s){Y(e),n=!1},d(s){s&&T(i),c[o].d(s)}}}function Gt(t,o,e){let i,{$$slots:n={},$$scope:a}=o,{action:c="hover"}=o,{content:r=""}=o,{align:s="left"}=o,{position:l="top"}=o,{maxWidth:f=200}=o,{style:m=null}=o,{theme:g=""}=o,{animation:d=""}=o,{delay:x=200}=o,{arrow:k=!0}=o,{autoPosition:E=!1}=o,{show:v=!1}=o,y=null,w=null,V=0,L=null,U=l,A=null,W=null,p=!1,F={bottom:0,top:0,right:0,left:0};const K=()=>{p?J():G()},G=()=>{const u=d?x:0;E&&!_t(y,w,l)&&e(0,l=xt[l]),e(11,F=et(y,w,l,F)),d&&e(9,A=d),W=setTimeout(()=>e(10,p=!0),u)},J=()=>{e(10,p=!1),e(0,l=U),e(9,A=null),W&&(clearTimeout(W),W=null)},Tt=()=>{y!==null&&(Lt(),c==="click"&&y.addEventListener("click",K),c==="hover"&&(y.addEventListener("mouseenter",G),y.addEventListener("mouseleave",J)))},Lt=()=>{y!==null&&(y.removeEventListener("click",K),y.removeEventListener("mouseenter",G),y.removeEventListener("mouseleave",J))};b.onMount(()=>{if(Tt(),et(),w!==null&&(i&&!L&&(L=new r.component({target:w,props:r.props})),e(8,V=wt(w,f)),m&&typeof m=="object"))for(let u in m){const ao=yt(u),so=m[u];w.style.setProperty(`--tooltip-${ao}`,so)}}),b.onDestroy(()=>{L&&(L.$destroy(),L=null),Lt()});function no(u){I[u?"unshift":"push"](()=>{y=u,e(7,y)})}function lo(u){I[u?"unshift":"push"](()=>{w=u,e(6,w)})}return t.$$set=u=>{"action"in u&&e(13,c=u.action),"content"in u&&e(1,r=u.content),"align"in u&&e(2,s=u.align),"position"in u&&e(0,l=u.position),"maxWidth"in u&&e(3,f=u.maxWidth),"style"in u&&e(14,m=u.style),"theme"in u&&e(4,g=u.theme),"animation"in u&&e(15,d=u.animation),"delay"in u&&e(16,x=u.delay),"arrow"in u&&e(5,k=u.arrow),"autoPosition"in u&&e(17,E=u.autoPosition),"show"in u&&e(18,v=u.show),"$$scope"in u&&e(19,a=u.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&e(12,i=typeof r=="object"),t.$$.dirty&8192&&Tt(),t.$$.dirty&262208&&(w&&v?G():J())},[l,r,s,f,g,k,w,y,V,A,p,F,i,c,m,d,x,E,v,a,n,no,lo]}const Jt=class extends gt{constructor(o){super(),bt(this,o,Gt,Kt,at,{action:13,content:1,align:2,position:0,maxWidth:3,style:14,theme:4,animation:15,delay:16,arrow:5,autoPosition:17,show:18},Xt)}};function Qt(t){ut(t,"svelte-hla1ha",`:root{--tooltip-arrow-size:10px;--tooltip-background-color:rgba(0, 0, 0, 0.9);--tooltip-border-radius:4px;--tooltip-box-shadow:0 1px 20px rgba(0, 0, 0, 0.25);--tooltip-font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
'Helvetica Neue', sans-serif;--tooltip-font-size:14px;--tooltip-font-weight:500;--tooltip-line-height:1.25rem;--tooltip-color:#fff;--tooltip-offset-x:12px;--tooltip-offset-y:12px;--tooltip-padding:12px;--tooltip-pointer-events:none;--tooltip-white-space-hidden:nowrap;--tooltip-white-space-shown:normal;--tooltip-z-index:100}.tooltip.svelte-hla1ha{background-color:var(--tooltip-background-color);box-shadow:var(--tooltip-box-shadow);border-radius:var(--tooltip-border-radius);color:var(--tooltip-color);opacity:0;font-family:var(--tooltip-font-family);font-size:var(--tooltip-font-size);font-style:normal;font-weight:var(--tooltip-font-weight);line-height:var(--tooltip-line-height);padding:var(--tooltip-padding);pointer-events:var(---tooltip-pointer-events);position:absolute;text-align:left;visibility:hidden;white-space:var(--tooltip-white-space-hidden);z-index:var(--tooltip-z-index)}.tooltip.show.svelte-hla1ha{opacity:1;visibility:visible;white-space:var(--tooltip-white-space-shown)}.tooltip.bottom.svelte-hla1ha:after,.tooltip.left.svelte-hla1ha:after,.tooltip.right.svelte-hla1ha:after,.tooltip.top.svelte-hla1ha:after{border:var(--tooltip-arrow-size) solid var(--tooltip-background-color);content:' ';position:absolute}.tooltip.arrowless.svelte-hla1ha:after{border:0 !important}.tooltip.bottom.svelte-hla1ha,.tooltip.top.svelte-hla1ha{--tooltip-offset-x:0px;--tooltip-offset-y:12px}.tooltip.left.svelte-hla1ha,.tooltip.right.svelte-hla1ha{--tooltip-offset-x:12px;--tooltip-offset-y:0px}.tooltip.bottom.svelte-hla1ha{bottom:0;left:50%;transform:translate(

@@ -118,2 +118,2 @@ calc(-50% + var(--tooltip-offset-x)),

calc(100% + var(--tooltip-offset-y))
) scale(1, 1)}`)}function qt(t){let o,e,i=!t[11]&&Et(t);return{c(){o=O("div"),i&&i.c(),j(o,"class",e="tooltip animation-"+t[8]+" "+t[0]+" "+t[4]+" svelte-hla1ha"),h(o,"bottom","auto"),h(o,"right","auto"),h(o,"left",t[10].left+"px"),h(o,"min-width",t[7]+"px"),h(o,"max-width",t[3]+"px"),h(o,"text-align",t[2]),h(o,"top",t[10].top+"px"),L(o,"show",t[9]),L(o,"arrowless",!t[5])},m(n,a){P(n,o,a),i&&i.m(o,null),t[19](o)},p(n,a){n[11]?i&&(i.d(1),i=null):i?i.p(n,a):(i=Et(n),i.c(),i.m(o,null)),a&273&&e!==(e="tooltip animation-"+n[8]+" "+n[0]+" "+n[4]+" svelte-hla1ha")&&j(o,"class",e),a&1024&&h(o,"left",n[10].left+"px"),a&128&&h(o,"min-width",n[7]+"px"),a&8&&h(o,"max-width",n[3]+"px"),a&4&&h(o,"text-align",n[2]),a&1024&&h(o,"top",n[10].top+"px"),a&785&&L(o,"show",n[9]),a&305&&L(o,"arrowless",!n[5])},d(n){n&&E(o),i&&i.d(),t[19](null)}}}function Et(t){let o,e;return{c(){o=new mt(!1),e=X(),o.a=e},m(i,n){o.m(t[1],i,n),P(i,e,n)},p(i,n){n&2&&o.p(i[1])},d(i){i&&(E(e),o.d())}}}function $t(t){let o,e=t[1]&&qt(t);return{c(){e&&e.c(),o=X()},m(i,n){e&&e.m(i,n),P(i,o,n)},p(i,[n]){i[1]?e?e.p(i,n):(e=qt(i),e.c(),e.m(o.parentNode,o)):e&&(e.d(1),e=null)},i:k,o:k,d(i){i&&E(o),e&&e.d(i)}}}function to(t,o,e){let i,{targetElement:n=null}=o,{action:a="hover"}=o,{content:c=""}=o,{align:r="left"}=o,{position:s="top"}=o,{maxWidth:l=200}=o,{style:f=null}=o,{theme:m=""}=o,{animation:b=""}=o,{delay:d=200}=o,{arrow:x=!0}=o,{autoPosition:q=!1}=o,{show:S=!1}=o,_=null,g=0,y=null,V=null,T=!1,U={bottom:0,top:0,right:0,left:0};const W=b?d:0;v.onMount(()=>{if(_!==null&&(i&&!y&&(y=new c.component({target:_,props:{action:a,...c.props}})),e(7,g=wt(_,l)),f&&typeof f=="object"))for(let p in f){const F=yt(p),K=f[p];_.style.setProperty(`--tooltip-${F}`,K)}q&&!_t(_,n,s)&&e(0,s=xt[s]),e(10,U=et(n,_,s,U)),b&&e(8,V=b),setTimeout(()=>e(9,T=!0),W)}),v.onDestroy(()=>{y&&(y.$destroy(),y=null)});function B(p){I[p?"unshift":"push"](()=>{_=p,e(6,_)})}return t.$$set=p=>{"targetElement"in p&&e(12,n=p.targetElement),"action"in p&&e(13,a=p.action),"content"in p&&e(1,c=p.content),"align"in p&&e(2,r=p.align),"position"in p&&e(0,s=p.position),"maxWidth"in p&&e(3,l=p.maxWidth),"style"in p&&e(14,f=p.style),"theme"in p&&e(4,m=p.theme),"animation"in p&&e(15,b=p.animation),"delay"in p&&e(16,d=p.delay),"arrow"in p&&e(5,x=p.arrow),"autoPosition"in p&&e(17,q=p.autoPosition),"show"in p&&e(18,S=p.show)},t.$$.update=()=>{t.$$.dirty&2&&e(11,i=typeof c=="object"),t.$$.dirty&262208&&(_&&S?setTimeout(()=>e(9,T=!0),W):e(9,T=!1))},[s,c,r,l,m,x,_,g,V,T,U,i,n,a,f,b,d,q,S,B]}class oo extends gt{constructor(o){super(),bt(this,o,to,$t,at,{targetElement:12,action:13,content:1,align:2,position:0,maxWidth:3,style:14,theme:4,animation:15,delay:16,arrow:5,autoPosition:17,show:18},Qt)}}const eo=oo,io=(t,o)=>{let e=null,i=t.getAttribute("title"),n=(o==null?void 0:o.action)||t.getAttribute("action")||"hover";const a={...o,targetElement:t};i&&(t.removeAttribute("title"),a.content=i);const c=()=>{e?s():r()},r=()=>{e||(e=new eo({target:t,props:a}))},s=()=>{e&&(e.$destroy(),e=null)},l=()=>{t!==null&&(f(),a.show&&r(),n==="click"&&t.addEventListener("click",c),n==="hover"&&(t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",s)))},f=()=>{t!==null&&(t.removeEventListener("click",c),t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",s))};return l(),{destroy(){f(),i&&t.setAttribute("title",i)}}};w.Tooltip=Jt,w.tooltip=io,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
) scale(1, 1)}`)}function qt(t){let o,e,i=!t[11]&&Et(t);return{c(){o=O("div"),i&&i.c(),j(o,"class",e="tooltip animation-"+t[8]+" "+t[0]+" "+t[4]+" svelte-hla1ha"),h(o,"bottom","auto"),h(o,"right","auto"),h(o,"left",t[10].left+"px"),h(o,"min-width",t[7]+"px"),h(o,"max-width",t[3]+"px"),h(o,"text-align",t[2]),h(o,"top",t[10].top+"px"),z(o,"show",t[9]),z(o,"arrowless",!t[5])},m(n,a){P(n,o,a),i&&i.m(o,null),t[19](o)},p(n,a){n[11]?i&&(i.d(1),i=null):i?i.p(n,a):(i=Et(n),i.c(),i.m(o,null)),a&273&&e!==(e="tooltip animation-"+n[8]+" "+n[0]+" "+n[4]+" svelte-hla1ha")&&j(o,"class",e),a&1024&&h(o,"left",n[10].left+"px"),a&128&&h(o,"min-width",n[7]+"px"),a&8&&h(o,"max-width",n[3]+"px"),a&4&&h(o,"text-align",n[2]),a&1024&&h(o,"top",n[10].top+"px"),a&785&&z(o,"show",n[9]),a&305&&z(o,"arrowless",!n[5])},d(n){n&&T(o),i&&i.d(),t[19](null)}}}function Et(t){let o,e;return{c(){o=new mt(!1),e=X(),o.a=e},m(i,n){o.m(t[1],i,n),P(i,e,n)},p(i,n){n&2&&o.p(i[1])},d(i){i&&(T(e),o.d())}}}function $t(t){let o,e=t[1]&&qt(t);return{c(){e&&e.c(),o=X()},m(i,n){e&&e.m(i,n),P(i,o,n)},p(i,[n]){i[1]?e?e.p(i,n):(e=qt(i),e.c(),e.m(o.parentNode,o)):e&&(e.d(1),e=null)},i:q,o:q,d(i){i&&T(o),e&&e.d(i)}}}function to(t,o,e){let i,{targetElement:n=null}=o,{action:a="hover"}=o,{content:c=""}=o,{align:r="left"}=o,{position:s="top"}=o,{maxWidth:l=200}=o,{style:f=null}=o,{theme:m=""}=o,{animation:g=""}=o,{delay:d=200}=o,{arrow:x=!0}=o,{autoPosition:k=!1}=o,{show:E=!1}=o,v=null,y=0,w=null,V=null,L=!1,U={bottom:0,top:0,right:0,left:0};const A=g?d:0;b.onMount(()=>{if(v!==null&&(i&&!w&&(w=new c.component({target:v,props:{action:a,...c.props}})),e(7,y=wt(v,l)),f&&typeof f=="object"))for(let p in f){const F=yt(p),K=f[p];v.style.setProperty(`--tooltip-${F}`,K)}k&&!_t(v,n,s)&&e(0,s=xt[s]),e(10,U=et(n,v,s,U)),g&&e(8,V=g),setTimeout(()=>e(9,L=!0),A)}),b.onDestroy(()=>{w&&(w.$destroy(),w=null)});function W(p){I[p?"unshift":"push"](()=>{v=p,e(6,v)})}return t.$$set=p=>{"targetElement"in p&&e(12,n=p.targetElement),"action"in p&&e(13,a=p.action),"content"in p&&e(1,c=p.content),"align"in p&&e(2,r=p.align),"position"in p&&e(0,s=p.position),"maxWidth"in p&&e(3,l=p.maxWidth),"style"in p&&e(14,f=p.style),"theme"in p&&e(4,m=p.theme),"animation"in p&&e(15,g=p.animation),"delay"in p&&e(16,d=p.delay),"arrow"in p&&e(5,x=p.arrow),"autoPosition"in p&&e(17,k=p.autoPosition),"show"in p&&e(18,E=p.show)},t.$$.update=()=>{t.$$.dirty&2&&e(11,i=typeof c=="object"),t.$$.dirty&262208&&(v&&E?setTimeout(()=>e(9,L=!0),A):e(9,L=!1))},[s,c,r,l,m,x,v,y,V,L,U,i,n,a,f,g,d,k,E,W]}class oo extends gt{constructor(o){super(),bt(this,o,to,$t,at,{targetElement:12,action:13,content:1,align:2,position:0,maxWidth:3,style:14,theme:4,animation:15,delay:16,arrow:5,autoPosition:17,show:18},Qt)}}const eo=oo,io=(t,o)=>{let e=null,i=t.getAttribute("title"),n=(o==null?void 0:o.action)||t.getAttribute("action")||"hover";const a={...o,targetElement:t};i&&(t.removeAttribute("title"),a.content=i);const c=()=>{e?s():r()},r=()=>{e||(e=new eo({target:t,props:a}))},s=()=>{e&&(e.$destroy(),e=null)},l=()=>{t!==null&&(f(),a.show&&r(),n==="click"&&t.addEventListener("click",c),n==="hover"&&(t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",s)))},f=()=>{t!==null&&(t.removeEventListener("click",c),t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",s))};return l(),{destroy(){f(),i&&t.setAttribute("title",i)}}};_.Tooltip=Jt,_.tooltip=io,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
{
"name": "@svelte-plugins/tooltips",
"version": "2.1.0",
"version": "2.1.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A simple tooltip action and component designed for Svelte.",

@@ -72,4 +72,17 @@ export const formatVariableKey = (str) => {

cumulativeOffsetLeft -= parseFloat(computedStyle.left) || 0;
if (elementPosition === 'relative') {
cumulativeOffsetTop -= currentElement.offsetTop;
cumulativeOffsetLeft -= currentElement.offsetLeft;
}
}
const transform = computedStyle.transform;
if (transform && transform !== 'none') {
const transformMatrix = new DOMMatrix(transform);
cumulativeOffsetTop -= transformMatrix.m42;
cumulativeOffsetLeft -= transformMatrix.m41;
}
currentElement = currentElement.parentElement;

@@ -76,0 +89,0 @@ }

Sorry, the diff of this file is not supported yet