@fluid-topics/ft-reader-content 1.4.3 → 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.
package/build/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from "./ft-reader-content.styles";
2
2
  export * from "./ft-reader-content.properties";
3
3
  export * from "./ft-reader-content";
4
- export * from "./watermark/index";
package/build/index.js CHANGED
@@ -1,9 +1,6 @@
1
1
  import { customElement } from "@fluid-topics/ft-wc-utils";
2
2
  import { FtReaderContent } from "./ft-reader-content";
3
- import { FtReaderWatermark } from "./watermark";
4
3
  export * from "./ft-reader-content.styles";
5
4
  export * from "./ft-reader-content.properties";
6
5
  export * from "./ft-reader-content";
7
- export * from "./watermark/index";
8
6
  customElement("ft-reader-content")(FtReaderContent);
9
- customElement("ft-reader-watermark")(FtReaderWatermark);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-content",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "Main content for integrated reader",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,12 +19,13 @@
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.4.3",
23
- "@fluid-topics/ft-reader-topic-content": "1.4.3",
24
- "@fluid-topics/ft-reader-topic-context": "1.4.3",
25
- "@fluid-topics/ft-reader-topic-title": "1.4.3",
26
- "@fluid-topics/ft-wc-utils": "1.4.3",
22
+ "@fluid-topics/ft-content-watermark": "1.4.5",
23
+ "@fluid-topics/ft-infinite-scroll": "1.4.5",
24
+ "@fluid-topics/ft-reader-topic-content": "1.4.5",
25
+ "@fluid-topics/ft-reader-topic-context": "1.4.5",
26
+ "@fluid-topics/ft-reader-topic-title": "1.4.5",
27
+ "@fluid-topics/ft-wc-utils": "1.4.5",
27
28
  "lit": "3.1.0"
28
29
  },
29
- "gitHead": "f9f5324c86da35137044bc768819fcd81057791d"
30
+ "gitHead": "efdc859657751cd9e7af2736f3783341ffd6aae4"
30
31
  }
@@ -1,11 +0,0 @@
1
- import { FtReaderWatermarkProperties } from "./ft-reader-watermark.properties";
2
- import { PropertyValues } from "lit";
3
- import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
4
- export declare class FtReaderWatermark extends FtReaderComponent implements FtReaderWatermarkProperties {
5
- static styles: import("lit").CSSResult;
6
- private svg;
7
- private watermark?;
8
- private height;
9
- protected render(): unknown;
10
- protected updated(props: PropertyValues): void;
11
- }
@@ -1,53 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, nothing, svg } from "lit";
8
- import { property, query } from "lit/decorators.js";
9
- import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
10
- import { styles } from "./ft-reader-watermark.styles";
11
- import { repeat } from "lit/directives/repeat.js";
12
- class FtReaderWatermark extends FtReaderComponent {
13
- constructor() {
14
- super(...arguments);
15
- this.height = "0";
16
- }
17
- render() {
18
- var _a, _b, _c;
19
- return this.watermark ? html `
20
- <style>
21
- .ft-watermark {
22
- height: ${this.height};
23
- }
24
- </style>
25
- <div class="ft-watermark-container">
26
- <svg xmlns="http://www.w3.org/2000/svg" class="ft-watermark" part="svg">
27
- <text x="0" y="0" text-anchor="middle" transform="rotate(-45)" fill="${(_a = this.watermark) === null || _a === void 0 ? void 0 : _a.color}"
28
- fill-opacity="${(_b = this.watermark) === null || _b === void 0 ? void 0 : _b.opacity}%">
29
- ${repeat(((_c = this.watermark) === null || _c === void 0 ? void 0 : _c.text) || [], (item) => svg `<tspan x="0" dy="1.2em">${item}</tspan>`)}
30
- </text>
31
- </svg>
32
- </div>
33
- ` : nothing;
34
- }
35
- updated(props) {
36
- super.updated(props);
37
- if (props.has("watermark") && this.watermark) {
38
- const bbox = this.svg.getBBox();
39
- this.svg.setAttribute("viewBox", bbox.x + " " + bbox.y + " " + bbox.width + " " + bbox.height);
40
- }
41
- }
42
- }
43
- FtReaderWatermark.styles = styles;
44
- __decorate([
45
- query(".ft-watermark")
46
- ], FtReaderWatermark.prototype, "svg", void 0);
47
- __decorate([
48
- property({ attribute: false })
49
- ], FtReaderWatermark.prototype, "watermark", void 0);
50
- __decorate([
51
- property()
52
- ], FtReaderWatermark.prototype, "height", void 0);
53
- export { FtReaderWatermark };
@@ -1,2 +0,0 @@
1
- export interface FtReaderWatermarkProperties {
2
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export declare const FtReaderWatermarkCssVariables: {};
2
- export declare const styles: import("lit").CSSResult;
@@ -1,23 +0,0 @@
1
- import { css } from "lit";
2
- export const FtReaderWatermarkCssVariables = {};
3
- // language=CSS
4
- export const styles = css `
5
- :host {
6
- position: absolute;
7
- top: 0;
8
- right: 0;
9
- bottom: 0;
10
- left: 0;
11
- pointer-events: none;
12
- }
13
-
14
- .ft-watermark-container {
15
- position: sticky;
16
- top: 0;
17
- text-align: center;
18
- }
19
-
20
- .ft-watermark {
21
- z-index: 79;
22
- }
23
- `;
@@ -1,2 +0,0 @@
1
- export * from "./ft-reader-watermark.properties";
2
- export * from "./ft-reader-watermark";
@@ -1,5 +0,0 @@
1
- import { customElement } from "@fluid-topics/ft-wc-utils";
2
- import { FtReaderWatermark } from "./ft-reader-watermark";
3
- export * from "./ft-reader-watermark.properties";
4
- export * from "./ft-reader-watermark";
5
- customElement("ft-reader-watermark")(FtReaderWatermark);