analog-clock-components 0.1.436 → 0.1.437
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-0b754207.js +2 -0
- package/dist/analog-clock/{p-e9c2b3b5.entry.js → p-800f3a35.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-5b7ede3b.js → index-ecb43150.js} +31 -6
- 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-dada1c34.js → index-bd835014.js} +31 -6
- package/dist/esm/loader.js +2 -2
- package/package.json +3 -3
- package/dist/analog-clock/p-b1275f44.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-0b754207.js";export{s as setNonce}from"./p-0b754207.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-800f3a35",[[1,"analog-clock",{size:[2],timeZone:[2,"time-zone"],time:[32]}]]]],e)));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let n,t,e=!1,l=!1;const o="slot-fb{display:contents}slot-fb[hidden]{display:none}",s={},i=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 r=(n,t,...e)=>{let l=null,o=!1,s=!1;const c=[],r=t=>{for(let e=0;e<t.length;e++)l=t[e],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof n&&!i(l))&&(l+=""),o&&s?c[c.length-1].t+=l:c.push(o?u(null,l):l),s=o)};if(r(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=u(n,null);return a.l=t,c.length>0&&(a.o=c),a},u=(n,t)=>({i:0,u:n,t,h:null,o:null,l:null}),a={},f=new WeakMap,d=n=>"sc-"+n.p,y=(n,t,e,l,o,s)=>{if(e!==l){let c=H(n,t);if(t.toLowerCase(),"class"===t){const t=n.classList,o=p(e),s=p(l);t.remove(...o.filter((n=>n&&!s.includes(n)))),t.add(...s.filter((n=>n&&!o.includes(n))))}else{const r=i(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&s||o)&&!r&&n.setAttribute(t,l=!0===l?"":l)}}},h=/\s/,p=n=>n?n.split(h):[],v=(n,t,e,l)=>{const o=11===t.h.nodeType&&t.h.host?t.h.host:t.h,i=n&&n.l||s,c=t.l||s;for(l in i)l in c||y(o,l,i[l],void 0,e,t.i);for(l in c)y(o,l,i[l],c[l],e,t.i)},$=(t,l,o)=>{const s=l.o[o];let i,c,r=0;if(e||(e="svg"===s.u),i=s.h=I.createElementNS(e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.u),e&&"foreignObject"===s.u&&(e=!1),v(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=$(t,s,r),c&&i.appendChild(c);return"svg"===s.u?e=!1:"foreignObject"===i.tagName&&(e=!0),i},m=(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=$(null,l,s),c&&(o[s].h=c,r.insertBefore(c,e)))},b=(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,g=(n,t)=>{const l=t.h=n.h,o=n.o,s=t.o,i=t.u;e="svg"===i||"foreignObject"!==i&&e,v(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)?(g(r,f),r=t[++s],f=l[++i]):w(u,d)?(g(u,d),u=t[--c],d=l[--a]):w(r,d)?(g(r,d),n.insertBefore(r.h,u.h.nextSibling),r=t[++s],d=l[--a]):w(u,f)?(g(u,f),n.insertBefore(u.h,r.h),u=t[--c],f=l[++i]):(o=$(t&&t[i],e,i),f=l[++i],o&&r.h.parentNode.insertBefore(o,r.h));s>c?m(n,null==l[a+1]?null:l[a+1].h,e,l,i,a):i>a&&b(t,s,c)})(l,o,t,s):null!==s?m(l,null,t,s,0,s.length-1):null!==o&&b(o,0,o.length-1),e&&"svg"===i&&(e=!1)},j=(n,t)=>{t&&!n.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.v=t)))},S=(n,t)=>{if(n.i|=16,!(4&n.i))return j(n,n.$),ln((()=>O(n,t)));n.i|=512},O=(n,t)=>{const e=n.m;return k(void 0,(()=>C(n,e,t)))},k=(n,t)=>M(n)?n.then(t):t(),M=n=>n instanceof Promise||n&&n.then&&"function"==typeof n.then,C=async(n,t,e)=>{var l;const s=n.$hostElement$,i=s["s-rc"];e&&(n=>{const t=n.j,e=n.$hostElement$,l=t.i,s=((n,t)=>{var e;const l=d(t),s=B.get(l);if(n=11===n.nodeType?n:I,s)if("string"==typeof s){let i,r=f.get(n=n.head||n);if(r||f.set(n,r=new Set),!r.has(l)){{i=I.createElement("style"),i.innerHTML=s;const t=null!==(e=J.S)&&void 0!==e?e:c(I);null!=t&&i.setAttribute("nonce",t),n.insertBefore(i,n.querySelector("link"))}4&t.i&&(i.innerHTML+=o),r&&r.add(l)}}else n.adoptedStyleSheets.includes(s)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,s]);return l})(e.shadowRoot?e.shadowRoot:e.getRootNode(),t);10&l&&(e["s-sc"]=s,e.classList.add(s+"-h"))})(n);P(n,t,s,e),i&&(i.map((n=>n())),s["s-rc"]=void 0);{const t=null!==(l=s["s-p"])&&void 0!==l?l:[],e=()=>x(n);0===t.length?e():(Promise.all(t).then(e),n.i|=4,t.length=0)}},P=(e,l,o,s)=>{try{l=l.render(),e.i&=-17,e.i|=2,((e,l,o=!1)=>{const s=e.$hostElement$,i=e.O||u(null,null),c=(n=>n&&n.u===a)(l)?l:r(null,null,l);if(t=s.tagName,o&&c.l)for(const n of Object.keys(c.l))s.hasAttribute(n)&&!["key","ref","style","class"].includes(n)&&(c.l[n]=s[n]);c.u=null,c.i|=4,e.O=c,c.h=i.h=s.shadowRoot||s,n=s["s-sc"],g(i,c)})(e,l,s)}catch(n){V(n,e.$hostElement$)}return null},x=n=>{const t=n.$hostElement$,e=n.m,l=n.$;64&n.i||(n.i|=64,L(t),E(e,"componentDidLoad"),n.k(t),l||A()),n.v&&(n.v(),n.v=void 0),512&n.i&&en((()=>S(n,!1))),n.i&=-517},A=()=>{L(I.documentElement),en((()=>(n=>{const t=J.ce("appload",{detail:{namespace:"analog-clock"}});return n.dispatchEvent(t),t})(G)))},E=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){V(n)}},L=n=>n.classList.add("hydrated"),N=(n,t,e)=>{var l;if(t.M){const o=Object.entries(t.M),s=n.prototype;if(o.map((([n,[l]])=>{(31&l||2&e&&32&l)&&Object.defineProperty(s,n,{get(){return((n,t)=>W(this).C.get(t))(0,n)},set(e){((n,t,e,l)=>{const o=W(n),s=o.C.get(t),c=o.i,r=o.m;e=((n,t)=>null==n||i(n)?n:2&t?parseFloat(n):n)(e,l.M[t][0]),8&c&&void 0!==s||e===s||Number.isNaN(s)&&Number.isNaN(e)||(o.C.set(t,e),r&&2==(18&c)&&S(o,!1))})(this,n,e,t)},configurable:!0,enumerable:!0})})),1&e){const e=new Map;s.attributeChangedCallback=function(n,l,o){J.jmp((()=>{const i=e.get(n);if(this.hasOwnProperty(i))o=this[i],delete this[i];else{if(s.hasOwnProperty(i)&&"number"==typeof this[i]&&this[i]==o)return;if(null==i){const e=W(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[i]=(null!==o||"boolean"!=typeof this[i])&&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},T=n=>{E(n,"disconnectedCallback")},F=(n,t={})=>{var e;const l=[],s=t.exclude||[],i=G.customElements,r=I.head,u=r.querySelector("meta[charset]"),a=I.createElement("style"),f=[];let y,h=!0;Object.assign(J,t),J.A=new URL(t.resourcesUrl||"./",I.baseURI).href;let p=!1;if(n.map((n=>{n[1].map((t=>{const e={i:t[0],p:t[1],M:t[2],L:t[3]};4&e.i&&(p=!0),e.M=t[2];const o=e.p,c=class extends HTMLElement{constructor(n){super(n),D(n=this,e),1&e.i&&n.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),h?f.push(this):J.jmp((()=>(n=>{if(0==(1&J.i)){const t=W(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"]){j(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)=>{let l;if(0==(32&t.i)){t.i|=32;{if(l=z(e),l.then){const n=()=>{};l=await l,n()}l.isProxied||(N(l,e,2),l.isProxied=!0);const n=()=>{};t.i|=8;try{new l(t)}catch(n){V(n)}t.i&=-9,n()}if(l.style){let n=l.style;const t=d(e);if(!B.has(t)){const l=()=>{};((n,t,e)=>{let l=B.get(n);Q&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,B.set(n,l)})(t,n,!!(1&e.i)),l()}}}const o=t.$,s=()=>S(t,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(0,t,e)}l()}})(this)))}disconnectedCallback(){J.jmp((()=>(async()=>{if(0==(1&J.i)){const n=W(this);(null==n?void 0:n.m)?T(n.m):(null==n?void 0:n.N)&&n.N.then((()=>T(n.m)))}})()))}componentOnReady(){return W(this).N}};e.T=n[0],s.includes(o)||i.get(o)||(l.push(o),i.define(o,N(c,e,1)))}))})),p&&(a.innerHTML+=o),a.innerHTML+=l+"{visibility:hidden}.hydrated{visibility:inherit}",a.innerHTML.length){a.setAttribute("data-styles",""),r.insertBefore(a,u?u.nextSibling:r.firstChild);const n=null!==(e=J.S)&&void 0!==e?e:c(I);null!=n&&a.setAttribute("nonce",n)}h=!1,f.length?f.map((n=>n.connectedCallback())):J.jmp((()=>y=setTimeout(A,30)))},R=n=>J.S=n,U=new WeakMap,W=n=>U.get(n),q=(n,t)=>U.set(t.m=n,t),D=(n,t)=>{const e={i:0,$hostElement$:n,j:t,C:new Map};return e.N=new Promise((n=>e.k=n)),n["s-p"]=[],n["s-rc"]=[],U.set(n,e)},H=(n,t)=>t in n,V=(n,t)=>(0,console.error)(n,t),_=new Map,z=n=>{const t=n.p.replace(/-/g,"_"),e=n.T,l=_.get(e);return l?l[t]:import(`./${e}.entry.js`).then((n=>(_.set(e,n),n[t])),V)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},B=new Map,G="undefined"!=typeof window?window:{},I=G.document||{head:{}},J={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)},K=n=>Promise.resolve(n),Q=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(n){}return!1})(),X=[],Y=[],Z=(n,t)=>e=>{n.push(e),l||(l=!0,t&&4&J.i?en(tn):J.raf(tn))},nn=n=>{for(let t=0;t<n.length;t++)try{n[t](performance.now())}catch(n){V(n)}n.length=0},tn=()=>{nn(X),nn(Y),(l=X.length>0)&&J.raf(tn)},en=n=>K().then(n),ln=Z(Y,!0);export{F as b,r as h,K as p,q as r,R as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-
|
|
1
|
+
import{r as t,h as e}from"./p-0b754207.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-ecb43150.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-ecb43150.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.7.
|
|
8
|
+
Stencil Client Patch Browser v4.7.2 | 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));
|
|
@@ -49,6 +49,13 @@ const uniqueTime = (key, measureText) => {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
52
|
+
/**
|
|
53
|
+
* Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
|
|
54
|
+
*
|
|
55
|
+
* Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
|
|
56
|
+
* support as of Stencil v4.
|
|
57
|
+
*/
|
|
58
|
+
const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
52
59
|
/**
|
|
53
60
|
* Default style mode id
|
|
54
61
|
*/
|
|
@@ -267,6 +274,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
267
274
|
}
|
|
268
275
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
269
276
|
}
|
|
277
|
+
// Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
|
|
278
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
279
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
280
|
+
}
|
|
270
281
|
if (appliedStyles) {
|
|
271
282
|
appliedStyles.add(scopeId);
|
|
272
283
|
}
|
|
@@ -1347,12 +1358,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1347
1358
|
const customElements = win.customElements;
|
|
1348
1359
|
const head = doc.head;
|
|
1349
1360
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1350
|
-
const
|
|
1361
|
+
const dataStyles = /*@__PURE__*/ doc.createElement('style');
|
|
1351
1362
|
const deferredConnectedCallbacks = [];
|
|
1352
1363
|
let appLoadFallback;
|
|
1353
1364
|
let isBootstrapping = true;
|
|
1354
1365
|
Object.assign(plt, options);
|
|
1355
1366
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1367
|
+
let hasSlotRelocation = false;
|
|
1356
1368
|
lazyBundles.map((lazyBundle) => {
|
|
1357
1369
|
lazyBundle[1].map((compactMeta) => {
|
|
1358
1370
|
const cmpMeta = {
|
|
@@ -1361,6 +1373,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1361
1373
|
$members$: compactMeta[2],
|
|
1362
1374
|
$listeners$: compactMeta[3],
|
|
1363
1375
|
};
|
|
1376
|
+
// Check if we are using slots outside the shadow DOM in this component.
|
|
1377
|
+
// We'll use this information later to add styles for `slot-fb` elements
|
|
1378
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
1379
|
+
hasSlotRelocation = true;
|
|
1380
|
+
}
|
|
1364
1381
|
{
|
|
1365
1382
|
cmpMeta.$members$ = compactMeta[2];
|
|
1366
1383
|
}
|
|
@@ -1411,15 +1428,23 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1411
1428
|
}
|
|
1412
1429
|
});
|
|
1413
1430
|
});
|
|
1431
|
+
// Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
|
|
1432
|
+
if (hasSlotRelocation) {
|
|
1433
|
+
dataStyles.innerHTML += SLOT_FB_CSS;
|
|
1434
|
+
}
|
|
1435
|
+
// Add hydration styles
|
|
1414
1436
|
{
|
|
1415
|
-
|
|
1416
|
-
|
|
1437
|
+
dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
|
|
1438
|
+
}
|
|
1439
|
+
// If we have styles, add them to the DOM
|
|
1440
|
+
if (dataStyles.innerHTML.length) {
|
|
1441
|
+
dataStyles.setAttribute('data-styles', '');
|
|
1442
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1417
1443
|
// Apply CSP nonce to the style tag if it exists
|
|
1418
1444
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1419
1445
|
if (nonce != null) {
|
|
1420
|
-
|
|
1446
|
+
dataStyles.setAttribute('nonce', nonce);
|
|
1421
1447
|
}
|
|
1422
|
-
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1423
1448
|
}
|
|
1424
1449
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1425
1450
|
isBootstrapping = false;
|
|
@@ -1571,7 +1596,7 @@ const flush = () => {
|
|
|
1571
1596
|
}
|
|
1572
1597
|
}
|
|
1573
1598
|
};
|
|
1574
|
-
const nextTick =
|
|
1599
|
+
const nextTick = (cb) => promiseResolve().then(cb);
|
|
1575
1600
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1576
1601
|
|
|
1577
1602
|
exports.bootstrapLazy = bootstrapLazy;
|
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-ecb43150.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-bd835014.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-bd835014.js';
|
|
2
|
+
export { s as setNonce } from './index-bd835014.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v4.7.
|
|
5
|
+
Stencil Client Patch Browser v4.7.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchBrowser = () => {
|
|
8
8
|
const importMeta = import.meta.url;
|
|
@@ -27,6 +27,13 @@ const uniqueTime = (key, measureText) => {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
30
|
+
/**
|
|
31
|
+
* Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
|
|
32
|
+
*
|
|
33
|
+
* Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
|
|
34
|
+
* support as of Stencil v4.
|
|
35
|
+
*/
|
|
36
|
+
const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
30
37
|
/**
|
|
31
38
|
* Default style mode id
|
|
32
39
|
*/
|
|
@@ -245,6 +252,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
245
252
|
}
|
|
246
253
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
247
254
|
}
|
|
255
|
+
// Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
|
|
256
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
257
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
258
|
+
}
|
|
248
259
|
if (appliedStyles) {
|
|
249
260
|
appliedStyles.add(scopeId);
|
|
250
261
|
}
|
|
@@ -1325,12 +1336,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1325
1336
|
const customElements = win.customElements;
|
|
1326
1337
|
const head = doc.head;
|
|
1327
1338
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1328
|
-
const
|
|
1339
|
+
const dataStyles = /*@__PURE__*/ doc.createElement('style');
|
|
1329
1340
|
const deferredConnectedCallbacks = [];
|
|
1330
1341
|
let appLoadFallback;
|
|
1331
1342
|
let isBootstrapping = true;
|
|
1332
1343
|
Object.assign(plt, options);
|
|
1333
1344
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1345
|
+
let hasSlotRelocation = false;
|
|
1334
1346
|
lazyBundles.map((lazyBundle) => {
|
|
1335
1347
|
lazyBundle[1].map((compactMeta) => {
|
|
1336
1348
|
const cmpMeta = {
|
|
@@ -1339,6 +1351,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1339
1351
|
$members$: compactMeta[2],
|
|
1340
1352
|
$listeners$: compactMeta[3],
|
|
1341
1353
|
};
|
|
1354
|
+
// Check if we are using slots outside the shadow DOM in this component.
|
|
1355
|
+
// We'll use this information later to add styles for `slot-fb` elements
|
|
1356
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
1357
|
+
hasSlotRelocation = true;
|
|
1358
|
+
}
|
|
1342
1359
|
{
|
|
1343
1360
|
cmpMeta.$members$ = compactMeta[2];
|
|
1344
1361
|
}
|
|
@@ -1389,15 +1406,23 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1389
1406
|
}
|
|
1390
1407
|
});
|
|
1391
1408
|
});
|
|
1409
|
+
// Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
|
|
1410
|
+
if (hasSlotRelocation) {
|
|
1411
|
+
dataStyles.innerHTML += SLOT_FB_CSS;
|
|
1412
|
+
}
|
|
1413
|
+
// Add hydration styles
|
|
1392
1414
|
{
|
|
1393
|
-
|
|
1394
|
-
|
|
1415
|
+
dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
|
|
1416
|
+
}
|
|
1417
|
+
// If we have styles, add them to the DOM
|
|
1418
|
+
if (dataStyles.innerHTML.length) {
|
|
1419
|
+
dataStyles.setAttribute('data-styles', '');
|
|
1420
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1395
1421
|
// Apply CSP nonce to the style tag if it exists
|
|
1396
1422
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1397
1423
|
if (nonce != null) {
|
|
1398
|
-
|
|
1424
|
+
dataStyles.setAttribute('nonce', nonce);
|
|
1399
1425
|
}
|
|
1400
|
-
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1401
1426
|
}
|
|
1402
1427
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1403
1428
|
isBootstrapping = false;
|
|
@@ -1549,7 +1574,7 @@ const flush = () => {
|
|
|
1549
1574
|
}
|
|
1550
1575
|
}
|
|
1551
1576
|
};
|
|
1552
|
-
const nextTick =
|
|
1577
|
+
const nextTick = (cb) => promiseResolve().then(cb);
|
|
1553
1578
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1554
1579
|
|
|
1555
1580
|
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
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-bd835014.js';
|
|
2
|
+
export { s as setNonce } from './index-bd835014.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.437",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"format": "prettier --write src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@stencil/core": "4.7.
|
|
28
|
+
"@stencil/core": "4.7.2"
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"cspell": "8.0.0",
|
|
33
33
|
"eslint": "8.53.0",
|
|
34
|
-
"prettier": "3.0
|
|
34
|
+
"prettier": "3.1.0",
|
|
35
35
|
"tslint": "6.1.3",
|
|
36
36
|
"typescript": "5.2.2"
|
|
37
37
|
}
|
|
@@ -1,2 +0,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.$hostElement$,s=o["s-rc"];e&&(n=>{const t=n.j,e=n.$hostElement$,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.$hostElement$,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.$hostElement$)}return null},P=n=>{const t=n.$hostElement$,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)=>{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.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,$hostElement$: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}
|