@embedpdf/plugin-annotation 3.3.0 → 3.4.0

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/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { widgetAppearanceOf } from "./authoring.cjs";
2
- import { $ as ChromeSettings, A as AnnotationReorderedEvent, At as ToolDefaults, B as AnnotationSubtype, Bt as InkAuthoringOptions, C as AnnotationLinksCapability, Ct as SnapSettings, D as AnnotationProperties, Dt as TextAlign, E as AnnotationPosition, Et as StampPreviewProvider, F as AnnotationSelectionAnchor, Ft as ARMED_STAMP_TOOL_ID, G as AnnotationUpdatedEvent, Gt as StampSourceSpec, H as AnnotationTool, Ht as ResolvedGhost, I as AnnotationSelectionCapability, It as AnnotationToolDefinition, J as ArmedStampPreview, K as AnnotationWriteFailedEvent, Kt as ToolAuthoringKind, L as AnnotationSelectionChangedEvent, Lt as AnnotationToolInput, M as AnnotationResources, Mt as AnnotationState, N as AnnotationResyncedEvent, Nt as annotationState, O as AnnotationProperty, Ot as TextItem, P as AnnotationRotationAnchor, Pt as AnnotationToken, Q as BlendMode, R as AnnotationSettings, Rt as DEFAULT_TOOLS, S as AnnotationImportResult, St as ReviewStatus, T as AnnotationPatch, Tt as StampPlacement, U as AnnotationToolsCapability, Ut as ResolvedTool, V as AnnotationTextCapability, Vt as PromptSourceSpec, W as AnnotationTransfer, Wt as SelectionAuthoring, X as AttachmentFileSource, Xt as TextFormat, Y as AttachmentContent, Yt as Face, Z as Behavior, Zt as TextSelection, _ as AnnotationFilter, _t as LineStyle, a as AnnotationBundle, at as CommentsCapability, b as AnnotationImportDrop, bt as MeasurementIntent, c as AnnotationCreatedEvent, ct as EditableKinds, d as AnnotationDraftCapability, dt as FilePromptRequest, et as ClickCreate, f as AnnotationDraftChangedEvent, ft as FlagKey, g as AnnotationExportSelection, gt as LineEndings, h as AnnotationEditingChangedEvent, ht as LineEnding, i as AnnotationAnchor, it as CommentThreadReview, j as AnnotationResourceRole, jt as ToolDefaultsChangedEvent, k as AnnotationRef, kt as ThreadDeleteResult, l as AnnotationDeletedEvent, lt as FieldValues, m as AnnotationDuplicateResult, mt as ImageGhost, n as AfterCreateSettings, nt as CommentThread, o as AnnotationCapability, ot as CreationDraft, p as AnnotationDuplicateOptions, pt as HandleRole, q as ArmedStampInfo, qt as ToolDefaultsFor, r as Annotation, rt as CommentThreadChangedEvent, s as AnnotationConfig, st as EditableKind, t as ANNOTATION_DEFAULTS, tt as Color, u as AnnotationDraft, ut as FilePickerProvider, v as AnnotationFlags, vt as LinkNavItem, w as AnnotationOption, wt as StampInput, x as AnnotationImportOptions, xt as PdfLinkTarget, y as AnnotationHoverChangedEvent, yt as MarkupSubtype, z as AnnotationStampsCapability, zt as GhostPolicy } from "./contract-DkxvCGXL.cjs";
3
- import { f as AnnotationModel, n as AnnotationHostCapability } from "./host-contract-WxgdlBLx.cjs";
4
- import { MIN_DRAG, Placement, gesturePlacement, kindNamed, propertiesOf, resolveClickPlacement } from "@embedpdf/core-annotation";
2
+ import { $ as ChromeSettings, A as AnnotationReorderedEvent, At as ToolDefaults, B as AnnotationSubtype, Bt as InkAuthoringOptions, C as AnnotationLinksCapability, Ct as SnapSettings, D as AnnotationProperties, Dt as TextAlign, E as AnnotationPosition, Et as StampPreviewProvider, F as AnnotationSelectionAnchor, Ft as ARMED_STAMP_TOOL_ID, G as AnnotationUpdatedEvent, Gt as StampSourceSpec, H as AnnotationTool, Ht as ResolvedGhost, I as AnnotationSelectionCapability, It as AnnotationToolDefinition, J as ArmedStampPreview, K as AnnotationWriteFailedEvent, Kt as ToolAuthoringKind, L as AnnotationSelectionChangedEvent, Lt as AnnotationToolInput, M as AnnotationResources, Mt as AnnotationState, N as AnnotationResyncedEvent, Nt as annotationState, O as AnnotationProperty, Ot as TextItem, P as AnnotationRotationAnchor, Pt as AnnotationToken, Q as BlendMode, R as AnnotationSettings, Rt as DEFAULT_TOOLS, S as AnnotationImportResult, St as ReviewStatus, T as AnnotationPatch, Tt as StampPlacement, U as AnnotationToolsCapability, Ut as ResolvedTool, V as AnnotationTextCapability, Vt as PromptSourceSpec, W as AnnotationTransfer, Wt as SelectionAuthoring, X as AttachmentFileSource, Xt as TextFormat, Y as AttachmentContent, Yt as Face, Z as Behavior, Zt as TextSelection, _ as AnnotationFilter, _t as LineStyle, a as AnnotationBundle, at as CommentsCapability, b as AnnotationImportDrop, bt as MeasurementIntent, c as AnnotationCreatedEvent, ct as EditableKinds, d as AnnotationDraftCapability, dt as FilePromptRequest, et as ClickCreate, f as AnnotationDraftChangedEvent, ft as FlagKey, g as AnnotationExportSelection, gt as LineEndings, h as AnnotationEditingChangedEvent, ht as LineEnding, i as AnnotationAnchor, it as CommentThreadReview, j as AnnotationResourceRole, jt as ToolDefaultsChangedEvent, k as AnnotationRef, kt as ThreadDeleteResult, l as AnnotationDeletedEvent, lt as FieldValues, m as AnnotationDuplicateResult, mt as ImageGhost, n as AfterCreateSettings, nt as CommentThread, o as AnnotationCapability, ot as CreationDraft, p as AnnotationDuplicateOptions, pt as HandleRole, q as ArmedStampInfo, qt as ToolDefaultsFor, r as Annotation, rt as CommentThreadChangedEvent, s as AnnotationConfig, st as EditableKind, t as ANNOTATION_DEFAULTS, tt as Color, u as AnnotationDraft, ut as FilePickerProvider, v as AnnotationFlags, vt as LinkNavItem, w as AnnotationOption, wt as StampInput, x as AnnotationImportOptions, xt as PdfLinkTarget, y as AnnotationHoverChangedEvent, yt as MarkupSubtype, z as AnnotationStampsCapability, zt as GhostPolicy } from "./contract-BfZ-mTF7.cjs";
3
+ import { f as AnnotationModel, n as AnnotationHostCapability } from "./host-contract-CjPbxfhS.cjs";
4
+ import { MIN_DRAG, Placement, gesturePlacement, kindNamed, orientationPatch, propertiesOf, resolveClickPlacement } from "@embedpdf/core-annotation";
5
5
  import { annotationKey } from "@embedpdf/core";
6
6
  //#region src/annotation.plugin.d.ts
7
7
  /**
@@ -15,5 +15,5 @@ import { annotationKey } from "@embedpdf/core";
15
15
  */
16
16
  declare const annotationPlugin: (config?: AnnotationConfig) => import("@embedpdf/core").PluginDefinition<AnnotationModel, AnnotationHostCapability, AnnotationSettings>;
17
17
  //#endregion
18
- export { ANNOTATION_DEFAULTS, ARMED_STAMP_TOOL_ID, AfterCreateSettings, type Annotation, AnnotationAnchor, type AnnotationBundle, AnnotationCapability, AnnotationConfig, AnnotationCreatedEvent, AnnotationDeletedEvent, type AnnotationDraft, AnnotationDraftCapability, AnnotationDraftChangedEvent, AnnotationDuplicateOptions, AnnotationDuplicateResult, AnnotationEditingChangedEvent, AnnotationExportSelection, AnnotationFilter, type AnnotationFlags, AnnotationHoverChangedEvent, type AnnotationImportDrop, type AnnotationImportOptions, AnnotationImportResult, AnnotationLinksCapability, type AnnotationOption, type AnnotationPatch, type AnnotationPosition, AnnotationProperties, type AnnotationProperty, type AnnotationRef, AnnotationReorderedEvent, type AnnotationResourceRole, type AnnotationResources, AnnotationResyncedEvent, AnnotationRotationAnchor, AnnotationSelectionAnchor, AnnotationSelectionCapability, AnnotationSelectionChangedEvent, AnnotationSettings, AnnotationStampsCapability, type AnnotationState, type AnnotationSubtype, AnnotationTextCapability, AnnotationToken, AnnotationTool, type AnnotationToolDefinition, type AnnotationToolInput, AnnotationToolsCapability, AnnotationTransfer, AnnotationUpdatedEvent, AnnotationWriteFailedEvent, ArmedStampInfo, ArmedStampPreview, type AttachmentContent, type AttachmentFileSource, Behavior, type BlendMode, ChromeSettings, type ClickCreate, type Color, type CommentThread, CommentThreadChangedEvent, type CommentThreadReview, CommentsCapability, CreationDraft, DEFAULT_TOOLS, type EditableKind, type EditableKinds, type Face, type FieldValues, FilePickerProvider, FilePromptRequest, type FlagKey, type GhostPolicy, type HandleRole, ImageGhost, type InkAuthoringOptions, type LineEnding, type LineEndings, LineStyle, LinkNavItem, MIN_DRAG, MarkupSubtype, type MeasurementIntent, type PdfLinkTarget, type Placement, type PromptSourceSpec, type ResolvedGhost, type ResolvedTool, type ReviewStatus, type SelectionAuthoring, type SnapSettings, StampInput, StampPlacement, StampPreviewProvider, type StampSourceSpec, type TextAlign, type TextFormat, TextItem, type TextSelection, ThreadDeleteResult, type ToolAuthoringKind, ToolDefaults, ToolDefaultsChangedEvent, type ToolDefaultsFor, annotationKey, annotationPlugin, annotationState, gesturePlacement, kindNamed, propertiesOf, resolveClickPlacement, widgetAppearanceOf };
18
+ export { ANNOTATION_DEFAULTS, ARMED_STAMP_TOOL_ID, AfterCreateSettings, type Annotation, AnnotationAnchor, type AnnotationBundle, AnnotationCapability, AnnotationConfig, AnnotationCreatedEvent, AnnotationDeletedEvent, type AnnotationDraft, AnnotationDraftCapability, AnnotationDraftChangedEvent, AnnotationDuplicateOptions, AnnotationDuplicateResult, AnnotationEditingChangedEvent, AnnotationExportSelection, AnnotationFilter, type AnnotationFlags, AnnotationHoverChangedEvent, type AnnotationImportDrop, type AnnotationImportOptions, AnnotationImportResult, AnnotationLinksCapability, type AnnotationOption, type AnnotationPatch, type AnnotationPosition, AnnotationProperties, type AnnotationProperty, type AnnotationRef, AnnotationReorderedEvent, type AnnotationResourceRole, type AnnotationResources, AnnotationResyncedEvent, AnnotationRotationAnchor, AnnotationSelectionAnchor, AnnotationSelectionCapability, AnnotationSelectionChangedEvent, AnnotationSettings, AnnotationStampsCapability, type AnnotationState, type AnnotationSubtype, AnnotationTextCapability, AnnotationToken, AnnotationTool, type AnnotationToolDefinition, type AnnotationToolInput, AnnotationToolsCapability, AnnotationTransfer, AnnotationUpdatedEvent, AnnotationWriteFailedEvent, ArmedStampInfo, ArmedStampPreview, type AttachmentContent, type AttachmentFileSource, Behavior, type BlendMode, ChromeSettings, type ClickCreate, type Color, type CommentThread, CommentThreadChangedEvent, type CommentThreadReview, CommentsCapability, CreationDraft, DEFAULT_TOOLS, type EditableKind, type EditableKinds, type Face, type FieldValues, FilePickerProvider, FilePromptRequest, type FlagKey, type GhostPolicy, type HandleRole, ImageGhost, type InkAuthoringOptions, type LineEnding, type LineEndings, LineStyle, LinkNavItem, MIN_DRAG, MarkupSubtype, type MeasurementIntent, type PdfLinkTarget, type Placement, type PromptSourceSpec, type ResolvedGhost, type ResolvedTool, type ReviewStatus, type SelectionAuthoring, type SnapSettings, StampInput, StampPlacement, StampPreviewProvider, type StampSourceSpec, type TextAlign, type TextFormat, TextItem, type TextSelection, ThreadDeleteResult, type ToolAuthoringKind, ToolDefaults, ToolDefaultsChangedEvent, type ToolDefaultsFor, annotationKey, annotationPlugin, annotationState, gesturePlacement, kindNamed, orientationPatch, propertiesOf, resolveClickPlacement, widgetAppearanceOf };
19
19
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { widgetAppearanceOf } from "./authoring.js";
2
- import { $ as ChromeSettings, A as AnnotationReorderedEvent, At as ToolDefaults, B as AnnotationSubtype, Bt as InkAuthoringOptions, C as AnnotationLinksCapability, Ct as SnapSettings, D as AnnotationProperties, Dt as TextAlign, E as AnnotationPosition, Et as StampPreviewProvider, F as AnnotationSelectionAnchor, Ft as ARMED_STAMP_TOOL_ID, G as AnnotationUpdatedEvent, Gt as StampSourceSpec, H as AnnotationTool, Ht as ResolvedGhost, I as AnnotationSelectionCapability, It as AnnotationToolDefinition, J as ArmedStampPreview, K as AnnotationWriteFailedEvent, Kt as ToolAuthoringKind, L as AnnotationSelectionChangedEvent, Lt as AnnotationToolInput, M as AnnotationResources, Mt as AnnotationState, N as AnnotationResyncedEvent, Nt as annotationState, O as AnnotationProperty, Ot as TextItem, P as AnnotationRotationAnchor, Pt as AnnotationToken, Q as BlendMode, R as AnnotationSettings, Rt as DEFAULT_TOOLS, S as AnnotationImportResult, St as ReviewStatus, T as AnnotationPatch, Tt as StampPlacement, U as AnnotationToolsCapability, Ut as ResolvedTool, V as AnnotationTextCapability, Vt as PromptSourceSpec, W as AnnotationTransfer, Wt as SelectionAuthoring, X as AttachmentFileSource, Xt as TextFormat, Y as AttachmentContent, Yt as Face, Z as Behavior, Zt as TextSelection, _ as AnnotationFilter, _t as LineStyle, a as AnnotationBundle, at as CommentsCapability, b as AnnotationImportDrop, bt as MeasurementIntent, c as AnnotationCreatedEvent, ct as EditableKinds, d as AnnotationDraftCapability, dt as FilePromptRequest, et as ClickCreate, f as AnnotationDraftChangedEvent, ft as FlagKey, g as AnnotationExportSelection, gt as LineEndings, h as AnnotationEditingChangedEvent, ht as LineEnding, i as AnnotationAnchor, it as CommentThreadReview, j as AnnotationResourceRole, jt as ToolDefaultsChangedEvent, k as AnnotationRef, kt as ThreadDeleteResult, l as AnnotationDeletedEvent, lt as FieldValues, m as AnnotationDuplicateResult, mt as ImageGhost, n as AfterCreateSettings, nt as CommentThread, o as AnnotationCapability, ot as CreationDraft, p as AnnotationDuplicateOptions, pt as HandleRole, q as ArmedStampInfo, qt as ToolDefaultsFor, r as Annotation, rt as CommentThreadChangedEvent, s as AnnotationConfig, st as EditableKind, t as ANNOTATION_DEFAULTS, tt as Color, u as AnnotationDraft, ut as FilePickerProvider, v as AnnotationFlags, vt as LinkNavItem, w as AnnotationOption, wt as StampInput, x as AnnotationImportOptions, xt as PdfLinkTarget, y as AnnotationHoverChangedEvent, yt as MarkupSubtype, z as AnnotationStampsCapability, zt as GhostPolicy } from "./contract-CQfRsCVj.js";
3
- import { f as AnnotationModel, n as AnnotationHostCapability } from "./host-contract-DE9W8GVT.js";
2
+ import { $ as ChromeSettings, A as AnnotationReorderedEvent, At as ToolDefaults, B as AnnotationSubtype, Bt as InkAuthoringOptions, C as AnnotationLinksCapability, Ct as SnapSettings, D as AnnotationProperties, Dt as TextAlign, E as AnnotationPosition, Et as StampPreviewProvider, F as AnnotationSelectionAnchor, Ft as ARMED_STAMP_TOOL_ID, G as AnnotationUpdatedEvent, Gt as StampSourceSpec, H as AnnotationTool, Ht as ResolvedGhost, I as AnnotationSelectionCapability, It as AnnotationToolDefinition, J as ArmedStampPreview, K as AnnotationWriteFailedEvent, Kt as ToolAuthoringKind, L as AnnotationSelectionChangedEvent, Lt as AnnotationToolInput, M as AnnotationResources, Mt as AnnotationState, N as AnnotationResyncedEvent, Nt as annotationState, O as AnnotationProperty, Ot as TextItem, P as AnnotationRotationAnchor, Pt as AnnotationToken, Q as BlendMode, R as AnnotationSettings, Rt as DEFAULT_TOOLS, S as AnnotationImportResult, St as ReviewStatus, T as AnnotationPatch, Tt as StampPlacement, U as AnnotationToolsCapability, Ut as ResolvedTool, V as AnnotationTextCapability, Vt as PromptSourceSpec, W as AnnotationTransfer, Wt as SelectionAuthoring, X as AttachmentFileSource, Xt as TextFormat, Y as AttachmentContent, Yt as Face, Z as Behavior, Zt as TextSelection, _ as AnnotationFilter, _t as LineStyle, a as AnnotationBundle, at as CommentsCapability, b as AnnotationImportDrop, bt as MeasurementIntent, c as AnnotationCreatedEvent, ct as EditableKinds, d as AnnotationDraftCapability, dt as FilePromptRequest, et as ClickCreate, f as AnnotationDraftChangedEvent, ft as FlagKey, g as AnnotationExportSelection, gt as LineEndings, h as AnnotationEditingChangedEvent, ht as LineEnding, i as AnnotationAnchor, it as CommentThreadReview, j as AnnotationResourceRole, jt as ToolDefaultsChangedEvent, k as AnnotationRef, kt as ThreadDeleteResult, l as AnnotationDeletedEvent, lt as FieldValues, m as AnnotationDuplicateResult, mt as ImageGhost, n as AfterCreateSettings, nt as CommentThread, o as AnnotationCapability, ot as CreationDraft, p as AnnotationDuplicateOptions, pt as HandleRole, q as ArmedStampInfo, qt as ToolDefaultsFor, r as Annotation, rt as CommentThreadChangedEvent, s as AnnotationConfig, st as EditableKind, t as ANNOTATION_DEFAULTS, tt as Color, u as AnnotationDraft, ut as FilePickerProvider, v as AnnotationFlags, vt as LinkNavItem, w as AnnotationOption, wt as StampInput, x as AnnotationImportOptions, xt as PdfLinkTarget, y as AnnotationHoverChangedEvent, yt as MarkupSubtype, z as AnnotationStampsCapability, zt as GhostPolicy } from "./contract-DRUUSPzY.js";
3
+ import { f as AnnotationModel, n as AnnotationHostCapability } from "./host-contract-BrC7hZw_.js";
4
4
  import { annotationKey } from "@embedpdf/core";
5
- import { MIN_DRAG, Placement, gesturePlacement, kindNamed, propertiesOf, resolveClickPlacement } from "@embedpdf/core-annotation";
5
+ import { MIN_DRAG, Placement, gesturePlacement, kindNamed, orientationPatch, propertiesOf, resolveClickPlacement } from "@embedpdf/core-annotation";
6
6
  //#region src/annotation.plugin.d.ts
7
7
  /**
8
8
  * The annotation plugin. Document-scoped; requires the interaction hub and
@@ -15,5 +15,5 @@ import { MIN_DRAG, Placement, gesturePlacement, kindNamed, propertiesOf, resolve
15
15
  */
16
16
  declare const annotationPlugin: (config?: AnnotationConfig) => import("@embedpdf/core").PluginDefinition<AnnotationModel, AnnotationHostCapability, AnnotationSettings>;
17
17
  //#endregion
18
- export { ANNOTATION_DEFAULTS, ARMED_STAMP_TOOL_ID, AfterCreateSettings, type Annotation, AnnotationAnchor, type AnnotationBundle, AnnotationCapability, AnnotationConfig, AnnotationCreatedEvent, AnnotationDeletedEvent, type AnnotationDraft, AnnotationDraftCapability, AnnotationDraftChangedEvent, AnnotationDuplicateOptions, AnnotationDuplicateResult, AnnotationEditingChangedEvent, AnnotationExportSelection, AnnotationFilter, type AnnotationFlags, AnnotationHoverChangedEvent, type AnnotationImportDrop, type AnnotationImportOptions, AnnotationImportResult, AnnotationLinksCapability, type AnnotationOption, type AnnotationPatch, type AnnotationPosition, AnnotationProperties, type AnnotationProperty, type AnnotationRef, AnnotationReorderedEvent, type AnnotationResourceRole, type AnnotationResources, AnnotationResyncedEvent, AnnotationRotationAnchor, AnnotationSelectionAnchor, AnnotationSelectionCapability, AnnotationSelectionChangedEvent, AnnotationSettings, AnnotationStampsCapability, type AnnotationState, type AnnotationSubtype, AnnotationTextCapability, AnnotationToken, AnnotationTool, type AnnotationToolDefinition, type AnnotationToolInput, AnnotationToolsCapability, AnnotationTransfer, AnnotationUpdatedEvent, AnnotationWriteFailedEvent, ArmedStampInfo, ArmedStampPreview, type AttachmentContent, type AttachmentFileSource, Behavior, type BlendMode, ChromeSettings, type ClickCreate, type Color, type CommentThread, CommentThreadChangedEvent, type CommentThreadReview, CommentsCapability, CreationDraft, DEFAULT_TOOLS, type EditableKind, type EditableKinds, type Face, type FieldValues, FilePickerProvider, FilePromptRequest, type FlagKey, type GhostPolicy, type HandleRole, ImageGhost, type InkAuthoringOptions, type LineEnding, type LineEndings, LineStyle, LinkNavItem, MIN_DRAG, MarkupSubtype, type MeasurementIntent, type PdfLinkTarget, type Placement, type PromptSourceSpec, type ResolvedGhost, type ResolvedTool, type ReviewStatus, type SelectionAuthoring, type SnapSettings, StampInput, StampPlacement, StampPreviewProvider, type StampSourceSpec, type TextAlign, type TextFormat, TextItem, type TextSelection, ThreadDeleteResult, type ToolAuthoringKind, ToolDefaults, ToolDefaultsChangedEvent, type ToolDefaultsFor, annotationKey, annotationPlugin, annotationState, gesturePlacement, kindNamed, propertiesOf, resolveClickPlacement, widgetAppearanceOf };
18
+ export { ANNOTATION_DEFAULTS, ARMED_STAMP_TOOL_ID, AfterCreateSettings, type Annotation, AnnotationAnchor, type AnnotationBundle, AnnotationCapability, AnnotationConfig, AnnotationCreatedEvent, AnnotationDeletedEvent, type AnnotationDraft, AnnotationDraftCapability, AnnotationDraftChangedEvent, AnnotationDuplicateOptions, AnnotationDuplicateResult, AnnotationEditingChangedEvent, AnnotationExportSelection, AnnotationFilter, type AnnotationFlags, AnnotationHoverChangedEvent, type AnnotationImportDrop, type AnnotationImportOptions, AnnotationImportResult, AnnotationLinksCapability, type AnnotationOption, type AnnotationPatch, type AnnotationPosition, AnnotationProperties, type AnnotationProperty, type AnnotationRef, AnnotationReorderedEvent, type AnnotationResourceRole, type AnnotationResources, AnnotationResyncedEvent, AnnotationRotationAnchor, AnnotationSelectionAnchor, AnnotationSelectionCapability, AnnotationSelectionChangedEvent, AnnotationSettings, AnnotationStampsCapability, type AnnotationState, type AnnotationSubtype, AnnotationTextCapability, AnnotationToken, AnnotationTool, type AnnotationToolDefinition, type AnnotationToolInput, AnnotationToolsCapability, AnnotationTransfer, AnnotationUpdatedEvent, AnnotationWriteFailedEvent, ArmedStampInfo, ArmedStampPreview, type AttachmentContent, type AttachmentFileSource, Behavior, type BlendMode, ChromeSettings, type ClickCreate, type Color, type CommentThread, CommentThreadChangedEvent, type CommentThreadReview, CommentsCapability, CreationDraft, DEFAULT_TOOLS, type EditableKind, type EditableKinds, type Face, type FieldValues, FilePickerProvider, FilePromptRequest, type FlagKey, type GhostPolicy, type HandleRole, ImageGhost, type InkAuthoringOptions, type LineEnding, type LineEndings, LineStyle, LinkNavItem, MIN_DRAG, MarkupSubtype, type MeasurementIntent, type PdfLinkTarget, type Placement, type PromptSourceSpec, type ResolvedGhost, type ResolvedTool, type ReviewStatus, type SelectionAuthoring, type SnapSettings, StampInput, StampPlacement, StampPreviewProvider, type StampSourceSpec, type TextAlign, type TextFormat, TextItem, type TextSelection, ThreadDeleteResult, type ToolAuthoringKind, ToolDefaults, ToolDefaultsChangedEvent, type ToolDefaultsFor, annotationKey, annotationPlugin, annotationState, gesturePlacement, kindNamed, orientationPatch, propertiesOf, resolveClickPlacement, widgetAppearanceOf };
19
19
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { InteractionToken } from "@embedpdf/plugin-interaction/contract/host";
8
8
  import { RenderToken } from "@embedpdf/plugin-render/contract";
9
9
  import { SelectionToken } from "@embedpdf/plugin-selection/contract/host";
10
10
  import { ANNOTATION_FIELD_NAMES, STANDARD_FACES, anchorOf, annotationKey as annotationKey$1, annotationPatchBetween, buildCommentThreads, colorOf, compareIsoDateTime, deletedWith, faceForFontName, familyKey, fontNameForFace, imageSourceOfBytes, isDimension, isLocalEngine, isReadout, measurementReadout, pageBoxOf, planAnnotationCopies, reorderPart, reorderedList, resolveAnnotationPatch, resolveBinarySource, serializeError, sniffBinaryMetadata, standardFontForFace, toPageRef, viewportForPoint } from "@embedpdf/engine-core/runtime";
11
- import { MIN_DRAG, anchorModeOf, anchoredGeometry, annotContentsEditable, annotDeletable, annotTransformable, annotationAfter, annotationAnchor, annotationOfNew, applyStyleToRange, canMove, chrome, creationDraftAnchor, cursorAt, defaultsFor, drawnAfter, drawsLive, dropsWaitingInk, expandGroups, faceForFont, fitStampBox, fromDTO, gesturePlacement, gesturePlacement as gesturePlacement$1, groupKeyOf, groupOf, hitTest, initialSession, initialTextStyle, isContentsEditableByHand, isDrag, isEditableByHand, isMovable, isOnTextBox, isSelectable, isSubstrateOnly, isTransformableByHand, kindNamed, kindNamed as kindNamed$1, kindOf, linkChildRects, linkChildrenOf, linkOf, locateOffset, newRecordsAtMost, pageItems, placedShape, propertiesOf, propertiesOf as propertiesOf$1, readOfDefaults, refOf, resolveClickPlacement, resolveClickPlacement as resolveClickPlacement$1, richDocOf, richTextLength, rotationAnchor, sameSession, selectionAnchor, selectionInBox, selectionProperties, shapeOf, sourceOfConfirmed, sourceOfNew, styleAt, styleOf, textBoxOf, textBoxes, textOf, textPlateInset, toolAnnotation, typeWithStyle, unanchoredGeometry, unmadeItem, update, uprightRotation, viewable, writableTarget } from "@embedpdf/core-annotation";
11
+ import { MIN_DRAG, anchorModeOf, anchoredGeometry, annotContentsEditable, annotDeletable, annotTransformable, annotationAfter, annotationAnchor, annotationOfNew, applyStyleToRange, canMove, chrome, creationDraftAnchor, cursorAt, defaultsFor, drawnAfter, drawsLive, dropsWaitingInk, expandGroups, faceForFont, fitStampBox, fromDTO, gesturePlacement, gesturePlacement as gesturePlacement$1, groupKeyOf, groupOf, hitTest, initialSession, initialTextStyle, isContentsEditableByHand, isDrag, isEditableByHand, isMovable, isOnTextBox, isSelectable, isSubstrateOnly, isTransformableByHand, kindNamed, kindNamed as kindNamed$1, kindOf, linkChildRects, linkChildrenOf, linkOf, locateOffset, newRecordsAtMost, orientationPatch, pageItems, placedShape, propertiesOf, propertiesOf as propertiesOf$1, readOfDefaults, refOf, resolveClickPlacement, resolveClickPlacement as resolveClickPlacement$1, richDocOf, richTextLength, rotationAnchor, sameSession, selectionAnchor, selectionInBox, selectionProperties, shapeOf, sourceOfConfirmed, sourceOfNew, styleAt, styleOf, textBoxOf, textBoxes, textOf, textPlateInset, toolAnnotation, typeWithStyle, unanchoredGeometry, unmadeItem, update, uprightRotation, viewable, writableTarget } from "@embedpdf/core-annotation";
12
12
  import { ActionsToken as ActionsToken$1 } from "@embedpdf/plugin-actions/contract/host";
13
13
  import { RenderToken as RenderToken$1 } from "@embedpdf/plugin-render/contract/host";
14
14
  import { standardFontCss, standardFontOf, standardFontOfProgramFamily } from "@embedpdf/core-fonts";
@@ -1313,6 +1313,7 @@ const FORMATS = /* @__PURE__ */ new Set([
1313
1313
  /** One property's value, by its key (the border's is its three fields). */
1314
1314
  function propertyValue(spec, { data, text, link }) {
1315
1315
  if (spec.key === "link") return link ?? null;
1316
+ if (spec.key === "orientation") return String(data.rotation ?? 0);
1316
1317
  if (spec.key === "borderStyle") return {
1317
1318
  borderStyle: data.borderStyle ?? "solid",
1318
1319
  dashArray: data.dashArray ?? null,
@@ -1980,11 +1981,17 @@ function createView(ctx, records, lending) {
1980
1981
  const painter = lender.painter(shown);
1981
1982
  return painter ? { painter } : {};
1982
1983
  };
1983
- /** A lent record as the model has it, cached per shown row and the confirmed row it was made from. */
1984
+ /** The same accent: none on both sides, or the same color as strong. */
1985
+ const sameAccent = (left, right) => left === right || left !== null && right !== null && left.color === right.color && left.strength === right.strength;
1986
+ /**
1987
+ * A lent record as the model has it, cached per shown row, the confirmed row it was made from
1988
+ * and the accent its lender gives it.
1989
+ */
1984
1990
  const lent = /* @__PURE__ */ new WeakMap();
1985
1991
  const lentRecord = (shown, truth, lender) => {
1992
+ const accent = lender.accentOf?.(shown) ?? null;
1986
1993
  const cached = lent.get(shown);
1987
- if (cached && cached.truth === truth) return cached.record;
1994
+ if (cached && cached.truth === truth && sameAccent(cached.accent, accent)) return cached.record;
1988
1995
  let record;
1989
1996
  if (!truth) record = {
1990
1997
  ...fromDTO(shown),
@@ -2016,8 +2023,13 @@ function createView(ctx, records, lending) {
2016
2023
  source: "vector"
2017
2024
  };
2018
2025
  }
2026
+ if (accent) record = {
2027
+ ...record,
2028
+ accent
2029
+ };
2019
2030
  lent.set(shown, {
2020
2031
  truth,
2032
+ accent,
2021
2033
  record
2022
2034
  });
2023
2035
  return record;
@@ -4162,7 +4174,11 @@ function createGhost(ctx, { store, geometry, tools }, stamps) {
4162
4174
  }
4163
4175
  const placingTool = placing && tools.get(placing.toolId);
4164
4176
  if (placing?.page.objectNumber === pageObjectNumber && placingTool && isDrag("box", placing.from, placing.to)) {
4165
- const placement = gesturePlacement$1("box", placing.from, placing.to, placingTool.clickCreate, { pageBox: geometry.pageBoxOf(pageObjectNumber) });
4177
+ const placement = gesturePlacement$1("box", placing.from, placing.to, placingTool.clickCreate, {
4178
+ pageBox: geometry.pageBoxOf(pageObjectNumber),
4179
+ upright: placingTool.upright,
4180
+ displayRotation: placing.displayRotation
4181
+ });
4166
4182
  const annotation = annotationOfTool(model, placingTool);
4167
4183
  const shape = placement && placedShape(annotation, placement);
4168
4184
  if (shape) items.push(unmadeItem(PLACING_ID, annotation, shape, "draft", view));
@@ -4202,12 +4218,13 @@ function createGhost(ctx, { store, geometry, tools }, stamps) {
4202
4218
  api: {
4203
4219
  hoverGhostAt,
4204
4220
  clearGhost,
4205
- previewPlacement: (toolId, page, from, to) => {
4221
+ previewPlacement: (toolId, page, from, to, displayRotation) => {
4206
4222
  ctx.state.update(setPlacing, {
4207
4223
  toolId,
4208
4224
  page,
4209
4225
  from,
4210
- to
4226
+ to,
4227
+ ...displayRotation !== void 0 ? { displayRotation } : {}
4211
4228
  });
4212
4229
  },
4213
4230
  clearPlacementPreview: () => {
@@ -5276,6 +5293,15 @@ function createSelectionWrites(ctx, { store, authority, fonts, behaviors, lendin
5276
5293
  y: flips("y", "height") ? -10 : DUPLICATE_OFFSET
5277
5294
  };
5278
5295
  };
5296
+ /** The box of each page the selection is on: where a turn keeps what it turned. */
5297
+ const selectionPageBoxes = () => {
5298
+ const boxes = {};
5299
+ for (const { annotation } of annotations.selectedRecords()) {
5300
+ const box = geometry.pageBoxOf(annotation.page.objectNumber);
5301
+ if (box) boxes[annotation.page.objectNumber] = box;
5302
+ }
5303
+ return boxes;
5304
+ };
5279
5305
  /** Commit a selection message; resolves with its outcome over the refs that were selected. */
5280
5306
  const commitOverSelection = async (commit, signal) => {
5281
5307
  return batchResultOf(selectedRefs(), { failed: (await ctx.cancellable(signal, Promise.all(commit().map((committed) => committed.written)))).flatMap((outcome) => outcome.failed) });
@@ -5388,12 +5414,16 @@ function createSelectionWrites(ctx, { store, authority, fonts, behaviors, lendin
5388
5414
  rotateBy: async (degrees, options = {}) => {
5389
5415
  const commit = store.commit({
5390
5416
  type: "rotateSelection",
5391
- degrees
5417
+ degrees,
5418
+ pageBoxes: selectionPageBoxes()
5392
5419
  });
5393
5420
  throwIfFailed(await ctx.cancellable(options.signal, commit.written));
5394
5421
  },
5395
5422
  resetRotation: async (options = {}) => {
5396
- const commit = store.commit({ type: "resetRotation" });
5423
+ const commit = store.commit({
5424
+ type: "resetRotation",
5425
+ pageBoxes: selectionPageBoxes()
5426
+ });
5397
5427
  throwIfFailed(await ctx.cancellable(options.signal, commit.written));
5398
5428
  },
5399
5429
  getAnchor: () => chrome.selectionAnchor(),
@@ -6034,6 +6064,6 @@ const annotationPlugin = (config) => definePlugin({
6034
6064
  create: createAnnotationController
6035
6065
  });
6036
6066
  //#endregion
6037
- export { ANNOTATION_DEFAULTS, ARMED_STAMP_TOOL_ID, AnnotationToken, AnnotationTransfer, DEFAULT_TOOLS, MIN_DRAG, annotationKey, annotationPlugin, annotationState, gesturePlacement, kindNamed, propertiesOf, resolveClickPlacement, widgetAppearanceOf };
6067
+ export { ANNOTATION_DEFAULTS, ARMED_STAMP_TOOL_ID, AnnotationToken, AnnotationTransfer, DEFAULT_TOOLS, MIN_DRAG, annotationKey, annotationPlugin, annotationState, gesturePlacement, kindNamed, orientationPatch, propertiesOf, resolveClickPlacement, widgetAppearanceOf };
6038
6068
 
6039
6069
  //# sourceMappingURL=index.js.map