@fluid-topics/ft-reader-metadata 1.0.5 → 1.0.8

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.
@@ -165,7 +165,7 @@ const V=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
165
165
  </div>
166
166
  </div>
167
167
  </div>
168
- `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=i.height,n=o;break;case"left":r=e,n=-this.tooltip.clientWidth;break;case"right":r=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${i.width}px, ${xi})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}mi.elementDefinitions={"ft-typography":fi},mi.styles=bi,yi([o.property()],mi.prototype,"text",void 0),yi([o.property({type:Boolean})],mi.prototype,"manual",void 0),yi([o.property({type:Boolean})],mi.prototype,"inline",void 0),yi([o.property({type:Number})],mi.prototype,"delay",void 0),yi([o.property()],mi.prototype,"position",void 0),yi([o.queryAssignedNodes("",!0)],mi.prototype,"slotNodes",void 0),yi([o.query(".ft-tooltip--container")],mi.prototype,"container",void 0),yi([o.query("slot")],mi.prototype,"target",void 0),yi([o.query(".ft-tooltip")],mi.prototype,"tooltip",void 0),yi([o.query(".ft-tooltip--content")],mi.prototype,"tooltipContent",void 0),yi([o.state()],mi.prototype,"visible",void 0),i.customElement("ft-tooltip")(mi);const $i=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),wi={color:$i,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",$i),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},ki=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),zi=ki,Si=i.FtCssVariableFactory.extend("--ft-ripple-background-color",ki),Ci=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),Ii=Ci,Oi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Ci),ji=e.css`
168
+ `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=i.height,n=o;break;case"left":r=e,n=-this.tooltip.clientWidth;break;case"right":r=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=4-i.left);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${i.width}px, ${xi})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}mi.elementDefinitions={"ft-typography":fi},mi.styles=bi,yi([o.property()],mi.prototype,"text",void 0),yi([o.property({type:Boolean})],mi.prototype,"manual",void 0),yi([o.property({type:Boolean})],mi.prototype,"inline",void 0),yi([o.property({type:Number})],mi.prototype,"delay",void 0),yi([o.property()],mi.prototype,"position",void 0),yi([o.queryAssignedNodes("",!0)],mi.prototype,"slotNodes",void 0),yi([o.query(".ft-tooltip--container")],mi.prototype,"container",void 0),yi([o.query("slot")],mi.prototype,"target",void 0),yi([o.query(".ft-tooltip")],mi.prototype,"tooltip",void 0),yi([o.query(".ft-tooltip--content")],mi.prototype,"tooltipContent",void 0),yi([o.state()],mi.prototype,"visible",void 0),i.customElement("ft-tooltip")(mi);const $i=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),wi={color:$i,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",$i),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},ki=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),zi=ki,Si=i.FtCssVariableFactory.extend("--ft-ripple-background-color",ki),Ci=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),Ii=Ci,Oi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Ci),ji=e.css`
169
169
  :host {
170
170
  display: contents;
171
171
  }
@@ -94,7 +94,7 @@ var ft,dt;let ut=class extends N{constructor(){super(...arguments),this.renderOp
94
94
  display: inline-block;
95
95
  width: 0;
96
96
  }
97
- `;var Nt,Rt;const Mt=Symbol("internalStoresUnsubscribers"),zt=Symbol("internalStores");class jt extends kt{constructor(){super(...arguments),this[Nt]=new Map,this[Rt]=new Map}getUnnamedStore(){if(this[zt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[zt].get(t)}addStore(t,i){i=null!=i?i:t.name,this.unsubscribeFromStore(i),this.setupStore(i,t)}removeStore(t){const i="string"==typeof t?t:t.name;this.unsubscribeFromStore(i),this[zt].delete(i)}setupStore(t,i){this[zt].set(t,i),this.subscribeToStore(t,i),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[zt].forEach(((t,i)=>this.subscribeToStore(i,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,i)=>{const e=this.constructor.getPropertyOptions(i);if(!(null==e?void 0:e.attribute)||!this.hasAttribute("string"==typeof(null==e?void 0:e.attribute)?e.attribute:i)){const e=this.getStore(t.store);e&&(this[i]=t.selector(e.getState(),this))}}))}subscribeToStore(t,i){this[Mt].set(t,i.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this[Mt]).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this[Mt].has(t)&&this[Mt].get(t)(),this[Mt].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}var Ut,Ft,Bt;Nt=Mt,Rt=zt;const Tt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Bt=null===(Ft=null===(Ut=window.safari)||void 0===Ut?void 0:Ut.pushNotification)||void 0===Ft?void 0:Ft.toString())&&void 0!==Bt?Bt:""),It=y`
97
+ `;var Nt,Rt;const Mt=Symbol("internalStoresUnsubscribers"),zt=Symbol("internalStores");class jt extends kt{constructor(){super(...arguments),this[Nt]=new Map,this[Rt]=new Map}getUnnamedStore(){if(this[zt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[zt].get(t)}addStore(t,i){i=null!=i?i:function(t){var i;return null!==(i=null==t?void 0:t.isFtReduxStore)&&void 0!==i&&i}(t)?t.name:void 0,this.unsubscribeFromStore(i),this.setupStore(i,t)}removeStore(t){const i="string"==typeof t?t:t.name;this.unsubscribeFromStore(i),this[zt].delete(i)}setupStore(t,i){this[zt].set(t,i),this.subscribeToStore(t,i),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[zt].forEach(((t,i)=>this.subscribeToStore(i,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,i)=>{const e=this.constructor.getPropertyOptions(i);if(!(null==e?void 0:e.attribute)||!this.hasAttribute("string"==typeof(null==e?void 0:e.attribute)?e.attribute:i)){const e=this.getStore(t.store);e&&(this[i]=t.selector(e.getState(),this))}}))}subscribeToStore(t,i){this[Mt].set(t,i.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this[Mt]).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this[Mt].has(t)&&this[Mt].get(t)(),this[Mt].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}var Ut,Ft,Bt;Nt=Mt,Rt=zt;const Tt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Bt=null===(Ft=null===(Ut=window.safari)||void 0===Ut?void 0:Ut.pushNotification)||void 0===Ft?void 0:Ft.toString())&&void 0!==Bt?Bt:""),It=y`
98
98
  :host {
99
99
  display: inline-block;
100
100
  }
@@ -255,7 +255,7 @@ var ft,dt;let ut=class extends N{constructor(){super(...arguments),this.renderOp
255
255
  </div>
256
256
  </div>
257
257
  </div>
258
- `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=i.height,n=o;break;case"left":r=e,n=-this.tooltip.clientWidth;break;case"right":r=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${i.width}px, ${pe})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}ue.elementDefinitions={"ft-typography":re},ue.styles=fe,de([o()],ue.prototype,"text",void 0),de([o({type:Boolean})],ue.prototype,"manual",void 0),de([o({type:Boolean})],ue.prototype,"inline",void 0),de([o({type:Number})],ue.prototype,"delay",void 0),de([o()],ue.prototype,"position",void 0),de([
258
+ `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=i.height,n=o;break;case"left":r=e,n=-this.tooltip.clientWidth;break;case"right":r=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=4-i.left);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${i.width}px, ${pe})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}ue.elementDefinitions={"ft-typography":re},ue.styles=fe,de([o()],ue.prototype,"text",void 0),de([o({type:Boolean})],ue.prototype,"manual",void 0),de([o({type:Boolean})],ue.prototype,"inline",void 0),de([o({type:Number})],ue.prototype,"delay",void 0),de([o()],ue.prototype,"position",void 0),de([
259
259
  /**
260
260
  * @license
261
261
  * Copyright 2017 Google LLC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-metadata",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "Metadata for integrated reader",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,11 +19,11 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-chip": "1.0.5",
23
- "@fluid-topics/ft-reader-context": "1.0.5",
24
- "@fluid-topics/ft-tooltip": "1.0.5",
25
- "@fluid-topics/ft-wc-utils": "1.0.5",
22
+ "@fluid-topics/ft-chip": "1.0.8",
23
+ "@fluid-topics/ft-reader-context": "1.0.8",
24
+ "@fluid-topics/ft-tooltip": "1.0.8",
25
+ "@fluid-topics/ft-wc-utils": "1.0.8",
26
26
  "lit": "2.7.2"
27
27
  },
28
- "gitHead": "a4987091424b3c8b5e36193a8b854eddfe44d439"
28
+ "gitHead": "b55ea6fbe362f72c42f5c26f705fde8e39261001"
29
29
  }