@fluid-topics/ft-reader-title 0.3.57 → 0.3.60
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.
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
!function(t,i,e,o){var n,s=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(n=t[h])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class r extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class h extends(function(t){class i extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(
|
|
1
|
+
!function(t,i,e,o){var n,s=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(n=t[h])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class r extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class h extends(function(t){class i extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new r)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return s([o.state()],i.prototype,"stateManager",void 0),i}(i.FtLitElementRedux)){}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const
|
|
6
|
+
*/const a=window,l=a.trustedTypes,f=l?l.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,y="?"+p,g=`<${y}>`,c=document,d=(t="")=>c.createComment(t),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,b=/>/g,x=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),w=/'/g,z=/"/g,_=/^(?:script|style|textarea|title)$/i,A=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),S=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),j=new WeakMap,O=c.createTreeWalker(c,129,null,!1),T=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=$;for(let i=0;i<e;i++){const e=t[i];let h,a,l=-1,f=0;for(;f<e.length&&(r.lastIndex=f,a=r.exec(e),null!==a);)f=r.lastIndex,r===$?"!--"===a[1]?r=m:void 0!==a[1]?r=b:void 0!==a[2]?(_.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=x):void 0!==a[3]&&(r=x):r===x?">"===a[0]?(r=null!=n?n:$,l=-1):void 0===a[1]?l=-2:(l=r.lastIndex-a[2].length,h=a[1],r=void 0===a[3]?x:'"'===a[3]?z:w):r===z||r===w?r=x:r===m||r===b?r=$:(r=x,n=void 0);const y=r===x&&t[i+1].startsWith("/>")?" ":"";s+=r===$?e+g:l>=0?(o.push(h),e.slice(0,l)+"$lit$"+e.slice(l)+p+y):e+p+(-2===l?(o.push(void 0),i):y)}const h=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(h):h,o]};class E{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,h=this.parts,[a,f]=T(t,i);if(this.el=E.createElement(a,e),O.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=O.nextNode())&&h.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(p)){const e=f[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(p),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?R:"?"===i[1]?k:"@"===i[1]?Z:I})}else h.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(_.test(o.tagName)){const t=o.textContent.split(p),i=t.length-1;if(i>0){o.textContent=l?l.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],d()),O.nextNode(),h.push({type:2,index:++n});o.append(t[i],d())}}}else if(8===o.nodeType)if(o.data===y)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(p,t+1));)h.push({type:7,index:n}),t+=p.length-1}n++}}static createElement(t,i){const e=c.createElement("template");return e.innerHTML=t,e}}function M(t,i,e=t,o){var n,s,r,h;if(i===S)return i;let a=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const l=u(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(h=e)._$Co)&&void 0!==r?r:h._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=M(t,a._$AS(t,i.values),a,o)),i}class U{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:c).importNode(e,!0);O.currentNode=n;let s=O.nextNode(),r=0,h=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new C(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new G(s,this,t)),this.u.push(i),a=o[++h]}r!==(null==a?void 0:a.index)&&(s=O.nextNode(),r++)}return n}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class C{constructor(t,i,e,o){var n;this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),u(t)?t===N||null==t||""===t?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==S&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>v(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==N&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(c.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=E.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.p(e);else{const t=new U(n,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=j.get(t.strings);return void 0===i&&j.set(t.strings,i=new E(t)),i}k(t){v(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new C(this.O(d()),this.O(d()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class I{constructor(t,i,e,o,n){this.type=1,this._$AH=N,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=N}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=M(this,t,i,0),s=!u(t)||t!==this._$AH&&t!==S,s&&(this._$AH=t);else{const o=t;let r,h;for(t=n[0],r=0;r<n.length-1;r++)h=M(this,o[e+r],i,r),h===S&&(h=this._$AH[r]),s||(s=!u(h)||h!==this._$AH[r]),h===N?t=N:t!==N&&(t+=(null!=h?h:"")+n[r+1]),this._$AH[r]=h}s&&!o&&this.j(t)}j(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends I{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===N?void 0:t}}const W=l?l.emptyScript:"";class k extends I{constructor(){super(...arguments),this.type=4}j(t){t&&t!==N?this.element.setAttribute(this.name,W):this.element.removeAttribute(this.name)}}class Z extends I{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=M(this,t,i,0))&&void 0!==e?e:N)===S)return;const o=this._$AH,n=t===N&&o!==N||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==N&&(o===N||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class G{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const H=a.litHtmlPolyfillSupport;null==H||H(E,C),(null!==(n=a.litHtmlVersions)&&void 0!==n?n:a.litHtmlVersions=[]).push("2.4.0");
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2020 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
const F=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t._$litStatic$},B=t=>({_$litStatic$:t,r:F}),L=new Map,q=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],h=[];let l
|
|
12
|
+
const F=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t._$litStatic$},B=t=>({_$litStatic$:t,r:F}),L=new Map,q=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],h=[];let a,l=0,f=!1;for(;l<o;){for(a=i[l];l<o&&void 0!==(s=e[l],n=K(s));)a+=n+i[++l],f=!0;h.push(s),r.push(a),l++}if(l===o&&r.push(i[o]),f){const t=r.join("$$lit$$");void 0===(i=L.get(t))&&(r.raw=r,L.set(t,i=r)),e=h}return t(i,...e)})(A);var D;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(D||(D={}));const J=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),P=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Q={fontFamily:P,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},V={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-title-font-family",J),fontSize:i.FtCssVariableFactory.extend("--ft-typography-title-font-size",Q.fontSize,"20px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Q.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Q.letterSpacing,"0.15px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-title-line-height",Q.lineHeight,"1.2"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Q.textTransform,"inherit")},X=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",J),Y=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Q.fontSize,"14px"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Q.fontWeight,"normal"),it=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Q.letterSpacing,"0.105px"),et=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Q.lineHeight,"1.7"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Q.textTransform,"inherit"),nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",P),st=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",Q.fontSize,"16px"),rt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Q.fontWeight,"600"),ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",Q.letterSpacing,"0.144px"),at=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",Q.lineHeight,"1.5"),lt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",Q.textTransform,"inherit"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",P),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",Q.fontSize,"14px"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",Q.fontWeight,"normal"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",Q.letterSpacing,"0.098px"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",Q.lineHeight,"1.7"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",Q.textTransform,"inherit"),ut=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",P),vt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",Q.fontSize,"16px"),$t=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",Q.fontWeight,"normal"),mt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",Q.letterSpacing,"0.496px"),bt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",Q.lineHeight,"1.5"),xt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",Q.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",P),zt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",Q.fontSize,"14px"),_t=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",Q.fontWeight,"normal"),At=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",Q.letterSpacing,"0.252px"),St=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",Q.lineHeight,"1.4"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",Q.textTransform,"inherit"),jt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",P),Ot=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",Q.fontSize,"12px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",Q.fontWeight,"normal"),Et=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",Q.letterSpacing,"0.396px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",Q.lineHeight,"1.33"),Ut=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",Q.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",P),It=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",Q.fontSize,"10px"),Rt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",Q.fontWeight,"normal"),Wt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",Q.letterSpacing,"0.33px"),kt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",Q.lineHeight,"1.6"),Zt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",Q.textTransform,"inherit"),Gt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",P),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",Q.fontSize,"10px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",Q.fontWeight,"normal"),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",Q.letterSpacing,"1.5px"),Bt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",Q.lineHeight,"1.6"),Lt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",Q.textTransform,"uppercase"),qt=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",P),Dt=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",Q.fontSize,"14px"),Jt=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",Q.fontWeight,"600"),Pt=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",Q.letterSpacing,"1.246px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",Q.lineHeight,"1.15"),Vt=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",Q.textTransform,"uppercase"),Xt=e.css`
|
|
13
13
|
.ft-typography--title {
|
|
14
14
|
font-family: ${V.fontFamily};
|
|
15
15
|
font-size: ${V.fontSize};
|
|
@@ -33,8 +33,8 @@ const F=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t
|
|
|
33
33
|
font-size: ${st};
|
|
34
34
|
font-weight: ${rt};
|
|
35
35
|
letter-spacing: ${ht};
|
|
36
|
-
line-height: ${
|
|
37
|
-
text-transform: ${
|
|
36
|
+
line-height: ${at};
|
|
37
|
+
text-transform: ${lt};
|
|
38
38
|
}
|
|
39
39
|
`,ii=e.css`
|
|
40
40
|
.ft-typography--subtitle2 {
|
|
@@ -100,17 +100,17 @@ const F=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t
|
|
|
100
100
|
line-height: ${Qt};
|
|
101
101
|
text-transform: ${Vt};
|
|
102
102
|
}
|
|
103
|
-
`,
|
|
103
|
+
`,ai=e.css`
|
|
104
104
|
.ft-typography {
|
|
105
105
|
vertical-align: inherit;
|
|
106
106
|
}
|
|
107
|
-
`;var
|
|
107
|
+
`;var li=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(n=t[h])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class fi extends i.FtLitElement{constructor(){super(...arguments),this.variant=D.body1}render(){return this.element?q`
|
|
108
108
|
<${B(this.element)}
|
|
109
109
|
class="ft-typography ft-typography--${this.variant}">
|
|
110
110
|
<slot></slot>
|
|
111
111
|
</${B(this.element)}>
|
|
112
112
|
`:q`
|
|
113
113
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
114
|
-
`}}fi.styles=[Xt,Yt,ti,ii,ei,oi,ni,si,ri,hi,
|
|
114
|
+
`}}fi.styles=[Xt,Yt,ti,ii,ei,oi,ni,si,ri,hi,ai],li([o.property()],fi.prototype,"element",void 0),li([o.property()],fi.prototype,"variant",void 0),i.customElement("ft-typography")(fi);var pi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(n=t[h])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class yi extends h{render(){return this.mapTitle?e.html`
|
|
115
115
|
<ft-typography variant="title" part="text">${this.mapTitle}</ft-typography>
|
|
116
116
|
`:e.nothing}}yi.elementDefinitions={"ft-typography":fi},pi([i.redux((t=>{var i;return null===(i=t.map)||void 0===i?void 0:i.title}))],yi.prototype,"mapTitle",void 0);const gi={fontSize:i.FtCssVariableFactory.extend("--ft-reader-metadata-font-size",V.fontSize)};i.customElement("ft-reader-title")(yi),t.FtReaderTitle=yi,t.FtReaderTitleCssVariables=gi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
|
|
@@ -29,12 +29,13 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2021 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/var n;
|
|
32
|
+
*/var n;function s(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,o,r;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(o=i;0!=o--;)if(!s(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!s(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,r[o]))return!1;for(o=i;0!=o--;){var n=r[o];if(!s(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}null===(n=window.HTMLSlotElement)||void 0===n||n.prototype.assignedElements;const a=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};
|
|
33
33
|
/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2019 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/
|
|
37
|
+
*/
|
|
38
|
+
const l=window,h=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),p=new WeakMap;class f{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(h&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=p.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&p.set(e,t))}return t}toString(){return this.cssText}}const u=t=>new f("string"==typeof t?t:t+"",void 0,c),d=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new f(i,t,c)},y=(t,e)=>{h?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=l.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},g=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return u(e)})(t):t
|
|
38
39
|
/**
|
|
39
40
|
* @license
|
|
40
41
|
* Copyright 2017 Google LLC
|
|
@@ -61,7 +62,7 @@ var at,lt;class ht extends N{constructor(){super(...arguments),this.renderOption
|
|
|
61
62
|
<style>${t}</style>
|
|
62
63
|
`))}
|
|
63
64
|
${this.getTemplate()}
|
|
64
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).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.exportpartsDebouncer.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 e,i,o,r,n,s;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}ut([o()],dt.prototype,"exportpartsPrefix",void 0),ut([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],dt.prototype,"exportpartsPrefixes",void 0),ut([o()],dt.prototype,"customStylesheet",void 0),d`
|
|
65
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).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.exportpartsDebouncer.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 e,i,o,r,n,s;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}ut([o()],dt.prototype,"exportpartsPrefix",void 0),ut([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!s(t,e),...null!=e?e:{}})}([])],dt.prototype,"exportpartsPrefixes",void 0),ut([o()],dt.prototype,"customStylesheet",void 0),d`
|
|
65
66
|
.ft-no-text-select {
|
|
66
67
|
-webkit-touch-callout: none;
|
|
67
68
|
-webkit-user-select: none;
|
|
@@ -93,7 +94,7 @@ var at,lt;class ht extends N{constructor(){super(...arguments),this.renderOption
|
|
|
93
94
|
display: inline-block;
|
|
94
95
|
width: 0;
|
|
95
96
|
}
|
|
96
|
-
`;const yt=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged);class gt extends dt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:vt(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:vt(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function vt(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}var bt,mt;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(mt=null===(bt=window.safari)||void 0===bt?void 0:bt.pushNotification)||void 0===mt||mt.toString());var xt=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class wt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Ot extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(
|
|
97
|
+
`;const yt=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute);class gt extends dt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:vt(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:vt(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function vt(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}var bt,mt;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(mt=null===(bt=window.safari)||void 0===bt?void 0:bt.pushNotification)||void 0===mt||mt.toString());var xt=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class wt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Ot extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new wt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return xt([r()],e.prototype,"stateManager",void 0),e}(gt)){}
|
|
97
98
|
/**
|
|
98
99
|
* @license
|
|
99
100
|
* Copyright 2020 Google LLC
|
|
@@ -200,6 +201,6 @@ var at,lt;class ht extends N{constructor(){super(...arguments),this.renderOption
|
|
|
200
201
|
</${Nt(this.element)}>
|
|
201
202
|
`:Et`
|
|
202
203
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
203
|
-
`}}Ie.styles=[je,Ae,Le,ze,Pe,Te,Be,_e,We,De,He],Ke([o()],Ie.prototype,"element",void 0),Ke([o()],Ie.prototype,"variant",void 0),
|
|
204
|
+
`}}Ie.styles=[je,Ae,Le,ze,Pe,Te,Be,_e,We,De,He],Ke([o()],Ie.prototype,"element",void 0),Ke([o()],Ie.prototype,"variant",void 0),a("ft-typography")(Ie);var Ze=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Ve extends Ot{render(){return this.mapTitle?K`
|
|
204
205
|
<ft-typography variant="title" part="text">${this.mapTitle}</ft-typography>
|
|
205
|
-
`:Z}}Ve.elementDefinitions={"ft-typography":Ie},Ze([((t,e)=>{var i;const o=yt(t)?t:{};return e=null!==(i=null!=e?e:o.hasChanged)&&void 0!==i?i:(t,e)=>!
|
|
206
|
+
`:Z}}Ve.elementDefinitions={"ft-typography":Ie},Ze([((t,e)=>{var i;const o=yt(t)?t:{};return e=null!==(i=null!=e?e:o.hasChanged)&&void 0!==i?i:(t,e)=>!s(t,e),(i,r)=>{var n,s;i.constructor.createProperty(r,{hasChanged:e,attribute:null!==(n=o.attribute)&&void 0!==n&&n});const a=i;a.reduxProperties=a.reduxProperties||new Map;const l=null!==(s=yt(t)?o.selector:t)&&void 0!==s?s:t=>t[r];a.reduxProperties.set(r,{selector:l,store:o.store})}})((t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.title}))],Ve.prototype,"mapTitle",void 0);const Je={fontSize:pt.extend("--ft-reader-metadata-font-size",Ft.fontSize)};a("ft-reader-title")(Ve),t.FtReaderTitle=Ve,t.FtReaderTitleCssVariables=Je,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-title",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.60",
|
|
4
4
|
"description": "Title for integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-reader-context": "0.3.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-reader-context": "0.3.60",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "0.3.60",
|
|
24
24
|
"lit": "2.2.8"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "43e7dcf7c9d88ea2c23f4425629f013d704c5111"
|
|
27
27
|
}
|