@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/svelte/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as $ from "svelte/internal/client";
|
|
|
6
6
|
import { setContext, getContext, untrack } from "svelte";
|
|
7
7
|
import { useCapability, usePlugin, useDocumentPermissions, useDocumentState } from "@embedpdf/core/svelte";
|
|
8
8
|
import { useInteractionHandles, deepToRaw, doublePress, CounterRotate } from "@embedpdf/utils/svelte";
|
|
9
|
-
import { PdfAnnotationBorderStyle, PdfVerticalAlignment, textAlignmentToCss, standardFontCss, ignore, PdfErrorCode, boundingRectOrEmpty, blendModeToCss, PdfBlendMode, PdfAnnotationSubtype
|
|
9
|
+
import { PdfAnnotationBorderStyle, PdfVerticalAlignment, textAlignmentToCss, standardFontCss, ignore, PdfErrorCode, boundingRectOrEmpty, blendModeToCss, PdfBlendMode, PdfAnnotationSubtype } from "@embedpdf/models";
|
|
10
10
|
import { usePointerHandlers } from "@embedpdf/plugin-interaction-manager/svelte";
|
|
11
11
|
import { useSelectionCapability } from "@embedpdf/plugin-selection/svelte";
|
|
12
12
|
const REGISTRY_KEY = Symbol("AnnotationRendererRegistry");
|
|
@@ -3789,8 +3789,11 @@ function AnnotationLayer($$anchor, $$props) {
|
|
|
3789
3789
|
return $$props.scale !== void 0 ? $$props.scale : ((_a = documentState == null ? void 0 : documentState.current) == null ? void 0 : _a.scale) ?? 1;
|
|
3790
3790
|
});
|
|
3791
3791
|
const actualRotation = $.derived(() => {
|
|
3792
|
-
var _a;
|
|
3793
|
-
|
|
3792
|
+
var _a, _b;
|
|
3793
|
+
if ($$props.rotation !== void 0) return $$props.rotation;
|
|
3794
|
+
const pageRotation = ((_a = $.get(page)) == null ? void 0 : _a.rotation) ?? 0;
|
|
3795
|
+
const docRotation = ((_b = documentState == null ? void 0 : documentState.current) == null ? void 0 : _b.rotation) ?? 0;
|
|
3796
|
+
return (pageRotation + docRotation) % 4;
|
|
3794
3797
|
});
|
|
3795
3798
|
var div = root();
|
|
3796
3799
|
$.attribute_effect(div, ($0) => ({ id: "annotation-layer", ...$0, ...restProps }), [
|