analog-clock-components 0.1.428 → 0.1.429
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analog-clock/analog-clock.esm.js +1 -1
- package/dist/analog-clock/{p-8b6518c5.js → p-b1275f44.js} +2 -2
- package/dist/analog-clock/{p-2117c5f1.entry.js → p-e9c2b3b5.entry.js} +1 -1
- package/dist/cjs/analog-clock.cjs.entry.js +1 -1
- package/dist/cjs/analog-clock.cjs.js +2 -2
- package/dist/cjs/{index-4273d9d7.js → index-5b7ede3b.js} +58 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/esm/analog-clock.entry.js +1 -1
- package/dist/esm/analog-clock.js +3 -3
- package/dist/esm/{index-0451808a.js → index-dada1c34.js} +58 -6
- package/dist/esm/loader.js +2 -2
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-b1275f44.js";export{s as setNonce}from"./p-b1275f44.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-e9c2b3b5",[[1,"analog-clock",{size:[2],timeZone:[2,"time-zone"],time:[32]}]]]],e)));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let n,t,e=!1,l=!1;const o={},s=n=>"object"==(n=typeof n)||"function"===n;function i(n){var t,e,l;return null!==(l=null===(e=null===(t=n.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content"))&&void 0!==l?l:void 0}const c=(n,t,...e)=>{let l=null,o=!1,i=!1;const c=[],u=t=>{for(let e=0;e<t.length;e++)l=t[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof n&&!s(l))&&(l+=""),o&&i?c[c.length-1].t+=l:c.push(o?r(null,l):l),i=o)};if(u(e),t){const n=t.className||t.class;n&&(t.class="object"!=typeof n?n:Object.keys(n).filter((t=>n[t])).join(" "))}const a=r(n,null);return a.l=t,c.length>0&&(a.o=c),a},r=(n,t)=>({i:0,u:n,t,h:null,o:null,l:null}),u={},a=new WeakMap,f=n=>"sc-"+n.p,d=(n,t,e,l,o,i)=>{if(e!==l){let c=D(n,t);if(t.toLowerCase(),"class"===t){const t=n.classList,o=y(e),s=y(l);t.remove(...o.filter((n=>n&&!s.includes(n)))),t.add(...s.filter((n=>n&&!o.includes(n))))}else{const r=s(l);if((c||r&&null!==l)&&!o)try{if(n.tagName.includes("-"))n[t]=l;else{const o=null==l?"":l;"list"===t?c=!1:null!=e&&n[t]==o||(n[t]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(t)||n.removeAttribute(t):(!c||4&i||o)&&!r&&n.setAttribute(t,l=!0===l?"":l)}}},h=/\s/,y=n=>n?n.split(h):[],p=(n,t,e,l)=>{const s=11===t.h.nodeType&&t.h.host?t.h.host:t.h,i=n&&n.l||o,c=t.l||o;for(l in i)l in c||d(s,l,i[l],void 0,e,t.i);for(l in c)d(s,l,i[l],c[l],e,t.i)},v=(t,l,o)=>{const s=l.o[o];let i,c,r=0;if(e||(e="svg"===s.u),i=s.h=G.createElementNS(e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.u),e&&"foreignObject"===s.u&&(e=!1),p(null,s,e),null!=n&&i["s-si"]!==n&&i.classList.add(i["s-si"]=n),s.o)for(r=0;r<s.o.length;++r)c=v(t,s,r),c&&i.appendChild(c);return"svg"===s.u?e=!1:"foreignObject"===i.tagName&&(e=!0),i},$=(n,e,l,o,s,i)=>{let c,r=n;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=v(null,l,s),c&&(o[s].h=c,r.insertBefore(c,e)))},m=(n,t,e)=>{for(let l=t;l<=e;++l){const t=n[l];if(t){const n=t.h;n&&n.remove()}}},w=(n,t)=>n.u===t.u,b=(n,t)=>{const l=t.h=n.h,o=n.o,s=t.o,i=t.u;e="svg"===i||"foreignObject"!==i&&e,p(n,t,e),null!==o&&null!==s?((n,t,e,l)=>{let o,s=0,i=0,c=t.length-1,r=t[0],u=t[c],a=l.length-1,f=l[0],d=l[a];for(;s<=c&&i<=a;)null==r?r=t[++s]:null==u?u=t[--c]:null==f?f=l[++i]:null==d?d=l[--a]:w(r,f)?(b(r,f),r=t[++s],f=l[++i]):w(u,d)?(b(u,d),u=t[--c],d=l[--a]):w(r,d)?(b(r,d),n.insertBefore(r.h,u.h.nextSibling),r=t[++s],d=l[--a]):w(u,f)?(b(u,f),n.insertBefore(u.h,r.h),u=t[--c],f=l[++i]):(o=v(t&&t[i],e,i),f=l[++i],o&&r.h.parentNode.insertBefore(o,r.h));s>c?$(n,null==l[a+1]?null:l[a+1].h,e,l,i,a):i>a&&m(t,s,c)})(l,o,t,s):null!==s?$(l,null,t,s,0,s.length-1):null!==o&&m(o,0,o.length-1),e&&"svg"===i&&(e=!1)},g=(n,t)=>{t&&!n.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.v=t)))},j=(n,t)=>{if(n.i|=16,!(4&n.i))return g(n,n.$),en((()=>S(n,t)));n.i|=512},S=(n,t)=>{const e=n.m;return O(void 0,(()=>M(n,e,t)))},O=(n,t)=>k(n)?n.then(t):t(),k=n=>n instanceof Promise||n&&n.then&&"function"==typeof n.then,M=async(n,t,e)=>{var l;const o=n.
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},z=new Map,B="undefined"!=typeof window?window:{},G=B.document||{head:{}},I={i:0,
|
|
1
|
+
let n,t,e=!1,l=!1;const o={},s=n=>"object"==(n=typeof n)||"function"===n;function i(n){var t,e,l;return null!==(l=null===(e=null===(t=n.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content"))&&void 0!==l?l:void 0}const c=(n,t,...e)=>{let l=null,o=!1,i=!1;const c=[],u=t=>{for(let e=0;e<t.length;e++)l=t[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof n&&!s(l))&&(l+=""),o&&i?c[c.length-1].t+=l:c.push(o?r(null,l):l),i=o)};if(u(e),t){const n=t.className||t.class;n&&(t.class="object"!=typeof n?n:Object.keys(n).filter((t=>n[t])).join(" "))}const a=r(n,null);return a.l=t,c.length>0&&(a.o=c),a},r=(n,t)=>({i:0,u:n,t,h:null,o:null,l:null}),u={},a=new WeakMap,f=n=>"sc-"+n.p,d=(n,t,e,l,o,i)=>{if(e!==l){let c=D(n,t);if(t.toLowerCase(),"class"===t){const t=n.classList,o=y(e),s=y(l);t.remove(...o.filter((n=>n&&!s.includes(n)))),t.add(...s.filter((n=>n&&!o.includes(n))))}else{const r=s(l);if((c||r&&null!==l)&&!o)try{if(n.tagName.includes("-"))n[t]=l;else{const o=null==l?"":l;"list"===t?c=!1:null!=e&&n[t]==o||(n[t]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(t)||n.removeAttribute(t):(!c||4&i||o)&&!r&&n.setAttribute(t,l=!0===l?"":l)}}},h=/\s/,y=n=>n?n.split(h):[],p=(n,t,e,l)=>{const s=11===t.h.nodeType&&t.h.host?t.h.host:t.h,i=n&&n.l||o,c=t.l||o;for(l in i)l in c||d(s,l,i[l],void 0,e,t.i);for(l in c)d(s,l,i[l],c[l],e,t.i)},v=(t,l,o)=>{const s=l.o[o];let i,c,r=0;if(e||(e="svg"===s.u),i=s.h=G.createElementNS(e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.u),e&&"foreignObject"===s.u&&(e=!1),p(null,s,e),null!=n&&i["s-si"]!==n&&i.classList.add(i["s-si"]=n),s.o)for(r=0;r<s.o.length;++r)c=v(t,s,r),c&&i.appendChild(c);return"svg"===s.u?e=!1:"foreignObject"===i.tagName&&(e=!0),i},$=(n,e,l,o,s,i)=>{let c,r=n;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=v(null,l,s),c&&(o[s].h=c,r.insertBefore(c,e)))},m=(n,t,e)=>{for(let l=t;l<=e;++l){const t=n[l];if(t){const n=t.h;n&&n.remove()}}},w=(n,t)=>n.u===t.u,b=(n,t)=>{const l=t.h=n.h,o=n.o,s=t.o,i=t.u;e="svg"===i||"foreignObject"!==i&&e,p(n,t,e),null!==o&&null!==s?((n,t,e,l)=>{let o,s=0,i=0,c=t.length-1,r=t[0],u=t[c],a=l.length-1,f=l[0],d=l[a];for(;s<=c&&i<=a;)null==r?r=t[++s]:null==u?u=t[--c]:null==f?f=l[++i]:null==d?d=l[--a]:w(r,f)?(b(r,f),r=t[++s],f=l[++i]):w(u,d)?(b(u,d),u=t[--c],d=l[--a]):w(r,d)?(b(r,d),n.insertBefore(r.h,u.h.nextSibling),r=t[++s],d=l[--a]):w(u,f)?(b(u,f),n.insertBefore(u.h,r.h),u=t[--c],f=l[++i]):(o=v(t&&t[i],e,i),f=l[++i],o&&r.h.parentNode.insertBefore(o,r.h));s>c?$(n,null==l[a+1]?null:l[a+1].h,e,l,i,a):i>a&&m(t,s,c)})(l,o,t,s):null!==s?$(l,null,t,s,0,s.length-1):null!==o&&m(o,0,o.length-1),e&&"svg"===i&&(e=!1)},g=(n,t)=>{t&&!n.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.v=t)))},j=(n,t)=>{if(n.i|=16,!(4&n.i))return g(n,n.$),en((()=>S(n,t)));n.i|=512},S=(n,t)=>{const e=n.m;return O(void 0,(()=>M(n,e,t)))},O=(n,t)=>k(n)?n.then(t):t(),k=n=>n instanceof Promise||n&&n.then&&"function"==typeof n.then,M=async(n,t,e)=>{var l;const o=n.j,s=o["s-rc"];e&&(n=>{const t=n.S,e=n.j,l=t.i,o=((n,t)=>{var e;const l=f(t),o=z.get(l);if(n=11===n.nodeType?n:G,o)if("string"==typeof o){let t,s=a.get(n=n.head||n);if(s||a.set(n,s=new Set),!s.has(l)){{t=G.createElement("style"),t.innerHTML=o;const l=null!==(e=I.O)&&void 0!==e?e:i(G);null!=l&&t.setAttribute("nonce",l),n.insertBefore(t,n.querySelector("link"))}s&&s.add(l)}}else n.adoptedStyleSheets.includes(o)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,o]);return l})(e.shadowRoot?e.shadowRoot:e.getRootNode(),t);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(n);C(n,t,o,e),s&&(s.map((n=>n())),o["s-rc"]=void 0);{const t=null!==(l=o["s-p"])&&void 0!==l?l:[],e=()=>P(n);0===t.length?e():(Promise.all(t).then(e),n.i|=4,t.length=0)}},C=(e,l,o,s)=>{try{l=l.render(),e.i&=-17,e.i|=2,((e,l,o=!1)=>{const s=e.j,i=e.k||r(null,null),a=(n=>n&&n.u===u)(l)?l:c(null,null,l);if(t=s.tagName,o&&a.l)for(const n of Object.keys(a.l))s.hasAttribute(n)&&!["key","ref","style","class"].includes(n)&&(a.l[n]=s[n]);a.u=null,a.i|=4,e.k=a,a.h=i.h=s.shadowRoot||s,n=s["s-sc"],b(i,a)})(e,l,s)}catch(n){H(n,e.j)}return null},P=n=>{const t=n.j,e=n.m,l=n.$;64&n.i||(n.i|=64,E(t),A(e,"componentDidLoad"),n.M(t),l||x()),n.v&&(n.v(),n.v=void 0),512&n.i&&tn((()=>j(n,!1))),n.i&=-517},x=()=>{E(G.documentElement),tn((()=>(n=>{const t=I.ce("appload",{detail:{namespace:"analog-clock"}});return n.dispatchEvent(t),t})(B)))},A=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){H(n)}},E=n=>n.classList.add("hydrated"),L=(n,t,e)=>{var l;if(t.C){const o=Object.entries(t.C),i=n.prototype;if(o.map((([n,[l]])=>{(31&l||2&e&&32&l)&&Object.defineProperty(i,n,{get(){return((n,t)=>U(this).P.get(t))(0,n)},set(e){((n,t,e,l)=>{const o=U(n),i=o.P.get(t),c=o.i,r=o.m;e=((n,t)=>null==n||s(n)?n:2&t?parseFloat(n):n)(e,l.C[t][0]),8&c&&void 0!==i||e===i||Number.isNaN(i)&&Number.isNaN(e)||(o.P.set(t,e),r&&2==(18&c)&&j(o,!1))})(this,n,e,t)},configurable:!0,enumerable:!0})})),1&e){const e=new Map;i.attributeChangedCallback=function(n,l,o){I.jmp((()=>{const s=e.get(n);if(this.hasOwnProperty(s))o=this[s],delete this[s];else{if(i.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==o)return;if(null==s){const e=U(this),s=null==e?void 0:e.i;if(!(8&s)&&128&s&&o!==l){const s=e.m,i=t.A[n];null==i||i.forEach((t=>{null!=s[t]&&s[t].call(s,o,l,n)}))}return}}this[s]=(null!==o||"boolean"!=typeof this[s])&&o}))},n.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=t.A)&&void 0!==l?l:{}),...o.filter((([n,t])=>15&t[0])).map((([n,t])=>{const l=t[1]||n;return e.set(l,n),l}))]))}}return n},N=n=>{A(n,"disconnectedCallback")},T=(n,t={})=>{var e;const l=[],o=t.exclude||[],s=B.customElements,c=G.head,r=c.querySelector("meta[charset]"),u=G.createElement("style"),a=[];let d,h=!0;Object.assign(I,t),I.L=new URL(t.resourcesUrl||"./",G.baseURI).href,n.map((n=>{n[1].map((t=>{const e={i:t[0],p:t[1],C:t[2],N:t[3]};e.C=t[2];const i=e.p,c=class extends HTMLElement{constructor(n){super(n),q(n=this,e),1&e.i&&n.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),h?a.push(this):I.jmp((()=>(n=>{if(0==(1&I.i)){const t=U(n),e=t.S,l=()=>{};if(1&t.i)(null==t?void 0:t.m)||(null==t?void 0:t.T)&&t.T.then((()=>{}));else{t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){g(t,t.$=e);break}}e.C&&Object.entries(e.C).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e)=>{let l;if(0==(32&t.i)){t.i|=32;{if(l=_(e),l.then){const n=()=>{};l=await l,n()}l.isProxied||(L(l,e,2),l.isProxied=!0);const n=()=>{};t.i|=8;try{new l(t)}catch(n){H(n)}t.i&=-9,n()}if(l.style){let n=l.style;const t=f(e);if(!z.has(t)){const l=()=>{};((n,t,e)=>{let l=z.get(n);K&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,z.set(n,l)})(t,n,!!(1&e.i)),l()}}}const o=t.$,s=()=>j(t,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(0,t,e)}l()}})(this)))}disconnectedCallback(){I.jmp((()=>(async()=>{if(0==(1&I.i)){const n=U(this);(null==n?void 0:n.m)?N(n.m):(null==n?void 0:n.T)&&n.T.then((()=>N(n.m)))}})()))}componentOnReady(){return U(this).T}};e.F=n[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,L(c,e,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const n=null!==(e=I.O)&&void 0!==e?e:i(G);null!=n&&u.setAttribute("nonce",n),c.insertBefore(u,r?r.nextSibling:c.firstChild)}h=!1,a.length?a.map((n=>n.connectedCallback())):I.jmp((()=>d=setTimeout(x,30)))},F=n=>I.O=n,R=new WeakMap,U=n=>R.get(n),W=(n,t)=>R.set(t.m=n,t),q=(n,t)=>{const e={i:0,j:n,S:t,P:new Map};return e.T=new Promise((n=>e.M=n)),n["s-p"]=[],n["s-rc"]=[],R.set(n,e)},D=(n,t)=>t in n,H=(n,t)=>(0,console.error)(n,t),V=new Map,_=n=>{const t=n.p.replace(/-/g,"_"),e=n.F,l=V.get(e);return l?l[t]:import(`./${e}.entry.js`).then((n=>(V.set(e,n),n[t])),H)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},z=new Map,B="undefined"!=typeof window?window:{},G=B.document||{head:{}},I={i:0,L:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,t,e,l)=>n.addEventListener(t,e,l),rel:(n,t,e,l)=>n.removeEventListener(t,e,l),ce:(n,t)=>new CustomEvent(n,t)},J=n=>Promise.resolve(n),K=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(n){}return!1})(),Q=[],X=[],Y=(n,t)=>e=>{n.push(e),l||(l=!0,t&&4&I.i?tn(nn):I.raf(nn))},Z=n=>{for(let t=0;t<n.length;t++)try{n[t](performance.now())}catch(n){H(n)}n.length=0},nn=()=>{Z(Q),Z(X),(l=Q.length>0)&&I.raf(nn)},tn=n=>J().then(n),en=Y(X,!0);export{T as b,c as h,J as p,W as r,F as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-
|
|
1
|
+
import{r as t,h as e}from"./p-b1275f44.js";const r=class{constructor(e){t(this,e),this.size=void 0,this.timeZone=0,this.time=Date.now()}componentDidLoad(){this.timer=window.setInterval((()=>{this.time=Date.now()}),250)}disconnectedCallback(){clearInterval(this.timer)}get hour(){return new Date(this.time).getHours()}get minute(){return new Date(this.time).getMinutes()}get second(){return new Date(this.time).getSeconds()}hourToDegrees(){const t=this.hour+this.timeZone;return Math.floor(this.minute/2)+30*t}minuteToDegrees(){return Math.floor(this.second/10)+6*this.minute}secondToDegrees(){return 6*this.second}render(){return e("svg",{class:"clock",viewBox:"0 0 200 200",width:this.size,height:this.size},e("circle",{id:"circle",cx:"100",cy:"100",r:"95","stroke-width":"10",fill:"transparent"}),e("line",{id:"hour",transform:`rotate(${this.hourToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"60","stroke-width":"10","stroke-linecap":"round"}),e("line",{id:"minute",transform:`rotate(${this.minuteToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"30","stroke-width":"8","stroke-linecap":"round"}),e("line",{id:"second",transform:`rotate(${this.secondToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"20","stroke-width":"2","stroke-linecap":"round"}))}};r.style=".clock #circle{stroke:var(--clock-circle-color, black)}.clock #hour{stroke:var(--clock-hour-color, black)}.clock #minute{stroke:var(--clock-minute-color, black)}.clock #second{stroke:var(--clock-second-color, black)}";export{r as analog_clock}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5b7ede3b.js');
|
|
6
6
|
|
|
7
7
|
const analogClockCss = ".clock #circle{stroke:var(--clock-circle-color, black)}.clock #hour{stroke:var(--clock-hour-color, black)}.clock #minute{stroke:var(--clock-minute-color, black)}.clock #second{stroke:var(--clock-second-color, black)}";
|
|
8
8
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5b7ede3b.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.4.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchBrowser = () => {
|
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('analog-clock.cjs.js', document.baseURI).href));
|
|
@@ -939,6 +939,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
939
939
|
*/
|
|
940
940
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
941
941
|
try {
|
|
942
|
+
/**
|
|
943
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
944
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
945
|
+
*/
|
|
942
946
|
instance = instance.render() ;
|
|
943
947
|
{
|
|
944
948
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -1012,6 +1016,16 @@ const appDidLoad = (who) => {
|
|
|
1012
1016
|
}
|
|
1013
1017
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1014
1018
|
};
|
|
1019
|
+
/**
|
|
1020
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
1021
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1022
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1023
|
+
* output bundle and this function returns `undefined`.
|
|
1024
|
+
* @param instance any object that may or may not contain methods
|
|
1025
|
+
* @param method method name
|
|
1026
|
+
* @param arg single arbitrary argument
|
|
1027
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1028
|
+
*/
|
|
1015
1029
|
const safeCall = (instance, method, arg) => {
|
|
1016
1030
|
if (instance && instance[method]) {
|
|
1017
1031
|
try {
|
|
@@ -1179,7 +1193,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1179
1193
|
}
|
|
1180
1194
|
return Cstr;
|
|
1181
1195
|
};
|
|
1182
|
-
|
|
1196
|
+
/**
|
|
1197
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
1198
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
1199
|
+
* and (optionally) an HMR version ID.
|
|
1200
|
+
*
|
|
1201
|
+
* @param elm a host element
|
|
1202
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
1203
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
1204
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
1205
|
+
*/
|
|
1206
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1207
|
+
let Cstr;
|
|
1183
1208
|
// initializeComponent
|
|
1184
1209
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1185
1210
|
// Let the runtime know that the component has been initialized
|
|
@@ -1416,22 +1441,49 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1416
1441
|
* @returns void
|
|
1417
1442
|
*/
|
|
1418
1443
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1444
|
+
/**
|
|
1445
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
1446
|
+
* instances.
|
|
1447
|
+
*/
|
|
1419
1448
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1449
|
+
/**
|
|
1450
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
1451
|
+
*
|
|
1452
|
+
* @param ref the runtime ref of interest
|
|
1453
|
+
* @returns the Host reference (if found) or undefined
|
|
1454
|
+
*/
|
|
1420
1455
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1456
|
+
/**
|
|
1457
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
1458
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
1459
|
+
*
|
|
1460
|
+
* @param lazyInstance the lazy instance of interest
|
|
1461
|
+
* @param hostRef that instances `HostRef` object
|
|
1462
|
+
* @returns a reference to the host ref WeakMap
|
|
1463
|
+
*/
|
|
1421
1464
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1422
|
-
|
|
1465
|
+
/**
|
|
1466
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
1467
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
1468
|
+
* metadata.
|
|
1469
|
+
*
|
|
1470
|
+
* @param hostElement the host element to register
|
|
1471
|
+
* @param cmpMeta runtime metadata for that component
|
|
1472
|
+
* @returns a reference to the host ref WeakMap
|
|
1473
|
+
*/
|
|
1474
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
1423
1475
|
const hostRef = {
|
|
1424
1476
|
$flags$: 0,
|
|
1425
|
-
$hostElement$:
|
|
1477
|
+
$hostElement$: hostElement,
|
|
1426
1478
|
$cmpMeta$: cmpMeta,
|
|
1427
1479
|
$instanceValues$: new Map(),
|
|
1428
1480
|
};
|
|
1429
1481
|
{
|
|
1430
1482
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1431
|
-
|
|
1432
|
-
|
|
1483
|
+
hostElement['s-p'] = [];
|
|
1484
|
+
hostElement['s-rc'] = [];
|
|
1433
1485
|
}
|
|
1434
|
-
return hostRefs.set(
|
|
1486
|
+
return hostRefs.set(hostElement, hostRef);
|
|
1435
1487
|
};
|
|
1436
1488
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1437
1489
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5b7ede3b.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-dada1c34.js';
|
|
2
2
|
|
|
3
3
|
const analogClockCss = ".clock #circle{stroke:var(--clock-circle-color, black)}.clock #hour{stroke:var(--clock-hour-color, black)}.clock #minute{stroke:var(--clock-minute-color, black)}.clock #second{stroke:var(--clock-second-color, black)}";
|
|
4
4
|
|
package/dist/esm/analog-clock.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-dada1c34.js';
|
|
2
|
+
export { s as setNonce } from './index-dada1c34.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v4.
|
|
5
|
+
Stencil Client Patch Browser v4.4.1 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchBrowser = () => {
|
|
8
8
|
const importMeta = import.meta.url;
|
|
@@ -917,6 +917,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
917
917
|
*/
|
|
918
918
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
919
919
|
try {
|
|
920
|
+
/**
|
|
921
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
922
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
923
|
+
*/
|
|
920
924
|
instance = instance.render() ;
|
|
921
925
|
{
|
|
922
926
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -990,6 +994,16 @@ const appDidLoad = (who) => {
|
|
|
990
994
|
}
|
|
991
995
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
992
996
|
};
|
|
997
|
+
/**
|
|
998
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
999
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1000
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1001
|
+
* output bundle and this function returns `undefined`.
|
|
1002
|
+
* @param instance any object that may or may not contain methods
|
|
1003
|
+
* @param method method name
|
|
1004
|
+
* @param arg single arbitrary argument
|
|
1005
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1006
|
+
*/
|
|
993
1007
|
const safeCall = (instance, method, arg) => {
|
|
994
1008
|
if (instance && instance[method]) {
|
|
995
1009
|
try {
|
|
@@ -1157,7 +1171,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1157
1171
|
}
|
|
1158
1172
|
return Cstr;
|
|
1159
1173
|
};
|
|
1160
|
-
|
|
1174
|
+
/**
|
|
1175
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
1176
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
1177
|
+
* and (optionally) an HMR version ID.
|
|
1178
|
+
*
|
|
1179
|
+
* @param elm a host element
|
|
1180
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
1181
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
1182
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
1183
|
+
*/
|
|
1184
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1185
|
+
let Cstr;
|
|
1161
1186
|
// initializeComponent
|
|
1162
1187
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1163
1188
|
// Let the runtime know that the component has been initialized
|
|
@@ -1394,22 +1419,49 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1394
1419
|
* @returns void
|
|
1395
1420
|
*/
|
|
1396
1421
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1422
|
+
/**
|
|
1423
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
1424
|
+
* instances.
|
|
1425
|
+
*/
|
|
1397
1426
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1427
|
+
/**
|
|
1428
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
1429
|
+
*
|
|
1430
|
+
* @param ref the runtime ref of interest
|
|
1431
|
+
* @returns the Host reference (if found) or undefined
|
|
1432
|
+
*/
|
|
1398
1433
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1434
|
+
/**
|
|
1435
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
1436
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
1437
|
+
*
|
|
1438
|
+
* @param lazyInstance the lazy instance of interest
|
|
1439
|
+
* @param hostRef that instances `HostRef` object
|
|
1440
|
+
* @returns a reference to the host ref WeakMap
|
|
1441
|
+
*/
|
|
1399
1442
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1400
|
-
|
|
1443
|
+
/**
|
|
1444
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
1445
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
1446
|
+
* metadata.
|
|
1447
|
+
*
|
|
1448
|
+
* @param hostElement the host element to register
|
|
1449
|
+
* @param cmpMeta runtime metadata for that component
|
|
1450
|
+
* @returns a reference to the host ref WeakMap
|
|
1451
|
+
*/
|
|
1452
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
1401
1453
|
const hostRef = {
|
|
1402
1454
|
$flags$: 0,
|
|
1403
|
-
$hostElement$:
|
|
1455
|
+
$hostElement$: hostElement,
|
|
1404
1456
|
$cmpMeta$: cmpMeta,
|
|
1405
1457
|
$instanceValues$: new Map(),
|
|
1406
1458
|
};
|
|
1407
1459
|
{
|
|
1408
1460
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1409
|
-
|
|
1410
|
-
|
|
1461
|
+
hostElement['s-p'] = [];
|
|
1462
|
+
hostElement['s-rc'] = [];
|
|
1411
1463
|
}
|
|
1412
|
-
return hostRefs.set(
|
|
1464
|
+
return hostRefs.set(hostElement, hostRef);
|
|
1413
1465
|
};
|
|
1414
1466
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1415
1467
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-dada1c34.js';
|
|
2
|
+
export { s as setNonce } from './index-dada1c34.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "analog-clock-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.429",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"format": "prettier --write src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@stencil/core": "4.
|
|
28
|
+
"@stencil/core": "4.4.1"
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"cspell": "7.3.
|
|
33
|
-
"eslint": "8.
|
|
32
|
+
"cspell": "7.3.7",
|
|
33
|
+
"eslint": "8.51.0",
|
|
34
34
|
"prettier": "3.0.3",
|
|
35
35
|
"tslint": "6.1.3",
|
|
36
36
|
"typescript": "5.2.2"
|