# @embedpdf/plugin-annotation — ./contract/host 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, } ANNOTATION_DRAW_PRIORITY [VariableDeclaration] (from packages/plugin/annotation/src/priorities.ts): ANNOTATION_DRAW_PRIORITY = 55 ANNOTATION_EDIT_PRIORITY [VariableDeclaration] (from packages/plugin/annotation/src/priorities.ts): ANNOTATION_EDIT_PRIORITY = 100 ANNOTATION_MARQUEE_PRIORITY [VariableDeclaration] (from packages/plugin/annotation/src/priorities.ts): ANNOTATION_MARQUEE_PRIORITY = 50 ANNOTATION_PLACE_PRIORITY [VariableDeclaration] (from packages/plugin/annotation/src/priorities.ts): ANNOTATION_PLACE_PRIORITY = 95 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; } AnnotationAppearancePicture [InterfaceDeclaration]: export interface AnnotationAppearancePicture extends Pick< AnnotationAppearanceImage, 'ref' | 'mode' | 'state' | 'rect' >{ readonly image: ImageSource; readonly version: number; } 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; } AnnotationHostCapability [InterfaceDeclaration]: export interface AnnotationHostCapability extends AnnotationCapability{ setPageViewports( page: PageRef, viewports: PageMeasurementViewport[] | undefined, fallback: PdfMeasure, ): void; whenRemeasurable(): Promise; stageRemeasure(page: PageRef, scale: PdfMeasure): RecalibrationReport; readonly onDraftCaptured: EventHook; getDistanceCreationPage(): PageRef | null; hasCreationAwaitingClick(): boolean; getSelectionAnchorIn(view:{ scale?: number; rotation?: Rotation; zoom?: number; } ): AnnotationSelectionAnchor | null; getAnnotationAnchor(ref: AnnotationRef, view?: ViewEnv): AnnotationAnchor | null; listPageItems(page: PageRef, view?: ViewEnv): RenderItem[]; listTextItems(page: PageRef, view?: ViewEnv): TextItem[]; getTextItem(ref: AnnotationRef, view?: ViewEnv): TextItem | null; listChromeNodes(page: PageRef, scale?: number, rotation?: Rotation, zoom?: number): ChromeNode[]; listLinkItems(page: PageRef): LinkNavItem[]; getAppearanceEpoch(page: PageRef): string; renderAppearances( page: PageRef, scale: number, signal?: AbortSignal, ): Promise; whenSynced(): Promise; getEditingId(): Id | null; beginTextEditAt( page: PageRef, point: Point, scale?: number, rotation?: Rotation, zoom?: number, ): boolean; draftContents(ref: AnnotationRef, text: string): void; draftRichText( ref: AnnotationRef, doc:{ paragraphs: RichTextParagraph[]} , ):{ paragraphs: RichTextParagraph[]} ; setTextSelection(ref: AnnotationRef, range:{ start: number; end: number} | null): void; getCssFontFamily( face:{ family: string; weight: number; italic: boolean} , id: string | null, ): string; getFamilyOfCss(cssFamily: string): string | undefined; getHitKind( page: PageRef, point: Point, scale?: number, rotation?: Rotation, zoom?: number, touch?: boolean, ): 'handle' | 'rotate' | 'group-handle' | 'annot' | 'empty'; claimsTouchAt( page: PageRef, point: Point, scale?: number, rotation?: Rotation, zoom?: number, ): boolean; getCursorAt( page: PageRef, point: Point, scale?: number, rotation?: Rotation, zoom?: number, ): string | null; hoverAt( at:{ page: PageRef; point: Point; scale?: number; rotation?: Rotation; zoom?: number; } | null, ): void; editPointer( phase: 'down' | 'move' | 'up', page: PageRef, point: Point, shift: boolean, scale?: number, rotation?: Rotation, zoom?: number, touch?: boolean, ): void; marqueePointer( phase: 'down' | 'move' | 'up', page: PageRef, point: Point, shift: boolean, scale?: number, rotation?: Rotation, zoom?: number, ): void; createPointer( tool: string, phase: 'down' | 'move' | 'up', page: PageRef, point: Point, finish?: boolean, displayRotation?: Rotation, ): void; finishInkDraft(): void; placeAt(page: PageRef, point: Point, displayRotation?: Rotation, zoom?: number): boolean; placeArmedStamp(page: PageRef, point: Point, displayRotation?: Rotation): boolean; requestStampAt(page: PageRef, point: Point, displayRotation?: Rotation): boolean; applyToolToSelection(toolId: string): boolean; createMarkup(subtype: KindName, page: PageRef, quads: Quad[], preset?: string): void; createCaret(page: PageRef, anchor: TextEndAnchor): void; createReplaceText(page: PageRef, quads: Quad[], anchor: TextEndAnchor, preset?: string): void; previewMarkup(subtype: KindName, quadsByPage: Record, preset?: string): void; clearMarkupPreview(): void; hoverGhostAt( toolId: string, page: PageRef, point: Point, displayRotation?: Rotation, zoom?: number, ): void; clearGhost(): void; previewPlacement( toolId: string, page: PageRef, from: Point, to: Point, displayRotation?: Rotation, ): void; clearPlacementPreview(): void; getImageGhost(page: PageRef): ImageGhost | null; getArmedStamp(): ArmedStampInfo | null; renderArmedStampPreview(devicePixelWidth?: number): Promise; lend(lender: AnnotationLender): Unsubscribe; listResolvedTools(): ResolvedTool[]; getResolvedTool(id: string): ResolvedTool | null; getToolSubtype(id: string): KindName; registerBehavior(behavior: Behavior): Unsubscribe; getBehaviorFor(annotation: Annotation): Behavior | null; pruneEngagedSelection(): void; commitScriptEffects(entries: AnnotationCommitEntry[]): Promise; } 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[]; } AnnotationLender [InterfaceDeclaration]: export interface AnnotationLender{ readonly owner: string; records():{ readonly confirmed: readonly Annotation[]; readonly shown: readonly Annotation[]; } | null; opsOf(effects: readonly Effect[], model: Model, before: Model): readonly ChangeOp[]; undoOf(ops: readonly ChangeOp[]): readonly PredictedOp[]; reorderOps( page: PageRef, refs: readonly AnnotationRef[], position: AnnotationPosition, ): readonly ChangeOp[]; copyOps( refs: readonly AnnotationRef[], placement:{ readonly page?: PageRef; readonly offset?:{ readonly x: number; readonly y: number} ; } , ): Promise<{ readonly ops: readonly ChangeOp[]; readonly copies: readonly AnnotationRef[]} >; getAuthority(record: Annotation):{ readonly update: boolean; readonly delete: boolean; readonly copy: boolean; } ; getPictureEpoch(page: PageRef): string; getPictureVersion(record: AnnotationRef): number; isPending(record: AnnotationRef): boolean; painter(record: Annotation): ((box: Rect) => readonly SceneNode[]) | null; renderAppearances( page: PageRef, scale: number, signal?: AbortSignal, ): Promise; } 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; } AnnotationModel [InterfaceDeclaration] (from packages/plugin/annotation/src/model.ts): export interface AnnotationModel{ readonly session: Session; readonly vector: Readonly>; readonly ghostAt: GhostPointer | null; readonly placing: ForeignPlacement | null; readonly textSelection: EditorSelection | null; } 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; } ; 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]: AnnotationToken = createHostToken(PublicAnnotationToken) 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>; } 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'; CapturedAnnotationDraft [InterfaceDeclaration]: export interface CapturedAnnotationDraft{ tool: string; page: PageRef; from: Point; to: Point; } 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; } 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; 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[]; 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'; 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; } 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} ; } 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'} ; RecalibrationReport [InterfaceDeclaration]: export interface RecalibrationReport{ page: PageRef; scale: PdfMeasure; error?: SerializedEngineError; updated: AnnotationRef[]; skipped:{ ref: AnnotationRef; reason: 'no-authority' | 'locked' | 'foreign-measure' | 'unavailable'; } []; failed:{ ref: AnnotationRef; error: SerializedEngineError} []; } 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; } 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; 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; } ThreadDeleteResult [InterfaceDeclaration] (from packages/plugin/annotation/src/contract.ts): export interface ThreadDeleteResult{ readonly deleted: AnnotationRef[]; readonly failed: Array<{ ref: AnnotationRef; error: unknown} >; } 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; } 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} , } ) previewBucket [FunctionDeclaration]: export function previewBucket(devicePixelWidth: number, maxWidth = 4096): number{ const px = Math.max(128, Math.ceil(devicePixelWidth)); return Math.min(maxWidth, 2 ** Math.ceil(Math.log2(px))); }