page-annotation 0.1.0-alpha.0 → 0.1.0-alpha.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.
package/README.md CHANGED
@@ -47,4 +47,15 @@ document.querySelector("#feedback")?.addEventListener("click", () => {
47
47
  });
48
48
  ```
49
49
 
50
+ ## Privacy Controls
51
+
52
+ Mark regions that should never appear in screenshots:
53
+
54
+ ```html
55
+ <div data-page-annotation-ignore>Hidden from capture</div>
56
+ <div data-page-annotation-redact>Masked in capture</div>
57
+ ```
58
+
59
+ `data-pa-ignore` and `data-pa-redact` are supported as shorter aliases. Hosts can also pass `capture.ignoreSelectors`, `capture.redactSelectors`, `beforeExport`, and `captureProvider` for stricter app-specific policy.
60
+
50
61
  Screenshots can contain sensitive application data. The package never uploads screenshots automatically; host applications own authorization, consent, storage, retention, and auditing.
@@ -1,3 +1,2 @@
1
1
  import type { PageAnnotator, PageAnnotatorOptions } from "./types";
2
2
  export declare function createAnnotator(options?: PageAnnotatorOptions): PageAnnotator;
3
- //# sourceMappingURL=annotator.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export declare function containsUnsupportedColorFunction(value: string): boolean;
2
2
  export declare function sanitizeUnsupportedColors(root: HTMLElement): void;
3
- //# sourceMappingURL=color-sanitizer.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { CaptureOptions, CapturedPage } from "../types";
2
2
  export declare function captureVisibleViewport(target: HTMLElement, options: CaptureOptions): Promise<CapturedPage>;
3
- //# sourceMappingURL=dom-capture.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { AnnotationExport } from "./types";
2
2
  export declare function canCopyExportToClipboard(): boolean;
3
3
  export declare function copyExportToClipboard(result: AnnotationExport): Promise<void>;
4
- //# sourceMappingURL=clipboard.d.ts.map
@@ -3,4 +3,3 @@ export declare const defaultTools: AnnotationTool[];
3
3
  export declare const defaultLabels: PageAnnotatorLabels;
4
4
  export declare const defaultColor = "#ef4444";
5
5
  export declare const defaultStrokeWidth = 4;
6
- //# sourceMappingURL=defaults.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { AnnotationExport } from "./types";
2
2
  export declare function downloadExport(result: AnnotationExport): void;
3
- //# sourceMappingURL=download.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { AnnotationDocument } from "../types";
2
2
  export declare function composePng(pageCanvas: HTMLCanvasElement, annotations: AnnotationDocument): Promise<Blob>;
3
- //# sourceMappingURL=compose.d.ts.map
@@ -6,4 +6,3 @@ export declare function normalizeRectangle(x: number, y: number, width: number,
6
6
  height: number;
7
7
  };
8
8
  export declare function hitTest(annotation: AnnotationItem, point: AnnotationPoint, tolerance?: number): boolean;
9
- //# sourceMappingURL=geometry.d.ts.map
package/dist/icons.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export type ToolbarIconName = "arrow" | "close" | "copy" | "download" | "eraser" | "move" | "pen" | "rectangle" | "redo" | "send" | "text" | "trash" | "undo";
2
2
  export declare function iconSvg(name: ToolbarIconName): string;
3
3
  export declare function createIcon(name: ToolbarIconName): HTMLSpanElement;
4
- //# sourceMappingURL=icons.d.ts.map
package/dist/id.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export declare function annotationId(prefix?: string): string;
2
- //# sourceMappingURL=id.d.ts.map
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { createAnnotator } from "./annotator";
3
3
  export { canCopyExportToClipboard, copyExportToClipboard } from "./clipboard";
4
4
  export { downloadExport } from "./download";
5
5
  export { iconSvg } from "./icons";
6
+ export { assertAnnotationDocument, isAnnotationDocument, parseAnnotationDocument } from "./schema";
6
7
  export { AnnotationStore } from "./store";
7
- export type { AnnotationDocument, AnnotationExport, AnnotationItem, AnnotationPoint, AnnotationTool, CaptureOptions, CaptureProvider, PageAnnotator, PageAnnotatorLabels, PageAnnotatorLauncherOffset, PageAnnotatorLauncherOptions, PageAnnotatorLauncherPosition, PageAnnotatorOptions } from "./types";
8
+ export type { AnnotationDocument, AnnotationDocumentParseResult, AnnotationExport, AnnotationExportRequest, AnnotationItem, AnnotationPageMetadata, AnnotationPoint, AnnotationTool, CaptureOptions, CaptureProvider, PageAnnotator, PageAnnotatorLabels, PageAnnotatorLauncherOffset, PageAnnotatorLauncherOptions, PageAnnotatorLauncherPosition, PageAnnotatorOptions } from "./types";
8
9
  export type { ToolbarIconName } from "./icons";
9
- //# sourceMappingURL=index.d.ts.map