@embedpdf/plugin-annotation 3.0.0-next.3 → 3.0.0-next.4

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/internal.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_capability = require("./capability-hb2AU0f6.cjs");
2
+ const require_capability = require("./capability-CYbikyob.cjs");
3
3
  exports.AnnotationToken = require_capability.AnnotationToken;
4
4
  exports.buildToolRegistry = require_capability.buildToolRegistry;
5
5
  exports.createAnnotationCapability = require_capability.createAnnotationCapability;
@@ -1,4 +1,4 @@
1
- import { a as AnnotationState, i as AnnotationHostCapability, k as buildToolRegistry, o as AnnotationToken, r as AnnotationConfig, t as AnnotationAction, w as ResolvedTool } from "./types-BhWgqgbX.cjs";
1
+ import { a as AnnotationState, i as AnnotationHostCapability, k as buildToolRegistry, o as AnnotationToken, r as AnnotationConfig, t as AnnotationAction, w as ResolvedTool } from "./types-CfewRmXH.cjs";
2
2
  import { PluginContext } from "@embedpdf/core";
3
3
  //#region src/capability.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { a as AnnotationState, i as AnnotationHostCapability, k as buildToolRegistry, o as AnnotationToken, r as AnnotationConfig, t as AnnotationAction, w as ResolvedTool } from "./types-Da6JRmhw.js";
1
+ import { a as AnnotationState, i as AnnotationHostCapability, k as buildToolRegistry, o as AnnotationToken, r as AnnotationConfig, t as AnnotationAction, w as ResolvedTool } from "./types-DZ29RSW9.js";
2
2
  import { PluginContext } from "@embedpdf/core";
3
3
  //#region src/capability.d.ts
4
4
  /**
package/dist/internal.js CHANGED
@@ -1,2 +1,2 @@
1
- import { r as buildToolRegistry, t as createAnnotationCapability, u as AnnotationToken } from "./capability-fghl0JmE.js";
1
+ import { r as buildToolRegistry, t as createAnnotationCapability, u as AnnotationToken } from "./capability-DjUdnoYn.js";
2
2
  export { AnnotationToken, buildToolRegistry, createAnnotationCapability };
@@ -1,7 +1,7 @@
1
1
  import { PageObjectNumber } from "@embedpdf/core";
2
- import { AnnotationAppearanceImage, AnnotationDTO, AnnotationDraft, AnnotationPatch, AnnotationRef, AttachmentContent, AttachmentFileSource, BinarySource, InkIntent, PdfLinkTarget, PdfRect } from "@embedpdf/engine-core/runtime";
3
- import { AnnotationFlags, AnnotationProps, AnnotationPropsPatch, ChromeNode, ClickCreate, CreationDraftAnchor, Geom, Id, InkStraightenOptions, Model, PropKey, PropSpec, Rect, RenderItem, SnapSettings, Subtype, Vec, ViewEnv } from "@embedpdf/core-annotation";
4
2
  import { PageRotation } from "@embedpdf/core-geometry";
3
+ import { AnnotationAppearanceImage, AnnotationDTO, AnnotationDraft, AnnotationPatch, AnnotationRef, AttachmentContent, AttachmentFileSource, BinarySource, InkIntent, PdfLinkTarget, PdfRect } from "@embedpdf/engine-core/runtime";
4
+ import { AnnotationFlags, AnnotationProps, AnnotationPropsPatch, ChromeNode, ClickCreate, CreationDraftAnchor, Geom, Id, InkStraightenOptions, Model, PropKey, PropSpec, Rect, RenderItem, SnapSettings, Subtype, TextEndAnchor, TextQuad, Vec, ViewEnv } from "@embedpdf/core-annotation";
5
5
  //#region src/tools.d.ts
6
6
  /**
7
7
  * How a stamp-family tool resolves the image bytes it places — pure DATA, so a
@@ -797,16 +797,17 @@ interface AnnotationHostCapability extends AnnotationCapability {
797
797
  /** Commit the strokes currently buffered by an ink tool's grouping window. */
798
798
  finishInkDraft(): void;
799
799
  cancelCreationDraft(): void;
800
- /** Create one text-markup annotation on a page from the selected text's per-line
801
- * rects (content space) — the `text-selection` create gesture. */
802
- createMarkup(subtype: Subtype, pon: PageObjectNumber, rects: Rect[], preset?: string): void;
803
- /** Create a caret annotation from the final line rect of a text selection. */
804
- createCaret(pon: PageObjectNumber, textEndRect: Rect): void;
800
+ /** Create one text-markup annotation on a page from the selected text's
801
+ * per-line oriented quads (content space) — the `text-selection` create
802
+ * gesture. Axis-aligned callers build quads with `textQuadFromRect`. */
803
+ createMarkup(subtype: Subtype, pon: PageObjectNumber, quads: TextQuad[], preset?: string): void;
804
+ /** Create a caret annotation at a text-selection end anchor. */
805
+ createCaret(pon: PageObjectNumber, anchor: TextEndAnchor): void;
805
806
  /** Create one Adobe-compatible Caret + StrikeOut replace-text group. */
806
- createReplaceText(pon: PageObjectNumber, rects: Rect[], textEndRect: Rect, preset?: string): void;
807
- /** Set the live markup preview from the selection's per-page rects (renders a
807
+ createReplaceText(pon: PageObjectNumber, quads: TextQuad[], anchor: TextEndAnchor, preset?: string): void;
808
+ /** Set the live markup preview from the selection's per-page quads (renders a
808
809
  * ghost that looks like the markup it will become). */
809
- previewMarkup(subtype: Subtype, rectsByPage: Record<number, Rect[]>, preset?: string): void;
810
+ previewMarkup(subtype: Subtype, quadsByPage: Record<number, TextQuad[]>, preset?: string): void;
810
811
  clearMarkupPreview(): void;
811
812
  /** Place the armed stamp centred on a content point. Returns false (no
812
813
  * capture) when nothing is armed. `displayRotation` (the click sample's page
@@ -876,4 +877,4 @@ interface AnnotationHostCapability extends AnnotationCapability {
876
877
  declare const AnnotationToken: import("@embedpdf/core").CapabilityToken<AnnotationHostCapability>;
877
878
  //#endregion
878
879
  export { PromptSourceSpec as C, ToolAuthoringKind as D, StampSourceSpec as E, ToolDefaultsFor as O, InkAuthoringOptions as S, SelectionAuthoring as T, ToolGhost as _, AnnotationState as a, DEFAULT_TOOLS as b, ChromeSettings as c, FilePromptRequest as d, LinkNavItem as f, TextItem as g, StampToolInput as h, AnnotationHostCapability as i, buildToolRegistry as k, ChromeSettingsPatch as l, SelectionProps as m, AnnotationCapability as n, AnnotationToken as o, SelectionFlags as p, AnnotationConfig as r, Behavior as s, AnnotationAction as t, FilePickerProvider as u, AnnotationToolDef as v, ResolvedTool as w, GhostPolicy as x, AnnotationToolInput as y };
879
- //# sourceMappingURL=types-Da6JRmhw.d.ts.map
880
+ //# sourceMappingURL=types-CfewRmXH.d.cts.map
@@ -1,7 +1,7 @@
1
1
  import { PageObjectNumber } from "@embedpdf/core";
2
- import { PageRotation } from "@embedpdf/core-geometry";
3
2
  import { AnnotationAppearanceImage, AnnotationDTO, AnnotationDraft, AnnotationPatch, AnnotationRef, AttachmentContent, AttachmentFileSource, BinarySource, InkIntent, PdfLinkTarget, PdfRect } from "@embedpdf/engine-core/runtime";
4
- import { AnnotationFlags, AnnotationProps, AnnotationPropsPatch, ChromeNode, ClickCreate, CreationDraftAnchor, Geom, Id, InkStraightenOptions, Model, PropKey, PropSpec, Rect, RenderItem, SnapSettings, Subtype, Vec, ViewEnv } from "@embedpdf/core-annotation";
3
+ import { AnnotationFlags, AnnotationProps, AnnotationPropsPatch, ChromeNode, ClickCreate, CreationDraftAnchor, Geom, Id, InkStraightenOptions, Model, PropKey, PropSpec, Rect, RenderItem, SnapSettings, Subtype, TextEndAnchor, TextQuad, Vec, ViewEnv } from "@embedpdf/core-annotation";
4
+ import { PageRotation } from "@embedpdf/core-geometry";
5
5
  //#region src/tools.d.ts
6
6
  /**
7
7
  * How a stamp-family tool resolves the image bytes it places — pure DATA, so a
@@ -797,16 +797,17 @@ interface AnnotationHostCapability extends AnnotationCapability {
797
797
  /** Commit the strokes currently buffered by an ink tool's grouping window. */
798
798
  finishInkDraft(): void;
799
799
  cancelCreationDraft(): void;
800
- /** Create one text-markup annotation on a page from the selected text's per-line
801
- * rects (content space) — the `text-selection` create gesture. */
802
- createMarkup(subtype: Subtype, pon: PageObjectNumber, rects: Rect[], preset?: string): void;
803
- /** Create a caret annotation from the final line rect of a text selection. */
804
- createCaret(pon: PageObjectNumber, textEndRect: Rect): void;
800
+ /** Create one text-markup annotation on a page from the selected text's
801
+ * per-line oriented quads (content space) — the `text-selection` create
802
+ * gesture. Axis-aligned callers build quads with `textQuadFromRect`. */
803
+ createMarkup(subtype: Subtype, pon: PageObjectNumber, quads: TextQuad[], preset?: string): void;
804
+ /** Create a caret annotation at a text-selection end anchor. */
805
+ createCaret(pon: PageObjectNumber, anchor: TextEndAnchor): void;
805
806
  /** Create one Adobe-compatible Caret + StrikeOut replace-text group. */
806
- createReplaceText(pon: PageObjectNumber, rects: Rect[], textEndRect: Rect, preset?: string): void;
807
- /** Set the live markup preview from the selection's per-page rects (renders a
807
+ createReplaceText(pon: PageObjectNumber, quads: TextQuad[], anchor: TextEndAnchor, preset?: string): void;
808
+ /** Set the live markup preview from the selection's per-page quads (renders a
808
809
  * ghost that looks like the markup it will become). */
809
- previewMarkup(subtype: Subtype, rectsByPage: Record<number, Rect[]>, preset?: string): void;
810
+ previewMarkup(subtype: Subtype, quadsByPage: Record<number, TextQuad[]>, preset?: string): void;
810
811
  clearMarkupPreview(): void;
811
812
  /** Place the armed stamp centred on a content point. Returns false (no
812
813
  * capture) when nothing is armed. `displayRotation` (the click sample's page
@@ -876,4 +877,4 @@ interface AnnotationHostCapability extends AnnotationCapability {
876
877
  declare const AnnotationToken: import("@embedpdf/core").CapabilityToken<AnnotationHostCapability>;
877
878
  //#endregion
878
879
  export { PromptSourceSpec as C, ToolAuthoringKind as D, StampSourceSpec as E, ToolDefaultsFor as O, InkAuthoringOptions as S, SelectionAuthoring as T, ToolGhost as _, AnnotationState as a, DEFAULT_TOOLS as b, ChromeSettings as c, FilePromptRequest as d, LinkNavItem as f, TextItem as g, StampToolInput as h, AnnotationHostCapability as i, buildToolRegistry as k, ChromeSettingsPatch as l, SelectionProps as m, AnnotationCapability as n, AnnotationToken as o, SelectionFlags as p, AnnotationConfig as r, Behavior as s, AnnotationAction as t, FilePickerProvider as u, AnnotationToolDef as v, ResolvedTool as w, GhostPolicy as x, AnnotationToolInput as y };
879
- //# sourceMappingURL=types-BhWgqgbX.d.cts.map
880
+ //# sourceMappingURL=types-DZ29RSW9.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-annotation",
3
- "version": "3.0.0-next.3",
3
+ "version": "3.0.0-next.4",
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",
@@ -22,12 +22,12 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@embedpdf/core": "3.0.0-next.3",
26
- "@embedpdf/core-annotation": "3.0.0-next.3",
27
- "@embedpdf/plugin-interaction": "3.0.0-next.3",
28
- "@embedpdf/core-geometry": "3.0.0-next.3",
29
- "@embedpdf/plugin-selection": "3.0.0-next.3",
30
- "@embedpdf/engine-core": "3.0.0-next.3"
25
+ "@embedpdf/core": "3.0.0-next.4",
26
+ "@embedpdf/core-geometry": "3.0.0-next.4",
27
+ "@embedpdf/core-annotation": "3.0.0-next.4",
28
+ "@embedpdf/plugin-interaction": "3.0.0-next.4",
29
+ "@embedpdf/plugin-selection": "3.0.0-next.4",
30
+ "@embedpdf/engine-core": "3.0.0-next.4"
31
31
  },
32
32
  "devDependencies": {
33
33
  "typescript": "^5.0.0",