@embedpdf/angular 3.0.0-next.14 → 3.0.0-next.16

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.
Files changed (87) hide show
  1. package/README.md +309 -0
  2. package/dist/README.md +309 -0
  3. package/dist/actions/index.d.ts +34 -16
  4. package/dist/anchored/index.d.ts +67 -0
  5. package/dist/annotation/index.d.ts +602 -0
  6. package/dist/attachment/index.d.ts +29 -0
  7. package/dist/commands/index.d.ts +109 -0
  8. package/dist/fesm2022/embedpdf-angular-actions.mjs +117 -36
  9. package/dist/fesm2022/embedpdf-angular-actions.mjs.map +1 -1
  10. package/dist/fesm2022/embedpdf-angular-anchored.mjs +148 -0
  11. package/dist/fesm2022/embedpdf-angular-anchored.mjs.map +1 -0
  12. package/dist/fesm2022/embedpdf-angular-annotation.mjs +1933 -0
  13. package/dist/fesm2022/embedpdf-angular-annotation.mjs.map +1 -0
  14. package/dist/fesm2022/embedpdf-angular-attachment.mjs +67 -0
  15. package/dist/fesm2022/embedpdf-angular-attachment.mjs.map +1 -0
  16. package/dist/fesm2022/embedpdf-angular-commands.mjs +235 -0
  17. package/dist/fesm2022/embedpdf-angular-commands.mjs.map +1 -0
  18. package/dist/fesm2022/embedpdf-angular-form.mjs +1074 -0
  19. package/dist/fesm2022/embedpdf-angular-form.mjs.map +1 -0
  20. package/dist/fesm2022/embedpdf-angular-history.mjs +54 -0
  21. package/dist/fesm2022/embedpdf-angular-history.mjs.map +1 -0
  22. package/dist/fesm2022/embedpdf-angular-i18n.mjs +100 -0
  23. package/dist/fesm2022/embedpdf-angular-i18n.mjs.map +1 -0
  24. package/dist/fesm2022/embedpdf-angular-interaction.mjs +157 -0
  25. package/dist/fesm2022/embedpdf-angular-interaction.mjs.map +1 -0
  26. package/dist/fesm2022/embedpdf-angular-link.mjs +306 -0
  27. package/dist/fesm2022/embedpdf-angular-link.mjs.map +1 -0
  28. package/dist/fesm2022/embedpdf-angular-measurement.mjs +106 -0
  29. package/dist/fesm2022/embedpdf-angular-measurement.mjs.map +1 -0
  30. package/dist/fesm2022/embedpdf-angular-metadata.mjs +77 -0
  31. package/dist/fesm2022/embedpdf-angular-metadata.mjs.map +1 -0
  32. package/dist/fesm2022/embedpdf-angular-outline.mjs +76 -0
  33. package/dist/fesm2022/embedpdf-angular-outline.mjs.map +1 -0
  34. package/dist/fesm2022/embedpdf-angular-page-edit.mjs +68 -0
  35. package/dist/fesm2022/embedpdf-angular-page-edit.mjs.map +1 -0
  36. package/dist/fesm2022/embedpdf-angular-page-view.mjs +297 -0
  37. package/dist/fesm2022/embedpdf-angular-page-view.mjs.map +1 -0
  38. package/dist/fesm2022/embedpdf-angular-redaction.mjs +93 -0
  39. package/dist/fesm2022/embedpdf-angular-redaction.mjs.map +1 -0
  40. package/dist/fesm2022/embedpdf-angular-render.mjs +331 -69
  41. package/dist/fesm2022/embedpdf-angular-render.mjs.map +1 -1
  42. package/dist/fesm2022/embedpdf-angular-runtime.mjs +1151 -390
  43. package/dist/fesm2022/embedpdf-angular-runtime.mjs.map +1 -1
  44. package/dist/fesm2022/embedpdf-angular-search.mjs +251 -0
  45. package/dist/fesm2022/embedpdf-angular-search.mjs.map +1 -0
  46. package/dist/fesm2022/embedpdf-angular-selection.mjs +477 -0
  47. package/dist/fesm2022/embedpdf-angular-selection.mjs.map +1 -0
  48. package/dist/fesm2022/embedpdf-angular-shell.mjs +177 -0
  49. package/dist/fesm2022/embedpdf-angular-shell.mjs.map +1 -0
  50. package/dist/fesm2022/embedpdf-angular-signature.mjs +120 -0
  51. package/dist/fesm2022/embedpdf-angular-signature.mjs.map +1 -0
  52. package/dist/fesm2022/embedpdf-angular-stage.mjs +688 -288
  53. package/dist/fesm2022/embedpdf-angular-stage.mjs.map +1 -1
  54. package/dist/fesm2022/embedpdf-angular-stamp.mjs +169 -0
  55. package/dist/fesm2022/embedpdf-angular-stamp.mjs.map +1 -0
  56. package/dist/fesm2022/embedpdf-angular-testing.mjs +89 -0
  57. package/dist/fesm2022/embedpdf-angular-testing.mjs.map +1 -0
  58. package/dist/fesm2022/embedpdf-angular-toolbar.mjs +1123 -0
  59. package/dist/fesm2022/embedpdf-angular-toolbar.mjs.map +1 -0
  60. package/dist/fesm2022/embedpdf-angular-view-manager.mjs +69 -0
  61. package/dist/fesm2022/embedpdf-angular-view-manager.mjs.map +1 -0
  62. package/dist/fesm2022/embedpdf-angular.mjs +25 -3
  63. package/dist/fesm2022/embedpdf-angular.mjs.map +1 -1
  64. package/dist/form/index.d.ts +79 -0
  65. package/dist/history/index.d.ts +28 -0
  66. package/dist/i18n/index.d.ts +52 -0
  67. package/dist/index.d.ts +22 -0
  68. package/dist/interaction/index.d.ts +58 -0
  69. package/dist/link/index.d.ts +77 -0
  70. package/dist/measurement/index.d.ts +46 -0
  71. package/dist/metadata/index.d.ts +51 -0
  72. package/dist/outline/index.d.ts +32 -0
  73. package/dist/page-edit/index.d.ts +27 -0
  74. package/dist/page-view/index.d.ts +94 -0
  75. package/dist/redaction/index.d.ts +38 -0
  76. package/dist/render/index.d.ts +45 -6
  77. package/dist/runtime/index.d.ts +579 -199
  78. package/dist/search/index.d.ts +71 -0
  79. package/dist/selection/index.d.ts +141 -0
  80. package/dist/shell/index.d.ts +88 -0
  81. package/dist/signature/index.d.ts +45 -0
  82. package/dist/stage/index.d.ts +242 -141
  83. package/dist/stamp/index.d.ts +58 -0
  84. package/dist/testing/index.d.ts +53 -0
  85. package/dist/toolbar/index.d.ts +257 -0
  86. package/dist/view-manager/index.d.ts +23 -0
  87. package/package.json +145 -14
@@ -0,0 +1,77 @@
1
+ import * as _embedpdf_plugin_link from '@embedpdf/plugin-link';
2
+ import { Link } from '@embedpdf/plugin-link';
3
+ export * from '@embedpdf/plugin-link';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
6
+ import * as i0 from '@angular/core';
7
+ import { TemplateRef } from '@angular/core';
8
+ import * as _embedpdf_plugin_annotation_contract from '@embedpdf/plugin-annotation/contract';
9
+ import { LinkAnchor, LinkAnchorEvent } from '@embedpdf/web';
10
+
11
+ declare const EpdfLink_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_link.LinkCapability, Record<never, never>, "activate" | "getStatus" | "listLinks" | "getLink" | "getLinkAt" | "listAllLinks" | "ensureLoaded" | "isLoaded" | "resolve" | "activateAt" | "getLabel", "onActivated" | "onLoaded">;
12
+ /**
13
+ * Links: `listLinks(page)`, `getLinkAt(page, point)`, `activate(link)` and the rest of the Links
14
+ * page's methods, and its events as streams (`link.activated$`). While the service is there,
15
+ * `activate()` opens a website in a new tab.
16
+ */
17
+ declare class EpdfLink extends EpdfLink_base {
18
+ constructor();
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfLink, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfLink>;
21
+ }
22
+ /** The link plugin: links that work, in every page with an `<epdf-link-layer>`. */
23
+ declare function withLink(): EmbedPdfFeature;
24
+
25
+ /** What a link template gets: `let-link` is the link, `let-native="native"` the layer's anchor. */
26
+ interface EpdfLinkTemplateContext {
27
+ /** The link: its `id`, its `bounds` on the page and its `target`. */
28
+ $implicit: Link;
29
+ /** The layer's own anchor: `<ng-container [ngTemplateOutlet]="native" />`. */
30
+ native: TemplateRef<unknown>;
31
+ }
32
+ /**
33
+ * How each link is drawn instead of the layer's bare anchor:
34
+ * `<ng-template epdfLink let-link let-native="native">`. For a link you don't want to change,
35
+ * show `native` alone.
36
+ */
37
+ declare class EpdfLinkTemplate {
38
+ readonly template: TemplateRef<EpdfLinkTemplateContext>;
39
+ static ngTemplateContextGuard(_directive: EpdfLinkTemplate, context: unknown): context is EpdfLinkTemplateContext;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfLinkTemplate, never>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfLinkTemplate, "ng-template[epdfLink]", never, {}, {}, never, never, true, never>;
42
+ }
43
+ declare class EpdfLinkLayer {
44
+ private readonly page;
45
+ private readonly host;
46
+ private readonly enclosingStage;
47
+ /** The app's own drawing of a link, when it gives one. */
48
+ protected readonly custom: i0.Signal<EpdfLinkTemplate | undefined>;
49
+ /** A plugin of the page's own document: every plugin below is read for it. */
50
+ private bindTo;
51
+ private readonly link;
52
+ /** Optional: with the actions plugin, a link's own actions run. */
53
+ private readonly actions;
54
+ /** Optional: a tool that can edit annotations owns the links that belong to one. */
55
+ private readonly editing;
56
+ /** A link to a page moves the view it was followed in: this Stage, or the main one. */
57
+ private readonly stage;
58
+ private readonly links;
59
+ /** Whether the active tool follows links: the layer draws nothing otherwise. */
60
+ private readonly engaged;
61
+ /** Each link's anchor: its box, its label, and a native `href` only for a website with nothing chained after it. */
62
+ protected readonly items: i0.Signal<readonly LinkAnchor<_embedpdf_plugin_annotation_contract.LinkNavItem>[]>;
63
+ /** One hover pump per layer: the enter and exit actions of the link under the pointer. */
64
+ private readonly pump;
65
+ constructor();
66
+ protected follow(event: MouseEvent, item: LinkAnchor<Link>): void;
67
+ protected followByKey(event: KeyboardEvent, link: Link): void;
68
+ protected hover(link: Link | null): void;
69
+ /** Send one of the link's own events to the actions plugin, when the link has actions. */
70
+ protected notify(link: Link, event: LinkAnchorEvent): void;
71
+ private activate;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfLinkLayer, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<EpdfLinkLayer, "epdf-link-layer", never, {}, {}, ["custom"], never, true, never>;
74
+ }
75
+
76
+ export { EpdfLink, EpdfLinkLayer, EpdfLinkTemplate, withLink };
77
+ export type { EpdfLinkTemplateContext };
@@ -0,0 +1,46 @@
1
+ import * as _embedpdf_plugin_measurement from '@embedpdf/plugin-measurement';
2
+ import { PageScale, AnnotationRef, MeasurementReadout, MeasurementUnavailable, MeasurementConfig } from '@embedpdf/plugin-measurement';
3
+ export * from '@embedpdf/plugin-measurement';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
6
+ import * as i0 from '@angular/core';
7
+ import { Signal } from '@angular/core';
8
+ import { PageRef } from '@embedpdf/core';
9
+
10
+ /** A page, or a function that gives the page to follow. */
11
+ type PageInput<Page> = Page | (() => Page);
12
+ declare const EpdfMeasurement_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_measurement.MeasurementCapability, {
13
+ busy: boolean;
14
+ calibrationRequest: _embedpdf_plugin_measurement.CalibrationRequest | null;
15
+ lastReports: readonly _embedpdf_plugin_measurement.ScaleChangeReport[];
16
+ }, "calibrate" | "canCalibrate" | "canMeasure" | "getPageScale" | "ensureLoaded" | "isBusy" | "listLastReports" | "listPresets" | "listUnits" | "listAreaUnits" | "getReadout" | "measureDistance" | "measureArea" | "getCalibrationRequest" | "setScale" | "setUnit" | "setAreaUnit" | "setPrecision" | "setPreset" | "clearScale" | "createMeasurement" | "startCalibration" | "dismissCalibration", "onScaleChanged" | "onCalibrationRequested" | "onCalibrationCompleted" | "onCalibrationDismissed">;
17
+ /**
18
+ * Measurements of the document in scope (`[epdfDocumentScope]`), else the active one: the
19
+ * Measurements page's methods, its State table as signals, a page's scale and a measurement's
20
+ * readout as signals, the events as streams (`scaleChanged$`, `calibrationRequested$`, …), and
21
+ * the settings. Without a document the signals read empty and the methods refuse with
22
+ * `not-ready`.
23
+ */
24
+ declare class EpdfMeasurement extends EpdfMeasurement_base {
25
+ /**
26
+ * A page's scale (its ref or its index), for a scale bar or a "1:100" badge: where it came
27
+ * from, and whether it has loaded. Pass a function (`() => this.page().ref`) and it follows
28
+ * the page you show; `null` (no page) answers `null`, so a badge can stay without inventing a
29
+ * page. It changes only when that page's scale does.
30
+ */
31
+ scaleOf(page: PageInput<PageRef | number>): Signal<PageScale>;
32
+ scaleOf(page: PageInput<PageRef | number | null>): Signal<PageScale | null>;
33
+ /**
34
+ * A measurement's `{ kind, value, label }`, or `{ unavailable }` with why there's none (no
35
+ * scale, a scale from map software). Pass a function (`this.annotation`, an input) and it
36
+ * follows the measurement you show. The plugin hands out the same readout until the
37
+ * measurement changes, so it changes only then.
38
+ */
39
+ readoutOf(ref: AnnotationRef | (() => AnnotationRef)): Signal<MeasurementReadout | MeasurementUnavailable>;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfMeasurement, never>;
41
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfMeasurement>;
42
+ }
43
+ /** Measurements, with their settings: `withMeasurement({ defaultScale: 'imperial' })`. */
44
+ declare function withMeasurement(options?: MeasurementConfig): EmbedPdfFeature;
45
+
46
+ export { EpdfMeasurement, withMeasurement };
@@ -0,0 +1,51 @@
1
+ import * as _embedpdf_plugin_metadata from '@embedpdf/plugin-metadata';
2
+ import { CustomMetadataCapability, CustomMetadataUpdatedEvent, CustomMetadataResyncedEvent } from '@embedpdf/plugin-metadata';
3
+ export * from '@embedpdf/plugin-metadata';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { CustomMetadata, ResourceStatus, DocumentMetadata, EmbedPdfFeature } from '@embedpdf/angular/runtime';
6
+ import * as i0 from '@angular/core';
7
+ import { Signal } from '@angular/core';
8
+ import { Observable } from 'rxjs';
9
+
10
+ /** Your own fields of a document, as `metadata.custom`: the same reads and calls as the standard ones. */
11
+ interface EpdfCustomMetadata {
12
+ /** Your own fields, as `{ name: value }`, or null until they have loaded. */
13
+ readonly fields: Signal<CustomMetadata | null>;
14
+ /** `'idle'`, `'loading'`, `'ready'`, `'forbidden'` or `'error'`. */
15
+ readonly status: Signal<ResourceStatus>;
16
+ /** A string sets a field, `null` removes it, and the fields left out stay. Resolves `{ custom }`. */
17
+ readonly update: CustomMetadataCapability['update'];
18
+ /** Read your own fields from the file again. Rarely needed: they stay up to date by themselves. */
19
+ readonly refresh: CustomMetadataCapability['refresh'];
20
+ /** Your own fields, read once. */
21
+ readonly getSnapshot: CustomMetadataCapability['getSnapshot'];
22
+ /** Their load state, read once. */
23
+ readonly getStatus: CustomMetadataCapability['getStatus'];
24
+ /** Your own fields changed, by you or by someone else. */
25
+ readonly updated$: Observable<CustomMetadataUpdatedEvent>;
26
+ /** Your own fields were loaded from the file. */
27
+ readonly resynced$: Observable<CustomMetadataResyncedEvent>;
28
+ }
29
+ declare const EpdfMetadata_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_metadata.MetadataCapability, Record<never, never>, "getSnapshot" | "getStatus" | "ensureLoaded" | "canUpdate" | "update" | "refresh", "onUpdated" | "onResynced">;
30
+ /**
31
+ * The metadata of the document in scope (`[epdfDocumentScope]`), else the active one: the
32
+ * standard fields as `fields()`, their load state as `status()`, `update()`, `refresh()`,
33
+ * `ensureLoaded()` (the service calls it for the document it reads), the
34
+ * check `canUpdate()`, the streams `updated$` and `resynced$`, and your own fields as `custom`.
35
+ * With no document the signals read null and `'idle'`, and every call refuses with `not-ready`.
36
+ */
37
+ declare class EpdfMetadata extends EpdfMetadata_base {
38
+ /** Every standard field (`title`, `author`, …), or null until it has loaded. */
39
+ readonly fields: Signal<DocumentMetadata | null>;
40
+ /** Whether the standard fields are still loading, there, or not allowed. */
41
+ readonly status: Signal<ResourceStatus>;
42
+ /** Your own fields, kept in the document: a contract number, who reviewed it. */
43
+ readonly custom: EpdfCustomMetadata;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfMetadata, never>;
45
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfMetadata>;
46
+ }
47
+ /** Metadata, for `provideEmbedPdf()`. */
48
+ declare function withMetadata(): EmbedPdfFeature;
49
+
50
+ export { EpdfMetadata, withMetadata };
51
+ export type { EpdfCustomMetadata };
@@ -0,0 +1,32 @@
1
+ import * as _embedpdf_plugin_outline from '@embedpdf/plugin-outline';
2
+ export * from '@embedpdf/plugin-outline';
3
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
4
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
5
+ import * as _embedpdf_core from '@embedpdf/core';
6
+ import * as i0 from '@angular/core';
7
+
8
+ declare const EpdfOutline_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_outline.OutlineCapability, {
9
+ items: readonly _embedpdf_plugin_outline.OutlineItem<_embedpdf_core.PageDestination>[];
10
+ rows: readonly _embedpdf_plugin_outline.OutlineRow[];
11
+ current: _embedpdf_plugin_outline.OutlineItemRef | null;
12
+ selected: readonly _embedpdf_plugin_outline.OutlineItemRef[];
13
+ status: _embedpdf_core.ResourceStatus;
14
+ incomplete: boolean;
15
+ canEdit: boolean;
16
+ }, "activate" | "create" | "get" | "move" | "select" | "delete" | "toggle" | "refresh" | "update" | "ensureLoaded" | "getChildren" | "isExpanded" | "expand" | "collapse" | "expandAll" | "collapseAll" | "reveal" | "getCurrentViewTarget", "onResynced" | "onChanged">;
17
+ /**
18
+ * The outline of the document in scope (`[epdfDocumentScope]`), else the active one: the State
19
+ * table as signals (`items()`, `rows()`, `current()`, `selected()`, `status()`, `incomplete()`,
20
+ * `canEdit()`), the reads that take an item (`get()`, `getChildren()`, `isExpanded()`), the
21
+ * calls that expand, select, follow and edit items, and the streams `changed$` and
22
+ * `resynced$`. Reading it reads the outline. With no document the signals read empty, and every
23
+ * call refuses with `not-ready`.
24
+ */
25
+ declare class EpdfOutline extends EpdfOutline_base {
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfOutline, never>;
27
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfOutline>;
28
+ }
29
+ /** The outline, for `provideEmbedPdf()`. */
30
+ declare function withOutline(): EmbedPdfFeature;
31
+
32
+ export { EpdfOutline, withOutline };
@@ -0,0 +1,27 @@
1
+ import * as _embedpdf_plugin_page_edit from '@embedpdf/plugin-page-edit';
2
+ export * from '@embedpdf/plugin-page-edit';
3
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
4
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
5
+ import * as _embedpdf_core from '@embedpdf/core';
6
+ import * as i0 from '@angular/core';
7
+
8
+ declare const EpdfPageEdit_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_page_edit.PageEditCapability, {
9
+ selected: readonly _embedpdf_core.PageRef[];
10
+ canEdit: boolean;
11
+ canExtract: boolean;
12
+ }, "canEdit" | "canExtract" | "select" | "rotateBy" | "setRotation" | "reorder" | "delete" | "insertBlank" | "insertFromBytes" | "insertFromDocument" | "duplicate" | "extract", never>;
13
+ /**
14
+ * The page edits of the document in scope (`[epdfDocumentScope]`), else the active one. The
15
+ * checks `canEdit()` and `canExtract()` follow the document when a template reads them; with no
16
+ * document every call refuses with `not-ready`. `selected()` is the selection, a signal. The
17
+ * plugin has no events of its own: page changes are document events
18
+ * (`inject(EpdfDocuments).pagesChanged$`), and the pages are `inject(EpdfDocument).pages()`.
19
+ */
20
+ declare class EpdfPageEdit extends EpdfPageEdit_base {
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfPageEdit, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfPageEdit>;
23
+ }
24
+ /** Page editing, for `provideEmbedPdf()`. */
25
+ declare function withPageEdit(): EmbedPdfFeature;
26
+
27
+ export { EpdfPageEdit, withPageEdit };
@@ -0,0 +1,94 @@
1
+ import * as _embedpdf_web from '@embedpdf/web';
2
+ import * as _angular_core from '@angular/core';
3
+ import { TemplateRef, Signal } from '@angular/core';
4
+ import { PageRef } from '@embedpdf/core';
5
+ import { PageFrame, PageTransform } from '@embedpdf/core-geometry';
6
+ import { EpdfDocumentScopeRef, EpdfPageContext } from '@embedpdf/angular/runtime';
7
+ import { EpdfProjectorBinding } from '@embedpdf/angular/anchored';
8
+ import { EpdfPageTemplateContext } from '@embedpdf/angular/stage';
9
+ export { EpdfPageChrome, EpdfPageTemplateContext } from '@embedpdf/angular/stage';
10
+
11
+ /**
12
+ * What a page view shows until its document and its page are there, instead of nothing:
13
+ * `<ng-template epdfFallback>Loading…</ng-template>`.
14
+ */
15
+ declare class EpdfFallback {
16
+ readonly template: TemplateRef<unknown>;
17
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfFallback, never>;
18
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EpdfFallback, "ng-template[epdfFallback]", never, {}, {}, never, never, true, never>;
19
+ }
20
+ declare class EpdfPageView {
21
+ /** The page: its `ref`, which follows it when pages move, or its index, from 0. */
22
+ readonly page: _angular_core.InputSignal<number | PageRef>;
23
+ /**
24
+ * Which document to show. Without it, the one the surrounding `[epdfDocumentScope]` names,
25
+ * else the active one.
26
+ */
27
+ readonly documentId: _angular_core.InputSignal<string | null | undefined>;
28
+ /** The width of the page upright, in pixels: a page turned a quarter is that tall. */
29
+ readonly width: _angular_core.InputSignal<number>;
30
+ /** Space reserved around the page for your own labels, in pixels per side; 0 for the others. */
31
+ readonly pageFrame: _angular_core.InputSignal<Partial<PageFrame> | null | undefined>;
32
+ private readonly host;
33
+ private readonly parentScope;
34
+ private readonly content;
35
+ private readonly chromeDirective;
36
+ private readonly fallbackDirective;
37
+ protected readonly chromeTemplate: Signal<TemplateRef<EpdfPageTemplateContext> | null>;
38
+ protected readonly fallbackTemplate: Signal<TemplateRef<unknown> | null>;
39
+ private readonly activeId;
40
+ /** The document shown: `[documentId]`, else the scope's, else the active one. */
41
+ private readonly docId;
42
+ /** For what's inside: services and layers talk to the document shown. */
43
+ readonly documentScope: EpdfDocumentScopeRef;
44
+ /** The interaction plugin of the document shown, when the viewer has it. */
45
+ private readonly interaction;
46
+ /**
47
+ * The page's entry in the document, by its object number or its index. Entries stay the
48
+ * same object until their page changes, so a turn or a move reads as a new entry.
49
+ */
50
+ private readonly entry;
51
+ /** Whether there's a page to show: the document is there and has it. */
52
+ protected readonly shown: Signal<boolean>;
53
+ /** Whether the tools take the pointer here: with the interaction plugin, as on a Stage. */
54
+ protected readonly takesPointer: Signal<boolean>;
55
+ private readonly pageIndex;
56
+ /** The page's object number: a stand-in (its index + 1) only until the page is known. */
57
+ private readonly objectNumber;
58
+ /** The same ref object while the page is the same, so layers can key their work on it. */
59
+ private readonly pageRef;
60
+ protected readonly frame: Signal<PageFrame>;
61
+ private readonly dpr;
62
+ /** What the transform depends on, by value: a new entry for an unchanged page changes nothing. */
63
+ private readonly geometry;
64
+ /**
65
+ * The page's transform, from the width alone (`pageViewTransformInput` from `@embedpdf/web`,
66
+ * the same in every framework): view pixels per point is `width / page width`, and 100% is 1
67
+ * point = 96/72 CSS pixels times the page's user unit, as on a Stage.
68
+ */
69
+ protected readonly transform: Signal<PageTransform>;
70
+ /** The outer box, the shadow at the footprint, and the turned content box. */
71
+ protected readonly layout: Signal<_embedpdf_web.PageSurfaceLayout>;
72
+ /** The viewer's `page` settings; CSS `--epdf-page-shadow` and `--epdf-page-background` win. */
73
+ private readonly look;
74
+ protected readonly shadow: Signal<string>;
75
+ protected readonly background: Signal<string>;
76
+ private readonly viewId;
77
+ /**
78
+ * The page context for the layers inside: one object for the view's lifetime, whose `ref`,
79
+ * `documentId` and signals follow `[page]` and `[documentId]`. No view demand: a page view
80
+ * wants the whole page.
81
+ */
82
+ readonly pageContext: EpdfPageContext;
83
+ protected readonly templateContext: EpdfPageTemplateContext;
84
+ /**
85
+ * How anchored UI inside follows the page: by measuring it on screen. The revision is the
86
+ * page and its transform; a scroll or a resize of the window moves the page without either,
87
+ * so `observeClientGeometry` reports those.
88
+ */
89
+ readonly projection: EpdfProjectorBinding;
90
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfPageView, never>;
91
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EpdfPageView, "epdf-page-view", never, { "page": { "alias": "page"; "required": true; "isSignal": true; }; "documentId": { "alias": "documentId"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "pageFrame": { "alias": "pageFrame"; "required": false; "isSignal": true; }; }, {}, ["chromeDirective", "fallbackDirective"], ["*"], true, never>;
92
+ }
93
+
94
+ export { EpdfFallback, EpdfPageView };
@@ -0,0 +1,38 @@
1
+ import * as _embedpdf_plugin_redaction from '@embedpdf/plugin-redaction';
2
+ import { RedactionApplyResult, RedactionMark, RedactionConfig } from '@embedpdf/plugin-redaction';
3
+ export * from '@embedpdf/plugin-redaction';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
6
+ import * as i0 from '@angular/core';
7
+ import { Signal } from '@angular/core';
8
+ import { PageRef } from '@embedpdf/core';
9
+
10
+ declare const EpdfRedaction_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_redaction.RedactionCapability, {
11
+ pendingCount: number;
12
+ applying: boolean;
13
+ lastResult: RedactionApplyResult | null;
14
+ }, "apply" | "canMark" | "canUnmark" | "canUpdateLabel" | "canApply" | "isApplying" | "getLastResult" | "listPending" | "getPending" | "getPendingCount" | "estimateCollateral" | "markSelection" | "markArea" | "markPage" | "markMatches" | "unmark" | "clearPending" | "updateLabel" | "applyAll" | "applyPages", "onApplied" | "onPendingChanged">;
15
+ /**
16
+ * Redaction in the document in scope (`[epdfDocumentScope]`), else the active one: the
17
+ * Redaction page's methods, its State table as signals, the marks waiting to be applied as
18
+ * signals, the events as streams (`applied$`, `pendingChanged$`), and the settings. Without a
19
+ * document the signals read empty and the methods refuse with `not-ready`.
20
+ */
21
+ declare class EpdfRedaction extends EpdfRedaction_base {
22
+ /**
23
+ * The marks waiting to be applied, in page order, for a review panel. The plugin hands out
24
+ * the same list until a mark changes, so a list redraws only then. Empty without a document.
25
+ */
26
+ readonly pending: Signal<readonly RedactionMark[]>;
27
+ /**
28
+ * One page's marks (its ref or its index). Pass a function (`() => this.page().ref`) and it
29
+ * follows the page you show. Empty for a page without marks, and without a document.
30
+ */
31
+ pendingOn(page: PageRef | number | (() => PageRef | number)): Signal<readonly RedactionMark[]>;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfRedaction, never>;
33
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfRedaction>;
34
+ }
35
+ /** Redaction, with its settings: `withRedaction({ overlay: { fill: '#1d2b53' } })`. */
36
+ declare function withRedaction(options?: RedactionConfig): EmbedPdfFeature;
37
+
38
+ export { EpdfRedaction, withRedaction };
@@ -1,19 +1,58 @@
1
+ import * as _embedpdf_plugin_render from '@embedpdf/plugin-render';
2
+ import { RenderConfig } from '@embedpdf/plugin-render';
1
3
  export * from '@embedpdf/plugin-render';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
2
6
  import * as _angular_core from '@angular/core';
7
+ import * as _embedpdf_web from '@embedpdf/web';
8
+ import { PaintSettings } from '@embedpdf/plugin-render/contract/host';
9
+
10
+ declare const EpdfRender_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_render.RenderCapability, Record<never, never>, "canRender" | "renderPage" | "renderThumbnail" | "renderPages" | "getRenderPolicy" | "getRenderEpoch" | "invalidate", "onInvalidated">;
11
+ /**
12
+ * Pictures of pages, apart from the Stage: a thumbnail, a page at an exact width, every page in
13
+ * batches. `invalidate()` redraws pages, `invalidated$` tells you when they were, and
14
+ * `settings()` / `updateSettings()` are the picture budget and tiles.
15
+ */
16
+ declare class EpdfRender extends EpdfRender_base {
17
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfRender, never>;
18
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EpdfRender>;
19
+ }
20
+ /** The render plugin, with its settings: `withRender({ fullPage: { maxWidth: 1280 } })`. */
21
+ declare function withRender(options?: RenderConfig): EmbedPdfFeature;
3
22
 
4
23
  declare class EpdfRenderLayer {
5
24
  /**
6
- * Bake annotations into the page bitmap (default true). Pass false when an
7
- * annotation layer owns annotation rendering, so they aren't drawn twice.
25
+ * Draw the annotations into the page's picture (`true`) or leave them out (`false`). Left
26
+ * unset, the picture leaves them to an `<epdf-annotation-layer>` on the page, and otherwise
27
+ * draws them when the user may read them.
28
+ */
29
+ readonly annotations: _angular_core.InputSignal<boolean | undefined>;
30
+ /** The same for the form fields, which an `<epdf-form-layer>` paints. */
31
+ readonly formFields: _angular_core.InputSignal<boolean | undefined>;
32
+ /**
33
+ * The sharp tiles over the picture when zoomed in (default true). Whether they cost anything
34
+ * is decided by what the view wants; set it to false only for a view that must never tile.
8
35
  */
9
- readonly annotations: _angular_core.InputSignal<boolean>;
36
+ readonly tiles: _angular_core.InputSignal<boolean>;
10
37
  private readonly page;
11
38
  private readonly render;
39
+ /** The same object until a setting it reads changes. */
40
+ protected readonly paintSettings: _angular_core.Signal<PaintSettings>;
41
+ private readonly parts;
42
+ private readonly painted;
43
+ private readonly may;
44
+ /** The parts the picture draws; `null` until the page's layers have said what they paint. */
45
+ protected readonly layers: _angular_core.Signal<_embedpdf_web.PictureLayerOptions | null>;
46
+ /**
47
+ * The picture's identity: its size, the parts it draws and the page's version. Within a
48
+ * size step it doesn't move as you zoom (the page's transform scales the picture), so
49
+ * nothing is fetched again; it moves at a step and when the page changes.
50
+ */
12
51
  private readonly sourceKey;
13
- protected readonly src: _angular_core.WritableSignal<string | null>;
52
+ private readonly picture;
14
53
  constructor();
15
54
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfRenderLayer, never>;
16
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EpdfRenderLayer, "epdf-render-layer", never, { "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
55
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EpdfRenderLayer, "epdf-render-layer", never, { "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "formFields": { "alias": "formFields"; "required": false; "isSignal": true; }; "tiles": { "alias": "tiles"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
17
56
  }
18
57
 
19
- export { EpdfRenderLayer };
58
+ export { EpdfRender, EpdfRenderLayer, withRender };