@fluid-topics/ft-top-bar 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,7 +98,7 @@ 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={colorSurface:yo.external(bo.colorSurface,"Design system"),elevation02:yo.external(bo.elevation02,"Design system"),titleFont:yo.external(bo.titleFont,"Design system"),colorOnSurfaceHigh:yo.external(bo.colorOnSurfaceHigh,"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={colorSurface:yo.external(bo.colorSurface,"Design system"),elevation02:yo.external(bo.elevation02,"Design system"),titleFont:yo.external(bo.titleFont,"Design system"),colorOnSurfaceHigh:yo.external(bo.colorOnSurfaceHigh,"Design system")},Wo=ht`
98
102
  :host {
99
103
  display: block;
100
104
  position: absolute;
@@ -106,13 +110,13 @@ class fo extends Et{constructor(){super(...arguments),this.renderOptions={host:t
106
110
  }
107
111
 
108
112
  #container {
109
- background: ${Lo.colorSurface};
113
+ background: ${Io.colorSurface};
110
114
  display: flex;
111
115
  align-items: center;
112
- box-shadow: ${Lo.elevation02};
116
+ box-shadow: ${Io.elevation02};
113
117
  padding: 0 16px;
114
118
  height: 100%;
115
- font-family: ${Lo.titleFont}, system-ui, sans-serif;
119
+ font-family: ${Io.titleFont}, system-ui, sans-serif;
116
120
  }
117
121
 
118
122
  #left {
@@ -130,7 +134,7 @@ class fo extends Et{constructor(){super(...arguments),this.renderOptions={host:t
130
134
  }
131
135
 
132
136
  .title {
133
- color: ${Lo.colorOnSurfaceHigh};
137
+ color: ${Io.colorOnSurfaceHigh};
134
138
  -webkit-font-smoothing: antialiased;
135
139
  font-size: 0.875rem;
136
140
  line-height: 2.25rem;
@@ -145,7 +149,7 @@ class fo extends Et{constructor(){super(...arguments),this.renderOptions={host:t
145
149
  align-items: center;
146
150
  min-width: 0;
147
151
  }
148
- `;var Wo,ko=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};class Ko extends Ro{constructor(){super(...arguments),this.title="",this.heading=""}render(){return Yt`
152
+ `;var ko,Ko=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};class Zo extends Ro{constructor(){super(...arguments),this.title="",this.heading=""}render(){return Yt`
149
153
  <div id="container">
150
154
  <div id="left">
151
155
  <span class="title" ?hidden=${!this.title&&!this.heading}>${this.heading||this.title}</span>
@@ -155,4 +159,4 @@ class fo extends Et{constructor(){super(...arguments),this.renderOptions={host:t
155
159
  <slot name="rightSlot"></slot>
156
160
  </div>
157
161
  </div>
158
- `}}Ko.elementDefinitions={},Ko.styles=Io,ko([x({type:String})],Ko.prototype,"title",void 0),ko([x({type:String})],Ko.prototype,"heading",void 0),(Wo="ft-top-bar",t=>{window.customElements.get(Wo)||window.customElements.define(Wo,t)})(Ko),t.FtTopBar=Ko,t.FtTopBarCssVariables=Lo,t.styles=Io}({});
162
+ `}}Zo.elementDefinitions={},Zo.styles=Wo,Ko([x({type:String})],Zo.prototype,"title",void 0),Ko([x({type:String})],Zo.prototype,"heading",void 0),(ko="ft-top-bar",t=>{window.customElements.get(ko)||window.customElements.define(ko,t)})(Zo),t.FtTopBar=Zo,t.FtTopBarCssVariables=Io,t.styles=Wo}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-top-bar",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A top bar for FT admin screens",
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
  }