@embedpdf/plugin-redaction 1.3.16 → 1.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.
@@ -0,0 +1,14 @@
1
+ import { HTMLAttributes, CSSProperties, MouseEvent, TouchEvent } from '../../react/adapter.ts';
2
+ import { Rect } from '@embedpdf/models';
3
+ type HighlightProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
4
+ color?: string;
5
+ opacity?: number;
6
+ border?: string;
7
+ rects: Rect[];
8
+ rect?: Rect;
9
+ scale: number;
10
+ onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
11
+ style?: CSSProperties;
12
+ };
13
+ export declare function Highlight({ color, opacity, border, rects, rect, scale, onClick, style, ...props }: HighlightProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './redaction-layer';
2
+ export * from './types';
@@ -0,0 +1,13 @@
1
+ interface MarqueeRedactProps {
2
+ /** Index of the page this layer lives on */
3
+ pageIndex: number;
4
+ /** Scale of the page */
5
+ scale: number;
6
+ /** Optional CSS class applied to the marquee rectangle */
7
+ className?: string;
8
+ /** Stroke / fill colours (defaults below) */
9
+ stroke?: string;
10
+ fill?: string;
11
+ }
12
+ export declare const MarqueeRedact: ({ pageIndex, scale, className, stroke, fill, }: MarqueeRedactProps) => import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
@@ -0,0 +1,11 @@
1
+ import { SelectionMenuProps } from './types';
2
+ import { Rotation } from '@embedpdf/models';
3
+ interface PendingRedactionsProps {
4
+ pageIndex: number;
5
+ scale: number;
6
+ rotation: Rotation;
7
+ bboxStroke?: string;
8
+ selectionMenu?: (props: SelectionMenuProps) => JSX.Element;
9
+ }
10
+ export declare function PendingRedactions({ pageIndex, scale, bboxStroke, rotation, selectionMenu, }: PendingRedactionsProps): import("react/jsx-runtime").JSX.Element | null;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import { Rotation } from '@embedpdf/models';
2
+ import { SelectionMenuProps } from './types';
3
+ interface RedactionLayerProps {
4
+ pageIndex: number;
5
+ scale: number;
6
+ rotation: Rotation;
7
+ selectionMenu?: (props: SelectionMenuProps) => JSX.Element;
8
+ }
9
+ export declare const RedactionLayer: ({ pageIndex, scale, rotation, selectionMenu, }: RedactionLayerProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ interface SelectionRedactProps {
2
+ pageIndex: number;
3
+ scale: number;
4
+ }
5
+ export declare function SelectionRedact({ pageIndex, scale }: SelectionRedactProps): import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ import { MenuWrapperProps } from '../../react/utils.ts';
2
+ import { Rect } from '@embedpdf/models';
3
+ import { RedactionItem } from '../../index.ts';
4
+ export interface SelectionMenuProps {
5
+ menuWrapperProps: MenuWrapperProps;
6
+ pageIndex: number;
7
+ item: RedactionItem;
8
+ selected: boolean;
9
+ rect: Rect;
10
+ }
@@ -0,0 +1 @@
1
+ export * from './use-redaction';
@@ -0,0 +1,15 @@
1
+ import { RedactionPlugin, RedactionState } from '../../index.ts';
2
+ export declare const useRedactionPlugin: () => {
3
+ plugin: RedactionPlugin | null;
4
+ isLoading: boolean;
5
+ ready: Promise<void>;
6
+ };
7
+ export declare const useRedactionCapability: () => {
8
+ provides: Readonly<import('../../index.ts').RedactionCapability> | null;
9
+ isLoading: boolean;
10
+ ready: Promise<void>;
11
+ };
12
+ export declare const useRedaction: () => {
13
+ state: RedactionState;
14
+ provides: Readonly<import('../../index.ts').RedactionCapability> | null;
15
+ };
@@ -0,0 +1,3 @@
1
+ export * from './hooks';
2
+ export * from './components';
3
+ export * from '../index.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-redaction",
3
- "version": "1.3.16",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs",
@@ -29,25 +29,25 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@embedpdf/models": "1.3.16",
33
- "@embedpdf/utils": "1.3.16"
32
+ "@embedpdf/models": "1.4.0",
33
+ "@embedpdf/utils": "1.4.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/react": "^18.2.0",
37
37
  "typescript": "^5.0.0",
38
- "@embedpdf/build": "1.0.1",
39
- "@embedpdf/plugin-selection": "1.3.16",
40
- "@embedpdf/plugin-interaction-manager": "1.3.16",
41
- "@embedpdf/core": "1.3.16"
38
+ "@embedpdf/core": "1.4.0",
39
+ "@embedpdf/build": "1.1.0",
40
+ "@embedpdf/plugin-selection": "1.4.0",
41
+ "@embedpdf/plugin-interaction-manager": "1.4.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "preact": "^10.26.4",
45
45
  "react": ">=16.8.0",
46
46
  "react-dom": ">=16.8.0",
47
47
  "vue": ">=3.2.0",
48
- "@embedpdf/core": "1.3.16",
49
- "@embedpdf/plugin-interaction-manager": "1.3.16",
50
- "@embedpdf/plugin-selection": "1.3.16"
48
+ "@embedpdf/core": "1.4.0",
49
+ "@embedpdf/plugin-interaction-manager": "1.4.0",
50
+ "@embedpdf/plugin-selection": "1.4.0"
51
51
  },
52
52
  "files": [
53
53
  "dist",