@fluid-topics/ft-reader-content 1.4.4 → 1.4.5

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.
@@ -4,15 +4,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html } from "lit";
8
- import { property, query } from "lit/decorators.js";
9
- import { Debouncer, redux } from "@fluid-topics/ft-wc-utils";
10
- import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
11
- import { FtInfiniteScroll } from "@fluid-topics/ft-infinite-scroll";
7
+ import { html, } from "lit";
8
+ import { property, query, } from "lit/decorators.js";
9
+ import { Debouncer, numberProperty, redux, } from "@fluid-topics/ft-wc-utils";
10
+ import { FtReaderComponent, } from "@fluid-topics/ft-reader-context/build/registration";
11
+ import { FtInfiniteScroll, } from "@fluid-topics/ft-infinite-scroll";
12
12
  import { styles } from "./ft-reader-content.styles";
13
13
  import "@fluid-topics/ft-reader-topic-context";
14
- import { FtReaderWatermark } from "./watermark";
15
14
  import { FtReaderStoreEvents } from "@fluid-topics/ft-reader-context";
15
+ import { FtContentWatermark } from "@fluid-topics/ft-content-watermark";
16
16
  class FtReaderContent extends FtReaderComponent {
17
17
  constructor() {
18
18
  super(...arguments);
@@ -30,7 +30,7 @@ class FtReaderContent extends FtReaderComponent {
30
30
  this.visibleTopicsDebouncer = new Debouncer(50);
31
31
  }
32
32
  render() {
33
- var _a, _b, _c;
33
+ var _a, _b;
34
34
  const topics = ((_a = this.currentPage) === null || _a === void 0 ? void 0 : _a.topics) || [];
35
35
  return html `
36
36
  <ft-infinite-scroll class="ft-reader-content"
@@ -46,10 +46,10 @@ class FtReaderContent extends FtReaderComponent {
46
46
  @visible-items-change=${this.visibleTopicChange}
47
47
  @scrolled-to-target=${this.onScrollDone}>
48
48
  </ft-infinite-scroll>
49
- <ft-reader-watermark part="watermark"
50
- .watermark=${this.watermark}
51
- .exportpartsPrefixes=${["watermark"]}
52
- height="${(_c = this.container) === null || _c === void 0 ? void 0 : _c.scrollable.clientHeight}px"></ft-reader-watermark>
49
+ <ft-content-watermark part="watermark"
50
+ .watermark=${this.watermark}
51
+ .exportpartsPrefixes=${["watermark"]}
52
+ .heightReference=${this.offsetParent}></ft-content-watermark>
53
53
  `;
54
54
  }
55
55
  renderTopicInContext(tocId, index) {
@@ -94,7 +94,7 @@ class FtReaderContent extends FtReaderComponent {
94
94
  }
95
95
  FtReaderContent.elementDefinitions = {
96
96
  "ft-infinite-scroll": FtInfiniteScroll,
97
- "ft-reader-watermark": FtReaderWatermark,
97
+ "ft-content-watermark": FtContentWatermark,
98
98
  };
99
99
  FtReaderContent.styles = styles;
100
100
  __decorate([
@@ -104,7 +104,7 @@ __decorate([
104
104
  property({ type: Boolean })
105
105
  ], FtReaderContent.prototype, "disableContextInteractions", void 0);
106
106
  __decorate([
107
- property({ type: Number })
107
+ numberProperty()
108
108
  ], FtReaderContent.prototype, "headingLevelsShift", void 0);
109
109
  __decorate([
110
110
  redux()