@embedpdf/plugin-annotation 2.14.0 → 2.14.2

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.
@@ -26,6 +26,18 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
26
26
  style?: CSSProperties;
27
27
  vertexConfig?: VertexConfig<T>;
28
28
  selectionMenu?: AnnotationSelectionMenuRenderFn;
29
+ /**
30
+ * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
31
+ * Threaded into the selection menu context so custom menus can disable move/
32
+ * resize/rotate/delete/property-change items without recomputing flags.
33
+ */
34
+ structurallyLocked?: boolean;
35
+ /**
36
+ * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
37
+ * Threaded into the selection menu context so custom menus can disable content
38
+ * edit items without recomputing flags.
39
+ */
40
+ contentLocked?: boolean;
29
41
  /** @deprecated Use `selectionOutline.offset` instead */
30
42
  outlineOffset?: number;
31
43
  onDoubleClick?: (event: any) => void;
@@ -55,5 +67,5 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
55
67
  * When isMultiSelected is true, the container becomes passive - drag/resize
56
68
  * is handled by the GroupSelectionBox instead.
57
69
  */
58
- export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isEditing, isMultiSelected, isDraggable, isResizable, isRotatable, lockAspectRatio, style, blendMode, vertexConfig, selectionMenu, outlineOffset, onDoubleClick, onSelect, appearance, zIndex, resizeUI, vertexUI, rotationUI, selectionOutlineColor, selectionOutline, customAnnotationRenderer, groupSelectionMenu: _groupSelectionMenu, groupSelectionOutline: _groupSelectionOutline, annotationRenderers: _annotationRenderers, ...props }: AnnotationContainerProps<T>): JSX.Element;
70
+ export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isEditing, isMultiSelected, isDraggable, isResizable, isRotatable, lockAspectRatio, style, blendMode, vertexConfig, selectionMenu, structurallyLocked, contentLocked, outlineOffset, onDoubleClick, onSelect, appearance, zIndex, resizeUI, vertexUI, rotationUI, selectionOutlineColor, selectionOutline, customAnnotationRenderer, groupSelectionMenu: _groupSelectionMenu, groupSelectionOutline: _groupSelectionOutline, annotationRenderers: _annotationRenderers, ...props }: AnnotationContainerProps<T>): JSX.Element;
59
71
  export {};
@@ -8,6 +8,18 @@ export interface AnnotationSelectionContext {
8
8
  type: 'annotation';
9
9
  annotation: TrackedAnnotation;
10
10
  pageIndex: number;
11
+ /**
12
+ * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
13
+ * Consumers should disable move/resize/rotate/delete/property-change menu items
14
+ * when this is true.
15
+ */
16
+ structurallyLocked: boolean;
17
+ /**
18
+ * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
19
+ * Consumers should disable content-editing menu items (e.g. FreeText text edit)
20
+ * when this is true.
21
+ */
22
+ contentLocked: boolean;
11
23
  }
12
24
  export type AnnotationSelectionMenuProps = SelectionMenuPropsBase<AnnotationSelectionContext>;
13
25
  export type AnnotationSelectionMenuRenderFn = SelectionMenuRenderFn<AnnotationSelectionContext>;
@@ -26,6 +26,18 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
26
26
  style?: CSSProperties;
27
27
  vertexConfig?: VertexConfig<T>;
28
28
  selectionMenu?: AnnotationSelectionMenuRenderFn;
29
+ /**
30
+ * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
31
+ * Threaded into the selection menu context so custom menus can disable move/
32
+ * resize/rotate/delete/property-change items without recomputing flags.
33
+ */
34
+ structurallyLocked?: boolean;
35
+ /**
36
+ * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
37
+ * Threaded into the selection menu context so custom menus can disable content
38
+ * edit items without recomputing flags.
39
+ */
40
+ contentLocked?: boolean;
29
41
  /** @deprecated Use `selectionOutline.offset` instead */
30
42
  outlineOffset?: number;
31
43
  onDoubleClick?: (event: any) => void;
@@ -55,5 +67,5 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
55
67
  * When isMultiSelected is true, the container becomes passive - drag/resize
56
68
  * is handled by the GroupSelectionBox instead.
57
69
  */
58
- export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isEditing, isMultiSelected, isDraggable, isResizable, isRotatable, lockAspectRatio, style, blendMode, vertexConfig, selectionMenu, outlineOffset, onDoubleClick, onSelect, appearance, zIndex, resizeUI, vertexUI, rotationUI, selectionOutlineColor, selectionOutline, customAnnotationRenderer, groupSelectionMenu: _groupSelectionMenu, groupSelectionOutline: _groupSelectionOutline, annotationRenderers: _annotationRenderers, ...props }: AnnotationContainerProps<T>): JSX.Element;
70
+ export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isEditing, isMultiSelected, isDraggable, isResizable, isRotatable, lockAspectRatio, style, blendMode, vertexConfig, selectionMenu, structurallyLocked, contentLocked, outlineOffset, onDoubleClick, onSelect, appearance, zIndex, resizeUI, vertexUI, rotationUI, selectionOutlineColor, selectionOutline, customAnnotationRenderer, groupSelectionMenu: _groupSelectionMenu, groupSelectionOutline: _groupSelectionOutline, annotationRenderers: _annotationRenderers, ...props }: AnnotationContainerProps<T>): JSX.Element;
59
71
  export {};
@@ -8,6 +8,18 @@ export interface AnnotationSelectionContext {
8
8
  type: 'annotation';
9
9
  annotation: TrackedAnnotation;
10
10
  pageIndex: number;
11
+ /**
12
+ * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
13
+ * Consumers should disable move/resize/rotate/delete/property-change menu items
14
+ * when this is true.
15
+ */
16
+ structurallyLocked: boolean;
17
+ /**
18
+ * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
19
+ * Consumers should disable content-editing menu items (e.g. FreeText text edit)
20
+ * when this is true.
21
+ */
22
+ contentLocked: boolean;
11
23
  }
12
24
  export type AnnotationSelectionMenuProps = SelectionMenuPropsBase<AnnotationSelectionContext>;
13
25
  export type AnnotationSelectionMenuRenderFn = SelectionMenuRenderFn<AnnotationSelectionContext>;
@@ -26,6 +26,18 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
26
26
  style?: CSSProperties;
27
27
  vertexConfig?: VertexConfig<T>;
28
28
  selectionMenu?: AnnotationSelectionMenuRenderFn;
29
+ /**
30
+ * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
31
+ * Threaded into the selection menu context so custom menus can disable move/
32
+ * resize/rotate/delete/property-change items without recomputing flags.
33
+ */
34
+ structurallyLocked?: boolean;
35
+ /**
36
+ * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
37
+ * Threaded into the selection menu context so custom menus can disable content
38
+ * edit items without recomputing flags.
39
+ */
40
+ contentLocked?: boolean;
29
41
  /** @deprecated Use `selectionOutline.offset` instead */
30
42
  outlineOffset?: number;
31
43
  onDoubleClick?: (event: any) => void;
@@ -55,5 +67,5 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
55
67
  * When isMultiSelected is true, the container becomes passive - drag/resize
56
68
  * is handled by the GroupSelectionBox instead.
57
69
  */
58
- export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isEditing, isMultiSelected, isDraggable, isResizable, isRotatable, lockAspectRatio, style, blendMode, vertexConfig, selectionMenu, outlineOffset, onDoubleClick, onSelect, appearance, zIndex, resizeUI, vertexUI, rotationUI, selectionOutlineColor, selectionOutline, customAnnotationRenderer, groupSelectionMenu: _groupSelectionMenu, groupSelectionOutline: _groupSelectionOutline, annotationRenderers: _annotationRenderers, ...props }: AnnotationContainerProps<T>): JSX.Element;
70
+ export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isEditing, isMultiSelected, isDraggable, isResizable, isRotatable, lockAspectRatio, style, blendMode, vertexConfig, selectionMenu, structurallyLocked, contentLocked, outlineOffset, onDoubleClick, onSelect, appearance, zIndex, resizeUI, vertexUI, rotationUI, selectionOutlineColor, selectionOutline, customAnnotationRenderer, groupSelectionMenu: _groupSelectionMenu, groupSelectionOutline: _groupSelectionOutline, annotationRenderers: _annotationRenderers, ...props }: AnnotationContainerProps<T>): JSX.Element;
59
71
  export {};
@@ -8,6 +8,18 @@ export interface AnnotationSelectionContext {
8
8
  type: 'annotation';
9
9
  annotation: TrackedAnnotation;
10
10
  pageIndex: number;
11
+ /**
12
+ * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
13
+ * Consumers should disable move/resize/rotate/delete/property-change menu items
14
+ * when this is true.
15
+ */
16
+ structurallyLocked: boolean;
17
+ /**
18
+ * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
19
+ * Consumers should disable content-editing menu items (e.g. FreeText text edit)
20
+ * when this is true.
21
+ */
22
+ contentLocked: boolean;
11
23
  }
12
24
  export type AnnotationSelectionMenuProps = SelectionMenuPropsBase<AnnotationSelectionContext>;
13
25
  export type AnnotationSelectionMenuRenderFn = SelectionMenuRenderFn<AnnotationSelectionContext>;
@@ -30,6 +30,18 @@ export interface AnnotationContainerProps<T extends PdfAnnotationObject> {
30
30
  vertexConfig?: VertexConfig<T>;
31
31
  selectionMenu?: AnnotationSelectionMenuRenderFn;
32
32
  selectionMenuSnippet?: Snippet<[AnnotationSelectionMenuProps]>;
33
+ /**
34
+ * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
35
+ * Threaded into the selection menu context so custom menus can disable move/
36
+ * resize/rotate/delete/property-change items without recomputing flags.
37
+ */
38
+ structurallyLocked?: boolean;
39
+ /**
40
+ * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
41
+ * Threaded into the selection menu context so custom menus can disable content
42
+ * edit items without recomputing flags.
43
+ */
44
+ contentLocked?: boolean;
33
45
  /** @deprecated Use `selectionOutline.offset` instead */
34
46
  outlineOffset?: number;
35
47
  onDoubleClick?: (event: any) => void;