@fluid-topics/ft-skeleton 1.1.1 → 1.1.2

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.
@@ -62,7 +62,11 @@ class fo extends Et{constructor(){super(...arguments),this.renderOptions={host:t
62
62
  * @license
63
63
  * Copyright 2019 Google LLC
64
64
  * SPDX-License-Identifier: BSD-3-Clause
65
- */class No extends fo{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{Oo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),r=mo.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var So,Co=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,c=t.length-1;c>=0;c--)(i=t[c])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};const wo=Symbol("constructorPrototype"),vo=Symbol("constructorName"),xo=Symbol("exportpartsDebouncer");class Ro extends No{constructor(){super(),this[So]=new o(5),this[vo]=this.constructor.name,this[wo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[vo]&&Object.setPrototypeOf(this,this[wo])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var o,e;if((null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[xo].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var o,e,r,i,a,n;const c=t=>null!=t&&t.trim().length>0,s=t.filter(c).map((t=>t.trim()));if(0===s.length)return void this.removeAttribute("exportparts");const l=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],e=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...o,...e).filter(c).map((t=>t.trim())).forEach((t=>l.add(t)))}if(0===l.size)return void this.removeAttribute("exportparts");const f=[...l.values()].flatMap((t=>s.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...f].join(", "))}}var Uo,Eo;So=xo,Co([x()],Ro.prototype,"exportpartsPrefix",void 0),Co([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return x({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!R(t,o),...null!=o?o:{}})}([])],Ro.prototype,"exportpartsPrefixes",void 0),Co([x()],Ro.prototype,"customStylesheet",void 0),ht`
65
+ */class No extends fo{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{Oo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),r=mo.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var So,Co=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,c=t.length-1;c>=0;c--)(i=t[c])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};const wo=Symbol("constructorPrototype"),vo=Symbol("constructorName"),xo=Symbol("exportpartsDebouncer");class Ro extends No{constructor(){super(),this[So]=new o(5),this[vo]=this.constructor.name,this[wo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[vo]&&Object.setPrototypeOf(this,this[wo])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var o,e;if((null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[xo].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var o,e,r,i,a,n;const c=t=>null!=t&&t.trim().length>0,s=t.filter(c).map((t=>t.trim()));if(0===s.length)return void this.removeAttribute("exportparts");const l=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],e=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...o,...e).filter(c).map((t=>t.trim())).forEach((t=>l.add(t)))}if(0===l.size)return void this.removeAttribute("exportparts");const f=[...l.values()].flatMap((t=>s.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...f].join(", "))}}So=xo,Co([x()],Ro.prototype,"exportpartsPrefix",void 0),Co([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return x({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!R(t,o),...null!=o?o:{}})}([])],Ro.prototype,"exportpartsPrefixes",void 0),Co([x()],Ro.prototype,"customStylesheet",void 0);const Uo=yo.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");var Eo,Lo;ht`
66
+ .highlight-html-match {
67
+ background: ${Uo};
68
+ }
69
+ `,ht`
66
70
  .ft-no-text-select {
67
71
  -webkit-touch-callout: none;
68
72
  -webkit-user-select: none;
@@ -94,32 +98,32 @@ class fo extends Et{constructor(){super(...arguments),this.renderOptions={host:t
94
98
  display: inline-block;
95
99
  width: 0;
96
100
  }
97
- `,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Eo=null===(Uo=window.safari)||void 0===Uo?void 0:Uo.pushNotification)||void 0===Eo||Eo.toString());const Lo={display:yo.create("--ft-skeleton--display","","DISPLAY","block"),width:yo.create("--ft-skeleton--width","","SIZE","100%"),height:yo.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:yo.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:yo.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:yo.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:yo.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:yo.external(bo.borderRadiusM,"Design system")},Io=ht`
101
+ `,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Lo=null===(Eo=window.safari)||void 0===Eo?void 0:Eo.pushNotification)||void 0===Lo||Lo.toString());const Io={display:yo.create("--ft-skeleton--display","","DISPLAY","block"),width:yo.create("--ft-skeleton--width","","SIZE","100%"),height:yo.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:yo.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:yo.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:yo.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:yo.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:yo.external(bo.borderRadiusM,"Design system")},Wo=ht`
98
102
  :host {
99
- width: ${Lo.width};
100
- height: ${Lo.height};
101
- display: ${Lo.display};
103
+ width: ${Io.width};
104
+ height: ${Io.height};
105
+ display: ${Io.display};
102
106
  overflow: hidden;
103
- border-radius: ${Lo.borderRadiusM};
107
+ border-radius: ${Io.borderRadiusM};
104
108
  background: linear-gradient(
105
109
  90deg,
106
110
  transparent,
107
- ${Lo.glareColor} calc(0.45 * ${Lo.glareWidth}),
108
- ${Lo.glareColor} calc(0.55 * ${Lo.glareWidth}),
109
- transparent ${Lo.glareWidth}
110
- ), ${Lo.backgroundColor};
111
+ ${Io.glareColor} calc(0.45 * ${Io.glareWidth}),
112
+ ${Io.glareColor} calc(0.55 * ${Io.glareWidth}),
113
+ transparent ${Io.glareWidth}
114
+ ), ${Io.backgroundColor};
111
115
  background-repeat: repeat-y;
112
116
  background-size: 100vw 100vh;
113
117
  background-attachment: fixed;
114
- background-position: calc(${Lo.glareWidth} * -1) 0;
115
- animation: shine ${Lo.animationDuration} infinite;
118
+ background-position: calc(${Io.glareWidth} * -1) 0;
119
+ animation: shine ${Io.animationDuration} infinite;
116
120
  animation-timing-function: linear;
117
121
  }
118
122
 
119
123
  @keyframes shine {
120
124
  to {
121
- background-position: calc(100vw + ${Lo.glareWidth}) 0, calc(${Lo.glareWidth} * -1) 0;
125
+ background-position: calc(100vw + ${Io.glareWidth}) 0, calc(${Io.glareWidth} * -1) 0;
122
126
  }
123
127
  }
124
- `;class Wo extends Ro{render(){return Yt`
125
- `}}var ko;Wo.elementDefinitions={},Wo.styles=Io,(ko="ft-skeleton",t=>{window.customElements.get(ko)||window.customElements.define(ko,t)})(Wo),t.FtSkeleton=Wo,t.FtSkeletonCssVariables=Lo,t.styles=Io}({});
128
+ `;class ko extends Ro{render(){return Yt`
129
+ `}}var Ko;ko.elementDefinitions={},ko.styles=Wo,(Ko="ft-skeleton",t=>{window.customElements.get(Ko)||window.customElements.define(Ko,t)})(ko),t.FtSkeleton=ko,t.FtSkeletonCssVariables=Io,t.styles=Wo}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-skeleton",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Placeholder for loading content",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,8 +19,8 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "1.1.1",
22
+ "@fluid-topics/ft-wc-utils": "1.1.2",
23
23
  "lit": "3.1.0"
24
24
  },
25
- "gitHead": "ceae4aed142c27cbf6034f45bb6e3f562163cc15"
25
+ "gitHead": "53ce99f657872582bca43cbb7ad691b239b22823"
26
26
  }