analog-clock-components 0.1.425 → 0.1.427
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-666ac43b.entry.js → p-2117c5f1.entry.js} +1 -1
- package/dist/analog-clock/p-8b6518c5.js +2 -0
- package/dist/cjs/analog-clock.cjs.entry.js +1 -1
- package/dist/cjs/analog-clock.cjs.js +2 -2
- package/dist/cjs/{index-b47ccfb1.js → index-4273d9d7.js} +39 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/analog-clock.entry.js +1 -1
- package/dist/esm/analog-clock.js +3 -3
- package/dist/esm/{index-1076d18b.js → index-0451808a.js} +39 -10
- package/dist/esm/loader.js +2 -2
- package/package.json +3 -3
- package/dist/analog-clock/p-cc9a8f75.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-8b6518c5.js";export{s as setNonce}from"./p-8b6518c5.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-2117c5f1",[[1,"analog-clock",{size:[2],timeZone:[2,"time-zone"],time:[32]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-
|
|
1
|
+
import{r as t,h as e}from"./p-8b6518c5.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}
|
|
@@ -0,0 +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.g,s=o["s-rc"];e&&(n=>{const t=n.j,e=n.g,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.S)&&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.g,i=e.O||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.O=a,a.h=i.h=s.shadowRoot||s,n=s["s-sc"],b(i,a)})(e,l,s)}catch(n){H(n,e.g)}return null},P=n=>{const t=n.g,e=n.m,l=n.$;64&n.i||(n.i|=64,E(t),A(e,"componentDidLoad"),n.k(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.M){const o=Object.entries(t.M),i=n.prototype;if(o.map((([n,[l]])=>{(31&l||2&e&&32&l)&&Object.defineProperty(i,n,{get(){return((n,t)=>U(this).C.get(t))(0,n)},set(e){((n,t,e,l)=>{const o=U(n),i=o.C.get(t),c=o.i,r=o.m;e=((n,t)=>null==n||s(n)?n:2&t?parseFloat(n):n)(e,l.M[t][0]),8&c&&void 0!==i||e===i||Number.isNaN(i)&&Number.isNaN(e)||(o.C.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.P[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.P)&&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.A=new URL(t.resourcesUrl||"./",G.baseURI).href,n.map((n=>{n[1].map((t=>{const e={i:t[0],p:t[1],M:t[2],L:t[3]};e.M=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.j,l=()=>{};if(1&t.i)(null==t?void 0:t.m)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){g(t,t.$=e);break}}e.M&&Object.entries(e.M).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e,l,o)=>{if(0==(32&t.i)){t.i|=32;{if((o=_(e)).then){const n=()=>{};o=await o,n()}o.isProxied||(L(o,e,2),o.isProxied=!0);const n=()=>{};t.i|=8;try{new o(t)}catch(n){H(n)}t.i&=-9,n()}if(o.style){let n=o.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 s=t.$,i=()=>j(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(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.N)&&n.N.then((()=>N(n.m)))}})()))}componentOnReady(){return U(this).N}};e.T=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.S)&&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.S=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,g:n,j:t,C:new Map};return e.N=new Promise((n=>e.k=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.T,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,A:"",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}
|
|
@@ -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-4273d9d7.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-4273d9d7.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.3.0 | 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));
|
|
@@ -1062,6 +1062,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1062
1062
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1063
1063
|
*/
|
|
1064
1064
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1065
|
+
var _a;
|
|
1065
1066
|
if (cmpMeta.$members$) {
|
|
1066
1067
|
// It's better to have a const than two Object.entries()
|
|
1067
1068
|
const members = Object.entries(cmpMeta.$members$);
|
|
@@ -1086,7 +1087,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1086
1087
|
});
|
|
1087
1088
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1088
1089
|
const attrNameToPropName = new Map();
|
|
1089
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
1090
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1090
1091
|
plt.jmp(() => {
|
|
1091
1092
|
const propName = attrNameToPropName.get(attrName);
|
|
1092
1093
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
@@ -1134,18 +1135,46 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1134
1135
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1135
1136
|
return;
|
|
1136
1137
|
}
|
|
1138
|
+
else if (propName == null) {
|
|
1139
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
1140
|
+
// on a vanilla web component
|
|
1141
|
+
const hostRef = getHostRef(this);
|
|
1142
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
1143
|
+
// We only want to trigger the callback(s) if:
|
|
1144
|
+
// 1. The instance is ready
|
|
1145
|
+
// 2. The watchers are ready
|
|
1146
|
+
// 3. The value has changed
|
|
1147
|
+
if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1148
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1149
|
+
newValue !== oldValue) {
|
|
1150
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1151
|
+
const entry = cmpMeta.$watchers$[attrName];
|
|
1152
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1153
|
+
if (instance[callbackName] != null) {
|
|
1154
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
return;
|
|
1159
|
+
}
|
|
1137
1160
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1138
1161
|
});
|
|
1139
1162
|
};
|
|
1140
|
-
//
|
|
1141
|
-
//
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1163
|
+
// Create an array of attributes to observe
|
|
1164
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
1165
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
1166
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
1167
|
+
// an invalid attribute.
|
|
1168
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
1169
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
1170
|
+
...members
|
|
1171
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1172
|
+
.map(([propName, m]) => {
|
|
1173
|
+
const attrName = m[1] || propName;
|
|
1174
|
+
attrNameToPropName.set(attrName, propName);
|
|
1175
|
+
return attrName;
|
|
1176
|
+
}),
|
|
1177
|
+
]));
|
|
1149
1178
|
}
|
|
1150
1179
|
}
|
|
1151
1180
|
return Cstr;
|
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-4273d9d7.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-0451808a.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-0451808a.js';
|
|
2
|
+
export { s as setNonce } from './index-0451808a.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v4.
|
|
5
|
+
Stencil Client Patch Browser v4.3.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchBrowser = () => {
|
|
8
8
|
const importMeta = import.meta.url;
|
|
@@ -1040,6 +1040,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1040
1040
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1041
1041
|
*/
|
|
1042
1042
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1043
|
+
var _a;
|
|
1043
1044
|
if (cmpMeta.$members$) {
|
|
1044
1045
|
// It's better to have a const than two Object.entries()
|
|
1045
1046
|
const members = Object.entries(cmpMeta.$members$);
|
|
@@ -1064,7 +1065,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1064
1065
|
});
|
|
1065
1066
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1066
1067
|
const attrNameToPropName = new Map();
|
|
1067
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
1068
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1068
1069
|
plt.jmp(() => {
|
|
1069
1070
|
const propName = attrNameToPropName.get(attrName);
|
|
1070
1071
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
@@ -1112,18 +1113,46 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1112
1113
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1113
1114
|
return;
|
|
1114
1115
|
}
|
|
1116
|
+
else if (propName == null) {
|
|
1117
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
1118
|
+
// on a vanilla web component
|
|
1119
|
+
const hostRef = getHostRef(this);
|
|
1120
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
1121
|
+
// We only want to trigger the callback(s) if:
|
|
1122
|
+
// 1. The instance is ready
|
|
1123
|
+
// 2. The watchers are ready
|
|
1124
|
+
// 3. The value has changed
|
|
1125
|
+
if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1126
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1127
|
+
newValue !== oldValue) {
|
|
1128
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1129
|
+
const entry = cmpMeta.$watchers$[attrName];
|
|
1130
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1131
|
+
if (instance[callbackName] != null) {
|
|
1132
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1115
1138
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1116
1139
|
});
|
|
1117
1140
|
};
|
|
1118
|
-
//
|
|
1119
|
-
//
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1141
|
+
// Create an array of attributes to observe
|
|
1142
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
1143
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
1144
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
1145
|
+
// an invalid attribute.
|
|
1146
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
1147
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
1148
|
+
...members
|
|
1149
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1150
|
+
.map(([propName, m]) => {
|
|
1151
|
+
const attrName = m[1] || propName;
|
|
1152
|
+
attrNameToPropName.set(attrName, propName);
|
|
1153
|
+
return attrName;
|
|
1154
|
+
}),
|
|
1155
|
+
]));
|
|
1127
1156
|
}
|
|
1128
1157
|
}
|
|
1129
1158
|
return Cstr;
|
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-0451808a.js';
|
|
2
|
+
export { s as setNonce } from './index-0451808a.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.427",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"format": "prettier --write src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@stencil/core": "4.
|
|
28
|
+
"@stencil/core": "4.3.0"
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"cspell": "7.3.
|
|
32
|
+
"cspell": "7.3.6",
|
|
33
33
|
"eslint": "8.49.0",
|
|
34
34
|
"prettier": "3.0.3",
|
|
35
35
|
"tslint": "6.1.3",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let n,t,e=!1,l=!1;const o={},s=n=>"object"==(n=typeof n)||"function"===n;function c(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 i=(n,t,...e)=>{let l=null,o=!1,c=!1;const i=[],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&&c?i[i.length-1].t+=l:i.push(o?r(null,l):l),c=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,i.length>0&&(a.o=i),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,c)=>{if(e!==l){let i=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((i||r&&null!==l)&&!o)try{if(n.tagName.includes("-"))n[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=e&&n[t]==o||(n[t]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(t)||n.removeAttribute(t):(!i||4&c||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,c=n&&n.l||o,i=t.l||o;for(l in c)l in i||d(s,l,c[l],void 0,e,t.i);for(l in i)d(s,l,c[l],i[l],e,t.i)},$=(t,l,o)=>{const s=l.o[o];let c,i,r=0;if(e||(e="svg"===s.u),c=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&&c["s-si"]!==n&&c.classList.add(c["s-si"]=n),s.o)for(r=0;r<s.o.length;++r)i=$(t,s,r),i&&c.appendChild(i);return"svg"===s.u?e=!1:"foreignObject"===c.tagName&&(e=!0),c},m=(n,e,l,o,s,c)=>{let i,r=n;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=$(null,l,s),i&&(o[s].h=i,r.insertBefore(i,e)))},v=(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,c=t.u;e="svg"===c||"foreignObject"!==c&&e,p(n,t,e),null!==o&&null!==s?((n,t,e,l)=>{let o,s=0,c=0,i=t.length-1,r=t[0],u=t[i],a=l.length-1,f=l[0],d=l[a];for(;s<=i&&c<=a;)null==r?r=t[++s]:null==u?u=t[--i]:null==f?f=l[++c]:null==d?d=l[--a]:w(r,f)?(b(r,f),r=t[++s],f=l[++c]):w(u,d)?(b(u,d),u=t[--i],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[--i],f=l[++c]):(o=$(t&&t[c],e,c),f=l[++c],o&&r.h.parentNode.insertBefore(o,r.h));s>i?m(n,null==l[a+1]?null:l[a+1].h,e,l,c,a):c>a&&v(t,s,i)})(l,o,t,s):null!==s?m(l,null,t,s,0,s.length-1):null!==o&&v(o,0,o.length-1),e&&"svg"===c&&(e=!1)},g=(n,t)=>{t&&!n.$&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.$=t)))},j=(n,t)=>{if(n.i|=16,!(4&n.i))return g(n,n.m),en((()=>S(n,t)));n.i|=512},S=(n,t)=>{const e=n.v;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.g,s=o["s-rc"];e&&(n=>{const t=n.j,e=n.g,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.S)&&void 0!==e?e:c(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.g,c=e.O||r(null,null),a=(n=>n&&n.u===u)(l)?l:i(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.O=a,a.h=c.h=s.shadowRoot||s,n=s["s-sc"],b(c,a)})(e,l,s)}catch(n){H(n,e.g)}return null},P=n=>{const t=n.g,e=n.v,l=n.m;64&n.i||(n.i|=64,L(t),E(e,"componentDidLoad"),n.k(t),l||x()),n.$&&(n.$(),n.$=void 0),512&n.i&&tn((()=>j(n,!1))),n.i&=-517},x=()=>{L(G.documentElement),tn((()=>(n=>{const t=I.ce("appload",{detail:{namespace:"analog-clock"}});return n.dispatchEvent(t),t})(B)))},E=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){H(n)}},L=n=>n.classList.add("hydrated"),N=(n,t,e)=>{if(t.M){const l=Object.entries(t.M),o=n.prototype;if(l.map((([n,[l]])=>{(31&l||2&e&&32&l)&&Object.defineProperty(o,n,{get(){return((n,t)=>U(this).C.get(t))(0,n)},set(e){((n,t,e,l)=>{const o=U(n),c=o.C.get(t),i=o.i,r=o.v;e=((n,t)=>null==n||s(n)?n:2&t?parseFloat(n):n)(e,l.M[t][0]),8&i&&void 0!==c||e===c||Number.isNaN(c)&&Number.isNaN(e)||(o.C.set(t,e),r&&2==(18&i)&&j(o,!1))})(this,n,e,t)},configurable:!0,enumerable:!0})})),1&e){const t=new Map;o.attributeChangedCallback=function(n,e,l){I.jmp((()=>{const e=t.get(n);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(o.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},n.observedAttributes=l.filter((([n,t])=>15&t[0])).map((([n,e])=>{const l=e[1]||n;return t.set(l,n),l}))}}return n},T=n=>{E(n,"disconnectedCallback")},A=(n,t={})=>{var e;const l=[],o=t.exclude||[],s=B.customElements,i=G.head,r=i.querySelector("meta[charset]"),u=G.createElement("style"),a=[];let d,h=!0;Object.assign(I,t),I.P=new URL(t.resourcesUrl||"./",G.baseURI).href,n.map((n=>{n[1].map((t=>{const e={i:t[0],p:t[1],M:t[2],L:t[3]};e.M=t[2];const c=e.p,i=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.j,l=()=>{};if(1&t.i)(null==t?void 0:t.v)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){g(t,t.m=e);break}}e.M&&Object.entries(e.M).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e,l,o)=>{if(0==(32&t.i)){t.i|=32;{if((o=_(e)).then){const n=()=>{};o=await o,n()}o.isProxied||(N(o,e,2),o.isProxied=!0);const n=()=>{};t.i|=8;try{new o(t)}catch(n){H(n)}t.i&=-9,n()}if(o.style){let n=o.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 s=t.m,c=()=>j(t,!0);s&&s["s-rc"]?s["s-rc"].push(c):c()})(0,t,e)}l()}})(this)))}disconnectedCallback(){I.jmp((()=>(async()=>{if(0==(1&I.i)){const n=U(this);(null==n?void 0:n.v)?T(n.v):(null==n?void 0:n.N)&&n.N.then((()=>T(n.v)))}})()))}componentOnReady(){return U(this).N}};e.T=n[0],o.includes(c)||s.get(c)||(l.push(c),s.define(c,N(i,e,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const n=null!==(e=I.S)&&void 0!==e?e:c(G);null!=n&&u.setAttribute("nonce",n),i.insertBefore(u,r?r.nextSibling:i.firstChild)}h=!1,a.length?a.map((n=>n.connectedCallback())):I.jmp((()=>d=setTimeout(x,30)))},F=n=>I.S=n,R=new WeakMap,U=n=>R.get(n),W=(n,t)=>R.set(t.v=n,t),q=(n,t)=>{const e={i:0,g:n,j:t,C:new Map};return e.N=new Promise((n=>e.k=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.T,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,P:"",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{A as b,i as h,J as p,W as r,F as s}
|