# @embedpdf/angular — ./annotation ANNOTATION_DEFAULTS [VariableDeclaration] (from packages/plugin/annotation/src/contract.ts): ANNOTATION_DEFAULTS: AnnotationSettings ={ tools: [], afterCreate:{ select: true, tool: 'stay', editText: true} , chrome:{ accent: null, outline:{ color: null, style: 'solid', width: 1} , handles:{ shape: 'square', size: 8, hitSize: 24, fill: '#ffffff', stroke: null} , rotationHandle:{ enabled: true, size: 10, hitSize: 24, offset: 32, stalk: true, fill: null, stroke: null, } , guides:{ enabled: true, color: '#e91e63', rotationColor: null, style: 'solid', width: 1.5} , marquee:{ fill: null, stroke: null} , textOutline: null, readout:{ enabled: true, background: 'rgb(0 0 0 / 0.8)', color: '#ffffff'} , } , snap:{ alignment: true, alignmentThresholdPx: 6, rotation: true, rotationAngles: [0, 90, 180, 270], rotationThresholdDeg: 4, } , editable: true, } ARMED_STAMP_TOOL_ID [VariableDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): ARMED_STAMP_TOOL_ID = 'stamp' AfterCreateSettings [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AfterCreateSettings{ readonly select: boolean; readonly tool: 'stay' | 'default'; readonly editText: boolean; } Annotation [TypeAliasDeclaration] (from packages/engine/core/src/annotation/kinds/declarations.ts): export type Annotation = ReadOf; AnnotationAnchor [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationAnchor{ readonly page: PageRef; readonly bounds: Rect; readonly boundsIn?: (view: ViewEnv) => Rect | null; } AnnotationBehaviorRenderer [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface AnnotationBehaviorRenderer{ readonly behavior: string; } AnnotationBundle [InterfaceDeclaration] (from packages/engine/core/src/transfer/AnnotationBundle.ts): export interface AnnotationBundle{ readonly format: 'embedpdf/annotations'; readonly version: 1; readonly pages: readonly BundlePage[]; readonly items: readonly AnnotationBundleItem[]; readonly resources: Readonly>; } AnnotationCapability [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationCapability extends SettingsApi{ get(ref: AnnotationRef): Annotation | null; list(filter?: AnnotationFilter): readonly Annotation[]; getAt(page: PageRef | number, point: Point): Annotation | null; isPending(ref: AnnotationRef): boolean; getStatus(): ResourceStatus; getHovered(): Annotation | null; refresh(options?: OperationOptions): Promise; create( page: PageRef | number, draft: AnnotationDraft | Annotation, resources?: AnnotationResources, options?: OperationOptions &{ tool?: string; select?: boolean} , ): Promise<{ annotation: Annotation} >; createFromSelection( tool: string, options?: OperationOptions &{ clear?: boolean} , ): Promise<{ annotations: readonly Annotation[]} >; update( ref: AnnotationRef, patch: AnnotationPatch, resources?: AnnotationResources, options?: OperationOptions, ): Promise<{ annotation: Annotation} >; delete(ref: AnnotationRef, options?: OperationOptions): Promise; reorder( refs: readonly AnnotationRef[], position: AnnotationPosition, options?: OperationOptions, ): Promise; duplicate( refs: readonly AnnotationRef[], options?: AnnotationDuplicateOptions & OperationOptions, ): Promise; export( selection?: AnnotationExportSelection, options?: OperationOptions, ): Promise; import( bundle: AnnotationBundle, options?: AnnotationImportOptions & OperationOptions & HistoryOptions, ): Promise; downloadResource( ref: AnnotationRef, role: AnnotationResourceRole, options?: OperationOptions, ): Promise; readonly links: AnnotationLinksCapability; readonly selection: AnnotationSelectionCapability; readonly draft: AnnotationDraftCapability; readonly text: AnnotationTextCapability; readonly tools: AnnotationToolsCapability; readonly stamps: AnnotationStampsCapability; readonly comments: CommentsCapability; setFilePickerProvider(provider: FilePickerProvider | null): Unsubscribe; canRead(): boolean; canCreate(): boolean; canUpdate(ref: AnnotationRef): boolean; canDelete(ref: AnnotationRef): boolean; canDuplicate(refs: readonly AnnotationRef[]): boolean; isEditable(ref: AnnotationRef): boolean; isMovable(ref: AnnotationRef): boolean; cancel(): void; readonly onCreated: EventHook; readonly onUpdated: EventHook; readonly onDeleted: EventHook; readonly onReordered: EventHook; readonly onResynced: EventHook; readonly onWriteFailed: EventHook; readonly onSelectionChanged: EventHook; readonly onDraftChanged: EventHook; readonly onEditingChanged: EventHook; readonly onHoverChanged: EventHook; } AnnotationConfig [TypeAliasDeclaration] (from packages/plugin/annotation/src/contract.ts): export type AnnotationConfig = DeepPartial; AnnotationCreatedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationCreatedEvent{ readonly annotation: Annotation; readonly origin: EventOrigin; } AnnotationDeletedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationDeletedEvent{ readonly refs: readonly AnnotationRef[]; readonly page: PageRef; readonly origin: EventOrigin; } AnnotationDraft [TypeAliasDeclaration] (from packages/engine/core/src/annotation/kinds/declarations.ts): export type AnnotationDraft = CreateOf< WritableAnnotationDeclaration, C >; AnnotationDraftCapability [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationDraftCapability{ get(): CreationDraft | null; finish(options?: OperationOptions): Promise<{ annotation: Annotation} | null>; cancel(): void; } AnnotationDraftChangedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationDraftChangedEvent{ readonly draft: CreationDraft | null; } AnnotationDuplicateOptions [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationDuplicateOptions{ readonly page?: PageRef | number; readonly offset?:{ readonly x: number; readonly y: number} ; readonly select?: boolean; } AnnotationDuplicateResult [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationDuplicateResult{ readonly annotations: readonly Annotation[]; readonly dropped: readonly AnnotationImportDrop[]; } AnnotationEditingChangedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationEditingChangedEvent{ readonly ref: AnnotationRef | null; } AnnotationExportSelection [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationExportSelection{ readonly refs?: readonly AnnotationRef[]; readonly pages?: readonly (PageRef | number)[]; } AnnotationFilter [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationFilter{ readonly pages?: readonly (PageRef | number)[]; readonly subtype?: AnnotationSubtype; } AnnotationFlags [InterfaceDeclaration] (from packages/engine/core/src/annotation/primitives.ts): export interface AnnotationFlags{ invisible: boolean; hidden: boolean; print: boolean; noZoom: boolean; noRotate: boolean; noView: boolean; readOnly: boolean; locked: boolean; toggleNoView: boolean; lockedContents: boolean; } AnnotationFrame [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface AnnotationFrame{ readonly width: number; readonly height: number; readonly rotation: number; readonly scale: number; } AnnotationHoverChangedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationHoverChangedEvent{ readonly ref: AnnotationRef | null; } AnnotationImportDrop [InterfaceDeclaration] (from packages/engine/core/src/transfer/annotationImport.ts): export interface AnnotationImportDrop{ readonly ref: AnnotationRef; readonly field?: string; readonly reason: AnnotationDropReason; } AnnotationImportOptions [InterfaceDeclaration] (from packages/engine/core/src/transfer/annotationImport.ts): export interface AnnotationImportOptions extends WriteOptions{ readonly pages?: BundleImportPages; readonly attribution?: 'restore' | 'stamp'; } AnnotationImportResult [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationImportResult{ readonly annotations: readonly Annotation[]; readonly refMap: ReadonlyArray<{ readonly from: AnnotationRef; readonly to: AnnotationRef} >; readonly dropped: readonly AnnotationImportDrop[]; } AnnotationInteractive [TypeAliasDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export type AnnotationInteractive = boolean | ((context: AnnotationInteractiveContext) => boolean); AnnotationInteractiveContext [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface AnnotationInteractiveContext{ readonly annotation: Annotation; readonly toolId: string; } AnnotationLinksCapability [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationLinksCapability{ get(ref: AnnotationRef): PdfLinkTarget | null; set(ref: AnnotationRef, target: PdfLinkTarget, options?: OperationOptions): Promise; clear(ref: AnnotationRef, options?: OperationOptions): Promise; } AnnotationLookRenderer [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface AnnotationLookRenderer{ readonly for: (annotation: Annotation) => boolean; readonly interactive: AnnotationInteractive; readonly scale: boolean; } AnnotationMatch [TypeAliasDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export type AnnotationMatch = ((annotation: Annotation) => boolean) | AnnotationSubtype; AnnotationOption [InterfaceDeclaration] (from packages/core/annotation/src/kinds/define.ts): export interface AnnotationOption{ readonly value: string; readonly label: string; readonly labelKey: string; } AnnotationPatch [TypeAliasDeclaration] (from packages/engine/core/src/annotation/kinds/declarations.ts): export type AnnotationPatch = UpdateOf< WritableAnnotationDeclaration, C >; AnnotationPosition [TypeAliasDeclaration] (from packages/engine/core/src/mutation/ListPosition.ts): export type AnnotationPosition = ListPosition; AnnotationProperties [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationProperties{ readonly properties: readonly AnnotationProperty[]; readonly values: FieldValues; readonly mixed: readonly string[]; } AnnotationProperty [TypeAliasDeclaration] (from packages/core/annotation/src/kinds/define.ts): export type AnnotationProperty = |{ readonly key: 'color' | 'interiorColor' | 'fontColor'; readonly control: 'color'; readonly label: string; readonly labelKey: string; readonly allowsNone?: boolean; } |{ readonly key: 'opacity' | 'strokeWidth' | 'fontSize'; readonly control: 'number'; readonly label: string; readonly labelKey: string; readonly min: number; readonly max: number; readonly step: number; } |{ readonly key: 'borderStyle'; readonly control: 'choice'; readonly label: string; readonly labelKey: string; readonly options: readonly AnnotationOption[]; readonly cloudy: boolean; } |{ readonly key: 'lineEndings' | 'fontFamily' | 'textAlign' | 'blendMode' | 'icon' | 'subtype'; readonly control: 'choice'; readonly label: string; readonly labelKey: string; readonly options: readonly AnnotationOption[]; } |{ readonly key: 'orientation'; readonly control: 'choice'; readonly label: string; readonly labelKey: string; readonly options: readonly AnnotationOption[]; } |{ readonly key: FlagKey; readonly control: 'flag'; readonly label: string; readonly labelKey: string; } |{ readonly key: 'overlayText'; readonly control: 'text'; readonly label: string; readonly labelKey: string; } |{ readonly key: 'bold' | 'italic' | 'underline'; readonly control: 'textFormat'; readonly label: string; readonly labelKey: string; readonly format: 'bold' | 'italic' | 'underline'; } |{ readonly key: 'link'; readonly control: 'link'; readonly label: string; readonly labelKey: string; } ; AnnotationRef [TypeAliasDeclaration] (from packages/engine/core/src/identity/AnnotationRef.ts): export type AnnotationRef = |{ kind: 'objectNumber'; page: PageRef; objectNumber: number; } |{ kind: 'baseIndex'; page: PageRef; baseIndex: number; } ; AnnotationRendererEntry [TypeAliasDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export type AnnotationRendererEntry = AnnotationLookRenderer | AnnotationBehaviorRenderer; AnnotationReorderedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationReorderedEvent{ readonly page: PageRef; readonly order: readonly AnnotationRef[]; readonly origin: EventOrigin; } AnnotationResourceRole [TypeAliasDeclaration] (from packages/engine/core/src/annotation/resources.ts): export type AnnotationResourceRole = (typeof ANNOTATION_RESOURCE_ROLE_NAMES)[number]; AnnotationResources [TypeAliasDeclaration] (from packages/engine/core/src/annotation/resources.ts): export type AnnotationResources = Partial>; AnnotationResyncedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationResyncedEvent{ readonly pages: readonly PageRef[] | 'all'; } AnnotationRotationAnchor [TypeAliasDeclaration] (from packages/plugin/annotation/src/contract.ts): export type AnnotationRotationAnchor = RotationAnchor; AnnotationSelectionAnchor [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationSelectionAnchor{ readonly page: PageRef; readonly bounds: Rect; readonly rotationHandle?: Point; } AnnotationSelectionCapability [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationSelectionCapability{ select(refs: readonly AnnotationRef[]): void; add(refs: readonly AnnotationRef[]): void; selectAll(page?: PageRef | number): void; selectInRect(page: PageRef | number, rect: Rect): void; clear(): void; getSelected(): readonly Annotation[]; update( changes: AnnotationPatch | ((annotation: Annotation) => AnnotationPatch), options?: OperationOptions, ): Promise>; updateLink( target: PdfLinkTarget | null, options?: OperationOptions, ): Promise>; getProperties(): AnnotationProperties; delete(options?: OperationOptions): Promise>; rotateBy(degrees: 90 | -90, options?: OperationOptions): Promise; resetRotation(options?: OperationOptions): Promise; group(options?: OperationOptions): Promise; ungroup(options?: OperationOptions): Promise; canGroup(): boolean; canUngroup(): boolean; duplicate( options?: OperationOptions &{ offset?:{ readonly x: number; readonly y: number} } , ): Promise; canDuplicate(): boolean; getAnchor(): AnnotationSelectionAnchor | null; getRotationAnchor(): AnnotationRotationAnchor | null; } AnnotationSelectionChangedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationSelectionChangedEvent{ readonly refs: readonly AnnotationRef[]; readonly previousRefs: readonly AnnotationRef[]; } AnnotationSettings [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationSettings{ readonly tools: readonly AnnotationToolInput[]; readonly afterCreate: AfterCreateSettings; readonly chrome: ChromeSettings; readonly snap: SnapSettings; readonly editable: EditableKinds; } AnnotationStampsCapability [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationStampsCapability{ arm(stamp: StampInput, options?: OperationOptions): Promise; disarm(): void; isArmed(): boolean; place( stamp: StampInput, placement: StampPlacement, options?: OperationOptions, ): Promise<{ annotation: Annotation} >; } AnnotationState [InterfaceDeclaration] (from packages/plugin/annotation/src/state.ts): export interface AnnotationState{ readonly status: ResourceStatus; readonly selected: readonly Annotation[]; readonly hovered: Annotation | null; readonly editing: Annotation | null; } AnnotationSubtype [TypeAliasDeclaration] (from packages/engine/core/src/annotation/subtype.ts): export type AnnotationSubtype = (typeof ANNOTATION_SUBTYPES)[number]; AnnotationTextCapability [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationTextCapability{ begin(ref: AnnotationRef): void; end(options?: OperationOptions): Promise; getEditing(): Annotation | null; toggleFormat(format: TextFormat, options?: OperationOptions): Promise; } AnnotationToken [VariableDeclaration] (from packages/plugin/annotation/src/token.ts): AnnotationToken = createCapabilityToken('annotation', { hint: `add annotationPlugin() from '@embedpdf/plugin-annotation' to your plugins list`, promises:{ refresh: true, create: true, createFromSelection: true, update: true, delete: true, reorder: true, duplicate: true, export: true, import: true, downloadResource: true, 'links.set': true, 'links.clear': true, 'selection.update': true, 'selection.updateLink': true, 'selection.delete': true, 'selection.rotateBy': true, 'selection.resetRotation': true, 'selection.group': true, 'selection.ungroup': true, 'selection.duplicate': true, 'draft.finish': true, 'text.end': true, 'text.toggleFormat': true, 'stamps.arm': true, 'stamps.place': true, 'comments.reply': true, 'comments.setText': true, 'comments.setStatus': true, 'comments.setMarked': true, 'comments.delete': true, 'comments.deleteThread': true, } , } ) AnnotationTool [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationTool{ readonly id: string; readonly subtype: KindName; readonly preset: string; readonly cursor: string; readonly enables: readonly string[]; readonly defaults?: FieldValues; readonly ghost: ResolvedGhost; readonly meta?: Readonly>; } AnnotationToolDefinition [InterfaceDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export interface AnnotationToolDefinition{ id: string; extends?: string; subtype?: KindName; fieldsKind?: string; preset?: string; defaults?: ToolDefaultsFor; flags?: Partial; cursor?: string; enables?: string[]; source?: K extends 'stamp' ? StampSourceSpec : K extends 'file-attachment' ? PromptSourceSpec : never; selection?: SelectionAuthoring; ink?: K extends 'ink' ? InkAuthoringOptions : never; upright?: boolean; clickCreate?: ClickCreate | false; ghost?: GhostPolicy; afterCreate?: Partial; meta?: Record; } AnnotationToolInput [TypeAliasDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export type AnnotationToolInput = DirectToolDef | BuiltinToolOverride | ExtendedBuiltinToolDef; AnnotationToolsCapability [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationToolsCapability{ list(): readonly AnnotationTool[]; get(id: string): AnnotationTool | null; register(tool: AnnotationToolInput): Unsubscribe; getDefaults(id: string): ToolDefaults; updateDefaults(id: string, changes: FieldValues): void; getProperties(id: string): AnnotationProperties; readonly onDefaultsChanged: EventHook; } AnnotationTransfer [VariableDeclaration] (from packages/engine/core/src/transfer/AnnotationTransfer.ts): AnnotationTransfer = bundleCodec({ kind: 'annotation', keys: ANNOTATION_BUNDLE_KEYS, assertManifest: assertAnnotationBundleManifest, } ) AnnotationUpdatedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationUpdatedEvent{ readonly annotation: Annotation; readonly origin: EventOrigin; } AnnotationWriteFailedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface AnnotationWriteFailedEvent{ readonly refs: readonly AnnotationRef[]; readonly error: PluginErrorInfo; } ArmedStampInfo [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface ArmedStampInfo{ readonly width: number; readonly height: number; readonly name?: string; readonly subject?: string; } ArmedStampPreview [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface ArmedStampPreview{ readonly bytes: Uint8Array; readonly mimeType?: string; } AttachmentContent [InterfaceDeclaration] (from packages/engine/core/src/dto/Attachment.ts): export interface AttachmentContent{ bytes: Uint8Array; name: string; mimeType: string | null; } AttachmentFileSource [InterfaceDeclaration] (from packages/engine/core/src/dto/Attachment.ts): export interface AttachmentFileSource{ data: Uint8Array | ArrayBuffer | Blob; name?: string; mimeType?: string; description?: string; } Behavior [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface Behavior{ readonly id: string; matches(annotation: Annotation): boolean; engaged(annotation: Annotation): boolean; } BlendMode [TypeAliasDeclaration] (from packages/engine/core/src/annotation/primitives.ts): export type BlendMode = | 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity'; ChromeSettings [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface ChromeSettings{ readonly accent: string | null; readonly outline:{ readonly color: string | null; readonly style: LineStyle; readonly width: number; } ; readonly handles:{ readonly shape: 'square' | 'circle'; readonly size: number; readonly hitSize: number; readonly fill: string; readonly stroke: string | null; } ; readonly rotationHandle:{ readonly enabled: boolean; readonly size: number; readonly hitSize: number; readonly offset: number; readonly stalk: boolean; readonly fill: string | null; readonly stroke: string | null; } ; readonly guides:{ readonly enabled: boolean; readonly color: string; readonly rotationColor: string | null; readonly style: LineStyle; readonly width: number; } ; readonly marquee:{ readonly fill: string | null; readonly stroke: string | null; } ; readonly textOutline: string | null; readonly readout:{ readonly enabled: boolean; readonly background: string; readonly color: string; } ; } ClickCreate [TypeAliasDeclaration] (from packages/core/annotation/src/types.ts): export type ClickCreate = |{ width: number; height: number; anchor?: 'center' | 'top-left'} |{ length: number; rotation?: number; anchor?: 'center' | 'start' | 'end'} ; Color [TypeAliasDeclaration] (from packages/engine/core/src/annotation/primitives.ts): export type Color = string; CommentThread [InterfaceDeclaration] (from packages/engine/core/src/annotation/comments.ts): export interface CommentThread{ root: T; page: PageRef; replies: T[]; groupedParts: T[]; review: CommentThreadReview; } CommentThreadChangedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface CommentThreadChangedEvent{ readonly rootRef: AnnotationRef; readonly type: 'reply' | 'text' | 'status' | 'marked' | 'deleted'; } CommentThreadReview [InterfaceDeclaration] (from packages/engine/core/src/annotation/comments.ts): export interface CommentThreadReview{ byReviewer: Record; lastChange: ReviewStatus | null; markedBy: string[]; statusRefs: AnnotationRef[]; mine: ReviewStatus | null; } CommentThreadView [InterfaceDeclaration] (from packages/framework/angular/annotation/src/comments.ts): export interface CommentThreadView extends CommentThread{ pageIndex: number; pageLabel: string; } CommentsCapability [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface CommentsCapability{ listThreads(): readonly CommentThread[]; getThread(ref: AnnotationRef): CommentThread | null; reply( ref: AnnotationRef, text: string, options?: OperationOptions, ): Promise<{ annotation: Annotation} >; setText(ref: AnnotationRef, text: string, options?: OperationOptions): Promise; setStatus(ref: AnnotationRef, state: string, options?: OperationOptions): Promise; setMarked(ref: AnnotationRef, marked: boolean, options?: OperationOptions): Promise; delete(ref: AnnotationRef, options?: OperationOptions): Promise; deleteThread(ref: AnnotationRef, options?: OperationOptions): Promise; canReply(ref: AnnotationRef): boolean; canSetText(ref: AnnotationRef): boolean; canSetStatus(ref: AnnotationRef): boolean; canSetMarked(ref: AnnotationRef): boolean; canDelete(ref: AnnotationRef): boolean; canDeleteThread(ref: AnnotationRef): boolean; readonly onThreadChanged: EventHook; } CreationDraft [TypeAliasDeclaration] (from packages/plugin/annotation/src/contract.ts): export type CreationDraft = CreationDraftAnchor; CreationDraftAnchor [InterfaceDeclaration] (from packages/core/annotation/src/types.ts): export interface CreationDraftAnchor{ kind: 'poly'; subtype: PolySubtype; page: PageRef; bounds: Rect; pointCount: number; minPoints: number; canFinish: boolean; } DEFAULT_TOOLS [VariableDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): DEFAULT_TOOLS: AnnotationToolInput[] = [{ id: 'square', subtype: 'square', cursor: 'crosshair', enables: DRAW_TAGS, defaults:{ color: HOUSE_RED, strokeWidth: 6} , clickCreate:{ width: 80, height: 60} , upright: true, } , { id: 'circle', subtype: 'circle', cursor: 'crosshair', enables: DRAW_TAGS, defaults:{ color: HOUSE_RED, strokeWidth: 6} , clickCreate:{ width: 80, height: 60} , upright: true, } , { id: 'line', subtype: 'line', cursor: 'crosshair', enables: DRAW_TAGS, defaults:{ color: HOUSE_RED, strokeWidth: 6} , clickCreate:{ length: 80} , upright: true, } , { id: 'distance', extends: 'line', clickCreate: false, defaults:{ intent: 'line-dimension', strokeWidth: 1, lineEndings:{ start: 'closed-arrow', end: 'closed-arrow'} , captionEnabled: true, captionPosition: 'inline', leader:{ length: 12, extension: 5, offset: 0} , } , } , { id: 'calibrate', extends: 'line', enables: ['annotation-draw'], defaults:{ strokeWidth: 1} , clickCreate: false, } , { id: 'polygon', subtype: 'polygon', cursor: 'crosshair', enables: DRAW_TAGS, defaults:{ color: HOUSE_RED, strokeWidth: 6} , } , { id: 'polyline', subtype: 'polyline', cursor: 'crosshair', enables: DRAW_TAGS, defaults:{ color: HOUSE_RED, strokeWidth: 6} , } , { id: 'perimeter', extends: 'polyline', defaults:{ intent: 'polyline-dimension', strokeWidth: 1, lineEndings:{ start: 'none', end: 'none'} , captionEnabled: true, } , } , { id: 'area', extends: 'polygon', defaults:{ intent: 'polygon-dimension', strokeWidth: 1, captionEnabled: true} , } , { id: 'ink', subtype: 'ink', cursor: 'crosshair', enables: DRAW_TAGS, defaults:{ color: '#ef4444', strokeWidth: 6, blendMode: 'normal'} , ink:{ groupStrokesMs: 800} , } , { id: 'ink-highlight', extends: 'ink', defaults:{ intent: 'ink-highlight', color: '#ffcd45', strokeWidth: 14, blendMode: 'multiply'} , ink:{ straighten:{ deviationThreshold: 0.15, axisSnapDegrees: 15} , } , } , { id: 'free-text', subtype: 'free-text', cursor: 'crosshair', enables: DRAW_TAGS, defaults:{ color: HOUSE_RED, strokeWidth: 2, fontColor: '#ef4444'} , upright: true, clickCreate:{ width: 180, height: 40, anchor: 'top-left'} , } , { id: 'free-text-callout', subtype: 'free-text-callout', cursor: 'crosshair', enables: DRAW_TAGS, defaults:{ color: HOUSE_RED, strokeWidth: 6, lineEnding: 'open-arrow'} , upright: true, } , { id: 'highlight', subtype: 'highlight', cursor: 'default', enables: MARKUP_TAGS, defaults:{ color: '#ffe16a', blendMode: 'multiply'} , selection:{ kind: 'markup'} , } , { id: 'redact', subtype: 'redact', cursor: 'crosshair', enables: ['text-select', 'annotation-draw', 'annotation-edit'], defaults:{ color: '#e44234', interiorColor: '#000000', fontSize: 14, fontColor: '#ffffff', opacity: 1, } , selection:{ kind: 'markup'} , } , { id: 'underline', subtype: 'underline', cursor: 'default', enables: MARKUP_TAGS, defaults:{ color: '#ef4444'} , selection:{ kind: 'markup'} , } , { id: 'strikeout', subtype: 'strikeout', cursor: 'default', enables: MARKUP_TAGS, defaults:{ color: '#ef4444'} , selection:{ kind: 'markup'} , } , { id: 'squiggly', subtype: 'squiggly', cursor: 'default', enables: MARKUP_TAGS, defaults:{ color: '#ef4444'} , selection:{ kind: 'markup'} , } , { id: 'insert-text', subtype: 'caret', fieldsKind: 'caret', preset: 'caret', cursor: 'default', enables: MARKUP_TAGS, defaults:{ color: '#ef4444'} , selection:{ kind: 'text-edit', operation: 'insert'} , } , { id: 'replace-text', subtype: 'strikeout', fieldsKind: 'strikeout', cursor: 'default', enables: MARKUP_TAGS, defaults:{ color: '#ef4444'} , selection:{ kind: 'text-edit', operation: 'replace'} , } , { id: ARMED_STAMP_TOOL_ID, subtype: 'stamp', cursor: 'copy', enables: ['annotation-place', 'annotation-edit'], source:{ kind: 'prompt', accept: 'image/png, image/jpeg, application/pdf'} , upright: true, ghost: true, } , { id: 'link', subtype: 'link', cursor: 'crosshair', enables: DRAW_TAGS, } , { id: 'note', subtype: 'text', cursor: 'crosshair', enables: ['annotation-place', 'annotation-edit'], defaults:{ icon: 'comment', color: '#facc15'} , flags:{ noZoom: true, noRotate: true} , upright: true, ghost: true, } , { id: 'attachment', subtype: 'file-attachment', cursor: 'crosshair', enables: ['annotation-place', 'annotation-edit'], source:{ kind: 'prompt'} , defaults:{ icon: 'paperclip', color: '#facc15'} , flags:{ noZoom: true, noRotate: true} , upright: true, ghost: true, } , ] EditableKind [TypeAliasDeclaration] (from packages/core/annotation/src/editable.ts): export type EditableKind = AnnotationSubtype | MeasurementIntent; EditableKinds [TypeAliasDeclaration] (from packages/core/annotation/src/editable.ts): export type EditableKinds = boolean | readonly EditableKind[]; EpdfAnnotation [ClassDeclaration] (from packages/framework/angular/annotation/src/annotation.ts): @Injectable({ providedIn: 'root'} ) export class EpdfAnnotation extends pluginService({ name: 'EpdfAnnotation', feature: 'withAnnotation()', token: AnnotationToken, state: annotationState, methods: [ 'get', 'list', 'getAt', 'isPending', 'getStatus', 'getHovered', 'refresh', 'create', 'createFromSelection', 'update', 'delete', 'reorder', 'duplicate', 'export', 'import', 'downloadResource', 'setFilePickerProvider', 'canRead', 'canCreate', 'canUpdate', 'canDelete', 'canDuplicate', 'isMovable', 'isEditable', 'cancel', ], events: [ 'onCreated', 'onUpdated', 'onDeleted', 'onReordered', 'onResynced', 'onWriteFailed', 'onSelectionChanged', 'onDraftChanged', 'onEditingChanged', 'onHoverChanged', ], } ){ private readonly host = new CapabilityBinding( this.binding.host, () => AnnotationHostToken, injectDocumentScope(), ); readonly selection: EpdfAnnotationSelection ={ select: this.binding.namespaceMethod('selection', 'select'), add: this.binding.namespaceMethod('selection', 'add'), selectAll: this.binding.namespaceMethod('selection', 'selectAll'), selectInRect: this.binding.namespaceMethod('selection', 'selectInRect'), clear: this.binding.namespaceMethod('selection', 'clear'), getSelected: this.binding.namespaceMethod('selection', 'getSelected'), update: this.binding.namespaceMethod('selection', 'update'), updateLink: this.binding.namespaceMethod('selection', 'updateLink'), getProperties: this.binding.namespaceMethod('selection', 'getProperties'), delete: this.binding.namespaceMethod('selection', 'delete'), rotateBy: this.binding.namespaceMethod('selection', 'rotateBy'), resetRotation: this.binding.namespaceMethod('selection', 'resetRotation'), group: this.binding.namespaceMethod('selection', 'group'), ungroup: this.binding.namespaceMethod('selection', 'ungroup'), canGroup: this.binding.namespaceMethod('selection', 'canGroup'), canUngroup: this.binding.namespaceMethod('selection', 'canUngroup'), duplicate: this.binding.namespaceMethod('selection', 'duplicate'), canDuplicate: this.binding.namespaceMethod('selection', 'canDuplicate'), getAnchor: this.binding.namespaceMethod('selection', 'getAnchor'), getRotationAnchor: this.binding.namespaceMethod('selection', 'getRotationAnchor'), properties: this.binding.select( (annotation) => annotation.selection.getProperties(), NO_PROPERTIES, Object.is, ), } ; readonly draft: AnnotationDraftCapability ={ get: this.binding.namespaceMethod('draft', 'get'), finish: this.binding.namespaceMethod('draft', 'finish'), cancel: this.binding.namespaceMethod('draft', 'cancel'), } ; readonly text: AnnotationTextCapability ={ begin: this.binding.namespaceMethod('text', 'begin'), end: this.binding.namespaceMethod('text', 'end'), getEditing: this.binding.namespaceMethod('text', 'getEditing'), toggleFormat: this.binding.namespaceMethod('text', 'toggleFormat'), } ; readonly tools: EpdfAnnotationTools ={ list: this.binding.namespaceMethod('tools', 'list'), get: this.binding.namespaceMethod('tools', 'get'), register: this.binding.namespaceMethod('tools', 'register'), getDefaults: this.binding.namespaceMethod('tools', 'getDefaults'), updateDefaults: this.binding.namespaceMethod('tools', 'updateDefaults'), getProperties: this.binding.namespaceMethod('tools', 'getProperties'), defaultsOf: (id) =>{ const idOf = typeof id === 'function' ? id : () => id; return this.binding.select( (annotation) => annotation.tools.getDefaults(idOf()), NO_DEFAULTS, Object.is, ); } , propertiesOf: (id) =>{ const idOf = typeof id === 'function' ? id : () => id; return this.binding.select( (annotation) => annotation.tools.getProperties(idOf()), NO_PROPERTIES, ); } , defaultsChanged$: this.binding.stream((annotation) => annotation.tools.onDefaultsChanged), } ; readonly stamps: AnnotationStampsCapability ={ arm: this.binding.namespaceMethod('stamps', 'arm'), disarm: this.binding.namespaceMethod('stamps', 'disarm'), isArmed: this.binding.namespaceMethod('stamps', 'isArmed'), place: this.binding.namespaceMethod('stamps', 'place'), } ; readonly links: AnnotationLinksCapability ={ get: this.binding.namespaceMethod('links', 'get'), set: this.binding.namespaceMethod('links', 'set'), clear: this.binding.namespaceMethod('links', 'clear'), } ; watch( filter?: AnnotationFilter | null | (() => AnnotationFilter | null | undefined), ): Signal{ const filterOf = typeof filter === 'function' ? filter : () => filter; return this.binding.select( (annotation) => annotation.list(filterOf() ?? undefined), NO_ANNOTATIONS, ); } anchorOf( ref: AnnotationRef | null | (() => AnnotationRef | null | undefined), ): Signal{ const refOf = typeof ref === 'function' ? ref : () => ref; return this.host.select( (annotation) =>{ const target = refOf(); return target ? annotation.getAnnotationAnchor(target) : null; } , null, sameAnnotationAnchor, ); } } EpdfAnnotationBehaviorTemplate [ClassDeclaration] (from packages/framework/angular/annotation/src/templates.ts): @Directive({ selector: 'ng-template[epdfAnnotationBehavior]'} ) export class EpdfAnnotationBehaviorTemplate{ readonly behavior = input(undefined, { alias: 'epdfAnnotationBehavior'} ); readonly template = inject>(TemplateRef); readonly renderer: Signal = computed(() =>{ const behavior = this.behavior(); if (!behavior) return null; let entry = behaviors.get(behavior); if (!entry) behaviors.set(behavior, (entry = Object.freeze({ behavior} ))); return entry; } ); static ngTemplateContextGuard( _directive: EpdfAnnotationBehaviorTemplate, context: unknown, ): context is EpdfAnnotationBehaviorTemplateContext{ return true; } } EpdfAnnotationBehaviorTemplateContext [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface EpdfAnnotationBehaviorTemplateContext{ $implicit: Annotation; annotation: Annotation; item: RenderItem; page: EpdfPageContext; native: TemplateRef; hovered: boolean; selected: boolean; interactive: boolean; } EpdfAnnotationDraftMenu [ClassDeclaration] (from packages/framework/angular/annotation/src/annotation-menu.ts): @Component({ selector: 'epdf-annotation-draft-menu', exportAs: 'epdfAnnotationDraftMenu', imports: [EpdfAnchored], changeDetection: ChangeDetectionStrategy.OnPush, template: ` `, } ) export class EpdfAnnotationDraftMenu{ readonly placement = input('top'); readonly gap = input(8); private readonly annotation = annotationInScope(''); readonly draft: Signal = this.annotation.select( (annotation) => annotation.draft.get(), null, sameCreationDraftAnchor, ); constructor(){ if (!inject(EPDF_PROJECTOR, { optional: true} )){ throw outsideStageError(''); } } } EpdfAnnotationLayer [ClassDeclaration] (from packages/framework/angular/annotation/src/annotation-layer.ts): @Component({ selector: 'epdf-annotation-layer', imports: [ NgTemplateOutlet, EpdfAnnotationFrame, EpdfAnnotationNative, EpdfAnnotationChrome, EpdfFreeTextBox, ], changeDetection: ChangeDetectionStrategy.OnPush, host:{ style: 'position: absolute; inset: 0; display: block; pointer-events: none'} , template: ` @for (drawn of drawings(); track drawn.item.id){ @if (drawn.owner; as owner){
} @else{ @if (drawn.look; as look){
@if (look.scaled){
} @else{ }
} @else{
} } } @for (text of texts(); track text.id){
} @if (ghost(); as ghost){ } `, } ) export class EpdfAnnotationLayer{ protected readonly previewZIndex = PREVIEW_Z_INDEX; protected readonly page = injectPage(''); private readonly injector = inject(Injector); private readonly annotation = annotationHostOf(this.page, ''); private readonly interaction = new CapabilityBinding( injectKernelHost(''), () => InteractionToken, () => this.page.documentId, ); private readonly render = new CapabilityBinding( injectKernelHost(''), () => RenderToken, () => this.page.documentId, ); private readonly chrome = injectChromeSettings(); private readonly looks = contentChildren(EpdfAnnotationTemplate, { descendants: true} ); private readonly behaviors = contentChildren(EpdfAnnotationBehaviorTemplate, { descendants: true, } ); protected readonly handleTemplate = contentChild(EpdfHandleTemplate, { descendants: true} ); protected readonly rotationHandleTemplate = contentChild(EpdfRotationHandleTemplate, { descendants: true, } ); private readonly renderers = computed( (): readonly AnnotationRendererEntry[] => [ ...this.behaviors().map((template) => template.renderer()), ...this.looks().map((template) => template.renderer()), ].filter((entry) => entry !== null), { equal: (left, right) => left.length === right.length && left.every((entry, index) => entry === right[index]), } , ); private readonly registrations = signal(0); private readonly view = pageViewOf(this.page); private readonly pixels = pagePixelsOf(this.page); private readonly items = this.annotation.select( (annotation) => annotation.listPageItems(this.page.ref, this.view()), NO_ITEMS, ); private readonly allTexts = this.annotation.select( (annotation) => annotation.listTextItems(this.page.ref, this.view()), NO_TEXTS, ); private readonly activeToolId = this.interaction.select( (interaction) => interaction.getActiveToolId() ?? '', '', ); private readonly urls = signal> | null>(null); private readonly shown = createShownUrls(); private readonly appearanceEpoch = this.annotation.select( (annotation) => annotation.getAppearanceEpoch(this.page.ref), '', ); private readonly appearanceScale = this.render.select( (render) => render.getAppearanceScale(this.page.transform().renderScale), 0, ); private readonly bakeScale = computed(() => this.render.capability() ? this.appearanceScale() : this.page.transform().renderScale, ); private readonly editingKey = computed(() => editingTextKeyOf(this.allTexts(), annotationKey)); private readonly lookInjectors = new Map(); protected readonly drawings = computed((): readonly Drawn[] =>{ this.activeToolId(); this.registrations(); const annotation = this.annotation.capability(); const renderers = this.renderers(); const looks = this.looks(); const behaviors = this.behaviors(); const pixels = this.pixels(); const urls = this.urls(); const editingKey = this.editingKey(); const drawings = this.items().map((item): Drawn =>{ const frame = frameInPixels(item.frame, pixels); const state = item.annotation?.appearanceState ?? null; const drawn: Drawn ={ item, frame, shows: pictureOrPainting({ pending: item.source !== 'baked', picture: urls && shownAppearance(urls, item.id, state), version: item.pictureVersion ?? 0, loaded: urls !== null, paint: () => (hasLiveDrawing(item) ? item : null), } ), appearance: urls && bakedAppearanceOf(urls, item.id, state), look: null, owner: null, interactive: false, inert: false, } ; const record = item.annotation; if (!record || !annotation) return drawn; const typing = editingKey !== null && annotationKey(record.ref) === editingKey; const drawing = annotationDrawingOf(record, annotation, renderers, typing); switch (drawing.kind){ case 'native': return{ ...drawn, inert: drawing.inert} ; case 'owned':{ const template = behaviors.find((behavior) => behavior.renderer() === drawing.entry); return template ?{ ...drawn, owner:{ template, annotation: record} } : drawn; } case 'look':{ const template = looks.find((look) => look.renderer() === drawing.entry); if (!template) return drawn; const scaled = drawing.entry.scale !== false; return{ ...drawn, look:{ template, annotation: record, frame: lookFrameOf(frame, scaled), scaled, injector: this.lookInjectorOf(item.id), } , interactive: drawing.interactive, inert: drawing.inert, } ; } } } ); const drawnLooks = new Set(drawings.flatMap((drawn) => (drawn.look ? [drawn.item.id] : []))); for (const id of this.lookInjectors.keys()){ if (!drawnLooks.has(id)) this.lookInjectors.delete(id); } return drawings; } ); private readonly lookScales = computed(() =>{ const scales = new Map(); for (const drawn of this.drawings()){ if (drawn.look) scales.set(drawn.item.id, drawn.look.scaled ? drawn.frame.scale : 1); } return scales; } ); protected readonly texts = computed((): readonly TextItem[] => layerTextBoxesOf(this.allTexts(), this.items(), this.renderers(), annotationKey), ); protected readonly textOutline = computed( () => annotationChromePaint(this.chrome.chrome(), this.chrome.accent()).textOutline, ); private readonly imageGhost = this.annotation.select( (annotation) => annotation.getImageGhost(this.page.ref), null, ); private readonly armedStamp = this.annotation.select( (annotation) => annotation.getArmedStamp(), null, Object.is, ); private readonly ghostBucket = computed(() =>{ const ghost = this.imageGhost(); return ghost ? previewBucket(ghost.box.width * this.page.transform().renderScale) : 0; } ); private readonly ghostUrl = signal(null); protected readonly ghost = computed(() =>{ const ghost = this.imageGhost(); const url = this.ghostUrl(); if (!ghost || !url) return null; return{ url, box: rectInPixels(ghost.box, this.pixels()), opacity: ghostOpacity(ghost.opacity), rotation: ghost.rot, } ; } ); constructor(){ paintsPagePart(() => this.page.ref, 'annotations'); this.registerBehaviors(); if (!isPlatformBrowser(inject(PLATFORM_ID))) return; inject(DestroyRef).onDestroy(() => this.shown.release()); this.loadAppearances(); this.loadGhost(); } private lookInjectorOf(id: string): Injector{ let injector = this.lookInjectors.get(id); if (!injector){ const scale = computed(() => this.lookScales().get(id) ?? 1); injector = Injector.create({ providers: [{ provide: EPDF_LOOK_SCALE, useValue: scale} ], parent: this.injector, } ); this.lookInjectors.set(id, injector); } return injector; } private registerBehaviors(): void{ effect((onCleanup) =>{ const annotation = this.annotation.capability(); const renderers = this.renderers(); if (annotation && renderers.length > 0){ onCleanup( untracked(() => registerRendererBehaviors(annotation, renderers, () => untracked(this.activeToolId)), ), ); } this.registrations.update((count) => count + 1); } ); } private loadAppearances(): void{ effect((onCleanup) =>{ const annotation = this.annotation.capability(); const scale = this.bakeScale(); this.appearanceEpoch(); if (!annotation || !scale) return; const page = this.page.ref; onCleanup( untracked(() => loadAppearanceUrls( this.shown, (abort) => annotation.renderAppearances(page, scale, abort), annotationKey, (urls) => this.urls.set(urls), ), ), ); } ); } private loadGhost(): void{ effect((onCleanup) =>{ const annotation = this.annotation.capability(); const bucket = this.ghostBucket(); this.armedStamp(); if (!annotation || !bucket){ this.ghostUrl.set(null); return; } onCleanup( untracked(() => loadObjectUrl( () => annotation.renderArmedStampPreview(bucket), (url) => this.ghostUrl.set(url), ), ), ); } ); } } EpdfAnnotationMenu [ClassDeclaration] (from packages/framework/angular/annotation/src/annotation-menu.ts): @Component({ selector: 'epdf-annotation-menu', imports: [EpdfAnchored], changeDetection: ChangeDetectionStrategy.OnPush, template: ` `, } ) export class EpdfAnnotationMenu{ readonly placement = input('top'); readonly gap = input(15); private readonly annotation = annotationInScope(''); private readonly projection = inject(EPDF_PROJECTOR, { optional: true} ); private readonly selection = this.annotation.select( (annotation) =>{ const anchor = annotation.selection.getAnchor(); if (!anchor) return null; this.projection?.revision(); const view = this.projection?.projector()?.viewEnv(anchor.page); return view ? annotation.getSelectionAnchorIn(view) : anchor; } , null, sameSelectionAnchor, ); protected readonly anchor = computed((): EpdfAnchor | null =>{ const anchor = this.selection(); if (!anchor) return null; return{ page: anchor.page, bounds: anchor.bounds, ...(anchor.rotationHandle ?{ avoid: [anchor.rotationHandle]} :{ } ), } ; } ); constructor(){ if (!this.projection) throw outsideStageError(''); } } EpdfAnnotationRotationBadge [ClassDeclaration] (from packages/framework/angular/annotation/src/annotation-menu.ts): @Component({ selector: 'epdf-annotation-rotation-badge', exportAs: 'epdfAnnotationRotationBadge', imports: [EpdfAnchored, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: ` @if (shown(); as rotation){ @if (custom(); as custom){ } @else{
{ { rotation.angle} } °
}
} `, } ) export class EpdfAnnotationRotationBadge{ readonly placement = input('right'); readonly gap = input(16); private readonly annotation = annotationInScope(''); private readonly settings = injectChromeSettings(); protected readonly custom = contentChild(EpdfRotationBadgeTemplate); readonly rotation: Signal = this.annotation.select( (annotation) => annotation.selection.getRotationAnchor(), null, sameRotationAnchor, ); protected readonly shown = computed(() =>{ const rotation = this.rotation(); return rotation && (this.custom() || this.settings.chrome().readout.enabled) ? rotation : null; } ); protected readonly anchor = computed((): EpdfAnchor | null =>{ const rotation = this.rotation(); return rotation ?{ page: rotation.page, bounds:{ ...rotation.at, width: 0, height: 0} } : null; } ); protected readonly fontFamily = paintDefault('font-mono'); protected readonly background = computed(() => paint('readout-background', this.settings.chrome().readout.background), ); protected readonly color = computed(() => paint('readout-color', this.settings.chrome().readout.color), ); constructor(){ if (!inject(EPDF_PROJECTOR, { optional: true} )){ throw outsideStageError(''); } } } EpdfAnnotationSelection [InterfaceDeclaration] (from packages/framework/angular/annotation/src/annotation.ts): export interface EpdfAnnotationSelection extends AnnotationSelectionCapability{ readonly properties: Signal; } EpdfAnnotationTemplate [ClassDeclaration] (from packages/framework/angular/annotation/src/templates.ts): @Directive({ selector: 'ng-template[epdfAnnotation]'} ) export class EpdfAnnotationTemplate{ readonly match = input(undefined, { alias: 'epdfAnnotation'} ); readonly interactive = input< AnnotationInteractive, AnnotationInteractive | '' | 'true' | 'false' | null | undefined >(false, { alias: 'epdfAnnotationInteractive', transform: interactiveAttribute} ); readonly scale = input(true, { alias: 'epdfAnnotationScale', transform: booleanAttribute} ); readonly template = inject>(TemplateRef); readonly renderer: Signal = computed(() =>{ const match = this.match(); return match ? lookRendererOf(match, this.interactive(), this.scale()) : null; } ); static ngTemplateContextGuard( _directive: EpdfAnnotationTemplate, context: unknown, ): context is EpdfAnnotationTemplateContext{ return true; } } EpdfAnnotationTemplateContext [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface EpdfAnnotationTemplateContext{ $implicit: Annotation; annotation: Annotation; frame: AnnotationFrame; native: TemplateRef; appearance:{ url: string} | null; hovered: boolean; selected: boolean; interactive: boolean; } EpdfAnnotationTools [InterfaceDeclaration] (from packages/framework/angular/annotation/src/annotation.ts): export interface EpdfAnnotationTools extends Omit{ defaultsOf(id: string | (() => string)): Signal; propertiesOf(id: string | (() => string)): Signal; readonly defaultsChanged$: Observable; } EpdfComments [ClassDeclaration] (from packages/framework/angular/annotation/src/comments.ts): @Injectable({ providedIn: 'root'} ) export class EpdfComments extends EpdfPluginService{ constructor(){ super({ name: 'EpdfComments', feature: 'withAnnotation()', token: AnnotationToken} ); } readonly listThreads: CommentsCapability['listThreads'] = this.binding.namespaceMethod( 'comments', 'listThreads', ); readonly getThread: CommentsCapability['getThread'] = this.binding.namespaceMethod( 'comments', 'getThread', ); readonly reply: CommentsCapability['reply'] = this.binding.namespaceMethod('comments', 'reply'); readonly setText: CommentsCapability['setText'] = this.binding.namespaceMethod( 'comments', 'setText', ); readonly setStatus: CommentsCapability['setStatus'] = this.binding.namespaceMethod( 'comments', 'setStatus', ); readonly setMarked: CommentsCapability['setMarked'] = this.binding.namespaceMethod( 'comments', 'setMarked', ); readonly delete: CommentsCapability['delete'] = this.binding.namespaceMethod( 'comments', 'delete', ); readonly deleteThread: CommentsCapability['deleteThread'] = this.binding.namespaceMethod( 'comments', 'deleteThread', ); readonly canReply: CommentsCapability['canReply'] = this.binding.namespaceMethod( 'comments', 'canReply', ); readonly canSetText: CommentsCapability['canSetText'] = this.binding.namespaceMethod( 'comments', 'canSetText', ); readonly canSetStatus: CommentsCapability['canSetStatus'] = this.binding.namespaceMethod( 'comments', 'canSetStatus', ); readonly canSetMarked: CommentsCapability['canSetMarked'] = this.binding.namespaceMethod( 'comments', 'canSetMarked', ); readonly canDelete: CommentsCapability['canDelete'] = this.binding.namespaceMethod( 'comments', 'canDelete', ); readonly canDeleteThread: CommentsCapability['canDeleteThread'] = this.binding.namespaceMethod( 'comments', 'canDeleteThread', ); readonly threadChanged$: Observable = this.binding.stream( (annotation) => annotation.comments.onThreadChanged, ); private readonly scope = injectDocumentScope(); private readonly rawThreads = this.binding.select( (annotation) => annotation.comments.listThreads(), NO_THREADS, ); private readonly pages = this.binding.host.read( (kernel) =>{ const id = this.scope() ?? kernel.documents.getActiveId(); return id ? kernel.documents.listPages(id) : NO_PAGES; } , () => NO_PAGES, ); readonly threads: Signal = computed(() => enrichCommentThreads(this.rawThreads(), this.pages()), ); threadOf( ref: AnnotationRef | null | (() => AnnotationRef | null | undefined), ): Signal{ const refOf = typeof ref === 'function' ? ref : () => ref; const thread = this.binding.select( (annotation) =>{ const member = refOf(); return member ? annotation.comments.getThread(member) : null; } , null, Object.is, ); return computed(() =>{ const found = thread(); if (!found) return null; const root = annotationKey(found.root.ref); return this.threads().find((view) => annotationKey(view.root.ref) === root) ?? null; } ); } } EpdfHandleTemplate [ClassDeclaration] (from packages/framework/angular/annotation/src/templates.ts): @Directive({ selector: 'ng-template[epdfHandle]'} ) export class EpdfHandleTemplate{ readonly template = inject>(TemplateRef); static ngTemplateContextGuard( _directive: EpdfHandleTemplate, context: unknown, ): context is EpdfHandleTemplateContext{ return true; } } EpdfHandleTemplateContext [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface EpdfHandleTemplateContext{ $implicit: HandleProps; } EpdfRichTextEditor [ClassDeclaration] (from packages/framework/angular/annotation/src/text-box.ts): @Directive({ selector: '[epdfRichTextEditor]', exportAs: 'epdfRichTextEditor', host:{ '[style]': 'own()?.style ?? null'} , } ) export class EpdfRichTextEditor{ readonly annotation = input.required({ alias: 'epdfRichTextEditor'} ); private readonly page = injectPage('[epdfRichTextEditor]'); private readonly host = annotationHostOf(this.page, '[epdfRichTextEditor]'); private readonly lookScale = inject(EPDF_LOOK_SCALE, { optional: true} ); private readonly view = pageViewOf(this.page); private readonly pixels = pagePixelsOf(this.page); private readonly item = this.host.select( (annotation) => annotation.getTextItem(this.annotation().ref, this.view()), null, ); private readonly scale = computed(() => textBoxEditorScaleOf(this.item(), this.pixels(), this.lookScale?.() ?? 1), ); protected readonly own: Signal = computed(() =>{ const item = this.item(); return item ? ownTextBoxOf(item, this.scale()) : null; } ); readonly editing: Signal = computed(() => this.item()?.editing ?? false); constructor(){ bindTextBoxEditor( inject>(ElementRef).nativeElement, this.host.capability, this.item, computed(() => this.own()?.scale ?? this.scale()), ); injectFontMounts(() => this.item()?.programs ?? []); } } EpdfRotationBadgeTemplate [ClassDeclaration] (from packages/framework/angular/annotation/src/templates.ts): @Directive({ selector: 'ng-template[epdfRotationBadge]'} ) export class EpdfRotationBadgeTemplate{ readonly template = inject>(TemplateRef); static ngTemplateContextGuard( _directive: EpdfRotationBadgeTemplate, context: unknown, ): context is EpdfRotationBadgeTemplateContext{ return true; } } EpdfRotationBadgeTemplateContext [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface EpdfRotationBadgeTemplateContext{ $implicit: AnnotationRotationAnchor; } EpdfRotationHandleTemplate [ClassDeclaration] (from packages/framework/angular/annotation/src/templates.ts): @Directive({ selector: 'ng-template[epdfRotationHandle]'} ) export class EpdfRotationHandleTemplate{ readonly template = inject>(TemplateRef); static ngTemplateContextGuard( _directive: EpdfRotationHandleTemplate, context: unknown, ): context is EpdfRotationHandleTemplateContext{ return true; } } EpdfRotationHandleTemplateContext [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface EpdfRotationHandleTemplateContext{ $implicit: RotationHandleProps; } Face [InterfaceDeclaration] (from packages/plugin/annotation/src/rich-text.ts): export interface Face{ family: string; weight?: number; italic?: boolean; } FieldValues [TypeAliasDeclaration] (from packages/core/annotation/src/types.ts): export type FieldValues = Readonly>; FilePickerProvider [TypeAliasDeclaration] (from packages/plugin/annotation/src/contract.ts): export type FilePickerProvider = ( request: FilePromptRequest, ) => Promise; FilePromptRequest [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface FilePromptRequest{ toolId: string; subtype: KindName; accept?: string; page: PageRef; point: Point; } FlagKey [TypeAliasDeclaration] (from packages/core/annotation/src/kinds/define.ts): export type FlagKey = | 'invisible' | 'hidden' | 'print' | 'noZoom' | 'noRotate' | 'noView' | 'readOnly' | 'locked' | 'toggleNoView' | 'lockedContents'; GhostPolicy [TypeAliasDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export type GhostPolicy = boolean |{ opacity: number} ; HandleProps [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface HandleProps{ readonly at: Point; readonly size: number; readonly rotation: number; readonly kind: HandleRole; readonly active: boolean; } HandleRole [TypeAliasDeclaration] (from packages/core/annotation/src/types.ts): export type HandleRole = 'corner' | 'side' | 'point'; ImageGhost [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface ImageGhost{ readonly page: PageRef; readonly box: Rect; readonly rot: number; readonly opacity: number; readonly into?: AnnotationRef; } ImageGhostPlace [TypeAliasDeclaration] (from packages/plugin/annotation/src/contract.ts): export type ImageGhostPlace = Pick; InkAuthoringOptions [InterfaceDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export interface InkAuthoringOptions{ groupStrokesMs?: number; straighten?: InkStraightenOptions; } LineEnding [TypeAliasDeclaration] (from packages/engine/core/src/annotation/primitives.ts): export type LineEnding = | 'none' | 'square' | 'circle' | 'diamond' | 'open-arrow' | 'closed-arrow' | 'butt' | 'r-open-arrow' | 'r-closed-arrow' | 'slash'; LineEndings [InterfaceDeclaration] (from packages/engine/core/src/annotation/primitives.ts): export interface LineEndings{ start: LineEnding; end: LineEnding; } LineStyle [TypeAliasDeclaration] (from packages/plugin/annotation/src/contract.ts): export type LineStyle = 'solid' | 'dashed'; LinkNavItem [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface LinkNavItem{ readonly id: string; readonly bounds: Rect; readonly target: PdfLinkTarget; readonly attached: boolean; readonly activate?: PdfActionTree; readonly ref?: AnnotationRef; readonly hoverEvents?:{ enter: boolean; exit: boolean} ; } MIN_DRAG [VariableDeclaration] (from packages/core/annotation/src/placement.ts): MIN_DRAG = 3 MarkupSubtype [TypeAliasDeclaration] (from packages/plugin/annotation/src/contract.ts): export type MarkupSubtype = 'highlight' | 'underline' | 'strikeout' | 'squiggly'; MeasurementIntent [TypeAliasDeclaration] (from packages/core/annotation/src/editable.ts): export type MeasurementIntent = 'line-dimension' | 'polyline-dimension' | 'polygon-dimension'; PdfLinkTarget [TypeAliasDeclaration] (from packages/engine/core/src/dto/PdfLinkTarget.ts): export type PdfLinkTarget = |{ kind: 'goto'; destination: Destination} |{ kind: 'uri'; uri: string} |{ kind: 'goto-remote'; file: string} |{ kind: 'launch'; path: string} |{ kind: 'javascript'} |{ kind: 'named'; name: string} |{ kind: 'unsupported'} ; Placement [TypeAliasDeclaration] (from packages/core/annotation/src/types.ts): export type Placement = |{ kind: 'box'; rect: Rect; rot: number} |{ kind: 'segment'; a: Point; b: Point} ; PromptSourceSpec [InterfaceDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export interface PromptSourceSpec{ kind: 'prompt'; accept?: string; } RenderItem [InterfaceDeclaration] (from packages/core/annotation/src/types.ts): export interface RenderItem{ id: Id; ref: AnnotationRef | null; annotation?: Annotation; subtype: KindName; geometry: Shape; box: Rect; apBox?: Rect; apRot?: number; style: Style; text?: TextStyle; source: 'baked' | 'vector' | 'draft' | 'ghost'; pictureVersion?: number; lentScene?: () => readonly SceneNode[]; accent?: RecordAccent; placeholder?: RecordPlaceholder; outline?: RecordOutline; ghostOpacity?: number; selected: boolean; hovered?: boolean; label?:{ text: string; repeat: boolean; fonts?: PaintFonts} ; frame:{ box: Rect; rotation: number; scale: number} ; raster:{ box: Rect; rotation: number} | null; icon?: NoteIcon | FileAttachmentIcon; measure?: MeasurementAppearance; rot?: number; blend?: Exclude; } ResolvedGhost [TypeAliasDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export type ResolvedGhost = false |{ opacity: number} ; ResolvedTool [InterfaceDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export interface ResolvedTool{ id: string; subtype: KindName; preset: string; fieldsKind: string; cursor: string; enables: ReadonlySet; defaults?: FieldValues; flags?: Partial; source?: StampSourceSpec; selection?: SelectionAuthoring; ink?: InkAuthoringOptions; upright: boolean; clickCreate: ClickCreate | false; ghost: ResolvedGhost; afterCreate?: Partial; capture: boolean; meta?: Record; } ReviewStatus [InterfaceDeclaration] (from packages/engine/core/src/annotation/comments.ts): export interface ReviewStatus{ state: string; stateModel: string; by: string | null; at: IsoDateTime | null; ref: AnnotationRef; } RotationHandleProps [InterfaceDeclaration] (from packages/framework/angular/annotation/src/templates.ts): export interface RotationHandleProps extends Omit{ readonly from: Point; } SelectionAuthoring [TypeAliasDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export type SelectionAuthoring = |{ kind: 'markup'} |{ kind: 'text-edit'; operation: 'insert' | 'replace'} ; SnapSettings [InterfaceDeclaration] (from packages/core/annotation/src/types.ts): export interface SnapSettings{ readonly alignment: boolean; readonly alignmentThresholdPx: number; readonly rotation: boolean; readonly rotationAngles: readonly number[]; readonly rotationThresholdDeg: number; } StampInput [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface StampInput{ source: BinarySource; targetWidth?: number; name?: string; subject?: string; preview?: BinarySource | StampPreviewProvider; intrinsicSize?:{ width: number; height: number} ; } StampPlacement [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface StampPlacement{ readonly page: PageRef | number; readonly center: Point; readonly targetWidth?: number; readonly rotation?: number; readonly select?: boolean; } StampPreviewProvider [TypeAliasDeclaration] (from packages/plugin/annotation/src/contract.ts): export type StampPreviewProvider = (devicePixelWidth: number) => Promise; StampSourceSpec [TypeAliasDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export type StampSourceSpec ={ kind: 'bytes'; source: BinarySource} | PromptSourceSpec; Style [InterfaceDeclaration] (from packages/core/annotation/src/types.ts): export interface Style{ color: Color | null; interiorColor: Color | null; strokeWidth: number; opacity: number; blendMode: BlendMode; borderStyle: AnnotationBorderStyle; dashArray: number[] | null; cloudyIntensity: number | null; } TextAlign [TypeAliasDeclaration] (from packages/core/annotation/src/types.ts): export type TextAlign = 'left' | 'center' | 'right'; TextFormat [TypeAliasDeclaration] (from packages/plugin/annotation/src/rich-text.ts): export type TextFormat = 'bold' | 'italic' | 'underline'; TextItem [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface TextItem{ readonly id: string; readonly ref: AnnotationRef | null; readonly box: Rect; readonly contents: string; readonly richText:{ paragraphs: RichTextParagraph[]} ; readonly face:{ family: string; weight: number; italic: boolean} ; readonly programs: readonly MountableFontProgram[]; readonly editing: boolean; readonly rot?: number; readonly css:{ fontFamily: string; fontSize: number; color: string; fontWeight: number; fontStyle: 'normal' | 'italic'; textDecoration: 'none' | 'underline'; align: 'left' | 'center' | 'right'; padding: number; } ; } TextSelection [InterfaceDeclaration] (from packages/plugin/annotation/src/rich-text.ts): export interface TextSelection extends RichTextRange{ id: string; } TextStyle [InterfaceDeclaration] (from packages/core/annotation/src/types.ts): export interface TextStyle{ fontFamily: string; fontSize: number; fontColor: Color; textAlign: TextAlign; bold?: boolean; italic?: boolean; underline?: boolean; } ThreadDeleteResult [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface ThreadDeleteResult{ readonly deleted: AnnotationRef[]; readonly failed: Array<{ ref: AnnotationRef; error: unknown} >; } ToolAuthoringKind [TypeAliasDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export type ToolAuthoringKind = keyof typeof TOOL_DEFAULT_FIELDS; ToolDefaults [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface ToolDefaults{ readonly color?: string | null; readonly interiorColor?: string | null; readonly opacity?: number; readonly strokeWidth?: number; readonly fontFamily?: string; readonly fontSize?: number; readonly fontColor?: string; readonly textAlign?: 'left' | 'center' | 'right'; readonly icon?: string; readonly contents?: string | null; readonly [field: string]: unknown; } ToolDefaultsChangedEvent [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface ToolDefaultsChangedEvent{ readonly toolId: string; readonly defaults: ToolDefaults; } ToolDefaultsFor [TypeAliasDeclaration] (from packages/plugin/annotation/src/tools/definitions.ts): export type ToolDefaultsFor = ToolDraftOf & (K extends 'free-text' | 'free-text-callout' ? ToolRichText : unknown); annotationCommands [VariableDeclaration] (from packages/framework/angular/annotation/src/commands.ts): annotationCommands = createAnnotationCommands() annotationKey [FunctionDeclaration] (from packages/engine/core/src/identity/annotationKey.ts): export function annotationKey(ref: AnnotationRef): string{ switch (ref.kind){ case 'objectNumber': return `obj:${ ref.objectNumber} `; case 'baseIndex': return `base:${ ref.page.objectNumber} :${ ref.baseIndex} `; } } annotationPlugin [VariableDeclaration] (from packages/plugin/annotation/src/annotation.plugin.ts): annotationPlugin = (config?: AnnotationConfig) => definePlugin({ id: 'annotation', token: AnnotationToken, scope: 'document', requires: [InteractionToken], optional: [SelectionToken, PublicActionsToken, RenderToken, FontsToken], state: initialAnnotationModel, settings:{ defaults: ANNOTATION_DEFAULTS, registered: config, whole: ['chrome.marquee']} , create: createAnnotationController, } ) annotationState [VariableDeclaration] (from packages/plugin/annotation/src/state.ts): annotationState = defineState(AnnotationToken, { read: (annotation): AnnotationState => ({ status: annotation.getStatus(), selected: annotation.selection.getSelected(), hovered: annotation.getHovered(), editing: annotation.text.getEditing(), } ), empty:{ status: 'loading', selected: [], hovered: null, editing: null} , } ) filePickerProvider [VariableDeclaration] (from packages/framework/angular/annotation/src/file-picker.ts): filePickerProvider: FilePickerProvider = pickRequestedFile gesturePlacement [FunctionDeclaration] (from packages/core/annotation/src/placement.ts): export function gesturePlacement( form: GestureForm, from: Point, to: Point, clickCreate: ClickCreate | false | undefined, frame: PlacementFrame ={ } , ): Placement | null{ if (!isDrag(form, from, to)){ return clickCreate ? resolveClickPlacement(from, clickCreate, frame) : null; } const a = frame.pageBox ? clampPointToBox(from, frame.pageBox) : from; const b = frame.pageBox ? clampPointToBox(to, frame.pageBox) : to; if (form === 'segment') return{ kind: 'segment', a, b} ; const rot = uprightTurn(frame); const dragged = rectFromPoints(a, b); return{ kind: 'box', rect: rot % 180 ? transposedAboutCenter(dragged) : dragged, rot} ; } kindNamed [FunctionDeclaration] (from packages/core/annotation/src/kinds/index.ts): export function kindNamed(name: string): AnnotationKind{ const kind = KINDS[name]; if (kind) return kind; let shown = shownOnly.get(name); if (!shown){ shown ={ name, family: boxFamily, style: plainStyle, caps:{ ...NO_CAPS, rasterOnly: true} , properties: [], } ; shownOnly.set(name, shown); } return shown; } orientationPatch [FunctionDeclaration] (from packages/core/annotation/src/record/shape.ts): export function orientationPatch( annotation: Annotation, rotation: Rotation, ):{ box: Rect; rotation: Rotation | null} | Record{ if (!kindOf(annotation).caps.quarterTurns) return{ } ; const shape = shapeOf(annotation); if (shape.kind !== 'box') return{ } ; const stands = standingRect(shape.box, shape.rotation); return{ box: standingRect(stands, rotation), rotation: rotation || null} ; } propertiesOf [FunctionDeclaration] (from packages/core/annotation/src/props.ts): export function propertiesOf(kind: AnnotationKind): readonly AnnotationProperty[]{ let properties = withFlags.get(kind); if (!properties){ properties = [...kind.properties, ...FLAG_PROPERTIES]; withFlags.set(kind, properties); } return properties; } resolveClickPlacement [FunctionDeclaration] (from packages/core/annotation/src/placement.ts): export function resolveClickPlacement( point: Point, policy: ClickCreate, frame: PlacementFrame ={ } , ): Placement{ const seen = frame.upright ? (frame.displayRotation ?? 0) : 0; if ('length' in policy){ const turn = ((policy.rotation ?? 0) * Math.PI) / 180; const span = rotatePoint({ x: Math.cos(turn) * policy.length, y: Math.sin(turn) * policy.length} , { x: 0, y: 0} , -seen, ); const before = policy.anchor === 'start' ? 0 : policy.anchor === 'end' ? 1 : 0.5; const a ={ x: point.x - span.x * before, y: point.y - span.y * before} ; const b ={ x: a.x + span.x, y: a.y + span.y} ; const bounds = rectFromPoints(a, b); const placed = clampRectToBox(bounds, frame.pageBox); const dx = placed.x - bounds.x; const dy = placed.y - bounds.y; return{ kind: 'segment', a:{ x: a.x + dx, y: a.y + dy} , b:{ x: b.x + dx, y: b.y + dy} } ; } const{ width, height} = policy; const rot = uprightTurn(frame); const rect = policy.anchor === 'top-left' ? uprightAnchoredRect(point, width, height, seen) :{ x: point.x - width / 2, y: point.y - height / 2, width, height} ; const shown = rot % 180 ? transposedAboutCenter(rect) : rect; const placed = clampRectToBox(shown, frame.pageBox); return{ kind: 'box', rect:{ ...rect, x: rect.x + placed.x - shown.x, y: rect.y + placed.y - shown.y} , rot, } ; } widgetAppearanceOf [FunctionDeclaration] (from packages/core/annotation/src/record/defaults.ts): export function widgetAppearanceOf(defaults: FieldValues): WidgetAppearance{ return Object.fromEntries( WIDGET_APPEARANCE_FIELDS.filter((name) => defaults[name] !== undefined).map((name) => [ name, defaults[name], ]), ) as WidgetAppearance; } withAnnotation [FunctionDeclaration] (from packages/framework/angular/annotation/src/annotation.ts): export function withAnnotation(options?: AnnotationConfig): EmbedPdfFeature{ return{ plugins: [annotationPlugin(options)], services: [EpdfAnnotation, EpdfComments]} ; } withFilePicker [FunctionDeclaration] (from packages/framework/angular/annotation/src/file-picker.ts): export function withFilePicker( provider: FilePickerProvider | null = filePickerProvider, ): EmbedPdfFeature{ return{ plugins: [], setup: () => installFilePicker(provider)} ; }