@embedpdf/plugin-annotation 1.0.20 → 1.0.21
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +2 -57
- package/dist/preact/index.js.map +1 -1
- package/dist/preact/utils.d.ts +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +3 -58
- package/dist/react/index.js.map +1 -1
- package/dist/react/utils.d.ts +1 -0
- package/dist/shared-preact/index.d.ts +1 -0
- package/dist/shared-preact/types.d.ts +1 -1
- package/dist/shared-react/index.d.ts +1 -0
- package/dist/shared-react/types.d.ts +1 -1
- package/package.json +11 -10
- package/dist/shared-preact/components/counter-rotate-container.d.ts +0 -33
- package/dist/shared-react/components/counter-rotate-container.d.ts +0 -33
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@embedpdf/utils/react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rect } from '@embedpdf/models';
|
|
2
2
|
import { TrackedAnnotation } from '../lib/index.ts';
|
|
3
3
|
import { JSX } from '../preact/adapter.ts';
|
|
4
|
-
import { MenuWrapperProps } from '
|
|
4
|
+
import { MenuWrapperProps } from '../preact/utils.ts';
|
|
5
5
|
export type ResizeDirection = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
6
6
|
export interface SelectionMenuProps {
|
|
7
7
|
annotation: TrackedAnnotation;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rect } from '@embedpdf/models';
|
|
2
2
|
import { TrackedAnnotation } from '../lib/index.ts';
|
|
3
3
|
import { JSX } from '../react/adapter.ts';
|
|
4
|
-
import { MenuWrapperProps } from '
|
|
4
|
+
import { MenuWrapperProps } from '../react/utils.ts';
|
|
5
5
|
export type ResizeDirection = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
6
6
|
export interface SelectionMenuProps {
|
|
7
7
|
annotation: TrackedAnnotation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/plugin-annotation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,24 +23,25 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@embedpdf/models": "1.0.
|
|
26
|
+
"@embedpdf/models": "1.0.21",
|
|
27
|
+
"@embedpdf/utils": "1.0.20"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@types/react": "^18.2.0",
|
|
30
31
|
"typescript": "^5.0.0",
|
|
31
|
-
"@embedpdf/
|
|
32
|
-
"@embedpdf/plugin-interaction-manager": "1.0.
|
|
33
|
-
"@embedpdf/plugin-history": "1.0.
|
|
34
|
-
"@embedpdf/
|
|
32
|
+
"@embedpdf/build": "1.0.0",
|
|
33
|
+
"@embedpdf/plugin-interaction-manager": "1.0.21",
|
|
34
|
+
"@embedpdf/plugin-history": "1.0.21",
|
|
35
|
+
"@embedpdf/plugin-selection": "1.0.21"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"react": ">=16.8.0",
|
|
38
39
|
"react-dom": ">=16.8.0",
|
|
39
40
|
"preact": "^10.26.4",
|
|
40
|
-
"@embedpdf/
|
|
41
|
-
"@embedpdf/
|
|
42
|
-
"@embedpdf/plugin-history": "1.0.
|
|
43
|
-
"@embedpdf/plugin-selection": "1.0.
|
|
41
|
+
"@embedpdf/core": "1.0.21",
|
|
42
|
+
"@embedpdf/plugin-interaction-manager": "1.0.21",
|
|
43
|
+
"@embedpdf/plugin-history": "1.0.21",
|
|
44
|
+
"@embedpdf/plugin-selection": "1.0.21"
|
|
44
45
|
},
|
|
45
46
|
"files": [
|
|
46
47
|
"dist",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Rect, Rotation } from '@embedpdf/models';
|
|
2
|
-
import { ReactNode, CSSProperties, PointerEvent, TouchEvent } from '../../preact/adapter.ts';
|
|
3
|
-
interface CounterRotateProps {
|
|
4
|
-
rect: Rect;
|
|
5
|
-
rotation: Rotation;
|
|
6
|
-
}
|
|
7
|
-
interface CounterTransformResult {
|
|
8
|
-
matrix: string;
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Given an already-placed rect (left/top/width/height in px) and the page rotation,
|
|
14
|
-
* return the counter-rotation matrix + adjusted width/height.
|
|
15
|
-
*
|
|
16
|
-
* transform-origin is expected to be "0 0".
|
|
17
|
-
* left/top DO NOT change, apply them as-is.
|
|
18
|
-
*/
|
|
19
|
-
export declare function getCounterRotation(rect: Rect, rotation: Rotation): CounterTransformResult;
|
|
20
|
-
export interface MenuWrapperProps {
|
|
21
|
-
style: CSSProperties;
|
|
22
|
-
onPointerDown: (e: PointerEvent<HTMLDivElement>) => void;
|
|
23
|
-
onTouchStart: (e: TouchEvent<HTMLDivElement>) => void;
|
|
24
|
-
}
|
|
25
|
-
interface CounterRotateComponentProps extends CounterRotateProps {
|
|
26
|
-
children: (props: {
|
|
27
|
-
matrix: string;
|
|
28
|
-
rect: Rect;
|
|
29
|
-
menuWrapperProps: MenuWrapperProps;
|
|
30
|
-
}) => ReactNode;
|
|
31
|
-
}
|
|
32
|
-
export declare function CounterRotate({ children, ...props }: CounterRotateComponentProps): import("preact").JSX.Element;
|
|
33
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Rect, Rotation } from '@embedpdf/models';
|
|
2
|
-
import { ReactNode, CSSProperties, PointerEvent, TouchEvent } from '../../react/adapter.ts';
|
|
3
|
-
interface CounterRotateProps {
|
|
4
|
-
rect: Rect;
|
|
5
|
-
rotation: Rotation;
|
|
6
|
-
}
|
|
7
|
-
interface CounterTransformResult {
|
|
8
|
-
matrix: string;
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Given an already-placed rect (left/top/width/height in px) and the page rotation,
|
|
14
|
-
* return the counter-rotation matrix + adjusted width/height.
|
|
15
|
-
*
|
|
16
|
-
* transform-origin is expected to be "0 0".
|
|
17
|
-
* left/top DO NOT change, apply them as-is.
|
|
18
|
-
*/
|
|
19
|
-
export declare function getCounterRotation(rect: Rect, rotation: Rotation): CounterTransformResult;
|
|
20
|
-
export interface MenuWrapperProps {
|
|
21
|
-
style: CSSProperties;
|
|
22
|
-
onPointerDown: (e: PointerEvent<HTMLDivElement>) => void;
|
|
23
|
-
onTouchStart: (e: TouchEvent<HTMLDivElement>) => void;
|
|
24
|
-
}
|
|
25
|
-
interface CounterRotateComponentProps extends CounterRotateProps {
|
|
26
|
-
children: (props: {
|
|
27
|
-
matrix: string;
|
|
28
|
-
rect: Rect;
|
|
29
|
-
menuWrapperProps: MenuWrapperProps;
|
|
30
|
-
}) => ReactNode;
|
|
31
|
-
}
|
|
32
|
-
export declare function CounterRotate({ children, ...props }: CounterRotateComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
export {};
|