@fluid-topics/ft-reader-topic-metadata 1.1.12 → 1.1.14
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.
|
@@ -161,7 +161,7 @@ const J=Symbol.for(""),Q=t=>{if(t?.r===J)return t?._$litStatic$},tt=t=>({_$litSt
|
|
|
161
161
|
@focusin=${this.onHover}
|
|
162
162
|
@focusout=${this.onOut}
|
|
163
163
|
@touchstart=${this.onTouch}>
|
|
164
|
-
<slot part="slot"></slot>
|
|
164
|
+
<slot part="slot" @click=${this.onClick}></slot>
|
|
165
165
|
<div part="tooltip" role="tooltip" inert
|
|
166
166
|
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
167
167
|
?hidden=${!this.visible}>
|
|
@@ -171,7 +171,7 @@ const J=Symbol.for(""),Q=t=>{if(t?.r===J)return t?._$litStatic$},tt=t=>({_$litSt
|
|
|
171
171
|
</div>
|
|
172
172
|
</div>
|
|
173
173
|
</div>
|
|
174
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",ke(this.slottedElement,this.tooltip,{platform:{...Re,getOffsetParent:t=>Re.getOffsetParent(t,Ee)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:r,placement:i}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...c}=Ao(t,o),p={x:e,y:r},s=await Xo(o,c),f=jo(Ho(i)),d=Po(f);let h=p[d],g=p[f];if(n){const t="y"===d?"bottom":"right";h=Do(h+s["y"===d?"top":"left"],h,h-s[t])}if(a){const t="y"===f?"bottom":"right";g=Do(g+s["y"===f?"top":"left"],g,g-s[t])}const y=l.fn({...o,[d]:h,[f]:g});return{...y,data:{x:y.x-e,y:y.y-r}}}}),Jo({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Le.elementDefinitions={"ft-typography":So},Le.styles=Eo,We([r.property()],Le.prototype,"text",void 0),We([r.property({type:Boolean})],Le.prototype,"manual",void 0),We([r.property({type:Boolean})],Le.prototype,"inline",void 0),We([r.property({type:Number})],Le.prototype,"delay",void 0),We([r.property()],Le.prototype,"position",void 0),We([r.queryAssignedNodes()],Le.prototype,"slotNodes",void 0),We([r.query(".ft-tooltip--container")],Le.prototype,"container",void 0),We([r.query(".ft-tooltip")],Le.prototype,"tooltip",void 0),We([r.query(".ft-tooltip--content")],Le.prototype,"tooltipContent",void 0),We([r.state()],Le.prototype,"visible",void 0),We([r.eventOptions({passive:!0})],Le.prototype,"onTouch",null),We([r.eventOptions({passive:!0})],Le.prototype,"onHover",null),We([r.eventOptions({passive:!0})],Le.prototype,"onOut",null),o.customElement("ft-tooltip")(Le);const ze=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorContent),Ke={color:ze,backgroundColor:o.FtCssVariableFactory.extend("--ft-ripple-background-color","",ze),opacityContentOnSurfacePressed:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Ze=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorPrimary),Be=Ze,Fe=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ze),De=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorSecondary),Ae=De,He=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",De),Ge=e.css`
|
|
174
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",ke(this.slottedElement,this.tooltip,{platform:{...Re,getOffsetParent:t=>Re.getOffsetParent(t,Ee)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:r,placement:i}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...c}=Ao(t,o),p={x:e,y:r},s=await Xo(o,c),f=jo(Ho(i)),d=Po(f);let h=p[d],g=p[f];if(n){const t="y"===d?"bottom":"right";h=Do(h+s["y"===d?"top":"left"],h,h-s[t])}if(a){const t="y"===f?"bottom":"right";g=Do(g+s["y"===f?"top":"left"],g,g-s[t])}const y=l.fn({...o,[d]:h,[f]:g});return{...y,data:{x:y.x-e,y:y.y-r}}}}),Jo({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Le.elementDefinitions={"ft-typography":So},Le.styles=Eo,We([r.property()],Le.prototype,"text",void 0),We([r.property({type:Boolean})],Le.prototype,"manual",void 0),We([r.property({type:Boolean})],Le.prototype,"inline",void 0),We([r.property({type:Number})],Le.prototype,"delay",void 0),We([r.property()],Le.prototype,"position",void 0),We([r.queryAssignedNodes()],Le.prototype,"slotNodes",void 0),We([r.query(".ft-tooltip--container")],Le.prototype,"container",void 0),We([r.query(".ft-tooltip")],Le.prototype,"tooltip",void 0),We([r.query(".ft-tooltip--content")],Le.prototype,"tooltipContent",void 0),We([r.state()],Le.prototype,"visible",void 0),We([r.eventOptions({passive:!0})],Le.prototype,"onTouch",null),We([r.eventOptions({passive:!0})],Le.prototype,"onHover",null),We([r.eventOptions({passive:!0})],Le.prototype,"onOut",null),We([r.eventOptions({passive:!0})],Le.prototype,"onClick",null),o.customElement("ft-tooltip")(Le);const ze=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorContent),Ke={color:ze,backgroundColor:o.FtCssVariableFactory.extend("--ft-ripple-background-color","",ze),opacityContentOnSurfacePressed:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Ze=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorPrimary),Be=Ze,Fe=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ze),De=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorSecondary),Ae=De,He=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",De),Ge=e.css`
|
|
175
175
|
:host {
|
|
176
176
|
display: contents;
|
|
177
177
|
}
|
|
@@ -280,7 +280,7 @@ class bo extends zt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
280
280
|
@focusin=${this.onHover}
|
|
281
281
|
@focusout=${this.onOut}
|
|
282
282
|
@touchstart=${this.onTouch}>
|
|
283
|
-
<slot part="slot"></slot>
|
|
283
|
+
<slot part="slot" @click=${this.onClick}></slot>
|
|
284
284
|
<div part="tooltip" role="tooltip" inert
|
|
285
285
|
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
286
286
|
?hidden=${!this.visible}>
|
|
@@ -290,7 +290,7 @@ class bo extends zt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
290
290
|
</div>
|
|
291
291
|
</div>
|
|
292
292
|
</div>
|
|
293
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Lr(this.slottedElement,this.tooltip,{platform:{...Ir,getOffsetParent:t=>Ir.getOffsetParent(t,Wr)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:i,placement:r}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...l}=Hi(t,o),c={x:e,y:i},p=await Qi(o,l),f=Yi(Ti(r)),h=_i(f);let d=c[h],u=c[f];if(n){const t="y"===h?"bottom":"right";d=Pi(d+p["y"===h?"top":"left"],d,d-p[t])}if(a){const t="y"===f?"bottom":"right";u=Pi(u+p["y"===f?"top":"left"],u,u-p[t])}const y=s.fn({...o,[h]:d,[f]:u});return{...y,data:{x:y.x-e,y:y.y-i}}}}),or({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Fr.elementDefinitions={"ft-typography":$i},Fr.styles=Wi,Kr([C()],Fr.prototype,"text",void 0),Kr([C({type:Boolean})],Fr.prototype,"manual",void 0),Kr([C({type:Boolean})],Fr.prototype,"inline",void 0),Kr([C({type:Number})],Fr.prototype,"delay",void 0),Kr([C()],Fr.prototype,"position",void 0),Kr([function(t){return(o,e)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return E(0,0,{get(){const o=this.renderRoot?.querySelector(r);return o?.assignedNodes(t)??[]}})}}()],Fr.prototype,"slotNodes",void 0),Kr([k(".ft-tooltip--container")],Fr.prototype,"container",void 0),Kr([k(".ft-tooltip")],Fr.prototype,"tooltip",void 0),Kr([k(".ft-tooltip--content")],Fr.prototype,"tooltipContent",void 0),Kr([$()],Fr.prototype,"visible",void 0),Kr([R({passive:!0})],Fr.prototype,"onTouch",null),Kr([R({passive:!0})],Fr.prototype,"onHover",null),Kr([R({passive:!0})],Fr.prototype,"onOut",null),I("ft-tooltip")(Fr);
|
|
293
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Lr(this.slottedElement,this.tooltip,{platform:{...Ir,getOffsetParent:t=>Ir.getOffsetParent(t,Wr)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:i,placement:r}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...l}=Hi(t,o),c={x:e,y:i},p=await Qi(o,l),f=Yi(Ti(r)),h=_i(f);let d=c[h],u=c[f];if(n){const t="y"===h?"bottom":"right";d=Pi(d+p["y"===h?"top":"left"],d,d-p[t])}if(a){const t="y"===f?"bottom":"right";u=Pi(u+p["y"===f?"top":"left"],u,u-p[t])}const y=s.fn({...o,[h]:d,[f]:u});return{...y,data:{x:y.x-e,y:y.y-i}}}}),or({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Fr.elementDefinitions={"ft-typography":$i},Fr.styles=Wi,Kr([C()],Fr.prototype,"text",void 0),Kr([C({type:Boolean})],Fr.prototype,"manual",void 0),Kr([C({type:Boolean})],Fr.prototype,"inline",void 0),Kr([C({type:Number})],Fr.prototype,"delay",void 0),Kr([C()],Fr.prototype,"position",void 0),Kr([function(t){return(o,e)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return E(0,0,{get(){const o=this.renderRoot?.querySelector(r);return o?.assignedNodes(t)??[]}})}}()],Fr.prototype,"slotNodes",void 0),Kr([k(".ft-tooltip--container")],Fr.prototype,"container",void 0),Kr([k(".ft-tooltip")],Fr.prototype,"tooltip",void 0),Kr([k(".ft-tooltip--content")],Fr.prototype,"tooltipContent",void 0),Kr([$()],Fr.prototype,"visible",void 0),Kr([R({passive:!0})],Fr.prototype,"onTouch",null),Kr([R({passive:!0})],Fr.prototype,"onHover",null),Kr([R({passive:!0})],Fr.prototype,"onOut",null),Kr([R({passive:!0})],Fr.prototype,"onClick",null),I("ft-tooltip")(Fr);
|
|
294
294
|
/**
|
|
295
295
|
* @license
|
|
296
296
|
* Copyright 2017 Google LLC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-topic-metadata",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"description": "Metadata of a topic in integrated reader.",
|
|
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.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.1.14",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "f58494852acf5409f0881678c76cd0af9a203482"
|
|
26
26
|
}
|