@fluid-topics/ft-reader-content 0.3.8 → 0.3.11

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.
@@ -12,6 +12,8 @@ export declare class FtReaderContent extends FtReaderComponent implements FtRead
12
12
  private currentPage?;
13
13
  private scrollTarget?;
14
14
  private visibleTopics?;
15
+ private renderBeforeFirst;
16
+ private renderAfterLast;
15
17
  private container;
16
18
  protected render(): TemplateResult<1>;
17
19
  private getScrollTarget;
@@ -17,6 +17,8 @@ export class FtReaderContent extends FtReaderComponent {
17
17
  this.renderTopic = (tocId) => html `
18
18
  <ft-reader-topic tocId="${tocId}" .exportpartsPrefix=${"topic"}></ft-reader-topic>
19
19
  `;
20
+ this.renderBeforeFirst = 5;
21
+ this.renderAfterLast = 10;
20
22
  this.visibleTopicsDebouncer = new Debouncer(100);
21
23
  }
22
24
  render() {
@@ -26,6 +28,8 @@ export class FtReaderContent extends FtReaderComponent {
26
28
  .items=${((_a = this.currentPage) === null || _a === void 0 ? void 0 : _a.topics) || []}
27
29
  .renderItem=${this.renderTopic}
28
30
  .scrollToItem=${this.getScrollTarget()}
31
+ .renderBeforeFirst=${this.renderBeforeFirst}
32
+ .renderAfterLast=${this.renderAfterLast}
29
33
  exportpartsPrefix="scroller"
30
34
  @visible-items-change=${this.visibleTopicChange}
31
35
  @scrolled-to-target=${this.onScrollDone}
@@ -71,6 +75,12 @@ __decorate([
71
75
  __decorate([
72
76
  redux()
73
77
  ], FtReaderContent.prototype, "visibleTopics", void 0);
78
+ __decorate([
79
+ redux()
80
+ ], FtReaderContent.prototype, "renderBeforeFirst", void 0);
81
+ __decorate([
82
+ redux()
83
+ ], FtReaderContent.prototype, "renderAfterLast", void 0);
74
84
  __decorate([
75
85
  query(".ft-reader-content")
76
86
  ], FtReaderContent.prototype, "container", void 0);