@embedpdf/plugin-annotation 3.0.0-next.10 → 3.0.0-next.12
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/authoring-BhtyfsMx.d.cts +37 -0
- package/dist/authoring-R4ezdnXd.d.ts +37 -0
- package/dist/authoring.cjs +16 -0
- package/dist/authoring.d.cts +2 -0
- package/dist/authoring.d.ts +2 -0
- package/dist/authoring.js +3 -0
- package/dist/{capability-BRf0HrOi.js → capability-Bh_1PL5v.js} +266 -280
- package/dist/capability-Bh_1PL5v.js.map +1 -0
- package/dist/{capability-Cl9x8oLS.cjs → capability-R7dgogJs.cjs} +332 -364
- package/dist/capability-R7dgogJs.cjs.map +1 -0
- package/dist/contract/host.cjs +3 -0
- package/dist/contract/host.d.cts +2 -0
- package/dist/contract/host.d.ts +2 -0
- package/dist/contract/host.js +2 -0
- package/dist/contract.cjs +10 -0
- package/dist/contract.cjs.map +1 -0
- package/dist/contract.d.cts +10 -0
- package/dist/contract.d.ts +10 -0
- package/dist/contract.js +8 -0
- package/dist/contract.js.map +1 -0
- package/dist/index.cjs +25 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -47
- package/dist/index.d.ts +5 -47
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +4 -2
- package/dist/internal.d.cts +2 -1
- package/dist/internal.d.ts +2 -1
- package/dist/internal.js +3 -1
- package/dist/seam-6pJeKOOJ.cjs +296 -0
- package/dist/seam-6pJeKOOJ.cjs.map +1 -0
- package/dist/seam-C4L_7rDt.js +225 -0
- package/dist/seam-C4L_7rDt.js.map +1 -0
- package/dist/{types-Due7UgzE.d.cts → types-BAPdbfPT.d.cts} +89 -18
- package/dist/{types-DITX_3CG.d.ts → types-BgetZ4BK.d.ts} +88 -17
- package/dist/types-BvB1vUKb.js +20 -0
- package/dist/types-BvB1vUKb.js.map +1 -0
- package/dist/types-Dlhdw2k_.cjs +31 -0
- package/dist/types-Dlhdw2k_.cjs.map +1 -0
- package/package.json +21 -7
- package/dist/capability-BRf0HrOi.js.map +0 -1
- package/dist/capability-Cl9x8oLS.cjs.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Annot, AnnotationPropsPatch, ClickPlacement, Geom, MIN_DRAG, PropKey, Rect, Style, resolveClickPlacement } from "@embedpdf/core-annotation";
|
|
2
|
+
import { AnnotationDTO, AnnotationDraft, AnnotationPatch, AnnotationRef, PdfLinkTarget, PdfRect, WidgetAppearance } from "@embedpdf/engine-core/runtime";
|
|
3
|
+
//#region src/repository/seam.d.ts
|
|
4
|
+
declare function refKey(ref: AnnotationRef): string;
|
|
5
|
+
/** Engine DTO → content-space `Style` (CSS colours, `Border` union). Exported so
|
|
6
|
+
* selection-aware UIs can read display values straight off a {@link AnnotationDTO}
|
|
7
|
+
* without re-deriving the colour/border mapping. */
|
|
8
|
+
declare function styleFromDTO(dto: AnnotationDTO): Style;
|
|
9
|
+
/**
|
|
10
|
+
* The flat props vocabulary (CSS colours, house keys) → the engine's widget
|
|
11
|
+
* appearance for `doc.forms` authoring — the SAME mapping the widget patch
|
|
12
|
+
* lowering uses, exported as a boundary utility so the form plugin can style
|
|
13
|
+
* `placeField` from a tool's `currentDefaults` without growing a second CSS
|
|
14
|
+
* parser. Absent keys stay absent (the engine writes nothing for them).
|
|
15
|
+
*/
|
|
16
|
+
declare function widgetAppearanceFromProps(props: AnnotationPropsPatch): WidgetAppearance;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/repository/index.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Engine DTO → content-space Annot. `source` decides how it renders: `'baked'`
|
|
21
|
+
* shows the engine's appearance raster (a page load, or a remote edit — trust
|
|
22
|
+
* the authored AP); `'vector'` renders live from geom/style (we authored or
|
|
23
|
+
* changed it). `apBox` is the raster's content-space box, used while baked.
|
|
24
|
+
*/
|
|
25
|
+
declare function fromDTO(dto: AnnotationDTO, crop: PdfRect, source?: 'baked' | 'vector'): Annot;
|
|
26
|
+
/** Content Annot → the FULL engine patch: the kind's geometry group plus every
|
|
27
|
+
* prop it declares editable. The reference statement — scoped emission and
|
|
28
|
+
* drafts both build on it. */
|
|
29
|
+
declare function toPatch(a: Annot, crop: PdfRect): AnnotationPatch | null;
|
|
30
|
+
/** Content Annot → engine create draft: the full statement plus the kind's
|
|
31
|
+
* create-only extras, with the model's `/F` emitted verbatim, once, for every
|
|
32
|
+
* kind (a fresh draw carries DRAWN_FLAGS plus any tool seed). `null` for the
|
|
33
|
+
* kinds whose creates travel their own path (stamps, widgets, icon place). */
|
|
34
|
+
declare function toCreateDraft(a: Annot, crop: PdfRect): AnnotationDraft | null;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { toCreateDraft as a, styleFromDTO as c, fromDTO as i, widgetAppearanceFromProps as l, MIN_DRAG as n, toPatch as o, resolveClickPlacement as r, refKey as s, ClickPlacement as t };
|
|
37
|
+
//# sourceMappingURL=authoring-BhtyfsMx.d.cts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AnnotationDTO, AnnotationDraft, AnnotationPatch, AnnotationRef, PdfLinkTarget, PdfRect, WidgetAppearance } from "@embedpdf/engine-core/runtime";
|
|
2
|
+
import { Annot, AnnotationPropsPatch, ClickPlacement, Geom, MIN_DRAG, PropKey, Rect, Style, resolveClickPlacement as resolveClickPlacement$1 } from "@embedpdf/core-annotation";
|
|
3
|
+
//#region src/repository/seam.d.ts
|
|
4
|
+
declare function refKey(ref: AnnotationRef): string;
|
|
5
|
+
/** Engine DTO → content-space `Style` (CSS colours, `Border` union). Exported so
|
|
6
|
+
* selection-aware UIs can read display values straight off a {@link AnnotationDTO}
|
|
7
|
+
* without re-deriving the colour/border mapping. */
|
|
8
|
+
declare function styleFromDTO(dto: AnnotationDTO): Style;
|
|
9
|
+
/**
|
|
10
|
+
* The flat props vocabulary (CSS colours, house keys) → the engine's widget
|
|
11
|
+
* appearance for `doc.forms` authoring — the SAME mapping the widget patch
|
|
12
|
+
* lowering uses, exported as a boundary utility so the form plugin can style
|
|
13
|
+
* `placeField` from a tool's `currentDefaults` without growing a second CSS
|
|
14
|
+
* parser. Absent keys stay absent (the engine writes nothing for them).
|
|
15
|
+
*/
|
|
16
|
+
declare function widgetAppearanceFromProps(props: AnnotationPropsPatch): WidgetAppearance;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/repository/index.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Engine DTO → content-space Annot. `source` decides how it renders: `'baked'`
|
|
21
|
+
* shows the engine's appearance raster (a page load, or a remote edit — trust
|
|
22
|
+
* the authored AP); `'vector'` renders live from geom/style (we authored or
|
|
23
|
+
* changed it). `apBox` is the raster's content-space box, used while baked.
|
|
24
|
+
*/
|
|
25
|
+
declare function fromDTO(dto: AnnotationDTO, crop: PdfRect, source?: 'baked' | 'vector'): Annot;
|
|
26
|
+
/** Content Annot → the FULL engine patch: the kind's geometry group plus every
|
|
27
|
+
* prop it declares editable. The reference statement — scoped emission and
|
|
28
|
+
* drafts both build on it. */
|
|
29
|
+
declare function toPatch(a: Annot, crop: PdfRect): AnnotationPatch | null;
|
|
30
|
+
/** Content Annot → engine create draft: the full statement plus the kind's
|
|
31
|
+
* create-only extras, with the model's `/F` emitted verbatim, once, for every
|
|
32
|
+
* kind (a fresh draw carries DRAWN_FLAGS plus any tool seed). `null` for the
|
|
33
|
+
* kinds whose creates travel their own path (stamps, widgets, icon place). */
|
|
34
|
+
declare function toCreateDraft(a: Annot, crop: PdfRect): AnnotationDraft | null;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { toCreateDraft as a, styleFromDTO as c, fromDTO as i, widgetAppearanceFromProps as l, MIN_DRAG as n, toPatch as o, resolveClickPlacement$1 as r, refKey as s, ClickPlacement as t };
|
|
37
|
+
//# sourceMappingURL=authoring-R4ezdnXd.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_seam = require("./seam-6pJeKOOJ.cjs");
|
|
3
|
+
let _embedpdf_core_annotation = require("@embedpdf/core-annotation");
|
|
4
|
+
Object.defineProperty(exports, "MIN_DRAG", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function() {
|
|
7
|
+
return _embedpdf_core_annotation.MIN_DRAG;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
Object.defineProperty(exports, "resolveClickPlacement", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function() {
|
|
13
|
+
return _embedpdf_core_annotation.resolveClickPlacement;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
exports.widgetAppearanceFromProps = require_seam.widgetAppearanceFromProps;
|