@fluid-topics/ft-reader-metadata 1.0.1 → 1.0.3
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){["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=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`
|
|
169
169
|
:host {
|
|
170
170
|
display: contents;
|
|
171
171
|
}
|
|
@@ -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){["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=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([
|
|
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.
|
|
3
|
+
"version": "1.0.3",
|
|
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.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "1.0.
|
|
24
|
-
"@fluid-topics/ft-tooltip": "1.0.
|
|
25
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-chip": "1.0.3",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "1.0.3",
|
|
24
|
+
"@fluid-topics/ft-tooltip": "1.0.3",
|
|
25
|
+
"@fluid-topics/ft-wc-utils": "1.0.3",
|
|
26
26
|
"lit": "2.7.2"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "8c7b95fa60f5ac8dd10301abb40dd62ff4f9b335"
|
|
29
29
|
}
|