@solidpepper/solidpepper-solidreviewer 0.0.2 → 0.0.3

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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnChanges, EventEmitter, ElementRef, ChangeDetectorRef, SimpleChanges } from '@angular/core';
3
+ import * as _solidpepper_solidpepper_icons from '@solidpepper/solidpepper-icons';
3
4
  import { HttpClient } from '@angular/common/http';
4
5
  import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
5
6
  import { Observable } from 'rxjs';
@@ -69,6 +70,9 @@ declare class AppComponent implements OnInit, OnChanges {
69
70
  private commentService;
70
71
  private settingsService;
71
72
  private translationService;
73
+ readonly spIconUser: _solidpepper_solidpepper_icons.SpIcon;
74
+ readonly spIconLock: _solidpepper_solidpepper_icons.SpIcon;
75
+ readonly spIconLogOut: _solidpepper_solidpepper_icons.SpIcon;
72
76
  guid?: string;
73
77
  token?: string;
74
78
  apiUrl: string;
@@ -91,6 +95,7 @@ declare class AppComponent implements OnInit, OnChanges {
91
95
  pages: _angular_core.WritableSignal<ReviewerPage[]>;
92
96
  loadedSvgContents: Record<string, SafeHtml>;
93
97
  visiblePages: Set<string>;
98
+ private injectedFontNames;
94
99
  private invisibleLoadedQueue;
95
100
  private maxLoadedPagesLimit;
96
101
  private isProgrammaticScrolling;
@@ -106,7 +111,7 @@ declare class AppComponent implements OnInit, OnChanges {
106
111
  sidebarOpen: _angular_core.WritableSignal<boolean>;
107
112
  commentsSidebarOpen: _angular_core.WritableSignal<boolean>;
108
113
  commentModeActive: _angular_core.WritableSignal<boolean>;
109
- activeTool: _angular_core.WritableSignal<"point" | "drawing" | "shape-rect" | "shape-line" | "highlight" | "text">;
114
+ activeTool: _angular_core.WritableSignal<"text" | "point" | "drawing" | "shape-rect" | "shape-line" | "highlight">;
110
115
  selectedColor: _angular_core.WritableSignal<string>;
111
116
  availableColors: string[];
112
117
  isDrawing: boolean;
@@ -164,6 +169,13 @@ declare class AppComponent implements OnInit, OnChanges {
164
169
  loadPagesAroundActive(): void;
165
170
  private checkAndUnloadExcessPages;
166
171
  onPageVisible(pageGuid: string, isVisible: boolean, page: ReviewerPage): void;
172
+ /**
173
+ * Extracts Google Fonts @import, custom @font-face, and declared font-family rules
174
+ * directly from the SVG markup and injects them into document.head so the browser
175
+ * renders all document letters with the exact typography from SolidDesigner.
176
+ */
177
+ private extractAndInjectSvgFonts;
178
+ private hashCode;
167
179
  getPageIndex(guid: string): number;
168
180
  get activePageNumber(): number;
169
181
  prevPage(): void;
@@ -179,6 +191,15 @@ declare class AppComponent implements OnInit, OnChanges {
179
191
  * Applies the zoom level based on the selected fitMode and container dimensions.
180
192
  */
181
193
  applyFitZoom(): void;
194
+ /**
195
+ * Automatically calculates and sets the optimal zoom level so that
196
+ * a two-page spread fits cleanly within the available viewport (both width and height).
197
+ */
198
+ fitSpread(): void;
199
+ /**
200
+ * Adjusts zoom when returning to single-page mode so the page fits comfortably.
201
+ */
202
+ fitSinglePage(): void;
182
203
  setLayoutMode(mode: 'single' | 'double' | 'double-cover'): void;
183
204
  toggleScroll(): void;
184
205
  toggleReading(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidpepper/solidpepper-solidreviewer",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.3.12",
6
6
  "@angular/core": "^20.3.12",
@@ -8,6 +8,8 @@
8
8
  "@angular/elements": "^20.3.12",
9
9
  "@angular/router": "^20.3.12",
10
10
  "@ngx-translate/core": "^17.0.0",
11
+ "@solidpepper/solidpepper-component": ">=0.0.1",
12
+ "@solidpepper/solidpepper-icons": ">=0.0.1",
11
13
  "rxjs": "^7.8.0"
12
14
  },
13
15
  "dependencies": {