@fluid-topics/ft-card
Advanced tools
Comparing version 0.3.32 to 0.3.33
@@ -17,3 +17,3 @@ !function(t){ | ||
*/ | ||
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,s=new WeakMap,n=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,a);const h={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(r,h);let p=i.call(o,t);p||(p=c(t),e.call(o,t,p)),this===window.customElements&&(n.set(r,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),u(t,h,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!h(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=p(i)||window.customElements,r=o._getDefinition(e);return r?u(i,r):s.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,r),i.call(this,s,t,r)}else o.call(this,s,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const b=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(zt){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.reject()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){o(t)}r()}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}reject(){this.rejectPromise&&(this.rejectPromise(),this.clearPromise())}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}} | ||
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,s=new WeakMap,n=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,a);const h={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(r,h);let p=i.call(o,t);p||(p=c(t),e.call(o,t,p)),this===window.customElements&&(n.set(r,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),u(t,h,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!h(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=p(i)||window.customElements,r=o._getDefinition(e);return r?u(i,r):s.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,r),i.call(this,s,t,r)}else o.call(this,s,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const b=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(zt){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}} | ||
/** | ||
@@ -20,0 +20,0 @@ * @license |
{ | ||
"name": "@fluid-topics/ft-card", | ||
"version": "0.3.32", | ||
"version": "0.3.33", | ||
"description": "A file uploader with drag and drop", | ||
@@ -22,8 +22,8 @@ "keywords": [ | ||
"dependencies": { | ||
"@fluid-topics/ft-ripple": "0.3.32", | ||
"@fluid-topics/ft-typography": "0.3.32", | ||
"@fluid-topics/ft-wc-utils": "0.3.32", | ||
"@fluid-topics/ft-ripple": "0.3.33", | ||
"@fluid-topics/ft-typography": "0.3.33", | ||
"@fluid-topics/ft-wc-utils": "0.3.33", | ||
"lit": "2.2.8" | ||
}, | ||
"gitHead": "27bd400b0630590c76a67d175875b5ac7f03f4d9" | ||
"gitHead": "ba3783b220d3a5d359b452072054ab8210b0b45b" | ||
} |
96990
+ Added@fluid-topics/ft-ripple@0.3.33(transitive)
+ Added@fluid-topics/ft-typography@0.3.33(transitive)
+ Added@fluid-topics/ft-wc-utils@0.3.33(transitive)
- Removed@fluid-topics/ft-ripple@0.3.32(transitive)
- Removed@fluid-topics/ft-typography@0.3.32(transitive)
- Removed@fluid-topics/ft-wc-utils@0.3.32(transitive)