@embedpdf/plugin-annotation 3.0.0-next.11 → 3.0.0-next.13
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/dist/{capability-DBsr2D-L.js → capability-B_dkoB1K.js} +567 -558
- package/dist/capability-B_dkoB1K.js.map +1 -0
- package/dist/{capability-Csb9WMm-.cjs → capability-DVx1NmTe.cjs} +568 -577
- package/dist/capability-DVx1NmTe.cjs.map +1 -0
- package/dist/contract/host.cjs +1 -1
- package/dist/contract/host.d.cts +1 -1
- package/dist/contract/host.d.ts +1 -1
- package/dist/contract/host.js +1 -1
- package/dist/contract-CgAcfAE7.d.cts +34 -0
- package/dist/contract-CiG2_HBq.d.ts +34 -0
- package/dist/contract-DtXE1hjY.js +32 -0
- package/dist/contract-DtXE1hjY.js.map +1 -0
- package/dist/contract-a4eaQWga.cjs +67 -0
- package/dist/contract-a4eaQWga.cjs.map +1 -0
- package/dist/contract.cjs +11 -7
- package/dist/contract.d.cts +3 -10
- package/dist/contract.d.ts +3 -10
- package/dist/contract.js +4 -8
- package/dist/index.cjs +47 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +39 -7
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +4 -3
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +3 -2
- package/dist/tools-0NI3b9z8.cjs +536 -0
- package/dist/tools-0NI3b9z8.cjs.map +1 -0
- package/dist/tools-DBEYx3-c.js +513 -0
- package/dist/tools-DBEYx3-c.js.map +1 -0
- package/dist/{types-CwytT-TI.js → types-BvB1vUKb.js} +9 -2
- package/dist/types-BvB1vUKb.js.map +1 -0
- package/dist/{types-otwv-Cdl.d.ts → types-D5V0TIwk.d.ts} +133 -19
- package/dist/types-Dlhdw2k_.cjs +31 -0
- package/dist/types-Dlhdw2k_.cjs.map +1 -0
- package/dist/{types-eLTpocXz.d.cts → types-ObcPYc3-.d.cts} +133 -19
- package/package.json +9 -9
- package/dist/capability-Csb9WMm-.cjs.map +0 -1
- package/dist/capability-DBsr2D-L.js.map +0 -1
- package/dist/contract.cjs.map +0 -1
- package/dist/contract.js.map +0 -1
- package/dist/types-CwytT-TI.js.map +0 -1
- package/dist/types-DimcLIic.cjs +0 -17
- package/dist/types-DimcLIic.cjs.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as AnnotationCapability } from "./types-ObcPYc3-.cjs";
|
|
2
|
+
import { AnnotationFlags as AnnotationFlags$1, AnnotationProps as AnnotationProps$1, AnnotationPropsPatch as AnnotationPropsPatch$1, BlendMode, Border, ClickCreate as ClickCreate$1, LineEnding, LineEndings, PropKey as PropKey$1, PropSpec as PropSpec$1, SnapSettings as SnapSettings$1, TextAlign } from "@embedpdf/core-annotation";
|
|
3
|
+
import { AnnotationDTO as AnnotationDTO$1, AnnotationRef as AnnotationRef$1, AnnotationSubtype, Color, CommentThread as CommentThread$1, CommentThreadReview, ReviewStatus } from "@embedpdf/engine-core/runtime";
|
|
4
|
+
import { CapabilityToken } from "@embedpdf/core";
|
|
5
|
+
//#region src/priorities.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* The interaction-hub priorities of the annotation plugin's handlers — the
|
|
8
|
+
* public contract a sibling plugin builds on when it needs to sit ABOVE or
|
|
9
|
+
* BELOW one of them for the same gesture. Priority only breaks ties between
|
|
10
|
+
* simultaneously-ELIGIBLE handlers (the tool's tags decide eligibility).
|
|
11
|
+
*
|
|
12
|
+
* 1000 annotation-ghost never captures; hides the footprint ghost on every down
|
|
13
|
+
* 100 annotation-edit select/move/resize over an existing annotation
|
|
14
|
+
* 95 annotation-place click-to-place an armed payload on empty page space
|
|
15
|
+
* 55 annotation-draw drag-create under a draw tool (below text-select)
|
|
16
|
+
* 50 annotation-marquee empty-space selection, the final fallback
|
|
17
|
+
*
|
|
18
|
+
* A handler that must win a click over an existing annotation while a
|
|
19
|
+
* placing tool is active (a signature mark dropped onto a signature field)
|
|
20
|
+
* registers above {@link ANNOTATION_EDIT_PRIORITY}, not merely above place:
|
|
21
|
+
* the edit handler captures first over any annotation, a widget included.
|
|
22
|
+
*/
|
|
23
|
+
declare const ANNOTATION_GHOST_PRIORITY = 1000;
|
|
24
|
+
declare const ANNOTATION_EDIT_PRIORITY = 100;
|
|
25
|
+
declare const ANNOTATION_PLACE_PRIORITY = 95;
|
|
26
|
+
declare const ANNOTATION_DRAW_PRIORITY = 55;
|
|
27
|
+
declare const ANNOTATION_MARQUEE_PRIORITY = 50;
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/contract.d.ts
|
|
30
|
+
/** The public lens over the host capability's one runtime token. */
|
|
31
|
+
declare const AnnotationToken: CapabilityToken<AnnotationCapability>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { ANNOTATION_GHOST_PRIORITY as C, ANNOTATION_EDIT_PRIORITY as S, ANNOTATION_PLACE_PRIORITY as T, PropSpec$1 as _, AnnotationRef$1 as a, TextAlign as b, BlendMode as c, Color as d, CommentThread$1 as f, PropKey$1 as g, LineEndings as h, AnnotationPropsPatch$1 as i, Border as l, LineEnding as m, AnnotationFlags$1 as n, AnnotationSubtype as o, CommentThreadReview as p, AnnotationProps$1 as r, AnnotationToken as s, AnnotationDTO$1 as t, ClickCreate$1 as u, ReviewStatus as v, ANNOTATION_MARQUEE_PRIORITY as w, ANNOTATION_DRAW_PRIORITY as x, SnapSettings$1 as y };
|
|
34
|
+
//# sourceMappingURL=contract-CgAcfAE7.d.cts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as AnnotationCapability } from "./types-D5V0TIwk.js";
|
|
2
|
+
import { CapabilityToken } from "@embedpdf/core";
|
|
3
|
+
import { AnnotationDTO as AnnotationDTO$1, AnnotationRef as AnnotationRef$1, AnnotationSubtype, Color, CommentThread as CommentThread$1, CommentThreadReview, ReviewStatus } from "@embedpdf/engine-core/runtime";
|
|
4
|
+
import { AnnotationFlags as AnnotationFlags$1, AnnotationProps as AnnotationProps$1, AnnotationPropsPatch as AnnotationPropsPatch$1, BlendMode, Border, ClickCreate as ClickCreate$1, LineEnding, LineEndings, PropKey as PropKey$1, PropSpec as PropSpec$1, SnapSettings as SnapSettings$1, TextAlign } from "@embedpdf/core-annotation";
|
|
5
|
+
//#region src/priorities.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* The interaction-hub priorities of the annotation plugin's handlers — the
|
|
8
|
+
* public contract a sibling plugin builds on when it needs to sit ABOVE or
|
|
9
|
+
* BELOW one of them for the same gesture. Priority only breaks ties between
|
|
10
|
+
* simultaneously-ELIGIBLE handlers (the tool's tags decide eligibility).
|
|
11
|
+
*
|
|
12
|
+
* 1000 annotation-ghost never captures; hides the footprint ghost on every down
|
|
13
|
+
* 100 annotation-edit select/move/resize over an existing annotation
|
|
14
|
+
* 95 annotation-place click-to-place an armed payload on empty page space
|
|
15
|
+
* 55 annotation-draw drag-create under a draw tool (below text-select)
|
|
16
|
+
* 50 annotation-marquee empty-space selection, the final fallback
|
|
17
|
+
*
|
|
18
|
+
* A handler that must win a click over an existing annotation while a
|
|
19
|
+
* placing tool is active (a signature mark dropped onto a signature field)
|
|
20
|
+
* registers above {@link ANNOTATION_EDIT_PRIORITY}, not merely above place:
|
|
21
|
+
* the edit handler captures first over any annotation, a widget included.
|
|
22
|
+
*/
|
|
23
|
+
declare const ANNOTATION_GHOST_PRIORITY = 1000;
|
|
24
|
+
declare const ANNOTATION_EDIT_PRIORITY = 100;
|
|
25
|
+
declare const ANNOTATION_PLACE_PRIORITY = 95;
|
|
26
|
+
declare const ANNOTATION_DRAW_PRIORITY = 55;
|
|
27
|
+
declare const ANNOTATION_MARQUEE_PRIORITY = 50;
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/contract.d.ts
|
|
30
|
+
/** The public lens over the host capability's one runtime token. */
|
|
31
|
+
declare const AnnotationToken: CapabilityToken<AnnotationCapability>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { ANNOTATION_GHOST_PRIORITY as C, ANNOTATION_EDIT_PRIORITY as S, ANNOTATION_PLACE_PRIORITY as T, PropSpec$1 as _, AnnotationRef$1 as a, TextAlign as b, BlendMode as c, Color as d, CommentThread$1 as f, PropKey$1 as g, LineEndings as h, AnnotationPropsPatch$1 as i, Border as l, LineEnding as m, AnnotationFlags$1 as n, AnnotationSubtype as o, CommentThreadReview as p, AnnotationProps$1 as r, AnnotationToken as s, AnnotationDTO$1 as t, ClickCreate$1 as u, ReviewStatus as v, ANNOTATION_MARQUEE_PRIORITY as w, ANNOTATION_DRAW_PRIORITY as x, SnapSettings$1 as y };
|
|
34
|
+
//# sourceMappingURL=contract-CiG2_HBq.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { t as AnnotationToken$1 } from "./types-BvB1vUKb.js";
|
|
2
|
+
//#region src/priorities.ts
|
|
3
|
+
/**
|
|
4
|
+
* The interaction-hub priorities of the annotation plugin's handlers — the
|
|
5
|
+
* public contract a sibling plugin builds on when it needs to sit ABOVE or
|
|
6
|
+
* BELOW one of them for the same gesture. Priority only breaks ties between
|
|
7
|
+
* simultaneously-ELIGIBLE handlers (the tool's tags decide eligibility).
|
|
8
|
+
*
|
|
9
|
+
* 1000 annotation-ghost never captures; hides the footprint ghost on every down
|
|
10
|
+
* 100 annotation-edit select/move/resize over an existing annotation
|
|
11
|
+
* 95 annotation-place click-to-place an armed payload on empty page space
|
|
12
|
+
* 55 annotation-draw drag-create under a draw tool (below text-select)
|
|
13
|
+
* 50 annotation-marquee empty-space selection, the final fallback
|
|
14
|
+
*
|
|
15
|
+
* A handler that must win a click over an existing annotation while a
|
|
16
|
+
* placing tool is active (a signature mark dropped onto a signature field)
|
|
17
|
+
* registers above {@link ANNOTATION_EDIT_PRIORITY}, not merely above place:
|
|
18
|
+
* the edit handler captures first over any annotation, a widget included.
|
|
19
|
+
*/
|
|
20
|
+
const ANNOTATION_GHOST_PRIORITY = 1e3;
|
|
21
|
+
const ANNOTATION_EDIT_PRIORITY = 100;
|
|
22
|
+
const ANNOTATION_PLACE_PRIORITY = 95;
|
|
23
|
+
const ANNOTATION_DRAW_PRIORITY = 55;
|
|
24
|
+
const ANNOTATION_MARQUEE_PRIORITY = 50;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/contract.ts
|
|
27
|
+
/** The public lens over the host capability's one runtime token. */
|
|
28
|
+
const AnnotationToken = AnnotationToken$1;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { ANNOTATION_MARQUEE_PRIORITY as a, ANNOTATION_GHOST_PRIORITY as i, ANNOTATION_DRAW_PRIORITY as n, ANNOTATION_PLACE_PRIORITY as o, ANNOTATION_EDIT_PRIORITY as r, AnnotationToken as t };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=contract-DtXE1hjY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-DtXE1hjY.js","names":["AnnotationHostToken"],"sources":["../src/priorities.ts","../src/contract.ts"],"sourcesContent":["/**\n * The interaction-hub priorities of the annotation plugin's handlers — the\n * public contract a sibling plugin builds on when it needs to sit ABOVE or\n * BELOW one of them for the same gesture. Priority only breaks ties between\n * simultaneously-ELIGIBLE handlers (the tool's tags decide eligibility).\n *\n * 1000 annotation-ghost never captures; hides the footprint ghost on every down\n * 100 annotation-edit select/move/resize over an existing annotation\n * 95 annotation-place click-to-place an armed payload on empty page space\n * 55 annotation-draw drag-create under a draw tool (below text-select)\n * 50 annotation-marquee empty-space selection, the final fallback\n *\n * A handler that must win a click over an existing annotation while a\n * placing tool is active (a signature mark dropped onto a signature field)\n * registers above {@link ANNOTATION_EDIT_PRIORITY}, not merely above place:\n * the edit handler captures first over any annotation, a widget included.\n */\nexport const ANNOTATION_GHOST_PRIORITY = 1000;\nexport const ANNOTATION_EDIT_PRIORITY = 100;\nexport const ANNOTATION_PLACE_PRIORITY = 95;\nexport const ANNOTATION_DRAW_PRIORITY = 55;\nexport const ANNOTATION_MARQUEE_PRIORITY = 50;\n","/**\n * Public annotation protocol without the repository, reducer, tools, or plugin\n * wiring. Cross-package capability consumers import this entry.\n */\nimport type { CapabilityToken } from '@embedpdf/core';\n\nimport { AnnotationToken as AnnotationHostToken } from './types';\nimport type { AnnotationCapability } from './types';\n\nexport type {\n AnnotationCapability,\n AnnotationConfig,\n AnnotationState,\n AnnotationAction,\n AnnotationHydration,\n Behavior,\n CommentPermissions,\n CommentsApi,\n ThreadDeleteResult,\n ChromeSettings,\n ChromeSettingsPatch,\n LinkNavItem,\n SelectionFlags,\n SelectionProps,\n StampPlacement,\n StampPreviewProvider,\n StampToolInput,\n FilePickerProvider,\n FilePromptRequest,\n TextItem,\n ToolGhost,\n} from './types';\nexport type { Face, TextFormat, TextSelection } from './rich-text';\nexport type {\n AnnotationDTO,\n AnnotationRef,\n AnnotationSubtype,\n Color,\n CommentThread,\n CommentThreadReview,\n ReviewStatus,\n} from '@embedpdf/engine-core/runtime';\nexport type {\n AnnotationFlags,\n AnnotationProps,\n AnnotationPropsPatch,\n BlendMode,\n Border,\n ClickCreate,\n LineEnding,\n LineEndings,\n PropKey,\n PropSpec,\n SnapSettings,\n TextAlign,\n} from '@embedpdf/core-annotation';\n\n/** The public lens over the host capability's one runtime token. */\nexport const AnnotationToken =\n AnnotationHostToken as unknown as CapabilityToken<AnnotationCapability>;\nexport { previewBucket } from './types';\n/** The tool `armStamp` activates — a sibling that must win a click while a payload is armed keys on it. */\nexport { ARMED_STAMP_TOOL_ID } from './tools';\nexport {\n ANNOTATION_DRAW_PRIORITY,\n ANNOTATION_EDIT_PRIORITY,\n ANNOTATION_GHOST_PRIORITY,\n ANNOTATION_MARQUEE_PRIORITY,\n ANNOTATION_PLACE_PRIORITY,\n} from './priorities';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,MAAa,4BAA4B;AACzC,MAAa,2BAA2B;AACxC,MAAa,4BAA4B;AACzC,MAAa,2BAA2B;AACxC,MAAa,8BAA8B;;;;ACqC3C,MAAa,kBACXA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const require_types = require("./types-Dlhdw2k_.cjs");
|
|
2
|
+
//#region src/priorities.ts
|
|
3
|
+
/**
|
|
4
|
+
* The interaction-hub priorities of the annotation plugin's handlers — the
|
|
5
|
+
* public contract a sibling plugin builds on when it needs to sit ABOVE or
|
|
6
|
+
* BELOW one of them for the same gesture. Priority only breaks ties between
|
|
7
|
+
* simultaneously-ELIGIBLE handlers (the tool's tags decide eligibility).
|
|
8
|
+
*
|
|
9
|
+
* 1000 annotation-ghost never captures; hides the footprint ghost on every down
|
|
10
|
+
* 100 annotation-edit select/move/resize over an existing annotation
|
|
11
|
+
* 95 annotation-place click-to-place an armed payload on empty page space
|
|
12
|
+
* 55 annotation-draw drag-create under a draw tool (below text-select)
|
|
13
|
+
* 50 annotation-marquee empty-space selection, the final fallback
|
|
14
|
+
*
|
|
15
|
+
* A handler that must win a click over an existing annotation while a
|
|
16
|
+
* placing tool is active (a signature mark dropped onto a signature field)
|
|
17
|
+
* registers above {@link ANNOTATION_EDIT_PRIORITY}, not merely above place:
|
|
18
|
+
* the edit handler captures first over any annotation, a widget included.
|
|
19
|
+
*/
|
|
20
|
+
const ANNOTATION_GHOST_PRIORITY = 1e3;
|
|
21
|
+
const ANNOTATION_EDIT_PRIORITY = 100;
|
|
22
|
+
const ANNOTATION_PLACE_PRIORITY = 95;
|
|
23
|
+
const ANNOTATION_DRAW_PRIORITY = 55;
|
|
24
|
+
const ANNOTATION_MARQUEE_PRIORITY = 50;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/contract.ts
|
|
27
|
+
/** The public lens over the host capability's one runtime token. */
|
|
28
|
+
const AnnotationToken = require_types.AnnotationToken;
|
|
29
|
+
//#endregion
|
|
30
|
+
Object.defineProperty(exports, "ANNOTATION_DRAW_PRIORITY", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function() {
|
|
33
|
+
return ANNOTATION_DRAW_PRIORITY;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "ANNOTATION_EDIT_PRIORITY", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function() {
|
|
39
|
+
return ANNOTATION_EDIT_PRIORITY;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "ANNOTATION_GHOST_PRIORITY", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function() {
|
|
45
|
+
return ANNOTATION_GHOST_PRIORITY;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "ANNOTATION_MARQUEE_PRIORITY", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function() {
|
|
51
|
+
return ANNOTATION_MARQUEE_PRIORITY;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "ANNOTATION_PLACE_PRIORITY", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function() {
|
|
57
|
+
return ANNOTATION_PLACE_PRIORITY;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "AnnotationToken", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function() {
|
|
63
|
+
return AnnotationToken;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=contract-a4eaQWga.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-a4eaQWga.cjs","names":["AnnotationHostToken"],"sources":["../src/priorities.ts","../src/contract.ts"],"sourcesContent":["/**\n * The interaction-hub priorities of the annotation plugin's handlers — the\n * public contract a sibling plugin builds on when it needs to sit ABOVE or\n * BELOW one of them for the same gesture. Priority only breaks ties between\n * simultaneously-ELIGIBLE handlers (the tool's tags decide eligibility).\n *\n * 1000 annotation-ghost never captures; hides the footprint ghost on every down\n * 100 annotation-edit select/move/resize over an existing annotation\n * 95 annotation-place click-to-place an armed payload on empty page space\n * 55 annotation-draw drag-create under a draw tool (below text-select)\n * 50 annotation-marquee empty-space selection, the final fallback\n *\n * A handler that must win a click over an existing annotation while a\n * placing tool is active (a signature mark dropped onto a signature field)\n * registers above {@link ANNOTATION_EDIT_PRIORITY}, not merely above place:\n * the edit handler captures first over any annotation, a widget included.\n */\nexport const ANNOTATION_GHOST_PRIORITY = 1000;\nexport const ANNOTATION_EDIT_PRIORITY = 100;\nexport const ANNOTATION_PLACE_PRIORITY = 95;\nexport const ANNOTATION_DRAW_PRIORITY = 55;\nexport const ANNOTATION_MARQUEE_PRIORITY = 50;\n","/**\n * Public annotation protocol without the repository, reducer, tools, or plugin\n * wiring. Cross-package capability consumers import this entry.\n */\nimport type { CapabilityToken } from '@embedpdf/core';\n\nimport { AnnotationToken as AnnotationHostToken } from './types';\nimport type { AnnotationCapability } from './types';\n\nexport type {\n AnnotationCapability,\n AnnotationConfig,\n AnnotationState,\n AnnotationAction,\n AnnotationHydration,\n Behavior,\n CommentPermissions,\n CommentsApi,\n ThreadDeleteResult,\n ChromeSettings,\n ChromeSettingsPatch,\n LinkNavItem,\n SelectionFlags,\n SelectionProps,\n StampPlacement,\n StampPreviewProvider,\n StampToolInput,\n FilePickerProvider,\n FilePromptRequest,\n TextItem,\n ToolGhost,\n} from './types';\nexport type { Face, TextFormat, TextSelection } from './rich-text';\nexport type {\n AnnotationDTO,\n AnnotationRef,\n AnnotationSubtype,\n Color,\n CommentThread,\n CommentThreadReview,\n ReviewStatus,\n} from '@embedpdf/engine-core/runtime';\nexport type {\n AnnotationFlags,\n AnnotationProps,\n AnnotationPropsPatch,\n BlendMode,\n Border,\n ClickCreate,\n LineEnding,\n LineEndings,\n PropKey,\n PropSpec,\n SnapSettings,\n TextAlign,\n} from '@embedpdf/core-annotation';\n\n/** The public lens over the host capability's one runtime token. */\nexport const AnnotationToken =\n AnnotationHostToken as unknown as CapabilityToken<AnnotationCapability>;\nexport { previewBucket } from './types';\n/** The tool `armStamp` activates — a sibling that must win a click while a payload is armed keys on it. */\nexport { ARMED_STAMP_TOOL_ID } from './tools';\nexport {\n ANNOTATION_DRAW_PRIORITY,\n ANNOTATION_EDIT_PRIORITY,\n ANNOTATION_GHOST_PRIORITY,\n ANNOTATION_MARQUEE_PRIORITY,\n ANNOTATION_PLACE_PRIORITY,\n} from './priorities';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,MAAa,4BAA4B;AACzC,MAAa,2BAA2B;AACxC,MAAa,4BAA4B;AACzC,MAAa,2BAA2B;AACxC,MAAa,8BAA8B;;;;ACqC3C,MAAa,kBACXA,cAAAA"}
|
package/dist/contract.cjs
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
const require_tools = require("./tools-0NI3b9z8.cjs");
|
|
3
|
+
const require_types = require("./types-Dlhdw2k_.cjs");
|
|
4
|
+
const require_contract = require("./contract-a4eaQWga.cjs");
|
|
5
|
+
exports.ANNOTATION_DRAW_PRIORITY = require_contract.ANNOTATION_DRAW_PRIORITY;
|
|
6
|
+
exports.ANNOTATION_EDIT_PRIORITY = require_contract.ANNOTATION_EDIT_PRIORITY;
|
|
7
|
+
exports.ANNOTATION_GHOST_PRIORITY = require_contract.ANNOTATION_GHOST_PRIORITY;
|
|
8
|
+
exports.ANNOTATION_MARQUEE_PRIORITY = require_contract.ANNOTATION_MARQUEE_PRIORITY;
|
|
9
|
+
exports.ANNOTATION_PLACE_PRIORITY = require_contract.ANNOTATION_PLACE_PRIORITY;
|
|
10
|
+
exports.ARMED_STAMP_TOOL_ID = require_tools.ARMED_STAMP_TOOL_ID;
|
|
11
|
+
exports.AnnotationToken = require_contract.AnnotationToken;
|
|
12
|
+
exports.previewBucket = require_types.previewBucket;
|
package/dist/contract.d.cts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { _ as SelectionProps, a as AnnotationHydration, b as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { CapabilityToken } from "@embedpdf/core";
|
|
5
|
-
//#region src/contract.d.ts
|
|
6
|
-
/** The public lens over the host capability's one runtime token. */
|
|
7
|
-
declare const AnnotationToken: CapabilityToken<AnnotationCapability>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { type AnnotationAction, type AnnotationCapability, type AnnotationConfig, type AnnotationDTO, type AnnotationFlags, type AnnotationHydration, type AnnotationProps, type AnnotationPropsPatch, type AnnotationRef, type AnnotationState, type AnnotationSubtype, AnnotationToken, type Behavior, type BlendMode, type Border, type ChromeSettings, type ChromeSettingsPatch, type ClickCreate, type Color, type CommentPermissions, type CommentThread, type CommentThreadReview, type CommentsApi, type FilePickerProvider, type FilePromptRequest, type LineEnding, type LineEndings, type LinkNavItem, type PropKey, type PropSpec, type ReviewStatus, type SelectionFlags, type SelectionProps, type SnapSettings, type StampToolInput, type TextAlign, type TextItem, type ThreadDeleteResult, type ToolGhost };
|
|
10
|
-
//# sourceMappingURL=contract.d.cts.map
|
|
1
|
+
import { B as TextSelection, C as ToolGhost, R as Face, S as ThreadDeleteResult, T as ARMED_STAMP_TOOL_ID, _ as SelectionProps, a as AnnotationHydration, b as StampToolInput, c as Behavior, d as CommentPermissions, f as CommentsApi, g as SelectionFlags, h as LinkNavItem, l as ChromeSettings, m as FilePromptRequest, n as AnnotationCapability, o as AnnotationState, p as FilePickerProvider, r as AnnotationConfig, t as AnnotationAction, u as ChromeSettingsPatch, v as StampPlacement, w as previewBucket, x as TextItem, y as StampPreviewProvider, z as TextFormat } from "./types-ObcPYc3-.cjs";
|
|
2
|
+
import { C as ANNOTATION_GHOST_PRIORITY, S as ANNOTATION_EDIT_PRIORITY, T as ANNOTATION_PLACE_PRIORITY, _ as PropSpec, a as AnnotationRef, b as TextAlign, c as BlendMode, d as Color, f as CommentThread, g as PropKey, h as LineEndings, i as AnnotationPropsPatch, l as Border, m as LineEnding, n as AnnotationFlags, o as AnnotationSubtype, p as CommentThreadReview, r as AnnotationProps, s as AnnotationToken, t as AnnotationDTO, u as ClickCreate, v as ReviewStatus, w as ANNOTATION_MARQUEE_PRIORITY, x as ANNOTATION_DRAW_PRIORITY, y as SnapSettings } from "./contract-CgAcfAE7.cjs";
|
|
3
|
+
export { ANNOTATION_DRAW_PRIORITY, ANNOTATION_EDIT_PRIORITY, ANNOTATION_GHOST_PRIORITY, ANNOTATION_MARQUEE_PRIORITY, ANNOTATION_PLACE_PRIORITY, ARMED_STAMP_TOOL_ID, type AnnotationAction, type AnnotationCapability, type AnnotationConfig, type AnnotationDTO, type AnnotationFlags, type AnnotationHydration, type AnnotationProps, type AnnotationPropsPatch, type AnnotationRef, type AnnotationState, type AnnotationSubtype, AnnotationToken, type Behavior, type BlendMode, type Border, type ChromeSettings, type ChromeSettingsPatch, type ClickCreate, type Color, type CommentPermissions, type CommentThread, type CommentThreadReview, type CommentsApi, type Face, type FilePickerProvider, type FilePromptRequest, type LineEnding, type LineEndings, type LinkNavItem, type PropKey, type PropSpec, type ReviewStatus, type SelectionFlags, type SelectionProps, type SnapSettings, type StampPlacement, type StampPreviewProvider, type StampToolInput, type TextAlign, type TextFormat, type TextItem, type TextSelection, type ThreadDeleteResult, type ToolGhost, previewBucket };
|
package/dist/contract.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { _ as SelectionProps, a as AnnotationHydration, b as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { AnnotationFlags, AnnotationProps, AnnotationPropsPatch, BlendMode, Border, ClickCreate, LineEnding, LineEndings, PropKey, PropSpec, SnapSettings, TextAlign } from "@embedpdf/core-annotation";
|
|
5
|
-
//#region src/contract.d.ts
|
|
6
|
-
/** The public lens over the host capability's one runtime token. */
|
|
7
|
-
declare const AnnotationToken: CapabilityToken<AnnotationCapability>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { type AnnotationAction, type AnnotationCapability, type AnnotationConfig, type AnnotationDTO, type AnnotationFlags, type AnnotationHydration, type AnnotationProps, type AnnotationPropsPatch, type AnnotationRef, type AnnotationState, type AnnotationSubtype, AnnotationToken, type Behavior, type BlendMode, type Border, type ChromeSettings, type ChromeSettingsPatch, type ClickCreate, type Color, type CommentPermissions, type CommentThread, type CommentThreadReview, type CommentsApi, type FilePickerProvider, type FilePromptRequest, type LineEnding, type LineEndings, type LinkNavItem, type PropKey, type PropSpec, type ReviewStatus, type SelectionFlags, type SelectionProps, type SnapSettings, type StampToolInput, type TextAlign, type TextItem, type ThreadDeleteResult, type ToolGhost };
|
|
10
|
-
//# sourceMappingURL=contract.d.ts.map
|
|
1
|
+
import { B as TextSelection, C as ToolGhost, R as Face, S as ThreadDeleteResult, T as ARMED_STAMP_TOOL_ID, _ as SelectionProps, a as AnnotationHydration, b as StampToolInput, c as Behavior, d as CommentPermissions, f as CommentsApi, g as SelectionFlags, h as LinkNavItem, l as ChromeSettings, m as FilePromptRequest, n as AnnotationCapability, o as AnnotationState, p as FilePickerProvider, r as AnnotationConfig, t as AnnotationAction, u as ChromeSettingsPatch, v as StampPlacement, w as previewBucket, x as TextItem, y as StampPreviewProvider, z as TextFormat } from "./types-D5V0TIwk.js";
|
|
2
|
+
import { C as ANNOTATION_GHOST_PRIORITY, S as ANNOTATION_EDIT_PRIORITY, T as ANNOTATION_PLACE_PRIORITY, _ as PropSpec, a as AnnotationRef, b as TextAlign, c as BlendMode, d as Color, f as CommentThread, g as PropKey, h as LineEndings, i as AnnotationPropsPatch, l as Border, m as LineEnding, n as AnnotationFlags, o as AnnotationSubtype, p as CommentThreadReview, r as AnnotationProps, s as AnnotationToken, t as AnnotationDTO, u as ClickCreate, v as ReviewStatus, w as ANNOTATION_MARQUEE_PRIORITY, x as ANNOTATION_DRAW_PRIORITY, y as SnapSettings } from "./contract-CiG2_HBq.js";
|
|
3
|
+
export { ANNOTATION_DRAW_PRIORITY, ANNOTATION_EDIT_PRIORITY, ANNOTATION_GHOST_PRIORITY, ANNOTATION_MARQUEE_PRIORITY, ANNOTATION_PLACE_PRIORITY, ARMED_STAMP_TOOL_ID, type AnnotationAction, type AnnotationCapability, type AnnotationConfig, type AnnotationDTO, type AnnotationFlags, type AnnotationHydration, type AnnotationProps, type AnnotationPropsPatch, type AnnotationRef, type AnnotationState, type AnnotationSubtype, AnnotationToken, type Behavior, type BlendMode, type Border, type ChromeSettings, type ChromeSettingsPatch, type ClickCreate, type Color, type CommentPermissions, type CommentThread, type CommentThreadReview, type CommentsApi, type Face, type FilePickerProvider, type FilePromptRequest, type LineEnding, type LineEndings, type LinkNavItem, type PropKey, type PropSpec, type ReviewStatus, type SelectionFlags, type SelectionProps, type SnapSettings, type StampPlacement, type StampPreviewProvider, type StampToolInput, type TextAlign, type TextFormat, type TextItem, type TextSelection, type ThreadDeleteResult, type ToolGhost, previewBucket };
|
package/dist/contract.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
|
-
export { AnnotationToken };
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=contract.js.map
|
|
1
|
+
import { t as ARMED_STAMP_TOOL_ID } from "./tools-DBEYx3-c.js";
|
|
2
|
+
import { n as previewBucket } from "./types-BvB1vUKb.js";
|
|
3
|
+
import { a as ANNOTATION_MARQUEE_PRIORITY, i as ANNOTATION_GHOST_PRIORITY, n as ANNOTATION_DRAW_PRIORITY, o as ANNOTATION_PLACE_PRIORITY, r as ANNOTATION_EDIT_PRIORITY, t as AnnotationToken } from "./contract-DtXE1hjY.js";
|
|
4
|
+
export { ANNOTATION_DRAW_PRIORITY, ANNOTATION_EDIT_PRIORITY, ANNOTATION_GHOST_PRIORITY, ANNOTATION_MARQUEE_PRIORITY, ANNOTATION_PLACE_PRIORITY, ARMED_STAMP_TOOL_ID, AnnotationToken, previewBucket };
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_seam = require("./seam-6pJeKOOJ.cjs");
|
|
3
|
-
const require_capability = require("./capability-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const require_capability = require("./capability-DVx1NmTe.cjs");
|
|
4
|
+
const require_tools = require("./tools-0NI3b9z8.cjs");
|
|
5
|
+
const require_types = require("./types-Dlhdw2k_.cjs");
|
|
6
|
+
const require_contract = require("./contract-a4eaQWga.cjs");
|
|
6
7
|
require("./authoring.cjs");
|
|
7
8
|
let _embedpdf_core = require("@embedpdf/core");
|
|
8
9
|
let _embedpdf_plugin_actions_contract = require("@embedpdf/plugin-actions/contract");
|
|
@@ -34,6 +35,31 @@ function registerAnnotationEffects(ctx) {
|
|
|
34
35
|
});
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
38
|
+
if (event.type === "form.fieldUpdated") {
|
|
39
|
+
apply({
|
|
40
|
+
t: "bumpAp",
|
|
41
|
+
ids: event.field.widgets.filter((w) => w.annotObjectNumber > 0).map((w) => (0, _embedpdf_engine_core_runtime.encodeStableIdKey)({
|
|
42
|
+
kind: "objectNumber",
|
|
43
|
+
value: w.annotObjectNumber
|
|
44
|
+
}))
|
|
45
|
+
});
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (event.type === "signature.completed") {
|
|
49
|
+
const widget = event.signature.widget;
|
|
50
|
+
if (widget && widget.annotObjectNumber > 0) apply({
|
|
51
|
+
t: "bumpAp",
|
|
52
|
+
ids: [(0, _embedpdf_engine_core_runtime.encodeStableIdKey)({
|
|
53
|
+
kind: "objectNumber",
|
|
54
|
+
value: widget.annotObjectNumber
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (event.type === "document.versioned") {
|
|
60
|
+
host().rehydrate();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
37
63
|
if (event.type === "redaction.applied") {
|
|
38
64
|
const affected = new Set(event.results.filter((r) => r.status === "applied").map((r) => r.pageObjectNumber));
|
|
39
65
|
if (affected.size) for (const pon of affected) host().reloadPage(pon);
|
|
@@ -126,7 +152,7 @@ function createGhostHandler(anno, interaction) {
|
|
|
126
152
|
};
|
|
127
153
|
return {
|
|
128
154
|
id: "annotation-ghost",
|
|
129
|
-
priority:
|
|
155
|
+
priority: require_contract.ANNOTATION_GHOST_PRIORITY,
|
|
130
156
|
enabledFor: () => true,
|
|
131
157
|
onDown: () => {
|
|
132
158
|
anno.clearGhost();
|
|
@@ -485,7 +511,8 @@ const initialAnnotationState = (config = {}) => ({
|
|
|
485
511
|
hydration: { status: "loading" },
|
|
486
512
|
chrome: mergeChrome(DEFAULT_CHROME, config.chrome ?? {}),
|
|
487
513
|
toolGhost: null,
|
|
488
|
-
stampArmEpoch: 0
|
|
514
|
+
stampArmEpoch: 0,
|
|
515
|
+
textSelection: null
|
|
489
516
|
});
|
|
490
517
|
const annotationReducer = (state, action) => {
|
|
491
518
|
switch (action.type) {
|
|
@@ -505,6 +532,10 @@ const annotationReducer = (state, action) => {
|
|
|
505
532
|
...state,
|
|
506
533
|
toolGhost: action.ghost
|
|
507
534
|
};
|
|
535
|
+
case "SET_TEXT_SELECTION": return {
|
|
536
|
+
...state,
|
|
537
|
+
textSelection: action.selection
|
|
538
|
+
};
|
|
508
539
|
case "STAMP_ARM_CHANGED": return {
|
|
509
540
|
...state,
|
|
510
541
|
stampArmEpoch: state.stampArmEpoch + 1,
|
|
@@ -542,7 +573,7 @@ const annotationPlugin = (config = {}) => (0, _embedpdf_core.definePlugin)({
|
|
|
542
573
|
id: tool.id,
|
|
543
574
|
cursor: tool.cursor,
|
|
544
575
|
enables: tool.enables,
|
|
545
|
-
touchDirect:
|
|
576
|
+
touchDirect: require_tools.isTouchDirect(tool.enables)
|
|
546
577
|
});
|
|
547
578
|
if (tool.defaults) annotation.setDefaults(tool.preset, tool.defaults);
|
|
548
579
|
}
|
|
@@ -555,15 +586,22 @@ const annotationPlugin = (config = {}) => (0, _embedpdf_core.definePlugin)({
|
|
|
555
586
|
annotation.cancel();
|
|
556
587
|
annotation.clearGhost();
|
|
557
588
|
annotation.pruneEngagedSelection();
|
|
558
|
-
|
|
589
|
+
const active = interaction.activeTool();
|
|
590
|
+
if (active.id !== "stamp" && !active.enables.has("annotation-stamp")) annotation.disarmStamp();
|
|
559
591
|
});
|
|
560
592
|
if (selection) wireMarkup(annotation, selection, interaction);
|
|
561
593
|
}
|
|
562
594
|
});
|
|
563
595
|
//#endregion
|
|
596
|
+
exports.ANNOTATION_DRAW_PRIORITY = require_contract.ANNOTATION_DRAW_PRIORITY;
|
|
597
|
+
exports.ANNOTATION_EDIT_PRIORITY = require_contract.ANNOTATION_EDIT_PRIORITY;
|
|
598
|
+
exports.ANNOTATION_GHOST_PRIORITY = require_contract.ANNOTATION_GHOST_PRIORITY;
|
|
599
|
+
exports.ANNOTATION_MARQUEE_PRIORITY = require_contract.ANNOTATION_MARQUEE_PRIORITY;
|
|
600
|
+
exports.ANNOTATION_PLACE_PRIORITY = require_contract.ANNOTATION_PLACE_PRIORITY;
|
|
601
|
+
exports.ARMED_STAMP_TOOL_ID = require_tools.ARMED_STAMP_TOOL_ID;
|
|
564
602
|
exports.AnnotationToken = require_contract.AnnotationToken;
|
|
565
603
|
exports.DEFAULT_CHROME = DEFAULT_CHROME;
|
|
566
|
-
exports.DEFAULT_TOOLS =
|
|
604
|
+
exports.DEFAULT_TOOLS = require_tools.DEFAULT_TOOLS;
|
|
567
605
|
Object.defineProperty(exports, "MIN_DRAG", {
|
|
568
606
|
enumerable: true,
|
|
569
607
|
get: function() {
|
|
@@ -572,6 +610,7 @@ Object.defineProperty(exports, "MIN_DRAG", {
|
|
|
572
610
|
});
|
|
573
611
|
exports.annotationPlugin = annotationPlugin;
|
|
574
612
|
exports.fromDTO = require_capability.fromDTO;
|
|
613
|
+
exports.previewBucket = require_types.previewBucket;
|
|
575
614
|
Object.defineProperty(exports, "propsFor", {
|
|
576
615
|
enumerable: true,
|
|
577
616
|
get: function() {
|