analog-clock-components 0.1.201 → 0.1.204
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-4dfb66bf.entry.js +1 -0
- package/dist/analog-clock/{p-464ae38a.js → p-ef659518.js} +1 -1
- package/dist/cjs/analog-clock.cjs.entry.js +2 -2
- package/dist/cjs/analog-clock.cjs.js +2 -2
- package/dist/cjs/{index-587f0dd7.js → index-3fb91516.js} +4 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/components/analog-clock.js +3 -4
- package/dist/esm/analog-clock.entry.js +2 -2
- package/dist/esm/analog-clock.js +2 -2
- package/dist/esm/{index-e82ae1f5.js → index-769dedbf.js} +4 -1
- package/dist/esm/loader.js +2 -2
- package/package.json +3 -3
- package/dist/analog-clock/p-cc4d7958.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-ef659518.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-4dfb66bf",[[1,"analog-clock",{timeZone:[2,"time-zone"],time:[32]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e}from"./p-ef659518.js";const r=class{constructor(e){t(this,e),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",xmlns:"http://www.w3.org/2000/svg"},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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let t,e,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},c=t=>Promise.resolve(t),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(t){}return!1})(),a=new WeakMap,u=t=>"sc-"+t.o,f={},h=t=>"object"==(t=typeof t)||"function"===t,$=(t,e,...n)=>{let l=null,s=!1,o=!1,r=[];const c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!h(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?d(null,l):l),o=s)};if(c(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const i=d(t,null);return i.u=e,r.length>0&&(i.h=r),i},d=(t,e)=>({t:0,$:t,i:e,p:null,h:null,u:null}),p={},y=(t,e,n,l,s,o)=>{if(n!==l){let r=
|
|
1
|
+
let t,e,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},c=t=>Promise.resolve(t),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(t){}return!1})(),a=new WeakMap,u=t=>"sc-"+t.o,f={},h=t=>"object"==(t=typeof t)||"function"===t,$=(t,e,...n)=>{let l=null,s=!1,o=!1,r=[];const c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!h(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?d(null,l):l),o=s)};if(c(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const i=d(t,null);return i.u=e,r.length>0&&(i.h=r),i},d=(t,e)=>({t:0,$:t,i:e,p:null,h:null,u:null}),p={},y=(t,e,n,l,s,o)=>{if(n!==l){let r=H(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,s=w(n),o=w(l);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else{const c=h(l);if((r||c&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{let s=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&o||s)&&!c&&t.setAttribute(e,l=!0===l?"":l)}}},m=/\s/,w=t=>t?t.split(m):[],b=(t,e,n,l)=>{const s=11===e.p.nodeType&&e.p.host?e.p.host:e.p,o=t&&t.u||f,r=e.u||f;for(l in o)l in r||y(s,l,o[l],void 0,n,e.t);for(l in r)y(s,l,o[l],r[l],n,e.t)},g=(e,l,s)=>{let r,c,i=l.h[s],a=0;if(n||(n="svg"===i.$),r=i.p=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.$),n&&"foreignObject"===i.$&&(n=!1),b(null,i,n),null!=t&&r["s-si"]!==t&&r.classList.add(r["s-si"]=t),i.h)for(a=0;a<i.h.length;++a)c=g(e,i,a),c&&r.appendChild(c);return"svg"===i.$?n=!1:"foreignObject"===r.tagName&&(n=!0),r},v=(t,n,l,s,o,r)=>{let c,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=g(null,l,o),c&&(s[o].p=c,i.insertBefore(c,n)))},S=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.p.remove()},j=(t,e)=>t.$===e.$,O=(t,e)=>{const l=e.p=t.p,s=t.h,o=e.h,r=e.$;n="svg"===r||"foreignObject"!==r&&n,b(t,e,n),null!==s&&null!==o?((t,e,n,l)=>{let s,o=0,r=0,c=e.length-1,i=e[0],a=e[c],u=l.length-1,f=l[0],h=l[u];for(;o<=c&&r<=u;)null==i?i=e[++o]:null==a?a=e[--c]:null==f?f=l[++r]:null==h?h=l[--u]:j(i,f)?(O(i,f),i=e[++o],f=l[++r]):j(a,h)?(O(a,h),a=e[--c],h=l[--u]):j(i,h)?(O(i,h),t.insertBefore(i.p,a.p.nextSibling),i=e[++o],h=l[--u]):j(a,f)?(O(a,f),t.insertBefore(a.p,i.p),a=e[--c],f=l[++r]):(s=g(e&&e[r],n,r),f=l[++r],s&&i.p.parentNode.insertBefore(s,i.p));o>c?v(t,null==l[u+1]?null:l[u+1].p,n,l,r,u):r>u&&S(e,o,c)})(l,s,e,o):null!==o?v(l,null,e,o,0,o.length-1):null!==s&&S(s,0,s.length-1),n&&"svg"===r&&(n=!1)},k=(t,e)=>{e&&!t.m&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.m=e)))},M=(t,e)=>{if(t.t|=16,!(4&t.t))return k(t,t.g),Y((()=>C(t,e)));t.t|=512},C=(t,e)=>{const n=t.v;return T(void 0,(()=>x(t,n,e)))},x=async(t,e,n)=>{const l=t.S,s=l["s-rc"];n&&(t=>{const e=t.j,n=t.S,l=e.t,s=((t,e)=>{let n=u(e),l=B.get(n);if(t=11===t.nodeType?t:o,l)if("string"==typeof l){let e,s=a.get(t=t.head||t);s||a.set(t,s=new Set),s.has(n)||(e=o.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),s&&s.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);P(t,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>E(t);0===e.length?n():(Promise.all(e).then(n),t.t|=4,e.length=0)}},P=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.O||d(null,null),r=(t=>t&&t.$===p)(l)?l:$(null,null,l);e=s.tagName,r.$=null,r.t|=4,n.O=r,r.p=o.p=s.shadowRoot||s,t=s["s-sc"],O(o,r)})(n,l)}catch(t){V(t,n.S)}return null},E=t=>{const e=t.S,n=t.v,l=t.g;64&t.t||(t.t|=64,A(e),N(n,"componentDidLoad"),t.k(e),l||L()),t.m&&(t.m(),t.m=void 0),512&t.t&&X((()=>M(t,!1))),t.t&=-517},L=()=>{A(o.documentElement),X((()=>(t=>{const e=r.ce("appload",{detail:{namespace:"analog-clock"}});return t.dispatchEvent(e),e})(s)))},N=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){V(t)}},T=(t,e)=>t&&t.then?t.then(e):e(),A=t=>t.classList.add("hydrated"),F=(t,e,n)=>{if(e.M){const l=Object.entries(e.M),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>W(this).C.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=W(t),o=s.C.get(e),r=s.t,c=s.v;n=((t,e)=>null==t||h(t)?t:2&e?parseFloat(t):t)(n,l.M[e][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.C.set(e,n),c&&2==(18&r)&&M(s,!1))})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const e=new Map;s.attributeChangedCallback=function(t,n,l){r.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},R=(t,e={})=>{const n=[],l=e.exclude||[],c=s.customElements,a=o.head,f=a.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let d,p=!0;Object.assign(r,e),r.l=new URL(e.resourcesUrl||"./",o.baseURI).href,t.map((t=>{t[1].map((e=>{const s={t:e[0],o:e[1],M:e[2],P:e[3]};s.M=e[2];const o=s.o,a=class extends HTMLElement{constructor(t){super(t),D(t=this,s),1&s.t&&t.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),p?$.push(this):r.jmp((()=>(t=>{if(0==(1&r.t)){const e=W(t),n=e.j,l=()=>{};if(!(1&e.t)){e.t|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(e,e.g=n);break}}n.M&&Object.entries(n.M).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.t)){{if(e.t|=32,(s=z(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(F(s,n,2),s.isProxied=!0);const t=()=>{};e.t|=8;try{new s(e)}catch(t){V(t)}e.t&=-9,t()}if(s.style){let t=s.style;const e=u(n);if(!B.has(e)){const l=()=>{};((t,e,n)=>{let l=B.get(t);i&&n?(l=l||new CSSStyleSheet,l.replace(e)):l=e,B.set(t,l)})(e,t,!!(1&n.t)),l()}}}const o=e.g,r=()=>M(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{0==(1&r.t)&&N(W(this).v,"disconnectedCallback")})()))}componentOnReady(){return W(this).L}};s.N=t[0],l.includes(o)||c.get(o)||(n.push(o),c.define(o,F(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),p=!1,$.length?$.map((t=>t.connectedCallback())):r.jmp((()=>d=setTimeout(L,30)))},U=new WeakMap,W=t=>U.get(t),q=(t,e)=>U.set(e.v=t,e),D=(t,e)=>{const n={t:0,S:t,j:e,C:new Map};return n.L=new Promise((t=>n.k=t)),t["s-p"]=[],t["s-rc"]=[],U.set(t,n)},H=(t,e)=>e in t,V=(t,e)=>(0,console.error)(t,e),_=new Map,z=t=>{const e=t.o.replace(/-/g,"_"),n=t.N,l=_.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(_.set(n,t),t[e])),V)},B=new Map,G=[],I=[],J=(t,e)=>n=>{t.push(n),l||(l=!0,e&&4&r.t?X(Q):r.raf(Q))},K=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){V(t)}t.length=0},Q=()=>{K(G),K(I),(l=G.length>0)&&r.raf(Q)},X=t=>c().then(t),Y=J(I,!0);export{R as b,$ as h,c as p,q as r}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-3fb91516.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
|
|
|
9
|
-
|
|
9
|
+
const AnalogClock = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
this.timeZone = 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-3fb91516.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.14.
|
|
6
|
+
Stencil Client Patch Browser v2.14.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
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));
|
|
@@ -710,7 +710,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
710
710
|
const flags = hostRef.$flags$;
|
|
711
711
|
const instance = hostRef.$lazyInstance$ ;
|
|
712
712
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
713
|
-
|
|
713
|
+
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
714
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
715
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
716
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
714
717
|
// gadzooks! the property's value has changed!!
|
|
715
718
|
// set our new value!
|
|
716
719
|
hostRef.$instanceValues$.set(propName, newVal);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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-3fb91516.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.14.
|
|
8
|
+
Stencil Client Patch Esm v2.14.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HTMLElement, h
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
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
|
|
|
5
|
-
|
|
5
|
+
const AnalogClock$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
@@ -41,8 +41,7 @@ let AnalogClock$1 = class extends HTMLElement {
|
|
|
41
41
|
return (h("svg", { class: "clock", viewBox: "0 0 200 200", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { id: "circle", cx: "100", cy: "100", r: "95", "stroke-width": "10", fill: "transparent" }), h("line", { id: "hour", transform: `rotate(${this.hourToDegrees()}, 100, 100)`, x1: "100", y1: "100", x2: "100", y2: "60", "stroke-width": "10", "stroke-linecap": "round" }), h("line", { id: "minute", transform: `rotate(${this.minuteToDegrees()}, 100, 100)`, x1: "100", y1: "100", x2: "100", y2: "30", "stroke-width": "8", "stroke-linecap": "round" }), h("line", { id: "second", transform: `rotate(${this.secondToDegrees()}, 100, 100)`, x1: "100", y1: "100", x2: "100", y2: "20", "stroke-width": "2", "stroke-linecap": "round" })));
|
|
42
42
|
}
|
|
43
43
|
static get style() { return analogClockCss; }
|
|
44
|
-
}
|
|
45
|
-
AnalogClock$1 = /*@__PURE__*/ proxyCustomElement(AnalogClock$1, [1, "analog-clock", {
|
|
44
|
+
}, [1, "analog-clock", {
|
|
46
45
|
"timeZone": [2, "time-zone"],
|
|
47
46
|
"time": [32]
|
|
48
47
|
}]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-769dedbf.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
|
|
|
5
|
-
|
|
5
|
+
const AnalogClock = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.timeZone = 0;
|
package/dist/esm/analog-clock.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-769dedbf.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.14.
|
|
4
|
+
Stencil Client Patch Browser v2.14.1 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchBrowser = () => {
|
|
7
7
|
const importMeta = import.meta.url;
|
|
@@ -688,7 +688,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
688
688
|
const flags = hostRef.$flags$;
|
|
689
689
|
const instance = hostRef.$lazyInstance$ ;
|
|
690
690
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
691
|
-
|
|
691
|
+
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
692
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
693
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
694
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
692
695
|
// gadzooks! the property's value has changed!!
|
|
693
696
|
// set our new value!
|
|
694
697
|
hostRef.$instanceValues$.set(propName, newVal);
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-769dedbf.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.14.
|
|
4
|
+
Stencil Client Patch Esm v2.14.1 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "analog-clock-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.204",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"format": "prettier --write src"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@stencil/core": "2.14.
|
|
30
|
+
"@stencil/core": "2.14.1"
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"devDependencies": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"eslint": "8.10.0",
|
|
38
38
|
"jest": "27.5.1",
|
|
39
39
|
"prettier": "2.5.1",
|
|
40
|
-
"puppeteer": "13.
|
|
40
|
+
"puppeteer": "13.5.1",
|
|
41
41
|
"tslint": "6.1.3",
|
|
42
42
|
"typescript": "4.6.2"
|
|
43
43
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-464ae38a.js";let r=class{constructor(e){t(this,e),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",xmlns:"http://www.w3.org/2000/svg"},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}
|