@haiilo/catalyst 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.css +1 -1
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/p-22fac0fb.js +1 -0
- package/dist/catalyst/p-2dc28db3.entry.js +11 -0
- package/dist/catalyst/{p-73ee291d.js → p-e08f13c7.js} +1 -1
- package/dist/cjs/{app-globals-a3b3cf88.js → app-globals-814f34aa.js} +1 -1
- package/dist/cjs/cat-alert_7.cjs.entry.js +8 -8
- package/dist/cjs/{cat-icon-registry-eeff9b7d.js → cat-icon-registry-909e38e7.js} +27 -1
- package/dist/cjs/catalyst.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/components/cat-alert.js +3 -4
- package/dist/components/cat-badge.js +3 -4
- package/dist/components/cat-button.js +3 -4
- package/dist/components/cat-icon2.js +3 -4
- package/dist/components/cat-menu.js +4 -5
- package/dist/components/cat-skeleton.js +3 -4
- package/dist/components/cat-spinner2.js +3 -4
- package/dist/components/index.d.ts +1 -1
- package/dist/esm/{app-globals-fc0806a7.js → app-globals-e1679c2d.js} +1 -1
- package/dist/esm/cat-alert_7.entry.js +8 -8
- package/dist/esm/{cat-icon-registry-d877de13.js → cat-icon-registry-4d02ee6c.js} +27 -1
- package/dist/esm/catalyst.js +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/package.json +9 -9
- package/dist/catalyst/p-4c438c2d.entry.js +0 -11
- package/dist/catalyst/p-94273abf.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},c=e=>Promise.resolve(e),r=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),a=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=e,c=u(t,s),r=f(n);i.ael(o,l,c,r),(t.o=t.o||[]).push((()=>i.rel(o,l,c,r)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){J(e)}},f=e=>0!=(2&e),d=new WeakMap,h=e=>"sc-"+e.h,m={},w=e=>"object"==(e=typeof e)||"function"===e,p=(e,t,...n)=>{let l=null,s=!1,o=!1,i=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!w(l))&&(l+=""),s&&o?i[i.length-1].m+=l:i.push(s?b(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const r=b(e,null);return r.p=t,i.length>0&&(r.$=i),r},b=(e,t)=>({t:0,g:e,m:t,v:null,$:null,p:null}),y={},$=(e,t,n,l,o,c)=>{if(n!==l){let r=G(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=v(n),o=v(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const s=w(l);if((r||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&c||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):G(s,a)?a.slice(2):a[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},g=/\s/,v=e=>e?e.split(g):[],j=(e,t,n,l)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.p||m,i=t.p||m;for(l in o)l in i||$(s,l,o[l],void 0,n,t.t);for(l in i)$(s,l,o[l],i[l],n,t.t)},S=(t,l,s)=>{let i,c,r=l.$[s],a=0;if(null!==r.m)i=r.v=o.createTextNode(r.m);else{if(n||(n="svg"===r.g),i=r.v=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",r.g),n&&"foreignObject"===r.g&&(n=!1),j(null,r,n),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),r.$)for(a=0;a<r.$.length;++a)c=S(t,r,a),c&&i.appendChild(c);"svg"===r.g?n=!1:"foreignObject"===i.tagName&&(n=!0)}return i},O=(e,n,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=S(null,l,o),c&&(s[o].v=c,r.insertBefore(c,n)))},C=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.v,I(l),s.remove())},M=(e,t)=>e.g===t.g,k=(e,t)=>{const l=t.v=e.v,s=e.$,o=t.$,i=t.g,c=t.m;null===c?(n="svg"===i||"foreignObject"!==i&&n,"slot"===i||j(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,i=0,c=t.length-1,r=t[0],a=t[c],u=l.length-1,f=l[0],d=l[u];for(;o<=c&&i<=u;)null==r?r=t[++o]:null==a?a=t[--c]:null==f?f=l[++i]:null==d?d=l[--u]:M(r,f)?(k(r,f),r=t[++o],f=l[++i]):M(a,d)?(k(a,d),a=t[--c],d=l[--u]):M(r,d)?(k(r,d),e.insertBefore(r.v,a.v.nextSibling),r=t[++o],d=l[--u]):M(a,f)?(k(a,f),e.insertBefore(a.v,r.v),a=t[--c],f=l[++i]):(s=S(t&&t[i],n,i),f=l[++i],s&&r.v.parentNode.insertBefore(s,r.v));o>c?O(e,null==l[u+1]?null:l[u+1].v,n,l,i,u):i>u&&C(t,o,c)})(l,s,t,o):null!==o?(null!==e.m&&(l.textContent=""),O(l,null,t,o,0,o.length-1)):null!==s&&C(s,0,s.length-1),n&&"svg"===i&&(n=!1)):e.m!==c&&(l.data=c)},I=e=>{e.p&&e.p.ref&&e.p.ref(null),e.$&&e.$.map(I)},N=(e,t,n)=>{const l=(e=>_(e).j)(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},P=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},x=(e,t)=>{if(e.t|=16,!(4&e.t))return P(e,e.O),se((()=>L(e,t)));e.t|=512},L=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>F(n,e,t))),e.u=null),l=F(n,"componentWillLoad")),l=H(l,(()=>F(n,"componentWillRender"))),H(l,(()=>W(e,n,t)))},W=async(e,t,n)=>{const l=e.j,s=l["s-rc"];n&&(e=>{const t=e.C,n=e.j,l=t.t,s=((e,t)=>{let n=h(t),l=X.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=d.get(e=e.head||e);s||d.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);R(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>T(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},R=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.M||b(null,null),i=(e=>e&&e.g===y)(l)?l:p(null,null,l);t=s.tagName,i.g=null,i.t|=4,n.M=i,i.v=o.v=s.shadowRoot||s,e=s["s-sc"],k(o,i)})(n,l)}catch(e){J(e,n.j)}return null},T=e=>{const t=e.j,n=e.i,l=e.O;64&e.t||(e.t|=64,U(t),F(n,"componentDidLoad"),e.k(t),l||A()),e.I(t),e.S&&(e.S(),e.S=void 0),512&e.t&&le((()=>x(e,!1))),e.t&=-517},A=()=>{U(o.documentElement),le((()=>E(s,"appload",{detail:{namespace:"catalyst"}})))},F=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){J(e)}},H=(e,t)=>e&&e.then?e.then(t):t(),U=e=>e.classList.add("hydrated"),q=(e,t,n)=>{if(t.N){e.watchers&&(t.P=e.watchers);const l=Object.entries(t.N),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>_(this).L.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=_(e),o=s.j,i=s.L.get(t),c=s.t,r=s.i;if(n=((e,t)=>null==e||w(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),!(8&c&&void 0!==i||n===i)&&(s.L.set(t,n),r)){if(l.P&&128&c){const e=l.P[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){J(e,o)}}))}2==(18&c)&&x(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=_(this);return n.W.then((()=>n.i[e](...t)))}})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){i.jmp((()=>{const n=t.get(e);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}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},D=(e,t={})=>{const n=[],l=t.exclude||[],c=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),d=o.createElement("style"),m=[];let w,p=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],h:t[1],N:t[2],R:t[3]};s.N=t[2],s.R=t[3],s.P={};const o=s.h,u=class extends HTMLElement{constructor(e){super(e),B(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){w&&(clearTimeout(w),w=null),p?m.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=_(e),n=t.C,l=()=>{};if(1&t.t)a(e,t,n.R);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){P(t,t.O=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.P=s.watchers,q(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){J(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=h(n);if(!X.has(t)){const l=()=>{};((e,t,n)=>{let l=X.get(e);r&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,X.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.O,i=()=>x(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>(()=>{if(0==(1&i.t)){const e=_(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),F(t,"disconnectedCallback")}})()))}componentOnReady(){return _(this).T}};s.A=e[0],l.includes(o)||c.get(o)||(n.push(o),c.define(o,q(u,s,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),p=!1,m.length?m.map((e=>e.connectedCallback())):i.jmp((()=>w=setTimeout(A,30)))},V=new WeakMap,_=e=>V.get(e),z=(e,t)=>V.set(t.i=e,t),B=(e,t)=>{const n={t:0,j:e,C:t,L:new Map};return n.W=new Promise((e=>n.I=e)),n.T=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.R),V.set(e,n)},G=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),K=new Map,Q=e=>{const t=e.h.replace(/-/g,"_"),n=e.A,l=K.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(K.set(n,e),e[t])),J)},X=new Map,Y=[],Z=[],ee=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?le(ne):i.raf(ne))},te=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){J(e)}e.length=0},ne=()=>{te(Y),te(Z),(l=Y.length>0)&&i.raf(ne)},le=e=>c().then(e),se=ee(Z,!0);class oe{constructor(){this.icons=new Map}static getInstance(){return oe.instance||(oe.instance=new oe),oe.instance}getIcon(e,t){return this.icons.get(this.buildName(e,t))}addIcon(e,t,n){this.icons.set(this.buildName(e,n),t),window.dispatchEvent(this.buildEvent("cat-icon-added",{name:e,setName:n}))}addIcons(e,t){Object.entries(e).forEach((([e,n])=>this.icons.set(this.buildName(e,t),n))),window.dispatchEvent(this.buildEvent("cat-icons-added",{names:Object.keys(e),setName:t}))}removeIcon(e,t){this.icons.delete(this.buildName(e,t)),window.dispatchEvent(this.buildEvent("cat-icon-removed",{name:e,setName:t}))}removeIcons(e,t){e.forEach((e=>this.icons.delete(this.buildName(e,t)))),window.dispatchEvent(this.buildEvent("cat-icons-removed",{names:e,setName:t}))}buildName(e,t){return t?t+":name":e}buildEvent(e,t){return new CustomEvent(e,{bubbles:!0,composed:!0,detail:t})}}export{oe as C,y as H,D as b,N as c,p as h,c as p,z as r}
|