@embedpdf/plugin-link 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.
@@ -1,11 +0,0 @@
1
- //#region src/types.ts
2
- const LinkToken = (0, require("@embedpdf/core").createCapabilityToken)("link");
3
- //#endregion
4
- Object.defineProperty(exports, "LinkToken", {
5
- enumerable: true,
6
- get: function() {
7
- return LinkToken;
8
- }
9
- });
10
-
11
- //# sourceMappingURL=contract-DGKEPl11.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract-DGKEPl11.cjs","names":[],"sources":["../src/types.ts"],"sourcesContent":["import { createCapabilityToken, type PageObjectNumber } from '@embedpdf/core';\nimport type {\n AnnotationRef,\n PdfActionTree,\n PdfDestination,\n PdfLinkTarget,\n} from '@embedpdf/engine-core/runtime';\nimport type { ActionDispatchResult } from '@embedpdf/plugin-actions/contract';\nimport type { LinkNavItem } from '@embedpdf/plugin-annotation/contract';\n\nexport type { LinkNavItem };\n// The wire target vocabulary, re-exported so app code building link editors\n// needs only this package (the annotation-props precedent).\nexport type { PdfDestination, PdfLinkTarget };\n\n/**\n * What one activation did. `revealed` = the stage moved the camera;\n * `destination` = no stage plugin — the embedder gets the explicit\n * destination to handle; `uri` = opening is the FRAMEWORK layer's job (the\n * plugin is DOM-free); `named` = a viewer verb (NextPage…) reported until\n * stage verbs land; `reported` = read-only/executable-shaped targets\n * (javascript / goto-remote / launch / unsupported) — surfaced, NEVER\n * executed here (javascript belongs to the scripting orchestrator).\n */\nexport type LinkActivation =\n | { outcome: 'revealed' }\n | { outcome: 'destination'; destination: PdfDestination }\n | { outcome: 'uri'; uri: string }\n | { outcome: 'named'; name: string }\n | { outcome: 'reported'; target: PdfLinkTarget }\n /** The action engine took the activation (full payload tree, mixed /Next\n * chains included). `dispatch` is the in-flight result; the framework\n * opener must do NOTHING for this outcome — the actions UI adapter owns\n * any URI open (the no-double-open rule). */\n | { outcome: 'dispatched'; dispatch: Promise<ActionDispatchResult> }\n | { outcome: 'none' };\n\n/** Optional activation context: the payload-carrying /A tree (and its\n * annotation identity) from the LinkNavItem, enabling action-engine\n * delegation. Without it — or without the actions plugin — activation\n * follows the classic root-projection path. */\nexport interface LinkActivateContext {\n activate?: PdfActionTree;\n ref?: AnnotationRef;\n pon?: PageObjectNumber;\n}\n\nexport interface LinkActivateEvent {\n target: PdfLinkTarget;\n activation: LinkActivation;\n}\n\nexport interface LinkPluginConfig {\n /** Every activation (navigations AND reported targets) — analytics /\n * custom handling. Called after the built-in handling ran. */\n onActivate?: (event: LinkActivateEvent) => void;\n}\n\n/**\n * The navigation plane of link annotations. Data comes from ONE of two\n * sources, picked at init: the annotation plugin's folded model when that\n * plugin is present (zero extra engine reads — it already lists every\n * page), or the plugin's own engine reads in viewer-only deployments.\n */\nexport interface LinkCapability {\n /** The clickable link areas of a page (content space, y-down). */\n linksOn(pon: PageObjectNumber): LinkNavItem[];\n /** Lazy-load a page's links (no-op when the annotation plugin owns the data). */\n ensurePage(pon: PageObjectNumber): void;\n /** Whether the navigation plane currently owns links: the active tool\n * enables `link-nav` (pointer/pan/form-fill by default). While false —\n * the link tool or any authoring tool is active — the annotation plane\n * owns them and the LinkLayer stands down. */\n engaged(): boolean;\n /** THE one activation entry point (framework layers call it on click). */\n activate(target: PdfLinkTarget, context?: LinkActivateContext): LinkActivation;\n}\n\n/** Engine-backed page cache (viewer-only deployments). */\nexport interface LinkState {\n pages: Record<number, LinkNavItem[]>;\n}\n\nexport type LinkAction =\n | { type: 'SET_PAGE'; pon: number; items: LinkNavItem[] }\n | { type: 'DROP_PAGE'; pon: number };\n\nexport const LinkToken = createCapabilityToken<LinkCapability>('link');\n"],"mappings":";AAuFA,MAAa,aAAA,2BAAA,CAAA,CAAA,sBAAA,CAAkD,MAAM"}
@@ -1,92 +0,0 @@
1
- import { PageObjectNumber } from "@embedpdf/core";
2
- import { AnnotationRef, PdfActionTree, PdfDestination, PdfLinkTarget } from "@embedpdf/engine-core/runtime";
3
- import { ActionDispatchResult } from "@embedpdf/plugin-actions/contract";
4
- import { LinkNavItem } from "@embedpdf/plugin-annotation/contract";
5
- //#region src/types.d.ts
6
- /**
7
- * What one activation did. `revealed` = the stage moved the camera;
8
- * `destination` = no stage plugin — the embedder gets the explicit
9
- * destination to handle; `uri` = opening is the FRAMEWORK layer's job (the
10
- * plugin is DOM-free); `named` = a viewer verb (NextPage…) reported until
11
- * stage verbs land; `reported` = read-only/executable-shaped targets
12
- * (javascript / goto-remote / launch / unsupported) — surfaced, NEVER
13
- * executed here (javascript belongs to the scripting orchestrator).
14
- */
15
- type LinkActivation = {
16
- outcome: 'revealed';
17
- } | {
18
- outcome: 'destination';
19
- destination: PdfDestination;
20
- } | {
21
- outcome: 'uri';
22
- uri: string;
23
- } | {
24
- outcome: 'named';
25
- name: string;
26
- } | {
27
- outcome: 'reported';
28
- target: PdfLinkTarget;
29
- } |
30
- /** The action engine took the activation (full payload tree, mixed /Next
31
- * chains included). `dispatch` is the in-flight result; the framework
32
- * opener must do NOTHING for this outcome — the actions UI adapter owns
33
- * any URI open (the no-double-open rule). */
34
- {
35
- outcome: 'dispatched';
36
- dispatch: Promise<ActionDispatchResult>;
37
- } | {
38
- outcome: 'none';
39
- };
40
- /** Optional activation context: the payload-carrying /A tree (and its
41
- * annotation identity) from the LinkNavItem, enabling action-engine
42
- * delegation. Without it — or without the actions plugin — activation
43
- * follows the classic root-projection path. */
44
- interface LinkActivateContext {
45
- activate?: PdfActionTree;
46
- ref?: AnnotationRef;
47
- pon?: PageObjectNumber;
48
- }
49
- interface LinkActivateEvent {
50
- target: PdfLinkTarget;
51
- activation: LinkActivation;
52
- }
53
- interface LinkPluginConfig {
54
- /** Every activation (navigations AND reported targets) — analytics /
55
- * custom handling. Called after the built-in handling ran. */
56
- onActivate?: (event: LinkActivateEvent) => void;
57
- }
58
- /**
59
- * The navigation plane of link annotations. Data comes from ONE of two
60
- * sources, picked at init: the annotation plugin's folded model when that
61
- * plugin is present (zero extra engine reads — it already lists every
62
- * page), or the plugin's own engine reads in viewer-only deployments.
63
- */
64
- interface LinkCapability {
65
- /** The clickable link areas of a page (content space, y-down). */
66
- linksOn(pon: PageObjectNumber): LinkNavItem[];
67
- /** Lazy-load a page's links (no-op when the annotation plugin owns the data). */
68
- ensurePage(pon: PageObjectNumber): void;
69
- /** Whether the navigation plane currently owns links: the active tool
70
- * enables `link-nav` (pointer/pan/form-fill by default). While false —
71
- * the link tool or any authoring tool is active — the annotation plane
72
- * owns them and the LinkLayer stands down. */
73
- engaged(): boolean;
74
- /** THE one activation entry point (framework layers call it on click). */
75
- activate(target: PdfLinkTarget, context?: LinkActivateContext): LinkActivation;
76
- }
77
- /** Engine-backed page cache (viewer-only deployments). */
78
- interface LinkState {
79
- pages: Record<number, LinkNavItem[]>;
80
- }
81
- type LinkAction = {
82
- type: 'SET_PAGE';
83
- pon: number;
84
- items: LinkNavItem[];
85
- } | {
86
- type: 'DROP_PAGE';
87
- pon: number;
88
- };
89
- declare const LinkToken: import("@embedpdf/core").CapabilityToken<LinkCapability>;
90
- //#endregion
91
- export { LinkCapability as a, LinkState as c, PdfLinkTarget as d, LinkActivation as i, LinkToken as l, LinkActivateContext as n, LinkNavItem as o, LinkActivateEvent as r, LinkPluginConfig as s, LinkAction as t, PdfDestination as u };
92
- //# sourceMappingURL=contract-DO3vDsAV.d.cts.map
@@ -1,7 +0,0 @@
1
- import { createCapabilityToken } from "@embedpdf/core";
2
- //#region src/types.ts
3
- const LinkToken = createCapabilityToken("link");
4
- //#endregion
5
- export { LinkToken as t };
6
-
7
- //# sourceMappingURL=contract-HRggERzU.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract-HRggERzU.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["import { createCapabilityToken, type PageObjectNumber } from '@embedpdf/core';\nimport type {\n AnnotationRef,\n PdfActionTree,\n PdfDestination,\n PdfLinkTarget,\n} from '@embedpdf/engine-core/runtime';\nimport type { ActionDispatchResult } from '@embedpdf/plugin-actions/contract';\nimport type { LinkNavItem } from '@embedpdf/plugin-annotation/contract';\n\nexport type { LinkNavItem };\n// The wire target vocabulary, re-exported so app code building link editors\n// needs only this package (the annotation-props precedent).\nexport type { PdfDestination, PdfLinkTarget };\n\n/**\n * What one activation did. `revealed` = the stage moved the camera;\n * `destination` = no stage plugin — the embedder gets the explicit\n * destination to handle; `uri` = opening is the FRAMEWORK layer's job (the\n * plugin is DOM-free); `named` = a viewer verb (NextPage…) reported until\n * stage verbs land; `reported` = read-only/executable-shaped targets\n * (javascript / goto-remote / launch / unsupported) — surfaced, NEVER\n * executed here (javascript belongs to the scripting orchestrator).\n */\nexport type LinkActivation =\n | { outcome: 'revealed' }\n | { outcome: 'destination'; destination: PdfDestination }\n | { outcome: 'uri'; uri: string }\n | { outcome: 'named'; name: string }\n | { outcome: 'reported'; target: PdfLinkTarget }\n /** The action engine took the activation (full payload tree, mixed /Next\n * chains included). `dispatch` is the in-flight result; the framework\n * opener must do NOTHING for this outcome — the actions UI adapter owns\n * any URI open (the no-double-open rule). */\n | { outcome: 'dispatched'; dispatch: Promise<ActionDispatchResult> }\n | { outcome: 'none' };\n\n/** Optional activation context: the payload-carrying /A tree (and its\n * annotation identity) from the LinkNavItem, enabling action-engine\n * delegation. Without it — or without the actions plugin — activation\n * follows the classic root-projection path. */\nexport interface LinkActivateContext {\n activate?: PdfActionTree;\n ref?: AnnotationRef;\n pon?: PageObjectNumber;\n}\n\nexport interface LinkActivateEvent {\n target: PdfLinkTarget;\n activation: LinkActivation;\n}\n\nexport interface LinkPluginConfig {\n /** Every activation (navigations AND reported targets) — analytics /\n * custom handling. Called after the built-in handling ran. */\n onActivate?: (event: LinkActivateEvent) => void;\n}\n\n/**\n * The navigation plane of link annotations. Data comes from ONE of two\n * sources, picked at init: the annotation plugin's folded model when that\n * plugin is present (zero extra engine reads — it already lists every\n * page), or the plugin's own engine reads in viewer-only deployments.\n */\nexport interface LinkCapability {\n /** The clickable link areas of a page (content space, y-down). */\n linksOn(pon: PageObjectNumber): LinkNavItem[];\n /** Lazy-load a page's links (no-op when the annotation plugin owns the data). */\n ensurePage(pon: PageObjectNumber): void;\n /** Whether the navigation plane currently owns links: the active tool\n * enables `link-nav` (pointer/pan/form-fill by default). While false —\n * the link tool or any authoring tool is active — the annotation plane\n * owns them and the LinkLayer stands down. */\n engaged(): boolean;\n /** THE one activation entry point (framework layers call it on click). */\n activate(target: PdfLinkTarget, context?: LinkActivateContext): LinkActivation;\n}\n\n/** Engine-backed page cache (viewer-only deployments). */\nexport interface LinkState {\n pages: Record<number, LinkNavItem[]>;\n}\n\nexport type LinkAction =\n | { type: 'SET_PAGE'; pon: number; items: LinkNavItem[] }\n | { type: 'DROP_PAGE'; pon: number };\n\nexport const LinkToken = createCapabilityToken<LinkCapability>('link');\n"],"mappings":";;AAuFA,MAAa,YAAY,sBAAsC,MAAM"}