@fluid-topics/ft-reader-content 1.0.46 → 1.0.48
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.
|
@@ -63,7 +63,7 @@ var E;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRoot
|
|
|
63
63
|
* Copyright 2017 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
65
|
*/
|
|
66
|
-
var dt,pt;let vt=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var s,n;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let o=r._$litPart$;if(void 0===o){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=o=new st(e.insertBefore(j(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}};vt.finalized=!0,vt._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:vt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:vt}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.3.2");class bt{static create(t,e,i){let s=t=>v(null!=t?t:i),n=f`var(${v(t)}, ${s(i)})`;return n.name=t,n.category=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${v(t)}, ${s(e)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>i,n}static extend(t,e,i){let s=t=>e.get(null!=t?t:i),n=f`var(${v(t)}, ${s(i)})`;return n.name=t,n.category=e.category,n.fallbackVariable=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${v(t)}, ${s(e)})`,n.breadcrumb=()=>[e.name,...e.breadcrumb()],n.lastResortDefaultValue=()=>i,n}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):v(null!=e?e:t.defaultValue),s=f`var(${v(t.name)}, ${i(t.defaultValue)})`;return s.name=t.name,s.category=t.category,s.fallbackVariable=t.fallbackVariable,s.defaultValue=t.defaultValue,s.context=e,s.defaultCssValue=i,s.get=e=>f`var(${v(t.name)}, ${i(e)})`,s.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],s.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},s}}bt.create("--ft-color-primary","COLOR","#2196F3"),bt.create("--ft-color-primary-variant","COLOR","#1976D2"),bt.create("--ft-color-secondary","COLOR","#FFCC80"),bt.create("--ft-color-secondary-variant","COLOR","#F57C00"),bt.create("--ft-color-surface","COLOR","#FFFFFF"),bt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-error","COLOR","#B00020"),bt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),bt.create("--ft-color-opacity-high","NUMBER","1"),bt.create("--ft-color-opacity-medium","NUMBER","0.74"),bt.create("--ft-color-opacity-disabled","NUMBER","0.38"),bt.create("--ft-color-on-primary","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),bt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),bt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),bt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),bt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),bt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),bt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),bt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-border-radius-S","SIZE","4px"),bt.create("--ft-border-radius-M","SIZE","8px"),bt.create("--ft-border-radius-L","SIZE","12px"),bt.create("--ft-border-radius-XL","SIZE","16px"),bt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),bt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),bt.create("--ft-transition-duration","UNKNOWN","250ms"),bt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class mt extends vt{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return b(i,t.elementStyles),i}}var xt,gt=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const wt=Symbol("constructorPrototype"),yt=Symbol("constructorName"),Ot=Symbol("exportpartsDebouncer");class St extends mt{constructor(){super(),this[xt]=new e(5),this[yt]=this.constructor.name,this[wt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[yt]&&Object.setPrototypeOf(this,this[wt])}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[Ot].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,s,n,r,o;const l=t=>null!=t&&t.trim().length>0,h=t.filter(l).map((t=>t.trim()));if(0===h.length)return void this.removeAttribute("exportparts");const a=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!==(n=null===(s=t.getAttribute("part"))||void 0===s?void 0:s.split(" "))&&void 0!==n?n:[],i=null!==(o=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==o?o:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>a.add(t)))}if(0===a.size)return void this.removeAttribute("exportparts");const c=[...a.values()].flatMap((t=>h.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}var Ct,Nt,$t;xt=Ot,gt([s()],St.prototype,"exportpartsPrefix",void 0),gt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return s({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)=>!l(t,e),...null!=e?e:{}})}([])],St.prototype,"exportpartsPrefixes",void 0),gt([s()],St.prototype,"customStylesheet",void 0),f`
|
|
66
|
+
var dt,pt;let vt=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var s,n;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let o=r._$litPart$;if(void 0===o){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=o=new st(e.insertBefore(j(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}};vt.finalized=!0,vt._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:vt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:vt}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.3.2");class bt{static create(t,e,i){let s=t=>v(null!=t?t:i),n=f`var(${v(t)}, ${s(i)})`;return n.name=t,n.category=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${v(t)}, ${s(e)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>i,n}static extend(t,e,i){let s=t=>e.get(null!=t?t:i),n=f`var(${v(t)}, ${s(i)})`;return n.name=t,n.category=e.category,n.fallbackVariable=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${v(t)}, ${s(e)})`,n.breadcrumb=()=>[e.name,...e.breadcrumb()],n.lastResortDefaultValue=()=>i,n}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):v(null!=e?e:t.defaultValue),s=f`var(${v(t.name)}, ${i(t.defaultValue)})`;return s.name=t.name,s.category=t.category,s.fallbackVariable=t.fallbackVariable,s.defaultValue=t.defaultValue,s.context=e,s.defaultCssValue=i,s.get=e=>f`var(${v(t.name)}, ${i(e)})`,s.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],s.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},s}}bt.create("--ft-color-primary","COLOR","#2196F3"),bt.create("--ft-color-primary-variant","COLOR","#1976D2"),bt.create("--ft-color-secondary","COLOR","#FFCC80"),bt.create("--ft-color-secondary-variant","COLOR","#F57C00"),bt.create("--ft-color-surface","COLOR","#FFFFFF"),bt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-error","COLOR","#B00020"),bt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),bt.create("--ft-color-opacity-high","NUMBER","1"),bt.create("--ft-color-opacity-medium","NUMBER","0.74"),bt.create("--ft-color-opacity-disabled","NUMBER","0.38"),bt.create("--ft-color-on-primary","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),bt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),bt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),bt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),bt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),bt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),bt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),bt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-border-radius-S","SIZE","4px"),bt.create("--ft-border-radius-M","SIZE","8px"),bt.create("--ft-border-radius-L","SIZE","12px"),bt.create("--ft-border-radius-XL","SIZE","16px"),bt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),bt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),bt.create("--ft-transition-duration","UNKNOWN","250ms"),bt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class mt extends vt{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return b(i,t.elementStyles),i}}var xt,gt=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const wt=Symbol("constructorPrototype"),yt=Symbol("constructorName"),Ot=Symbol("exportpartsDebouncer");class St extends mt{constructor(){super(),this[xt]=new e(5),this[yt]=this.constructor.name,this[wt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[yt]&&Object.setPrototypeOf(this,this[wt])}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[Ot].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,s,n,r,o;const l=t=>null!=t&&t.trim().length>0,h=t.filter(l).map((t=>t.trim()));if(0===h.length)return void this.removeAttribute("exportparts");const a=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!==(n=null===(s=t.getAttribute("part"))||void 0===s?void 0:s.split(" "))&&void 0!==n?n:[],i=null!==(o=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==o?o:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>a.add(t)))}if(0===a.size)return void this.removeAttribute("exportparts");const c=[...a.values()].flatMap((t=>h.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}function Ct(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Nt,$t,Et;xt=Ot,gt([s()],St.prototype,"exportpartsPrefix",void 0),gt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return s({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)=>!l(t,e),...null!=e?e:{}})}([])],St.prototype,"exportpartsPrefixes",void 0),gt([s()],St.prototype,"customStylesheet",void 0),f`
|
|
67
67
|
.ft-no-text-select {
|
|
68
68
|
-webkit-touch-callout: none;
|
|
69
69
|
-webkit-user-select: none;
|
|
@@ -95,7 +95,7 @@ var dt,pt;let vt=class extends ${constructor(){super(...arguments),this.renderOp
|
|
|
95
95
|
display: inline-block;
|
|
96
96
|
width: 0;
|
|
97
97
|
}
|
|
98
|
-
`;const
|
|
98
|
+
`;const Rt=Symbol("internalReduxEventsUnsubscribers"),Mt=Symbol("internalStoresUnsubscribers"),kt=Symbol("internalStores");class Ut extends St{constructor(){super(...arguments),this[Nt]=new Map,this[$t]=new Map,this[Et]=[]}updated(t){var e;super.updated(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[kt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[kt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[kt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Ct(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[kt].delete(e)}setupStore(t,e){this[kt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[kt].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}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&&(t.store?this[Mt].has(t.store):this[Mt].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Mt].set(t,e.subscribe((()=>this.updateFromStores()))),Ct(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const s=t=>this[i](t);e.eventBus.addEventListener(t.eventName,s),this[Rt].push((()=>e.eventBus.removeEventListener(t.eventName,s)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Mt].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Rt].forEach((t=>t())),this[Rt]=[]}unsubscribeFromStore(t){this[Mt].has(t)&&this[Mt].get(t)(),this[Mt].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}Nt=Mt,$t=kt,Et=Rt;const Ft=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const r={hasChanged:(t,e)=>!l(t,e),attribute:!1,...e};s(r)(t,i);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}};var It,Tt;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Tt=null===(It=window.safari)||void 0===It?void 0:It.pushNotification)||void 0===Tt||Tt.toString());var At=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class jt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Lt=Symbol("registerInterval");class Bt extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=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[Lt]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Lt]):this.dispatchEvent(new jt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Lt,At([n()],i.prototype,"stateManager",void 0),i}(Ut)){}
|
|
99
99
|
/**
|
|
100
100
|
* @license
|
|
101
101
|
* Copyright 2017 Google LLC
|
|
@@ -175,7 +175,7 @@ class Xt extends Kt{constructor(t){if(super(t),this.et=X,t.type!==_t)throw Error
|
|
|
175
175
|
<article id=${this.tocId}>
|
|
176
176
|
<slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
|
|
177
177
|
</article>
|
|
178
|
-
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}ae.styles=le,he([
|
|
178
|
+
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}ae.styles=le,he([Ft({selector:t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}})],ae.prototype,"mapId",void 0),he([s()],ae.prototype,"tocId",void 0),he([s({type:Boolean})],ae.prototype,"disableContextInteractions",void 0),he([n()],ae.prototype,"tocNode",void 0),h("ft-reader-topic-context")(ae);var ce=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class ue extends Bt{constructor(){super(...arguments),this.renderTopic=()=>J`
|
|
179
179
|
<ft-reader-topic-title></ft-reader-topic-title>
|
|
180
180
|
<ft-reader-topic-content></ft-reader-topic-content>
|
|
181
181
|
`,this.disableContextInteractions=!1,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e(100)}render(){var t;const e=(null===(t=this.currentPage)||void 0===t?void 0:t.topics)||[];return 0===e.length?X:J`
|
|
@@ -195,4 +195,4 @@ class Xt extends Kt{constructor(t){if(super(t),this.et=X,t.type!==_t)throw Error
|
|
|
195
195
|
<ft-reader-topic-context tocId="${t}" ?disableContextInteractions=${this.disableContextInteractions}>
|
|
196
196
|
${this.renderTopic(t,e)}
|
|
197
197
|
</ft-reader-topic-context>
|
|
198
|
-
`}getScrollTarget(){var t,e,i,s,n;if(this.disableContextInteractions)return null;const r=null!==(s=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==s&&s;return!(null===(n=this.scrollTarget)||void 0===n?void 0:n.tocId)||r&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.disableContextInteractions||this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;this.disableContextInteractions||null!=(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)||null===(e=this.stateManager)||void 0===e||e.scrollDone()}}ue.elementDefinitions={"ft-infinite-scroll":re},ue.styles=oe,ce([s()],ue.prototype,"renderTopic",void 0),ce([s({type:Boolean})],ue.prototype,"disableContextInteractions",void 0),ce([
|
|
198
|
+
`}getScrollTarget(){var t,e,i,s,n;if(this.disableContextInteractions)return null;const r=null!==(s=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==s&&s;return!(null===(n=this.scrollTarget)||void 0===n?void 0:n.tocId)||r&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.disableContextInteractions||this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;this.disableContextInteractions||null!=(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)||null===(e=this.stateManager)||void 0===e||e.scrollDone()}}ue.elementDefinitions={"ft-infinite-scroll":re},ue.styles=oe,ce([s()],ue.prototype,"renderTopic",void 0),ce([s({type:Boolean})],ue.prototype,"disableContextInteractions",void 0),ce([Ft()],ue.prototype,"currentPage",void 0),ce([Ft()],ue.prototype,"scrollTarget",void 0),ce([Ft()],ue.prototype,"visibleTopics",void 0),ce([Ft({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadBeforeFirstVisibleTopic)&&void 0!==i?i:5}})],ue.prototype,"renderBeforeFirst",void 0),ce([Ft({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadAfterLastVisibleTopic)&&void 0!==i?i:5}})],ue.prototype,"renderAfterLast",void 0),ce([r(".ft-reader-content")],ue.prototype,"container",void 0),h("ft-reader-content")(ue),t.FtReaderContent=ue,t.FtReaderContentCssVariables={},t.styles=oe}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-content",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"description": "Main content for integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-infinite-scroll": "1.0.
|
|
23
|
-
"@fluid-topics/ft-reader-topic-content": "1.0.
|
|
24
|
-
"@fluid-topics/ft-reader-topic-context": "1.0.
|
|
25
|
-
"@fluid-topics/ft-reader-topic-title": "1.0.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-infinite-scroll": "1.0.48",
|
|
23
|
+
"@fluid-topics/ft-reader-topic-content": "1.0.48",
|
|
24
|
+
"@fluid-topics/ft-reader-topic-context": "1.0.48",
|
|
25
|
+
"@fluid-topics/ft-reader-topic-title": "1.0.48",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.0.48",
|
|
27
27
|
"lit": "2.7.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a07dca06ede4358afbfe00c06b1ea1da90e3ff51"
|
|
30
30
|
}
|