@embedpdf/plugin-annotation 3.0.0-next.13 → 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.
Files changed (61) hide show
  1. package/README.md +129 -0
  2. package/dist/authoring.cjs +12 -2
  3. package/dist/authoring.d.cts +2 -2
  4. package/dist/authoring.d.ts +2 -2
  5. package/dist/authoring.js +2 -3
  6. package/dist/contract/host.cjs +18 -2
  7. package/dist/contract/host.d.cts +3 -2
  8. package/dist/contract/host.d.ts +3 -2
  9. package/dist/contract/host.js +3 -2
  10. package/dist/contract-BK4LHe9v.d.cts +1127 -0
  11. package/dist/contract-BOo9iZKo.d.ts +1127 -0
  12. package/dist/contract-CPzpRG3h.cjs +692 -0
  13. package/dist/contract-CPzpRG3h.cjs.map +1 -0
  14. package/dist/contract-b2e_LZvu.js +651 -0
  15. package/dist/contract-b2e_LZvu.js.map +1 -0
  16. package/dist/contract.cjs +11 -10
  17. package/dist/contract.d.cts +2 -3
  18. package/dist/contract.d.ts +2 -3
  19. package/dist/contract.js +2 -4
  20. package/dist/host-contract-BbjhS_Fo.d.ts +310 -0
  21. package/dist/host-contract-CxrQPcPj.js +52 -0
  22. package/dist/host-contract-CxrQPcPj.js.map +1 -0
  23. package/dist/{contract-a4eaQWga.cjs → host-contract-DY9jFPPF.cjs} +36 -16
  24. package/dist/host-contract-DY9jFPPF.cjs.map +1 -0
  25. package/dist/host-contract-Nzxwh0XS.d.cts +310 -0
  26. package/dist/index.cjs +4995 -414
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +12 -17
  29. package/dist/index.d.ts +12 -17
  30. package/dist/index.js +4949 -388
  31. package/dist/index.js.map +1 -1
  32. package/package.json +11 -14
  33. package/dist/authoring-BhtyfsMx.d.cts +0 -37
  34. package/dist/authoring-R4ezdnXd.d.ts +0 -37
  35. package/dist/capability-B_dkoB1K.js +0 -3041
  36. package/dist/capability-B_dkoB1K.js.map +0 -1
  37. package/dist/capability-DVx1NmTe.cjs +0 -3064
  38. package/dist/capability-DVx1NmTe.cjs.map +0 -1
  39. package/dist/contract-CgAcfAE7.d.cts +0 -34
  40. package/dist/contract-CiG2_HBq.d.ts +0 -34
  41. package/dist/contract-DtXE1hjY.js +0 -32
  42. package/dist/contract-DtXE1hjY.js.map +0 -1
  43. package/dist/contract-a4eaQWga.cjs.map +0 -1
  44. package/dist/internal.cjs +0 -8
  45. package/dist/internal.d.cts +0 -14
  46. package/dist/internal.d.ts +0 -14
  47. package/dist/internal.js +0 -5
  48. package/dist/seam-6pJeKOOJ.cjs +0 -296
  49. package/dist/seam-6pJeKOOJ.cjs.map +0 -1
  50. package/dist/seam-C4L_7rDt.js +0 -225
  51. package/dist/seam-C4L_7rDt.js.map +0 -1
  52. package/dist/tools-0NI3b9z8.cjs +0 -536
  53. package/dist/tools-0NI3b9z8.cjs.map +0 -1
  54. package/dist/tools-DBEYx3-c.js +0 -513
  55. package/dist/tools-DBEYx3-c.js.map +0 -1
  56. package/dist/types-BvB1vUKb.js +0 -20
  57. package/dist/types-BvB1vUKb.js.map +0 -1
  58. package/dist/types-D5V0TIwk.d.ts +0 -1200
  59. package/dist/types-Dlhdw2k_.cjs +0 -31
  60. package/dist/types-Dlhdw2k_.cjs.map +0 -1
  61. package/dist/types-ObcPYc3-.d.cts +0 -1200
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-annotation",
3
- "version": "3.0.0-next.13",
3
+ "version": "3.0.0-next.15",
4
4
  "private": false,
5
5
  "description": "Annotation feature plugin: the pure annotation-core wired to the engine repository (optimistic create/patch/delete) + the interaction hub (ambient edit + draw tools). Behaviors (forms) plug in here.",
6
6
  "type": "module",
@@ -24,24 +24,21 @@
24
24
  "import": "./dist/contract/host.js",
25
25
  "require": "./dist/contract/host.cjs"
26
26
  },
27
- "./internal": {
28
- "import": "./dist/internal.js",
29
- "require": "./dist/internal.cjs"
30
- },
31
27
  "./package.json": "./package.json"
32
28
  },
33
29
  "files": [
34
30
  "dist"
35
31
  ],
36
32
  "dependencies": {
37
- "@embedpdf/core": "3.0.0-next.13",
38
- "@embedpdf/core-annotation": "3.0.0-next.13",
39
- "@embedpdf/plugin-interaction": "3.0.0-next.13",
40
- "@embedpdf/core-geometry": "3.0.0-next.13",
41
- "@embedpdf/plugin-selection": "3.0.0-next.13",
42
- "@embedpdf/engine-core": "3.0.0-next.13",
43
- "@embedpdf/core-acrojs": "3.0.0-next.13",
44
- "@embedpdf/plugin-actions": "3.0.0-next.13"
33
+ "@embedpdf/core": "3.0.0-next.15",
34
+ "@embedpdf/core-annotation": "3.0.0-next.15",
35
+ "@embedpdf/core-geometry": "3.0.0-next.15",
36
+ "@embedpdf/plugin-selection": "3.0.0-next.15",
37
+ "@embedpdf/plugin-interaction": "3.0.0-next.15",
38
+ "@embedpdf/plugin-render": "3.0.0-next.15",
39
+ "@embedpdf/plugin-actions": "3.0.0-next.15",
40
+ "@embedpdf/engine-core": "3.0.0-next.15",
41
+ "@embedpdf/core-acrojs": "3.0.0-next.15"
45
42
  },
46
43
  "devDependencies": {
47
44
  "typescript": "^5.0.0",
@@ -58,7 +55,7 @@
58
55
  "scripts": {
59
56
  "build": "epdf-build",
60
57
  "clean": "rimraf dist",
61
- "typecheck": "tsc -p tsconfig.json --noEmit",
58
+ "typecheck": "tsc -p test/tools/plain-js/tsconfig.json && tsc -p tsconfig.json --noEmit",
62
59
  "test": "vitest run"
63
60
  }
64
61
  }
@@ -1,37 +0,0 @@
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
@@ -1,37 +0,0 @@
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