@vetorzero/pts-custom-elements 0.0.19 → 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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},i=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u="undefined"!=typeof window?window:{},a={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),h=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),p=!1,m=[],v=[],y=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&a.u?w($):a.raf($))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},$=()=>{b(m),b(v),(p=m.length>0)&&a.raf($)},w=t=>f().then(t),j=y(v,!0);function g(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(h?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function S(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var O,k=new WeakMap,E=t=>"sc-"+t.p,M=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!M(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?x(null,o):o),s=i)};if(c(n),e){e.key&&(l=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=x(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},x=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),L={},P=(t,e)=>null==t||M(t)?t:1&e?t+"":t,R=t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$},D=(t,e,n,l,s,r)=>{if(n===l)return;let c=i(t,e),f=e.toLowerCase();if("class"===e){const e=t.classList,o=T(n);let i=T(l);e.remove(...o.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=M(l);if((c||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||s)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):i(u,f)?f.slice(2):f[2]+e.slice(3),n||l){const o=e.endsWith(A);e=e.replace(N,""),n&&a.rel(t,e,n,o),l&&a.ael(t,e,l,o)}},H=/\s/,T=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(H):[]),A="Capture",N=RegExp(A+"$"),U=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},i=e.v||{};for(const t of W(Object.keys(l)))t in i||D(o,t,l[t],void 0,n,e.u);for(const t of W(Object.keys(i)))D(o,t,l[t],i[t],n,e.u)};function W(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var z=!1,V=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=u.document.createTextNode(o.m);else{if(!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=u.document.createElement(o.S),U(null,o,z),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=V(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=O,l},q=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===O&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=V(null,n,l),s&&(o[l].O=s,Z(r,s,e)))},F=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},G=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),Y=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?(U(t,e,z),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],v=o[p];const y="template"===n.S?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(G(d,m,l))Y(d,m,l),d=e[++r],m=o[++c];else if(G(h,v,l))Y(h,v,l),h=e[--f],v=o[--p];else if(G(d,v,l))Y(d,v,l),Z(y,d.O,h.O.nextSibling),d=e[++r],v=o[--p];else if(G(h,m,l))Y(h,m,l),Z(y,h.O,d.O),h=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(s=e[u],s.S!==m.S?i=V(e&&e[c],n,u):(Y(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=V(e&&e[c],n,c),m=o[++c]),i&&Z(d.O.parentNode,i,d.O)}r>f?q(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&F(e,r,f)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),q(o,null,e,i,0,i.length-1)):!n&&null!==l&&F(l,0,l.length-1)):t.m!==s&&(o.data=s)},Z=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),_=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.k=()=>{e["s-p"].splice(n-1,1),o()})))}},B=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);_(t,t.M);const n=()=>I(t,e);if(!e)return j(n);queueMicrotask((()=>{n()}))},I=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)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 l;return e?(t.C.length&&t.C.forEach((t=>t(n))),l=nt(o,"componentWillLoad",void 0,n)):l=nt(o,"componentWillUpdate",void 0,n),l=J(l,(()=>nt(o,"componentWillRender",void 0,n))),J(l,(()=>Q(t,o,e)))},J=(t,e)=>K(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),K=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Q=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=E(e),s=c.get(i);if(!u.document)return i;if(t=11===t.nodeType?t:u.document,s)if("string"==typeof s){let l,r=k.get(t=t.head||t);if(r||k.set(t,r=new Set),!r.has(i)){l=u.document.createElement("style"),l.textContent=s;const c=null!=(n=a.L)?n:S(u.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))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(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),h?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}h?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);X(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>tt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},X=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.P||x(null,null),i=(t=>t&&t.S===L)(e)?e:C(null,null,e);if(O=o.tagName,n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.S=null,i.u|=4,t.P=i,i.O=l.O=o.shadowRoot||o,Y(l,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},tt=t=>{const e=t.$hostElement$,n=t.i,o=t.M;nt(n,"componentDidRender",void 0,e),64&t.u?nt(n,"componentDidUpdate",void 0,e):(t.u|=64,ot(e),nt(n,"componentDidLoad",void 0,e),t.R(e),o||et()),t.D(e),t.k&&(t.k(),t.k=void 0),512&t.u&&w((()=>B(t,!1))),t.u&=-517},et=()=>{w((()=>(t=>{const e=a.ce("appload",{detail:{namespace:"pts-custom-elements"}});return t.dispatchEvent(e),e})(u)))},nt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},ot=t=>t.classList.add("hydrated"),lt=(t,e,n,l)=>{const i=o(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(e),u=i.u,a=i.i;if(n=P(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),l.H){const t=l.H[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(a?a[o](n,c,e):i.C.push((()=>{i.i[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||B(i,!1)}}},it=(e,n,l)=>{var i,s;const r=e.prototype;{e.watchers&&!n.H&&(n.H=e.watchers),e.deserializers&&!n.T&&(n.T=e.deserializers),e.serializers&&!n.A&&(n.A=e.serializers);const c=Object.entries(null!=(i=n.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=o(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,P(t,i)),void lt(this,e,t=32&i?this[e]:s.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return lt(this,e,t,n),void(1&l&&!s.i&&s.C.push((()=>{4096&n.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const o=()=>{const o=s.i[e];!s.l.get(e)&&o&&s.l.set(e,o),s.i[e]=P(t,i),lt(this,e,s.i[e],n)};s.i?o():s.C.push((()=>{o()}))}}}})}else 1&l&&64&i&&Object.defineProperty(r,e,{value(...t){var n;const l=o(this);return null==(n=null==l?void 0:l.N)?void 0:n.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){a.jmp((()=>{var s;const u=t.get(e),a=o(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==a?void 0:a.u;if(a&&t&&!(8&t)&&i!==l){const o=a.i,r=null==(s=n.H)?void 0:s[e];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&t||1&r)&&o[s].call(o,i,l,e)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(r,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.H)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},st=(t,e)=>{nt(t,"connectedCallback",void 0,e)},rt=(t,e)=>{nt(t,"disconnectedCallback",void 0,e||t)},ct=(t,e={})=>{var n;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],i=e.exclude||[],f=u.customElements,h=u.document.head,p=h.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(a,e),a.h=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,u,h;const p={u:e[0],p:e[1],t:e[2],U:e[3]};p.t=e[2],p.H=null!=(n=e[4])?n:{},p.A=null!=(u=e[5])?u:{},p.T=null!=(h=e[6])?h:{};const m=p.p,$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,W:new Map};n.N=new Promise((t=>n.D=t)),n.V=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.C=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,p),1&p.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else g.call(t,p)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?st(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>st(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){_(e,e.M=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 o;try{if(!(32&e.u)){if(e.u|=32,n.q){const l=((t,e)=>{const n=t.p.replace(/-/g,"_"),o=t.q;if(!o)return;const l=r.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(r.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.p}#${e.F}" was not found`);o.isProxied||(n.H=o.watchers,n.A=o.serializers,n.T=o.deserializers,it(o,n,2),o.isProxied=!0);const i=()=>{};e.u|=8;try{new o(e)}catch(e){s(e,t)}e.u&=-9,e.u|=128,i(),st(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=E(n);if(!c.has(e)){const o=()=>{};((t,e,n)=>{let o=c.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,c.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.M,i=()=>B(e,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(n){s(n,t),e.k&&(e.k(),e.k=void 0),e.R&&e.R(t)}})(t,e,n)}l()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const e=o(t);(null==e?void 0:e.i)?rt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>rt(e.i,t)))}k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const e=o(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.P)?void 0:t.O)instanceof Node&&!e.P.O.isConnected&&delete e.P.O}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.V}};p.q=t[0],i.includes(m)||f.get(m)||(l.push(m),f.define(m,it($,p,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(n=a.L)?n:S(u.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,p?p.nextSibling:h.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):a.jmp((()=>y=setTimeout(et,30)))},ut=t=>a.L=t;export{L as H,ct as b,R as g,C as h,f as p,l as r,ut as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,b as a}from"./p-SqK44lUQ.js";export{s as setNonce}from"./p-SqK44lUQ.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,s={};return""!==a&&(s.resourcesUrl=new URL(".",a).href),e(s)})().then((async e=>(await l(),a([["p-14d77698",[[513,"pts-remote-picker",{value:[1025],displayValue:[1025,"display-value"],endpoint:[1],_state:[32],_query:[32],_querying:[32],_expanded:[32],_options:[32],_focusedIndex:[32],setValue:[64],expand:[64],collapse:[64],clear:[64]},null,{value:[{handleSetValue:0}],endpoint:[{handleSetBaseUrl:0}]}]]]],e))));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type Option = {
|
|
2
|
+
value: string;
|
|
3
|
+
caption: string;
|
|
4
|
+
summary?: string | null;
|
|
5
|
+
};
|
|
6
|
+
export type ProviderState = 'idle' | 'waiting' | 'loading';
|
|
7
|
+
export type ProviderQueryResultCallback = (options: Option[] | undefined) => void;
|
|
8
|
+
export type ProviderStateChangeCallback = (state: ProviderState) => void;
|
|
9
|
+
export default abstract class AbstractProvider {
|
|
10
|
+
protected static abortSymbol: symbol;
|
|
11
|
+
endpoint: string;
|
|
12
|
+
readonly debounceMs = 666;
|
|
13
|
+
readonly minChars = 0;
|
|
14
|
+
onQueryResult: ProviderQueryResultCallback | undefined;
|
|
15
|
+
onStateChange: ProviderStateChangeCallback | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Aborta alguma operação em curso.
|
|
18
|
+
*/
|
|
19
|
+
abstract abort(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Lista opções, a partir de uma query de busca.
|
|
22
|
+
*
|
|
23
|
+
* @param q - O valor digitado pelo usuário.
|
|
24
|
+
*/
|
|
25
|
+
abstract query(q: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Busca uma única opção, baseada em seu `value`.
|
|
28
|
+
*/
|
|
29
|
+
abstract resolve(value: string): Promise<undefined | Option>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Option } from './abstract';
|
|
2
|
+
import AbstractProvider from './abstract';
|
|
3
|
+
export default class PTSProvider extends AbstractProvider {
|
|
4
|
+
#private;
|
|
5
|
+
abort: () => void;
|
|
6
|
+
query(q: string): void;
|
|
7
|
+
resolve(value: string): Promise<Option | undefined>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,36 @@
|
|
|
1
1
|
export declare class PtsRemotePicker {
|
|
2
|
+
#private;
|
|
3
|
+
el: HTMLElement;
|
|
4
|
+
internals: ElementInternals;
|
|
5
|
+
value: string;
|
|
6
|
+
displayValue: string;
|
|
7
|
+
endpoint: string;
|
|
8
|
+
private _state;
|
|
9
|
+
private _query;
|
|
10
|
+
private _querying;
|
|
11
|
+
private _expanded;
|
|
12
|
+
private _options;
|
|
13
|
+
private _focusedIndex;
|
|
14
|
+
constructor();
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
disconnectedCallback(): void;
|
|
17
|
+
componentWillLoad(): void;
|
|
18
|
+
formResetCallback(): void;
|
|
2
19
|
render(): any;
|
|
20
|
+
resolveDisplayValue(): Promise<void>;
|
|
21
|
+
handleSetValue(): Promise<void>;
|
|
22
|
+
handleSetBaseUrl(...x: any[]): Promise<void>;
|
|
23
|
+
setValue(value: string, displayValue?: string): Promise<void>;
|
|
24
|
+
expand(): Promise<void>;
|
|
25
|
+
collapse(): Promise<void>;
|
|
26
|
+
clear(): Promise<void>;
|
|
27
|
+
handleKeyDown: (e: KeyboardEvent) => void;
|
|
28
|
+
ensureOptionInView(index: number): void;
|
|
29
|
+
handleQueryInput: (e: Event) => void;
|
|
30
|
+
handleQueryFocus: () => void;
|
|
31
|
+
handleBlur: () => void;
|
|
32
|
+
handleToggle: () => void;
|
|
33
|
+
handleClear: () => void;
|
|
34
|
+
handleWindowFocus: (e: Event) => void;
|
|
35
|
+
handleWindowClick: (e: Event) => void;
|
|
3
36
|
}
|
|
@@ -6,30 +6,26 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
|
-
interface
|
|
9
|
+
interface PtsRemotePicker {
|
|
10
|
+
"clear": () => Promise<void>;
|
|
11
|
+
"collapse": () => Promise<void>;
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
13
|
+
* @default ""
|
|
12
14
|
*/
|
|
13
|
-
"
|
|
15
|
+
"displayValue": string;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
17
|
+
* @default ""
|
|
16
18
|
*/
|
|
17
|
-
"
|
|
19
|
+
"endpoint": string;
|
|
20
|
+
"expand": () => Promise<void>;
|
|
21
|
+
"setValue": (value: string, displayValue?: string) => Promise<void>;
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* @default ""
|
|
20
24
|
*/
|
|
21
|
-
"
|
|
22
|
-
}
|
|
23
|
-
interface PtsRemotePicker {
|
|
25
|
+
"value": string;
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
declare global {
|
|
27
|
-
interface HTMLMyComponentElement extends Components.MyComponent, HTMLStencilElement {
|
|
28
|
-
}
|
|
29
|
-
var HTMLMyComponentElement: {
|
|
30
|
-
prototype: HTMLMyComponentElement;
|
|
31
|
-
new (): HTMLMyComponentElement;
|
|
32
|
-
};
|
|
33
29
|
interface HTMLPtsRemotePickerElement extends Components.PtsRemotePicker, HTMLStencilElement {
|
|
34
30
|
}
|
|
35
31
|
var HTMLPtsRemotePickerElement: {
|
|
@@ -37,44 +33,39 @@ declare global {
|
|
|
37
33
|
new (): HTMLPtsRemotePickerElement;
|
|
38
34
|
};
|
|
39
35
|
interface HTMLElementTagNameMap {
|
|
40
|
-
"my-component": HTMLMyComponentElement;
|
|
41
36
|
"pts-remote-picker": HTMLPtsRemotePickerElement;
|
|
42
37
|
}
|
|
43
38
|
}
|
|
44
39
|
declare namespace LocalJSX {
|
|
45
|
-
interface
|
|
40
|
+
interface PtsRemotePicker {
|
|
46
41
|
/**
|
|
47
|
-
*
|
|
42
|
+
* @default ""
|
|
48
43
|
*/
|
|
49
|
-
"
|
|
44
|
+
"displayValue"?: string;
|
|
50
45
|
/**
|
|
51
|
-
*
|
|
46
|
+
* @default ""
|
|
52
47
|
*/
|
|
53
|
-
"
|
|
48
|
+
"endpoint"?: string;
|
|
54
49
|
/**
|
|
55
|
-
*
|
|
50
|
+
* @default ""
|
|
56
51
|
*/
|
|
57
|
-
"
|
|
58
|
-
}
|
|
59
|
-
interface PtsRemotePicker {
|
|
52
|
+
"value"?: string;
|
|
60
53
|
}
|
|
61
54
|
|
|
62
|
-
interface
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
55
|
+
interface PtsRemotePickerAttributes {
|
|
56
|
+
"value": string;
|
|
57
|
+
"displayValue": string;
|
|
58
|
+
"endpoint": string;
|
|
66
59
|
}
|
|
67
60
|
|
|
68
61
|
interface IntrinsicElements {
|
|
69
|
-
"
|
|
70
|
-
"pts-remote-picker": PtsRemotePicker;
|
|
62
|
+
"pts-remote-picker": Omit<PtsRemotePicker, keyof PtsRemotePickerAttributes> & { [K in keyof PtsRemotePicker & keyof PtsRemotePickerAttributes]?: PtsRemotePicker[K] } & { [K in keyof PtsRemotePicker & keyof PtsRemotePickerAttributes as `attr:${K}`]?: PtsRemotePickerAttributes[K] } & { [K in keyof PtsRemotePicker & keyof PtsRemotePickerAttributes as `prop:${K}`]?: PtsRemotePicker[K] };
|
|
71
63
|
}
|
|
72
64
|
}
|
|
73
65
|
export { LocalJSX as JSX };
|
|
74
66
|
declare module "@stencil/core" {
|
|
75
67
|
export namespace JSX {
|
|
76
68
|
interface IntrinsicElements {
|
|
77
|
-
"my-component": LocalJSX.IntrinsicElements["my-component"] & JSXBase.HTMLAttributes<HTMLMyComponentElement>;
|
|
78
69
|
"pts-remote-picker": LocalJSX.IntrinsicElements["pts-remote-picker"] & JSXBase.HTMLAttributes<HTMLPtsRemotePickerElement>;
|
|
79
70
|
}
|
|
80
71
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,5 +7,4 @@
|
|
|
7
7
|
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
8
8
|
* to consume components of this package as outlined in the `README.md`.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
11
|
-
export type * from './components.d.ts';
|
|
10
|
+
export type * from "./components.d.ts";
|
package/package.json
CHANGED
|
@@ -1,46 +1,50 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
"name": "@vetorzero/pts-custom-elements",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Stencil Component Starter",
|
|
6
|
+
"main": "dist/index.cjs.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
10
|
+
"collection:main": "dist/collection/index.js",
|
|
11
|
+
"unpkg": "dist/pts-custom-elements/pts-custom-elements.esm.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/pts-custom-elements/pts-custom-elements.esm.js",
|
|
15
|
+
"require": "./dist/pts-custom-elements/pts-custom-elements.cjs.js"
|
|
16
|
+
},
|
|
17
|
+
"./loader": {
|
|
18
|
+
"import": "./loader/index.js",
|
|
19
|
+
"require": "./loader/index.cjs",
|
|
20
|
+
"types": "./loader/index.d.ts"
|
|
21
|
+
}
|
|
15
22
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/vetorzero/pts-custom-elements.git"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/",
|
|
29
|
+
"loader/"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "stencil build",
|
|
33
|
+
"start": "stencil build --dev --watch --serve",
|
|
34
|
+
"test": "stencil test --spec --e2e",
|
|
35
|
+
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
36
|
+
"generate": "stencil generate"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@stencil/core": "^4.27.1",
|
|
40
|
+
"@types/jest": "^29.5.14",
|
|
41
|
+
"@types/node": "^22.13.5",
|
|
42
|
+
"jest": "^29.7.0",
|
|
43
|
+
"jest-cli": "^29.7.0",
|
|
44
|
+
"puppeteer": "^24.3.0"
|
|
45
|
+
},
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"zod": "^4.3.6"
|
|
20
49
|
}
|
|
21
|
-
},
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "https://github.com/vetorzero/pts-custom-elements"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"dist/",
|
|
28
|
-
"loader/"
|
|
29
|
-
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "stencil build",
|
|
32
|
-
"start": "stencil build --dev --watch --serve",
|
|
33
|
-
"test": "stencil test --spec --e2e",
|
|
34
|
-
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
35
|
-
"generate": "stencil generate"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@stencil/core": "^4.27.1",
|
|
39
|
-
"@types/jest": "^29.5.14",
|
|
40
|
-
"@types/node": "^22.13.5",
|
|
41
|
-
"jest": "^29.7.0",
|
|
42
|
-
"jest-cli": "^29.7.0",
|
|
43
|
-
"puppeteer": "^24.3.0"
|
|
44
|
-
},
|
|
45
|
-
"license": "MIT"
|
|
46
50
|
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-Df852Um2.js');
|
|
4
|
-
var index$1 = require('./index.cjs.js');
|
|
5
|
-
|
|
6
|
-
const myComponentCss = () => `:host{display:inline-block;border:2px solid tomato;border-radius:100vh;padding:.5rem}`;
|
|
7
|
-
|
|
8
|
-
const MyComponent = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
index.registerInstance(this, hostRef);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The first name
|
|
14
|
-
*/
|
|
15
|
-
first;
|
|
16
|
-
/**
|
|
17
|
-
* The middle name
|
|
18
|
-
*/
|
|
19
|
-
middle;
|
|
20
|
-
/**
|
|
21
|
-
* The last name
|
|
22
|
-
*/
|
|
23
|
-
last;
|
|
24
|
-
getText() {
|
|
25
|
-
return index$1.format(this.first, this.middle, this.last);
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return index.h("div", { key: '70654fc83039b5f659efe99cc990e9b86d20dbe0' }, "Hello, World! I'm ", this.getText());
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
MyComponent.style = myComponentCss();
|
|
32
|
-
|
|
33
|
-
exports.my_component = MyComponent;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { format } from "../../utils/utils";
|
|
3
|
-
export class MyComponent {
|
|
4
|
-
/**
|
|
5
|
-
* The first name
|
|
6
|
-
*/
|
|
7
|
-
first;
|
|
8
|
-
/**
|
|
9
|
-
* The middle name
|
|
10
|
-
*/
|
|
11
|
-
middle;
|
|
12
|
-
/**
|
|
13
|
-
* The last name
|
|
14
|
-
*/
|
|
15
|
-
last;
|
|
16
|
-
getText() {
|
|
17
|
-
return format(this.first, this.middle, this.last);
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return h("div", { key: '70654fc83039b5f659efe99cc990e9b86d20dbe0' }, "Hello, World! I'm ", this.getText());
|
|
21
|
-
}
|
|
22
|
-
static get is() { return "my-component"; }
|
|
23
|
-
static get encapsulation() { return "shadow"; }
|
|
24
|
-
static get originalStyleUrls() {
|
|
25
|
-
return {
|
|
26
|
-
"$": ["my-component.css"]
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
static get styleUrls() {
|
|
30
|
-
return {
|
|
31
|
-
"$": ["my-component.css"]
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
static get properties() {
|
|
35
|
-
return {
|
|
36
|
-
"first": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"mutable": false,
|
|
39
|
-
"complexType": {
|
|
40
|
-
"original": "string",
|
|
41
|
-
"resolved": "string",
|
|
42
|
-
"references": {}
|
|
43
|
-
},
|
|
44
|
-
"required": false,
|
|
45
|
-
"optional": false,
|
|
46
|
-
"docs": {
|
|
47
|
-
"tags": [],
|
|
48
|
-
"text": "The first name"
|
|
49
|
-
},
|
|
50
|
-
"getter": false,
|
|
51
|
-
"setter": false,
|
|
52
|
-
"reflect": false,
|
|
53
|
-
"attribute": "first"
|
|
54
|
-
},
|
|
55
|
-
"middle": {
|
|
56
|
-
"type": "string",
|
|
57
|
-
"mutable": false,
|
|
58
|
-
"complexType": {
|
|
59
|
-
"original": "string",
|
|
60
|
-
"resolved": "string",
|
|
61
|
-
"references": {}
|
|
62
|
-
},
|
|
63
|
-
"required": false,
|
|
64
|
-
"optional": false,
|
|
65
|
-
"docs": {
|
|
66
|
-
"tags": [],
|
|
67
|
-
"text": "The middle name"
|
|
68
|
-
},
|
|
69
|
-
"getter": false,
|
|
70
|
-
"setter": false,
|
|
71
|
-
"reflect": false,
|
|
72
|
-
"attribute": "middle"
|
|
73
|
-
},
|
|
74
|
-
"last": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"mutable": false,
|
|
77
|
-
"complexType": {
|
|
78
|
-
"original": "string",
|
|
79
|
-
"resolved": "string",
|
|
80
|
-
"references": {}
|
|
81
|
-
},
|
|
82
|
-
"required": false,
|
|
83
|
-
"optional": false,
|
|
84
|
-
"docs": {
|
|
85
|
-
"tags": [],
|
|
86
|
-
"text": "The last name"
|
|
87
|
-
},
|
|
88
|
-
"getter": false,
|
|
89
|
-
"setter": false,
|
|
90
|
-
"reflect": false,
|
|
91
|
-
"attribute": "last"
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface MyComponent extends Components.MyComponent, HTMLElement {}
|
|
4
|
-
export const MyComponent: {
|
|
5
|
-
prototype: MyComponent;
|
|
6
|
-
new (): MyComponent;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,p as e,H as s,h as o}from"./p-uzTLmlCN.js";import{format as n}from"./index.js";const r=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}first;middle;last;getText(){return n(this.first,this.middle,this.last)}render(){return o("div",{key:"70654fc83039b5f659efe99cc990e9b86d20dbe0"},"Hello, World! I'm ",this.getText())}static get style(){return":host{display:inline-block;border:2px solid tomato;border-radius:100vh;padding:.5rem}"}},[513,"my-component",{first:[1],middle:[1],last:[1]}]);function i(){"undefined"!=typeof customElements&&["my-component"].forEach((e=>{"my-component"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))}i();const m=r,d=i;export{m as MyComponent,d as defineCustomElement}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.l.t)?n:{}).map((([n,[l]])=>{if(31&l||32&l){const l=t[n],o=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);o&&Object.defineProperty(t,n,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):l}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>(0,console.error)(t,e),o=new Map,s="undefined"!=typeof window?window:{},i=s.HTMLElement||class{},r={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)},c=(()=>{try{return!!s.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),u=!!c&&(()=>!!s.document&&Object.getOwnPropertyDescriptor(s.document.adoptedStyleSheets,"length").writable)(),a=!1,f=[],d=[],h=(t,e)=>n=>{t.push(n),a||(a=!0,e&&4&r.i?$(m):r.raf(m))},p=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},m=()=>{p(f),p(d),(a=f.length>0)&&r.raf(m)},$=t=>Promise.resolve(undefined).then(t),b=h(d,!0),v=t=>{const e=new URL(t,r.u);return e.origin!==s.location.origin?e.href:e.pathname},y=t=>r.u=t;function w(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(u?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}var g,j=new WeakMap,O=t=>"sc-"+t.h,S=t=>"object"==(t=typeof t)||"function"===t,M=(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&&!S(l))&&(l=String(l)),s&&i?r[r.length-1].p+=l:r.push(s?k(null,l):l),i=s)};c(n),e&&e.key&&(o=e.key);const u=k(t,null);return u.m=e,r.length>0&&(u.$=r),u.v=o,u},k=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,$:null,m:null,v:null}),E={},A=(t,e)=>null==t||S(t)?t:1&e?String(t):t,C=(t,e,n,l)=>{n!==l&&e.toLowerCase()},_=(t,e)=>{const n=t&&t.m||{},l=e.m||{};for(const t of x(Object.keys(n)))t in l||C(0,t,n[t],void 0);for(const t of x(Object.keys(l)))C(0,t,n[t],l[t])};function x(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var D=!1,P=(t,e,n)=>{const l=e.$[n];let o,i,r=0;if(null!=l.p)o=l.O=s.document.createTextNode(l.p);else{if(!s.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=s.document.createElement(l.j),_(null,l),l.$){const e="template"===l.j?o.content:o;for(r=0;r<l.$.length;++r)i=P(t,l,r),i&&e.appendChild(i)}}return o["s-hn"]=g,o},U=(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=P(null,n,o),i&&(l[o].O=i,W(r,i,e)))},L=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;t&&t.remove()}}},N=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),R=(t,e,n=!1)=>{const l=e.O=t.O,o=t.$,s=e.$,i=e.p;null==i?("slot"!==e.j||D||t.S!==e.S&&(e.O["s-sn"]=e.S||"",(t=>{r.i|=1;const e=t.closest(g.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of n?l.reverse():l)null!=t["s-sh"]&&(W(e,t,null!=n?n:null),t["s-sh"]=void 0)}r.i&=-2})(e.O.parentElement)),_(t,e),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=l.length-1,m=l[0],$=l[p];const b="template"===n.j?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=l[++c];else if(null==$)$=l[--p];else if(N(d,m,o))R(d,m,o),d=e[++r],m=l[++c];else if(N(h,$,o))R(h,$,o),h=e[--f],$=l[--p];else if(N(d,$,o))R(d,$,o),W(b,d.O,h.O.nextSibling),d=e[++r],$=l[--p];else if(N(h,m,o))R(h,m,o),W(b,h.O,d.O),h=e[--f],m=l[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].v&&e[a].v===m.v){u=a;break}u>=0?(i=e[u],i.j!==m.j?s=P(e&&e[c],n,u):(R(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=P(e&&e[c],n,c),m=l[++c]),s&&W(d.O.parentNode,s,d.O)}r>f?U(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&L(e,r,f)})(l,o,e,s,n):null!==s?(null!==t.p&&(l.textContent=""),U(l,null,e,s,0,s.length-1)):!n&&null!==o&&L(o,0,o.length-1)):t.p!==i&&(l.data=i)},W=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),H=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.l,s=t.M||k(null,null);var i;const r=(i=e)&&i.j===E?e:M(null,null,e);if(g=l.tagName,n&&r.m)for(const t of Object.keys(r.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=l[t]);r.j=null,r.i|=4,t.M=r,r.O=s.O=l.shadowRoot||l,D=!(!(1&o.i)||128&o.i),R(s,r,n)},q=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},F=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);q(t,t.A);const n=()=>V(t,e);if(!e)return b(n);queueMicrotask((()=>{n()}))},V=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw new 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=K(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=z(o,(()=>K(l,"componentWillRender",void 0,n))),z(o,(()=>B(t,l,e)))},z=(t,e)=>Y(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Y=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,B=async(t,e,n)=>{var l;const i=t.$hostElement$,a=i["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,i=((t,e)=>{var n,l,i;const a=O(e),f=o.get(a);if(!s.document)return a;if(t=11===t.nodeType?t:s.document,f)if("string"==typeof f){let o,i=j.get(t=t.head||t);if(i||j.set(t,i=new Set),!i.has(a)){o=s.document.createElement("style"),o.textContent=f;const d=null!=(n=r.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=s.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(c){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(f),u?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=f+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(a)}}else{let e=j.get(t);if(e||j.set(t,e=new Set),!e.has(a)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let l;if(f.constructor===n.CSSStyleSheet)l=f;else{l=new n.CSSStyleSheet;for(let t=0;t<f.cssRules.length;t++)l.insertRule(f.cssRules[t].cssText,t)}u?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(a)}}return a})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);G(t,e,i,n),a&&(a.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(l=i["s-p"])?l:[],n=()=>I(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},G=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,H(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},I=t=>{const e=t.$hostElement$,n=e,l=t.A;K(n,"componentDidRender",void 0,e),64&t.i?K(n,"componentDidUpdate",void 0,e):(t.i|=64,Q(e),K(n,"componentDidLoad",void 0,e),t._(e),l||J()),t.k&&(t.k(),t.k=void 0),512&t.i&&$((()=>F(t,!1))),t.i&=-517},J=()=>{$((()=>(t=>{const e=r.ce("appload",{detail:{namespace:"pts"}});return t.dispatchEvent(e),e})(s)))},K=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},Q=t=>t.classList.add("hydrated"),T=(t,e,l,o)=>{const s=n(t);if(!s)return;const i=t,r=s.o.get(e),c=s.i,u=i;l=A(l,o.t[e][0]);const a=Number.isNaN(r)&&Number.isNaN(l);if(l!==r&&!a&&(s.o.set(e,l),2&c)){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(l,r,e)&&!(16&c))return;16&c||F(s,!1)}},X=(t,e)=>{var l,o;const s=t.prototype;if(e.t){const i=Object.entries(null!=(l=e.t)?l:{});i.map((([t,[l]])=>{if(31&l||32&l){const{get:o,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};o&&(e.t[t][0]|=2048),i&&(e.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return o?o.apply(this):(e=t,n(this).o.get(e));var e},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(o){const s=n(this);if(s){if(i)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.o.get(t)&&(o=s.o.get(t)),i.apply(this,[A(o,l)]),void T(this,t,o=32&l?this[t]:s.$hostElement$[t],e);T(this,t,o,e)}}})}}));{const l=new Map;s.attributeChangedCallback=function(t,o,c){r.jmp((()=>{var r;const u=l.get(t),a=n(this);if(this.hasOwnProperty(u),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==c)return;if(null==u){const n=null==a?void 0:a.i;if(a&&n&&!(8&n)&&c!==o){const l=this,s=null==(r=e.D)?void 0:r[t];null==s||s.forEach((e=>{const[[s,i]]=Object.entries(e);null!=l[s]&&(128&n||1&i)&&l[s].call(l,c,o,t)}))}return}const f=i.find((([t])=>t===u));f&&4&f[1][0]&&(c=null!==c&&"false"!==c);const d=Object.getOwnPropertyDescriptor(s,u);c==this[u]||d.get&&!d.set||(this[u]=c)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=e.D)?o:{}),...i.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return l.set(n,t),n}))]))}}return t},Z=(t,s)=>{const i={i:s[0],h:s[1]};try{i.t=s[2];const u=t.prototype.connectedCallback,a=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const l={i:0,$hostElement$:t,l:n,o:new Map,P:new Map};l.U=new Promise((t=>l._=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&n.i&&e(t,l)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!n(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&r.i)){const e=n(t);if(!e)return;const s=e.l,i=()=>{};if(1&e.i)(null==e?void 0:e.L)||(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"]){q(e,e.A=n);break}}s.t&&Object.entries(s.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;try{if(!(32&e.i)&&(e.i|=32,s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),s&&s.style)){let t;"string"==typeof s.style&&(t=s.style);const e=O(n);if(!o.has(e)){const l=()=>{};((t,e,n)=>{let l=o.get(t);c&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,o.set(t,l)})(e,t,!!(1&n.i)),l()}}const l=e.A,i=()=>F(e,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(n){l(n,t),e.k&&(e.k(),e.k=void 0),e._&&e._(t)}})(t,e,s)}i()}})(this),u&&u.call(this)},disconnectedCallback(){(async t=>{1&r.i||n(t),j.has(t)&&j.delete(t),t.shadowRoot&&j.has(t.shadowRoot)&&j.delete(t.shadowRoot)})(this),a&&a.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${i.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(this,i)}}),Object.defineProperty(t,"is",{value:i.h,configurable:!0}),X(t,i)}catch(e){return l(e),t}},tt=t=>r.C=t,et=t=>Object.assign(r,t);function nt(t,e){H({l:{i:0,h:e.tagName},$hostElement$:e},t)}function lt(t){return t}export{i as H,E as a,tt as b,et as c,v as g,M as h,Z as p,nt as r,y as s,lt as t}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-DlRnKzBQ.js';
|
|
2
|
-
import { format } from './index.js';
|
|
3
|
-
|
|
4
|
-
const myComponentCss = () => `:host{display:inline-block;border:2px solid tomato;border-radius:100vh;padding:.5rem}`;
|
|
5
|
-
|
|
6
|
-
const MyComponent = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The first name
|
|
12
|
-
*/
|
|
13
|
-
first;
|
|
14
|
-
/**
|
|
15
|
-
* The middle name
|
|
16
|
-
*/
|
|
17
|
-
middle;
|
|
18
|
-
/**
|
|
19
|
-
* The last name
|
|
20
|
-
*/
|
|
21
|
-
last;
|
|
22
|
-
getText() {
|
|
23
|
-
return format(this.first, this.middle, this.last);
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
return h("div", { key: '70654fc83039b5f659efe99cc990e9b86d20dbe0' }, "Hello, World! I'm ", this.getText());
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
MyComponent.style = myComponentCss();
|
|
30
|
-
|
|
31
|
-
export { MyComponent as my_component };
|
package/dist/esm/pts.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-DlRnKzBQ.js';
|
|
2
|
-
export { s as setNonce } from './index-DlRnKzBQ.js';
|
|
3
|
-
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
Stencil Client Patch Browser v4.43.1 | MIT Licensed | https://stenciljs.com
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
var patchBrowser = () => {
|
|
10
|
-
const importMeta = import.meta.url;
|
|
11
|
-
const opts = {};
|
|
12
|
-
if (importMeta !== "") {
|
|
13
|
-
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
14
|
-
}
|
|
15
|
-
return promiseResolve(opts);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
patchBrowser().then(async (options) => {
|
|
19
|
-
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["my-component",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pts-remote-picker",[[257,"pts-remote-picker"]]]], options);
|
|
21
|
-
});
|
package/dist/pts/index.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function n(n,r,t){return(n||"")+(r?` ${r}`:"")+(t?` ${t}`:"")}export{n as format}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as r,H as a}from"./p-DlRnKzBQ.js";const s=class{constructor(r){e(this,r)}render(){return r(a,{key:"7562a6d662c271aca673dac296ece21afe251c65"},"before",r("slot",{key:"61e6025bfb14cbf10e1bb5aaed2e66a488cf2f9e"}),"after")}};s.style=":host{display:inline-block;border:4px solid green;padding:.35rem}";export{s as pts_remote_picker}
|
package/dist/pts/p-DlRnKzBQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);l&&Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&e(t,n))},l=(t,e)=>(0,console.error)(t,e),i=new Map,s=new Map,r="undefined"!=typeof window?window:{},c={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},u=t=>Promise.resolve(t),a=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!a&&(()=>!!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&c.u?b(y):c.raf(y))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},y=()=>{v(h),v(p),(d=h.length>0)&&c.raf(y)},b=t=>u().then(t),$=m(p,!0);function w(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(f?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var g,S=new WeakMap,O=t=>"sc-"+t.p,k=t=>"object"==(t=typeof t)||"function"===t,M=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!k(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?C(null,o):o),s=i)};c(n),e&&e.key&&(l=e.key);const u=C(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},C=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),E={},x=(t,e)=>null==t||k(t)?t:1&e?t+"":t,A=(t,e,n,o)=>{n!==o&&e.toLowerCase()},D=(t,e)=>{const n=t&&t.v||{},o=e.v||{};for(const t of P(Object.keys(n)))t in o||A(0,t,n[t],void 0);for(const t of P(Object.keys(o)))A(0,t,n[t],o[t])};function P(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var R=!1,L=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=r.document.createTextNode(o.m);else{if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=r.document.createElement(o.S),D(null,o),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=L(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=g,l},N=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===g&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=L(null,n,l),s&&(o[l].O=s,W(r,s,e)))},U=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},H=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),T=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?("slot"!==e.S||R||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{c.u|=1;const e=t.closest(g.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(W(e,t,null!=n?n:null),t["s-sh"]=void 0)}c.u&=-2})(e.O.parentElement)),D(t,e),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],v=o[p];const y="template"===n.S?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(H(d,m,l))T(d,m,l),d=e[++r],m=o[++c];else if(H(h,v,l))T(h,v,l),h=e[--f],v=o[--p];else if(H(d,v,l))T(d,v,l),W(y,d.O,h.O.nextSibling),d=e[++r],v=o[--p];else if(H(h,m,l))T(h,m,l),W(y,h.O,d.O),h=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(s=e[u],s.S!==m.S?i=L(e&&e[c],n,u):(T(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=L(e&&e[c],n,c),m=o[++c]),i&&W(d.O.parentNode,i,d.O)}r>f?N(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&U(e,r,f)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),N(o,null,e,i,0,i.length-1)):!n&&null!==l&&U(l,0,l.length-1)):t.m!==s&&(o.data=s)},W=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),q=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},z=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);q(t,t.C);const n=()=>F(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},F=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)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 l;return e?(t.A.length&&t.A.forEach((t=>t(n))),l=J(o,"componentWillLoad",void 0,n)):l=J(o,"componentWillUpdate",void 0,n),l=V(l,(()=>J(o,"componentWillRender",void 0,n))),V(l,(()=>Y(t,o,e)))},V=(t,e)=>G(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),G=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Y=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=O(e),u=s.get(i);if(!r.document)return i;if(t=11===t.nodeType?t:r.document,u)if("string"==typeof u){let l,s=S.get(t=t.head||t);if(s||S.set(t,s=new Set),!s.has(i)){l=r.document.createElement("style"),l.textContent=u;const d=null!=(n=c.D)?n:j(r.document);if(null!=d&&l.setAttribute("nonce",d),!(1&e.u))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(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(u),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=u+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(i)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(u.constructor===n.CSSStyleSheet)o=u;else{o=new n.CSSStyleSheet;for(let t=0;t<u.cssRules.length;t++)o.insertRule(u.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);_(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>B(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},_=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.P||C(null,null),s=(t=>t&&t.S===E)(e)?e:M(null,null,e);if(g=o.tagName,n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.S=null,s.u|=4,t.P=s,s.O=i.O=o.shadowRoot||o,R=!(!(1&l.u)||128&l.u),T(i,s,n)})(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},B=t=>{const e=t.$hostElement$,n=t.i,o=t.C;J(n,"componentDidRender",void 0,e),64&t.u?J(n,"componentDidUpdate",void 0,e):(t.u|=64,K(e),J(n,"componentDidLoad",void 0,e),t.R(e),o||I()),t.M&&(t.M(),t.M=void 0),512&t.u&&b((()=>z(t,!1))),t.u&=-517},I=()=>{b((()=>(t=>{const e=c.ce("appload",{detail:{namespace:"pts"}});return t.dispatchEvent(e),e})(r)))},J=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},K=t=>t.classList.add("hydrated"),Q=(t,e,o,l)=>{const i=n(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=i.l.get(e),r=i.u,c=i.i;if(o=x(o,l.t[e][0]),(!(8&r)||void 0===s)&&o!==s&&(!Number.isNaN(s)||!Number.isNaN(o))&&(i.l.set(e,o),2&r)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(o,s,e)&&!(16&r))return;16&r||z(i,!1)}},X=(t,e,o)=>{var l,i;const s=t.prototype;if(e.t){const r=Object.entries(null!=(l=e.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:i,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};i&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&o||!i)&&Object.defineProperty(s,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>n(this).l.get(e))(0,t);const o=n(this),l=o?o.i:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(i){const s=n(this);if(s){if(r)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(i=s.l.get(t)),r.call(this,x(i,l)),void Q(this,t,i=32&l?this[t]:s.$hostElement$[t],e);{if(!(1&o&&4096&e.t[t][0]))return Q(this,t,i,e),void(1&o&&!s.i&&s.A.push((()=>{4096&e.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=i)})));const n=()=>{const n=s.i[t];!s.l.get(t)&&n&&s.l.set(t,n),s.i[t]=x(i,l),Q(this,t,s.i[t],e)};s.i?n():s.A.push((()=>{n()}))}}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(t,l,i){c.jmp((()=>{var c;const u=o.get(t),a=n(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const n=null==a?void 0:a.u;if(a&&n&&!(8&n)&&i!==l){const o=a.i,s=null==(c=e.L)?void 0:c[t];null==s||s.forEach((e=>{const[[s,r]]=Object.entries(e);null!=o[s]&&(128&n||1&r)&&o[s].call(o,i,l,t)}))}return}const f=r.find((([t])=>t===u));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(s,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.L)?i:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},Z=(t,e)=>{J(t,"connectedCallback",void 0,e)},tt=(t,e)=>{J(t,"disconnectedCallback",void 0,e||t)},et=(t,e={})=>{var o;if(!r.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const u=[],f=e.exclude||[],d=r.customElements,h=r.document.head,p=h.querySelector("meta[charset]"),m=r.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(c,e),c.h=new URL(e.resourcesUrl||"./",r.document.baseURI).href,t.map((t=>{t[1].map((e=>{const o={u:e[0],p:e[1],t:e[2],N:e[3]};o.t=e[2];const r=o.p,h=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,U:new Map};n.H=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,o),1&o.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(t,o)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):c.jmp((()=>(t=>{if(!(1&c.u)){const e=n(t);if(!e)return;const o=e.o,r=()=>{};if(1&e.u)(null==e?void 0:e.i)?Z(e.i,t):(null==e?void 0:e.H)&&e.H.then((()=>Z(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){q(e,e.C=n);break}}o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.T){const s=((t,e)=>{const n=t.p.replace(/-/g,"_"),o=t.T;if(!o)return;const s=i.get(o);return s?s[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};o=await s,t()}else o=s;if(!o)throw Error(`Constructor for "${n.p}#${e.W}" was not found`);o.isProxied||(X(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){l(e,t)}e.u&=-9,r(),Z(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=O(n);if(!s.has(e)){const o=()=>{};((t,e,n)=>{let o=s.get(t);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,s.set(t,o)})(e,t,!!(1&n.u)),o()}}}const r=e.C,c=()=>z(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()}catch(n){l(n,t),e.M&&(e.M(),e.M=void 0),e.R&&e.R(t)}})(t,e,o)}r()}})(this))))}disconnectedCallback(){c.jmp((()=>(async t=>{if(!(1&c.u)){const e=n(t);(null==e?void 0:e.i)?tt(e.i,t):(null==e?void 0:e.H)&&e.H.then((()=>tt(e.i,t)))}S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this))),c.raf((()=>{var t;const e=n(this);if(!e)return;const o=v.findIndex((t=>t===this));o>-1&&v.splice(o,1),(null==(t=null==e?void 0:e.P)?void 0:t.O)instanceof Node&&!e.P.O.isConnected&&delete e.P.O}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.H}};o.T=t[0],f.includes(r)||d.get(r)||(u.push(r),d.define(r,X(h,o,1)))}))})),u.length>0&&(m.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=c.D)?o:j(r.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,p?p.nextSibling:h.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):c.jmp((()=>y=setTimeout(I,30)))},nt=t=>c.D=t;export{E as H,et as b,M as h,u as p,o as r,nt as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as e}from"./p-DlRnKzBQ.js";import{format as t}from"./index.esm.js";const s=class{constructor(e){r(this,e)}first;middle;last;getText(){return t(this.first,this.middle,this.last)}render(){return e("div",{key:"70654fc83039b5f659efe99cc990e9b86d20dbe0"},"Hello, World! I'm ",this.getText())}};s.style=":host{display:inline-block;border:2px solid tomato;border-radius:100vh;padding:.5rem}";export{s as my_component}
|
package/dist/pts/pts.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,b as p}from"./p-DlRnKzBQ.js";export{s as setNonce}from"./p-DlRnKzBQ.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const s=import.meta.url,p={};return""!==s&&(p.resourcesUrl=new URL(".",s).href),t(p)})().then((async s=>(await o(),p([["p-d3b2a5c5",[[513,"my-component",{first:[1],middle:[1],last:[1]}]]],["p-391b0294",[[257,"pts-remote-picker"]]]],s))));
|