@embedpdf/angular 3.0.0-next.14 → 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
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,24 +1,42 @@
|
|
|
1
|
-
import { ActionUiAdapter } from '@embedpdf/plugin-actions';
|
|
1
|
+
import { ActionUiAdapter, ActionsCapability, ActionsConfig } from '@embedpdf/plugin-actions';
|
|
2
2
|
export * from '@embedpdf/plugin-actions';
|
|
3
|
+
import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
|
|
4
|
+
import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
declare const EpdfActions_base: _embedpdf_angular_runtime.PluginServiceClass<ActionsCapability, Record<never, never>, "execute" | "canExecute" | "executeNamed" | "canExecuteNamed" | "getActionTree" | "isScriptingEnabled" | "dispatch" | "canDispatch" | "setUiAdapter" | "runDocumentVerb" | "prepareClose" | "setSubmitHandler" | "registerExecutor", "onExecuted" | "onDiagnosticReported" | "onScriptDiagnosticReported" | "onScriptFailed" | "onOpenSequenceCompleted">;
|
|
8
|
+
/**
|
|
9
|
+
* The actions of the document in scope (`[epdfDocumentScope]`), else the active one:
|
|
10
|
+
* `executeNamed()`, `execute()`, `dispatch()`, `getActionTree()`, the checks (`canExecuteNamed()`,
|
|
11
|
+
* `isScriptingEnabled()`, …), the settings (`settings()`, `updateSettings()`, …, which work with
|
|
12
|
+
* no document) and the streams (`executed$`, `diagnosticReported$`, `scriptFailed$`, …). With
|
|
13
|
+
* no document every other call refuses with `not-ready`.
|
|
14
|
+
*/
|
|
15
|
+
declare class EpdfActions extends EpdfActions_base {
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfActions, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EpdfActions>;
|
|
18
|
+
}
|
|
19
|
+
/** The actions plugin, for `provideEmbedPdf()`: `withActions({ javascript: { enabled: true } })`. */
|
|
20
|
+
declare function withActions(config?: ActionsConfig): EmbedPdfFeature;
|
|
21
|
+
/** Your own handlers for any of the adapter's effects: `openUri`, `print`, `alert`, `gotoPage`. */
|
|
5
22
|
type ActionsUiHandlers = Partial<ActionUiAdapter>;
|
|
6
23
|
/**
|
|
7
|
-
*
|
|
8
|
-
* `
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
24
|
+
* The UI adapter of the active document's actions: the browser's defaults, with `handlers` in
|
|
25
|
+
* place of any of them. `handlers` may be a function, which runs once in an injection context,
|
|
26
|
+
* so your handlers can use your services:
|
|
27
|
+
*
|
|
28
|
+
* withActionsUi(() => {
|
|
29
|
+
* const toasts = inject(Toasts);
|
|
30
|
+
* return { alert: (message) => toasts.show(message) };
|
|
31
|
+
* })
|
|
14
32
|
*
|
|
15
|
-
*
|
|
16
|
-
* the
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
33
|
+
* It follows the active document, and the Stage showing it for page moves, and is installed in
|
|
34
|
+
* the same change that makes a document ready, before anything inside it can run an action.
|
|
35
|
+
* Installing it is also the first sign of a person that lets a document's opening actions run
|
|
36
|
+
* (`openSequence: 'auto'`), so a document opened in a background tab waits until it's shown.
|
|
37
|
+
* The `doc.print` permission is checked by the plugin, before any handler runs.
|
|
20
38
|
*/
|
|
21
|
-
declare function
|
|
39
|
+
declare function withActionsUi(handlers?: ActionsUiHandlers | (() => ActionsUiHandlers)): EmbedPdfFeature;
|
|
22
40
|
|
|
23
|
-
export {
|
|
41
|
+
export { EpdfActions, withActions, withActionsUi };
|
|
24
42
|
export type { ActionsUiHandlers };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as _embedpdf_web from '@embedpdf/web';
|
|
2
|
+
import { ViewProjector, AnchorTarget, AnchoredRect, AnchoredPlacement } from '@embedpdf/web';
|
|
3
|
+
export { AnchorTarget, AnchoredPlacement, AnchoredSide, PageViewEnv, ViewProjector } from '@embedpdf/web';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { InjectionToken, Signal } from '@angular/core';
|
|
6
|
+
|
|
7
|
+
/** What a page surface gives the anchored UI inside it. */
|
|
8
|
+
interface EpdfProjectorBinding {
|
|
9
|
+
/** How a box on a page lands in the surface; null while there is nothing to project onto. */
|
|
10
|
+
readonly projector: Signal<ViewProjector | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Changes whenever the projection may have (the Stage's camera): anchored UI reads it, so it
|
|
13
|
+
* moves in the same pass as the pages.
|
|
14
|
+
*/
|
|
15
|
+
readonly revision: Signal<unknown>;
|
|
16
|
+
/** The pages on screen, by object number; null when the surface shows a single page. */
|
|
17
|
+
readonly shownPages: Signal<ReadonlySet<number> | null>;
|
|
18
|
+
/**
|
|
19
|
+
* For a surface that moves with the browser rather than with state (a page view scrolled with
|
|
20
|
+
* the document): call `callback` after such a move. A Stage has none.
|
|
21
|
+
*/
|
|
22
|
+
readonly subscribe?: (callback: () => void) => () => void;
|
|
23
|
+
}
|
|
24
|
+
/** Provided by page surfaces (`<epdf-stage>`, a standalone page view), not by app code. */
|
|
25
|
+
declare const EPDF_PROJECTOR: InjectionToken<EpdfProjectorBinding>;
|
|
26
|
+
/** Where anchored UI sits: next to a box on a page, and points it keeps clear of. */
|
|
27
|
+
type EpdfAnchor = Omit<AnchorTarget, 'bounds'> & {
|
|
28
|
+
bounds?: AnchoredRect | null;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Its content, placed next to a box on a page. Once the content's size is measured it flips to
|
|
32
|
+
* the other side when the chosen one has no room, and stays inside the view, unless `pinned`.
|
|
33
|
+
* A pointer press inside it doesn't reach the page under it, so a click in a menu is never a
|
|
34
|
+
* click outside the selection.
|
|
35
|
+
*/
|
|
36
|
+
declare class EpdfAnchored {
|
|
37
|
+
/**
|
|
38
|
+
* The box on a page to sit next to, in page coordinates: `{ page, bounds }`, with `avoid`
|
|
39
|
+
* points to keep clear of. Null, or no `bounds` (a search match without a box), hides it.
|
|
40
|
+
*/
|
|
41
|
+
readonly anchor: _angular_core.InputSignal<EpdfAnchor | null | undefined>;
|
|
42
|
+
/** A side of the box, centred, or lined up with that side's start or end (`'top-end'`). */
|
|
43
|
+
readonly placement: _angular_core.InputSignal<AnchoredPlacement>;
|
|
44
|
+
/** Screen pixels between the box and the content, and between the content and the view's edge. */
|
|
45
|
+
readonly gap: _angular_core.InputSignal<number>;
|
|
46
|
+
/**
|
|
47
|
+
* Stay where `placement` puts it: never flip, never move to stay in view, and scroll away with
|
|
48
|
+
* the box. For badges and status; menus leave it off.
|
|
49
|
+
*/
|
|
50
|
+
readonly pinned: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
51
|
+
private readonly binding;
|
|
52
|
+
/** The content's size and the view's, measured once it's shown and again when either resizes. */
|
|
53
|
+
private readonly fit;
|
|
54
|
+
/** Moves the browser made that no state announces (a page view scrolled with the document). */
|
|
55
|
+
private readonly moved;
|
|
56
|
+
private readonly box;
|
|
57
|
+
protected readonly space: Signal<"overlay" | "client">;
|
|
58
|
+
/** Whether its page is on screen: until it is, nothing below reads the camera. */
|
|
59
|
+
private readonly onShownPage;
|
|
60
|
+
protected readonly position: Signal<_embedpdf_web.AnchoredPosition | null>;
|
|
61
|
+
constructor();
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfAnchored, never>;
|
|
63
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EpdfAnchored, "epdf-anchored", never, { "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "pinned": { "alias": "pinned"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { EPDF_PROJECTOR, EpdfAnchored };
|
|
67
|
+
export type { EpdfAnchor, EpdfProjectorBinding };
|