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