@vetorzero/pts-custom-elements 0.0.20 → 0.1.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/cjs/{index-Df852Um2.js → index-BryBJQdA.js} +214 -50
- package/dist/cjs/index.cjs.js +0 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{pts.cjs.js → pts-custom-elements.cjs.js} +4 -4
- package/dist/cjs/pts-remote-picker.cjs.entry.js +14669 -4
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/pts-remote-picker/providers/abstract.js +8 -0
- package/dist/collection/components/pts-remote-picker/providers/pts.js +70 -0
- package/dist/collection/components/pts-remote-picker/providers/tvmaze.js +86 -0
- package/dist/collection/components/pts-remote-picker/pts-remote-picker.css +90 -3
- package/dist/collection/components/pts-remote-picker/pts-remote-picker.js +380 -2
- package/dist/collection/index.js +1 -10
- package/dist/components/index.js +1 -1
- package/dist/components/pts-remote-picker.js +1 -1
- package/dist/esm/{index-DlRnKzBQ.js → index-SqK44lUQ.js} +214 -51
- package/dist/esm/index.js +0 -4
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pts-custom-elements.js +21 -0
- package/dist/esm/pts-remote-picker.entry.js +14668 -3
- package/dist/pts-custom-elements/index.esm.js +0 -0
- package/dist/pts-custom-elements/p-14d77698.entry.js +1 -0
- package/dist/pts-custom-elements/p-SqK44lUQ.js +2 -0
- package/dist/pts-custom-elements/pts-custom-elements.esm.js +1 -0
- package/dist/types/components/pts-remote-picker/providers/abstract.d.ts +30 -0
- package/dist/types/components/pts-remote-picker/providers/pts.d.ts +8 -0
- package/dist/types/components/pts-remote-picker/providers/tvmaze.d.ts +1 -0
- package/dist/types/components/pts-remote-picker/pts-remote-picker.d.ts +33 -0
- package/dist/types/components.d.ts +23 -32
- package/dist/types/index.d.ts +1 -2
- package/package.json +46 -42
- package/dist/cjs/my-component.cjs.entry.js +0 -33
- package/dist/collection/components/my-component/my-component.css +0 -6
- package/dist/collection/components/my-component/my-component.js +0 -95
- package/dist/collection/utils/utils.js +0 -3
- package/dist/components/my-component.d.ts +0 -11
- package/dist/components/my-component.js +0 -1
- package/dist/components/p-uzTLmlCN.js +0 -1
- package/dist/esm/my-component.entry.js +0 -31
- package/dist/esm/pts.js +0 -21
- package/dist/pts/index.esm.js +0 -1
- package/dist/pts/p-391b0294.entry.js +0 -1
- package/dist/pts/p-DlRnKzBQ.js +0 -2
- package/dist/pts/p-d3b2a5c5.entry.js +0 -1
- package/dist/pts/pts.esm.js +0 -1
- package/dist/types/components/my-component/my-component.d.ts +0 -16
- package/dist/types/utils/utils.d.ts +0 -1
- /package/dist/{pts → pts-custom-elements}/p-DQuL1Twl.js +0 -0
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,b as setNonce,c as setPlatformOptions}from"./p-uzTLmlCN.js";function t(s,t,e){return(s||"")+(t?" "+t:"")+(e?" "+e:"")}export{t as format}
|
|
1
|
+
function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},u={i:0,u:"",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)},f=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!f&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),d=!1,h=[],p=[],m=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&u.i?$(y):u.raf(y))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},y=()=>{b(h),b(p),(d=h.length>0)&&u.raf(y)},$=t=>Promise.resolve(void 0).then(t),v=m(p,!0),w=t=>{const e=new URL(t,u.u);return e.origin!==r.location.origin?e.href:e.pathname},j=t=>u.u=t;function O(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(a?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var g,S=new WeakMap,M=t=>"sc-"+t.h,k=t=>"object"==(t=typeof t)||"function"===t,E=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],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&&!k(l))&&(l+=""),s&&i?r[r.length-1].p+=l:r.push(s?C(null,l):l),i=s)};if(c(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=C(t,null);return u.m=e,r.length>0&&(u.$=r),u.v=o,u},C=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,$:null,m:null,v:null}),x={},A=(t,e)=>null==t||k(t)?t:1&e?t+"":t,L=(t,e,n,s,i,c)=>{if(n===s)return;let f=o(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,l=D(n);let o=D(s);e.remove(...l.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!l.includes(t))))}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let o;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(o=t[1])}}return o||(o=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const l=k(s);if((f||l&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const l=null==s?"":s;"list"===e?f=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!f||4&c||i)&&!l&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):o(r,a)?a.slice(2):a[2]+e.slice(3),n||s){const l=e.endsWith(H);e=e.replace(P,""),n&&u.rel(t,e,n,l),s&&u.ael(t,e,s,l)}},_=/\s/,D=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(_):[]),H="Capture",P=RegExp(H+"$"),R=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of U(Object.keys(o)))t in s||L(l,t,o[t],void 0,n,e.i);for(const t of U(Object.keys(s)))L(l,t,o[t],s[t],n,e.i)};function U(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var W=!1,N=(t,e,n)=>{const l=e.$[n];let o,s,i=0;if(null!=l.p)o=l.O=r.document.createTextNode(l.p);else{if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=r.document.createElement(l.j),R(null,l,W),l.$){const e="template"===l.j?o.content:o;for(i=0;i<l.$.length;++i)s=N(t,l,i),s&&e.appendChild(s)}}return o["s-hn"]=g,o},V=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===g&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=N(null,n,o),i&&(l[o].O=i,T(r,i,e)))},q=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;t&&t.remove()}}},z=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),F=(t,e,n=!1)=>{const l=e.O=t.O,o=t.$,s=e.$,i=e.p;null==i?(R(t,e,W),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=l.length-1,m=l[0],b=l[p];const y="template"===n.j?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=l[++c];else if(null==b)b=l[--p];else if(z(d,m,o))F(d,m,o),d=e[++r],m=l[++c];else if(z(h,b,o))F(h,b,o),h=e[--a],b=l[--p];else if(z(d,b,o))F(d,b,o),T(y,d.O,h.O.nextSibling),d=e[++r],b=l[--p];else if(z(h,m,o))F(h,m,o),T(y,h.O,d.O),h=e[--a],m=l[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].v&&e[f].v===m.v){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=N(e&&e[c],n,u):(F(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=N(e&&e[c],n,c),m=l[++c]),s&&T(d.O.parentNode,s,d.O)}r>a?V(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&q(e,r,a)})(l,o,e,s,n):null!==s?(null!==t.p&&(l.textContent=""),V(l,null,e,s,0,s.length-1)):!n&&null!==o&&q(o,0,o.length-1)):t.p!==i&&(l.data=i)},T=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),Y=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.S||C(null,null),s=(t=>t&&t.j===x)(e)?e:E(null,null,e);if(g=l.tagName,n&&s.m)for(const t of Object.keys(s.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=l[t]);s.j=null,s.i|=4,t.S=s,s.O=o.O=l.shadowRoot||l,F(o,s,n)},Z=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.M=()=>{e["s-p"].splice(n-1,1),l()})))}},B=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);Z(t,t.k);const n=()=>G(t,e);if(!e)return v(n);queueMicrotask((()=>{n()}))},G=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=et(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=I(o,(()=>et(l,"componentWillRender",void 0,n))),I(o,(()=>K(t,l,e)))},I=(t,e)=>J(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),J=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,K=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const s=M(e),c=i.get(s);if(!r.document)return s;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let o,i=S.get(t=t.head||t);if(i||S.set(t,i=new Set),!i.has(s)){o=r.document.createElement("style"),o.textContent=c;const d=null!=(n=u.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(f){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(s)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(c.constructor===n.CSSStyleSheet)l=c;else{l=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)l.insertRule(c.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);Q(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>X(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},Q=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,Y(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},X=t=>{const e=t.$hostElement$,n=e,l=t.k;et(n,"componentDidRender",void 0,e),64&t.i?et(n,"componentDidUpdate",void 0,e):(t.i|=64,nt(e),et(n,"componentDidLoad",void 0,e),t.A(e),l||tt()),t.M&&(t.M(),t.M=void 0),512&t.i&&$((()=>B(t,!1))),t.i&=-517},tt=()=>{$((()=>(t=>{const e=u.ce("appload",{detail:{namespace:"pts-custom-elements"}});return t.dispatchEvent(e),e})(r)))},et=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,l)}},nt=t=>t.classList.add("hydrated"),lt=(t,e,n,o)=>{const i=l(t);if(!i)return;const r=t,c=i.o.get(e),u=i.i,f=r;if(!((n=A(n,o.t[e][0]))===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.o.set(e,n),o.L){const t=o.L[e];t&&t.map((t=>{try{const[[l,o]]=Object.entries(t);(128&u||1&o)&&(f?f[l](n,c,e):i._.push((()=>{i.D[l](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||B(i,!1)}}},ot=(e,n)=>{var o,s;const i=e.prototype;{e.watchers&&!n.L&&(n.L=e.watchers),e.deserializers&&!n.H&&(n.H=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):((t,e)=>l(this).o.get(e))(0,e)},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.call(this,A(t,o)),void lt(this,e,t=32&o?this[e]:s.$hostElement$[e],n);lt(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){u.jmp((()=>{var c;const u=t.get(e),f=l(this);if(this.hasOwnProperty(u),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.i;if(f&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n.L)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(i,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.L)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},st=(t,e)=>{const o={i:e[0],h:e[1]};try{o.t=e[2],o.L=t.L,o.H=t.H,o.P=t.P;const r=t.prototype.connectedCallback,c=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,R:new Map};l.U=new Promise((t=>l.A=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&u.i)){const e=l(t);if(!e)return;const n=e.l,o=()=>{};if(1&e.i)(null==e?void 0:e.D)||(null==e?void 0:e.U)&&e.U.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(e,e.k=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=M(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);f&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.k,s=()=>B(e,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),e.A&&e.A(t)}})(t,e,n)}o()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this),c&&c.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else O.call(this,o)}}),Object.defineProperty(t,"is",{value:o.h,configurable:!0}),ot(t,o)}catch(e){return s(e),t}},it=t=>u.C=t,rt=t=>Object.assign(u,t);function ct(t,e){Y({$hostElement$:e},t)}function ut(t){return t}export{c as H,x as a,w as getAssetPath,E as h,st as p,ct as render,j as setAssetPath,it as setNonce,rt as setPlatformOptions,ut as t}
|