@embedpdf/angular 3.0.0-next.13 → 3.0.0-next.15
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/README.md +309 -0
- package/dist/README.md +309 -0
- package/dist/actions/index.d.ts +34 -16
- package/dist/anchored/index.d.ts +67 -0
- package/dist/annotation/index.d.ts +599 -0
- package/dist/commands/index.d.ts +109 -0
- package/dist/fesm2022/embedpdf-angular-actions.mjs +117 -36
- package/dist/fesm2022/embedpdf-angular-actions.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular-anchored.mjs +148 -0
- package/dist/fesm2022/embedpdf-angular-anchored.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-annotation.mjs +1960 -0
- package/dist/fesm2022/embedpdf-angular-annotation.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-commands.mjs +235 -0
- package/dist/fesm2022/embedpdf-angular-commands.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-form.mjs +1074 -0
- package/dist/fesm2022/embedpdf-angular-form.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-history.mjs +54 -0
- package/dist/fesm2022/embedpdf-angular-history.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-i18n.mjs +100 -0
- package/dist/fesm2022/embedpdf-angular-i18n.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-interaction.mjs +157 -0
- package/dist/fesm2022/embedpdf-angular-interaction.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-link.mjs +306 -0
- package/dist/fesm2022/embedpdf-angular-link.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-measurement.mjs +106 -0
- package/dist/fesm2022/embedpdf-angular-measurement.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-metadata.mjs +77 -0
- package/dist/fesm2022/embedpdf-angular-metadata.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-page-edit.mjs +65 -0
- package/dist/fesm2022/embedpdf-angular-page-edit.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-page-view.mjs +297 -0
- package/dist/fesm2022/embedpdf-angular-page-view.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-redaction.mjs +93 -0
- package/dist/fesm2022/embedpdf-angular-redaction.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-render.mjs +331 -69
- package/dist/fesm2022/embedpdf-angular-render.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular-runtime.mjs +1147 -390
- package/dist/fesm2022/embedpdf-angular-runtime.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular-search.mjs +251 -0
- package/dist/fesm2022/embedpdf-angular-search.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-selection.mjs +477 -0
- package/dist/fesm2022/embedpdf-angular-selection.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-shell.mjs +177 -0
- package/dist/fesm2022/embedpdf-angular-shell.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-signature.mjs +120 -0
- package/dist/fesm2022/embedpdf-angular-signature.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-stage.mjs +688 -288
- package/dist/fesm2022/embedpdf-angular-stage.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular-stamp.mjs +169 -0
- package/dist/fesm2022/embedpdf-angular-stamp.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-testing.mjs +89 -0
- package/dist/fesm2022/embedpdf-angular-testing.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-toolbar.mjs +1123 -0
- package/dist/fesm2022/embedpdf-angular-toolbar.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-view-manager.mjs +69 -0
- package/dist/fesm2022/embedpdf-angular-view-manager.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular.mjs +23 -3
- package/dist/fesm2022/embedpdf-angular.mjs.map +1 -1
- package/dist/form/index.d.ts +79 -0
- package/dist/history/index.d.ts +28 -0
- package/dist/i18n/index.d.ts +52 -0
- package/dist/index.d.ts +20 -0
- package/dist/interaction/index.d.ts +58 -0
- package/dist/link/index.d.ts +77 -0
- package/dist/measurement/index.d.ts +46 -0
- package/dist/metadata/index.d.ts +51 -0
- package/dist/page-edit/index.d.ts +22 -0
- package/dist/page-view/index.d.ts +94 -0
- package/dist/redaction/index.d.ts +38 -0
- package/dist/render/index.d.ts +45 -6
- package/dist/runtime/index.d.ts +579 -199
- package/dist/search/index.d.ts +71 -0
- package/dist/selection/index.d.ts +141 -0
- package/dist/shell/index.d.ts +88 -0
- package/dist/signature/index.d.ts +45 -0
- package/dist/stage/index.d.ts +242 -141
- package/dist/stamp/index.d.ts +58 -0
- package/dist/testing/index.d.ts +53 -0
- package/dist/toolbar/index.d.ts +257 -0
- package/dist/view-manager/index.d.ts +23 -0
- package/package.json +135 -14
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
import * as _embedpdf_plugin_annotation from '@embedpdf/plugin-annotation';
|
|
2
|
+
import { Annotation, AnnotationSelectionApi, AnnotationProperties, AnnotationDraftApi, AnnotationTextApi, AnnotationToolsApi, ToolDefaults, ToolDefaultsChangedEvent, AnnotationStampsApi, AnnotationLinksApi, AnnotationFilter, AnnotationRef, AnnotationAnchor, AnnotationConfig, CommentThread, AnnotationCapability, CommentsApi, CommentThreadChangedEvent, FilePickerProvider, AnnotationSubtype, HandleRole, AnnotationRotationAnchor, TextItem, CreationDraft } from '@embedpdf/plugin-annotation';
|
|
3
|
+
export * from '@embedpdf/plugin-annotation';
|
|
4
|
+
import * as _embedpdf_core_annotation from '@embedpdf/core-annotation';
|
|
5
|
+
import { RenderItem, Point } from '@embedpdf/core-annotation';
|
|
6
|
+
export { AnnotationFlags, CreationDraftAnchor, FieldValues, LineEnding, LineEndings, RenderItem, Style, TextAlign, TextStyle } from '@embedpdf/core-annotation';
|
|
7
|
+
import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
|
|
8
|
+
import { EmbedPdfFeature, EpdfPluginService, EpdfPageContext } from '@embedpdf/angular/runtime';
|
|
9
|
+
import * as _embedpdf_core from '@embedpdf/core';
|
|
10
|
+
import * as i0 from '@angular/core';
|
|
11
|
+
import { Signal, TemplateRef, Injector } from '@angular/core';
|
|
12
|
+
import { Observable } from 'rxjs';
|
|
13
|
+
import * as _embedpdf_web from '@embedpdf/web';
|
|
14
|
+
import { FramePixels, PictureOrPainting, TextBoxStyle } from '@embedpdf/web';
|
|
15
|
+
import { AnchoredPlacement, EpdfAnchor } from '@embedpdf/angular/anchored';
|
|
16
|
+
|
|
17
|
+
/** `annotation.selection`: what is selected, the verbs that change it as one, and its style panel. */
|
|
18
|
+
interface EpdfAnnotationSelection extends AnnotationSelectionApi {
|
|
19
|
+
/**
|
|
20
|
+
* What a style panel shows for the selection: `{ properties, values, mixed }`, the same as
|
|
21
|
+
* `getProperties()` but as a signal, so the panel follows the selection and its changes.
|
|
22
|
+
* Empty with nothing selected, and without a document.
|
|
23
|
+
*/
|
|
24
|
+
readonly properties: Signal<AnnotationProperties>;
|
|
25
|
+
}
|
|
26
|
+
/** `annotation.tools`: the tools and their defaults, with the reads a picker follows. */
|
|
27
|
+
interface EpdfAnnotationTools extends Omit<AnnotationToolsApi, 'onDefaultsChanged'> {
|
|
28
|
+
/**
|
|
29
|
+
* A tool's defaults, the fields its next annotation starts with, as a signal: a color picker
|
|
30
|
+
* bound to it always shows the current color. Pass the id, or a function that reads it.
|
|
31
|
+
* Empty without a document.
|
|
32
|
+
*/
|
|
33
|
+
defaultsOf(id: string | (() => string)): Signal<ToolDefaults>;
|
|
34
|
+
/**
|
|
35
|
+
* What a style panel for a tool shows (`{ properties, values, mixed }`), as a signal. Pass the
|
|
36
|
+
* id, or a function that reads it. Empty without a document.
|
|
37
|
+
*/
|
|
38
|
+
propertiesOf(id: string | (() => string)): Signal<AnnotationProperties>;
|
|
39
|
+
/** A tool's defaults changed, from your UI or your code: `toolId`, `defaults`. */
|
|
40
|
+
readonly defaultsChanged$: Observable<ToolDefaultsChangedEvent>;
|
|
41
|
+
}
|
|
42
|
+
declare const EpdfAnnotation_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_annotation.AnnotationCapability, {
|
|
43
|
+
status: _embedpdf_core.ResourceStatus;
|
|
44
|
+
selected: readonly Annotation[];
|
|
45
|
+
hovered: Annotation | null;
|
|
46
|
+
editing: Annotation | null;
|
|
47
|
+
}, "create" | "get" | "cancel" | "delete" | "list" | "getAt" | "isPending" | "getStatus" | "getHovered" | "refresh" | "createFromSelection" | "update" | "reorder" | "export" | "import" | "downloadResource" | "setFilePickerProvider" | "canRead" | "canCreate" | "canUpdate" | "canDelete", "onCreated" | "onUpdated" | "onDeleted" | "onReordered" | "onResynced" | "onWriteFailed" | "onSelectionChanged" | "onDraftChanged" | "onEditingChanged" | "onHoverChanged">;
|
|
48
|
+
/**
|
|
49
|
+
* Annotations: `create()`, `update()`, `delete()` and the rest of the Methods tables, the
|
|
50
|
+
* selecting page's State table as signals (`annotation.selected()`), the parts the capability
|
|
51
|
+
* has (`annotation.selection.set(refs)`, `annotation.tools.updateDefaults(id, changes)`), its
|
|
52
|
+
* events as streams (`annotation.created$`), and its settings (`annotation.settings()`,
|
|
53
|
+
* `annotation.updateSettings({ chrome })`). Comments have their own service, `EpdfComments`.
|
|
54
|
+
*
|
|
55
|
+
* Without a document the signals read empty and the methods refuse with `not-ready`. The checks
|
|
56
|
+
* (`canCreate()`, `canDelete(ref)`, `selection.canGroup()`, `stamps.isArmed()`) are state:
|
|
57
|
+
* read in a template, they follow the document, its permissions and the selection.
|
|
58
|
+
*/
|
|
59
|
+
declare class EpdfAnnotation extends EpdfAnnotation_base {
|
|
60
|
+
/** The same capability, typed with the reads only framework code has (an annotation's anchor). */
|
|
61
|
+
private readonly host;
|
|
62
|
+
/** The selection: `set(refs)`, `update(changes)`, `delete()`, … and `properties()`. */
|
|
63
|
+
readonly selection: EpdfAnnotationSelection;
|
|
64
|
+
/** A polygon or polyline being drawn: `get()`, `finish()`, `cancel()`. */
|
|
65
|
+
readonly draft: AnnotationDraftApi;
|
|
66
|
+
/** Typing in a text box: `begin(ref)`, `end()`, `getEditing()`, `toggleFormat(format)`. */
|
|
67
|
+
readonly text: AnnotationTextApi;
|
|
68
|
+
/** The tools: `list()`, `register(tool)`, `updateDefaults(id, changes)`, `defaultsOf(id)`, … */
|
|
69
|
+
readonly tools: EpdfAnnotationTools;
|
|
70
|
+
/** Stamps from bytes: `arm(stamp)`, `disarm()`, `isArmed()`, `place(stamp, placement)`. */
|
|
71
|
+
readonly stamps: AnnotationStampsApi;
|
|
72
|
+
/** An annotation's link: `get(ref)`, `set(ref, target)`, `clear(ref)`. */
|
|
73
|
+
readonly links: AnnotationLinksApi;
|
|
74
|
+
/**
|
|
75
|
+
* The annotations matching `filter` (some pages, one kind), in drawing order, as the user sees
|
|
76
|
+
* them: a signal that keeps the same array while they stay the same. Pass the filter, or a
|
|
77
|
+
* function that reads it (`() => ({ pages: [this.page()] })`). Empty without a document.
|
|
78
|
+
* Call it once, in a field or the constructor, and read the signal in your template.
|
|
79
|
+
*/
|
|
80
|
+
watch(filter?: AnnotationFilter | null | (() => AnnotationFilter | null | undefined)): Signal<readonly Annotation[]>;
|
|
81
|
+
/**
|
|
82
|
+
* An anchor for `<epdf-anchored>` that keeps a card or a badge on one annotation: its page and
|
|
83
|
+
* the box around what it shows, following a move as it happens. Pass the ref, or a function
|
|
84
|
+
* that reads it (`() => this.hovered()?.ref ?? null`). Null for null, or an annotation that
|
|
85
|
+
* isn't here. It changes when the annotation moves, not while people scroll or zoom.
|
|
86
|
+
*/
|
|
87
|
+
anchorOf(ref: AnnotationRef | null | (() => AnnotationRef | null | undefined)): Signal<AnnotationAnchor | null>;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfAnnotation, never>;
|
|
89
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EpdfAnnotation>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The annotation plugin: drawing, selecting, changing and saving annotations, and comments. It
|
|
93
|
+
* works with the interaction plugin, so give `withInteraction()` too, and an
|
|
94
|
+
* `<epdf-annotation-layer>` in each page:
|
|
95
|
+
* `provideEmbedPdf({ engine }, withStage(), withRender(), withInteraction(), withAnnotation())`.
|
|
96
|
+
*/
|
|
97
|
+
declare function withAnnotation(options?: AnnotationConfig): EmbedPdfFeature;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Comments and replies, as their own service: `inject(EpdfComments)`. A comments sidebar needs
|
|
101
|
+
* the threads and the verbs on them, not the rest of the annotation API, so they get a service
|
|
102
|
+
* of their own (React's `useComments()` and `useCommentThreads()`). `withAnnotation()` provides
|
|
103
|
+
* it.
|
|
104
|
+
*
|
|
105
|
+
* The threads come with where their page is shown (`pageIndex`, `pageLabel`): the join of the
|
|
106
|
+
* plugin's threads and the document's page list is `@embedpdf/web`'s, the same for every
|
|
107
|
+
* framework.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* A comment thread with where its page is shown now. Its identity stays `page`, like every
|
|
112
|
+
* annotation's; these two fields are for showing it, and follow page moves and deletes.
|
|
113
|
+
*/
|
|
114
|
+
interface CommentThreadView extends CommentThread {
|
|
115
|
+
/** The page's place in the document, from 0; `-1` for the moment after its page is deleted. */
|
|
116
|
+
pageIndex: number;
|
|
117
|
+
/**
|
|
118
|
+
* The page's label when the PDF has one (`'iv'`, `'A-2'`), else its number from 1, as a
|
|
119
|
+
* string: print it as it is.
|
|
120
|
+
*/
|
|
121
|
+
pageLabel: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The comments of the document in scope (`[epdfDocumentScope]`), else the active one: every
|
|
125
|
+
* thread as `threads()`, one as `threadOf(ref)`, the verbs (`reply()`, `setText()`,
|
|
126
|
+
* `setStatus()`, `setMarked()`, `delete()`, `deleteThread()`), the checks (`canReply(ref)`, …),
|
|
127
|
+
* which follow the document and its permissions in a template, and `threadChanged$`. Without a
|
|
128
|
+
* document the threads are empty and the verbs refuse with `not-ready`.
|
|
129
|
+
*/
|
|
130
|
+
declare class EpdfComments extends EpdfPluginService<AnnotationCapability> {
|
|
131
|
+
constructor();
|
|
132
|
+
/** Every thread, in reading order, read once. In a template, use `threads()`. */
|
|
133
|
+
readonly listThreads: CommentsApi['listThreads'];
|
|
134
|
+
/** The thread a comment is in (its first comment, a reply or a review state), read once, or null. */
|
|
135
|
+
readonly getThread: CommentsApi['getThread'];
|
|
136
|
+
/** Reply to the thread's first comment, whichever comment you pass. Resolves `{ annotation }`. */
|
|
137
|
+
readonly reply: CommentsApi['reply'];
|
|
138
|
+
/** Change a comment's text. */
|
|
139
|
+
readonly setText: CommentsApi['setText'];
|
|
140
|
+
/** Set the user's review state on a thread, such as `'accepted'`. */
|
|
141
|
+
readonly setStatus: CommentsApi['setStatus'];
|
|
142
|
+
/** Check a thread off for the user, or clear the check mark. */
|
|
143
|
+
readonly setMarked: CommentsApi['setMarked'];
|
|
144
|
+
/** Delete a comment with its replies; the first comment of a thread deletes the thread. */
|
|
145
|
+
readonly delete: CommentsApi['delete'];
|
|
146
|
+
/** Delete a whole thread, all of it or none. Resolves `{ deleted, failed }`. */
|
|
147
|
+
readonly deleteThread: CommentsApi['deleteThread'];
|
|
148
|
+
/** Whether the user may reply to this thread. */
|
|
149
|
+
readonly canReply: CommentsApi['canReply'];
|
|
150
|
+
/** Whether the user may change this comment's text. */
|
|
151
|
+
readonly canSetText: CommentsApi['canSetText'];
|
|
152
|
+
/** Whether the user may set a review state on this thread. */
|
|
153
|
+
readonly canSetStatus: CommentsApi['canSetStatus'];
|
|
154
|
+
/** Whether the user may check this thread off. */
|
|
155
|
+
readonly canSetMarked: CommentsApi['canSetMarked'];
|
|
156
|
+
/** Whether the user may delete this comment. */
|
|
157
|
+
readonly canDelete: CommentsApi['canDelete'];
|
|
158
|
+
/** Whether the user may delete every comment in this thread. */
|
|
159
|
+
readonly canDeleteThread: CommentsApi['canDeleteThread'];
|
|
160
|
+
/** A thread changed through this viewer: a reply, a text, a review state, a check mark or a delete. */
|
|
161
|
+
readonly threadChanged$: Observable<CommentThreadChangedEvent>;
|
|
162
|
+
private readonly scope;
|
|
163
|
+
private readonly rawThreads;
|
|
164
|
+
/** The pages of this service's document: a page moved or deleted moves its threads' labels. */
|
|
165
|
+
private readonly pages;
|
|
166
|
+
/**
|
|
167
|
+
* Every thread in the document, in reading order (by page, then from the top), each with its
|
|
168
|
+
* page's `pageIndex` and `pageLabel`. Own, remote and reloaded changes all show. The same
|
|
169
|
+
* array until a thread or a page changes; empty without a document.
|
|
170
|
+
*/
|
|
171
|
+
readonly threads: Signal<readonly CommentThreadView[]>;
|
|
172
|
+
/**
|
|
173
|
+
* The thread a comment is in, whether you pass its first comment, a reply or a review state,
|
|
174
|
+
* with its page's label; null for null, or a comment in no thread. Pass the ref, or a function
|
|
175
|
+
* that reads it (`() => this.note().ref`).
|
|
176
|
+
*/
|
|
177
|
+
threadOf(ref: AnnotationRef | null | (() => AnnotationRef | null | undefined)): Signal<CommentThreadView | null>;
|
|
178
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfComments, never>;
|
|
179
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EpdfComments>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The browser's file dialog, filtered by the tool's `accept`: what `withFilePicker()` installs
|
|
184
|
+
* when you give it nothing. A picked `File` carries its own name and type.
|
|
185
|
+
*/
|
|
186
|
+
declare const filePickerProvider: FilePickerProvider;
|
|
187
|
+
/**
|
|
188
|
+
* The file dialog behind every click-then-pick tool, for every document the viewer opens.
|
|
189
|
+
* Without an argument it is the browser's dialog ({@link filePickerProvider}); pass your own
|
|
190
|
+
* function to pick from your library (it gets the tool, the page and the point, and returns the
|
|
191
|
+
* file or `null` to cancel), or `null` to make those tools do nothing.
|
|
192
|
+
*/
|
|
193
|
+
declare function withFilePicker(provider?: FilePickerProvider | null): EmbedPdfFeature;
|
|
194
|
+
|
|
195
|
+
/** The box a look draws into: the size to draw at, how it's turned, and how it's scaled. */
|
|
196
|
+
interface AnnotationFrame {
|
|
197
|
+
/** Its width in pixels at the annotation's 100% size, before its turn: draw at this. */
|
|
198
|
+
readonly width: number;
|
|
199
|
+
/** Its height in pixels at the annotation's 100% size, before its turn: draw at this. */
|
|
200
|
+
readonly height: number;
|
|
201
|
+
/**
|
|
202
|
+
* How it's turned on screen, degrees clockwise: the page's turn and the annotation's own. 0 is
|
|
203
|
+
* upright; turn your content by `-rotation` to keep it upright.
|
|
204
|
+
*/
|
|
205
|
+
readonly rotation: number;
|
|
206
|
+
/**
|
|
207
|
+
* How much the layer scales what you draw, with the page: the zoom, or for an annotation that
|
|
208
|
+
* keeps its size on screen, the zoom up to 1.
|
|
209
|
+
*/
|
|
210
|
+
readonly scale: number;
|
|
211
|
+
}
|
|
212
|
+
/** What an `epdfAnnotationInteractive` function is asked: the annotation, and the active tool. */
|
|
213
|
+
interface AnnotationInteractiveContext {
|
|
214
|
+
readonly annotation: Annotation;
|
|
215
|
+
readonly toolId: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* What a look's template gets. `let-annotation` is the annotation; the rest are named:
|
|
219
|
+
* `let-frame="frame"`, `let-hovered="hovered"`, `let-native="native"`.
|
|
220
|
+
*/
|
|
221
|
+
interface EpdfAnnotationTemplateContext {
|
|
222
|
+
/** The annotation, as `get()` returns it. */
|
|
223
|
+
$implicit: Annotation;
|
|
224
|
+
/** The same annotation, by name. */
|
|
225
|
+
annotation: Annotation;
|
|
226
|
+
/**
|
|
227
|
+
* The box you draw into. The layer places, turns and scales it like the annotation's own
|
|
228
|
+
* drawing, also during a drag, a resize or a turn. Fill it (`width: 100%; height: 100%`) and
|
|
229
|
+
* draw at the annotation's 100% size: your text and borders scale with the page.
|
|
230
|
+
*/
|
|
231
|
+
frame: AnnotationFrame;
|
|
232
|
+
/**
|
|
233
|
+
* The layer's own drawing of it, filling the frame: `<ng-container [ngTemplateOutlet]="native" />`
|
|
234
|
+
* keeps the original look, to add to it.
|
|
235
|
+
*/
|
|
236
|
+
native: TemplateRef<unknown>;
|
|
237
|
+
/** The engine's picture of the annotation as an image (`url`), or `null`. `native` draws it in place. */
|
|
238
|
+
appearance: {
|
|
239
|
+
url: string;
|
|
240
|
+
} | null;
|
|
241
|
+
/** True while the pointer is over it. */
|
|
242
|
+
hovered: boolean;
|
|
243
|
+
/** True while it's selected. */
|
|
244
|
+
selected: boolean;
|
|
245
|
+
/** True when what you draw takes the pointer (see `epdfAnnotationInteractive`). */
|
|
246
|
+
interactive: boolean;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* What a sibling plugin's template gets for the annotations its behavior owns (a form plugin's
|
|
250
|
+
* fill controls). It places its own controls: `item` is the layer's projection of the annotation
|
|
251
|
+
* in page coordinates, and `page.transform().toPixels()` turns those into the layer's pixels.
|
|
252
|
+
*/
|
|
253
|
+
interface EpdfAnnotationBehaviorTemplateContext {
|
|
254
|
+
$implicit: Annotation;
|
|
255
|
+
annotation: Annotation;
|
|
256
|
+
item: RenderItem;
|
|
257
|
+
page: EpdfPageContext;
|
|
258
|
+
/** The layer's own drawing of it, in its frame where the layer draws it. */
|
|
259
|
+
native: TemplateRef<unknown>;
|
|
260
|
+
hovered: boolean;
|
|
261
|
+
selected: boolean;
|
|
262
|
+
interactive: boolean;
|
|
263
|
+
}
|
|
264
|
+
/** One handle to draw yourself (`let-handle` in `<ng-template epdfHandle>`). */
|
|
265
|
+
interface HandleProps {
|
|
266
|
+
/** The handle's center, in pixels on the page. */
|
|
267
|
+
readonly at: Point;
|
|
268
|
+
/** The `size` from the settings, px. */
|
|
269
|
+
readonly size: number;
|
|
270
|
+
/** The selection's rotation (degrees clockwise), so a square handle can turn with it. */
|
|
271
|
+
readonly rotation: number;
|
|
272
|
+
/** A box's `'corner'` or `'side'`, or one `'point'` of a line or a polygon. */
|
|
273
|
+
readonly kind: HandleRole;
|
|
274
|
+
/** True while it's being dragged. */
|
|
275
|
+
readonly active: boolean;
|
|
276
|
+
}
|
|
277
|
+
/** The rotation handle to draw yourself: a handle's props, and where its stalk starts on the box. */
|
|
278
|
+
interface RotationHandleProps extends Omit<HandleProps, 'kind'> {
|
|
279
|
+
/** Where the stalk starts on the box, in pixels on the page. */
|
|
280
|
+
readonly from: Point;
|
|
281
|
+
}
|
|
282
|
+
interface EpdfHandleTemplateContext {
|
|
283
|
+
$implicit: HandleProps;
|
|
284
|
+
}
|
|
285
|
+
interface EpdfRotationHandleTemplateContext {
|
|
286
|
+
$implicit: RotationHandleProps;
|
|
287
|
+
}
|
|
288
|
+
interface EpdfRotationBadgeTemplateContext {
|
|
289
|
+
/** The turn in progress: its `page`, the pointer's point `at`, and the `angle` so far. */
|
|
290
|
+
$implicit: AnnotationRotationAnchor;
|
|
291
|
+
}
|
|
292
|
+
/** Which annotations a look draws: a function of the annotation, or every one of a subtype. */
|
|
293
|
+
type AnnotationMatch = ((annotation: Annotation) => boolean) | AnnotationSubtype;
|
|
294
|
+
/** Whether a look takes the pointer: always, never, or when the function says so. */
|
|
295
|
+
type AnnotationInteractive = boolean | ((context: AnnotationInteractiveContext) => boolean);
|
|
296
|
+
/** A look as `@embedpdf/web` sees it: a renderer entry, the same object for the same rule. */
|
|
297
|
+
interface AnnotationLookRenderer {
|
|
298
|
+
readonly for: (annotation: Annotation) => boolean;
|
|
299
|
+
readonly interactive: AnnotationInteractive;
|
|
300
|
+
readonly scale: boolean;
|
|
301
|
+
}
|
|
302
|
+
/** A sibling plugin's renderer entry: it draws what the behavior `behavior` owns. */
|
|
303
|
+
interface AnnotationBehaviorRenderer {
|
|
304
|
+
readonly behavior: string;
|
|
305
|
+
}
|
|
306
|
+
type AnnotationRendererEntry = AnnotationLookRenderer | AnnotationBehaviorRenderer;
|
|
307
|
+
/**
|
|
308
|
+
* Your own look for some annotations: `<ng-template [epdfAnnotation]="isNote" let-annotation>`.
|
|
309
|
+
* Give it a function that picks annotations by any field, or a subtype
|
|
310
|
+
* (`epdfAnnotation="stamp"`). Without `epdfAnnotationInteractive` it only draws: the layer keeps
|
|
311
|
+
* handling the pointer (select, move, resize). With it (or a function the layer asks whenever it
|
|
312
|
+
* matters) your template takes the pointer, and the annotation can't be selected or moved while
|
|
313
|
+
* it does. `[epdfAnnotationScale]="false"` draws at the size on screen instead of the
|
|
314
|
+
* annotation's 100% size.
|
|
315
|
+
*/
|
|
316
|
+
declare class EpdfAnnotationTemplate {
|
|
317
|
+
/**
|
|
318
|
+
* Which annotations it draws: a function of the annotation, or a subtype. (Not a required
|
|
319
|
+
* input: a template inside `@if` is in the layer's query a moment before its inputs are set.)
|
|
320
|
+
*/
|
|
321
|
+
readonly match: i0.InputSignal<AnnotationMatch | undefined>;
|
|
322
|
+
/** Whether it takes the pointer: present (or `true`), or a function of `{ annotation, toolId }`. */
|
|
323
|
+
readonly interactive: i0.InputSignalWithTransform<AnnotationInteractive, "" | "true" | "false" | AnnotationInteractive | null | undefined>;
|
|
324
|
+
/** Scale what you draw with the page (the default), or draw at the size on screen (`false`). */
|
|
325
|
+
readonly scale: i0.InputSignalWithTransform<boolean, unknown>;
|
|
326
|
+
readonly template: TemplateRef<EpdfAnnotationTemplateContext>;
|
|
327
|
+
/** Its renderer entry, the same object on every page for the same rule; null until it has one. */
|
|
328
|
+
readonly renderer: Signal<AnnotationLookRenderer | null>;
|
|
329
|
+
static ngTemplateContextGuard(_directive: EpdfAnnotationTemplate, context: unknown): context is EpdfAnnotationTemplateContext;
|
|
330
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfAnnotationTemplate, never>;
|
|
331
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfAnnotationTemplate, "ng-template[epdfAnnotation]", never, { "match": { "alias": "epdfAnnotation"; "required": false; "isSignal": true; }; "interactive": { "alias": "epdfAnnotationInteractive"; "required": false; "isSignal": true; }; "scale": { "alias": "epdfAnnotationScale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* What a sibling plugin's behavior owns, drawn by your template while the behavior is engaged:
|
|
335
|
+
* `<ng-template epdfAnnotationBehavior="form-fill" let-annotation let-item="item">`. The
|
|
336
|
+
* template places its own controls and takes the input.
|
|
337
|
+
*/
|
|
338
|
+
declare class EpdfAnnotationBehaviorTemplate {
|
|
339
|
+
/** The behavior's id, as its plugin registers it. */
|
|
340
|
+
readonly behavior: i0.InputSignal<string | undefined>;
|
|
341
|
+
readonly template: TemplateRef<EpdfAnnotationBehaviorTemplateContext>;
|
|
342
|
+
/** Its renderer entry, the same object for the same behavior; null until it has one. */
|
|
343
|
+
readonly renderer: Signal<AnnotationBehaviorRenderer | null>;
|
|
344
|
+
static ngTemplateContextGuard(_directive: EpdfAnnotationBehaviorTemplate, context: unknown): context is EpdfAnnotationBehaviorTemplateContext;
|
|
345
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfAnnotationBehaviorTemplate, never>;
|
|
346
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfAnnotationBehaviorTemplate, "ng-template[epdfAnnotationBehavior]", never, { "behavior": { "alias": "epdfAnnotationBehavior"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Each handle, drawn your way in place of the layer's: `<ng-template epdfHandle let-handle>`.
|
|
350
|
+
* The viewer still decides where a handle can be grabbed, so what you draw can't break dragging.
|
|
351
|
+
*/
|
|
352
|
+
declare class EpdfHandleTemplate {
|
|
353
|
+
readonly template: TemplateRef<EpdfHandleTemplateContext>;
|
|
354
|
+
static ngTemplateContextGuard(_directive: EpdfHandleTemplate, context: unknown): context is EpdfHandleTemplateContext;
|
|
355
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfHandleTemplate, never>;
|
|
356
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfHandleTemplate, "ng-template[epdfHandle]", never, {}, {}, never, never, true, never>;
|
|
357
|
+
}
|
|
358
|
+
/** The rotation handle, drawn your way: `<ng-template epdfRotationHandle let-handle>`. */
|
|
359
|
+
declare class EpdfRotationHandleTemplate {
|
|
360
|
+
readonly template: TemplateRef<EpdfRotationHandleTemplateContext>;
|
|
361
|
+
static ngTemplateContextGuard(_directive: EpdfRotationHandleTemplate, context: unknown): context is EpdfRotationHandleTemplateContext;
|
|
362
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfRotationHandleTemplate, never>;
|
|
363
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfRotationHandleTemplate, "ng-template[epdfRotationHandle]", never, {}, {}, never, never, true, never>;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* The rotation badge's content, drawn your way: inside `<epdf-annotation-rotation-badge>`,
|
|
367
|
+
* `<ng-template epdfRotationBadge let-rotation>{{ rotation.angle }}°</ng-template>`.
|
|
368
|
+
*/
|
|
369
|
+
declare class EpdfRotationBadgeTemplate {
|
|
370
|
+
readonly template: TemplateRef<EpdfRotationBadgeTemplateContext>;
|
|
371
|
+
static ngTemplateContextGuard(_directive: EpdfRotationBadgeTemplate, context: unknown): context is EpdfRotationBadgeTemplateContext;
|
|
372
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfRotationBadgeTemplate, never>;
|
|
373
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfRotationBadgeTemplate, "ng-template[epdfRotationBadge]", never, {}, {}, never, never, true, never>;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/** Your look of one annotation, with what its template gets. */
|
|
377
|
+
interface DrawnLook {
|
|
378
|
+
readonly template: EpdfAnnotationTemplate;
|
|
379
|
+
readonly annotation: Annotation;
|
|
380
|
+
readonly frame: AnnotationFrame;
|
|
381
|
+
/** Drawn at the annotation's 100% size, and scaled by the layer. */
|
|
382
|
+
readonly scaled: boolean;
|
|
383
|
+
/** Tells a rich text editor in the look how much the look is scaled. */
|
|
384
|
+
readonly injector: Injector;
|
|
385
|
+
}
|
|
386
|
+
/** One annotation as the template draws it. */
|
|
387
|
+
interface Drawn {
|
|
388
|
+
readonly item: RenderItem;
|
|
389
|
+
/** Its frame in the layer's pixels. */
|
|
390
|
+
readonly frame: FramePixels;
|
|
391
|
+
/** What its own drawing shows: the engine's picture of it, or its scene (`pictureOrPainting`). */
|
|
392
|
+
readonly shows: PictureOrPainting<RenderItem>;
|
|
393
|
+
/** The same picture as a look gets it: its `appearance`. */
|
|
394
|
+
readonly appearance: {
|
|
395
|
+
url: string;
|
|
396
|
+
} | null;
|
|
397
|
+
/** Your look that draws it, when one does. */
|
|
398
|
+
readonly look: DrawnLook | null;
|
|
399
|
+
/** A sibling plugin's template that owns it while its behavior is engaged. */
|
|
400
|
+
readonly owner: {
|
|
401
|
+
readonly template: EpdfAnnotationBehaviorTemplate;
|
|
402
|
+
readonly annotation: Annotation;
|
|
403
|
+
} | null;
|
|
404
|
+
/** The look takes the pointer. */
|
|
405
|
+
readonly interactive: boolean;
|
|
406
|
+
/** Keep the pointer and the focus out: a look that only draws, or a plugin's own input. */
|
|
407
|
+
readonly inert: boolean;
|
|
408
|
+
}
|
|
409
|
+
declare class EpdfAnnotationLayer {
|
|
410
|
+
protected readonly page: _embedpdf_angular_runtime.EpdfPageContext;
|
|
411
|
+
private readonly injector;
|
|
412
|
+
private readonly annotation;
|
|
413
|
+
private readonly interaction;
|
|
414
|
+
private readonly render;
|
|
415
|
+
private readonly chrome;
|
|
416
|
+
private readonly looks;
|
|
417
|
+
private readonly behaviors;
|
|
418
|
+
protected readonly handleTemplate: i0.Signal<EpdfHandleTemplate | undefined>;
|
|
419
|
+
protected readonly rotationHandleTemplate: i0.Signal<EpdfRotationHandleTemplate | undefined>;
|
|
420
|
+
/**
|
|
421
|
+
* The renderer entries, in the order the templates are written: the first look that matches
|
|
422
|
+
* wins. The same array while every entry stays the same.
|
|
423
|
+
*/
|
|
424
|
+
private readonly renderers;
|
|
425
|
+
/** Goes up when the behaviors register again, so each drawing is decided again. */
|
|
426
|
+
private readonly registrations;
|
|
427
|
+
private readonly view;
|
|
428
|
+
private readonly pixels;
|
|
429
|
+
private readonly items;
|
|
430
|
+
private readonly allTexts;
|
|
431
|
+
/** The active tool: an interactive look's function is asked about it, so a tool change redraws. */
|
|
432
|
+
private readonly activeToolId;
|
|
433
|
+
/** The pictures' URLs, by annotation and state; `null` until the page's first ones arrive. */
|
|
434
|
+
private readonly urls;
|
|
435
|
+
/** The pictures shown stay valid until the next ones are shown. */
|
|
436
|
+
private readonly shown;
|
|
437
|
+
private readonly appearanceEpoch;
|
|
438
|
+
private readonly appearanceScale;
|
|
439
|
+
private readonly bakeScale;
|
|
440
|
+
/** The text box being typed in, by key: while it is, a look's editor takes the keys. */
|
|
441
|
+
private readonly editingKey;
|
|
442
|
+
/** One injector per look, by item: kept while the item is drawn, so the look is never made again. */
|
|
443
|
+
private readonly lookInjectors;
|
|
444
|
+
protected readonly drawings: i0.Signal<readonly Drawn[]>;
|
|
445
|
+
/** How much the layer scales each look, by item: 1 for a look drawn at its size on screen. */
|
|
446
|
+
private readonly lookScales;
|
|
447
|
+
/** The text boxes the layer draws: not the ones a look of yours draws, which edits them there. */
|
|
448
|
+
protected readonly texts: i0.Signal<readonly TextItem[]>;
|
|
449
|
+
protected readonly textOutline: i0.Signal<string>;
|
|
450
|
+
private readonly imageGhost;
|
|
451
|
+
private readonly armedStamp;
|
|
452
|
+
/**
|
|
453
|
+
* The ghost is a picture of vector artwork, sharp at one size: the size class that covers the
|
|
454
|
+
* box's device width. The plugin keeps one picture per class, so a zoom never renders per frame.
|
|
455
|
+
*/
|
|
456
|
+
private readonly ghostBucket;
|
|
457
|
+
private readonly ghostUrl;
|
|
458
|
+
protected readonly ghost: i0.Signal<{
|
|
459
|
+
url: string;
|
|
460
|
+
box: _embedpdf_web.PixelRect;
|
|
461
|
+
opacity: string;
|
|
462
|
+
rotation: number;
|
|
463
|
+
} | null>;
|
|
464
|
+
constructor();
|
|
465
|
+
/** The injector a look's template gets for one item: the look's scale, followed live. */
|
|
466
|
+
private lookInjectorOf;
|
|
467
|
+
/**
|
|
468
|
+
* An interactive look takes the pointer through a behavior the plugin knows, registered once
|
|
469
|
+
* per document and look however many pages show the layer (`@embedpdf/web` counts them). The
|
|
470
|
+
* looks are the same entries on every page, so keep the functions you give `epdfAnnotation`
|
|
471
|
+
* and `epdfAnnotationInteractive` in fields: a function made anew registers again.
|
|
472
|
+
*/
|
|
473
|
+
private registerBehaviors;
|
|
474
|
+
/**
|
|
475
|
+
* The baked pictures, loaded again when the page's appearance epoch or the bake scale changes;
|
|
476
|
+
* the ones shown stay valid until the next are shown.
|
|
477
|
+
*/
|
|
478
|
+
private loadAppearances;
|
|
479
|
+
/**
|
|
480
|
+
* The armed stamp's ghost picture, for its size class. The previous class's picture stays up
|
|
481
|
+
* until this one is there, so a zoom across a class boundary never flickers; a disarm drops it.
|
|
482
|
+
*/
|
|
483
|
+
private loadGhost;
|
|
484
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfAnnotationLayer, never>;
|
|
485
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EpdfAnnotationLayer, "epdf-annotation-layer", never, {}, {}, ["looks", "behaviors", "handleTemplate", "rotationHandleTemplate"], never, true, never>;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Your own element as the editor of a text box you draw yourself, in a look
|
|
490
|
+
* (`<ng-template [epdfAnnotation]="isTextBox" let-annotation>`):
|
|
491
|
+
*
|
|
492
|
+
* <div [epdfRichTextEditor]="annotation" #editor="epdfRichTextEditor"
|
|
493
|
+
* class="text-box" [class.editing]="editor.editing()"></div>
|
|
494
|
+
*
|
|
495
|
+
* It draws the runs, turns typing back into runs, keeps the caret when the style changes, and
|
|
496
|
+
* handles pasting, input methods and the format shortcuts; `text.toggleFormat()` and
|
|
497
|
+
* `selection.update()` work on it as on the layer's own box. It gives the element the box's
|
|
498
|
+
* body style (font, size, color and alignment), and while someone types it takes the pointer.
|
|
499
|
+
* Leave the element empty: the editor fills it.
|
|
500
|
+
*/
|
|
501
|
+
declare class EpdfRichTextEditor {
|
|
502
|
+
/** The free text annotation this element edits: the template's `let-annotation`. */
|
|
503
|
+
readonly annotation: i0.InputSignal<Annotation>;
|
|
504
|
+
private readonly page;
|
|
505
|
+
private readonly host;
|
|
506
|
+
private readonly lookScale;
|
|
507
|
+
private readonly view;
|
|
508
|
+
private readonly pixels;
|
|
509
|
+
/** The annotation's text box on the page, or null while there is none. */
|
|
510
|
+
private readonly item;
|
|
511
|
+
/** Pixels per point where the element is: in a scaled look, at the annotation's 100% size. */
|
|
512
|
+
private readonly scale;
|
|
513
|
+
/** The box's body style: font, size, color and alignment, or null while there is no box. */
|
|
514
|
+
protected readonly look: Signal<TextBoxStyle | null>;
|
|
515
|
+
/** True while someone types in the box. */
|
|
516
|
+
readonly editing: Signal<boolean>;
|
|
517
|
+
constructor();
|
|
518
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfRichTextEditor, never>;
|
|
519
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfRichTextEditor, "[epdfRichTextEditor]", ["epdfRichTextEditor"], { "annotation": { "alias": "epdfRichTextEditor"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Your menu next to the selection: one menu, also for a selection over several pages, clear of
|
|
524
|
+
* the rotation handle. It hides while the selection is dragged, resized or turned. Put it inside
|
|
525
|
+
* `<epdf-stage>`, next to the page template, with what the menu holds between its tags:
|
|
526
|
+
*
|
|
527
|
+
* <epdf-annotation-menu placement="bottom">
|
|
528
|
+
* <button (click)="annotation.selection.delete()">Delete</button>
|
|
529
|
+
* </epdf-annotation-menu>
|
|
530
|
+
*/
|
|
531
|
+
declare class EpdfAnnotationMenu {
|
|
532
|
+
/** Which side of the selection: `'top'` (the default), `'bottom'`, `'left'` or `'right'`, or a corner. */
|
|
533
|
+
readonly placement: i0.InputSignal<AnchoredPlacement>;
|
|
534
|
+
/** Screen pixels between the selection and the menu. */
|
|
535
|
+
readonly gap: i0.InputSignal<number>;
|
|
536
|
+
private readonly annotation;
|
|
537
|
+
private readonly projection;
|
|
538
|
+
/**
|
|
539
|
+
* The selection's anchor as its page is shown: the rotation handle sits a fixed number of
|
|
540
|
+
* pixels off the box, so where it is on the page depends on the zoom. Read again with the
|
|
541
|
+
* projection, in the same pass as the pages.
|
|
542
|
+
*/
|
|
543
|
+
private readonly selection;
|
|
544
|
+
protected readonly anchor: Signal<EpdfAnchor | null>;
|
|
545
|
+
constructor();
|
|
546
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfAnnotationMenu, never>;
|
|
547
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EpdfAnnotationMenu, "epdf-annotation-menu", never, { "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Buttons over a polygon or polyline being drawn, which helps on touch screens. `draft()` is the
|
|
551
|
+
* shape being drawn (`pointCount`, `minPoints`, `canFinish`, …), or null; the verbs are the
|
|
552
|
+
* annotation service's `draft.finish()` and `draft.cancel()`:
|
|
553
|
+
*
|
|
554
|
+
* <epdf-annotation-draft-menu #menu="epdfAnnotationDraftMenu">
|
|
555
|
+
* <button [disabled]="!menu.draft()?.canFinish" (click)="annotation.draft.finish()">Done</button>
|
|
556
|
+
* </epdf-annotation-draft-menu>
|
|
557
|
+
*/
|
|
558
|
+
declare class EpdfAnnotationDraftMenu {
|
|
559
|
+
/** Which side of the shape being drawn. */
|
|
560
|
+
readonly placement: i0.InputSignal<AnchoredPlacement>;
|
|
561
|
+
/** Screen pixels between the shape and the menu. */
|
|
562
|
+
readonly gap: i0.InputSignal<number>;
|
|
563
|
+
private readonly annotation;
|
|
564
|
+
/** The shape being drawn: where it is, its points so far and whether it can end; or null. */
|
|
565
|
+
readonly draft: Signal<CreationDraft | null>;
|
|
566
|
+
constructor();
|
|
567
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfAnnotationDraftMenu, never>;
|
|
568
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EpdfAnnotationDraftMenu, "epdf-annotation-draft-menu", ["epdfAnnotationDraftMenu"], { "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* The angle next to the pointer while a selection is turned, upright however the page is shown.
|
|
572
|
+
* It shows the angle in the `chrome.readout` colors when `chrome.readout.enabled`; give it an
|
|
573
|
+
* `<ng-template epdfRotationBadge let-rotation>` to draw it your way. `rotation()` is the turn
|
|
574
|
+
* in progress (`page`, `at`, `angle`), or null.
|
|
575
|
+
*/
|
|
576
|
+
declare class EpdfAnnotationRotationBadge {
|
|
577
|
+
/** Which side of the pointer. */
|
|
578
|
+
readonly placement: i0.InputSignal<AnchoredPlacement>;
|
|
579
|
+
/** Screen pixels between the pointer and the badge. */
|
|
580
|
+
readonly gap: i0.InputSignal<number>;
|
|
581
|
+
private readonly annotation;
|
|
582
|
+
private readonly settings;
|
|
583
|
+
protected readonly custom: Signal<EpdfRotationBadgeTemplate | undefined>;
|
|
584
|
+
/** The turn in progress: its page, the pointer's point and the angle so far; or null. */
|
|
585
|
+
readonly rotation: Signal<AnnotationRotationAnchor | null>;
|
|
586
|
+
/** Shown while turning, with a template of yours or with the readout on. */
|
|
587
|
+
protected readonly shown: Signal<_embedpdf_core_annotation.RotationAnchor | null>;
|
|
588
|
+
/** A box of no size at the pointer. */
|
|
589
|
+
protected readonly anchor: Signal<EpdfAnchor | null>;
|
|
590
|
+
protected readonly fontFamily: string;
|
|
591
|
+
protected readonly background: Signal<string>;
|
|
592
|
+
protected readonly color: Signal<string>;
|
|
593
|
+
constructor();
|
|
594
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfAnnotationRotationBadge, never>;
|
|
595
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EpdfAnnotationRotationBadge, "epdf-annotation-rotation-badge", ["epdfAnnotationRotationBadge"], { "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; }, {}, ["custom"], never, true, never>;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export { EpdfAnnotation, EpdfAnnotationBehaviorTemplate, EpdfAnnotationDraftMenu, EpdfAnnotationLayer, EpdfAnnotationMenu, EpdfAnnotationRotationBadge, EpdfAnnotationTemplate, EpdfComments, EpdfHandleTemplate, EpdfRichTextEditor, EpdfRotationBadgeTemplate, EpdfRotationHandleTemplate, filePickerProvider, withAnnotation, withFilePicker };
|
|
599
|
+
export type { AnnotationBehaviorRenderer, AnnotationFrame, AnnotationInteractive, AnnotationInteractiveContext, AnnotationLookRenderer, AnnotationMatch, AnnotationRendererEntry, CommentThreadView, EpdfAnnotationBehaviorTemplateContext, EpdfAnnotationSelection, EpdfAnnotationTemplateContext, EpdfAnnotationTools, EpdfHandleTemplateContext, EpdfRotationBadgeTemplateContext, EpdfRotationHandleTemplateContext, HandleProps, RotationHandleProps };
|