@vouchfor/embeds 0.0.0-experiment.2673197 → 0.0.0-experiment.29a8d8f
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/components/index.d.ts +2 -0
- package/dist/es/embeds.js.map +1 -1
- package/dist/iife/embeds.iife.js +1 -1
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +4 -3
- package/src/components/index.ts +2 -0
- /package/dist/es/components/{InlineEmbed/index.d.ts → InlineEmbed.d.ts} +0 -0
- /package/src/components/{InlineEmbed/InlineEmbed.stories.ts → InlineEmbed.stories.ts} +0 -0
- /package/src/components/{InlineEmbed/index.ts → InlineEmbed.ts} +0 -0
package/dist/es/embeds.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"embeds.js","sources":["../../src/components/InlineEmbed
|
1
|
+
{"version":3,"file":"embeds.js","sources":["../../src/components/InlineEmbed.ts"],"sourcesContent":["import { MediaPlayer } from '@vouchfor/media-player';\nimport { customElement } from 'lit/decorators.js';\n\nimport type { MediaPlayerProps } from '@vouchfor/media-player';\n\ntype InlineEmbedProps = MediaPlayerProps;\n\n@customElement('vembed-inline')\nclass InlineEmbed extends MediaPlayer {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vembed-inline': InlineEmbed;\n }\n\n namespace JSX {\n interface IntrinsicElements {\n 'vembed-inline': InlineEmbed;\n }\n }\n}\n\nexport { InlineEmbed };\nexport type { InlineEmbedProps };\n"],"names":["InlineEmbed","MediaPlayer","__decorateClass","customElement"],"mappings":";;;;;;;AAQM,IAAAA,IAAN,cAA0BC,EAAY;AAAC;AAAjCD,IAANE,EAAA;AAAA,EADCC,EAAc,eAAe;AAAA,GACxBH,CAAA;"}
|
package/dist/iife/embeds.iife.js
CHANGED
@@ -156,7 +156,7 @@ var embeds=function(nt){"use strict";var Am=Object.defineProperty;var bm=(nt,Et,
|
|
156
156
|
scroll-behavior: auto !important
|
157
157
|
}
|
158
158
|
}
|
159
|
-
`],e},le=Fg(zi),Ng=(r,e)=>(
|
159
|
+
`],e},le=Fg(zi),Ng=(r,e)=>(customElements.get(r)??window.customElements.define(r,e),e),Bg=(r,e)=>{const{kind:t,elements:i}=e;return{kind:t,elements:i,finisher(s){customElements.get(r)??window.customElements.define(r,s)}}},Ge=r=>e=>typeof e=="function"?Ng(r,e):Bg(r,e);class Ug extends Wi{constructor(e){if(super(e),e.type!==hi.ELEMENT)throw new Error("Resize directive must be used in an Element expression")}update(e,[t]){return t==null||t(e.element),ot}}const mc=ui(Ug);class Hg{constructor(e){this.hiddenControls=[],this._measureRef=Ze(),this._prevControlsWidth=0,this._hideables={},this._showables={},this._onResize=t=>{var i,s,n;const o=this._measureRef.value,a=(n=(s=(i=t==null?void 0:t[0])==null?void 0:i.borderBoxSize)==null?void 0:s[0])==null?void 0:n.inlineSize;if(o&&a&&a!==this._prevControlsWidth){Object.keys(this._hideables).forEach(c=>{this._hideables[c].element.style.display=""}),Object.keys(this._showables).forEach(c=>{this._showables[c].element.style.display="none"});const l=[];for(;o.scrollWidth>o.offsetWidth;){const c=Object.keys(this._hideables).find(d=>this._hideables[d].hideIndex===l.length);if(c){const d=this._hideables[c].element;d&&(d.style.display="none"),l.push(c)}Object.keys(this._showables).forEach(d=>{this._showables[d].showOn.some(h=>l.includes(h))&&(this._showables[d].element.style.display="flex")})}this.hiddenControls=l,this._prevControlsWidth=a,this.host.requestUpdate()}},this.host=e}measure(){return Je(this._measureRef)}contain(){return _s(this._onResize)}hide(e,t){return mc(i=>{this._hideables[e]={element:i,hideIndex:t}})}show(e,t){return mc(i=>{this._showables[e]={element:i,showOn:t}})}}function vc(r,e={}){const t=Math.max(0,r||0),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=Math.floor(t%3600%60),o=Math.floor(t%1*1e3);let a=i?`${i}:${`${s}`.padStart(2,"0")}:${`${n}`.padStart(2,"0")}`:`${s}:${`${n}`.padStart(2,"0")}`;return e.includeMs&&(a+=`:${`${o}`.padStart(3,"0")}`),a}var Gg=Object.defineProperty,Vg=Object.getOwnPropertyDescriptor,Si=(r,e,t,i)=>{for(var s=i>1?void 0:i?Vg(e,t):e,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&Gg(e,t,s),s};let Vt=class extends le{constructor(){super(...arguments),this.active=!1,this.size="small",this.rounded="medium",this.weight="light"}render(){return te`<button
|
160
160
|
class=${ge({active:this.active,"size-tiny":this.size==="tiny","size-small":this.size==="small","size-large":this.size==="large","radius-medium":this.rounded==="medium","radius-full":this.rounded==="full","weight-light":this.weight==="light","weight-heavy":this.weight==="heavy"})}
|
161
161
|
>
|
162
162
|
<slot></slot>
|