proto-float-wc 0.1.0 → 0.1.84
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/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/index-B_zXFQfG.js +1383 -0
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/proto-float-wc.cjs.js +15 -13
- package/dist/cjs/proto-floater-demo.cjs.entry.js +1586 -0
- package/dist/collection/collection-manifest.json +3 -4
- package/dist/collection/components/proto-floater-demo/proto-floater-demo.css +27 -24
- package/dist/collection/components/proto-floater-demo/proto-floater-demo.js +134 -11
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/proto-floater-demo.js +1 -53
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/index-DN_GSREz.js +1377 -0
- package/dist/esm/loader.js +6 -4
- package/dist/esm/proto-float-wc.js +15 -12
- package/dist/esm/proto-floater-demo.entry.js +1584 -0
- package/dist/proto-float-wc/p-44c23264.entry.js +1 -0
- package/dist/proto-float-wc/p-DN_GSREz.js +2 -0
- package/dist/proto-float-wc/p-DQuL1Twl.js +1 -0
- package/dist/proto-float-wc/proto-float-wc.esm.js +1 -1
- package/dist/types/components/proto-floater-demo/proto-floater-demo.d.ts +20 -2
- package/dist/types/components.d.ts +21 -20
- package/dist/types/stencil-public-runtime.d.ts +199 -18
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +3 -0
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/package.json +24 -19
- package/dist/cjs/index-95c398a6.js +0 -1762
- package/dist/cjs/proto-floater-demo_2.cjs.entry.js +0 -146
- package/dist/collection/components/proto-floater-demo/proto-360.js +0 -10
- package/dist/collection/components/proto-player/proto-player.css +0 -60
- package/dist/collection/components/proto-player/proto-player.js +0 -166
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/types.js +0 -1
- package/dist/components/proto-player.d.ts +0 -11
- package/dist/components/proto-player.js +0 -138
- package/dist/esm/index-6a814d4f.js +0 -1736
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/proto-floater-demo_2.entry.js +0 -141
- package/dist/proto-float-wc/p-5ef8cd91.js +0 -2
- package/dist/proto-float-wc/p-e4a96884.entry.js +0 -1
- package/dist/types/components/proto-floater-demo/proto-360.d.ts +0 -5
- package/dist/types/components/proto-player/proto-player.d.ts +0 -24
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/types.d.ts +0 -8
- package/loader/package.json +0 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e}from"./p-DN_GSREz.js";const n=Math.min,o=Math.max,i=Math.round,r=t=>({x:t,y:t}),s={left:"right",right:"left",bottom:"top",top:"bottom"},a={start:"end",end:"start"};function l(t,e,i){return o(t,n(e,i))}function c(t,e){return"function"==typeof t?t(e):t}function f(t){return t.split("-")[0]}function u(t){return t.split("-")[1]}function d(t){return"x"===t?"y":"x"}function h(t){return"y"===t?"height":"width"}const p=new Set(["top","bottom"]);function m(t){return p.has(f(t))?"y":"x"}function y(t){return d(m(t))}function g(t){return t.replace(/start|end/g,(t=>a[t]))}const w=["left","right"],x=["right","left"],b=["top","bottom"],v=["bottom","top"];function k(t){return t.replace(/left|right|bottom|top/g,(t=>s[t]))}function S(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function A(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function C(t,e,n){let{reference:o,floating:i}=t;const r=m(e),s=y(e),a=h(s),l=f(e),c="y"===r,d=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,g=o[a]/2-i[a]/2;let w;switch(l){case"top":w={x:d,y:o.y-i.height};break;case"bottom":w={x:d,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y:p};break;case"left":w={x:o.x-i.width,y:p};break;default:w={x:o.x,y:o.y}}switch(u(e)){case"start":w[s]-=g*(n&&c?-1:1);break;case"end":w[s]+=g*(n&&c?-1:1)}return w}async function D(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=c(e,t),m=S(p),y=a[h?"floating"===d?"reference":"floating":d],g=A(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(y)))||n?y:y.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:f,rootBoundary:u,strategy:l})),w="floating"===d?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),b=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},v=A(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(g.top-v.top+m.top)/b.y,bottom:(v.bottom-g.bottom+m.bottom)/b.y,left:(g.left-v.left+m.left)/b.x,right:(v.right-g.right+m.right)/b.x}}const R=new Set(["left","top"]);function F(){return"undefined"!=typeof window}function L(t){return T(t)?(t.nodeName||"").toLowerCase():"#document"}function O(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function P(t){var e;return null==(e=(T(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function T(t){return!!F()&&(t instanceof Node||t instanceof O(t).Node)}function E(t){return!!F()&&(t instanceof Element||t instanceof O(t).Element)}function $(t){return!!F()&&(t instanceof HTMLElement||t instanceof O(t).HTMLElement)}function M(t){return!(!F()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof O(t).ShadowRoot)}const j=new Set(["inline","contents"]);function B(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Y(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!j.has(i)}const _=new Set(["table","td","th"]);function z(t){return _.has(L(t))}const N=[":popover-open",":modal"];function H(t){return N.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const q=["transform","translate","scale","rotate","perspective"],I=["transform","translate","scale","rotate","perspective","filter"],G=["paint","layout","strict","content"];function U(t){const e=V(),n=E(t)?Y(t):t;return q.some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||I.some((t=>(n.willChange||"").includes(t)))||G.some((t=>(n.contain||"").includes(t)))}function V(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const W=new Set(["html","body","#document"]);function X(t){return W.has(L(t))}function Y(t){return O(t).getComputedStyle(t)}function J(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if("html"===L(t))return t;const e=t.assignedSlot||t.parentNode||M(t)&&t.host||P(t);return M(e)?e.host:e}function Q(t){const e=K(t);return X(e)?t.ownerDocument?t.ownerDocument.body:t.body:$(e)&&B(e)?e:Q(e)}function Z(t,e){var n;void 0===e&&(e=[]);const o=Q(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=O(o);return i?e.concat(r,r.visualViewport||[],B(o)?o:[],[]):e.concat(o,Z(o,[]))}function tt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function et(t){const e=Y(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=$(t),s=r?t.offsetWidth:n,a=r?t.offsetHeight:o,l=i(n)!==s||i(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function nt(t){return E(t)?t:t.contextElement}function ot(t){const e=nt(t);if(!$(e))return r(1);const n=e.getBoundingClientRect(),{width:o,height:s,$:a}=et(e);let l=(a?i(n.width):n.width)/o,c=(a?i(n.height):n.height)/s;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const it=r(0);function rt(t){const e=O(t);return V()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:it}function st(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),s=nt(t);let a=r(1);e&&(o?E(o)&&(a=ot(o)):a=ot(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==O(t))&&e}(s,n,o)?rt(s):r(0);let c=(i.left+l.x)/a.x,f=(i.top+l.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(s){const t=O(s),e=o&&E(o)?O(o):o;let n=t,i=tt(n);for(;i&&o&&e!==n;){const t=ot(i),e=i.getBoundingClientRect(),o=Y(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,f*=t.y,u*=t.x,d*=t.y,c+=r,f+=s,n=O(i),i=tt(n)}}return A({width:u,height:d,x:c,y:f})}function at(t,e){const n=J(t).scrollLeft;return e?e.left+n:st(P(t)).left+n}function lt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-at(t,n),y:n.top+e.scrollTop}}const ct=new Set(["absolute","fixed"]);function ft(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=O(t),o=P(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,l=0;if(i){r=i.width,s=i.height;const t=V();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}const c=at(o);if(c<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-e.clientWidth-i);s<=25&&(r-=s)}else c<=25&&(r+=c);return{width:r,height:s,x:a,y:l}}(t,n);else if("document"===e)i=function(t){const e=P(t),n=J(t),i=t.ownerDocument.body,r=o(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=o(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+at(t);const l=-n.scrollTop;return"rtl"===Y(i).direction&&(a+=o(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:l}}(P(t));else if(E(e))i=function(t,e){const n=st(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=$(t)?ot(t):r(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:i*s.x,y:o*s.y}}(e,n);else{const n=rt(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return A(i)}function ut(t,e){const n=K(t);return!(n===e||!E(n)||X(n))&&("fixed"===Y(n).position||ut(n,e))}function dt(t,e,n){const o=$(e),i=P(e),s="fixed"===n,a=st(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const c=r(0);function f(){c.x=at(i)}if(o||!o&&!s)if(("body"!==L(e)||B(i))&&(l=J(e)),o){const t=st(e,!0,s,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else i&&f();s&&!o&&i&&f();const u=!i||o||s?r(0):lt(i,l);return{x:a.left+l.scrollLeft-c.x-u.x,y:a.top+l.scrollTop-c.y-u.y,width:a.width,height:a.height}}function ht(t){return"static"===Y(t).position}function pt(t,e){if(!$(t)||"fixed"===Y(t).position)return null;if(e)return e(t);let n=t.offsetParent;return P(t)===n&&(n=n.ownerDocument.body),n}function mt(t,e){const n=O(t);if(H(t))return n;if(!$(t)){let e=K(t);for(;e&&!X(e);){if(E(e)&&!ht(e))return e;e=K(e)}return n}let o=pt(t,e);for(;o&&z(o)&&ht(o);)o=pt(o,e);return o&&X(o)&&ht(o)&&!U(o)?n:o||function(t){let e=K(t);for(;$(e)&&!X(e);){if(U(e))return e;if(H(e))return null;e=K(e)}return null}(t)||n}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s="fixed"===i,a=P(o),l=!!e&&H(e.floating);if(o===a||l&&s)return n;let c={scrollLeft:0,scrollTop:0},f=r(1);const u=r(0),d=$(o);if((d||!d&&!s)&&(("body"!==L(o)||B(a))&&(c=J(o)),$(o))){const t=st(o);f=ot(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const h=!a||d||s?r(0):lt(a,c);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-c.scrollTop*f.y+u.y+h.y}},getDocumentElement:P,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:r,strategy:s}=t;const a=[..."clippingAncestors"===i?H(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=Z(t,[]).filter((t=>E(t)&&"body"!==L(t))),i=null;const r="fixed"===Y(t).position;let s=r?K(t):t;for(;E(s)&&!X(s);){const e=Y(s),n=U(s);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&ct.has(i.position)||B(s)&&!n&&ut(t,s))?o=o.filter((t=>t!==s)):i=e,s=K(s)}return e.set(t,o),o}(e,this._c):[].concat(i),r],l=a.reduce(((t,i)=>{const r=ft(e,i,s);return t.top=o(r.top,t.top),t.right=n(r.right,t.right),t.bottom=n(r.bottom,t.bottom),t.left=o(r.left,t.left),t}),ft(e,a[0],s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:mt,getElementRects:async function(t){const e=this.getOffsetParent||mt,n=this.getDimensions,o=await n(t.floating);return{reference:dt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=et(t);return{width:e,height:n}},getScale:ot,isElement:E,isRTL:function(t){return"rtl"===Y(t).direction}},gt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...h}=c(t,e),p={x:n,y:o},y=await r.detectOverflow(e,h),g=m(f(i)),w=d(g);let x=p[w],b=p[g];s&&(x=l(x+y["y"===w?"top":"left"],x,x-y["y"===w?"bottom":"right"])),a&&(b=l(b+y["y"===g?"top":"left"],b,b-y["y"===g?"bottom":"right"]));const v=u.fn({...e,[w]:x,[g]:b});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[w]:s,[g]:a}}}}}},wt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:p=!0,crossAxis:S=!0,fallbackPlacements:A,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:R=!0,...F}=c(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const L=f(i),O=m(a),P=f(a)===a,T=await(null==l.isRTL?void 0:l.isRTL(d.floating)),E=A||(P||!R?[k(a)]:function(t){const e=k(t);return[g(t),e,g(e)]}(a)),$="none"!==D;!A&&$&&E.push(...function(t,e,n,o){const i=u(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?x:w:e?w:x;case"left":case"right":return e?b:v;default:return[]}}(f(t),"start"===n,o);return i&&(r=r.map((t=>t+"-"+i)),e&&(r=r.concat(r.map(g)))),r}(a,R,D,T));const M=[a,...E],j=await l.detectOverflow(e,F),B=[];let _=(null==(o=r.flip)?void 0:o.overflows)||[];if(p&&B.push(j[L]),S){const t=function(t,e,n){void 0===n&&(n=!1);const o=u(t),i=y(t),r=h(i);let s="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=k(s)),[s,k(s)]}(i,s,T);B.push(j[t[0]],j[t[1]])}if(_=[..._,{placement:i,overflows:B}],!B.every((t=>t<=0))){var z,N;const t=((null==(z=r.flip)?void 0:z.index)||0)+1,e=M[t];if(e&&("alignment"!==S||O===m(e)||_.every((t=>m(t.placement)!==O||t.overflows[0]>0))))return{data:{index:t,overflows:_},reset:{placement:e}};let n=null==(N=_.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:N.placement;if(!n)switch(C){case"bestFit":{var H;const t=null==(H=_.filter((t=>{if($){const e=m(t.placement);return e===O||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:H[0];t&&(n=t);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},xt=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:s,platform:a,elements:f,middlewareData:d}=e,{element:p,padding:m=0}=c(t,e)||{};if(null==p)return{};const g=S(m),w={x:o,y:i},x=y(r),b=h(x),v=await a.getDimensions(p),k="y"===x,A=k?"top":"left",C=k?"bottom":"right",D=k?"clientHeight":"clientWidth",R=s.reference[b]+s.reference[x]-w[x]-s.floating[b],F=w[x]-s.reference[x],L=await(null==a.getOffsetParent?void 0:a.getOffsetParent(p));let O=L?L[D]:0;O&&await(null==a.isElement?void 0:a.isElement(L))||(O=f.floating[D]||s.floating[b]);const P=R/2-F/2,T=O/2-v[b]/2-1,E=n(g[A],T),$=n(g[C],T),M=E,j=O-v[b]-$,B=O/2-v[b]/2+P,_=l(M,B,j),z=!d.arrow&&null!=u(r)&&B!==_&&s.reference[b]/2-(B<M?E:$)-v[b]/2<0,N=z?B<M?B-M:B-j:0;return{[x]:w[x]+N,data:{[x]:_,centerOffset:B-_-N,...z&&{alignmentOffset:N}},reset:z}}}),bt="Checking...",vt=class{constructor(e){t(this,e),this.vin=void 0,this.snapshot=void 0,this.label=bt,this.failed=!0,this.loaded=!1,this.time=void 0,this.eventBus=window.eventBus,this.message=void 0,this.nanoId=((t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[t]];return e})(),this.messageHandler=t=>{const{origin:e,data:n}=t,{targetId:o}=n;if(console.log("-- messageHandler:",n,e),"http://localhost:3000"===e&&o===this.nanoId)if(void 0===this.message){if(n.type&&"resize-iframe"===n.type){this.iframe.style.width=n.payload.width+"px",this.iframe.style.height=n.payload.height+"px",this.iframe.style.display="block",this.loaded=!0,this.label="",this.message=n;const{vin:t,snapshot:e}=this;this.iframe&&this.iframe.contentWindow.postMessage({targetId:this.nanoId,type:"data-payload",payload:{vin:t,snapshot:e}},"*"),this.update()}}else this.hideTooltip()},this.register=()=>{this.eventBus.emit("activate",this.nanoId),window.addEventListener("message",this.messageHandler,!1)},this.unregister=()=>{window.removeEventListener("message",this.messageHandler)},this.update=()=>{const{target:t,tooltip:e,arrowEl:n}=this;var o;((t,e,n)=>{const o=new Map,i={platform:yt,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=C(c,o,l),d=o,h={},p=0;for(let n=0;n<a.length;n++){var m;const{name:r,fn:y}=a[n],{x:g,y:w,data:x,reset:b}=await y({x:f,y:u,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:c,platform:{...s,detectOverflow:null!=(m=s.detectOverflow)?m:D},elements:{reference:t,floating:e}});f=null!=g?g:f,u=null!=w?w:u,h={...h,[r]:{...h[r],...x}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):b.rects),({x:f,y:u}=C(c,d,l))),n=-1)}return{x:f,y:u,placement:d,strategy:i,middlewareData:h}})(t,e,{...i,platform:r})})(t,e,{placement:"right",middleware:[(o=6,void 0===o&&(o=0),{name:"offset",options:o,async fn(t){var e,n;const{x:i,y:r,placement:s,middlewareData:a}=t,l=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),s=f(n),a=u(n),l="y"===m(n),d=R.has(s)?-1:1,h=r&&l?-1:1,p=c(e,t);let{mainAxis:y,crossAxis:g,alignmentAxis:w}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&"number"==typeof w&&(g="end"===a?-1*w:w),l?{x:g*h,y:y*d}:{x:y*d,y:g*h}}(t,o);return s===(null==(e=a.offset)?void 0:e.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}),wt(),gt({padding:5}),xt({element:n})]}).then((({x:t,y:o,placement:i,middlewareData:r})=>{Object.assign(e.style,{left:`${t}px`,top:`${o}px`});const{x:s,y:a}=r.arrow,l={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(n.style,{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",[l]:"-4px"})}))},this.onIframeLoad=()=>{this.update(),setTimeout((()=>{this.loaded||(this.label="Content Failed to Load...")}),3e3)},this.hideTooltip=()=>{this.iframe.style.display="",this.tooltip.style.display="",this.message=void 0,this.unregister()},this.showTooltip=()=>{this.register(),this.loaded=!1,this.label=bt,this.loaded=!1,this.time=Date.now(),this.tooltip.style.display="block",this.update()},this.clickHandler=()=>{"block"===this.tooltip.style.display?this.hideTooltip():this.showTooltip()}}componentDidLoad(){this.eventBus.on("activate",(t=>{this.nanoId!==t&&(void 0!==this.message||"block"===this.tooltip.style.display)&&this.hideTooltip()})),this.update()}render(){const t=`http://localhost:3000/demo_iframe.html?q=${this.time}&nid=${this.nanoId}`;return e("div",{key:"1da684903d9253b204641b4184bc5e1f79326405",id:"root"},e("div",{key:"84665f15de5991870ad2a16f42f1984789f4631f",id:"target",ref:t=>this.target=t,onClick:()=>this.clickHandler()},"i"),e("div",{key:"178c42dc946b455c8873e06d481a93d095a2e752",id:"tooltip",role:"tooltip",ref:t=>this.tooltip=t},e("div",{key:"75921e81ce12a64df3500d1492b6d782ff2881e3"},this.label),this.time?e("iframe",{id:"content",src:t,ref:t=>this.iframe=t,onLoad:t=>this.onIframeLoad(t)}):"",e("div",{key:"99722c505d254559b6a89a3d173c0925b12e53be",id:"arrow",ref:t=>this.arrowEl=t})))}};vt.style="#root{--clrs-navy:#001f3f;--clrs-blue:#0074d9;--clrs-aqua:#7fdbff;--clrs-teal:#39cccc;--clrs-olive:#3d9970;--clrs-green:#2ecc40;--clrs-lime:#01ff70;--clrs-yellow:#ffdc00;--clrs-orange:#ff851b;--clrs-red:#ff4136;--clrs-maroon:#85144b;--clrs-fuchsia:#f012be;--clrs-purple:#b10dc9;--clrs-black:#111111;--clrs-gray:#aaaaaa;--clrs-silver:#dddddd;--clrs-bada55:#bada55;--clrs-slate:#708090;--clrs-slate4:#4e5964;--clrs-white:#ffffff}#target{width:24px;height:24px;line-height:24px;text-align:center;border-radius:12px;background:var(--clrs-blue);font-weight:bold;font-size:120%;color:var(--clrs-white);cursor:pointer}#tooltip{display:none;position:absolute;min-height:18px;background:var(--clrs-navy);color:var(--clrs-white);font-weight:bold;padding:5px;padding-right:10px;padding-left:10px;border-radius:4px;font-size:90%;pointer-events:none}#arrow{position:absolute;background:var(--clrs-navy);width:8px;height:8px;transform:rotate(45deg)}#content{display:none;border:none}";export{vt as proto_floater_demo}
|
|
@@ -0,0 +1,2 @@
|
|
|
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)=>e in t,i=(t,e)=>(0,console.error)(t,e),s=new Map,r=new Map,c="undefined"!=typeof window?window:{},u={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),a=(()=>{try{return!!c.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),d=!!a&&(()=>!!c.document&&Object.getOwnPropertyDescriptor(c.document.adoptedStyleSheets,"length").writable)(),h=!1,p=[],m=[],v=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&u.u?$(b):u.raf(b))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},b=()=>{y(p),y(m),(h=p.length>0)&&u.raf(b)},$=t=>f().then(t),w=v(m,!0);function g(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(d?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 S,O=new WeakMap,k=t=>"sc-"+t.p,C=t=>"object"==(t=typeof t)||"function"===t,E=(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&&!C(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?M(null,o):o),s=i)};c(n),e&&e.key&&(l=e.key);const u=M(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},M=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),x={},R=(t,e)=>null==t||C(t)?t:1&e?t+"":t,D=(t,e,n,o,i,s)=>{if(n===o)return;let r=l(t,e),f=e.toLowerCase();if("key"===e);else if("ref"===e)o&&Y(o,t);else if(r||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);return void(null==o||!1===o?!1===o&&""!==t.getAttribute(n)||t.removeAttribute(n):t.setAttribute(n,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const l=C(o);if(r||l&&null!==o)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&s||i)&&!l&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}else if(e="-"===e[2]?e.slice(3):l(c,f)?f.slice(2):f[2]+e.slice(3),n||o){const l=e.endsWith(P);e=e.replace(L,""),n&&u.rel(t,e,n,l),o&&u.ael(t,e,o,l)}},P="Capture",L=RegExp(P+"$"),N=(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 U(Object.keys(l)))t in i||D(o,t,l[t],void 0,n,e.u);for(const t of U(Object.keys(i)))D(o,t,l[t],i[t],n,e.u)};function U(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var A=!1,T=[],W=[],H=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=c.document.createTextNode(o.m);else{if(!c.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=c.document.createElement(o.S),N(null,o,A),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=H(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=S,l},q=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===S&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=H(null,n,l),s&&(o[l].O=s,_(r,s,e)))},z=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;G(e),t&&t.remove()}}},F=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),V=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?(N(t,e,A),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=o.length-1,m=o[0],v=o[p];const y="template"===n.S?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=o[++c];else if(null==v)v=o[--p];else if(F(d,m,l))V(d,m,l),d=e[++r],m=o[++c];else if(F(h,v,l))V(h,v,l),h=e[--a],v=o[--p];else if(F(d,v,l))V(d,v,l),_(y,d.O,h.O.nextSibling),d=e[++r],v=o[--p];else if(F(h,m,l))V(h,m,l),_(y,h.O,d.O),h=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(s=e[u],s.S!==m.S?i=H(e&&e[c],n,u):(V(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=H(e&&e[c],n,c),m=o[++c]),i&&_(d.O.parentNode,i,d.O)}r>a?q(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&z(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),q(o,null,e,i,0,i.length-1)):!n&&null!==l&&z(l,0,l.length-1)):t.m!==s&&(o.data=s)},G=t=>{t.v&&t.v.ref&&T.push((()=>t.v.ref(null))),t.$&&t.$.map(G)},Y=(t,e)=>{W.push((()=>t(e)))},_=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),B=(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()})))}},I=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);B(t,t.C);const n=()=>J(t,e);if(!e)return w(n);queueMicrotask((()=>{n()}))},J=(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.M.length&&t.M.forEach((t=>t(n))),l=nt(o,"componentWillLoad",void 0,n)):l=nt(o,"componentWillUpdate",void 0,n),l=K(l,(()=>nt(o,"componentWillRender",void 0,n))),K(l,(()=>X(t,o,e)))},K=(t,e)=>Q(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Q=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,X=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=k(e),s=r.get(i);if(!c.document)return i;if(t=11===t.nodeType?t:c.document,s)if("string"==typeof s){let l,r=O.get(t=t.head||t);if(r||O.set(t,r=new Set),!r.has(i)){l=c.document.createElement("style"),l.textContent=s;const f=null!=(n=u.R)?n:j(c.document);if(null!=f&&l.setAttribute("nonce",f),!(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(s),d?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=O.get(t);if(e||O.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)}d?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);Z(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),t.u|=4,e.length=0)}},Z=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.D||M(null,null),i=(t=>t&&t.S===x)(e)?e:E(null,null,e);if(S=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.D=i,i.O=l.O=o.shadowRoot||o,V(l,i,n),T.forEach((t=>t())),T.length=0,W.forEach((t=>t())),W.length=0})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},tt=t=>{const e=t.$hostElement$,n=t.i,o=t.C;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.P(e),o||et()),t.k&&(t.k(),t.k=void 0),512&t.u&&$((()=>I(t,!1))),t.u&=-517},et=()=>{$((()=>(t=>{const e=u.ce("appload",{detail:{namespace:"proto-float-wc"}});return t.dispatchEvent(e),e})(c)))},nt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},ot=t=>t.classList.add("hydrated"),lt=(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=R(o,l.t[e][0]),!(8&r&&void 0!==s||o===s||Number.isNaN(s)&&Number.isNaN(o)||(i.l.set(e,o),2!=(18&r)))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(o,s,e))return;I(i,!1)}},it=(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,R(i,l)),void lt(this,t,i=32&l?this[t]:s.$hostElement$[t],e);{if(!(1&o&&4096&e.t[t][0]))return lt(this,t,i,e),void(1&o&&!s.i&&s.M.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]=R(i,l),lt(this,t,s.i[t],e)};s.i?n():s.M.push((()=>{n()}))}}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(t,l,i){u.jmp((()=>{var c;const u=o.get(t),f=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==f?void 0:f.u;if(f&&n&&!(8&n)&&i!==l){const o=f.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 a=r.find((([t])=>t===u));a&&4&a[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},st=(t,e)=>{nt(t,"connectedCallback",void 0,e)},rt=(t,e)=>{nt(t,"disconnectedCallback",void 0,e||t)},ct=(t,e={})=>{var o;if(!c.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],f=e.exclude||[],d=c.customElements,h=c.document.head,p=h.querySelector("meta[charset]"),m=c.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(u,e),u.h=new URL(e.resourcesUrl||"./",c.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 c=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.A=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[],n.M=[];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 g.call(t,o)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):u.jmp((()=>(t=>{if(!(1&u.u)){const e=n(t);if(!e)return;const o=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?st(e.i,t):(null==e?void 0:e.A)&&e.A.then((()=>st(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){B(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;if(!(32&e.u)){if(e.u|=32,n.T){const l=((t,e)=>{const n=t.p.replace(/-/g,"_"),o=t.T;if(!o)return;const l=s.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(s.set(o,t),t[n])),(t=>{i(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.W}" was not found`);o.isProxied||(it(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){i(e,t)}e.u&=-9,r(),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=k(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,c=()=>I(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this))))}disconnectedCallback(){u.jmp((()=>(async t=>{if(!(1&u.u)){const e=n(t);(null==e?void 0:e.i)?rt(e.i,t):(null==e?void 0:e.A)&&e.A.then((()=>rt(e.i,t)))}O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this))),u.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.D)?void 0:t.O)instanceof Node&&!e.D.O.isConnected&&delete e.D.O}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.A}};o.T=t[0],f.includes(c)||d.get(c)||(l.push(c),d.define(c,it(h,o,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=u.R)?o:j(c.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,p?p.nextSibling:h.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):u.jmp((()=>y=setTimeout(et,30)))},ut=t=>u.R=t;export{ct as b,E as h,f as p,o as r,ut as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=()=>{};export{o as g}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as o,b as a}from"./p-DN_GSREz.js";export{s as setNonce}from"./p-DN_GSREz.js";import{g as t}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,s={};return""!==a&&(s.resourcesUrl=new URL(".",a).href),o(s)})().then((async o=>(await t(),a([["p-44c23264",[[1,"proto-floater-demo",{vin:[1],snapshot:[1],label:[32],failed:[32],loaded:[32],time:[32]}]]]],o))));
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
export declare class ProtoFloaterDemo {
|
|
2
2
|
vin: string;
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
snapshot: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
failed: boolean;
|
|
6
|
+
loaded: boolean;
|
|
7
|
+
time: number;
|
|
8
|
+
private target?;
|
|
9
|
+
private tooltip?;
|
|
10
|
+
private arrowEl?;
|
|
11
|
+
private iframe?;
|
|
12
|
+
private eventBus;
|
|
13
|
+
private message;
|
|
14
|
+
private nanoId;
|
|
15
|
+
messageHandler: (event: any) => void;
|
|
16
|
+
register: () => void;
|
|
17
|
+
unregister: () => void;
|
|
18
|
+
componentDidLoad(): void;
|
|
19
|
+
update: () => void;
|
|
20
|
+
onIframeLoad: (_event: any) => void;
|
|
21
|
+
hideTooltip: () => void;
|
|
22
|
+
showTooltip: () => void;
|
|
5
23
|
clickHandler: () => void;
|
|
6
24
|
render(): any;
|
|
7
25
|
}
|
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
9
|
interface ProtoFloaterDemo {
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @default undefined
|
|
12
|
+
*/
|
|
13
|
+
"snapshot": string;
|
|
14
|
+
/**
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
11
17
|
"vin": string;
|
|
12
18
|
}
|
|
13
|
-
interface ProtoPlayer {
|
|
14
|
-
"apikey": string;
|
|
15
|
-
"bus"?: string;
|
|
16
|
-
}
|
|
17
19
|
}
|
|
18
20
|
declare global {
|
|
19
21
|
interface HTMLProtoFloaterDemoElement extends Components.ProtoFloaterDemo, HTMLStencilElement {
|
|
@@ -22,37 +24,36 @@ declare global {
|
|
|
22
24
|
prototype: HTMLProtoFloaterDemoElement;
|
|
23
25
|
new (): HTMLProtoFloaterDemoElement;
|
|
24
26
|
};
|
|
25
|
-
interface HTMLProtoPlayerElement extends Components.ProtoPlayer, HTMLStencilElement {
|
|
26
|
-
}
|
|
27
|
-
var HTMLProtoPlayerElement: {
|
|
28
|
-
prototype: HTMLProtoPlayerElement;
|
|
29
|
-
new (): HTMLProtoPlayerElement;
|
|
30
|
-
};
|
|
31
27
|
interface HTMLElementTagNameMap {
|
|
32
28
|
"proto-floater-demo": HTMLProtoFloaterDemoElement;
|
|
33
|
-
"proto-player": HTMLProtoPlayerElement;
|
|
34
29
|
}
|
|
35
30
|
}
|
|
36
31
|
declare namespace LocalJSX {
|
|
37
32
|
interface ProtoFloaterDemo {
|
|
38
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @default undefined
|
|
35
|
+
*/
|
|
36
|
+
"snapshot"?: string;
|
|
37
|
+
/**
|
|
38
|
+
* @default undefined
|
|
39
|
+
*/
|
|
39
40
|
"vin"?: string;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
42
|
+
|
|
43
|
+
interface ProtoFloaterDemoAttributes {
|
|
44
|
+
"vin": string;
|
|
45
|
+
"snapshot": string;
|
|
44
46
|
}
|
|
47
|
+
|
|
45
48
|
interface IntrinsicElements {
|
|
46
|
-
"proto-floater-demo": ProtoFloaterDemo;
|
|
47
|
-
"proto-player": ProtoPlayer;
|
|
49
|
+
"proto-floater-demo": Omit<ProtoFloaterDemo, keyof ProtoFloaterDemoAttributes> & { [K in keyof ProtoFloaterDemo & keyof ProtoFloaterDemoAttributes]?: ProtoFloaterDemo[K] } & { [K in keyof ProtoFloaterDemo & keyof ProtoFloaterDemoAttributes as `attr:${K}`]?: ProtoFloaterDemoAttributes[K] } & { [K in keyof ProtoFloaterDemo & keyof ProtoFloaterDemoAttributes as `prop:${K}`]?: ProtoFloaterDemo[K] };
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
export { LocalJSX as JSX };
|
|
51
53
|
declare module "@stencil/core" {
|
|
52
54
|
export namespace JSX {
|
|
53
55
|
interface IntrinsicElements {
|
|
54
|
-
"proto-floater-demo": LocalJSX.
|
|
55
|
-
"proto-player": LocalJSX.ProtoPlayer & JSXBase.HTMLAttributes<HTMLProtoPlayerElement>;
|
|
56
|
+
"proto-floater-demo": LocalJSX.IntrinsicElements["proto-floater-demo"] & JSXBase.HTMLAttributes<HTMLProtoFloaterDemoElement>;
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
|
2
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
3
|
+
type MixinInstance<F> = F extends (base: MixedInCtor) => MixedInCtor<infer I> ? I : never;
|
|
2
4
|
export interface ComponentDecorator {
|
|
3
5
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
6
|
}
|
|
@@ -61,6 +63,12 @@ export interface ShadowRootOptions {
|
|
|
61
63
|
* focusable part is given focus, and the shadow host is given any available `:focus` styling.
|
|
62
64
|
*/
|
|
63
65
|
delegatesFocus?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
|
|
68
|
+
* slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
|
|
69
|
+
* declarative slotting behavior.
|
|
70
|
+
*/
|
|
71
|
+
slotAssignment?: 'manual' | 'named';
|
|
64
72
|
}
|
|
65
73
|
export interface ModeStyles {
|
|
66
74
|
[modeName: string]: string | string[];
|
|
@@ -117,12 +125,34 @@ export interface EventOptions {
|
|
|
117
125
|
*/
|
|
118
126
|
composed?: boolean;
|
|
119
127
|
}
|
|
128
|
+
export interface AttachInternalsOptions {
|
|
129
|
+
/**
|
|
130
|
+
* Initial custom states to set on the ElementInternals.states CustomStateSet.
|
|
131
|
+
* Each key is the state name and the value is the initial boolean state.
|
|
132
|
+
*
|
|
133
|
+
* These states can be targeted with the CSS `:state()` pseudo-class.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* @AttachInternals({ states: { open: true, active: false } })
|
|
138
|
+
* internals: ElementInternals;
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
|
|
142
|
+
*/
|
|
143
|
+
states?: {
|
|
144
|
+
[stateName: string]: boolean;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
120
147
|
export interface AttachInternalsDecorator {
|
|
121
|
-
(): PropertyDecorator;
|
|
148
|
+
(opts?: AttachInternalsOptions): PropertyDecorator;
|
|
122
149
|
}
|
|
123
150
|
export interface ListenDecorator {
|
|
124
151
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
125
152
|
}
|
|
153
|
+
export interface ResolveVarFunction {
|
|
154
|
+
<T>(variable: T): string;
|
|
155
|
+
}
|
|
126
156
|
export interface ListenOptions {
|
|
127
157
|
/**
|
|
128
158
|
* Handlers can also be registered for an event other than the host itself.
|
|
@@ -151,7 +181,15 @@ export interface StateDecorator {
|
|
|
151
181
|
(): PropertyDecorator;
|
|
152
182
|
}
|
|
153
183
|
export interface WatchDecorator {
|
|
154
|
-
(propName:
|
|
184
|
+
(propName: any, watchOptions?: {
|
|
185
|
+
immediate?: boolean;
|
|
186
|
+
}): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
|
|
187
|
+
}
|
|
188
|
+
export interface PropSerializeDecorator {
|
|
189
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
|
|
190
|
+
}
|
|
191
|
+
export interface AttrDeserializeDecorator {
|
|
192
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => any>;
|
|
155
193
|
}
|
|
156
194
|
export interface UserBuildConditionals {
|
|
157
195
|
isDev: boolean;
|
|
@@ -200,6 +238,24 @@ export declare const AttachInternals: AttachInternalsDecorator;
|
|
|
200
238
|
* https://stenciljs.com/docs/events#listen-decorator
|
|
201
239
|
*/
|
|
202
240
|
export declare const Listen: ListenDecorator;
|
|
241
|
+
/**
|
|
242
|
+
* The `resolveVar()` function is a compile-time utility that resolves const variables
|
|
243
|
+
* and object properties to their string literal values. This allows variables to be
|
|
244
|
+
* used in `@Listen` and `@Event` decorators instead of hardcoded strings.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* const MY_EVENT = 'myEvent';
|
|
249
|
+
* @Listen(resolveVar(MY_EVENT))
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```ts
|
|
254
|
+
* const EVENTS = { MY_EVENT: 'myEvent' } as const;
|
|
255
|
+
* @Event({ eventName: resolveVar(EVENTS.MY_EVENT) })
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
export declare const resolveVar: ResolveVarFunction;
|
|
203
259
|
/**
|
|
204
260
|
* The `@Method()` decorator is used to expose methods on the public API.
|
|
205
261
|
* Class methods decorated with the @Method() decorator can be called directly
|
|
@@ -233,6 +289,14 @@ export declare const State: StateDecorator;
|
|
|
233
289
|
* https://stenciljs.com/docs/reactive-data#watch-decorator
|
|
234
290
|
*/
|
|
235
291
|
export declare const Watch: WatchDecorator;
|
|
292
|
+
/**
|
|
293
|
+
* Decorator to serialize a property to an attribute string.
|
|
294
|
+
*/
|
|
295
|
+
export declare const PropSerialize: PropSerializeDecorator;
|
|
296
|
+
/**
|
|
297
|
+
* Decorator to deserialize an attribute string to a property.
|
|
298
|
+
*/
|
|
299
|
+
export declare const AttrDeserialize: AttrDeserializeDecorator;
|
|
236
300
|
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
237
301
|
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
238
302
|
/**
|
|
@@ -260,6 +324,25 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
260
324
|
* @returns the base path
|
|
261
325
|
*/
|
|
262
326
|
export declare function getAssetPath(path: string): string;
|
|
327
|
+
/**
|
|
328
|
+
* Method to render a virtual DOM tree to a container element.
|
|
329
|
+
*
|
|
330
|
+
* @example
|
|
331
|
+
* ```tsx
|
|
332
|
+
* import { render } from '@stencil/core';
|
|
333
|
+
*
|
|
334
|
+
* const vnode = (
|
|
335
|
+
* <div>
|
|
336
|
+
* <h1>Hello, world!</h1>
|
|
337
|
+
* </div>
|
|
338
|
+
* );
|
|
339
|
+
* render(vnode, document.body);
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* @param vnode - The virtual DOM tree to render
|
|
343
|
+
* @param container - The container element to render the virtual DOM tree to
|
|
344
|
+
*/
|
|
345
|
+
export declare function render(vnode: VNode, container: Element): void;
|
|
263
346
|
/**
|
|
264
347
|
* Used to manually set the base path where assets can be found. For lazy-loaded
|
|
265
348
|
* builds the asset path is automatically set and assets copied to the correct
|
|
@@ -330,6 +413,58 @@ export declare function readTask(task: RafCallback): void;
|
|
|
330
413
|
* Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
|
|
331
414
|
*/
|
|
332
415
|
export declare const setErrorHandler: (handler: ErrorHandler) => void;
|
|
416
|
+
export type TagTransformer = (tag: string) => string;
|
|
417
|
+
/**
|
|
418
|
+
* Sets a tag transformer to be used when rendering your custom elements.
|
|
419
|
+
* ```ts
|
|
420
|
+
* setTagTransformer((tag) => {
|
|
421
|
+
* if (tag.startsWith('my-')) return `new-${tag}`
|
|
422
|
+
* return tag;
|
|
423
|
+
* });
|
|
424
|
+
* ```
|
|
425
|
+
* Will mean all your components that start with `my-` are defined instead with `new-my-` prefix.
|
|
426
|
+
*
|
|
427
|
+
* @param transformer the transformer function to use which must return a string.
|
|
428
|
+
*/
|
|
429
|
+
export declare function setTagTransformer(transformer: TagTransformer): void;
|
|
430
|
+
/**
|
|
431
|
+
* Transforms a tag name using a transformer set via `setTagTransformer`
|
|
432
|
+
*
|
|
433
|
+
* @param tag - the tag to transform e.g. `my-tag`
|
|
434
|
+
* @returns the transformed tag e.g. `new-my-tag`
|
|
435
|
+
*/
|
|
436
|
+
export declare function transformTag(tag: string): string;
|
|
437
|
+
/**
|
|
438
|
+
* @deprecated - Use `MixedInCtor` instead:
|
|
439
|
+
* ```ts
|
|
440
|
+
* import { MixedInCtor } from '@stencil/core';
|
|
441
|
+
*
|
|
442
|
+
* const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
443
|
+
* ```
|
|
444
|
+
*/
|
|
445
|
+
export type MixinFactory = (base: MixedInCtor) => MixedInCtor;
|
|
446
|
+
export type MixedInCtor<T = {}> = new (...args: any[]) => T;
|
|
447
|
+
/**
|
|
448
|
+
* Compose multiple mixin classes into a single constructor.
|
|
449
|
+
* The resulting class has the combined instance types of all mixed-in classes.
|
|
450
|
+
*
|
|
451
|
+
* Example:
|
|
452
|
+
* ```ts
|
|
453
|
+
* import { Mixin, MixedInCtor } from '@stencil/core';
|
|
454
|
+
*
|
|
455
|
+
* const AWrap = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
456
|
+
* const BWrap = <B extends MixedInCtor>(Base: B) => {class B extends Base { propB = B }; return B;}
|
|
457
|
+
* const CWrap = <B extends MixedInCtor>(Base: B) => {class C extends Base { propC = C }; return C;}
|
|
458
|
+
*
|
|
459
|
+
* class X extends Mixin(AWrap, BWrap, CWrap) {
|
|
460
|
+
* render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
|
|
461
|
+
* }
|
|
462
|
+
* ```
|
|
463
|
+
*
|
|
464
|
+
* @param mixinFactories mixin factory functions that return a class which extends from the provided class.
|
|
465
|
+
* @returns a class that is composed from extending each of the provided classes in the order they were provided.
|
|
466
|
+
*/
|
|
467
|
+
export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
|
|
333
468
|
/**
|
|
334
469
|
* This file gets copied to all distributions of stencil component collections.
|
|
335
470
|
* - no imports
|
|
@@ -502,7 +637,7 @@ export interface FunctionalUtilities {
|
|
|
502
637
|
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
|
|
503
638
|
}
|
|
504
639
|
export interface FunctionalComponent<T = {}> {
|
|
505
|
-
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
|
|
640
|
+
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
|
|
506
641
|
}
|
|
507
642
|
/**
|
|
508
643
|
* A Child VDOM node
|
|
@@ -557,6 +692,35 @@ export declare function h(sel: any, text: string): VNode;
|
|
|
557
692
|
export declare function h(sel: any, children: Array<VNode | undefined | null>): VNode;
|
|
558
693
|
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
559
694
|
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
695
|
+
/**
|
|
696
|
+
* Automatic JSX runtime functions for TypeScript's react-jsx mode.
|
|
697
|
+
* These functions are called automatically by TypeScript when using "jsx": "react-jsx".
|
|
698
|
+
* @param type type of node
|
|
699
|
+
* @param props properties of node
|
|
700
|
+
* @param key optional key for the node
|
|
701
|
+
* @returns a jsx vnode
|
|
702
|
+
*/
|
|
703
|
+
export declare function jsx(type: any, props: any, key?: string): VNode;
|
|
704
|
+
/**
|
|
705
|
+
* Automatic JSX runtime functions for TypeScript's react-jsxmode with multiple children.
|
|
706
|
+
* @param type type of node
|
|
707
|
+
* @param props properties of node
|
|
708
|
+
* @param key optional key for the node
|
|
709
|
+
* @returns a jsx vnode
|
|
710
|
+
*/
|
|
711
|
+
export declare function jsxs(type: any, props: any, key?: string): VNode;
|
|
712
|
+
/**
|
|
713
|
+
* Automatic JSX runtime functions for TypeScript's react-jsxdev mode.
|
|
714
|
+
* These functions are called automatically by TypeScript when using "jsx": "react-jsxdev".
|
|
715
|
+
* @param type type of node
|
|
716
|
+
* @param props properties of node
|
|
717
|
+
* @param key optional key for the node
|
|
718
|
+
* @param isStaticChildren indicates if the children are static
|
|
719
|
+
* @param source source information
|
|
720
|
+
* @param self reference to the component instance
|
|
721
|
+
* @returns a jsx vnode
|
|
722
|
+
*/
|
|
723
|
+
export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
|
|
560
724
|
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
561
725
|
/**
|
|
562
726
|
* A virtual DOM node
|
|
@@ -587,7 +751,7 @@ declare namespace LocalJSX {
|
|
|
587
751
|
export { LocalJSX as JSX };
|
|
588
752
|
export declare namespace JSXBase {
|
|
589
753
|
interface IntrinsicElements {
|
|
590
|
-
slot: JSXBase.SlotAttributes
|
|
754
|
+
slot: JSXBase.SlotAttributes<HTMLSlotElement>;
|
|
591
755
|
a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
592
756
|
abbr: JSXBase.HTMLAttributes;
|
|
593
757
|
address: JSXBase.HTMLAttributes;
|
|
@@ -757,7 +921,7 @@ export declare namespace JSXBase {
|
|
|
757
921
|
use: JSXBase.SVGAttributes;
|
|
758
922
|
view: JSXBase.SVGAttributes;
|
|
759
923
|
}
|
|
760
|
-
interface SlotAttributes extends JSXAttributes {
|
|
924
|
+
interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
|
|
761
925
|
name?: string;
|
|
762
926
|
slot?: string;
|
|
763
927
|
onSlotchange?: (event: Event) => void;
|
|
@@ -768,6 +932,7 @@ export declare namespace JSXBase {
|
|
|
768
932
|
hrefLang?: string;
|
|
769
933
|
hreflang?: string;
|
|
770
934
|
media?: string;
|
|
935
|
+
ping?: string;
|
|
771
936
|
rel?: string;
|
|
772
937
|
target?: string;
|
|
773
938
|
referrerPolicy?: ReferrerPolicy;
|
|
@@ -794,7 +959,6 @@ export declare namespace JSXBase {
|
|
|
794
959
|
cite?: string;
|
|
795
960
|
}
|
|
796
961
|
interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
797
|
-
autoFocus?: boolean;
|
|
798
962
|
disabled?: boolean;
|
|
799
963
|
form?: string;
|
|
800
964
|
formAction?: string;
|
|
@@ -813,6 +977,9 @@ export declare namespace JSXBase {
|
|
|
813
977
|
popoverTargetAction?: string;
|
|
814
978
|
popoverTargetElement?: Element | null;
|
|
815
979
|
popoverTarget?: string;
|
|
980
|
+
command?: string;
|
|
981
|
+
commandFor?: string;
|
|
982
|
+
commandfor?: string;
|
|
816
983
|
}
|
|
817
984
|
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
818
985
|
height?: number | string;
|
|
@@ -826,7 +993,8 @@ export declare namespace JSXBase {
|
|
|
826
993
|
}
|
|
827
994
|
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
828
995
|
open?: boolean;
|
|
829
|
-
|
|
996
|
+
name?: string;
|
|
997
|
+
onToggle?: (event: ToggleEvent) => void;
|
|
830
998
|
}
|
|
831
999
|
interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
832
1000
|
cite?: string;
|
|
@@ -921,8 +1089,6 @@ export declare namespace JSXBase {
|
|
|
921
1089
|
autocapitalize?: string;
|
|
922
1090
|
autoComplete?: string;
|
|
923
1091
|
autocomplete?: string;
|
|
924
|
-
autoFocus?: boolean;
|
|
925
|
-
autofocus?: boolean | string;
|
|
926
1092
|
capture?: string;
|
|
927
1093
|
checked?: boolean;
|
|
928
1094
|
crossOrigin?: string;
|
|
@@ -979,8 +1145,6 @@ export declare namespace JSXBase {
|
|
|
979
1145
|
popoverTarget?: string;
|
|
980
1146
|
}
|
|
981
1147
|
interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
982
|
-
autoFocus?: boolean;
|
|
983
|
-
autofocus?: boolean | string;
|
|
984
1148
|
challenge?: string;
|
|
985
1149
|
disabled?: boolean;
|
|
986
1150
|
form?: string;
|
|
@@ -993,7 +1157,6 @@ export declare namespace JSXBase {
|
|
|
993
1157
|
interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
994
1158
|
form?: string;
|
|
995
1159
|
htmlFor?: string;
|
|
996
|
-
htmlfor?: string;
|
|
997
1160
|
}
|
|
998
1161
|
interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
999
1162
|
value?: string | string[] | number;
|
|
@@ -1020,6 +1183,8 @@ export declare namespace JSXBase {
|
|
|
1020
1183
|
autoPlay?: boolean;
|
|
1021
1184
|
autoplay?: boolean | string;
|
|
1022
1185
|
controls?: boolean;
|
|
1186
|
+
controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
|
|
1187
|
+
controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
|
|
1023
1188
|
crossOrigin?: string;
|
|
1024
1189
|
crossorigin?: string;
|
|
1025
1190
|
loop?: boolean;
|
|
@@ -1104,7 +1269,6 @@ export declare namespace JSXBase {
|
|
|
1104
1269
|
interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1105
1270
|
form?: string;
|
|
1106
1271
|
htmlFor?: string;
|
|
1107
|
-
htmlfor?: string;
|
|
1108
1272
|
name?: string;
|
|
1109
1273
|
}
|
|
1110
1274
|
interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
@@ -1129,7 +1293,6 @@ export declare namespace JSXBase {
|
|
|
1129
1293
|
type?: string;
|
|
1130
1294
|
}
|
|
1131
1295
|
interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1132
|
-
autoFocus?: boolean;
|
|
1133
1296
|
disabled?: boolean;
|
|
1134
1297
|
form?: string;
|
|
1135
1298
|
multiple?: boolean;
|
|
@@ -1164,8 +1327,6 @@ export declare namespace JSXBase {
|
|
|
1164
1327
|
interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1165
1328
|
autoComplete?: string;
|
|
1166
1329
|
autocomplete?: string;
|
|
1167
|
-
autoFocus?: boolean;
|
|
1168
|
-
autofocus?: boolean | string;
|
|
1169
1330
|
cols?: number;
|
|
1170
1331
|
disabled?: boolean;
|
|
1171
1332
|
form?: string;
|
|
@@ -1218,6 +1379,8 @@ export declare namespace JSXBase {
|
|
|
1218
1379
|
interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
|
|
1219
1380
|
innerHTML?: string;
|
|
1220
1381
|
accessKey?: string;
|
|
1382
|
+
autoFocus?: boolean;
|
|
1383
|
+
autofocus?: boolean | string;
|
|
1221
1384
|
class?: string | {
|
|
1222
1385
|
[className: string]: boolean;
|
|
1223
1386
|
};
|
|
@@ -1275,6 +1438,8 @@ export declare namespace JSXBase {
|
|
|
1275
1438
|
results?: number;
|
|
1276
1439
|
security?: string;
|
|
1277
1440
|
unselectable?: boolean;
|
|
1441
|
+
[key: `attr:${string}`]: string;
|
|
1442
|
+
[key: `prop:${string}`]: any;
|
|
1278
1443
|
}
|
|
1279
1444
|
interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
|
|
1280
1445
|
class?: string | {
|
|
@@ -1536,6 +1701,15 @@ export declare namespace JSXBase {
|
|
|
1536
1701
|
yChannelSelector?: string;
|
|
1537
1702
|
z?: number | string;
|
|
1538
1703
|
zoomAndPan?: string;
|
|
1704
|
+
[key: `attr:${string}`]: string;
|
|
1705
|
+
[key: `prop:${string}`]: any;
|
|
1706
|
+
}
|
|
1707
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1708
|
+
interface ToggleEvent extends Event {
|
|
1709
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
1710
|
+
readonly newState: string;
|
|
1711
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
|
|
1712
|
+
readonly oldState: string;
|
|
1539
1713
|
}
|
|
1540
1714
|
interface DOMAttributes<T> extends JSXAttributes<T> {
|
|
1541
1715
|
slot?: string;
|
|
@@ -1553,6 +1727,10 @@ export declare namespace JSXBase {
|
|
|
1553
1727
|
onCompositionstartCapture?: (event: CompositionEvent) => void;
|
|
1554
1728
|
onCompositionupdate?: (event: CompositionEvent) => void;
|
|
1555
1729
|
onCompositionupdateCapture?: (event: CompositionEvent) => void;
|
|
1730
|
+
onBeforeToggle?: (event: ToggleEvent) => void;
|
|
1731
|
+
onBeforeToggleCapture?: (event: ToggleEvent) => void;
|
|
1732
|
+
onToggle?: (event: ToggleEvent) => void;
|
|
1733
|
+
onToggleCapture?: (event: ToggleEvent) => void;
|
|
1556
1734
|
onFocus?: (event: FocusEvent) => void;
|
|
1557
1735
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1558
1736
|
onFocusin?: (event: FocusEvent) => void;
|
|
@@ -1582,7 +1760,7 @@ export declare namespace JSXBase {
|
|
|
1582
1760
|
onKeyUp?: (event: KeyboardEvent) => void;
|
|
1583
1761
|
onKeyUpCapture?: (event: KeyboardEvent) => void;
|
|
1584
1762
|
onAuxClick?: (event: MouseEvent) => void;
|
|
1585
|
-
onClick?: (event:
|
|
1763
|
+
onClick?: (event: PointerEvent) => void;
|
|
1586
1764
|
onClickCapture?: (event: MouseEvent) => void;
|
|
1587
1765
|
onContextMenu?: (event: MouseEvent) => void;
|
|
1588
1766
|
onContextMenuCapture?: (event: MouseEvent) => void;
|
|
@@ -1662,6 +1840,8 @@ export declare namespace JSXBase {
|
|
|
1662
1840
|
onTransitionRunCapture?: (event: TransitionEvent) => void;
|
|
1663
1841
|
onTransitionStart?: (event: TransitionEvent) => void;
|
|
1664
1842
|
onTransitionStartCapture?: (event: TransitionEvent) => void;
|
|
1843
|
+
[key: `aria-${string}`]: string | boolean | undefined;
|
|
1844
|
+
[key: `aria${string}`]: string | boolean | undefined;
|
|
1665
1845
|
}
|
|
1666
1846
|
}
|
|
1667
1847
|
export interface JSXAttributes<T = Element> {
|
|
@@ -1672,6 +1852,7 @@ export interface CustomElementsDefineOptions {
|
|
|
1672
1852
|
exclude?: string[];
|
|
1673
1853
|
resourcesUrl?: string;
|
|
1674
1854
|
syncQueue?: boolean;
|
|
1855
|
+
/** @deprecated in-favour of `setTagTransformer` and `transformTag` */
|
|
1675
1856
|
transformTagName?: (tagName: string) => string;
|
|
1676
1857
|
jmp?: (c: Function) => any;
|
|
1677
1858
|
raf?: (c: FrameRequestCallback) => number;
|
package/loader/cdn.js
CHANGED
package/loader/index.cjs.js
CHANGED
package/loader/index.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export interface CustomElementsDefineOptions {
|
|
|
9
9
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
12
15
|
export declare function applyPolyfills(): Promise<void>;
|
|
13
16
|
|
|
14
17
|
/**
|
package/loader/index.es2017.js
CHANGED
package/loader/index.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
1
|
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
3
|
-
export * from '../dist/esm/
|
|
4
|
-
export * from '../dist/esm/loader.js';
|
|
2
|
+
export * from '../dist/esm/loader.js';
|