@staylift-tech/conv-widget 0.0.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.
- package/README.md +220 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/index-BDscJkkF.js +1464 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/staylift-orb.cjs.entry.js +117 -0
- package/dist/cjs/staylift-widget.cjs.entry.js +26479 -0
- package/dist/cjs/staylift-widget.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/staylift-orb/staylift-orb.css +15 -0
- package/dist/collection/components/staylift-orb/staylift-orb.js +229 -0
- package/dist/collection/components/staylift-widget/staylift-widget.css +578 -0
- package/dist/collection/components/staylift-widget/staylift-widget.js +898 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/types.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-DnOZjbwA.js +1 -0
- package/dist/components/staylift-orb.d.ts +11 -0
- package/dist/components/staylift-orb.js +1 -0
- package/dist/components/staylift-widget.d.ts +11 -0
- package/dist/components/staylift-widget.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/index-DAtfDq5B.js +1456 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/staylift-orb.entry.js +115 -0
- package/dist/esm/staylift-widget.entry.js +26477 -0
- package/dist/esm/staylift-widget.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/staylift-widget/index.esm.js +1 -0
- package/dist/staylift-widget/p-37510f2e.entry.js +1 -0
- package/dist/staylift-widget/p-94923740.entry.js +1 -0
- package/dist/staylift-widget/p-DAtfDq5B.js +2 -0
- package/dist/staylift-widget/p-DQuL1Twl.js +1 -0
- package/dist/staylift-widget/staylift-widget.esm.js +1 -0
- package/dist/types/components/staylift-orb/staylift-orb.d.ts +19 -0
- package/dist/types/components/staylift-widget/staylift-widget.d.ts +80 -0
- package/dist/types/components.d.ts +212 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +1839 -0
- package/dist/types/types.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +58 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.i.t)?n:{}).map((([n,[s]])=>{if(31&s||32&s){const s=t[n],i=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(t,n,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):s}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},s=(t,e)=>e in t,i=(t,e)=>(0,console.error)(t,e),o=new Map,l="undefined"!=typeof window?window:{},r=l.HTMLElement||class{},c={l:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)},a=(()=>{try{return!!l.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),u=!!a&&(()=>!!l.document&&Object.getOwnPropertyDescriptor(l.document.adoptedStyleSheets,"length").writable)(),f=!1,h=[],d=[],b=(t,e)=>n=>{t.push(n),f||(f=!0,e&&4&c.l?$(m):c.raf(m))},p=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},m=()=>{p(h),p(d),(f=h.length>0)&&c.raf(m)},$=t=>Promise.resolve(undefined).then(t),y=b(d,!0),v=t=>{const e=new URL(t,c.u);return e.origin!==l.location.origin?e.href:e.pathname},g=t=>c.u=t;function w(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(u?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}var j,O=new WeakMap,S=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,k=(t,e,...n)=>{let s=null,i=null,o=!1,l=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)s=e[n],Array.isArray(s)?c(s):null!=s&&"boolean"!=typeof s&&((o="function"!=typeof t&&!M(s))&&(s=String(s)),o&&l?r[r.length-1].p+=s:r.push(o?E(null,s):s),l=o)};if(c(n),e){e.key&&(i=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const a=E(t,null);return a.m=e,r.length>0&&(a.$=r),a.v=i,a},E=(t,e)=>({l:0,j:t,p:null!=e?e:null,O:null,$:null,m:null,v:null}),x={},C=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?String(t):t,A=(t,e)=>{const n=t;return{emit:t=>_(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},_=(t,e,n)=>{const s=c.ce(e,n);return t.dispatchEvent(s),s},D=(t,e,n,i,o,r)=>{if(n===i)return;let a=s(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,s=R(n);let o=R(i);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)i&&null!=i[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in i)n&&i[e]===n[e]||(e.includes("-")?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("key"===e);else if("ref"===e)i&&i(t);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){const s=M(i);if((a||s&&null!==i)&&!o)try{if(t.tagName.includes("-"))t[e]!==i&&(t[e]=i);else{const s=null==i?"":i;"list"===e?a=!1:null!=n&&t[e]==s||("function"==typeof t.__lookupSetter__(e)?t[e]=s:t.setAttribute(e,s))}}catch(t){}null==i||!1===i?!1===i&&""!==t.getAttribute(e)||t.removeAttribute(e):(!a||4&r||o)&&!s&&1===t.nodeType&&t.setAttribute(e,i=!0===i?"":i)}else if(e="-"===e[2]?e.slice(3):s(l,u)?u.slice(2):u[2]+e.slice(3),n||i){const s=e.endsWith(L);e=e.replace(N,""),n&&c.rel(t,e,n,s),i&&c.ael(t,e,i,s)}},F=/\s/,R=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(F):[]),L="Capture",N=new RegExp(L+"$"),P=(t,e,n)=>{const s=11===e.O.nodeType&&e.O.host?e.O.host:e.O,i=t&&t.m||{},o=e.m||{};for(const t of U(Object.keys(i)))t in o||D(s,t,i[t],void 0,n,e.l);for(const t of U(Object.keys(o)))D(s,t,i[t],o[t],n,e.l)};function U(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var V=!1,W=(t,e,n)=>{const s=e.$[n];let i,o,r=0;if(null!=s.p)i=s.O=l.document.createTextNode(s.p);else{if(V||(V="svg"===s.j),!l.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(i=s.O=l.document.createElementNS(V?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.j),V&&"foreignObject"===s.j&&(V=!1),P(null,s,V),s.$){const e="template"===s.j?i.content:i;for(r=0;r<s.$.length;++r)o=W(t,s,r),o&&e.appendChild(o)}"svg"===s.j?V=!1:"foreignObject"===i.tagName&&(V=!0)}return i["s-hn"]=j,i},q=(t,e,n,s,i,o)=>{let l,r=t;for(r.shadowRoot&&r.tagName===j&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);i<=o;++i)s[i]&&(l=W(null,n,i),l&&(s[i].O=l,Y(r,l,e)))},H=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.O;T(e),t&&t.remove()}}},I=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),z=(t,e,n=!1)=>{const s=e.O=t.O,i=t.$,o=e.$,l=e.j,r=e.p;null==r?(P(t,e,V="svg"===l||"foreignObject"!==l&&V),null!==i&&null!==o?((t,e,n,s,i=!1)=>{let o,l,r=0,c=0,a=0,u=0,f=e.length-1,h=e[0],d=e[f],b=s.length-1,p=s[0],m=s[b];const $="template"===n.j?t.content:t;for(;r<=f&&c<=b;)if(null==h)h=e[++r];else if(null==d)d=e[--f];else if(null==p)p=s[++c];else if(null==m)m=s[--b];else if(I(h,p,i))z(h,p,i),h=e[++r],p=s[++c];else if(I(d,m,i))z(d,m,i),d=e[--f],m=s[--b];else if(I(h,m,i))z(h,m,i),Y($,h.O,d.O.nextSibling),h=e[++r],m=s[--b];else if(I(d,p,i))z(d,p,i),Y($,d.O,h.O),d=e[--f],p=s[++c];else{for(a=-1,u=r;u<=f;++u)if(e[u]&&null!==e[u].v&&e[u].v===p.v){a=u;break}a>=0?(l=e[a],l.j!==p.j?o=W(e&&e[c],n,a):(z(l,p,i),e[a]=void 0,o=l.O),p=s[++c]):(o=W(e&&e[c],n,c),p=s[++c]),o&&Y(h.O.parentNode,o,h.O)}r>f?q(t,null==s[b+1]?null:s[b+1].O,n,s,c,b):c>b&&H(e,r,f)})(s,i,e,o,n):null!==o?(null!==t.p&&(s.textContent=""),q(s,null,e,o,0,o.length-1)):!n&&null!==i&&H(i,0,i.length-1),V&&"svg"===l&&(V=!1)):t.p!==r&&(s.data=r)},T=t=>{t.m&&t.m.ref&&t.m.ref(null),t.$&&t.$.map(T)},Y=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),B=(t,e,n=!1)=>{const s=t.$hostElement$,i=t.S||E(null,null);var o;const l=(o=e)&&o.j===x?e:k(null,null,e);if(j=s.tagName,n&&l.m)for(const t of Object.keys(l.m))s.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(l.m[t]=s[t]);l.j=null,l.l|=4,t.S=l,l.O=i.O=s.shadowRoot||s,z(i,l,n)},G=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.M=()=>{e["s-p"].splice(n-1,1),s()})))}},J=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);G(t,t.k);const n=()=>K(t,e);if(!e)return y(n);queueMicrotask((()=>{n()}))},K=(t,e)=>{const n=t.$hostElement$,s=n;if(!s)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return i=st(s,e?"componentWillLoad":"componentWillUpdate",void 0,n),i=Q(i,(()=>st(s,"componentWillRender",void 0,n))),Q(i,(()=>Z(t,s,e)))},Q=(t,e)=>X(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),X=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Z=async(t,e,n)=>{var s;const i=t.$hostElement$,r=i["s-rc"];n&&(t=>{const e=t.i,n=t.$hostElement$,s=e.l,i=((t,e)=>{var n,s,i;const r=S(e),f=o.get(r);if(!l.document)return r;if(t=11===t.nodeType?t:l.document,f)if("string"==typeof f){let i,o=O.get(t=t.head||t);if(o||O.set(t,o=new Set),!o.has(r)){i=l.document.createElement("style"),i.textContent=f;const h=null!=(n=c.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=l.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=h&&i.setAttribute("nonce",h),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(f),u?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=f+e.textContent:t.prepend(i)}else t.append(i);1&e.l&&t.insertBefore(i,null),4&e.l&&(i.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),o&&o.add(r)}}else{let e=O.get(t);if(e||O.set(t,e=new Set),!e.has(r)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let s;if(f.constructor===n.CSSStyleSheet)s=f;else{s=new n.CSSStyleSheet;for(let t=0;t<f.cssRules.length;t++)s.insertRule(f.cssRules[t].cssText,t)}u?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(r)}}return r})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);tt(t,e,i,n),r&&(r.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(s=i["s-p"])?s:[],n=()=>et(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},tt=(t,e,n,s)=>{try{e=e.render(),t.l&=-17,t.l|=2,B(t,e,s)}catch(e){i(e,t.$hostElement$)}return null},et=t=>{const e=t.$hostElement$,n=e,s=t.k;st(n,"componentDidRender",void 0,e),64&t.l?st(n,"componentDidUpdate",void 0,e):(t.l|=64,it(e),st(n,"componentDidLoad",void 0,e),t.A(e),s||nt()),t.M&&(t.M(),t.M=void 0),512&t.l&&$((()=>J(t,!1))),t.l&=-517},nt=()=>{$((()=>_(l,"appload",{detail:{namespace:"staylift-widget"}})))},st=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,s)}},it=t=>t.classList.add("hydrated"),ot=(t,e,s,i)=>{const o=n(t);if(!o)return;const l=t,r=o.o.get(e),c=o.l,a=l;s=C(s,i.t[e][0]);const u=Number.isNaN(r)&&Number.isNaN(s);if(s!==r&&!u&&(o.o.set(e,s),2==(18&c))){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(s,r,e))return;J(o,!1)}},lt=(t,e)=>{var s,i;const o=t.prototype;if(e.t){const l=Object.entries(null!=(s=e.t)?s:{});l.map((([t,[s]])=>{if(31&s||32&s){const{get:i,set:l}=Object.getOwnPropertyDescriptor(o,t)||{};i&&(e.t[t][0]|=2048),l&&(e.t[t][0]|=4096),Object.defineProperty(o,t,{get(){return i?i.apply(this):(e=t,n(this).o.get(e));var e},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(i){const o=n(this);if(o){if(l)return void 0===(32&s?this[t]:o.$hostElement$[t])&&o.o.get(t)&&(i=o.o.get(t)),l.apply(this,[C(i,s)]),void ot(this,t,i=32&s?this[t]:o.$hostElement$[t],e);ot(this,t,i,e)}}})}}));{const s=new Map;o.attributeChangedCallback=function(t,i,r){c.jmp((()=>{var c;const a=s.get(t),u=n(this);if(this.hasOwnProperty(a),o.hasOwnProperty(a)&&"number"==typeof this[a]&&this[a]==r)return;if(null==a){const n=null==u?void 0:u.l;if(u&&n&&!(8&n)&&r!==i){const s=this,o=null==(c=e._)?void 0:c[t];null==o||o.forEach((e=>{const[[o,l]]=Object.entries(e);null!=s[o]&&(128&n||1&l)&&s[o].call(s,r,i,t)}))}return}const f=l.find((([t])=>t===a));f&&4&f[1][0]&&(r=null!==r&&"false"!==r);const h=Object.getOwnPropertyDescriptor(o,a);r==this[a]||h.get&&!h.set||(this[a]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e._)?i:{}),...l.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return s.set(n,t),n}))]))}}return t},rt=(t,s)=>{const i={l:s[0],h:s[1]};i.t=s[2];const l=t.prototype.connectedCallback,r=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const s={l:0,$hostElement$:t,i:n,o:new Map,D:new Map};s.F=new Promise((t=>s.A=t)),t["s-p"]=[],t["s-rc"]=[];const i=s;t.__stencil__getHostRef=()=>i,512&n.l&&e(t,s)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!n(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.l)){const e=n(t);if(!e)return;const s=e.i,i=()=>{};if(1&e.l)(null==e?void 0:e.R)||(null==e?void 0:e.F)&&e.F.then((()=>{}));else{e.l|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){G(e,e.k=n);break}}s.t&&Object.entries(s.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.l)&&(e.l|=32,s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),s&&s.style)){let t;"string"==typeof s.style&&(t=s.style);const e=S(n);if(!o.has(e)){const s=()=>{};((t,e,n)=>{let s=o.get(t);a&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,o.set(t,s)})(e,t,!!(1&n.l)),s()}}const i=e.k,l=()=>J(e,!0);i&&i["s-rc"]?i["s-rc"].push(l):l()})(t,e,s)}i()}})(this),l&&l.call(this)},disconnectedCallback(){(async t=>{1&c.l||n(t),O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this),r&&r.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${i.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(this,i)}}),t.is=i.h,lt(t,i)},ct=t=>c.C=t,at=t=>Object.assign(c,t);function ut(t,e){B({$hostElement$:e},t)}function ft(t){return t}const ht=rt(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.inputVolume=0,this.outputVolume=0,this.isActive=!1,this.primaryColor="#6366f1",this.size="medium",this.animationFrame=0,this.rafId=null,this.ctx=null}componentDidLoad(){this.setupCanvas(),this.startAnimation()}disconnectedCallback(){this.rafId&&cancelAnimationFrame(this.rafId)}setupCanvas(){if(!this.canvasRef)return;const t=window.devicePixelRatio||1,e=this.canvasRef.getBoundingClientRect();this.canvasRef.width=e.width*t,this.canvasRef.height=e.height*t,this.ctx=this.canvasRef.getContext("2d"),this.ctx&&this.ctx.scale(t,t)}startAnimation(){const t=()=>{this.drawOrb(),this.rafId=requestAnimationFrame(t)};t()}drawOrb(){if(!this.ctx||!this.canvasRef)return;const t=this.canvasRef.clientWidth,e=this.canvasRef.clientHeight,n=t/2,s=e/2,i=Math.min(t,e)/2-4;this.ctx.clearRect(0,0,t,e);const o=Math.max(this.inputVolume,this.outputVolume),l=i*(this.isActive?1+.15*o:1),r=this.hexToRgb(this.primaryColor||"#10b981");if(this.isActive&&o>.1){const t=l+10+20*o,e=this.ctx.createRadialGradient(n,s,l,n,s,t);e.addColorStop(0,`rgba(${r.r}, ${r.g}, ${r.b}, ${.3*o})`),e.addColorStop(1,`rgba(${r.r}, ${r.g}, ${r.b}, 0)`),this.ctx.beginPath(),this.ctx.arc(n,s,t,0,2*Math.PI),this.ctx.fillStyle=e,this.ctx.fill()}const c=this.ctx.createRadialGradient(n-.3*l,s-.3*l,0,n,s,l);this.isActive?(c.addColorStop(0,`rgba(${r.r+40}, ${r.g+40}, ${r.b+40}, 1)`),c.addColorStop(.5,`rgba(${r.r}, ${r.g}, ${r.b}, 1)`),c.addColorStop(1,`rgba(${Math.max(0,r.r-30)}, ${Math.max(0,r.g-30)}, ${Math.max(0,r.b-30)}, 1)`)):(c.addColorStop(0,"#6b7280"),c.addColorStop(.5,"#4b5563"),c.addColorStop(1,"#374151")),this.ctx.beginPath(),this.ctx.arc(n,s,l,0,2*Math.PI),this.ctx.fillStyle=c,this.ctx.fill();const a=this.ctx.createRadialGradient(n-.3*l,s-.3*l,0,n-.3*l,s-.3*l,.6*l);if(a.addColorStop(0,"rgba(255, 255, 255, 0.4)"),a.addColorStop(1,"rgba(255, 255, 255, 0)"),this.ctx.beginPath(),this.ctx.arc(n,s,l,0,2*Math.PI),this.ctx.fillStyle=a,this.ctx.fill(),this.isActive){this.animationFrame++;for(let t=0;t<3;t++){const e=(.02*this.animationFrame+t/3)%1,i=l+30*e,c=.3*(1-e)*o;this.ctx.beginPath(),this.ctx.arc(n,s,i,0,2*Math.PI),this.ctx.strokeStyle=`rgba(${r.r}, ${r.g}, ${r.b}, ${c})`,this.ctx.lineWidth=2,this.ctx.stroke()}}}hexToRgb(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:{r:16,g:185,b:129}}render(){return k("div",{key:"4ef2605968e04b6dc287db398f5ad730e63c08d3",class:`orb ${"number"==typeof this.size?"":`orb--${this.size}`} ${this.isActive?"orb--active":""}`,style:"number"==typeof this.size?{width:`${this.size}px`,height:`${this.size}px`}:{}},k("canvas",{key:"7875d17618d38a4ac0e693bb73d4502d6a66151b",ref:t=>this.canvasRef=t,class:"orb__canvas"}))}get el(){return this}static get style(){return":host{display:block}.orb-container{position:relative;border-radius:50%;overflow:hidden;background:linear-gradient(145deg, #f8f9fa, #e9ecef)}canvas{display:block;border-radius:50%}"}},[1,"staylift-orb",{inputVolume:[2,"input-volume"],outputVolume:[2,"output-volume"],isActive:[4,"is-active"],primaryColor:[1,"primary-color"],size:[8],animationFrame:[32]}]);function dt(){"undefined"!=typeof customElements&&["staylift-orb"].forEach((t=>{"staylift-orb"===t&&(customElements.get(t)||customElements.define(t,ht))}))}dt();export{r as H,ht as S,ct as a,at as b,A as c,dt as d,v as g,k as h,rt as p,ut as r,g as s,ft as t}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface StayliftOrb extends Components.StayliftOrb, HTMLElement {}
|
|
4
|
+
export const StayliftOrb: {
|
|
5
|
+
prototype: StayliftOrb;
|
|
6
|
+
new (): StayliftOrb;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as o,d as s}from"./p-DnOZjbwA.js";const p=o,r=s;export{p as StayliftOrb,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface StayliftWidget extends Components.StayliftWidget, HTMLElement {}
|
|
4
|
+
export const StayliftWidget: {
|
|
5
|
+
prototype: StayliftWidget;
|
|
6
|
+
new (): StayliftWidget;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{StayliftWidget as t,d as i}from"./index.js";const o=t,s=i;export{o as StayliftWidget,s as defineCustomElement}
|