@embedpdf/plugin-annotation 2.4.1 → 2.5.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/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +5 -3
- package/dist/preact/index.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +5 -3
- package/dist/react/index.js.map +1 -1
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.js +6 -3
- package/dist/svelte/index.js.map +1 -1
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +5 -3
- package/dist/vue/index.js.map +1 -1
- package/package.json +10 -10
package/dist/react/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export * from "@embedpdf/plugin-annotation";
|
|
|
4
4
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
5
|
import { createContext, useState, useCallback, useContext, useRef, useEffect, useMemo, useLayoutEffect, Fragment as Fragment$1 } from "react";
|
|
6
6
|
import { usePlugin, useCapability, useDocumentPermissions, useDocumentState } from "@embedpdf/core/react";
|
|
7
|
-
import { boundingRectOrEmpty, PdfAnnotationBorderStyle, textAlignmentToCss, standardFontCss, PdfVerticalAlignment, ignore, PdfErrorCode, blendModeToCss, PdfBlendMode, PdfAnnotationSubtype
|
|
7
|
+
import { boundingRectOrEmpty, PdfAnnotationBorderStyle, textAlignmentToCss, standardFontCss, PdfVerticalAlignment, ignore, PdfErrorCode, blendModeToCss, PdfBlendMode, PdfAnnotationSubtype } from "@embedpdf/models";
|
|
8
8
|
import { usePointerHandlers } from "@embedpdf/plugin-interaction-manager/react";
|
|
9
9
|
import { useSelectionCapability } from "@embedpdf/plugin-selection/react";
|
|
10
10
|
import { useInteractionHandles, useDoublePressProps, CounterRotate } from "@embedpdf/utils/react";
|
|
@@ -2475,8 +2475,10 @@ function AnnotationLayer({
|
|
|
2475
2475
|
}, [overrideScale, documentState == null ? void 0 : documentState.scale]);
|
|
2476
2476
|
const actualRotation = useMemo(() => {
|
|
2477
2477
|
if (overrideRotation !== void 0) return overrideRotation;
|
|
2478
|
-
|
|
2479
|
-
|
|
2478
|
+
const pageRotation = (page == null ? void 0 : page.rotation) ?? 0;
|
|
2479
|
+
const docRotation = (documentState == null ? void 0 : documentState.rotation) ?? 0;
|
|
2480
|
+
return (pageRotation + docRotation) % 4;
|
|
2481
|
+
}, [overrideRotation, page == null ? void 0 : page.rotation, documentState == null ? void 0 : documentState.rotation]);
|
|
2480
2482
|
return /* @__PURE__ */ jsxs(
|
|
2481
2483
|
"div",
|
|
2482
2484
|
{
|