@fluid-topics/ft-reader-internal-link 0.3.58 → 0.3.61

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,4 +1,4 @@
1
- !function(t,e,s,r,i){var o=function(t,e,s,r){for(var i,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r,l=t.length-1;l>=0;l--)(i=t[l])&&(n=(o<3?i(n):o>3?i(e,s,n):i(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class n extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class l 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(this.stateManager.store),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 n)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o([r.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}const a={outlineColor:e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",e.designSystemVariables.colorPrimary)},c=s.css`
1
+ !function(t,e,r,s,o){var i=function(t,e,r,s){for(var o,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(i<3?o(n):i>3?o(e,r,n):o(e,r))||n);return i>3&&n&&Object.defineProperty(e,r,n),n};class n extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class l 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 n)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return i([s.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}const a={outlineColor:e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",e.designSystemVariables.colorPrimary)},c=r.css`
2
2
  :host {
3
3
  display: contents;
4
4
  }
@@ -11,10 +11,10 @@
11
11
  text-decoration: none;
12
12
  color: inherit;
13
13
  }
14
- `;var d=function(t,e,s,r){for(var i,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r,l=t.length-1;l>=0;l--)(i=t[l])&&(n=(o<3?i(n):o>3?i(e,s,n):i(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class u extends l{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=i.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return s.html`
14
+ `;var d=function(t,e,r,s){for(var o,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(i<3?o(n):i>3?o(e,r,n):o(e,r))||n);return i>3&&n&&Object.defineProperty(e,r,n),n};class u extends l{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=o.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return r.html`
15
15
  <a class=${e}
16
16
  href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
17
17
  @click=${t=>this.onLinkClick(t)}>
18
18
  <slot></slot>
19
19
  </a>
20
- `}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}u.styles=c,d([r.property()],u.prototype,"tocId",void 0),d([r.property()],u.prototype,"section",void 0),d([r.property({type:Number})],u.prototype,"pageNumber",void 0),d([r.property({type:Boolean})],u.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(u),t.FtReaderInternalLink=u,t.FtReaderInternalLinkCssVariables=a,t.styles=c,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
20
+ `}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}u.styles=c,d([s.property()],u.prototype,"tocId",void 0),d([s.property()],u.prototype,"section",void 0),d([s.property({type:Number})],u.prototype,"pageNumber",void 0),d([s.property({type:Boolean})],u.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(u),t.FtReaderInternalLink=u,t.FtReaderInternalLinkCssVariables=a,t.styles=c,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
@@ -105,7 +105,7 @@ const mt=1;class xt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
105
105
  * @license
106
106
  * Copyright 2018 Google LLC
107
107
  * SPDX-License-Identifier: BSD-3-Clause
108
- */const wt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends xt{constructor(t){var e;if(super(t),t.type!==mt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,s;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(s=this.st)||void 0===s?void 0:s.has(t))||(i?(r.add(t),this.nt.add(t)):(r.remove(t),this.nt.delete(t)))}return I}});var gt=function(t,e,i,s){for(var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class Ot extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class St 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(this.stateManager.store),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 Ot)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return gt([r()],e.prototype,"stateManager",void 0),e}(bt)){}const Ct={outlineColor:ht.extend("--ft-reader-internal-link-outline-color",ut.colorPrimary)},Nt=p`
108
+ */const wt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends xt{constructor(t){var e;if(super(t),t.type!==mt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,s;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(s=this.st)||void 0===s?void 0:s.has(t))||(i?(r.add(t),this.nt.add(t)):(r.remove(t),this.nt.delete(t)))}return I}});var gt=function(t,e,i,s){for(var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class Ot extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class St 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 Ot)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return gt([r()],e.prototype,"stateManager",void 0),e}(bt)){}const Ct={outlineColor:ht.extend("--ft-reader-internal-link-outline-color",ut.colorPrimary)},Nt=p`
109
109
  :host {
110
110
  display: contents;
111
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-internal-link",
3
- "version": "0.3.58",
3
+ "version": "0.3.61",
4
4
  "description": "Reader internal link for 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": "0.3.58",
22
+ "@fluid-topics/ft-wc-utils": "0.3.61",
23
23
  "lit": "2.2.8"
24
24
  },
25
- "gitHead": "c053ee1216238ba6b2c62e5add329343f735c77e"
25
+ "gitHead": "12a4024fb3084b17772a3aef10723d22ae56c877"
26
26
  }