@embedpdf/engine-core 3.0.0-next.7 → 3.0.0-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/conformance.cjs +1 -1
- package/dist/conformance.js +1 -1
- package/dist/runtime.d.cts +81 -2
- package/dist/runtime.d.ts +81 -2
- package/dist/{schemas-ES6-TkIl.js → schemas-BCuQlwdg.js} +4 -2
- package/dist/{schemas-ES6-TkIl.js.map → schemas-BCuQlwdg.js.map} +1 -1
- package/dist/{schemas-CyWwm0Zf.cjs → schemas-BPA_F2HV.cjs} +4 -2
- package/dist/{schemas-CyWwm0Zf.cjs.map → schemas-BPA_F2HV.cjs.map} +1 -1
- package/dist/wire.cjs +13 -3
- package/dist/wire.cjs.map +1 -1
- package/dist/wire.d.cts +17 -5
- package/dist/wire.d.ts +17 -5
- package/dist/wire.js +13 -3
- package/dist/wire.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas-CyWwm0Zf.cjs","names":["z","z","z","z","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","z","z","EngineErrorCode","charMapViolation"],"sources":["../src/geometry/schemas.ts","../src/dto/PdfAction.schema.ts","../src/annotation/base.schema.ts","../src/annotation/kinds/style.shared.ts","../src/annotation/kinds/caret/schema.ts","../src/annotation/kinds/caret/index.ts","../src/annotation/kinds/shape.shared.ts","../src/annotation/kinds/circle/schema.ts","../src/annotation/kinds/circle/index.ts","../src/dto/Attachment.schema.ts","../src/annotation/kinds/file-attachment/schema.ts","../src/annotation/kinds/file-attachment/index.ts","../src/annotation/kinds/free-text/schema.ts","../src/annotation/kinds/free-text/index.ts","../src/annotation/kinds/text-markup.shared.ts","../src/annotation/kinds/highlight/schema.ts","../src/annotation/kinds/highlight/index.ts","../src/annotation/kinds/ink/schema.ts","../src/annotation/kinds/ink/index.ts","../src/annotation/kinds/line/schema.ts","../src/annotation/kinds/line/index.ts","../src/annotation/kinds/link/schema.ts","../src/annotation/kinds/link/index.ts","../src/annotation/kinds/vertex.shared.ts","../src/annotation/kinds/polygon/schema.ts","../src/annotation/kinds/polygon/index.ts","../src/annotation/kinds/polyline/schema.ts","../src/annotation/kinds/polyline/index.ts","../src/annotation/kinds/redact/schema.ts","../src/annotation/kinds/redact/index.ts","../src/annotation/kinds/square/schema.ts","../src/annotation/kinds/square/index.ts","../src/annotation/kinds/squiggly/schema.ts","../src/annotation/kinds/squiggly/index.ts","../src/annotation/kinds/stamp/schema.ts","../src/annotation/kinds/stamp/index.ts","../src/annotation/kinds/strikeout/schema.ts","../src/annotation/kinds/strikeout/index.ts","../src/annotation/kinds/text/schema.ts","../src/annotation/kinds/text/index.ts","../src/annotation/kinds/underline/schema.ts","../src/annotation/kinds/underline/index.ts","../src/annotation/kinds/unsupported/schema.ts","../src/annotation/kinds/unsupported/index.ts","../src/annotation/kinds/widget.shared.ts","../src/annotation/kinds/widget/schema.ts","../src/annotation/kinds/widget/index.ts","../src/annotation/kinds/index.ts","../src/forms/schema.ts","../src/wire/schemas.ts"],"sourcesContent":["/**\n * Zod schemas for engine PDF-document geometry. Exported from `wire.ts` ONLY\n * (never from `shared.ts`/`runtime`) so the zod-free runtime stays zod-free.\n */\n\nimport { z } from 'zod';\n\nimport type {\n CalloutLine,\n InkList,\n LinePoints,\n PdfPoint,\n PdfQuad,\n PdfRect,\n PdfRotation,\n PdfSize,\n} from './primitives';\n\nexport const PdfPointSchema: z.ZodType<PdfPoint> = z.object({\n x: z.number(),\n y: z.number(),\n});\n\nexport const LinePointsSchema: z.ZodType<LinePoints> = z.object({\n start: PdfPointSchema,\n end: PdfPointSchema,\n});\n\n/** `/CL` callout leader line — two points (straight) or three (knee-jointed). */\nexport const CalloutLineSchema: z.ZodType<CalloutLine> = z.union([\n z.tuple([PdfPointSchema, PdfPointSchema]),\n z.tuple([PdfPointSchema, PdfPointSchema, PdfPointSchema]),\n]);\n\n/** `/InkList` — an array of strokes, each an array of points. */\nexport const InkListSchema: z.ZodType<InkList> = z.array(z.array(PdfPointSchema));\n\nexport const PdfRectSchema: z.ZodType<PdfRect> = z.object({\n left: z.number(),\n bottom: z.number(),\n right: z.number(),\n top: z.number(),\n});\n\nexport const PdfSizeSchema: z.ZodType<PdfSize> = z.object({\n width: z.number().nonnegative(),\n height: z.number().nonnegative(),\n});\n\nexport const PdfQuadSchema: z.ZodType<PdfQuad> = z.object({\n p1: PdfPointSchema,\n p2: PdfPointSchema,\n p3: PdfPointSchema,\n p4: PdfPointSchema,\n});\n\nexport const PdfRotationSchema: z.ZodType<PdfRotation> = z.union([\n z.literal(0),\n z.literal(90),\n z.literal(180),\n z.literal(270),\n]);\n","import { z } from 'zod';\n\nimport type {\n DocumentActionsSnapshot,\n PdfActionNode,\n PdfActionTree,\n PdfAnnotationActions,\n PdfFieldActions,\n PdfPageActions,\n} from './PdfAction';\n\nexport const PdfActionTypeSchema = z.enum([\n 'unknown',\n 'goto',\n 'goto-remote',\n 'goto-embedded',\n 'launch',\n 'thread',\n 'uri',\n 'sound',\n 'movie',\n 'hide',\n 'named',\n 'submit-form',\n 'reset-form',\n 'import-data',\n 'javascript',\n 'set-ocg-state',\n 'rendition',\n 'transition',\n 'goto-3d-view',\n]);\n\nexport const PdfActionNodeSchema: z.ZodType<PdfActionNode> = z.lazy(() =>\n z.object({\n type: PdfActionTypeSchema,\n subtype: z.string(),\n script: z.string().optional(),\n next: z.array(PdfActionNodeSchema),\n }),\n);\n\nexport const PdfActionTreeSchema: z.ZodType<PdfActionTree> = z.object({\n root: PdfActionNodeSchema.nullable(),\n incomplete: z.boolean(),\n warningFlags: z.number().int().nonnegative(),\n warnings: z.array(z.enum(['cycle-dropped', 'malformed-next', 'incomplete'])),\n});\n\nexport const PdfFieldActionsSchema: z.ZodType<PdfFieldActions> = z.object({\n keystroke: PdfActionTreeSchema.optional(),\n format: PdfActionTreeSchema.optional(),\n validate: PdfActionTreeSchema.optional(),\n calculate: PdfActionTreeSchema.optional(),\n});\n\nexport const PdfPageActionsSchema: z.ZodType<PdfPageActions> = z.object({\n open: PdfActionTreeSchema.optional(),\n close: PdfActionTreeSchema.optional(),\n});\n\nexport const PdfAnnotationActionsSchema: z.ZodType<PdfAnnotationActions> = z.object({\n activate: PdfActionTreeSchema.optional(),\n cursorEnter: PdfActionTreeSchema.optional(),\n cursorExit: PdfActionTreeSchema.optional(),\n mouseDown: PdfActionTreeSchema.optional(),\n mouseUp: PdfActionTreeSchema.optional(),\n focus: PdfActionTreeSchema.optional(),\n blur: PdfActionTreeSchema.optional(),\n pageOpen: PdfActionTreeSchema.optional(),\n pageClose: PdfActionTreeSchema.optional(),\n pageVisible: PdfActionTreeSchema.optional(),\n pageInvisible: PdfActionTreeSchema.optional(),\n});\n\nexport const DocumentActionsSnapshotSchema: z.ZodType<DocumentActionsSnapshot> = z.object({\n nameTreeScripts: z.array(\n z.object({\n name: z.string(),\n action: PdfActionTreeSchema,\n }),\n ),\n openAction: PdfActionTreeSchema.nullable(),\n willClose: PdfActionTreeSchema.optional(),\n willSave: PdfActionTreeSchema.optional(),\n didSave: PdfActionTreeSchema.optional(),\n willPrint: PdfActionTreeSchema.optional(),\n didPrint: PdfActionTreeSchema.optional(),\n});\n","import { z } from 'zod';\n\nimport type { AnnotationBase } from './base';\nimport type {\n AnnotationBorderStyle,\n AnnotationFlags,\n BlendMode,\n CaretIntent,\n Color,\n FreeTextIntent,\n InkIntent,\n LineEnding,\n LineEndings,\n PdfRectDifferences,\n StandardFont,\n StrikeoutIntent,\n TextAlignment,\n} from './primitives';\nimport { PdfPointSchema, PdfRectSchema, PdfQuadSchema } from '../geometry/schemas';\nimport type { AnnotationRef } from '../identity/AnnotationRef';\nimport type { AnnotationStableId } from '../identity/AnnotationStableId';\nimport type { RevisionToken } from '../revision/RevisionToken';\nimport { PdfAnnotationActionsSchema } from '../dto/PdfAction.schema';\n\n/** @deprecated Use `PdfPointSchema` from `../geometry/schemas`. */\nexport const PointSchema = PdfPointSchema;\n/** @deprecated Use `PdfRectSchema` from `../geometry/schemas`. */\nexport const RectSchema = PdfRectSchema;\n\nexport const ColorSchema: z.ZodType<Color> = z.object({\n r: z.number().int().min(0).max(255),\n g: z.number().int().min(0).max(255),\n b: z.number().int().min(0).max(255),\n});\n\nexport const AnnotationBorderStyleSchema: z.ZodType<AnnotationBorderStyle> = z.enum([\n 'solid',\n 'dashed',\n 'beveled',\n 'inset',\n]);\n\nexport const PdfRectDifferencesSchema: z.ZodType<PdfRectDifferences> = z.object({\n left: z.number().nonnegative(),\n top: z.number().nonnegative(),\n right: z.number().nonnegative(),\n bottom: z.number().nonnegative(),\n});\n\nexport const LineEndingSchema: z.ZodType<LineEnding> = z.enum([\n 'none',\n 'square',\n 'circle',\n 'diamond',\n 'open-arrow',\n 'closed-arrow',\n 'butt',\n 'r-open-arrow',\n 'r-closed-arrow',\n 'slash',\n]);\n\nexport const LineEndingsSchema: z.ZodType<LineEndings> = z.object({\n start: LineEndingSchema,\n end: LineEndingSchema,\n});\n\nexport const StandardFontSchema: z.ZodType<StandardFont> = z.enum([\n 'courier',\n 'courier-bold',\n 'courier-bold-oblique',\n 'courier-oblique',\n 'helvetica',\n 'helvetica-bold',\n 'helvetica-bold-oblique',\n 'helvetica-oblique',\n 'times-roman',\n 'times-bold',\n 'times-bold-italic',\n 'times-italic',\n 'symbol',\n 'zapf-dingbats',\n]);\n\nexport const TextAlignmentSchema: z.ZodType<TextAlignment> = z.enum(['left', 'center', 'right']);\n\nexport const FreeTextIntentSchema: z.ZodType<FreeTextIntent> = z.enum([\n 'free-text',\n 'free-text-callout',\n]);\n\nexport const CaretIntentSchema: z.ZodType<CaretIntent> = z.literal('replace');\n\nexport const StrikeoutIntentSchema: z.ZodType<StrikeoutIntent> = z.literal('strikeout-text-edit');\n\nexport const InkIntentSchema: z.ZodType<InkIntent> = z.literal('ink-highlight');\n\nexport const BlendModeSchema: z.ZodType<BlendMode> = z.enum([\n 'normal',\n 'multiply',\n 'screen',\n 'overlay',\n 'darken',\n 'lighten',\n 'color-dodge',\n 'color-burn',\n 'hard-light',\n 'soft-light',\n 'difference',\n 'exclusion',\n 'hue',\n 'saturation',\n 'color',\n 'luminosity',\n]);\n\nexport const AnnotationFlagsSchema: z.ZodType<AnnotationFlags> = z.object({\n invisible: z.boolean(),\n hidden: z.boolean(),\n print: z.boolean(),\n noZoom: z.boolean(),\n noRotate: z.boolean(),\n noView: z.boolean(),\n readOnly: z.boolean(),\n locked: z.boolean(),\n toggleNoView: z.boolean(),\n lockedContents: z.boolean(),\n});\n\n/**\n * Partial flag set authorable on a Draft or Patch — every key optional so\n * callers set only the bits they care about. The engine merges these onto\n * the annotation's current `/F` bitset.\n */\nexport const AnnotationFlagsPartialSchema: z.ZodType<Partial<AnnotationFlags>> = z\n .object({\n invisible: z.boolean(),\n hidden: z.boolean(),\n print: z.boolean(),\n noZoom: z.boolean(),\n noRotate: z.boolean(),\n noView: z.boolean(),\n readOnly: z.boolean(),\n locked: z.boolean(),\n toggleNoView: z.boolean(),\n lockedContents: z.boolean(),\n })\n .partial();\n\nexport const AnnotationStableIdSchema: z.ZodType<AnnotationStableId> = z.discriminatedUnion(\n 'kind',\n [\n z.object({ kind: z.literal('objectNumber'), value: z.number().int().nonnegative() }),\n z.object({ kind: z.literal('nm'), value: z.string() }),\n ],\n);\n\nexport const RevisionTokenSchema: z.ZodType<RevisionToken> = z.object({\n docSessionId: z.string(),\n pageObjectNumber: z.number().int().positive(),\n generation: z.number().int().nonnegative(),\n});\n\nexport const AnnotationRefSchema: z.ZodType<AnnotationRef> = z.discriminatedUnion('kind', [\n z.object({\n kind: z.literal('objectNumber'),\n pageObjectNumber: z.number().int().positive(),\n annotObjectNumber: z.number().int().positive(),\n }),\n z.object({\n kind: z.literal('nm'),\n pageObjectNumber: z.number().int().positive(),\n nm: z.string(),\n }),\n z.object({\n kind: z.literal('index'),\n pageObjectNumber: z.number().int().positive(),\n index: z.number().int().nonnegative(),\n revision: RevisionTokenSchema,\n }),\n]);\n\n/**\n * Shared object literal for every per-subtype DTO schema. Each kind's\n * `dto.schema.ts` extends this with its own `subtype` literal and\n * subtype-specific fields. Note that we do NOT include `subtype` here —\n * each kind sets its own literal so `z.discriminatedUnion('subtype', ...)`\n * works at the catalog level.\n */\nexport const AnnotationBaseShape = {\n ref: AnnotationRefSchema,\n pageObjectNumber: z.number().int().positive(),\n index: z.number().int().nonnegative(),\n identityQuality: z.enum(['durable', 'weak']),\n nm: z.string().nullable(),\n flags: AnnotationFlagsSchema,\n rect: PdfRectSchema,\n contents: z.string().nullable(),\n author: z.string().nullable(),\n created: z.string().datetime().nullable(),\n modified: z.string().datetime().nullable(),\n blendMode: BlendModeSchema,\n // /IRT resolved to the parent's ref + /RT. null exactly when top-level.\n inReplyTo: AnnotationRefSchema.nullable(),\n replyType: z.enum(['reply', 'group']).nullable(),\n // EmbedPDF /EMBD_Metadata fields — see AnnotationBase docstring.\n // Optional (absent for legacy or anonymous annotations) and never\n // null on the wire: present-as-string or absent entirely.\n userId: z.string().optional(),\n groupId: z.string().optional(),\n createdBy: z.string().optional(),\n updatedBy: z.string().optional(),\n actions: PdfAnnotationActionsSchema.optional(),\n} as const;\n\n/**\n * Annotation-wide fields shared by every Draft. Per-kind draft schemas\n * spread this alongside their family-specific shape.\n *\n * Authorial identity (/T, /EMBD_Metadata UserID/GroupID) is set by the\n * server from the caller's JWT identity — see the AnnotationDraftBase\n * docstring.\n */\nexport const AnnotationDraftBaseShape = {\n contents: z.string().nullable().optional(),\n blendMode: BlendModeSchema.optional(),\n nm: z.string().optional(),\n flags: AnnotationFlagsPartialSchema.optional(),\n inReplyTo: AnnotationRefSchema.optional(),\n replyType: z.enum(['reply', 'group']).optional(),\n} as const;\n\n/**\n * Annotation-wide fields shared by every Patch. `nm` is monotonic per\n * annotation; clients target an existing annotation via AnnotationRef\n * instead of renaming.\n *\n * `groupId` is the only identity-shaped field on a patch — it\n * represents organizational ownership, and reassignment runs through\n * `checkSetGroup`. See AnnotationPatchBase for the full immutability\n * rules.\n */\nexport const AnnotationPatchBaseShape = {\n contents: z.string().nullable().optional(),\n blendMode: BlendModeSchema.optional(),\n groupId: z.string().min(1).optional(),\n flags: AnnotationFlagsPartialSchema.optional(),\n // Three-state: undefined=leave, null=clear /IRT (+/RT), ref=set/relink.\n inReplyTo: AnnotationRefSchema.nullable().optional(),\n replyType: z.enum(['reply', 'group']).optional(),\n} as const;\n\n/** Helper that asserts `BasePart extends AnnotationBase` without subtype. */\nexport type AnnotationBaseSansSubtype = Omit<AnnotationBase, 'subtype' | 'ref'> & {\n ref: AnnotationRef;\n};\n","import { z } from 'zod';\n\nimport { AnnotationBorderStyleSchema, ColorSchema } from '../base.schema';\nimport type { AnnotationBorderStyle, Color } from '../primitives';\n\n/**\n * Composable styling layers shared by every annotation family, named after\n * the PDF entries they map onto so the v3 wire vocabulary matches ISO 32000:\n *\n * ColorStyleFields -> `/C` (color) + `/CA` (opacity) — universal\n * GeometryStyleFields -> + `/BS` (border style / width / dash) — geometric\n * FilledStyleFields -> + `/IC` (interior color) — filled shapes\n *\n * There is exactly one `/C` in the spec (\"Color\") and one `/IC` (\"Interior\n * Color\") — there is no \"stroke color\" — so every family that carries `/C`\n * exposes the same `color` field. This is what lets a multi-select \"change\n * colour\" operate uniformly across text-markup, lines, and shapes.\n *\n * Composition by family:\n * - text-markup (highlight/underline/squiggly/strikeout) -> ColorStyleFields\n * - ink -> GeometryStyleFields\n * - square/circle/polygon/polyline/line -> FilledStyleFields\n */\n\n// ── /C + /CA — present on every annotation ──────────────────────────────\nexport interface ColorStyleFields {\n /** `/C` color. Stroke colour for geometric kinds; highlight colour for markup. */\n color: Color;\n /** `/CA` constant opacity, 0..1. */\n opacity: number;\n}\n\nexport interface ColorStyleDraftFields {\n color?: Color;\n opacity?: number;\n}\n\nexport type ColorStylePatchFields = ColorStyleDraftFields;\n\nexport const ColorStyleDTOShape = {\n color: ColorSchema,\n opacity: z.number().min(0).max(1),\n} as const;\n\nexport const ColorStyleDraftShape = {\n color: ColorSchema.optional(),\n opacity: z.number().min(0).max(1).optional(),\n} as const;\n\nexport const ColorStylePatchShape = ColorStyleDraftShape;\n\n// ── + /BS — geometric kinds (shapes, vertex, line, ink) ─────────────────\nexport interface GeometryStyleFields extends ColorStyleFields {\n /** `/BS /W` border width, in PDF points. */\n strokeWidth: number;\n /** `/BS /S` border style. */\n borderStyle: AnnotationBorderStyle;\n /** `/BS /D` dash pattern. Only meaningful when `borderStyle === 'dashed'`. */\n dashArray?: number[];\n}\n\nexport interface GeometryStyleDraftFields extends ColorStyleDraftFields {\n strokeWidth?: number;\n borderStyle?: AnnotationBorderStyle;\n dashArray?: number[];\n}\n\nexport type GeometryStylePatchFields = GeometryStyleDraftFields;\n\nexport const GeometryStyleDTOShape = {\n ...ColorStyleDTOShape,\n strokeWidth: z.number().nonnegative(),\n borderStyle: AnnotationBorderStyleSchema,\n dashArray: z.array(z.number().nonnegative()).optional(),\n} as const;\n\nexport const GeometryStyleDraftShape = {\n ...ColorStyleDraftShape,\n strokeWidth: z.number().nonnegative().optional(),\n borderStyle: AnnotationBorderStyleSchema.optional(),\n dashArray: z.array(z.number().nonnegative()).optional(),\n} as const;\n\nexport const GeometryStylePatchShape = GeometryStyleDraftShape;\n\n// ── + /IC — filled geometric kinds (shapes, vertex, line) ───────────────\nexport interface FilledStyleFields extends GeometryStyleFields {\n /** `/IC` interior (fill) color. `null` when the annotation has no fill. */\n interiorColor: Color | null;\n}\n\nexport interface FilledStyleDraftFields extends GeometryStyleDraftFields {\n interiorColor?: Color | null;\n}\n\nexport type FilledStylePatchFields = FilledStyleDraftFields;\n\nexport const FilledStyleDTOShape = {\n ...GeometryStyleDTOShape,\n interiorColor: ColorSchema.nullable(),\n} as const;\n\nexport const FilledStyleDraftShape = {\n ...GeometryStyleDraftShape,\n interiorColor: ColorSchema.nullable().optional(),\n} as const;\n\nexport const FilledStylePatchShape = FilledStyleDraftShape;\n","import { z } from 'zod';\n\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n CaretIntentSchema,\n PdfRectDifferencesSchema,\n} from '../../base.schema';\nimport { ColorStyleDTOShape, ColorStyleDraftShape, ColorStylePatchShape } from '../style.shared';\nimport type { CaretDraft } from './draft';\nimport type { CaretAnnotationDTO } from './dto';\nimport type { CaretPatch } from './patch';\n\nexport const CaretDTOSchema: z.ZodType<CaretAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...ColorStyleDTOShape,\n intent: CaretIntentSchema.nullable(),\n rectDifferences: PdfRectDifferencesSchema.nullable(),\n rotation: z.number().optional(),\n unrotatedRect: PdfRectSchema.optional(),\n subtype: z.literal('caret'),\n}) as unknown as z.ZodType<CaretAnnotationDTO>;\n\nexport const CaretDraftSchema: z.ZodType<CaretDraft> = z.object({\n ...ColorStyleDraftShape,\n ...AnnotationDraftBaseShape,\n intent: CaretIntentSchema.optional(),\n rect: PdfRectSchema,\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('caret'),\n});\n\nexport const CaretPatchSchema: z.ZodType<CaretPatch> = z.object({\n ...ColorStylePatchShape,\n ...AnnotationPatchBaseShape,\n intent: CaretIntentSchema.optional(),\n rect: PdfRectSchema.optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('caret'),\n});\n","import type { CaretDraft } from './draft';\nimport type { CaretAnnotationDTO } from './dto';\nimport type { CaretPatch } from './patch';\nimport { CaretDTOSchema, CaretDraftSchema, CaretPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { CaretAnnotationDTO } from './dto';\nexport type { CaretDraft } from './draft';\nexport type { CaretPatch } from './patch';\nexport { CaretDTOSchema, CaretDraftSchema, CaretPatchSchema } from './schema';\n\nexport const CaretKind: AnnotationKindModule<'caret', CaretAnnotationDTO, CaretDraft, CaretPatch> =\n {\n subtype: 'caret',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.CARET,\n dtoSchema: CaretDTOSchema,\n draftSchema: CaretDraftSchema,\n patchSchema: CaretPatchSchema,\n };\n","import { z } from 'zod';\n\nimport type { PdfRect } from '../../geometry/primitives';\nimport { PdfRectSchema } from '../../geometry/schemas';\nimport type { AnnotationBase } from '../base';\nimport { AnnotationBaseShape, PdfRectDifferencesSchema } from '../base.schema';\nimport type { PdfRectDifferences } from '../primitives';\nimport {\n FilledStyleDTOShape,\n FilledStyleDraftShape,\n FilledStylePatchShape,\n type FilledStyleDraftFields,\n type FilledStyleFields,\n type FilledStylePatchFields,\n} from './style.shared';\n\n/**\n * Shape-family-specific fields. The two shape subtypes (circle/square)\n * share their wire shape per ISO 32000 §12.5.6.8: they are `/Rect`-based\n * outlines with the common stroke/fill styling ({@link FilledStyleFields}),\n * an optional cloudy border effect (`/BE`), and optional rectangle\n * differences (`/RD`).\n *\n * Unlike the text-markup family (which derives `/Rect` from `quadPoints`),\n * shapes carry `/Rect` as their primary geometry — so the Draft requires\n * `rect` explicitly while the DTO inherits it from `AnnotationBase`.\n */\n/**\n * Rotation fields shared by the rotatable box families (shapes + free-text).\n * `rotation` is degrees in PDF convention (the v3 plugin converts its\n * content-space clockwise angle at the boundary); `unrotatedRect` is the\n * logical (pre-rotation) box. Together they drive PDFium's `/EMBD_Metadata`\n * AP rotation (`/Matrix` + `/BBox`); `/Rect` stays the rotated visual AABB.\n */\nexport interface ShapeAnnotationFields extends FilledStyleFields {\n /** `/BE` cloudy border intensity; `null` when the border carries no effect. */\n cloudyIntensity: number | null;\n /** `/RD` rectangle differences (inset of drawn geometry from `/Rect`); `null` when absent. */\n rectDifferences: PdfRectDifferences | null;\n /** `/EMBD_Metadata/Rotation` — degrees, normalized `[0,360)`. */\n rotation?: number;\n /** `/EMBD_Metadata/UnrotatedRect` — the logical box (required when rotation != 0). */\n unrotatedRect?: PdfRect;\n}\n\nexport interface ShapeDraftFields extends FilledStyleDraftFields {\n /** `/Rect` geometry — required for shapes (they are not derived from quads). */\n rect: PdfRect;\n cloudyIntensity?: number | null;\n rectDifferences?: PdfRectDifferences | null;\n rotation?: number | null;\n unrotatedRect?: PdfRect | null;\n}\n\nexport interface ShapePatchFields extends FilledStylePatchFields {\n rect?: PdfRect;\n /** Tri-state (as `interiorColor`): omitted preserves, a value sets, `null` removes `/BE`. */\n cloudyIntensity?: number | null;\n /** Tri-state: omitted preserves, a value sets, `null` removes `/RD`. */\n rectDifferences?: PdfRectDifferences | null;\n /** Tri-state: omitted preserves, `null`/`0` flattens, a value sets (needs the box). */\n rotation?: number | null;\n /** Tri-state: omitted preserves, `null` removes, a value sets. */\n unrotatedRect?: PdfRect | null;\n}\n\nexport const ShapeDTOShape = {\n ...AnnotationBaseShape,\n ...FilledStyleDTOShape,\n cloudyIntensity: z.number().positive().nullable(),\n rectDifferences: PdfRectDifferencesSchema.nullable(),\n rotation: z.number().optional(),\n unrotatedRect: PdfRectSchema.optional(),\n} as const;\n\nexport const ShapeDraftShape = {\n ...FilledStyleDraftShape,\n rect: PdfRectSchema,\n cloudyIntensity: z.number().positive().nullable().optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n} as const;\n\nexport const ShapePatchShape = {\n ...FilledStylePatchShape,\n rect: PdfRectSchema.optional(),\n cloudyIntensity: z.number().positive().nullable().optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n} as const;\n\n/** Glue type used by each shape kind file to construct its concrete DTO. */\nexport type ShapeDTO<S extends string> = AnnotationBase & {\n subtype: S;\n} & ShapeAnnotationFields;\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport { ShapeDTOShape, ShapeDraftShape, ShapePatchShape } from '../shape.shared';\nimport type { CircleDraft } from './draft';\nimport type { CircleAnnotationDTO } from './dto';\nimport type { CirclePatch } from './patch';\n\nexport const CircleDTOSchema: z.ZodType<CircleAnnotationDTO> = z.object({\n ...ShapeDTOShape,\n subtype: z.literal('circle'),\n}) as unknown as z.ZodType<CircleAnnotationDTO>;\n\nexport const CircleDraftSchema: z.ZodType<CircleDraft> = z.object({\n ...ShapeDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('circle'),\n});\n\nexport const CirclePatchSchema: z.ZodType<CirclePatch> = z.object({\n ...ShapePatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('circle'),\n});\n","import type { CircleDraft } from './draft';\nimport type { CircleAnnotationDTO } from './dto';\nimport type { CirclePatch } from './patch';\nimport { CircleDTOSchema, CircleDraftSchema, CirclePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { CircleAnnotationDTO } from './dto';\nexport type { CircleDraft } from './draft';\nexport type { CirclePatch } from './patch';\nexport { CircleDTOSchema, CircleDraftSchema, CirclePatchSchema } from './schema';\n\nexport const CircleKind: AnnotationKindModule<\n 'circle',\n CircleAnnotationDTO,\n CircleDraft,\n CirclePatch\n> = {\n subtype: 'circle',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.CIRCLE,\n dtoSchema: CircleDTOSchema,\n draftSchema: CircleDraftSchema,\n patchSchema: CirclePatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { AttachmentFileInfo, EmbeddedFileItem, EmbeddedFileRef } from './Attachment';\n\n/**\n * Wire schemas for the attachment read vocabulary (see `Attachment.ts`).\n * The write-side `AttachmentFileSource` carries inline bytes and never\n * appears on the wire — its post-normalization form is the kind-owned\n * `WireAttachmentFile` (see `annotation/kinds/file-attachment/schema.ts`).\n */\n\nexport const AttachmentFileInfoSchema: z.ZodType<AttachmentFileInfo> = z.object({\n name: z.string(),\n mimeType: z.string().optional(),\n description: z.string().optional(),\n size: z.number().int().nonnegative().optional(),\n checksum: z.string().optional(),\n creationDate: z.string().optional(),\n});\n\nexport const EmbeddedFileRefSchema: z.ZodType<EmbeddedFileRef> = z.object({\n kind: z.literal('key'),\n key: z.string().min(1),\n});\n\nexport const EmbeddedFileItemSchema: z.ZodType<EmbeddedFileItem> = z.object({\n key: z.string(),\n name: z.string(),\n mimeType: z.string().optional(),\n description: z.string().optional(),\n size: z.number().int().nonnegative().optional(),\n checksum: z.string().optional(),\n creationDate: z.string().optional(),\n index: z.number().int().nonnegative(),\n});\n","import { z } from 'zod';\n\nimport { AttachmentFileInfoSchema } from '../../../dto/Attachment.schema';\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport { ColorStyleDTOShape, ColorStyleDraftShape, ColorStylePatchShape } from '../style.shared';\nimport type { FileAttachmentIcon, FileAttachmentWireDraft, WireAttachmentFile } from './draft';\nimport type { FileAttachmentAnnotationDTO } from './dto';\nimport type { FileAttachmentPatch } from './patch';\n\nexport const FileAttachmentIconSchema: z.ZodType<FileAttachmentIcon> = z.enum([\n 'push-pin',\n 'paperclip',\n 'graph',\n 'tag',\n]);\n\n/** Post-normalization form of the attached file: metadata + resource ref. */\nexport const WireAttachmentFileSchema: z.ZodType<WireAttachmentFile> = z.object({\n resource: z.string().min(1),\n name: z.string().min(1),\n mimeType: z.string().optional(),\n description: z.string().optional(),\n});\n\nexport const FileAttachmentDTOSchema: z.ZodType<FileAttachmentAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...ColorStyleDTOShape,\n icon: FileAttachmentIconSchema,\n file: AttachmentFileInfoSchema,\n subtype: z.literal('file-attachment'),\n}) as unknown as z.ZodType<FileAttachmentAnnotationDTO>;\n\nexport const FileAttachmentWireDraftSchema: z.ZodType<FileAttachmentWireDraft> = z.object({\n ...ColorStyleDraftShape,\n ...AnnotationDraftBaseShape,\n rect: PdfRectSchema,\n file: WireAttachmentFileSchema,\n icon: FileAttachmentIconSchema.optional(),\n subtype: z.literal('file-attachment'),\n});\n\nexport const FileAttachmentPatchSchema: z.ZodType<FileAttachmentPatch> = z.object({\n ...ColorStylePatchShape,\n ...AnnotationPatchBaseShape,\n rect: PdfRectSchema.optional(),\n icon: FileAttachmentIconSchema.optional(),\n subtype: z.literal('file-attachment'),\n});\n","import type { FileAttachmentWireDraft } from './draft';\nimport type { FileAttachmentAnnotationDTO } from './dto';\nimport type { FileAttachmentPatch } from './patch';\nimport {\n FileAttachmentDTOSchema,\n FileAttachmentPatchSchema,\n FileAttachmentWireDraftSchema,\n} from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { FileAttachmentAnnotationDTO } from './dto';\nexport type {\n FileAttachmentDraft,\n FileAttachmentWireDraft,\n FileAttachmentIcon,\n WireAttachmentFile,\n} from './draft';\nexport type { FileAttachmentPatch } from './patch';\nexport {\n FileAttachmentDTOSchema,\n FileAttachmentWireDraftSchema,\n FileAttachmentPatchSchema,\n FileAttachmentIconSchema,\n WireAttachmentFileSchema,\n} from './schema';\nexport { normalizeFileAttachmentDraft, normalizeAttachmentFileSource } from './normalize';\n\n/**\n * WIRE-typed like `StampKind`: the draft schema validates the\n * post-normalization form (`file` as metadata + resource ref). The\n * authoring `FileAttachmentDraft` (inline bytes) is swapped into the\n * public `AnnotationDraft` union in `kinds/index.ts`. The patch carries\n * no binary (`file` is create-only), so its authoring and wire forms are\n * the same type.\n */\nexport const FileAttachmentKind: AnnotationKindModule<\n 'file-attachment',\n FileAttachmentAnnotationDTO,\n FileAttachmentWireDraft,\n FileAttachmentPatch\n> = {\n subtype: 'file-attachment',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.FILEATTACHMENT,\n dtoSchema: FileAttachmentDTOSchema,\n draftSchema: FileAttachmentWireDraftSchema,\n patchSchema: FileAttachmentPatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { FreeTextDraft } from './draft';\nimport type { FreeTextAnnotationDTO } from './dto';\nimport type { FreeTextPatch } from './patch';\nimport { CalloutLineSchema, PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationBorderStyleSchema,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n ColorSchema,\n FreeTextIntentSchema,\n LineEndingSchema,\n PdfRectDifferencesSchema,\n StandardFontSchema,\n TextAlignmentSchema,\n} from '../../base.schema';\nimport type { FreeTextFont } from '../../primitives';\n\n/** Authoring `fontFamily`: a standard font name OR a registered font `key`.\n * Any non-empty string is accepted; the writer resolves which it is (and a\n * key that was never registered fails loud there). The read-back DTO keeps the\n * narrower {@link StandardFontSchema}. */\nconst FreeTextFontSchema = z.string().min(1) as unknown as z.ZodType<FreeTextFont>;\n\nexport const FreeTextDTOSchema: z.ZodType<FreeTextAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n intent: FreeTextIntentSchema,\n fontFamily: StandardFontSchema,\n fontSize: z.number().positive(),\n textAlign: TextAlignmentSchema,\n color: ColorSchema,\n fontColor: ColorSchema.optional(),\n interiorColor: ColorSchema.nullable(),\n opacity: z.number().min(0).max(1),\n strokeWidth: z.number().nonnegative(),\n borderStyle: AnnotationBorderStyleSchema,\n dashArray: z.array(z.number().nonnegative()).optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable(),\n calloutLine: CalloutLineSchema.optional(),\n lineEnding: LineEndingSchema.optional(),\n rotation: z.number().optional(),\n unrotatedRect: PdfRectSchema.optional(),\n subtype: z.literal('free-text'),\n}) as unknown as z.ZodType<FreeTextAnnotationDTO>;\n\nexport const FreeTextDraftSchema: z.ZodType<FreeTextDraft> = z.object({\n ...AnnotationDraftBaseShape,\n intent: FreeTextIntentSchema,\n fontFamily: FreeTextFontSchema,\n fontSize: z.number().positive(),\n textAlign: TextAlignmentSchema,\n rect: PdfRectSchema,\n color: ColorSchema.optional(),\n fontColor: ColorSchema.optional(),\n interiorColor: ColorSchema.nullable().optional(),\n opacity: z.number().min(0).max(1).optional(),\n strokeWidth: z.number().nonnegative().optional(),\n borderStyle: AnnotationBorderStyleSchema.optional(),\n dashArray: z.array(z.number().nonnegative()).optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n calloutLine: CalloutLineSchema.optional(),\n lineEnding: LineEndingSchema.optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('free-text'),\n});\n\nexport const FreeTextPatchSchema: z.ZodType<FreeTextPatch> = z.object({\n ...AnnotationPatchBaseShape,\n intent: FreeTextIntentSchema.optional(),\n fontFamily: FreeTextFontSchema.optional(),\n fontSize: z.number().positive().optional(),\n textAlign: TextAlignmentSchema.optional(),\n rect: PdfRectSchema.optional(),\n color: ColorSchema.optional(),\n fontColor: ColorSchema.optional(),\n interiorColor: ColorSchema.nullable().optional(),\n opacity: z.number().min(0).max(1).optional(),\n strokeWidth: z.number().nonnegative().optional(),\n borderStyle: AnnotationBorderStyleSchema.optional(),\n dashArray: z.array(z.number().nonnegative()).optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n calloutLine: CalloutLineSchema.optional(),\n lineEnding: LineEndingSchema.optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('free-text'),\n});\n","import type { FreeTextDraft } from './draft';\nimport type { FreeTextAnnotationDTO } from './dto';\nimport type { FreeTextPatch } from './patch';\nimport { FreeTextDTOSchema, FreeTextDraftSchema, FreeTextPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { FreeTextAnnotationDTO } from './dto';\nexport type { FreeTextDraft } from './draft';\nexport type { FreeTextPatch } from './patch';\nexport { FreeTextDTOSchema, FreeTextDraftSchema, FreeTextPatchSchema } from './schema';\n\nexport const FreeTextKind: AnnotationKindModule<\n 'free-text',\n FreeTextAnnotationDTO,\n FreeTextDraft,\n FreeTextPatch\n> = {\n subtype: 'free-text',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.FREETEXT,\n dtoSchema: FreeTextDTOSchema,\n draftSchema: FreeTextDraftSchema,\n patchSchema: FreeTextPatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { PdfQuad } from '../../geometry/primitives';\nimport { PdfQuadSchema } from '../../geometry/schemas';\nimport type { AnnotationBase } from '../base';\nimport { AnnotationBaseShape } from '../base.schema';\nimport {\n ColorStyleDTOShape,\n ColorStyleDraftShape,\n ColorStylePatchShape,\n type ColorStyleDraftFields,\n type ColorStyleFields,\n type ColorStylePatchFields,\n} from './style.shared';\n\n/**\n * Text-markup family-specific fields. The four text-markup subtypes\n * (highlight/underline/squiggly/strikeout) share their wire shape per\n * ISO 32000 12.5.6.10: the universal {@link ColorStyleFields} (`/C` color +\n * `/CA` opacity) plus one or more `quadPoints` quads.\n *\n * This file ONLY carries fields that are unique to the text-markup\n * family. Annotation-wide author-metadata (`contents`, `author`, `nm`)\n * lives on `AnnotationDraftBase` / `AnnotationPatchBase`. Each kind's\n * draft/patch type composes the two: family fields + base fields +\n * own `subtype` literal.\n */\nexport interface TextMarkupAnnotationFields extends ColorStyleFields {\n quadPoints: PdfQuad[];\n}\n\nexport interface TextMarkupDraftFields extends ColorStyleDraftFields {\n quadPoints: PdfQuad[];\n}\n\nexport interface TextMarkupPatchFields extends ColorStylePatchFields {\n quadPoints?: PdfQuad[];\n}\n\nexport const TextMarkupDTOShape = {\n ...AnnotationBaseShape,\n ...ColorStyleDTOShape,\n quadPoints: z.array(PdfQuadSchema),\n} as const;\n\nexport const TextMarkupDraftShape = {\n ...ColorStyleDraftShape,\n quadPoints: z.array(PdfQuadSchema),\n} as const;\n\nexport const TextMarkupPatchShape = {\n ...ColorStylePatchShape,\n quadPoints: z.array(PdfQuadSchema).optional(),\n} as const;\n\n/** Glue type used by each kind file to construct its concrete DTO. */\nexport type TextMarkupDTO<S extends string> = AnnotationBase & {\n subtype: S;\n} & TextMarkupAnnotationFields;\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport {\n TextMarkupDTOShape,\n TextMarkupDraftShape,\n TextMarkupPatchShape,\n} from '../text-markup.shared';\nimport type { HighlightDraft } from './draft';\nimport type { HighlightAnnotationDTO } from './dto';\nimport type { HighlightPatch } from './patch';\n\nexport const HighlightDTOSchema: z.ZodType<HighlightAnnotationDTO> = z.object({\n ...TextMarkupDTOShape,\n subtype: z.literal('highlight'),\n}) as unknown as z.ZodType<HighlightAnnotationDTO>;\n\nexport const HighlightDraftSchema: z.ZodType<HighlightDraft> = z.object({\n ...TextMarkupDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('highlight'),\n});\n\nexport const HighlightPatchSchema: z.ZodType<HighlightPatch> = z.object({\n ...TextMarkupPatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('highlight'),\n});\n","import type { HighlightDraft } from './draft';\nimport type { HighlightAnnotationDTO } from './dto';\nimport type { HighlightPatch } from './patch';\nimport { HighlightDTOSchema, HighlightDraftSchema, HighlightPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { HighlightAnnotationDTO } from './dto';\nexport type { HighlightDraft } from './draft';\nexport type { HighlightPatch } from './patch';\nexport { HighlightDTOSchema, HighlightDraftSchema, HighlightPatchSchema } from './schema';\n\nexport const HighlightKind: AnnotationKindModule<\n 'highlight',\n HighlightAnnotationDTO,\n HighlightDraft,\n HighlightPatch\n> = {\n subtype: 'highlight',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.HIGHLIGHT,\n dtoSchema: HighlightDTOSchema,\n draftSchema: HighlightDraftSchema,\n patchSchema: HighlightPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { InkListSchema, PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n InkIntentSchema,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport {\n GeometryStyleDTOShape,\n GeometryStyleDraftShape,\n GeometryStylePatchShape,\n} from '../style.shared';\nimport type { InkDraft } from './draft';\nimport type { InkAnnotationDTO } from './dto';\nimport type { InkPatch } from './patch';\n\nexport const InkDTOSchema: z.ZodType<InkAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...GeometryStyleDTOShape,\n intent: InkIntentSchema.nullable(),\n inkList: InkListSchema,\n rotation: z.number().optional(),\n subtype: z.literal('ink'),\n}) as unknown as z.ZodType<InkAnnotationDTO>;\n\nexport const InkDraftSchema: z.ZodType<InkDraft> = z.object({\n ...GeometryStyleDraftShape,\n ...AnnotationDraftBaseShape,\n intent: InkIntentSchema.optional(),\n inkList: InkListSchema,\n rect: PdfRectSchema,\n rotation: z.number().nullable().optional(),\n subtype: z.literal('ink'),\n});\n\nexport const InkPatchSchema: z.ZodType<InkPatch> = z.object({\n ...GeometryStylePatchShape,\n ...AnnotationPatchBaseShape,\n intent: InkIntentSchema.optional(),\n inkList: InkListSchema.optional(),\n rect: PdfRectSchema.optional(),\n rotation: z.number().nullable().optional(),\n subtype: z.literal('ink'),\n});\n","import type { InkDraft } from './draft';\nimport type { InkAnnotationDTO } from './dto';\nimport type { InkPatch } from './patch';\nimport { InkDTOSchema, InkDraftSchema, InkPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { InkAnnotationDTO } from './dto';\nexport type { InkDraft } from './draft';\nexport type { InkPatch } from './patch';\nexport { InkDTOSchema, InkDraftSchema, InkPatchSchema } from './schema';\n\nexport const InkKind: AnnotationKindModule<'ink', InkAnnotationDTO, InkDraft, InkPatch> = {\n subtype: 'ink',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.INK,\n dtoSchema: InkDTOSchema,\n draftSchema: InkDraftSchema,\n patchSchema: InkPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { LinePointsSchema, PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n LineEndingsSchema,\n} from '../../base.schema';\nimport { FilledStyleDTOShape, FilledStyleDraftShape, FilledStylePatchShape } from '../style.shared';\nimport type { LineDraft } from './draft';\nimport type { LineAnnotationDTO } from './dto';\nimport type { LinePatch } from './patch';\n\nexport const LineDTOSchema: z.ZodType<LineAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...FilledStyleDTOShape,\n linePoints: LinePointsSchema,\n lineEndings: LineEndingsSchema,\n rotation: z.number().optional(),\n subtype: z.literal('line'),\n}) as unknown as z.ZodType<LineAnnotationDTO>;\n\nexport const LineDraftSchema: z.ZodType<LineDraft> = z.object({\n ...FilledStyleDraftShape,\n ...AnnotationDraftBaseShape,\n linePoints: LinePointsSchema,\n rect: PdfRectSchema,\n lineEndings: LineEndingsSchema.optional(),\n rotation: z.number().nullable().optional(),\n subtype: z.literal('line'),\n});\n\nexport const LinePatchSchema: z.ZodType<LinePatch> = z.object({\n ...FilledStylePatchShape,\n ...AnnotationPatchBaseShape,\n linePoints: LinePointsSchema.optional(),\n rect: PdfRectSchema.optional(),\n lineEndings: LineEndingsSchema.optional(),\n rotation: z.number().nullable().optional(),\n subtype: z.literal('line'),\n});\n","import type { LineDraft } from './draft';\nimport type { LineAnnotationDTO } from './dto';\nimport type { LinePatch } from './patch';\nimport { LineDTOSchema, LineDraftSchema, LinePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { LineAnnotationDTO } from './dto';\nexport type { LineDraft } from './draft';\nexport type { LinePatch } from './patch';\nexport { LineDTOSchema, LineDraftSchema, LinePatchSchema } from './schema';\n\nexport const LineKind: AnnotationKindModule<'line', LineAnnotationDTO, LineDraft, LinePatch> = {\n subtype: 'line',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.LINE,\n dtoSchema: LineDTOSchema,\n draftSchema: LineDraftSchema,\n patchSchema: LinePatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { PdfDestination } from '../../../dto/PdfDestination';\nimport type { PdfLinkTarget, PdfLinkTargetWritable } from '../../../dto/PdfLinkTarget';\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport type { LinkDraft } from './draft';\nimport type { LinkAnnotationDTO } from './dto';\nimport type { LinkPatch } from './patch';\n\nconst pageObjectNumber = z.number().int().positive();\n/** Spec-nullable axis value: absent and `null` both mean \"retain current\". */\nconst axis = z.number().nullable().optional();\n\n/**\n * Runtime schema for {@link PdfDestination}. Lives with the link kind (its\n * first wire consumer); the outline/bookmark port reuses it from here.\n */\nexport const PdfDestinationSchema: z.ZodType<PdfDestination> = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('xyz'), pageObjectNumber, left: axis, top: axis, zoom: axis }),\n z.object({ kind: z.literal('fit'), pageObjectNumber }),\n z.object({ kind: z.literal('fitH'), pageObjectNumber, top: axis }),\n z.object({ kind: z.literal('fitV'), pageObjectNumber, left: axis }),\n z.object({\n kind: z.literal('fitR'),\n pageObjectNumber,\n left: z.number(),\n bottom: z.number(),\n right: z.number(),\n top: z.number(),\n }),\n z.object({ kind: z.literal('fitB'), pageObjectNumber }),\n z.object({ kind: z.literal('fitBH'), pageObjectNumber, top: axis }),\n z.object({ kind: z.literal('fitBV'), pageObjectNumber, left: axis }),\n]) as unknown as z.ZodType<PdfDestination>;\n\nconst GotoTargetSchema = z.object({ kind: z.literal('goto'), destination: PdfDestinationSchema });\nconst UriTargetSchema = z.object({ kind: z.literal('uri'), uri: z.string() });\n\nexport const PdfLinkTargetSchema: z.ZodType<PdfLinkTarget> = z.discriminatedUnion('kind', [\n GotoTargetSchema,\n UriTargetSchema,\n z.object({ kind: z.literal('goto-remote'), file: z.string() }),\n z.object({ kind: z.literal('launch'), path: z.string() }),\n z.object({ kind: z.literal('javascript') }),\n z.object({ kind: z.literal('named'), name: z.string() }),\n z.object({ kind: z.literal('unsupported') }),\n]) as unknown as z.ZodType<PdfLinkTarget>;\n\n/** Drafts/patches only author `goto`/`uri` — see {@link PdfLinkTargetWritable}. */\nexport const PdfLinkTargetWritableSchema: z.ZodType<PdfLinkTargetWritable> = z.discriminatedUnion(\n 'kind',\n [GotoTargetSchema, UriTargetSchema],\n) as unknown as z.ZodType<PdfLinkTargetWritable>;\n\nexport const LinkDTOSchema: z.ZodType<LinkAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n subtype: z.literal('link'),\n target: PdfLinkTargetSchema.nullable(),\n}) as unknown as z.ZodType<LinkAnnotationDTO>;\n\nexport const LinkDraftSchema: z.ZodType<LinkDraft> = z.object({\n ...AnnotationDraftBaseShape,\n subtype: z.literal('link'),\n rect: PdfRectSchema,\n target: PdfLinkTargetWritableSchema.nullable(),\n}) as unknown as z.ZodType<LinkDraft>;\n\nexport const LinkPatchSchema: z.ZodType<LinkPatch> = z.object({\n ...AnnotationPatchBaseShape,\n subtype: z.literal('link'),\n rect: PdfRectSchema.optional(),\n // Three-state: undefined=leave, value=replace /A, null=clear the target.\n target: PdfLinkTargetWritableSchema.nullable().optional(),\n}) as unknown as z.ZodType<LinkPatch>;\n","import type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\nimport type { LinkDraft } from './draft';\nimport type { LinkAnnotationDTO } from './dto';\nimport type { LinkPatch } from './patch';\nimport { LinkDTOSchema, LinkDraftSchema, LinkPatchSchema } from './schema';\n\nexport type { LinkAnnotationDTO } from './dto';\nexport type { LinkDraft } from './draft';\nexport type { LinkPatch } from './patch';\nexport {\n LinkDTOSchema,\n LinkDraftSchema,\n LinkPatchSchema,\n PdfDestinationSchema,\n PdfLinkTargetSchema,\n PdfLinkTargetWritableSchema,\n} from './schema';\n\nexport const LinkKind: AnnotationKindModule<'link', LinkAnnotationDTO, LinkDraft, LinkPatch> = {\n subtype: 'link',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.LINK,\n dtoSchema: LinkDTOSchema,\n draftSchema: LinkDraftSchema,\n patchSchema: LinkPatchSchema,\n};\n","import { z } from 'zod';\n\nimport {\n FilledStyleDTOShape,\n FilledStyleDraftShape,\n FilledStylePatchShape,\n type FilledStyleDraftFields,\n type FilledStyleFields,\n type FilledStylePatchFields,\n} from './style.shared';\nimport type { PdfPoint, PdfRect } from '../../geometry/primitives';\nimport { PdfPointSchema } from '../../geometry/schemas';\nimport { PdfRectSchema } from '../../geometry/schemas';\nimport type { AnnotationBase } from '../base';\nimport { AnnotationBaseShape } from '../base.schema';\n\n/**\n * Vertex-family-specific fields. The two vertex subtypes (polygon/polyline)\n * carry their geometry as a `/Vertices` point list (ISO 32000 §12.5.6.9)\n * plus the common stroke/fill styling ({@link FilledStyleFields}). Polygon\n * layers a cloudy border (`/BE`) on top; polyline layers line endings\n * (`/LE`); each kind file adds those. (Polygon does not use `/RD` — its\n * geometry is fully described by `/Vertices` + `/Rect`, so `/RD` is for the\n * shape family only.)\n *\n * Like shapes, the engine takes an explicit `/Rect` on the Draft (the v3\n * plugin owns the bounding-box + rotation math, so the engine stays a\n * faithful persistence layer); the DTO inherits `rect` from\n * `AnnotationBase`.\n */\nexport interface VertexAnnotationFields extends FilledStyleFields {\n /** `/Vertices` — the ordered point list (PDF user space, y-up). */\n vertices: PdfPoint[];\n /**\n * `/EMBD_Metadata/Rotation` — ADVISORY rotation (degrees, PDF convention). The\n * vertices are already rotated (they ARE the portable visual); this scalar\n * just records the applied angle so EmbedPDF can show an oriented selection\n * box and offer reset. It carries NO `unrotatedRect`, so it is inert for AP\n * (PDFium ignores a lone `Rotation`).\n */\n rotation?: number;\n}\n\nexport interface VertexDraftFields extends FilledStyleDraftFields {\n /** `/Vertices` geometry — required (vertex annotations are not derived). */\n vertices: PdfPoint[];\n /** `/Rect` bounding box — required (computed by the caller/plugin). */\n rect: PdfRect;\n /** Advisory rotation (deg). See {@link VertexAnnotationFields.rotation}. */\n rotation?: number | null;\n}\n\nexport interface VertexPatchFields extends FilledStylePatchFields {\n vertices?: PdfPoint[];\n rect?: PdfRect;\n /** Tri-state: omitted preserves, `null`/`0` clears the advisory scalar. */\n rotation?: number | null;\n}\n\nexport const VertexDTOShape = {\n ...AnnotationBaseShape,\n ...FilledStyleDTOShape,\n vertices: z.array(PdfPointSchema),\n rotation: z.number().optional(),\n} as const;\n\nexport const VertexDraftShape = {\n ...FilledStyleDraftShape,\n vertices: z.array(PdfPointSchema),\n rect: PdfRectSchema,\n rotation: z.number().nullable().optional(),\n} as const;\n\nexport const VertexPatchShape = {\n ...FilledStylePatchShape,\n vertices: z.array(PdfPointSchema).optional(),\n rect: PdfRectSchema.optional(),\n rotation: z.number().nullable().optional(),\n} as const;\n\n/** Glue type used by each vertex kind file to construct its concrete DTO. */\nexport type VertexDTO<S extends string> = AnnotationBase & {\n subtype: S;\n} & VertexAnnotationFields;\n","import { z } from 'zod';\n\nimport { PdfPointSchema } from '../../../geometry/schemas';\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport { VertexDTOShape, VertexDraftShape, VertexPatchShape } from '../vertex.shared';\nimport type { PolygonDraft } from './draft';\nimport type { PolygonAnnotationDTO } from './dto';\nimport type { PolygonPatch } from './patch';\n\nexport const PolygonDTOSchema: z.ZodType<PolygonAnnotationDTO> = z.object({\n ...VertexDTOShape,\n vertices: z.array(PdfPointSchema).min(3),\n cloudyIntensity: z.number().positive().nullable(),\n subtype: z.literal('polygon'),\n}) as unknown as z.ZodType<PolygonAnnotationDTO>;\n\nexport const PolygonDraftSchema: z.ZodType<PolygonDraft> = z.object({\n ...VertexDraftShape,\n ...AnnotationDraftBaseShape,\n vertices: z.array(PdfPointSchema).min(3),\n cloudyIntensity: z.number().positive().nullable().optional(),\n subtype: z.literal('polygon'),\n});\n\nexport const PolygonPatchSchema: z.ZodType<PolygonPatch> = z.object({\n ...VertexPatchShape,\n ...AnnotationPatchBaseShape,\n vertices: z.array(PdfPointSchema).min(3).optional(),\n cloudyIntensity: z.number().positive().nullable().optional(),\n subtype: z.literal('polygon'),\n});\n","import type { PolygonDraft } from './draft';\nimport type { PolygonAnnotationDTO } from './dto';\nimport type { PolygonPatch } from './patch';\nimport { PolygonDTOSchema, PolygonDraftSchema, PolygonPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { PolygonAnnotationDTO } from './dto';\nexport type { PolygonDraft } from './draft';\nexport type { PolygonPatch } from './patch';\nexport { PolygonDTOSchema, PolygonDraftSchema, PolygonPatchSchema } from './schema';\n\nexport const PolygonKind: AnnotationKindModule<\n 'polygon',\n PolygonAnnotationDTO,\n PolygonDraft,\n PolygonPatch\n> = {\n subtype: 'polygon',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.POLYGON,\n dtoSchema: PolygonDTOSchema,\n draftSchema: PolygonDraftSchema,\n patchSchema: PolygonPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { PdfPointSchema } from '../../../geometry/schemas';\nimport {\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n LineEndingsSchema,\n} from '../../base.schema';\nimport { VertexDTOShape, VertexDraftShape, VertexPatchShape } from '../vertex.shared';\nimport type { PolylineDraft } from './draft';\nimport type { PolylineAnnotationDTO } from './dto';\nimport type { PolylinePatch } from './patch';\n\nexport const PolylineDTOSchema: z.ZodType<PolylineAnnotationDTO> = z.object({\n ...VertexDTOShape,\n vertices: z.array(PdfPointSchema).min(2),\n lineEndings: LineEndingsSchema,\n subtype: z.literal('polyline'),\n}) as unknown as z.ZodType<PolylineAnnotationDTO>;\n\nexport const PolylineDraftSchema: z.ZodType<PolylineDraft> = z.object({\n ...VertexDraftShape,\n ...AnnotationDraftBaseShape,\n vertices: z.array(PdfPointSchema).min(2),\n lineEndings: LineEndingsSchema.optional(),\n subtype: z.literal('polyline'),\n});\n\nexport const PolylinePatchSchema: z.ZodType<PolylinePatch> = z.object({\n ...VertexPatchShape,\n ...AnnotationPatchBaseShape,\n vertices: z.array(PdfPointSchema).min(2).optional(),\n lineEndings: LineEndingsSchema.optional(),\n subtype: z.literal('polyline'),\n});\n","import type { PolylineDraft } from './draft';\nimport type { PolylineAnnotationDTO } from './dto';\nimport type { PolylinePatch } from './patch';\nimport { PolylineDTOSchema, PolylineDraftSchema, PolylinePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { PolylineAnnotationDTO } from './dto';\nexport type { PolylineDraft } from './draft';\nexport type { PolylinePatch } from './patch';\nexport { PolylineDTOSchema, PolylineDraftSchema, PolylinePatchSchema } from './schema';\n\nexport const PolylineKind: AnnotationKindModule<\n 'polyline',\n PolylineAnnotationDTO,\n PolylineDraft,\n PolylinePatch\n> = {\n subtype: 'polyline',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.POLYLINE,\n dtoSchema: PolylineDTOSchema,\n draftSchema: PolylineDraftSchema,\n patchSchema: PolylinePatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { RedactDraft } from './draft';\nimport type { RedactAnnotationDTO } from './dto';\nimport type { RedactPatch } from './patch';\nimport { PdfQuadSchema, PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n ColorSchema,\n StandardFontSchema,\n TextAlignmentSchema,\n} from '../../base.schema';\nimport type { FreeTextFont } from '../../primitives';\n\n/** Authoring `fontFamily`: a standard font name OR a registered font `key`.\n * Any non-empty string is accepted; the writer resolves which it is (and a\n * key that was never registered fails loud there). The read-back DTO keeps\n * the narrower {@link StandardFontSchema}. */\nconst RedactFontSchema = z.string().min(1) as unknown as z.ZodType<FreeTextFont>;\n\n/** `/DA` size — unlike free text, `0` is meaningful for a redaction label:\n * auto-fit to the region. */\nconst RedactFontSizeSchema = z.number().nonnegative();\n\nexport const RedactDTOSchema: z.ZodType<RedactAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n quadPoints: z.array(PdfQuadSchema),\n color: ColorSchema,\n opacity: z.number().min(0).max(1),\n interiorColor: ColorSchema.nullable(),\n overlayText: z.string().nullable(),\n repeat: z.boolean(),\n fontFamily: StandardFontSchema,\n fontSize: RedactFontSizeSchema,\n fontColor: ColorSchema,\n textAlign: TextAlignmentSchema,\n subtype: z.literal('redact'),\n}) as unknown as z.ZodType<RedactAnnotationDTO>;\n\nexport const RedactDraftSchema: z.ZodType<RedactDraft> = z.object({\n ...AnnotationDraftBaseShape,\n rect: PdfRectSchema,\n quadPoints: z.array(PdfQuadSchema).optional(),\n color: ColorSchema.optional(),\n opacity: z.number().min(0).max(1).optional(),\n interiorColor: ColorSchema.nullable().optional(),\n overlayText: z.string().optional(),\n repeat: z.boolean().optional(),\n fontFamily: RedactFontSchema.optional(),\n fontSize: RedactFontSizeSchema.optional(),\n fontColor: ColorSchema.optional(),\n textAlign: TextAlignmentSchema.optional(),\n subtype: z.literal('redact'),\n});\n\nexport const RedactPatchSchema: z.ZodType<RedactPatch> = z.object({\n ...AnnotationPatchBaseShape,\n rect: PdfRectSchema.optional(),\n quadPoints: z.array(PdfQuadSchema).optional(),\n color: ColorSchema.optional(),\n opacity: z.number().min(0).max(1).optional(),\n interiorColor: ColorSchema.nullable().optional(),\n overlayText: z.string().nullable().optional(),\n repeat: z.boolean().optional(),\n fontFamily: RedactFontSchema.optional(),\n fontSize: RedactFontSizeSchema.optional(),\n fontColor: ColorSchema.optional(),\n textAlign: TextAlignmentSchema.optional(),\n subtype: z.literal('redact'),\n});\n","import type { RedactDraft } from './draft';\nimport type { RedactAnnotationDTO } from './dto';\nimport type { RedactPatch } from './patch';\nimport { RedactDTOSchema, RedactDraftSchema, RedactPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { RedactAnnotationDTO } from './dto';\nexport type { RedactDraft } from './draft';\nexport type { RedactPatch } from './patch';\nexport { RedactDTOSchema, RedactDraftSchema, RedactPatchSchema } from './schema';\n\nexport const RedactKind: AnnotationKindModule<\n 'redact',\n RedactAnnotationDTO,\n RedactDraft,\n RedactPatch\n> = {\n subtype: 'redact',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.REDACT,\n dtoSchema: RedactDTOSchema,\n draftSchema: RedactDraftSchema,\n patchSchema: RedactPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport { ShapeDTOShape, ShapeDraftShape, ShapePatchShape } from '../shape.shared';\nimport type { SquareDraft } from './draft';\nimport type { SquareAnnotationDTO } from './dto';\nimport type { SquarePatch } from './patch';\n\nexport const SquareDTOSchema: z.ZodType<SquareAnnotationDTO> = z.object({\n ...ShapeDTOShape,\n subtype: z.literal('square'),\n}) as unknown as z.ZodType<SquareAnnotationDTO>;\n\nexport const SquareDraftSchema: z.ZodType<SquareDraft> = z.object({\n ...ShapeDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('square'),\n});\n\nexport const SquarePatchSchema: z.ZodType<SquarePatch> = z.object({\n ...ShapePatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('square'),\n});\n","import type { SquareDraft } from './draft';\nimport type { SquareAnnotationDTO } from './dto';\nimport type { SquarePatch } from './patch';\nimport { SquareDTOSchema, SquareDraftSchema, SquarePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { SquareAnnotationDTO } from './dto';\nexport type { SquareDraft } from './draft';\nexport type { SquarePatch } from './patch';\nexport { SquareDTOSchema, SquareDraftSchema, SquarePatchSchema } from './schema';\n\nexport const SquareKind: AnnotationKindModule<\n 'square',\n SquareAnnotationDTO,\n SquareDraft,\n SquarePatch\n> = {\n subtype: 'square',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.SQUARE,\n dtoSchema: SquareDTOSchema,\n draftSchema: SquareDraftSchema,\n patchSchema: SquarePatchSchema,\n};\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport {\n TextMarkupDTOShape,\n TextMarkupDraftShape,\n TextMarkupPatchShape,\n} from '../text-markup.shared';\nimport type { SquigglyDraft } from './draft';\nimport type { SquigglyAnnotationDTO } from './dto';\nimport type { SquigglyPatch } from './patch';\n\nexport const SquigglyDTOSchema: z.ZodType<SquigglyAnnotationDTO> = z.object({\n ...TextMarkupDTOShape,\n subtype: z.literal('squiggly'),\n}) as unknown as z.ZodType<SquigglyAnnotationDTO>;\n\nexport const SquigglyDraftSchema: z.ZodType<SquigglyDraft> = z.object({\n ...TextMarkupDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('squiggly'),\n});\n\nexport const SquigglyPatchSchema: z.ZodType<SquigglyPatch> = z.object({\n ...TextMarkupPatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('squiggly'),\n});\n","import type { SquigglyDraft } from './draft';\nimport type { SquigglyAnnotationDTO } from './dto';\nimport type { SquigglyPatch } from './patch';\nimport { SquigglyDTOSchema, SquigglyDraftSchema, SquigglyPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { SquigglyAnnotationDTO } from './dto';\nexport type { SquigglyDraft } from './draft';\nexport type { SquigglyPatch } from './patch';\nexport { SquigglyDTOSchema, SquigglyDraftSchema, SquigglyPatchSchema } from './schema';\n\nexport const SquigglyKind: AnnotationKindModule<\n 'squiggly',\n SquigglyAnnotationDTO,\n SquigglyDraft,\n SquigglyPatch\n> = {\n subtype: 'squiggly',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.SQUIGGLY,\n dtoSchema: SquigglyDTOSchema,\n draftSchema: SquigglyDraftSchema,\n patchSchema: SquigglyPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport type { ResourceRef } from '../../../resource/BinarySource';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport type { StampWireDraft } from './draft';\nimport type { StampAnnotationDTO } from './dto';\nimport type { StampWirePatch } from './patch';\n\n/**\n * Schemas validate the WIRE forms. The authoring types (`StampDraft`,\n * `StampPatch`) carry inline `BinarySource` bytes and are normalized to\n * these shapes before validation — see `annotation/normalize.ts`.\n */\n\nexport const ResourceRefSchema: z.ZodType<ResourceRef> = z.object({\n resource: z.string().min(1),\n});\n\nconst StampFitSchema = z.enum(['contain', 'cover', 'fill']);\n\nexport const StampDTOSchema: z.ZodType<StampAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n name: z.string().nullable(),\n rotation: z.number().optional(),\n unrotatedRect: PdfRectSchema.optional(),\n subtype: z.literal('stamp'),\n}) as unknown as z.ZodType<StampAnnotationDTO>;\n\nexport const StampWireDraftSchema: z.ZodType<StampWireDraft> = z.object({\n ...AnnotationDraftBaseShape,\n rect: PdfRectSchema,\n source: ResourceRefSchema,\n name: z.string().optional(),\n fit: StampFitSchema.optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('stamp'),\n});\n\nexport const StampWirePatchSchema: z.ZodType<StampWirePatch> = z.object({\n ...AnnotationPatchBaseShape,\n rect: PdfRectSchema.optional(),\n source: ResourceRefSchema.optional(),\n name: z.string().optional(),\n fit: StampFitSchema.optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('stamp'),\n});\n","import type { StampDraft, StampWireDraft } from './draft';\nimport type { StampAnnotationDTO } from './dto';\nimport type { StampPatch, StampWirePatch } from './patch';\nimport { StampDTOSchema, StampWireDraftSchema, StampWirePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { StampAnnotationDTO } from './dto';\nexport type { StampDraft, StampWireDraft, StampFit } from './draft';\nexport type { StampPatch, StampWirePatch } from './patch';\nexport {\n StampDTOSchema,\n StampWireDraftSchema,\n StampWirePatchSchema,\n ResourceRefSchema,\n} from './schema';\nexport { normalizeStampDraft, normalizeStampPatch } from './normalize';\n\n/**\n * The kind module is WIRE-typed (schemas validate the post-normalization\n * form). The authoring types with inline bytes (`StampDraft`, `StampPatch`)\n * are swapped into the public `AnnotationDraft`/`AnnotationPatch` unions in\n * `kinds/index.ts`; `annotation/normalize.ts` bridges the two.\n */\nexport const StampKind: AnnotationKindModule<\n 'stamp',\n StampAnnotationDTO,\n StampWireDraft,\n StampWirePatch\n> = {\n subtype: 'stamp',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.STAMP,\n dtoSchema: StampDTOSchema,\n draftSchema: StampWireDraftSchema,\n patchSchema: StampWirePatchSchema,\n};\n","import { z } from 'zod';\n\nimport {\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n StrikeoutIntentSchema,\n} from '../../base.schema';\nimport {\n TextMarkupDTOShape,\n TextMarkupDraftShape,\n TextMarkupPatchShape,\n} from '../text-markup.shared';\nimport type { StrikeoutDraft } from './draft';\nimport type { StrikeoutAnnotationDTO } from './dto';\nimport type { StrikeoutPatch } from './patch';\n\nexport const StrikeoutDTOSchema: z.ZodType<StrikeoutAnnotationDTO> = z.object({\n ...TextMarkupDTOShape,\n intent: StrikeoutIntentSchema.nullable(),\n subtype: z.literal('strikeout'),\n}) as unknown as z.ZodType<StrikeoutAnnotationDTO>;\n\nexport const StrikeoutDraftSchema: z.ZodType<StrikeoutDraft> = z.object({\n ...TextMarkupDraftShape,\n ...AnnotationDraftBaseShape,\n intent: StrikeoutIntentSchema.optional(),\n subtype: z.literal('strikeout'),\n});\n\nexport const StrikeoutPatchSchema: z.ZodType<StrikeoutPatch> = z.object({\n ...TextMarkupPatchShape,\n ...AnnotationPatchBaseShape,\n intent: StrikeoutIntentSchema.optional(),\n subtype: z.literal('strikeout'),\n});\n","import type { StrikeoutDraft } from './draft';\nimport type { StrikeoutAnnotationDTO } from './dto';\nimport type { StrikeoutPatch } from './patch';\nimport { StrikeoutDTOSchema, StrikeoutDraftSchema, StrikeoutPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { StrikeoutAnnotationDTO } from './dto';\nexport type { StrikeoutDraft } from './draft';\nexport type { StrikeoutPatch } from './patch';\nexport { StrikeoutDTOSchema, StrikeoutDraftSchema, StrikeoutPatchSchema } from './schema';\n\nexport const StrikeoutKind: AnnotationKindModule<\n 'strikeout',\n StrikeoutAnnotationDTO,\n StrikeoutDraft,\n StrikeoutPatch\n> = {\n subtype: 'strikeout',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.STRIKEOUT,\n dtoSchema: StrikeoutDTOSchema,\n draftSchema: StrikeoutDraftSchema,\n patchSchema: StrikeoutPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport { ColorStyleDTOShape, ColorStyleDraftShape, ColorStylePatchShape } from '../style.shared';\nimport type { NoteIcon, TextDraft } from './draft';\nimport type { TextAnnotationDTO } from './dto';\nimport type { TextPatch } from './patch';\n\nexport const NoteIconSchema: z.ZodType<NoteIcon> = z.enum([\n 'comment',\n 'key',\n 'note',\n 'help',\n 'new-paragraph',\n 'paragraph',\n 'insert',\n]);\n\nexport const TextDTOSchema: z.ZodType<TextAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...ColorStyleDTOShape,\n icon: NoteIconSchema,\n subtype: z.literal('text'),\n}) as unknown as z.ZodType<TextAnnotationDTO>;\n\nexport const TextDraftSchema: z.ZodType<TextDraft> = z.object({\n ...ColorStyleDraftShape,\n ...AnnotationDraftBaseShape,\n rect: PdfRectSchema,\n icon: NoteIconSchema.optional(),\n subtype: z.literal('text'),\n});\n\nexport const TextPatchSchema: z.ZodType<TextPatch> = z.object({\n ...ColorStylePatchShape,\n ...AnnotationPatchBaseShape,\n rect: PdfRectSchema.optional(),\n icon: NoteIconSchema.optional(),\n subtype: z.literal('text'),\n});\n","import type { TextDraft } from './draft';\nimport type { TextAnnotationDTO } from './dto';\nimport type { TextPatch } from './patch';\nimport { TextDTOSchema, TextDraftSchema, TextPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { TextAnnotationDTO } from './dto';\nexport type { TextDraft, NoteIcon } from './draft';\nexport type { TextPatch } from './patch';\nexport { TextDTOSchema, TextDraftSchema, TextPatchSchema, NoteIconSchema } from './schema';\n\nexport const TextKind: AnnotationKindModule<'text', TextAnnotationDTO, TextDraft, TextPatch> = {\n subtype: 'text',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.TEXT,\n dtoSchema: TextDTOSchema,\n draftSchema: TextDraftSchema,\n patchSchema: TextPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport {\n TextMarkupDTOShape,\n TextMarkupDraftShape,\n TextMarkupPatchShape,\n} from '../text-markup.shared';\nimport type { UnderlineDraft } from './draft';\nimport type { UnderlineAnnotationDTO } from './dto';\nimport type { UnderlinePatch } from './patch';\n\nexport const UnderlineDTOSchema: z.ZodType<UnderlineAnnotationDTO> = z.object({\n ...TextMarkupDTOShape,\n subtype: z.literal('underline'),\n}) as unknown as z.ZodType<UnderlineAnnotationDTO>;\n\nexport const UnderlineDraftSchema: z.ZodType<UnderlineDraft> = z.object({\n ...TextMarkupDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('underline'),\n});\n\nexport const UnderlinePatchSchema: z.ZodType<UnderlinePatch> = z.object({\n ...TextMarkupPatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('underline'),\n});\n","import type { UnderlineDraft } from './draft';\nimport type { UnderlineAnnotationDTO } from './dto';\nimport type { UnderlinePatch } from './patch';\nimport { UnderlineDTOSchema, UnderlineDraftSchema, UnderlinePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { UnderlineAnnotationDTO } from './dto';\nexport type { UnderlineDraft } from './draft';\nexport type { UnderlinePatch } from './patch';\nexport { UnderlineDTOSchema, UnderlineDraftSchema, UnderlinePatchSchema } from './schema';\n\nexport const UnderlineKind: AnnotationKindModule<\n 'underline',\n UnderlineAnnotationDTO,\n UnderlineDraft,\n UnderlinePatch\n> = {\n subtype: 'underline',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.UNDERLINE,\n dtoSchema: UnderlineDTOSchema,\n draftSchema: UnderlineDraftSchema,\n patchSchema: UnderlinePatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { UnsupportedAnnotationDTO } from './dto';\nimport { AnnotationBaseShape } from '../../base.schema';\n\nexport const UnsupportedDTOSchema: z.ZodType<UnsupportedAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n subtype: z.literal('unsupported'),\n rawSubtypeCode: z.number().int(),\n rawSubtypeName: z.string().nullable(),\n}) as unknown as z.ZodType<UnsupportedAnnotationDTO>;\n\nexport const UnsupportedDraftSchema: z.ZodType<never> = z.never();\nexport const UnsupportedPatchSchema: z.ZodType<never> = z.never();\n","import type { UnsupportedAnnotationDTO } from './dto';\nimport { UnsupportedDTOSchema, UnsupportedDraftSchema, UnsupportedPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { UnsupportedAnnotationDTO } from './dto';\nexport type { UnsupportedDraft } from './draft';\nexport type { UnsupportedPatch } from './patch';\nexport { UnsupportedDTOSchema, UnsupportedDraftSchema, UnsupportedPatchSchema } from './schema';\n\nexport const UnsupportedKind: AnnotationKindModule<\n 'unsupported',\n UnsupportedAnnotationDTO,\n never,\n never\n> = {\n subtype: 'unsupported',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.UNKNOWN,\n dtoSchema: UnsupportedDTOSchema,\n draftSchema: UnsupportedDraftSchema,\n patchSchema: UnsupportedPatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { AnnotationBorderStyle, Color, StandardFont, TextAlignment } from '../primitives';\nimport {\n AnnotationBorderStyleSchema,\n ColorSchema,\n StandardFontSchema,\n TextAlignmentSchema,\n} from '../base.schema';\n\n/**\n * Widget-plane styling, using the same vocabulary as the sibling kinds\n * (`color` strokes the border, `interiorColor` fills, `strokeWidth` is the\n * border width — the free-text/shape convention) mapped onto the widget\n * dictionaries: /MK for colors, /BS for the border, /DA for the text\n * defaults, /Q for alignment.\n *\n * These fields are shared VERBATIM with `doc.forms` authoring: a\n * `WidgetPlacement.appearance` in `createField` is exactly\n * {@link WidgetAppearance}, and one writer applies both underneath.\n */\nexport interface WidgetStyleFields {\n /** `/MK /BC` — border colour. `null` when the widget draws no border colour. */\n color: Color | null;\n /** `/MK /BG` — background. `null` = transparent (no entry). */\n interiorColor: Color | null;\n /** `/BS /W` — border width. */\n strokeWidth: number;\n /** `/BS /S` — border style. */\n borderStyle: AnnotationBorderStyle;\n /** `/DA` font. Absent when the widget has no default appearance. */\n fontFamily?: StandardFont;\n /** `/DA` size; `0` = auto-size. */\n fontSize?: number;\n /** `/DA` colour. */\n fontColor?: Color;\n /** `/Q`. */\n textAlign: TextAlignment;\n}\n\nexport interface WidgetStyleDraftFields {\n /** `/MK /BC`. `null` = write no border colour. */\n color?: Color | null;\n /** `/MK /BG`. `null` = transparent. */\n interiorColor?: Color | null;\n strokeWidth?: number;\n borderStyle?: AnnotationBorderStyle;\n fontFamily?: StandardFont;\n /** `0` = auto-size. */\n fontSize?: number;\n fontColor?: Color;\n textAlign?: TextAlignment;\n}\n\n/** Patch fields are the draft fields; `null` clears the colour entries. */\nexport type WidgetStylePatchFields = WidgetStyleDraftFields;\n\n/**\n * The widget appearance vocabulary as consumed by `doc.forms` authoring\n * (`WidgetPlacement.appearance`). Identical to the widget annotation\n * draft's style surface — one vocabulary, one writer.\n */\nexport type WidgetAppearance = WidgetStyleDraftFields;\n\nexport const WidgetStyleDTOShape = {\n color: ColorSchema.nullable(),\n interiorColor: ColorSchema.nullable(),\n strokeWidth: z.number().nonnegative(),\n borderStyle: AnnotationBorderStyleSchema,\n fontFamily: StandardFontSchema.optional(),\n fontSize: z.number().nonnegative().optional(),\n fontColor: ColorSchema.optional(),\n textAlign: TextAlignmentSchema,\n} as const;\n\nexport const WidgetStyleDraftShape = {\n color: ColorSchema.nullable().optional(),\n interiorColor: ColorSchema.nullable().optional(),\n strokeWidth: z.number().nonnegative().optional(),\n borderStyle: AnnotationBorderStyleSchema.optional(),\n fontFamily: StandardFontSchema.optional(),\n fontSize: z.number().nonnegative().optional(),\n fontColor: ColorSchema.optional(),\n textAlign: TextAlignmentSchema.optional(),\n} as const;\n\nexport const WidgetStylePatchShape = WidgetStyleDraftShape;\n\nexport const WidgetAppearanceSchema: z.ZodType<WidgetAppearance> = z.object(WidgetStyleDraftShape);\n","import { z } from 'zod';\n\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport {\n WidgetStyleDTOShape,\n WidgetStyleDraftShape,\n WidgetStylePatchShape,\n} from '../widget.shared';\nimport type { WidgetAnnotationDTO } from './dto';\nimport type { WidgetDraft } from './draft';\nimport type { WidgetPatch } from './patch';\n\nexport const WidgetDTOSchema: z.ZodType<WidgetAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...WidgetStyleDTOShape,\n subtype: z.literal('widget'),\n fieldObjectNumber: z.number().int().nonnegative(),\n // Keep in sync with FormFieldFamily (forms/field.ts); inlined to avoid a\n // forms/schema <-> widget schema import loop.\n fieldFamily: z.enum([\n 'text',\n 'checkbox',\n 'radio',\n 'combobox',\n 'listbox',\n 'pushbutton',\n 'signature',\n 'unknown',\n ]),\n}) as unknown as z.ZodType<WidgetAnnotationDTO>;\n\nexport const WidgetDraftSchema: z.ZodType<WidgetDraft> = z.object({\n ...AnnotationDraftBaseShape,\n ...WidgetStyleDraftShape,\n subtype: z.literal('widget'),\n rect: PdfRectSchema,\n}) as unknown as z.ZodType<WidgetDraft>;\n\nexport const WidgetPatchSchema: z.ZodType<WidgetPatch> = z.object({\n ...AnnotationPatchBaseShape,\n ...WidgetStylePatchShape,\n subtype: z.literal('widget'),\n rect: PdfRectSchema.optional(),\n}) as unknown as z.ZodType<WidgetPatch>;\n","import type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\nimport type { WidgetDraft } from './draft';\nimport type { WidgetAnnotationDTO } from './dto';\nimport type { WidgetPatch } from './patch';\nimport { WidgetDTOSchema, WidgetDraftSchema, WidgetPatchSchema } from './schema';\n\nexport type { WidgetAnnotationDTO } from './dto';\nexport type { WidgetDraft } from './draft';\nexport type { WidgetPatch } from './patch';\nexport { WidgetDTOSchema, WidgetDraftSchema, WidgetPatchSchema } from './schema';\n\nexport const WidgetKind: AnnotationKindModule<\n 'widget',\n WidgetAnnotationDTO,\n WidgetDraft,\n WidgetPatch\n> = {\n subtype: 'widget',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.WIDGET,\n dtoSchema: WidgetDTOSchema,\n draftSchema: WidgetDraftSchema,\n patchSchema: WidgetPatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { AnnotationKindModule } from '../registry';\nimport { CaretKind } from './caret';\nimport { CircleKind } from './circle';\nimport type { FileAttachmentDraft, FileAttachmentWireDraft } from './file-attachment';\nimport { FileAttachmentKind } from './file-attachment';\nimport { FreeTextKind } from './free-text';\nimport { HighlightKind } from './highlight';\nimport { InkKind } from './ink';\nimport { LineKind } from './line';\nimport { LinkKind } from './link';\nimport { PolygonKind } from './polygon';\nimport { PolylineKind } from './polyline';\nimport { RedactKind } from './redact';\nimport { SquareKind } from './square';\nimport { SquigglyKind } from './squiggly';\nimport type { StampDraft, StampPatch, StampWireDraft, StampWirePatch } from './stamp';\nimport { StampKind } from './stamp';\nimport { StrikeoutKind } from './strikeout';\nimport { TextKind } from './text';\nimport { UnderlineKind } from './underline';\nimport { UnsupportedKind } from './unsupported';\nimport { WidgetKind } from './widget';\n\nexport * from './highlight';\nexport * from './underline';\nexport * from './squiggly';\nexport * from './strikeout';\nexport * from './circle';\nexport * from './square';\nexport * from './polygon';\nexport * from './polyline';\nexport * from './line';\nexport * from './link';\nexport * from './ink';\nexport * from './free-text';\nexport * from './caret';\nexport * from './text';\nexport * from './stamp';\nexport * from './file-attachment';\nexport * from './widget';\nexport * from './redact';\nexport * from './unsupported';\nexport * from './text-markup.shared';\nexport * from './shape.shared';\nexport * from './style.shared';\nexport * from './vertex.shared';\n\n/**\n * The closed-world catalog of currently-implemented annotation kinds.\n *\n * Adding a new subtype is one folder under `kinds/<name>/` exporting the\n * five files (dto, draft, patch, schema, index) and one entry in this\n * tuple. The discriminated unions and zod discriminator below regenerate\n * automatically; no other file in the package needs to change.\n *\n * Every subtype the engine has not yet wired up rides on\n * `UnsupportedKind`. The wire format is stable: when a per-subtype reader\n * lands later, the engine starts emitting the dedicated DTO instead of\n * `unsupported`, and existing clients widen their handling without a\n * version bump.\n */\nexport const ANNOTATION_KINDS = [\n HighlightKind,\n UnderlineKind,\n SquigglyKind,\n StrikeoutKind,\n CircleKind,\n SquareKind,\n PolygonKind,\n PolylineKind,\n LineKind,\n LinkKind,\n InkKind,\n FreeTextKind,\n CaretKind,\n TextKind,\n StampKind,\n FileAttachmentKind,\n WidgetKind,\n RedactKind,\n UnsupportedKind,\n] as const;\n\nexport type AnnotationKind = (typeof ANNOTATION_KINDS)[number];\n\nexport type AnnotationSubtypeOfKind = AnnotationKind['subtype'];\n\n/**\n * Lookup helper for the engine's reader catalog and identity resolver.\n * O(1) by `subtype` literal at runtime.\n */\nexport const KIND_BY_SUBTYPE: Readonly<{\n [K in AnnotationKind as K['subtype']]: K;\n}> = Object.freeze(\n Object.fromEntries(ANNOTATION_KINDS.map((kind) => [kind.subtype, kind])) as Record<\n AnnotationSubtypeOfKind,\n AnnotationKind\n >,\n) as Readonly<{ [K in AnnotationKind as K['subtype']]: K }>;\n\ntype DTOFromKind<K> =\n K extends AnnotationKindModule<infer _S, infer D, infer _Dr, infer _Pa> ? D : never;\ntype DraftFromKind<K> =\n K extends AnnotationKindModule<infer _S, infer _D, infer Dr, infer _Pa> ? Dr : never;\ntype PatchFromKind<K> =\n K extends AnnotationKindModule<infer _S, infer _D, infer _Dr, infer Pa> ? Pa : never;\n\n/** Discriminated union over `subtype`, derived from the registry. */\nexport type AnnotationDTO = DTOFromKind<AnnotationKind>;\n\n/**\n * WIRE drafts/patches: pure JSON, what the worker protocol and HTTP\n * surface carry and what the Zod schemas below validate. Kind modules are\n * wire-typed, so these derive straight from the registry.\n */\nexport type WireAnnotationDraft = Exclude<DraftFromKind<AnnotationKind>, never>;\nexport type WireAnnotationPatch = Exclude<PatchFromKind<AnnotationKind>, never>;\n\n/**\n * AUTHORING drafts/patches: what callers pass to `create()`/`update()`.\n * Identical to the wire forms except for binary-carrying kinds, whose\n * inline-`BinarySource` authoring types are swapped in here. Engines\n * bridge the two via `annotation/normalize.ts` — see that module for the\n * uniform binary rule.\n */\nexport type AnnotationDraft =\n | Exclude<WireAnnotationDraft, StampWireDraft | FileAttachmentWireDraft>\n | StampDraft\n | FileAttachmentDraft;\nexport type AnnotationPatch = Exclude<WireAnnotationPatch, StampWirePatch> | StampPatch;\n\n/**\n * Runtime zod schema for the discriminated union. The cast unwinds the\n * generic schema map into the specific tuple form `discriminatedUnion`\n * needs. Servers and cloud clients use this to validate every annotation\n * payload on the wire.\n */\nexport const AnnotationDTOSchema: z.ZodType<AnnotationDTO> = z.discriminatedUnion('subtype', [\n HighlightKind.dtoSchema,\n UnderlineKind.dtoSchema,\n SquigglyKind.dtoSchema,\n StrikeoutKind.dtoSchema,\n CircleKind.dtoSchema,\n SquareKind.dtoSchema,\n PolygonKind.dtoSchema,\n PolylineKind.dtoSchema,\n LineKind.dtoSchema,\n LinkKind.dtoSchema,\n InkKind.dtoSchema,\n FreeTextKind.dtoSchema,\n CaretKind.dtoSchema,\n TextKind.dtoSchema,\n StampKind.dtoSchema,\n FileAttachmentKind.dtoSchema,\n WidgetKind.dtoSchema,\n RedactKind.dtoSchema,\n UnsupportedKind.dtoSchema,\n] as unknown as [\n z.ZodDiscriminatedUnionOption<'subtype'>,\n ...z.ZodDiscriminatedUnionOption<'subtype'>[],\n]) as unknown as z.ZodType<AnnotationDTO>;\n\n/**\n * Validates the WIRE draft form (post-normalization) — binary-carrying\n * kinds appear here with `{ resource }` refs, never inline bytes.\n */\nexport const AnnotationDraftSchema: z.ZodType<WireAnnotationDraft> = z.discriminatedUnion(\n 'subtype',\n [\n HighlightKind.draftSchema,\n UnderlineKind.draftSchema,\n SquigglyKind.draftSchema,\n StrikeoutKind.draftSchema,\n CircleKind.draftSchema,\n SquareKind.draftSchema,\n PolygonKind.draftSchema,\n PolylineKind.draftSchema,\n LineKind.draftSchema,\n LinkKind.draftSchema,\n InkKind.draftSchema,\n FreeTextKind.draftSchema,\n CaretKind.draftSchema,\n TextKind.draftSchema,\n StampKind.draftSchema,\n FileAttachmentKind.draftSchema,\n WidgetKind.draftSchema,\n RedactKind.draftSchema,\n ] as unknown as [\n z.ZodDiscriminatedUnionOption<'subtype'>,\n ...z.ZodDiscriminatedUnionOption<'subtype'>[],\n ],\n) as unknown as z.ZodType<WireAnnotationDraft>;\n\n/** Validates the WIRE patch form (post-normalization). */\nexport const AnnotationPatchSchema: z.ZodType<WireAnnotationPatch> = z.discriminatedUnion(\n 'subtype',\n [\n HighlightKind.patchSchema,\n UnderlineKind.patchSchema,\n SquigglyKind.patchSchema,\n StrikeoutKind.patchSchema,\n CircleKind.patchSchema,\n SquareKind.patchSchema,\n PolygonKind.patchSchema,\n PolylineKind.patchSchema,\n LineKind.patchSchema,\n LinkKind.patchSchema,\n InkKind.patchSchema,\n FreeTextKind.patchSchema,\n CaretKind.patchSchema,\n TextKind.patchSchema,\n StampKind.patchSchema,\n FileAttachmentKind.patchSchema,\n WidgetKind.patchSchema,\n RedactKind.patchSchema,\n ] as unknown as [\n z.ZodDiscriminatedUnionOption<'subtype'>,\n ...z.ZodDiscriminatedUnionOption<'subtype'>[],\n ],\n) as unknown as z.ZodType<WireAnnotationPatch>;\n","import { z } from 'zod';\n\nimport { WidgetAppearanceSchema } from '../annotation/kinds/widget.shared';\nimport { PdfRectSchema } from '../geometry/schemas';\nimport type { FormFieldRef, FormWidgetRef } from '../identity/FormFieldRef';\nimport type { FormFieldDraft, FormFieldOptionInput, WidgetPlacement } from './draft';\nimport type { FormFieldPatch } from './patch';\nimport type { FormFieldDTO, FormFieldFlags, FormFieldOption, ToggleFieldWidget } from './field';\nimport type { FormKind, FormSnapshot } from './snapshot';\nimport type { FormDataFormat, FormFieldValue } from './value';\nimport type { FormValueEntry } from './value-entry';\nimport { PdfFieldActionsSchema } from '../dto/PdfAction.schema';\n\nexport const FormFieldRefSchema: z.ZodType<FormFieldRef> = z.discriminatedUnion('kind', [\n z.object({\n kind: z.literal('objectNumber'),\n fieldObjectNumber: z.number().int().positive(),\n }),\n z.object({\n kind: z.literal('fqn'),\n name: z.string().min(1),\n }),\n]);\n\nconst FormWidgetRefShape = {\n // 0 = direct (unaddressable) widget / unplaced widget respectively.\n annotObjectNumber: z.number().int().nonnegative(),\n pageObjectNumber: z.number().int().nonnegative(),\n};\n\nexport const FormWidgetRefSchema: z.ZodType<FormWidgetRef> = z.object(FormWidgetRefShape);\n\nexport const FormFieldFlagsSchema: z.ZodType<FormFieldFlags> = z.object({\n readOnly: z.boolean(),\n required: z.boolean(),\n noExport: z.boolean(),\n raw: z.number().int().nonnegative(),\n});\n\nexport const ToggleFieldWidgetSchema: z.ZodType<ToggleFieldWidget> = z.object({\n ...FormWidgetRefShape,\n onState: z.string(),\n exportValue: z.string(),\n checked: z.boolean(),\n});\n\nexport const FormFieldOptionSchema: z.ZodType<FormFieldOption> = z.object({\n label: z.string(),\n value: z.string(),\n selected: z.boolean(),\n});\n\nexport const FormValueEntrySchema: z.ZodType<FormValueEntry> = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('none') }),\n z.object({ kind: z.literal('scalar'), value: z.string() }),\n z.object({ kind: z.literal('array'), values: z.array(z.string()) }),\n z.object({ kind: z.literal('unsupported') }),\n]);\n\nconst FormFieldBaseShape = {\n ref: FormFieldRefSchema,\n fieldObjectNumber: z.number().int().nonnegative(),\n name: z.string(),\n origin: z.enum(['acroform', 'recovered']),\n flags: FormFieldFlagsSchema,\n alternateName: z.string().nullable(),\n mappingName: z.string().nullable(),\n valueEntry: FormValueEntrySchema,\n defaultValueEntry: FormValueEntrySchema,\n actions: PdfFieldActionsSchema.optional(),\n widgets: z.array(FormWidgetRefSchema),\n};\n\nexport const FormFieldDTOSchema: z.ZodType<FormFieldDTO> = z.discriminatedUnion('family', [\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('text'),\n value: z.string(),\n defaultValue: z.string(),\n maxLength: z.number().int().positive().nullable(),\n multiline: z.boolean(),\n password: z.boolean(),\n comb: z.boolean(),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('checkbox'),\n checked: z.boolean(),\n exportValue: z.string(),\n widgets: z.array(ToggleFieldWidgetSchema),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('radio'),\n value: z.string(),\n radiosInUnison: z.boolean(),\n noToggleToOff: z.boolean(),\n widgets: z.array(ToggleFieldWidgetSchema),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('combobox'),\n value: z.string(),\n defaultValue: z.string(),\n edit: z.boolean(),\n options: z.array(FormFieldOptionSchema),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('listbox'),\n selectedValues: z.array(z.string()),\n multiSelect: z.boolean(),\n options: z.array(FormFieldOptionSchema),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('pushbutton'),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('signature'),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('unknown'),\n rawValue: z.string(),\n }),\n]) as unknown as z.ZodType<FormFieldDTO>;\n\nexport const FormKindSchema: z.ZodType<FormKind> = z.enum(['none', 'acroform', 'xfa']);\n\nexport const FormSnapshotSchema: z.ZodType<FormSnapshot> = z.object({\n formKind: FormKindSchema,\n needsAppearances: z.boolean(),\n fields: z.array(FormFieldDTOSchema),\n calculationOrder: z.array(FormFieldRefSchema.nullable()),\n});\n\nexport const FormFieldValueSchema: z.ZodType<FormFieldValue> = z.discriminatedUnion('type', [\n z.object({ type: z.literal('text'), value: z.string() }),\n z.object({ type: z.literal('toggle'), state: z.string().nullable() }),\n z.object({ type: z.literal('choice'), values: z.array(z.string()) }),\n]);\n\nexport const FormDataFormatSchema: z.ZodType<FormDataFormat> = z.enum(['fdf', 'xfdf']);\n\nexport { WidgetAppearanceSchema };\n\nexport const WidgetPlacementSchema: z.ZodType<WidgetPlacement> = z.object({\n pageObjectNumber: z.number().int().positive(),\n rect: PdfRectSchema,\n onState: z.string().min(1).optional(),\n appearance: WidgetAppearanceSchema.optional(),\n});\n\nexport const FormFieldOptionInputSchema: z.ZodType<FormFieldOptionInput> = z.object({\n label: z.string(),\n value: z.string(),\n});\n\nconst FormFieldDraftBaseShape = {\n name: z.string().min(1),\n readOnly: z.boolean().optional(),\n required: z.boolean().optional(),\n noExport: z.boolean().optional(),\n alternateName: z.string().optional(),\n mappingName: z.string().optional(),\n};\n\nexport const FormFieldDraftSchema: z.ZodType<FormFieldDraft> = z.discriminatedUnion('family', [\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('text'),\n defaultValue: z.string().optional(),\n maxLength: z.number().int().positive().optional(),\n multiline: z.boolean().optional(),\n password: z.boolean().optional(),\n comb: z.boolean().optional(),\n widget: WidgetPlacementSchema.optional(),\n }),\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('checkbox'),\n widget: WidgetPlacementSchema.optional(),\n }),\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('radio'),\n radiosInUnison: z.boolean().optional(),\n noToggleToOff: z.boolean().optional(),\n widgets: z.array(WidgetPlacementSchema).optional(),\n }),\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('combobox'),\n edit: z.boolean().optional(),\n options: z.array(FormFieldOptionInputSchema).optional(),\n defaultValue: z.string().optional(),\n widget: WidgetPlacementSchema.optional(),\n }),\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('listbox'),\n multiSelect: z.boolean().optional(),\n options: z.array(FormFieldOptionInputSchema).optional(),\n widget: WidgetPlacementSchema.optional(),\n }),\n]) as unknown as z.ZodType<FormFieldDraft>;\n\nconst FormFieldPatchBaseShape = {\n name: z.string().min(1).optional(),\n readOnly: z.boolean().optional(),\n required: z.boolean().optional(),\n noExport: z.boolean().optional(),\n alternateName: z.string().nullable().optional(),\n mappingName: z.string().nullable().optional(),\n};\n\nexport const FormFieldPatchSchema: z.ZodType<FormFieldPatch> = z.discriminatedUnion('family', [\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('text'),\n defaultValue: z.string().nullable().optional(),\n maxLength: z.number().int().positive().nullable().optional(),\n multiline: z.boolean().optional(),\n password: z.boolean().optional(),\n comb: z.boolean().optional(),\n }),\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('checkbox'),\n }),\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('radio'),\n radiosInUnison: z.boolean().optional(),\n noToggleToOff: z.boolean().optional(),\n }),\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('combobox'),\n edit: z.boolean().optional(),\n defaultValue: z.string().nullable().optional(),\n options: z.array(FormFieldOptionInputSchema).optional(),\n }),\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('listbox'),\n multiSelect: z.boolean().optional(),\n options: z.array(FormFieldOptionInputSchema).optional(),\n }),\n]) as unknown as z.ZodType<FormFieldPatch>;\n","import { z } from 'zod';\n\nimport type {\n AnnotationListPageSnapshot,\n AnnotationListSnapshotAllPages,\n} from '../annotation/AnnotationListSnapshot';\nimport {\n AnnotationRefSchema,\n AnnotationStableIdSchema,\n RevisionTokenSchema,\n} from '../annotation/base.schema';\nimport { AnnotationDTOSchema } from '../annotation/kinds';\nimport type {\n AnnotationAppearanceImageOptions,\n AnnotationAppearanceManifest,\n AnnotationAppearancesQuery,\n} from '../dto/AnnotationRender';\nimport { EmbeddedFileItemSchema, EmbeddedFileRefSchema } from '../dto/Attachment.schema';\nimport type { CachePins } from '../dto/CachePins';\nimport type { DocumentManifest, ManifestPage } from '../dto/DocumentManifest';\nimport type { LayerScopes } from '../dto/LayerScopes';\nimport type { DocumentMetadata } from '../dto/DocumentMetadata';\nimport type { MetadataPatch } from '../dto/MetadataPatch';\nimport type { PageGeometryRun, PageGeometrySnapshot } from '../dto/PageGeometrySnapshot';\nimport { charMapViolation } from '../text/charmap';\nimport type { PageBoxes, PageLayout } from '../dto/PageLayout';\nimport type { PageListSnapshot } from '../dto/PageListSnapshot';\nimport type { PageImageOptions, PageNetworkRenderFormat, PageRenderQuery } from '../dto/PageRender';\nimport type { PageTextSnapshot } from '../dto/PageTextSnapshot';\nimport { PdfPageActionsSchema } from '../dto/PdfAction.schema';\nimport type { PdfSaveMode } from '../dto/PdfSaveMode';\nimport type { DocumentSecurityState, PdfPermissionInfo } from '../engine/DocumentSecurityService';\nimport type { SerializedEngineError } from '../errors/EngineError';\nimport { EngineErrorCode } from '../errors/EngineErrorCode';\nimport type { FormEffectsResult, FormEffect } from '../forms/effects';\nimport { FormFieldDTOSchema, FormSnapshotSchema, FormWidgetRefSchema } from '../forms/schema';\nimport { FormFieldRefSchema, FormFieldValueSchema } from '../forms/schema';\nimport {\n PdfQuadSchema,\n PdfRectSchema,\n PdfRotationSchema,\n PdfSizeSchema,\n} from '../geometry/schemas';\nimport type { AppearanceOutcome } from '../annotation/appearance';\nimport type { AnnotationListMutationMeta } from '../mutation/AnnotationListMutationMeta';\nimport type {\n AnnotationCreateResult,\n AnnotationDeleteResult,\n AnnotationMoveResult,\n AnnotationUpdateResult,\n} from '../mutation/AnnotationMutationResults';\nimport type {\n AttachmentCreateResult,\n AttachmentDeleteResult,\n AttachmentsCache,\n} from '../mutation/AttachmentMutationResults';\nimport type {\n FormFieldCreateResult,\n FormFieldDeleteResult,\n FormFieldUpdateResult,\n FormImportResult,\n FormRepairResult,\n FormSetValueResult,\n FormWidgetLinkResult,\n} from '../mutation/FormMutationResults';\nimport type { MetadataUpdateResult } from '../mutation/MetadataUpdateResult';\nimport type { CacheDelta, MutationMeta } from '../mutation/MutationMeta';\nimport type { PageDeleteInput } from '../mutation/PageDeleteInput';\nimport type { PageDeleteResult } from '../mutation/PageDeleteResult';\nimport type { PageFlattenInput, PageFlattenResult } from '../mutation/PageFlattenResult';\nimport type { RedactionApplyResult, RedactionApplyScope } from '../mutation/RedactionApplyResult';\nimport type { PageMoveInput } from '../mutation/PageMoveInput';\nimport type { PageMoveResult } from '../mutation/PageMoveResult';\nimport type { PageRotateInput } from '../mutation/PageRotateInput';\nimport type { PageRotateResult } from '../mutation/PageRotateResult';\nimport type { PageStructureCache } from '../mutation/PageStructureCache';\nimport type { RefetchReason } from '../mutation/RefetchReason';\nimport type { PageState } from '../revision/PageState';\nimport type { WeakAnnotationState } from '../revision/WeakAnnotationState';\nimport type {\n SearchMatch,\n SearchQuery,\n SearchRequest,\n SearchSlice,\n SearchSnippet,\n} from '../search/types';\nimport type { PdfTextSegment } from '../text/layout';\nexport type { CacheDelta, MutationMeta } from '../mutation/MutationMeta';\n\nexport const DocumentMetadataSchema: z.ZodType<DocumentMetadata> = z.object({\n title: z.string().nullable(),\n author: z.string().nullable(),\n subject: z.string().nullable(),\n keywords: z.string().nullable(),\n producer: z.string().nullable(),\n creator: z.string().nullable(),\n created: z.string().datetime().nullable(),\n modified: z.string().datetime().nullable(),\n trapped: z.enum(['true', 'false', 'unknown']),\n custom: z.record(z.string(), z.string()),\n});\n\n/**\n * Three-state metadata patch. Mirrors annotation patch semantics:\n * `undefined` leaves a field, `null` clears it, a value sets it. `custom`\n * is a per-key three-state map (string set / null clear / absent leave).\n */\nexport const MetadataPatchSchema: z.ZodType<MetadataPatch> = z\n .object({\n title: z.string().nullable().optional(),\n author: z.string().nullable().optional(),\n subject: z.string().nullable().optional(),\n keywords: z.string().nullable().optional(),\n producer: z.string().nullable().optional(),\n creator: z.string().nullable().optional(),\n created: z.string().datetime().nullable().optional(),\n modified: z.string().datetime().nullable().optional(),\n trapped: z.enum(['true', 'false', 'unknown']).optional(),\n custom: z.record(z.string(), z.string().nullable()).optional(),\n })\n .strict();\n\nexport const OpenDocumentResponseSchema = z.object({\n id: z.string(),\n});\nexport type OpenDocumentResponse = z.infer<typeof OpenDocumentResponseSchema>;\n\n/**\n * Wire shape of `GET /v1/docs/:docId/head`. Mirrors the server-side\n * `DocumentHead` interface; the schema is the source of truth so\n * older SDKs talking to newer servers degrade gracefully (extra\n * fields are accepted and ignored).\n *\n * `docVersion` is the single monotonic integer per doc; it bumps on\n * ANY mutation that could change the manifest's content (page list,\n * per-page content, per-page annotations, per-page weak-flag), which\n * makes `/manifest@docVersion=N` fully content-addressed and cache-friendly.\n * Phase 4 hard-codes it to `1`; Phase 5's mutation handler is what\n * actually bumps it.\n */\nexport const DocumentHeadSchema = z.object({\n id: z.string(),\n baseSha: z.string(),\n storageSizeBytes: z.number().int().nonnegative(),\n docVersion: z.number().int().positive(),\n state: z.enum(['pending', 'ready', 'failed', 'deleting']),\n encryption: z.object({\n state: z.enum(['unknown', 'none', 'encrypted', 'unsupported']),\n requiresPassword: z.boolean().nullable(),\n }),\n permissions: z.object({\n known: z.boolean(),\n bits: z.number().int().nonnegative().nullable(),\n allAllowed: z.boolean().nullable(),\n openedAs: z.enum(['none', 'user', 'owner']).nullable(),\n securityHandlerRevision: z.number().int().nullable(),\n canUpgradeToOwner: z.boolean(),\n }),\n access: z.object({\n required: z.boolean(),\n reasons: z.array(z.enum(['password', 'cdn', 'permissions-unknown'])),\n endpoint: z.string().optional(),\n }),\n});\nexport type DocumentHead = z.infer<typeof DocumentHeadSchema>;\n\nexport const AccessRequestSchema = z.object({\n docId: z.string().min(1),\n layerName: z.string().min(1).optional(),\n password: z.string().optional(),\n passwordGrant: z.string().optional(),\n mode: z.enum(['any', 'owner']).optional(),\n});\nexport type AccessRequest = z.infer<typeof AccessRequestSchema>;\n\n/**\n * Typed boolean view of the PDF user-access permission word. Names\n * mirror the `PdfBits` shape in @embedpdf/engine-core/auth/scope; ISO\n * bit numbers (3, 4, 5, 6, 9, 10, 11, 12).\n */\nconst PdfBitsObjectSchema = z.object({\n bit3: z.boolean(),\n bit4: z.boolean(),\n bit5: z.boolean(),\n bit6: z.boolean(),\n bit9: z.boolean(),\n bit10: z.boolean(),\n bit11: z.boolean(),\n bit12: z.boolean(),\n});\n\n/**\n * Capability-shaped advisory for the client UI. Mirrors\n * `PdfPermissionAdvisory` in @embedpdf/engine-core/runtime; one\n * boolean per UI badge.\n */\nconst PdfPermissionAdvisoryObjectSchema = z.object({\n canPrint: z.boolean(),\n canPrintHigh: z.boolean(),\n canCopy: z.boolean(),\n canAnnotate: z.boolean(),\n canFillForms: z.boolean(),\n canModifyForms: z.boolean(),\n canModifyPages: z.boolean(),\n canAssemble: z.boolean(),\n});\n\nconst PdfPermissionInfoObjectSchema: z.ZodType<PdfPermissionInfo> = z.object({\n known: z.boolean(),\n allAllowed: z.boolean().nullable(),\n bits: z.number().int().nonnegative().nullable(),\n openedAs: z.enum(['none', 'user', 'owner']).nullable(),\n securityHandlerRevision: z.number().int().nullable(),\n // Enriched fields from /access (commit 14). Optional so /head, which\n // doesn't always populate them, stays valid against this schema too.\n flags: PdfBitsObjectSchema.optional(),\n advisory: PdfPermissionAdvisoryObjectSchema.optional(),\n});\n\nconst PdfPermissionInfoSchema = PdfPermissionInfoObjectSchema.nullable();\n\nexport const DocumentSecurityStateSchema: z.ZodType<DocumentSecurityState> = z.object({\n encryption: z.object({\n state: z.enum(['unknown', 'none', 'encrypted', 'unsupported']),\n requiresPassword: z.boolean().nullable(),\n }),\n permissions: z.object({\n known: z.boolean(),\n bits: z.number().int().nonnegative().nullable(),\n allAllowed: z.boolean().nullable(),\n openedAs: z.enum(['none', 'user', 'owner']).nullable(),\n securityHandlerRevision: z.number().int().nullable(),\n canUpgradeToOwner: z.boolean(),\n }),\n access: z.object({\n required: z.boolean(),\n reasons: z.array(z.enum(['password', 'cdn', 'permissions-unknown'])),\n endpoint: z.string().optional(),\n }),\n});\n\nexport const AccessResponseSchema = z.object({\n security: DocumentSecurityStateSchema,\n cdn: z.object({\n adapter: z.enum(['none', 'cloudfront', 'cloud-cdn', 'bunny', 'azure-fd', 'custom-hmac']),\n expiresAt: z.number().int().positive(),\n cache: z.object({\n scope: z.enum(['browser-private', 'edge-shared']),\n immutableVersionedReads: z.boolean(),\n }),\n baseUrlOverrides: z.record(z.string(), z.string()).nullable(),\n authHeader: z.object({ name: z.string(), value: z.string() }).nullable(),\n // Optional signing channels — each adapter populates the subset it uses\n signedQueryParams: z.record(z.string(), z.string()).nullable(),\n signedCookies: z\n .array(\n z.object({\n name: z.string(),\n value: z.string(),\n domain: z.string().optional(),\n path: z.string().optional(),\n expires: z.number().int().optional(),\n }),\n )\n .nullable(),\n signedPathPolicies: z\n .array(\n z.object({\n pathPrefix: z.string(),\n queryParams: z.record(z.string(), z.string()),\n }),\n )\n .nullable(),\n }),\n passwordGrant: z.string().nullable(),\n pdfPermissions: PdfPermissionInfoSchema,\n scope: z.array(z.string()),\n /**\n * Concrete capability set granted to this caller after expanding\n * `pdf.permissions` and applying resolver implication rules. Client\n * UI should drive feature visibility off this, not off raw `scope`.\n * Always present in /access responses (server populates from\n * `expandRawScope`). Sorted alphabetically for stable change\n * detection.\n */\n effectiveScope: z.array(z.string()),\n identity: z.object({\n user_id: z.string().optional(),\n group_id: z.string().optional(),\n groups: z.array(z.string()).optional(),\n display_name: z.string().optional(),\n }),\n originPasswordPolicy: z.object({\n mode: z.enum(['not-needed', 'client-retry', 'server-session']),\n }),\n expiresAt: z.number().int().positive(),\n /**\n * The deployment's render lattice — the canonical parameter points the\n * server treats as durable, CDN-shared artifacts. Lives HERE and never in\n * the manifest: manifests are version-pinned immutable objects; the\n * lattice is mutable deployment policy. The SDK exposes it (and a pure\n * `snap` helper) but NEVER conforms requests implicitly — the same render\n * call must not return different pixels on local vs cloud. When\n * `enforced` is true the server rejects off-lattice render tokens with\n * 400; when false, off-lattice renders are computed but not persisted.\n * Absent on older servers → treat as unenforced/unknown.\n */\n renderPolicy: z\n .object({\n /**\n * Full-page renders quantize on `viewport.width` — the bounded\n * quantity is OUTPUT PIXELS, never zoom (PDF page space is\n * effectively unbounded, so a scale lattice bounds artifact count\n * but not size).\n */\n fullPage: z.object({\n widths: z.array(z.number().int().positive()),\n }),\n /**\n * RESERVED for deep-zoom tile support: scale-based pyramid ×\n * fixed tile size, constant per-job cost. Absent until the tiling\n * plugin ships.\n */\n tiles: z\n .object({\n tileSizes: z.array(z.number().int().positive()),\n scales: z.array(z.number().positive()),\n })\n .optional(),\n /**\n * Annotation-appearance lattice — SCALE-based (appearances are sized\n * by `rect × scale` and must track the page's effective render scale\n * for crisp composites).\n */\n appearances: z\n .object({\n scales: z.array(z.number().positive()),\n })\n .optional(),\n /** Worker-side output budget for degenerate page geometry. */\n maxRenderPixels: z.number().int().positive().optional(),\n formats: z.array(z.enum(['webp', 'png'])),\n background: z.enum(['white']),\n enforced: z.boolean(),\n })\n .optional(),\n});\nexport type AccessResponse = z.infer<typeof AccessResponseSchema>;\nexport type RenderPolicy = NonNullable<AccessResponse['renderPolicy']>;\n\nexport const PdfSaveModeSchema: z.ZodType<PdfSaveMode> = z.enum(['incremental', 'rewrite']);\n\nconst engineErrorCodeValues = Object.values(EngineErrorCode) as [\n EngineErrorCode,\n ...EngineErrorCode[],\n];\n\nexport const EngineErrorPayloadSchema: z.ZodType<SerializedEngineError> = z.object({\n name: z.literal('EngineError'),\n code: z.enum(engineErrorCodeValues),\n message: z.string(),\n details: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport const WeakAnnotationStateSchema: z.ZodType<WeakAnnotationState> = z.discriminatedUnion(\n 'kind',\n [\n z.object({ kind: z.literal('unknown') }),\n z.object({\n kind: z.literal('known'),\n hasAnyWeakAnnotations: z.boolean(),\n }),\n ],\n);\n\nexport const PageStateSchema: z.ZodType<PageState> = z.object({\n pageObjectNumber: z.number().int().positive(),\n revision: RevisionTokenSchema,\n weakAnnotationState: WeakAnnotationStateSchema,\n});\n\nexport const CachePinsSchema: z.ZodType<CachePins> = z.object({\n contentVersion: z.number().int().positive(),\n annotationVersion: z.number().int().positive(),\n});\n\n/**\n * Plane scopes are DERIVED from the version counters at every emission\n * point (layer manifests, mutation cache envelopes, SSE rows), never stored.\n * Additive/optional both ways: old clients ignore it, old servers omit it\n * (consumers treat absence as all-'layer' — never wrong, only unshared).\n */\nconst LayerScopeValueSchema = z.enum(['base', 'layer']);\nexport const LayerScopesSchema: z.ZodType<LayerScopes> = z.object({\n content: LayerScopeValueSchema,\n annotations: LayerScopeValueSchema,\n layout: LayerScopeValueSchema,\n attachments: LayerScopeValueSchema,\n metadata: LayerScopeValueSchema,\n actions: LayerScopeValueSchema,\n});\nexport type { LayerScopes, LayerScopePlane } from '../dto/LayerScopes';\n\n/**\n * Per-page envelope inside `DocumentManifest`. Carries the full\n * `PageState` plus the cache-busting integers the SDK embeds in\n * leaf URLs (`/pages/:pon/text@contentVersion=N`, `/pages/:pon/annotations@annotationVersion=N`).\n *\n * `contentVersion` bumps when the page's content stream changes\n * (text, page reorder doesn't, the pon is durable). `annotationVersion`\n * bumps when /Annots gains/loses entries or when a tracked annotation\n * mutates. `hasWeakAnnotations` is hoisted from `PageState` so the\n * SDK can decide whether to display a \"stale-on-reorder\" badge\n * without re-fetching the page.\n *\n * Phase 4 hard-codes all three to (1, 1, false); Phase 5's\n * `layer_pages` table drives the real values.\n */\nexport const ManifestPageSchema: z.ZodType<ManifestPage> = z\n .object({\n state: PageStateSchema,\n cache: CachePinsSchema,\n })\n .superRefine((page, ctx) => {\n if (page.state.weakAnnotationState.kind !== 'known') {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['state', 'weakAnnotationState'],\n message: 'manifest pages must have a known weak annotation state',\n });\n }\n }) as z.ZodType<ManifestPage>;\nexport type { ManifestPage } from '../dto/DocumentManifest';\n\n/**\n * Wire shape of `GET /v1/docs/:docId/manifest@docVersion=N`. Content-addressed\n * by `docVersion`; safe to cache with `Cache-Control: public,\n * max-age=31536000, immutable`.\n */\nexport const DocumentManifestSchema = z.object({\n docVersion: z.number().int().positive(),\n layoutVersion: z.number().int().positive(),\n metadataVersion: z.number().int().positive(),\n actionsVersion: z.number().int().positive().default(1),\n attachmentsVersion: z.number().int().positive().default(1),\n auditHead: z.number().int().nonnegative(),\n baseSha: z.string(),\n // Plane scopes: layer manifests only; absent = all-'layer'.\n scopes: LayerScopesSchema.optional(),\n pages: z.array(ManifestPageSchema),\n}) as unknown as z.ZodType<DocumentManifest>;\nexport type { DocumentManifest } from '../dto/DocumentManifest';\n\nexport const AnnotationListPageSnapshotSchema: z.ZodType<AnnotationListPageSnapshot> = z.object({\n pageState: PageStateSchema,\n annotations: z.array(AnnotationDTOSchema),\n});\n\nexport const AnnotationListSnapshotAllPagesSchema: z.ZodType<AnnotationListSnapshotAllPages> =\n z.object({\n pages: z.array(AnnotationListPageSnapshotSchema),\n });\n\n/**\n * Wire shape of `GET …/text/pages/:pon/data@<contentVersion>` and the\n * `pages.text` worker result: the UTF-16-faithful extraction, the CHARACTER\n * space size (`charCount` — the space geometry runs tile; NOT `text.length`),\n * and the optional character→text anchor map. Malformed maps are rejected\n * here with the shared `charMapViolation` invariants — absent/empty map\n * REQUIRES `charCount === text.length` (identity).\n */\nexport const PageTextSnapshotSchema: z.ZodType<PageTextSnapshot> = z\n .object({\n text: z.string(),\n charCount: z.number().int().nonnegative(),\n charMap: z\n .array(z.tuple([z.number().int().nonnegative(), z.number().int().nonnegative()]))\n .optional(),\n })\n .superRefine((snapshot, ctx) => {\n const violation = charMapViolation(snapshot.charCount, snapshot.text.length, snapshot.charMap);\n if (violation !== null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['charMap'], message: violation });\n }\n });\n\nexport const PageGeometryGlyphSchema = z.object({\n looseBox: PdfRectSchema,\n flags: z.number().int().nonnegative(),\n tightBox: PdfRectSchema.optional(),\n});\n\nexport const RotatedGeometryGlyphSchema = z.object({\n looseQuad: PdfQuadSchema,\n flags: z.number().int().nonnegative(),\n tightQuad: PdfQuadSchema.optional(),\n});\n\nexport const UprightGeometryRunSchema = z.object({\n rect: PdfRectSchema,\n charStart: z.number().int().nonnegative(),\n glyphs: z.array(PageGeometryGlyphSchema),\n fontSize: z.number().optional(),\n});\n\nexport const RotatedGeometryRunSchema = z.object({\n rect: PdfRectSchema,\n charStart: z.number().int().nonnegative(),\n glyphs: z.array(RotatedGeometryGlyphSchema),\n rotation: z.number(),\n ascentFlip: z.boolean(),\n fontSize: z.number().optional(),\n});\n\n// Rotated first: in zod's default strip mode the upright shape would accept a\n// zero-glyph rotated run and silently drop its rotation; the rotated shape can\n// never swallow an upright run (it requires `rotation`/`ascentFlip`).\nexport const PageGeometryRunSchema: z.ZodType<PageGeometryRun> = z.union([\n RotatedGeometryRunSchema,\n UprightGeometryRunSchema,\n]);\n\nexport const PageGeometrySnapshotSchema: z.ZodType<PageGeometrySnapshot> = z.object({\n runs: z.array(PageGeometryRunSchema),\n});\n\n/**\n * Search wire shapes: the request body of the layer search route and the\n * `search.query` worker/route result. The server re-validates the query\n * semantics (`validateSearchQuery`: regex dialect + flag combos) after\n * parse — the schema only checks structure.\n */\nexport const SearchQuerySchema: z.ZodType<SearchQuery> = z.object({\n text: z.string(),\n regex: z.boolean().optional(),\n matchCase: z.boolean().optional(),\n wholeWord: z.boolean().optional(),\n matchDiacritics: z.boolean().optional(),\n});\n\nexport const SearchModeSchema = z.enum(['rects', 'full']);\n\nexport const SearchRequestSchema: z.ZodType<SearchRequest> = z.object({\n query: SearchQuerySchema,\n mode: SearchModeSchema.optional(),\n cursor: z.string().optional(),\n startPage: z.number().int().positive().optional(),\n skip: z.number().int().nonnegative().optional(),\n budget: z\n .object({\n maxMatches: z.number().int().positive().optional(),\n maxPages: z.number().int().positive().optional(),\n })\n .optional(),\n});\n\nexport const SearchSnippetSchema: z.ZodType<SearchSnippet> = z.object({\n text: z.string(),\n matchStart: z.number().int().nonnegative(),\n matchLength: z.number().int().positive(),\n});\n\nexport const PdfTextSegmentSchema: z.ZodType<PdfTextSegment> = z.object({\n quad: PdfQuadSchema,\n rect: PdfRectSchema,\n advance: z.union([z.literal(1), z.literal(-1)]),\n});\n\nexport const SearchMatchSchema: z.ZodType<SearchMatch> = z.object({\n pageObjectNumber: z.number().int().positive(),\n charStart: z.number().int().nonnegative(),\n charCount: z.number().int().positive(),\n segments: z.array(PdfTextSegmentSchema),\n snippet: SearchSnippetSchema.optional(),\n});\n\nexport const SearchSliceSchema: z.ZodType<SearchSlice> = z.object({\n matches: z.array(SearchMatchSchema),\n nextCursor: z.string().nullable(),\n scannedPages: z.number().int().nonnegative(),\n totalPages: z.number().int().nonnegative(),\n});\n\nexport const PageNetworkRenderFormatSchema: z.ZodType<PageNetworkRenderFormat> = z.enum([\n 'png',\n 'webp',\n]);\n\n/**\n * Wire schema for the cloud render endpoints, applied to the **nested**\n * shape produced by `unflatten(...)` of the parsed token or query string.\n *\n * Adding a new render option is one change here (a new field plus any\n * cross-field rule in `superRefine`) plus one entry in\n * `RenderTokenSchema.fields`. The token codec, flatten/unflatten helpers,\n * route handlers, and SDK URL builder are all generic and pick the new\n * field up automatically.\n *\n * Coercion: token fields and query strings both arrive as strings, so every\n * scalar uses `z.coerce.*`. Discriminated unions on `viewport.kind` and\n * `target.kind` enforce viewport / rect coherence by construction — no\n * superRefine for \"fields must appear together\" rules.\n */\n\nconst RenderViewportSchema = z.discriminatedUnion('kind', [\n z\n .object({\n kind: z.literal('width'),\n width: z.coerce.number().positive().finite(),\n })\n .strict(),\n z\n .object({\n kind: z.literal('scale'),\n scale: z.coerce.number().positive().finite().optional(),\n })\n .strict(),\n]);\n\nconst RenderTargetSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('page') }).strict(),\n z\n .object({\n kind: z.literal('rect'),\n rect: z\n .object({\n left: z.coerce.number().finite(),\n bottom: z.coerce.number().finite(),\n right: z.coerce.number().finite(),\n top: z.coerce.number().finite(),\n })\n .strict(),\n })\n .strict(),\n]);\n\nconst RenderRotationSchema = z.preprocess(\n (raw) => (raw === undefined ? undefined : Number(raw)),\n z.number().refine((n) => n === 0 || n === 90 || n === 180 || n === 270, {\n message: 'render rotation must be 0, 90, 180, or 270',\n }),\n);\n\nconst RenderBackgroundSchema = z.enum(['white', 'transparent']);\n\nconst RenderQualitySchema = z.coerce.number().int().min(1).max(100);\n\n/**\n * Token/path rule: annotatedness is PATH-expressed —\n * the render FAMILY the route belongs to — never token/query-expressed.\n * Each family therefore gets its own query schema, built from one shared\n * base:\n *\n * - the annotation-free family (`…/render/pages/`) has NO\n * `annotationVersion` field at all — `.strict()` rejects it as an\n * unrecognized key, so the illegal combination is unrepresentable;\n * - the annotated family (`…/render/annotated/pages/`) REQUIRES\n * `annotationVersion` on versioned requests — its artifact depends on\n * the `annotations` plane, so the pin must be in the cache key.\n *\n * Both transforms stamp `includeAnnotations` onto the parsed SDK options\n * from the family, so downstream consumers (worker options, classify) are\n * family-blind.\n */\nfunction buildPageRenderQuerySchema(annotated: boolean): z.ZodType<PageRenderQuery> {\n return z\n .object({\n contentVersion: z.coerce.number().int().positive().optional(),\n ...(annotated ? { annotationVersion: z.coerce.number().int().positive().optional() } : {}),\n format: PageNetworkRenderFormatSchema.optional(),\n viewport: RenderViewportSchema.optional(),\n target: RenderTargetSchema.optional(),\n rotation: RenderRotationSchema.optional(),\n background: RenderBackgroundSchema.optional(),\n quality: RenderQualitySchema.optional(),\n })\n .strict()\n .superRefine((v, ctx) => {\n // The object shape is family-dependent (the free family has no\n // `annotationVersion` key at all), so read the pins through one\n // explicit view instead of letting the conditional spread's union\n // type leak into the refinement.\n const pins = v as { contentVersion?: number; annotationVersion?: number };\n if (pins.contentVersion !== undefined && v.format === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['format'],\n message: 'versioned render requires format',\n });\n }\n if (annotated && pins.annotationVersion !== undefined && pins.contentVersion === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['annotationVersion'],\n message: 'annotationVersion requires contentVersion',\n });\n }\n if (annotated && pins.contentVersion !== undefined && pins.annotationVersion === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['annotationVersion'],\n message: 'versioned annotated render requires annotationVersion',\n });\n }\n })\n .transform((v) => {\n const pins = v as { contentVersion?: number; annotationVersion?: number };\n const options: PageImageOptions = {\n ...(v.target ? { target: v.target } : {}),\n ...(v.viewport ? { viewport: v.viewport } : {}),\n ...(v.rotation !== undefined ? { rotation: v.rotation } : {}),\n ...(v.background !== undefined ? { background: v.background } : {}),\n ...(v.quality !== undefined ? { quality: v.quality } : {}),\n ...(v.format !== undefined ? { format: v.format } : {}),\n includeAnnotations: annotated,\n };\n return {\n options,\n ...(pins.contentVersion !== undefined ? { contentVersion: pins.contentVersion } : {}),\n ...(pins.annotationVersion !== undefined\n ? { annotationVersion: pins.annotationVersion }\n : {}),\n };\n }) as unknown as z.ZodType<PageRenderQuery>;\n}\n\n/** Query/token schema for the annotation-free render family (`page-render`). */\nexport const PageRenderQuerySchema = buildPageRenderQuerySchema(false);\n/** Query/token schema for the annotated render family (`page-render-annotated`). */\nexport const PageRenderAnnotatedQuerySchema = buildPageRenderQuerySchema(true);\n\n/**\n * Query/token schema for the batch annotation-appearance render endpoint.\n * Mirrors `PageRenderQuerySchema` but without page target/viewport/background\n * or `includeAnnotations` (appearances are always annotation-derived), and\n * keyed by `annotationVersion` only — appearance bitmaps do not depend on\n * page base content, so `contentVersion` is not part of the cache key. The\n * endpoint renders the Normal appearance only.\n */\nexport const AnnotationAppearancesQuerySchema = z\n .object({\n annotationVersion: z.coerce.number().int().positive().optional(),\n format: PageNetworkRenderFormatSchema.optional(),\n rotation: RenderRotationSchema.optional(),\n scale: z.coerce.number().positive().finite().optional(),\n quality: RenderQualitySchema.optional(),\n })\n .strict()\n .superRefine((v, ctx) => {\n // A versioned (cacheable) request pins the annotation version and must\n // declare the encoded format so the cached URL is unambiguous.\n if (v.annotationVersion !== undefined && v.format === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['format'],\n message: 'versioned appearance render requires format',\n });\n }\n })\n .transform((v) => {\n const options: AnnotationAppearanceImageOptions = {\n ...(v.rotation !== undefined ? { rotation: v.rotation } : {}),\n ...(v.scale !== undefined ? { scale: v.scale } : {}),\n ...(v.quality !== undefined ? { quality: v.quality } : {}),\n ...(v.format !== undefined ? { format: v.format } : {}),\n };\n return {\n options,\n ...(v.annotationVersion !== undefined ? { annotationVersion: v.annotationVersion } : {}),\n };\n }) as unknown as z.ZodType<AnnotationAppearancesQuery>;\n\n/**\n * The JSON manifest part of the appearance `multipart/form-data` response.\n * Wire-stable; the cloud client validates the parsed `manifest` part against\n * this before reconstructing image handles from the binary parts.\n */\nexport const AnnotationAppearanceManifestSchema: z.ZodType<AnnotationAppearanceManifest> = z.object(\n {\n pageState: PageStateSchema,\n appearances: z.array(\n z.object({\n part: z.string().min(1),\n ref: AnnotationRefSchema,\n mode: z.enum(['normal', 'rollover', 'down']),\n rect: PdfRectSchema,\n width: z.number().int().positive(),\n height: z.number().int().positive(),\n format: PageNetworkRenderFormatSchema,\n contentType: z.string().min(1),\n }),\n ),\n },\n);\n\n/**\n * Reasons a mutation tells the client its old snapshot is stale. Wire-stable;\n * extend with care (forward-compat clients accept only known values).\n */\nexport const RefetchReasonSchema: z.ZodType<RefetchReason> = z.enum([\n 'weakRefsInvalidated',\n 'externalChange',\n 'pageRebuilt',\n]);\n\nexport const CacheDeltaSchema: z.ZodType<CacheDelta> = z.object({\n previousDocVersion: z.number().int().positive(),\n docVersion: z.number().int().positive(),\n pages: z.array(\n z.object({\n pageObjectNumber: z.number().int().positive(),\n cache: CachePinsSchema,\n }),\n ),\n});\n\nexport const MutationMetaSchema: z.ZodType<MutationMeta> = z.object({\n affectedPages: z.array(PageStateSchema),\n cacheDelta: CacheDeltaSchema.nullable(),\n});\n\n/**\n * Per-page side-effect envelope every annotation mutation returns. Mirrors\n * `AnnotationListMutationMeta`. The `shouldRefetch` field is `null` when the\n * client's existing index-based references remain valid; non-null only when\n * the engine knows for sure the snapshot is stale.\n */\nexport const AnnotationListMutationMetaSchema: z.ZodType<AnnotationListMutationMeta> = z.object({\n affectedPages: z.array(PageStateSchema),\n cacheDelta: CacheDeltaSchema.nullable(),\n changed: z.array(AnnotationStableIdSchema),\n weakRefsInvalidated: z.boolean(),\n shouldRefetch: z.object({ reason: RefetchReasonSchema }).nullable(),\n});\n\nexport const AnnotationCreateResultSchema: z.ZodType<AnnotationCreateResult> = z.object({\n created: AnnotationDTOSchema,\n meta: AnnotationListMutationMetaSchema,\n});\n\n/** The engine's `/AP` verdict riding every update result (see engine-core\n * `annotation/appearance.ts`). `changed` drives client raster invalidation. */\nexport const AppearanceOutcomeSchema: z.ZodType<AppearanceOutcome> = z.object({\n action: z.enum(['preserved', 'regenerated', 'generation-unavailable']),\n changed: z.boolean(),\n});\n\nexport const AnnotationUpdateResultSchema: z.ZodType<AnnotationUpdateResult> = z.object({\n updated: AnnotationDTOSchema,\n appearance: AppearanceOutcomeSchema,\n meta: AnnotationListMutationMetaSchema,\n});\n\n/**\n * `deleted` is nullable: a weak annotation (no /NM, no indirect object\n * number) has no durable id to report after removal. Cloud server and local\n * worker both emit `null` in that case so callers don't have to special-case\n * a sentinel.\n */\nexport const AnnotationDeleteResultSchema: z.ZodType<AnnotationDeleteResult> = z.object({\n deleted: AnnotationStableIdSchema.nullable(),\n meta: AnnotationListMutationMetaSchema,\n});\n\n/**\n * Batch annotation move (contiguous-block, symmetric with `pages.move`).\n * `moved` is in caller order; each `moved[i]` lives at index `toIndex + i`\n * after the move. ONE structural envelope per batch.\n */\nexport const AnnotationMoveResultSchema: z.ZodType<AnnotationMoveResult> = z.object({\n moved: z.array(AnnotationDTOSchema),\n meta: AnnotationListMutationMetaSchema,\n});\n\nexport const FormSetValueResultSchema: z.ZodType<FormSetValueResult> = z.object({\n field: FormFieldDTOSchema,\n changedWidgets: z.array(FormWidgetRefSchema),\n meta: MutationMetaSchema,\n});\n\nexport const FormEffectSchema: z.ZodType<FormEffect> = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('setValue'), ref: FormFieldRefSchema, value: FormFieldValueSchema }),\n z.object({\n kind: z.literal('setDisplay'),\n ref: FormFieldRefSchema,\n display: z.enum(['visible', 'hidden', 'noPrint', 'noView']),\n }),\n z.object({ kind: z.literal('setAppearanceText'), ref: FormFieldRefSchema, text: z.string() }),\n z.object({ kind: z.literal('reset'), refs: z.array(FormFieldRefSchema) }),\n]);\n\nexport const FormEffectsResultSchema: z.ZodType<FormEffectsResult> = z.object({\n results: z.array(\n z.object({\n index: z.number().int().nonnegative(),\n status: z.enum(['applied', 'unchanged', 'rejected', 'failed', 'skipped']),\n fields: z.array(FormFieldDTOSchema),\n changedWidgets: z.array(FormWidgetRefSchema),\n error: EngineErrorPayloadSchema.optional(),\n }),\n ),\n changedWidgets: z.array(FormWidgetRefSchema),\n meta: MutationMetaSchema.nullable(),\n});\n\nexport const FormImportResultSchema: z.ZodType<FormImportResult> = z.object({\n fieldsTotal: z.number().int().nonnegative(),\n fieldsApplied: z.number().int().nonnegative(),\n fieldsSkipped: z.number().int().nonnegative(),\n widgetsChanged: z.number().int().nonnegative(),\n snapshot: FormSnapshotSchema,\n meta: MutationMetaSchema,\n});\n\nexport const FormFieldCreateResultSchema: z.ZodType<FormFieldCreateResult> = z.object({\n field: FormFieldDTOSchema,\n meta: MutationMetaSchema,\n});\n\nexport const FormFieldUpdateResultSchema: z.ZodType<FormFieldUpdateResult> = z.object({\n field: FormFieldDTOSchema,\n meta: MutationMetaSchema,\n});\n\nexport const FormFieldDeleteResultSchema: z.ZodType<FormFieldDeleteResult> = z.object({\n deletedFieldObjectNumber: z.number().int().positive(),\n removedWidgets: z.array(FormWidgetRefSchema),\n meta: MutationMetaSchema,\n});\n\nexport const FormWidgetLinkResultSchema: z.ZodType<FormWidgetLinkResult> = z.object({\n field: FormFieldDTOSchema,\n meta: MutationMetaSchema,\n});\n\nexport const FormRepairResultSchema: z.ZodType<FormRepairResult> = z.object({\n acroformCreated: z.boolean(),\n fieldsLinked: z.number().int().nonnegative(),\n widgetsLinked: z.number().int().nonnegative(),\n fieldsUnrepairable: z.number().int().nonnegative(),\n appearancesBaked: z.number().int().nonnegative(),\n needAppearancesCleared: z.boolean(),\n meta: MutationMetaSchema,\n});\n\n/**\n * A PDF box in PDF user space as a `PdfRect` (`{ left, bottom, right, top }`,\n * y-up edges, un-rotated, not origin-normalized). Re-exported from the\n * canonical geometry schema so the wire and the runtime agree.\n */\nexport { PdfRectSchema };\n\nexport const PageBoxesSchema: z.ZodType<PageBoxes> = z.object({\n media: PdfRectSchema,\n crop: PdfRectSchema,\n bleed: PdfRectSchema.optional(),\n trim: PdfRectSchema.optional(),\n art: PdfRectSchema.optional(),\n});\n\n/**\n * Pure geometry for one page (`pages.list()` element). No annotation\n * liveness — that lives on annotation reads and the manifest.\n */\nexport const PageLayoutSchema: z.ZodType<PageLayout> = z.object({\n index: z.number().int().nonnegative(),\n pageObjectNumber: z.number().int().positive(),\n label: z.string().nullable(),\n size: PdfSizeSchema,\n rotation: PdfRotationSchema,\n userUnit: z.number().positive(),\n boxes: PageBoxesSchema,\n actions: PdfPageActionsSchema.optional(),\n});\n\nexport const PageFlattenResultSchema: z.ZodType<PageFlattenResult> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n usage: z.enum(['display', 'print']),\n results: z.array(\n z.object({\n pageObjectNumber: z.number().int().positive(),\n status: z.enum(['applied', 'unchanged', 'failed', 'skipped']),\n error: EngineErrorPayloadSchema.optional(),\n }),\n ),\n meta: MutationMetaSchema.nullable(),\n});\n\nexport const PageFlattenInputSchema: z.ZodType<PageFlattenInput> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n usage: z.enum(['display', 'print']),\n});\n\nexport const RedactionApplyScopeSchema: z.ZodType<RedactionApplyScope> = z.discriminatedUnion(\n 'kind',\n [\n z.object({\n kind: z.literal('pages'),\n pageObjectNumbers: z.array(z.number().int().positive()),\n }),\n z.object({\n kind: z.literal('annotations'),\n refs: z.array(AnnotationRefSchema),\n }),\n ],\n) as unknown as z.ZodType<RedactionApplyScope>;\n\nexport const RedactionApplyResultSchema: z.ZodType<RedactionApplyResult> = z.object({\n scope: RedactionApplyScopeSchema,\n results: z.array(\n z.object({\n pageObjectNumber: z.number().int().positive(),\n status: z.enum(['applied', 'unchanged', 'failed', 'skipped']),\n removedAnnotationCount: z.number().int().nonnegative(),\n error: EngineErrorPayloadSchema.optional(),\n }),\n ),\n removedAnnotationCount: z.number().int().nonnegative(),\n meta: MutationMetaSchema.nullable(),\n});\n\n/**\n * Snapshot of every page in display order. Pages are addressed by\n * `pageObjectNumber` everywhere except the per-element `index`, which is\n * display order and intentionally not an identity. Carries geometry only.\n */\nexport const PageListSnapshotSchema: z.ZodType<PageListSnapshot> = z.object({\n pageCount: z.number().int().nonnegative(),\n pages: z.array(PageLayoutSchema),\n});\n\n/**\n * Page reorder input. Pages are always addressed by `pageObjectNumber`;\n * `destIndex` is the insertion point in the post-removal index space.\n */\nexport const PageMoveInputSchema: z.ZodType<PageMoveInput> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n destIndex: z.number().int().nonnegative(),\n});\n\n/**\n * Coherence pins shared by every page-STRUCTURE result (move/rotate/delete) —\n * see `PageStructureCache`. Nullable at each use site (local engines).\n */\nexport const PageStructureCacheSchema: z.ZodType<PageStructureCache> = z.object({\n previousDocVersion: z.number().int().nonnegative(),\n docVersion: z.number().int().positive(),\n layoutVersion: z.number().int().positive(),\n});\n\n/**\n * Page reorder result. No revision is bumped (no doc-level revision exists,\n * and per-page revisions intentionally survive a page reorder). The full\n * post-move order is returned so callers can swap their snapshot directly.\n */\nexport const PageMoveResultSchema: z.ZodType<PageMoveResult> = z.object({\n layout: PageListSnapshotSchema,\n cache: PageStructureCacheSchema.nullable(),\n});\n\n/**\n * Page rotate input. ABSOLUTE rotation (idempotent — see `PageRotateInput`),\n * one value applied to every listed page.\n */\nexport const PageRotateInputSchema: z.ZodType<PageRotateInput> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n rotation: PdfRotationSchema,\n});\n\n/**\n * Page rotate result. Rotation is presentation metadata over normalized\n * content: nothing per-page invalidates; the new `layout` carries the\n * rotation values (see `PageRotateResult`).\n */\nexport const PageRotateResultSchema: z.ZodType<PageRotateResult> = z.object({\n layout: PageListSnapshotSchema,\n cache: PageStructureCacheSchema.nullable(),\n});\n\n/** Page delete input. Deleting every page is rejected server/worker-side. */\nexport const PageDeleteInputSchema: z.ZodType<PageDeleteInput> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n});\n\n/**\n * Page delete result. Deleted PONs are retired (never recycled); surviving\n * pages keep identity + revisions (see `PageDeleteResult`).\n */\nexport const PageDeleteResultSchema: z.ZodType<PageDeleteResult> = z.object({\n layout: PageListSnapshotSchema,\n cache: PageStructureCacheSchema.nullable(),\n});\n\n/**\n * Metadata write result. The Info dict is rewritten in place, so the\n * result returns the re-read `metadata` plus cloud coherence pins. No\n * `layoutVersion` is touched — a metadata edit bumps only `docVersion`\n * and `metadataVersion`. `cache` is `null` for local engines.\n */\nexport const AttachmentsCacheSchema: z.ZodType<AttachmentsCache> = z.object({\n previousDocVersion: z.number().int().nonnegative(),\n docVersion: z.number().int().positive(),\n attachmentsVersion: z.number().int().positive(),\n});\n\nexport const AttachmentCreateResultSchema: z.ZodType<AttachmentCreateResult> = z.object({\n created: EmbeddedFileItemSchema,\n cache: AttachmentsCacheSchema.nullable(),\n});\n\nexport const AttachmentDeleteResultSchema: z.ZodType<AttachmentDeleteResult> = z.object({\n deleted: EmbeddedFileRefSchema,\n cache: AttachmentsCacheSchema.nullable(),\n});\n\nexport const MetadataUpdateResultSchema: z.ZodType<MetadataUpdateResult> = z.object({\n metadata: DocumentMetadataSchema,\n cache: z\n .object({\n previousDocVersion: z.number().int().nonnegative(),\n docVersion: z.number().int().positive(),\n metadataVersion: z.number().int().positive(),\n })\n .nullable(),\n});\n\nexport const WeakAnnotationSessionResponseSchema = z.object({\n sessionId: z.string().min(1),\n expiresAt: z.number().int().positive(),\n heartbeatIntervalMs: z.number().int().positive(),\n pageObjectNumbers: z.array(z.number().int().positive()),\n});\nexport type WeakAnnotationSessionResponse = z.infer<typeof WeakAnnotationSessionResponseSchema>;\n\nexport const WeakAnnotationSessionPagesRequestSchema = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()).transform((pages) => [...new Set(pages)]),\n});\nexport type We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SAAS;CACT,OAAO,uBAAuB,SAAS;AACzC,CAAC;AAED,MAAa,6BAA8DA,IAAAA,EAAE,OAAO;CAClF,UAAU;CACV,OAAOA,IAAAA,EACJ,OAAO;EACN,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY;EACjD,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;EACtC,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CAC7C,CAAC,CAAC,CACD,SAAS;AACd,CAAC;AAED,MAAa,sCAAsCA,IAAAA,EAAE,OAAO;CAC1D,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAC3B,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACrC,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CAC/C,mBAAmBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC;AAGD,MAAa,0CAA0CA,IAAAA,EAAE,OAAO,EAC9D,mBAAmBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,UAAU,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC,CAAC,EAClG,CAAC"}
|
|
1
|
+
{"version":3,"file":"schemas-BPA_F2HV.cjs","names":["z","z","z","z","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","PdfAnnotationSubtypeCode","z","z","PdfAnnotationSubtypeCode","z","z","z","EngineErrorCode","charMapViolation"],"sources":["../src/geometry/schemas.ts","../src/dto/PdfAction.schema.ts","../src/annotation/base.schema.ts","../src/annotation/kinds/style.shared.ts","../src/annotation/kinds/caret/schema.ts","../src/annotation/kinds/caret/index.ts","../src/annotation/kinds/shape.shared.ts","../src/annotation/kinds/circle/schema.ts","../src/annotation/kinds/circle/index.ts","../src/dto/Attachment.schema.ts","../src/annotation/kinds/file-attachment/schema.ts","../src/annotation/kinds/file-attachment/index.ts","../src/annotation/kinds/free-text/schema.ts","../src/annotation/kinds/free-text/index.ts","../src/annotation/kinds/text-markup.shared.ts","../src/annotation/kinds/highlight/schema.ts","../src/annotation/kinds/highlight/index.ts","../src/annotation/kinds/ink/schema.ts","../src/annotation/kinds/ink/index.ts","../src/annotation/kinds/line/schema.ts","../src/annotation/kinds/line/index.ts","../src/annotation/kinds/link/schema.ts","../src/annotation/kinds/link/index.ts","../src/annotation/kinds/vertex.shared.ts","../src/annotation/kinds/polygon/schema.ts","../src/annotation/kinds/polygon/index.ts","../src/annotation/kinds/polyline/schema.ts","../src/annotation/kinds/polyline/index.ts","../src/annotation/kinds/redact/schema.ts","../src/annotation/kinds/redact/index.ts","../src/annotation/kinds/square/schema.ts","../src/annotation/kinds/square/index.ts","../src/annotation/kinds/squiggly/schema.ts","../src/annotation/kinds/squiggly/index.ts","../src/annotation/kinds/stamp/schema.ts","../src/annotation/kinds/stamp/index.ts","../src/annotation/kinds/strikeout/schema.ts","../src/annotation/kinds/strikeout/index.ts","../src/annotation/kinds/text/schema.ts","../src/annotation/kinds/text/index.ts","../src/annotation/kinds/underline/schema.ts","../src/annotation/kinds/underline/index.ts","../src/annotation/kinds/unsupported/schema.ts","../src/annotation/kinds/unsupported/index.ts","../src/annotation/kinds/widget.shared.ts","../src/annotation/kinds/widget/schema.ts","../src/annotation/kinds/widget/index.ts","../src/annotation/kinds/index.ts","../src/forms/schema.ts","../src/wire/schemas.ts"],"sourcesContent":["/**\n * Zod schemas for engine PDF-document geometry. Exported from `wire.ts` ONLY\n * (never from `shared.ts`/`runtime`) so the zod-free runtime stays zod-free.\n */\n\nimport { z } from 'zod';\n\nimport type {\n CalloutLine,\n InkList,\n LinePoints,\n PdfPoint,\n PdfQuad,\n PdfRect,\n PdfRotation,\n PdfSize,\n} from './primitives';\n\nexport const PdfPointSchema: z.ZodType<PdfPoint> = z.object({\n x: z.number(),\n y: z.number(),\n});\n\nexport const LinePointsSchema: z.ZodType<LinePoints> = z.object({\n start: PdfPointSchema,\n end: PdfPointSchema,\n});\n\n/** `/CL` callout leader line — two points (straight) or three (knee-jointed). */\nexport const CalloutLineSchema: z.ZodType<CalloutLine> = z.union([\n z.tuple([PdfPointSchema, PdfPointSchema]),\n z.tuple([PdfPointSchema, PdfPointSchema, PdfPointSchema]),\n]);\n\n/** `/InkList` — an array of strokes, each an array of points. */\nexport const InkListSchema: z.ZodType<InkList> = z.array(z.array(PdfPointSchema));\n\nexport const PdfRectSchema: z.ZodType<PdfRect> = z.object({\n left: z.number(),\n bottom: z.number(),\n right: z.number(),\n top: z.number(),\n});\n\nexport const PdfSizeSchema: z.ZodType<PdfSize> = z.object({\n width: z.number().nonnegative(),\n height: z.number().nonnegative(),\n});\n\nexport const PdfQuadSchema: z.ZodType<PdfQuad> = z.object({\n p1: PdfPointSchema,\n p2: PdfPointSchema,\n p3: PdfPointSchema,\n p4: PdfPointSchema,\n});\n\nexport const PdfRotationSchema: z.ZodType<PdfRotation> = z.union([\n z.literal(0),\n z.literal(90),\n z.literal(180),\n z.literal(270),\n]);\n","import { z } from 'zod';\n\nimport type {\n DocumentActionsSnapshot,\n PdfActionNode,\n PdfActionTree,\n PdfAnnotationActions,\n PdfFieldActions,\n PdfPageActions,\n} from './PdfAction';\n\nexport const PdfActionTypeSchema = z.enum([\n 'unknown',\n 'goto',\n 'goto-remote',\n 'goto-embedded',\n 'launch',\n 'thread',\n 'uri',\n 'sound',\n 'movie',\n 'hide',\n 'named',\n 'submit-form',\n 'reset-form',\n 'import-data',\n 'javascript',\n 'set-ocg-state',\n 'rendition',\n 'transition',\n 'goto-3d-view',\n]);\n\nexport const PdfActionNodeSchema: z.ZodType<PdfActionNode> = z.lazy(() =>\n z.object({\n type: PdfActionTypeSchema,\n subtype: z.string(),\n script: z.string().optional(),\n next: z.array(PdfActionNodeSchema),\n }),\n);\n\nexport const PdfActionTreeSchema: z.ZodType<PdfActionTree> = z.object({\n root: PdfActionNodeSchema.nullable(),\n incomplete: z.boolean(),\n warningFlags: z.number().int().nonnegative(),\n warnings: z.array(z.enum(['cycle-dropped', 'malformed-next', 'incomplete'])),\n});\n\nexport const PdfFieldActionsSchema: z.ZodType<PdfFieldActions> = z.object({\n keystroke: PdfActionTreeSchema.optional(),\n format: PdfActionTreeSchema.optional(),\n validate: PdfActionTreeSchema.optional(),\n calculate: PdfActionTreeSchema.optional(),\n});\n\nexport const PdfPageActionsSchema: z.ZodType<PdfPageActions> = z.object({\n open: PdfActionTreeSchema.optional(),\n close: PdfActionTreeSchema.optional(),\n});\n\nexport const PdfAnnotationActionsSchema: z.ZodType<PdfAnnotationActions> = z.object({\n activate: PdfActionTreeSchema.optional(),\n cursorEnter: PdfActionTreeSchema.optional(),\n cursorExit: PdfActionTreeSchema.optional(),\n mouseDown: PdfActionTreeSchema.optional(),\n mouseUp: PdfActionTreeSchema.optional(),\n focus: PdfActionTreeSchema.optional(),\n blur: PdfActionTreeSchema.optional(),\n pageOpen: PdfActionTreeSchema.optional(),\n pageClose: PdfActionTreeSchema.optional(),\n pageVisible: PdfActionTreeSchema.optional(),\n pageInvisible: PdfActionTreeSchema.optional(),\n});\n\nexport const DocumentActionsSnapshotSchema: z.ZodType<DocumentActionsSnapshot> = z.object({\n nameTreeScripts: z.array(\n z.object({\n name: z.string(),\n action: PdfActionTreeSchema,\n }),\n ),\n openAction: PdfActionTreeSchema.nullable(),\n willClose: PdfActionTreeSchema.optional(),\n willSave: PdfActionTreeSchema.optional(),\n didSave: PdfActionTreeSchema.optional(),\n willPrint: PdfActionTreeSchema.optional(),\n didPrint: PdfActionTreeSchema.optional(),\n});\n","import { z } from 'zod';\n\nimport type { AnnotationBase } from './base';\nimport type {\n AnnotationBorderStyle,\n AnnotationFlags,\n BlendMode,\n CaretIntent,\n Color,\n FreeTextIntent,\n InkIntent,\n LineEnding,\n LineEndings,\n PdfRectDifferences,\n StandardFont,\n StrikeoutIntent,\n TextAlignment,\n} from './primitives';\nimport { PdfPointSchema, PdfRectSchema, PdfQuadSchema } from '../geometry/schemas';\nimport type { AnnotationRef } from '../identity/AnnotationRef';\nimport type { AnnotationStableId } from '../identity/AnnotationStableId';\nimport type { RevisionToken } from '../revision/RevisionToken';\nimport { PdfAnnotationActionsSchema } from '../dto/PdfAction.schema';\n\n/** @deprecated Use `PdfPointSchema` from `../geometry/schemas`. */\nexport const PointSchema = PdfPointSchema;\n/** @deprecated Use `PdfRectSchema` from `../geometry/schemas`. */\nexport const RectSchema = PdfRectSchema;\n\nexport const ColorSchema: z.ZodType<Color> = z.object({\n r: z.number().int().min(0).max(255),\n g: z.number().int().min(0).max(255),\n b: z.number().int().min(0).max(255),\n});\n\nexport const AnnotationBorderStyleSchema: z.ZodType<AnnotationBorderStyle> = z.enum([\n 'solid',\n 'dashed',\n 'beveled',\n 'inset',\n]);\n\nexport const PdfRectDifferencesSchema: z.ZodType<PdfRectDifferences> = z.object({\n left: z.number().nonnegative(),\n top: z.number().nonnegative(),\n right: z.number().nonnegative(),\n bottom: z.number().nonnegative(),\n});\n\nexport const LineEndingSchema: z.ZodType<LineEnding> = z.enum([\n 'none',\n 'square',\n 'circle',\n 'diamond',\n 'open-arrow',\n 'closed-arrow',\n 'butt',\n 'r-open-arrow',\n 'r-closed-arrow',\n 'slash',\n]);\n\nexport const LineEndingsSchema: z.ZodType<LineEndings> = z.object({\n start: LineEndingSchema,\n end: LineEndingSchema,\n});\n\nexport const StandardFontSchema: z.ZodType<StandardFont> = z.enum([\n 'courier',\n 'courier-bold',\n 'courier-bold-oblique',\n 'courier-oblique',\n 'helvetica',\n 'helvetica-bold',\n 'helvetica-bold-oblique',\n 'helvetica-oblique',\n 'times-roman',\n 'times-bold',\n 'times-bold-italic',\n 'times-italic',\n 'symbol',\n 'zapf-dingbats',\n]);\n\nexport const TextAlignmentSchema: z.ZodType<TextAlignment> = z.enum(['left', 'center', 'right']);\n\nexport const FreeTextIntentSchema: z.ZodType<FreeTextIntent> = z.enum([\n 'free-text',\n 'free-text-callout',\n]);\n\nexport const CaretIntentSchema: z.ZodType<CaretIntent> = z.literal('replace');\n\nexport const StrikeoutIntentSchema: z.ZodType<StrikeoutIntent> = z.literal('strikeout-text-edit');\n\nexport const InkIntentSchema: z.ZodType<InkIntent> = z.literal('ink-highlight');\n\nexport const BlendModeSchema: z.ZodType<BlendMode> = z.enum([\n 'normal',\n 'multiply',\n 'screen',\n 'overlay',\n 'darken',\n 'lighten',\n 'color-dodge',\n 'color-burn',\n 'hard-light',\n 'soft-light',\n 'difference',\n 'exclusion',\n 'hue',\n 'saturation',\n 'color',\n 'luminosity',\n]);\n\nexport const AnnotationFlagsSchema: z.ZodType<AnnotationFlags> = z.object({\n invisible: z.boolean(),\n hidden: z.boolean(),\n print: z.boolean(),\n noZoom: z.boolean(),\n noRotate: z.boolean(),\n noView: z.boolean(),\n readOnly: z.boolean(),\n locked: z.boolean(),\n toggleNoView: z.boolean(),\n lockedContents: z.boolean(),\n});\n\n/**\n * Partial flag set authorable on a Draft or Patch — every key optional so\n * callers set only the bits they care about. The engine merges these onto\n * the annotation's current `/F` bitset.\n */\nexport const AnnotationFlagsPartialSchema: z.ZodType<Partial<AnnotationFlags>> = z\n .object({\n invisible: z.boolean(),\n hidden: z.boolean(),\n print: z.boolean(),\n noZoom: z.boolean(),\n noRotate: z.boolean(),\n noView: z.boolean(),\n readOnly: z.boolean(),\n locked: z.boolean(),\n toggleNoView: z.boolean(),\n lockedContents: z.boolean(),\n })\n .partial();\n\nexport const AnnotationStableIdSchema: z.ZodType<AnnotationStableId> = z.discriminatedUnion(\n 'kind',\n [\n z.object({ kind: z.literal('objectNumber'), value: z.number().int().nonnegative() }),\n z.object({ kind: z.literal('nm'), value: z.string() }),\n ],\n);\n\nexport const RevisionTokenSchema: z.ZodType<RevisionToken> = z.object({\n docSessionId: z.string(),\n pageObjectNumber: z.number().int().positive(),\n generation: z.number().int().nonnegative(),\n});\n\nexport const AnnotationRefSchema: z.ZodType<AnnotationRef> = z.discriminatedUnion('kind', [\n z.object({\n kind: z.literal('objectNumber'),\n pageObjectNumber: z.number().int().positive(),\n annotObjectNumber: z.number().int().positive(),\n }),\n z.object({\n kind: z.literal('nm'),\n pageObjectNumber: z.number().int().positive(),\n nm: z.string(),\n }),\n z.object({\n kind: z.literal('index'),\n pageObjectNumber: z.number().int().positive(),\n index: z.number().int().nonnegative(),\n revision: RevisionTokenSchema,\n }),\n]);\n\n/**\n * Shared object literal for every per-subtype DTO schema. Each kind's\n * `dto.schema.ts` extends this with its own `subtype` literal and\n * subtype-specific fields. Note that we do NOT include `subtype` here —\n * each kind sets its own literal so `z.discriminatedUnion('subtype', ...)`\n * works at the catalog level.\n */\nexport const AnnotationBaseShape = {\n ref: AnnotationRefSchema,\n pageObjectNumber: z.number().int().positive(),\n index: z.number().int().nonnegative(),\n identityQuality: z.enum(['durable', 'weak']),\n nm: z.string().nullable(),\n flags: AnnotationFlagsSchema,\n rect: PdfRectSchema,\n contents: z.string().nullable(),\n author: z.string().nullable(),\n created: z.string().datetime().nullable(),\n modified: z.string().datetime().nullable(),\n blendMode: BlendModeSchema,\n // /IRT resolved to the parent's ref + /RT. null exactly when top-level.\n inReplyTo: AnnotationRefSchema.nullable(),\n replyType: z.enum(['reply', 'group']).nullable(),\n // EmbedPDF /EMBD_Metadata fields — see AnnotationBase docstring.\n // Optional (absent for legacy or anonymous annotations) and never\n // null on the wire: present-as-string or absent entirely.\n userId: z.string().optional(),\n groupId: z.string().optional(),\n createdBy: z.string().optional(),\n updatedBy: z.string().optional(),\n actions: PdfAnnotationActionsSchema.optional(),\n} as const;\n\n/**\n * Annotation-wide fields shared by every Draft. Per-kind draft schemas\n * spread this alongside their family-specific shape.\n *\n * Authorial identity (/T, /EMBD_Metadata UserID/GroupID) is set by the\n * server from the caller's JWT identity — see the AnnotationDraftBase\n * docstring.\n */\nexport const AnnotationDraftBaseShape = {\n contents: z.string().nullable().optional(),\n blendMode: BlendModeSchema.optional(),\n nm: z.string().optional(),\n flags: AnnotationFlagsPartialSchema.optional(),\n inReplyTo: AnnotationRefSchema.optional(),\n replyType: z.enum(['reply', 'group']).optional(),\n} as const;\n\n/**\n * Annotation-wide fields shared by every Patch. `nm` is monotonic per\n * annotation; clients target an existing annotation via AnnotationRef\n * instead of renaming.\n *\n * `groupId` is the only identity-shaped field on a patch — it\n * represents organizational ownership, and reassignment runs through\n * `checkSetGroup`. See AnnotationPatchBase for the full immutability\n * rules.\n */\nexport const AnnotationPatchBaseShape = {\n contents: z.string().nullable().optional(),\n blendMode: BlendModeSchema.optional(),\n groupId: z.string().min(1).optional(),\n flags: AnnotationFlagsPartialSchema.optional(),\n // Three-state: undefined=leave, null=clear /IRT (+/RT), ref=set/relink.\n inReplyTo: AnnotationRefSchema.nullable().optional(),\n replyType: z.enum(['reply', 'group']).optional(),\n} as const;\n\n/** Helper that asserts `BasePart extends AnnotationBase` without subtype. */\nexport type AnnotationBaseSansSubtype = Omit<AnnotationBase, 'subtype' | 'ref'> & {\n ref: AnnotationRef;\n};\n","import { z } from 'zod';\n\nimport { AnnotationBorderStyleSchema, ColorSchema } from '../base.schema';\nimport type { AnnotationBorderStyle, Color } from '../primitives';\n\n/**\n * Composable styling layers shared by every annotation family, named after\n * the PDF entries they map onto so the v3 wire vocabulary matches ISO 32000:\n *\n * ColorStyleFields -> `/C` (color) + `/CA` (opacity) — universal\n * GeometryStyleFields -> + `/BS` (border style / width / dash) — geometric\n * FilledStyleFields -> + `/IC` (interior color) — filled shapes\n *\n * There is exactly one `/C` in the spec (\"Color\") and one `/IC` (\"Interior\n * Color\") — there is no \"stroke color\" — so every family that carries `/C`\n * exposes the same `color` field. This is what lets a multi-select \"change\n * colour\" operate uniformly across text-markup, lines, and shapes.\n *\n * Composition by family:\n * - text-markup (highlight/underline/squiggly/strikeout) -> ColorStyleFields\n * - ink -> GeometryStyleFields\n * - square/circle/polygon/polyline/line -> FilledStyleFields\n */\n\n// ── /C + /CA — present on every annotation ──────────────────────────────\nexport interface ColorStyleFields {\n /** `/C` color. Stroke colour for geometric kinds; highlight colour for markup. */\n color: Color;\n /** `/CA` constant opacity, 0..1. */\n opacity: number;\n}\n\nexport interface ColorStyleDraftFields {\n color?: Color;\n opacity?: number;\n}\n\nexport type ColorStylePatchFields = ColorStyleDraftFields;\n\nexport const ColorStyleDTOShape = {\n color: ColorSchema,\n opacity: z.number().min(0).max(1),\n} as const;\n\nexport const ColorStyleDraftShape = {\n color: ColorSchema.optional(),\n opacity: z.number().min(0).max(1).optional(),\n} as const;\n\nexport const ColorStylePatchShape = ColorStyleDraftShape;\n\n// ── + /BS — geometric kinds (shapes, vertex, line, ink) ─────────────────\nexport interface GeometryStyleFields extends ColorStyleFields {\n /** `/BS /W` border width, in PDF points. */\n strokeWidth: number;\n /** `/BS /S` border style. */\n borderStyle: AnnotationBorderStyle;\n /** `/BS /D` dash pattern. Only meaningful when `borderStyle === 'dashed'`. */\n dashArray?: number[];\n}\n\nexport interface GeometryStyleDraftFields extends ColorStyleDraftFields {\n strokeWidth?: number;\n borderStyle?: AnnotationBorderStyle;\n dashArray?: number[];\n}\n\nexport type GeometryStylePatchFields = GeometryStyleDraftFields;\n\nexport const GeometryStyleDTOShape = {\n ...ColorStyleDTOShape,\n strokeWidth: z.number().nonnegative(),\n borderStyle: AnnotationBorderStyleSchema,\n dashArray: z.array(z.number().nonnegative()).optional(),\n} as const;\n\nexport const GeometryStyleDraftShape = {\n ...ColorStyleDraftShape,\n strokeWidth: z.number().nonnegative().optional(),\n borderStyle: AnnotationBorderStyleSchema.optional(),\n dashArray: z.array(z.number().nonnegative()).optional(),\n} as const;\n\nexport const GeometryStylePatchShape = GeometryStyleDraftShape;\n\n// ── + /IC — filled geometric kinds (shapes, vertex, line) ───────────────\nexport interface FilledStyleFields extends GeometryStyleFields {\n /** `/IC` interior (fill) color. `null` when the annotation has no fill. */\n interiorColor: Color | null;\n}\n\nexport interface FilledStyleDraftFields extends GeometryStyleDraftFields {\n interiorColor?: Color | null;\n}\n\nexport type FilledStylePatchFields = FilledStyleDraftFields;\n\nexport const FilledStyleDTOShape = {\n ...GeometryStyleDTOShape,\n interiorColor: ColorSchema.nullable(),\n} as const;\n\nexport const FilledStyleDraftShape = {\n ...GeometryStyleDraftShape,\n interiorColor: ColorSchema.nullable().optional(),\n} as const;\n\nexport const FilledStylePatchShape = FilledStyleDraftShape;\n","import { z } from 'zod';\n\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n CaretIntentSchema,\n PdfRectDifferencesSchema,\n} from '../../base.schema';\nimport { ColorStyleDTOShape, ColorStyleDraftShape, ColorStylePatchShape } from '../style.shared';\nimport type { CaretDraft } from './draft';\nimport type { CaretAnnotationDTO } from './dto';\nimport type { CaretPatch } from './patch';\n\nexport const CaretDTOSchema: z.ZodType<CaretAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...ColorStyleDTOShape,\n intent: CaretIntentSchema.nullable(),\n rectDifferences: PdfRectDifferencesSchema.nullable(),\n rotation: z.number().optional(),\n unrotatedRect: PdfRectSchema.optional(),\n subtype: z.literal('caret'),\n}) as unknown as z.ZodType<CaretAnnotationDTO>;\n\nexport const CaretDraftSchema: z.ZodType<CaretDraft> = z.object({\n ...ColorStyleDraftShape,\n ...AnnotationDraftBaseShape,\n intent: CaretIntentSchema.optional(),\n rect: PdfRectSchema,\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('caret'),\n});\n\nexport const CaretPatchSchema: z.ZodType<CaretPatch> = z.object({\n ...ColorStylePatchShape,\n ...AnnotationPatchBaseShape,\n intent: CaretIntentSchema.optional(),\n rect: PdfRectSchema.optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('caret'),\n});\n","import type { CaretDraft } from './draft';\nimport type { CaretAnnotationDTO } from './dto';\nimport type { CaretPatch } from './patch';\nimport { CaretDTOSchema, CaretDraftSchema, CaretPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { CaretAnnotationDTO } from './dto';\nexport type { CaretDraft } from './draft';\nexport type { CaretPatch } from './patch';\nexport { CaretDTOSchema, CaretDraftSchema, CaretPatchSchema } from './schema';\n\nexport const CaretKind: AnnotationKindModule<'caret', CaretAnnotationDTO, CaretDraft, CaretPatch> =\n {\n subtype: 'caret',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.CARET,\n dtoSchema: CaretDTOSchema,\n draftSchema: CaretDraftSchema,\n patchSchema: CaretPatchSchema,\n };\n","import { z } from 'zod';\n\nimport type { PdfRect } from '../../geometry/primitives';\nimport { PdfRectSchema } from '../../geometry/schemas';\nimport type { AnnotationBase } from '../base';\nimport { AnnotationBaseShape, PdfRectDifferencesSchema } from '../base.schema';\nimport type { PdfRectDifferences } from '../primitives';\nimport {\n FilledStyleDTOShape,\n FilledStyleDraftShape,\n FilledStylePatchShape,\n type FilledStyleDraftFields,\n type FilledStyleFields,\n type FilledStylePatchFields,\n} from './style.shared';\n\n/**\n * Shape-family-specific fields. The two shape subtypes (circle/square)\n * share their wire shape per ISO 32000 §12.5.6.8: they are `/Rect`-based\n * outlines with the common stroke/fill styling ({@link FilledStyleFields}),\n * an optional cloudy border effect (`/BE`), and optional rectangle\n * differences (`/RD`).\n *\n * Unlike the text-markup family (which derives `/Rect` from `quadPoints`),\n * shapes carry `/Rect` as their primary geometry — so the Draft requires\n * `rect` explicitly while the DTO inherits it from `AnnotationBase`.\n */\n/**\n * Rotation fields shared by the rotatable box families (shapes + free-text).\n * `rotation` is degrees in PDF convention (the v3 plugin converts its\n * content-space clockwise angle at the boundary); `unrotatedRect` is the\n * logical (pre-rotation) box. Together they drive PDFium's `/EMBD_Metadata`\n * AP rotation (`/Matrix` + `/BBox`); `/Rect` stays the rotated visual AABB.\n */\nexport interface ShapeAnnotationFields extends FilledStyleFields {\n /** `/BE` cloudy border intensity; `null` when the border carries no effect. */\n cloudyIntensity: number | null;\n /** `/RD` rectangle differences (inset of drawn geometry from `/Rect`); `null` when absent. */\n rectDifferences: PdfRectDifferences | null;\n /** `/EMBD_Metadata/Rotation` — degrees, normalized `[0,360)`. */\n rotation?: number;\n /** `/EMBD_Metadata/UnrotatedRect` — the logical box (required when rotation != 0). */\n unrotatedRect?: PdfRect;\n}\n\nexport interface ShapeDraftFields extends FilledStyleDraftFields {\n /** `/Rect` geometry — required for shapes (they are not derived from quads). */\n rect: PdfRect;\n cloudyIntensity?: number | null;\n rectDifferences?: PdfRectDifferences | null;\n rotation?: number | null;\n unrotatedRect?: PdfRect | null;\n}\n\nexport interface ShapePatchFields extends FilledStylePatchFields {\n rect?: PdfRect;\n /** Tri-state (as `interiorColor`): omitted preserves, a value sets, `null` removes `/BE`. */\n cloudyIntensity?: number | null;\n /** Tri-state: omitted preserves, a value sets, `null` removes `/RD`. */\n rectDifferences?: PdfRectDifferences | null;\n /** Tri-state: omitted preserves, `null`/`0` flattens, a value sets (needs the box). */\n rotation?: number | null;\n /** Tri-state: omitted preserves, `null` removes, a value sets. */\n unrotatedRect?: PdfRect | null;\n}\n\nexport const ShapeDTOShape = {\n ...AnnotationBaseShape,\n ...FilledStyleDTOShape,\n cloudyIntensity: z.number().positive().nullable(),\n rectDifferences: PdfRectDifferencesSchema.nullable(),\n rotation: z.number().optional(),\n unrotatedRect: PdfRectSchema.optional(),\n} as const;\n\nexport const ShapeDraftShape = {\n ...FilledStyleDraftShape,\n rect: PdfRectSchema,\n cloudyIntensity: z.number().positive().nullable().optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n} as const;\n\nexport const ShapePatchShape = {\n ...FilledStylePatchShape,\n rect: PdfRectSchema.optional(),\n cloudyIntensity: z.number().positive().nullable().optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n} as const;\n\n/** Glue type used by each shape kind file to construct its concrete DTO. */\nexport type ShapeDTO<S extends string> = AnnotationBase & {\n subtype: S;\n} & ShapeAnnotationFields;\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport { ShapeDTOShape, ShapeDraftShape, ShapePatchShape } from '../shape.shared';\nimport type { CircleDraft } from './draft';\nimport type { CircleAnnotationDTO } from './dto';\nimport type { CirclePatch } from './patch';\n\nexport const CircleDTOSchema: z.ZodType<CircleAnnotationDTO> = z.object({\n ...ShapeDTOShape,\n subtype: z.literal('circle'),\n}) as unknown as z.ZodType<CircleAnnotationDTO>;\n\nexport const CircleDraftSchema: z.ZodType<CircleDraft> = z.object({\n ...ShapeDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('circle'),\n});\n\nexport const CirclePatchSchema: z.ZodType<CirclePatch> = z.object({\n ...ShapePatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('circle'),\n});\n","import type { CircleDraft } from './draft';\nimport type { CircleAnnotationDTO } from './dto';\nimport type { CirclePatch } from './patch';\nimport { CircleDTOSchema, CircleDraftSchema, CirclePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { CircleAnnotationDTO } from './dto';\nexport type { CircleDraft } from './draft';\nexport type { CirclePatch } from './patch';\nexport { CircleDTOSchema, CircleDraftSchema, CirclePatchSchema } from './schema';\n\nexport const CircleKind: AnnotationKindModule<\n 'circle',\n CircleAnnotationDTO,\n CircleDraft,\n CirclePatch\n> = {\n subtype: 'circle',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.CIRCLE,\n dtoSchema: CircleDTOSchema,\n draftSchema: CircleDraftSchema,\n patchSchema: CirclePatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { AttachmentFileInfo, EmbeddedFileItem, EmbeddedFileRef } from './Attachment';\n\n/**\n * Wire schemas for the attachment read vocabulary (see `Attachment.ts`).\n * The write-side `AttachmentFileSource` carries inline bytes and never\n * appears on the wire — its post-normalization form is the kind-owned\n * `WireAttachmentFile` (see `annotation/kinds/file-attachment/schema.ts`).\n */\n\nexport const AttachmentFileInfoSchema: z.ZodType<AttachmentFileInfo> = z.object({\n name: z.string(),\n mimeType: z.string().optional(),\n description: z.string().optional(),\n size: z.number().int().nonnegative().optional(),\n checksum: z.string().optional(),\n creationDate: z.string().optional(),\n});\n\nexport const EmbeddedFileRefSchema: z.ZodType<EmbeddedFileRef> = z.object({\n kind: z.literal('key'),\n key: z.string().min(1),\n});\n\nexport const EmbeddedFileItemSchema: z.ZodType<EmbeddedFileItem> = z.object({\n key: z.string(),\n name: z.string(),\n mimeType: z.string().optional(),\n description: z.string().optional(),\n size: z.number().int().nonnegative().optional(),\n checksum: z.string().optional(),\n creationDate: z.string().optional(),\n index: z.number().int().nonnegative(),\n});\n","import { z } from 'zod';\n\nimport { AttachmentFileInfoSchema } from '../../../dto/Attachment.schema';\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport { ColorStyleDTOShape, ColorStyleDraftShape, ColorStylePatchShape } from '../style.shared';\nimport type { FileAttachmentIcon, FileAttachmentWireDraft, WireAttachmentFile } from './draft';\nimport type { FileAttachmentAnnotationDTO } from './dto';\nimport type { FileAttachmentPatch } from './patch';\n\nexport const FileAttachmentIconSchema: z.ZodType<FileAttachmentIcon> = z.enum([\n 'push-pin',\n 'paperclip',\n 'graph',\n 'tag',\n]);\n\n/** Post-normalization form of the attached file: metadata + resource ref. */\nexport const WireAttachmentFileSchema: z.ZodType<WireAttachmentFile> = z.object({\n resource: z.string().min(1),\n name: z.string().min(1),\n mimeType: z.string().optional(),\n description: z.string().optional(),\n});\n\nexport const FileAttachmentDTOSchema: z.ZodType<FileAttachmentAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...ColorStyleDTOShape,\n icon: FileAttachmentIconSchema,\n file: AttachmentFileInfoSchema,\n subtype: z.literal('file-attachment'),\n}) as unknown as z.ZodType<FileAttachmentAnnotationDTO>;\n\nexport const FileAttachmentWireDraftSchema: z.ZodType<FileAttachmentWireDraft> = z.object({\n ...ColorStyleDraftShape,\n ...AnnotationDraftBaseShape,\n rect: PdfRectSchema,\n file: WireAttachmentFileSchema,\n icon: FileAttachmentIconSchema.optional(),\n subtype: z.literal('file-attachment'),\n});\n\nexport const FileAttachmentPatchSchema: z.ZodType<FileAttachmentPatch> = z.object({\n ...ColorStylePatchShape,\n ...AnnotationPatchBaseShape,\n rect: PdfRectSchema.optional(),\n icon: FileAttachmentIconSchema.optional(),\n subtype: z.literal('file-attachment'),\n});\n","import type { FileAttachmentWireDraft } from './draft';\nimport type { FileAttachmentAnnotationDTO } from './dto';\nimport type { FileAttachmentPatch } from './patch';\nimport {\n FileAttachmentDTOSchema,\n FileAttachmentPatchSchema,\n FileAttachmentWireDraftSchema,\n} from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { FileAttachmentAnnotationDTO } from './dto';\nexport type {\n FileAttachmentDraft,\n FileAttachmentWireDraft,\n FileAttachmentIcon,\n WireAttachmentFile,\n} from './draft';\nexport type { FileAttachmentPatch } from './patch';\nexport {\n FileAttachmentDTOSchema,\n FileAttachmentWireDraftSchema,\n FileAttachmentPatchSchema,\n FileAttachmentIconSchema,\n WireAttachmentFileSchema,\n} from './schema';\nexport { normalizeFileAttachmentDraft, normalizeAttachmentFileSource } from './normalize';\n\n/**\n * WIRE-typed like `StampKind`: the draft schema validates the\n * post-normalization form (`file` as metadata + resource ref). The\n * authoring `FileAttachmentDraft` (inline bytes) is swapped into the\n * public `AnnotationDraft` union in `kinds/index.ts`. The patch carries\n * no binary (`file` is create-only), so its authoring and wire forms are\n * the same type.\n */\nexport const FileAttachmentKind: AnnotationKindModule<\n 'file-attachment',\n FileAttachmentAnnotationDTO,\n FileAttachmentWireDraft,\n FileAttachmentPatch\n> = {\n subtype: 'file-attachment',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.FILEATTACHMENT,\n dtoSchema: FileAttachmentDTOSchema,\n draftSchema: FileAttachmentWireDraftSchema,\n patchSchema: FileAttachmentPatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { FreeTextDraft } from './draft';\nimport type { FreeTextAnnotationDTO } from './dto';\nimport type { FreeTextPatch } from './patch';\nimport { CalloutLineSchema, PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationBorderStyleSchema,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n ColorSchema,\n FreeTextIntentSchema,\n LineEndingSchema,\n PdfRectDifferencesSchema,\n StandardFontSchema,\n TextAlignmentSchema,\n} from '../../base.schema';\nimport type { FreeTextFont } from '../../primitives';\n\n/** Authoring `fontFamily`: a standard font name OR a registered font `key`.\n * Any non-empty string is accepted; the writer resolves which it is (and a\n * key that was never registered fails loud there). The read-back DTO keeps the\n * narrower {@link StandardFontSchema}. */\nconst FreeTextFontSchema = z.string().min(1) as unknown as z.ZodType<FreeTextFont>;\n\nexport const FreeTextDTOSchema: z.ZodType<FreeTextAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n intent: FreeTextIntentSchema,\n fontFamily: StandardFontSchema,\n fontSize: z.number().positive(),\n textAlign: TextAlignmentSchema,\n color: ColorSchema,\n fontColor: ColorSchema.optional(),\n interiorColor: ColorSchema.nullable(),\n opacity: z.number().min(0).max(1),\n strokeWidth: z.number().nonnegative(),\n borderStyle: AnnotationBorderStyleSchema,\n dashArray: z.array(z.number().nonnegative()).optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable(),\n calloutLine: CalloutLineSchema.optional(),\n lineEnding: LineEndingSchema.optional(),\n rotation: z.number().optional(),\n unrotatedRect: PdfRectSchema.optional(),\n subtype: z.literal('free-text'),\n}) as unknown as z.ZodType<FreeTextAnnotationDTO>;\n\nexport const FreeTextDraftSchema: z.ZodType<FreeTextDraft> = z.object({\n ...AnnotationDraftBaseShape,\n intent: FreeTextIntentSchema,\n fontFamily: FreeTextFontSchema,\n fontSize: z.number().positive(),\n textAlign: TextAlignmentSchema,\n rect: PdfRectSchema,\n color: ColorSchema.optional(),\n fontColor: ColorSchema.optional(),\n interiorColor: ColorSchema.nullable().optional(),\n opacity: z.number().min(0).max(1).optional(),\n strokeWidth: z.number().nonnegative().optional(),\n borderStyle: AnnotationBorderStyleSchema.optional(),\n dashArray: z.array(z.number().nonnegative()).optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n calloutLine: CalloutLineSchema.optional(),\n lineEnding: LineEndingSchema.optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('free-text'),\n});\n\nexport const FreeTextPatchSchema: z.ZodType<FreeTextPatch> = z.object({\n ...AnnotationPatchBaseShape,\n intent: FreeTextIntentSchema.optional(),\n fontFamily: FreeTextFontSchema.optional(),\n fontSize: z.number().positive().optional(),\n textAlign: TextAlignmentSchema.optional(),\n rect: PdfRectSchema.optional(),\n color: ColorSchema.optional(),\n fontColor: ColorSchema.optional(),\n interiorColor: ColorSchema.nullable().optional(),\n opacity: z.number().min(0).max(1).optional(),\n strokeWidth: z.number().nonnegative().optional(),\n borderStyle: AnnotationBorderStyleSchema.optional(),\n dashArray: z.array(z.number().nonnegative()).optional(),\n rectDifferences: PdfRectDifferencesSchema.nullable().optional(),\n calloutLine: CalloutLineSchema.optional(),\n lineEnding: LineEndingSchema.optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('free-text'),\n});\n","import type { FreeTextDraft } from './draft';\nimport type { FreeTextAnnotationDTO } from './dto';\nimport type { FreeTextPatch } from './patch';\nimport { FreeTextDTOSchema, FreeTextDraftSchema, FreeTextPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { FreeTextAnnotationDTO } from './dto';\nexport type { FreeTextDraft } from './draft';\nexport type { FreeTextPatch } from './patch';\nexport { FreeTextDTOSchema, FreeTextDraftSchema, FreeTextPatchSchema } from './schema';\n\nexport const FreeTextKind: AnnotationKindModule<\n 'free-text',\n FreeTextAnnotationDTO,\n FreeTextDraft,\n FreeTextPatch\n> = {\n subtype: 'free-text',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.FREETEXT,\n dtoSchema: FreeTextDTOSchema,\n draftSchema: FreeTextDraftSchema,\n patchSchema: FreeTextPatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { PdfQuad } from '../../geometry/primitives';\nimport { PdfQuadSchema } from '../../geometry/schemas';\nimport type { AnnotationBase } from '../base';\nimport { AnnotationBaseShape } from '../base.schema';\nimport {\n ColorStyleDTOShape,\n ColorStyleDraftShape,\n ColorStylePatchShape,\n type ColorStyleDraftFields,\n type ColorStyleFields,\n type ColorStylePatchFields,\n} from './style.shared';\n\n/**\n * Text-markup family-specific fields. The four text-markup subtypes\n * (highlight/underline/squiggly/strikeout) share their wire shape per\n * ISO 32000 12.5.6.10: the universal {@link ColorStyleFields} (`/C` color +\n * `/CA` opacity) plus one or more `quadPoints` quads.\n *\n * This file ONLY carries fields that are unique to the text-markup\n * family. Annotation-wide author-metadata (`contents`, `author`, `nm`)\n * lives on `AnnotationDraftBase` / `AnnotationPatchBase`. Each kind's\n * draft/patch type composes the two: family fields + base fields +\n * own `subtype` literal.\n */\nexport interface TextMarkupAnnotationFields extends ColorStyleFields {\n quadPoints: PdfQuad[];\n}\n\nexport interface TextMarkupDraftFields extends ColorStyleDraftFields {\n quadPoints: PdfQuad[];\n}\n\nexport interface TextMarkupPatchFields extends ColorStylePatchFields {\n quadPoints?: PdfQuad[];\n}\n\nexport const TextMarkupDTOShape = {\n ...AnnotationBaseShape,\n ...ColorStyleDTOShape,\n quadPoints: z.array(PdfQuadSchema),\n} as const;\n\nexport const TextMarkupDraftShape = {\n ...ColorStyleDraftShape,\n quadPoints: z.array(PdfQuadSchema),\n} as const;\n\nexport const TextMarkupPatchShape = {\n ...ColorStylePatchShape,\n quadPoints: z.array(PdfQuadSchema).optional(),\n} as const;\n\n/** Glue type used by each kind file to construct its concrete DTO. */\nexport type TextMarkupDTO<S extends string> = AnnotationBase & {\n subtype: S;\n} & TextMarkupAnnotationFields;\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport {\n TextMarkupDTOShape,\n TextMarkupDraftShape,\n TextMarkupPatchShape,\n} from '../text-markup.shared';\nimport type { HighlightDraft } from './draft';\nimport type { HighlightAnnotationDTO } from './dto';\nimport type { HighlightPatch } from './patch';\n\nexport const HighlightDTOSchema: z.ZodType<HighlightAnnotationDTO> = z.object({\n ...TextMarkupDTOShape,\n subtype: z.literal('highlight'),\n}) as unknown as z.ZodType<HighlightAnnotationDTO>;\n\nexport const HighlightDraftSchema: z.ZodType<HighlightDraft> = z.object({\n ...TextMarkupDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('highlight'),\n});\n\nexport const HighlightPatchSchema: z.ZodType<HighlightPatch> = z.object({\n ...TextMarkupPatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('highlight'),\n});\n","import type { HighlightDraft } from './draft';\nimport type { HighlightAnnotationDTO } from './dto';\nimport type { HighlightPatch } from './patch';\nimport { HighlightDTOSchema, HighlightDraftSchema, HighlightPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { HighlightAnnotationDTO } from './dto';\nexport type { HighlightDraft } from './draft';\nexport type { HighlightPatch } from './patch';\nexport { HighlightDTOSchema, HighlightDraftSchema, HighlightPatchSchema } from './schema';\n\nexport const HighlightKind: AnnotationKindModule<\n 'highlight',\n HighlightAnnotationDTO,\n HighlightDraft,\n HighlightPatch\n> = {\n subtype: 'highlight',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.HIGHLIGHT,\n dtoSchema: HighlightDTOSchema,\n draftSchema: HighlightDraftSchema,\n patchSchema: HighlightPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { InkListSchema, PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n InkIntentSchema,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport {\n GeometryStyleDTOShape,\n GeometryStyleDraftShape,\n GeometryStylePatchShape,\n} from '../style.shared';\nimport type { InkDraft } from './draft';\nimport type { InkAnnotationDTO } from './dto';\nimport type { InkPatch } from './patch';\n\nexport const InkDTOSchema: z.ZodType<InkAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...GeometryStyleDTOShape,\n intent: InkIntentSchema.nullable(),\n inkList: InkListSchema,\n rotation: z.number().optional(),\n subtype: z.literal('ink'),\n}) as unknown as z.ZodType<InkAnnotationDTO>;\n\nexport const InkDraftSchema: z.ZodType<InkDraft> = z.object({\n ...GeometryStyleDraftShape,\n ...AnnotationDraftBaseShape,\n intent: InkIntentSchema.optional(),\n inkList: InkListSchema,\n rect: PdfRectSchema,\n rotation: z.number().nullable().optional(),\n subtype: z.literal('ink'),\n});\n\nexport const InkPatchSchema: z.ZodType<InkPatch> = z.object({\n ...GeometryStylePatchShape,\n ...AnnotationPatchBaseShape,\n intent: InkIntentSchema.optional(),\n inkList: InkListSchema.optional(),\n rect: PdfRectSchema.optional(),\n rotation: z.number().nullable().optional(),\n subtype: z.literal('ink'),\n});\n","import type { InkDraft } from './draft';\nimport type { InkAnnotationDTO } from './dto';\nimport type { InkPatch } from './patch';\nimport { InkDTOSchema, InkDraftSchema, InkPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { InkAnnotationDTO } from './dto';\nexport type { InkDraft } from './draft';\nexport type { InkPatch } from './patch';\nexport { InkDTOSchema, InkDraftSchema, InkPatchSchema } from './schema';\n\nexport const InkKind: AnnotationKindModule<'ink', InkAnnotationDTO, InkDraft, InkPatch> = {\n subtype: 'ink',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.INK,\n dtoSchema: InkDTOSchema,\n draftSchema: InkDraftSchema,\n patchSchema: InkPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { LinePointsSchema, PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n LineEndingsSchema,\n} from '../../base.schema';\nimport { FilledStyleDTOShape, FilledStyleDraftShape, FilledStylePatchShape } from '../style.shared';\nimport type { LineDraft } from './draft';\nimport type { LineAnnotationDTO } from './dto';\nimport type { LinePatch } from './patch';\n\nexport const LineDTOSchema: z.ZodType<LineAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...FilledStyleDTOShape,\n linePoints: LinePointsSchema,\n lineEndings: LineEndingsSchema,\n rotation: z.number().optional(),\n subtype: z.literal('line'),\n}) as unknown as z.ZodType<LineAnnotationDTO>;\n\nexport const LineDraftSchema: z.ZodType<LineDraft> = z.object({\n ...FilledStyleDraftShape,\n ...AnnotationDraftBaseShape,\n linePoints: LinePointsSchema,\n rect: PdfRectSchema,\n lineEndings: LineEndingsSchema.optional(),\n rotation: z.number().nullable().optional(),\n subtype: z.literal('line'),\n});\n\nexport const LinePatchSchema: z.ZodType<LinePatch> = z.object({\n ...FilledStylePatchShape,\n ...AnnotationPatchBaseShape,\n linePoints: LinePointsSchema.optional(),\n rect: PdfRectSchema.optional(),\n lineEndings: LineEndingsSchema.optional(),\n rotation: z.number().nullable().optional(),\n subtype: z.literal('line'),\n});\n","import type { LineDraft } from './draft';\nimport type { LineAnnotationDTO } from './dto';\nimport type { LinePatch } from './patch';\nimport { LineDTOSchema, LineDraftSchema, LinePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { LineAnnotationDTO } from './dto';\nexport type { LineDraft } from './draft';\nexport type { LinePatch } from './patch';\nexport { LineDTOSchema, LineDraftSchema, LinePatchSchema } from './schema';\n\nexport const LineKind: AnnotationKindModule<'line', LineAnnotationDTO, LineDraft, LinePatch> = {\n subtype: 'line',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.LINE,\n dtoSchema: LineDTOSchema,\n draftSchema: LineDraftSchema,\n patchSchema: LinePatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { PdfDestination } from '../../../dto/PdfDestination';\nimport type { PdfLinkTarget, PdfLinkTargetWritable } from '../../../dto/PdfLinkTarget';\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport type { LinkDraft } from './draft';\nimport type { LinkAnnotationDTO } from './dto';\nimport type { LinkPatch } from './patch';\n\nconst pageObjectNumber = z.number().int().positive();\n/** Spec-nullable axis value: absent and `null` both mean \"retain current\". */\nconst axis = z.number().nullable().optional();\n\n/**\n * Runtime schema for {@link PdfDestination}. Lives with the link kind (its\n * first wire consumer); the outline/bookmark port reuses it from here.\n */\nexport const PdfDestinationSchema: z.ZodType<PdfDestination> = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('xyz'), pageObjectNumber, left: axis, top: axis, zoom: axis }),\n z.object({ kind: z.literal('fit'), pageObjectNumber }),\n z.object({ kind: z.literal('fitH'), pageObjectNumber, top: axis }),\n z.object({ kind: z.literal('fitV'), pageObjectNumber, left: axis }),\n z.object({\n kind: z.literal('fitR'),\n pageObjectNumber,\n left: z.number(),\n bottom: z.number(),\n right: z.number(),\n top: z.number(),\n }),\n z.object({ kind: z.literal('fitB'), pageObjectNumber }),\n z.object({ kind: z.literal('fitBH'), pageObjectNumber, top: axis }),\n z.object({ kind: z.literal('fitBV'), pageObjectNumber, left: axis }),\n]) as unknown as z.ZodType<PdfDestination>;\n\nconst GotoTargetSchema = z.object({ kind: z.literal('goto'), destination: PdfDestinationSchema });\nconst UriTargetSchema = z.object({ kind: z.literal('uri'), uri: z.string() });\n\nexport const PdfLinkTargetSchema: z.ZodType<PdfLinkTarget> = z.discriminatedUnion('kind', [\n GotoTargetSchema,\n UriTargetSchema,\n z.object({ kind: z.literal('goto-remote'), file: z.string() }),\n z.object({ kind: z.literal('launch'), path: z.string() }),\n z.object({ kind: z.literal('javascript') }),\n z.object({ kind: z.literal('named'), name: z.string() }),\n z.object({ kind: z.literal('unsupported') }),\n]) as unknown as z.ZodType<PdfLinkTarget>;\n\n/** Drafts/patches only author `goto`/`uri` — see {@link PdfLinkTargetWritable}. */\nexport const PdfLinkTargetWritableSchema: z.ZodType<PdfLinkTargetWritable> = z.discriminatedUnion(\n 'kind',\n [GotoTargetSchema, UriTargetSchema],\n) as unknown as z.ZodType<PdfLinkTargetWritable>;\n\nexport const LinkDTOSchema: z.ZodType<LinkAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n subtype: z.literal('link'),\n target: PdfLinkTargetSchema.nullable(),\n}) as unknown as z.ZodType<LinkAnnotationDTO>;\n\nexport const LinkDraftSchema: z.ZodType<LinkDraft> = z.object({\n ...AnnotationDraftBaseShape,\n subtype: z.literal('link'),\n rect: PdfRectSchema,\n target: PdfLinkTargetWritableSchema.nullable(),\n}) as unknown as z.ZodType<LinkDraft>;\n\nexport const LinkPatchSchema: z.ZodType<LinkPatch> = z.object({\n ...AnnotationPatchBaseShape,\n subtype: z.literal('link'),\n rect: PdfRectSchema.optional(),\n // Three-state: undefined=leave, value=replace /A, null=clear the target.\n target: PdfLinkTargetWritableSchema.nullable().optional(),\n}) as unknown as z.ZodType<LinkPatch>;\n","import type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\nimport type { LinkDraft } from './draft';\nimport type { LinkAnnotationDTO } from './dto';\nimport type { LinkPatch } from './patch';\nimport { LinkDTOSchema, LinkDraftSchema, LinkPatchSchema } from './schema';\n\nexport type { LinkAnnotationDTO } from './dto';\nexport type { LinkDraft } from './draft';\nexport type { LinkPatch } from './patch';\nexport {\n LinkDTOSchema,\n LinkDraftSchema,\n LinkPatchSchema,\n PdfDestinationSchema,\n PdfLinkTargetSchema,\n PdfLinkTargetWritableSchema,\n} from './schema';\n\nexport const LinkKind: AnnotationKindModule<'link', LinkAnnotationDTO, LinkDraft, LinkPatch> = {\n subtype: 'link',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.LINK,\n dtoSchema: LinkDTOSchema,\n draftSchema: LinkDraftSchema,\n patchSchema: LinkPatchSchema,\n};\n","import { z } from 'zod';\n\nimport {\n FilledStyleDTOShape,\n FilledStyleDraftShape,\n FilledStylePatchShape,\n type FilledStyleDraftFields,\n type FilledStyleFields,\n type FilledStylePatchFields,\n} from './style.shared';\nimport type { PdfPoint, PdfRect } from '../../geometry/primitives';\nimport { PdfPointSchema } from '../../geometry/schemas';\nimport { PdfRectSchema } from '../../geometry/schemas';\nimport type { AnnotationBase } from '../base';\nimport { AnnotationBaseShape } from '../base.schema';\n\n/**\n * Vertex-family-specific fields. The two vertex subtypes (polygon/polyline)\n * carry their geometry as a `/Vertices` point list (ISO 32000 §12.5.6.9)\n * plus the common stroke/fill styling ({@link FilledStyleFields}). Polygon\n * layers a cloudy border (`/BE`) on top; polyline layers line endings\n * (`/LE`); each kind file adds those. (Polygon does not use `/RD` — its\n * geometry is fully described by `/Vertices` + `/Rect`, so `/RD` is for the\n * shape family only.)\n *\n * Like shapes, the engine takes an explicit `/Rect` on the Draft (the v3\n * plugin owns the bounding-box + rotation math, so the engine stays a\n * faithful persistence layer); the DTO inherits `rect` from\n * `AnnotationBase`.\n */\nexport interface VertexAnnotationFields extends FilledStyleFields {\n /** `/Vertices` — the ordered point list (PDF user space, y-up). */\n vertices: PdfPoint[];\n /**\n * `/EMBD_Metadata/Rotation` — ADVISORY rotation (degrees, PDF convention). The\n * vertices are already rotated (they ARE the portable visual); this scalar\n * just records the applied angle so EmbedPDF can show an oriented selection\n * box and offer reset. It carries NO `unrotatedRect`, so it is inert for AP\n * (PDFium ignores a lone `Rotation`).\n */\n rotation?: number;\n}\n\nexport interface VertexDraftFields extends FilledStyleDraftFields {\n /** `/Vertices` geometry — required (vertex annotations are not derived). */\n vertices: PdfPoint[];\n /** `/Rect` bounding box — required (computed by the caller/plugin). */\n rect: PdfRect;\n /** Advisory rotation (deg). See {@link VertexAnnotationFields.rotation}. */\n rotation?: number | null;\n}\n\nexport interface VertexPatchFields extends FilledStylePatchFields {\n vertices?: PdfPoint[];\n rect?: PdfRect;\n /** Tri-state: omitted preserves, `null`/`0` clears the advisory scalar. */\n rotation?: number | null;\n}\n\nexport const VertexDTOShape = {\n ...AnnotationBaseShape,\n ...FilledStyleDTOShape,\n vertices: z.array(PdfPointSchema),\n rotation: z.number().optional(),\n} as const;\n\nexport const VertexDraftShape = {\n ...FilledStyleDraftShape,\n vertices: z.array(PdfPointSchema),\n rect: PdfRectSchema,\n rotation: z.number().nullable().optional(),\n} as const;\n\nexport const VertexPatchShape = {\n ...FilledStylePatchShape,\n vertices: z.array(PdfPointSchema).optional(),\n rect: PdfRectSchema.optional(),\n rotation: z.number().nullable().optional(),\n} as const;\n\n/** Glue type used by each vertex kind file to construct its concrete DTO. */\nexport type VertexDTO<S extends string> = AnnotationBase & {\n subtype: S;\n} & VertexAnnotationFields;\n","import { z } from 'zod';\n\nimport { PdfPointSchema } from '../../../geometry/schemas';\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport { VertexDTOShape, VertexDraftShape, VertexPatchShape } from '../vertex.shared';\nimport type { PolygonDraft } from './draft';\nimport type { PolygonAnnotationDTO } from './dto';\nimport type { PolygonPatch } from './patch';\n\nexport const PolygonDTOSchema: z.ZodType<PolygonAnnotationDTO> = z.object({\n ...VertexDTOShape,\n vertices: z.array(PdfPointSchema).min(3),\n cloudyIntensity: z.number().positive().nullable(),\n subtype: z.literal('polygon'),\n}) as unknown as z.ZodType<PolygonAnnotationDTO>;\n\nexport const PolygonDraftSchema: z.ZodType<PolygonDraft> = z.object({\n ...VertexDraftShape,\n ...AnnotationDraftBaseShape,\n vertices: z.array(PdfPointSchema).min(3),\n cloudyIntensity: z.number().positive().nullable().optional(),\n subtype: z.literal('polygon'),\n});\n\nexport const PolygonPatchSchema: z.ZodType<PolygonPatch> = z.object({\n ...VertexPatchShape,\n ...AnnotationPatchBaseShape,\n vertices: z.array(PdfPointSchema).min(3).optional(),\n cloudyIntensity: z.number().positive().nullable().optional(),\n subtype: z.literal('polygon'),\n});\n","import type { PolygonDraft } from './draft';\nimport type { PolygonAnnotationDTO } from './dto';\nimport type { PolygonPatch } from './patch';\nimport { PolygonDTOSchema, PolygonDraftSchema, PolygonPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { PolygonAnnotationDTO } from './dto';\nexport type { PolygonDraft } from './draft';\nexport type { PolygonPatch } from './patch';\nexport { PolygonDTOSchema, PolygonDraftSchema, PolygonPatchSchema } from './schema';\n\nexport const PolygonKind: AnnotationKindModule<\n 'polygon',\n PolygonAnnotationDTO,\n PolygonDraft,\n PolygonPatch\n> = {\n subtype: 'polygon',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.POLYGON,\n dtoSchema: PolygonDTOSchema,\n draftSchema: PolygonDraftSchema,\n patchSchema: PolygonPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { PdfPointSchema } from '../../../geometry/schemas';\nimport {\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n LineEndingsSchema,\n} from '../../base.schema';\nimport { VertexDTOShape, VertexDraftShape, VertexPatchShape } from '../vertex.shared';\nimport type { PolylineDraft } from './draft';\nimport type { PolylineAnnotationDTO } from './dto';\nimport type { PolylinePatch } from './patch';\n\nexport const PolylineDTOSchema: z.ZodType<PolylineAnnotationDTO> = z.object({\n ...VertexDTOShape,\n vertices: z.array(PdfPointSchema).min(2),\n lineEndings: LineEndingsSchema,\n subtype: z.literal('polyline'),\n}) as unknown as z.ZodType<PolylineAnnotationDTO>;\n\nexport const PolylineDraftSchema: z.ZodType<PolylineDraft> = z.object({\n ...VertexDraftShape,\n ...AnnotationDraftBaseShape,\n vertices: z.array(PdfPointSchema).min(2),\n lineEndings: LineEndingsSchema.optional(),\n subtype: z.literal('polyline'),\n});\n\nexport const PolylinePatchSchema: z.ZodType<PolylinePatch> = z.object({\n ...VertexPatchShape,\n ...AnnotationPatchBaseShape,\n vertices: z.array(PdfPointSchema).min(2).optional(),\n lineEndings: LineEndingsSchema.optional(),\n subtype: z.literal('polyline'),\n});\n","import type { PolylineDraft } from './draft';\nimport type { PolylineAnnotationDTO } from './dto';\nimport type { PolylinePatch } from './patch';\nimport { PolylineDTOSchema, PolylineDraftSchema, PolylinePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { PolylineAnnotationDTO } from './dto';\nexport type { PolylineDraft } from './draft';\nexport type { PolylinePatch } from './patch';\nexport { PolylineDTOSchema, PolylineDraftSchema, PolylinePatchSchema } from './schema';\n\nexport const PolylineKind: AnnotationKindModule<\n 'polyline',\n PolylineAnnotationDTO,\n PolylineDraft,\n PolylinePatch\n> = {\n subtype: 'polyline',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.POLYLINE,\n dtoSchema: PolylineDTOSchema,\n draftSchema: PolylineDraftSchema,\n patchSchema: PolylinePatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { RedactDraft } from './draft';\nimport type { RedactAnnotationDTO } from './dto';\nimport type { RedactPatch } from './patch';\nimport { PdfQuadSchema, PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n ColorSchema,\n StandardFontSchema,\n TextAlignmentSchema,\n} from '../../base.schema';\nimport type { FreeTextFont } from '../../primitives';\n\n/** Authoring `fontFamily`: a standard font name OR a registered font `key`.\n * Any non-empty string is accepted; the writer resolves which it is (and a\n * key that was never registered fails loud there). The read-back DTO keeps\n * the narrower {@link StandardFontSchema}. */\nconst RedactFontSchema = z.string().min(1) as unknown as z.ZodType<FreeTextFont>;\n\n/** `/DA` size — unlike free text, `0` is meaningful for a redaction label:\n * auto-fit to the region. */\nconst RedactFontSizeSchema = z.number().nonnegative();\n\nexport const RedactDTOSchema: z.ZodType<RedactAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n quadPoints: z.array(PdfQuadSchema),\n color: ColorSchema,\n opacity: z.number().min(0).max(1),\n interiorColor: ColorSchema.nullable(),\n overlayText: z.string().nullable(),\n repeat: z.boolean(),\n fontFamily: StandardFontSchema,\n fontSize: RedactFontSizeSchema,\n fontColor: ColorSchema,\n textAlign: TextAlignmentSchema,\n subtype: z.literal('redact'),\n}) as unknown as z.ZodType<RedactAnnotationDTO>;\n\nexport const RedactDraftSchema: z.ZodType<RedactDraft> = z.object({\n ...AnnotationDraftBaseShape,\n rect: PdfRectSchema,\n quadPoints: z.array(PdfQuadSchema).optional(),\n color: ColorSchema.optional(),\n opacity: z.number().min(0).max(1).optional(),\n interiorColor: ColorSchema.nullable().optional(),\n overlayText: z.string().optional(),\n repeat: z.boolean().optional(),\n fontFamily: RedactFontSchema.optional(),\n fontSize: RedactFontSizeSchema.optional(),\n fontColor: ColorSchema.optional(),\n textAlign: TextAlignmentSchema.optional(),\n subtype: z.literal('redact'),\n});\n\nexport const RedactPatchSchema: z.ZodType<RedactPatch> = z.object({\n ...AnnotationPatchBaseShape,\n rect: PdfRectSchema.optional(),\n quadPoints: z.array(PdfQuadSchema).optional(),\n color: ColorSchema.optional(),\n opacity: z.number().min(0).max(1).optional(),\n interiorColor: ColorSchema.nullable().optional(),\n overlayText: z.string().nullable().optional(),\n repeat: z.boolean().optional(),\n fontFamily: RedactFontSchema.optional(),\n fontSize: RedactFontSizeSchema.optional(),\n fontColor: ColorSchema.optional(),\n textAlign: TextAlignmentSchema.optional(),\n subtype: z.literal('redact'),\n});\n","import type { RedactDraft } from './draft';\nimport type { RedactAnnotationDTO } from './dto';\nimport type { RedactPatch } from './patch';\nimport { RedactDTOSchema, RedactDraftSchema, RedactPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { RedactAnnotationDTO } from './dto';\nexport type { RedactDraft } from './draft';\nexport type { RedactPatch } from './patch';\nexport { RedactDTOSchema, RedactDraftSchema, RedactPatchSchema } from './schema';\n\nexport const RedactKind: AnnotationKindModule<\n 'redact',\n RedactAnnotationDTO,\n RedactDraft,\n RedactPatch\n> = {\n subtype: 'redact',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.REDACT,\n dtoSchema: RedactDTOSchema,\n draftSchema: RedactDraftSchema,\n patchSchema: RedactPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport { ShapeDTOShape, ShapeDraftShape, ShapePatchShape } from '../shape.shared';\nimport type { SquareDraft } from './draft';\nimport type { SquareAnnotationDTO } from './dto';\nimport type { SquarePatch } from './patch';\n\nexport const SquareDTOSchema: z.ZodType<SquareAnnotationDTO> = z.object({\n ...ShapeDTOShape,\n subtype: z.literal('square'),\n}) as unknown as z.ZodType<SquareAnnotationDTO>;\n\nexport const SquareDraftSchema: z.ZodType<SquareDraft> = z.object({\n ...ShapeDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('square'),\n});\n\nexport const SquarePatchSchema: z.ZodType<SquarePatch> = z.object({\n ...ShapePatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('square'),\n});\n","import type { SquareDraft } from './draft';\nimport type { SquareAnnotationDTO } from './dto';\nimport type { SquarePatch } from './patch';\nimport { SquareDTOSchema, SquareDraftSchema, SquarePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { SquareAnnotationDTO } from './dto';\nexport type { SquareDraft } from './draft';\nexport type { SquarePatch } from './patch';\nexport { SquareDTOSchema, SquareDraftSchema, SquarePatchSchema } from './schema';\n\nexport const SquareKind: AnnotationKindModule<\n 'square',\n SquareAnnotationDTO,\n SquareDraft,\n SquarePatch\n> = {\n subtype: 'square',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.SQUARE,\n dtoSchema: SquareDTOSchema,\n draftSchema: SquareDraftSchema,\n patchSchema: SquarePatchSchema,\n};\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport {\n TextMarkupDTOShape,\n TextMarkupDraftShape,\n TextMarkupPatchShape,\n} from '../text-markup.shared';\nimport type { SquigglyDraft } from './draft';\nimport type { SquigglyAnnotationDTO } from './dto';\nimport type { SquigglyPatch } from './patch';\n\nexport const SquigglyDTOSchema: z.ZodType<SquigglyAnnotationDTO> = z.object({\n ...TextMarkupDTOShape,\n subtype: z.literal('squiggly'),\n}) as unknown as z.ZodType<SquigglyAnnotationDTO>;\n\nexport const SquigglyDraftSchema: z.ZodType<SquigglyDraft> = z.object({\n ...TextMarkupDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('squiggly'),\n});\n\nexport const SquigglyPatchSchema: z.ZodType<SquigglyPatch> = z.object({\n ...TextMarkupPatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('squiggly'),\n});\n","import type { SquigglyDraft } from './draft';\nimport type { SquigglyAnnotationDTO } from './dto';\nimport type { SquigglyPatch } from './patch';\nimport { SquigglyDTOSchema, SquigglyDraftSchema, SquigglyPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { SquigglyAnnotationDTO } from './dto';\nexport type { SquigglyDraft } from './draft';\nexport type { SquigglyPatch } from './patch';\nexport { SquigglyDTOSchema, SquigglyDraftSchema, SquigglyPatchSchema } from './schema';\n\nexport const SquigglyKind: AnnotationKindModule<\n 'squiggly',\n SquigglyAnnotationDTO,\n SquigglyDraft,\n SquigglyPatch\n> = {\n subtype: 'squiggly',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.SQUIGGLY,\n dtoSchema: SquigglyDTOSchema,\n draftSchema: SquigglyDraftSchema,\n patchSchema: SquigglyPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport type { ResourceRef } from '../../../resource/BinarySource';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport type { StampWireDraft } from './draft';\nimport type { StampAnnotationDTO } from './dto';\nimport type { StampWirePatch } from './patch';\n\n/**\n * Schemas validate the WIRE forms. The authoring types (`StampDraft`,\n * `StampPatch`) carry inline `BinarySource` bytes and are normalized to\n * these shapes before validation — see `annotation/normalize.ts`.\n */\n\nexport const ResourceRefSchema: z.ZodType<ResourceRef> = z.object({\n resource: z.string().min(1),\n});\n\nconst StampFitSchema = z.enum(['contain', 'cover', 'fill']);\n\nexport const StampDTOSchema: z.ZodType<StampAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n name: z.string().nullable(),\n rotation: z.number().optional(),\n unrotatedRect: PdfRectSchema.optional(),\n subtype: z.literal('stamp'),\n}) as unknown as z.ZodType<StampAnnotationDTO>;\n\nexport const StampWireDraftSchema: z.ZodType<StampWireDraft> = z.object({\n ...AnnotationDraftBaseShape,\n rect: PdfRectSchema,\n source: ResourceRefSchema,\n name: z.string().optional(),\n fit: StampFitSchema.optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('stamp'),\n});\n\nexport const StampWirePatchSchema: z.ZodType<StampWirePatch> = z.object({\n ...AnnotationPatchBaseShape,\n rect: PdfRectSchema.optional(),\n source: ResourceRefSchema.optional(),\n name: z.string().optional(),\n fit: StampFitSchema.optional(),\n rotation: z.number().nullable().optional(),\n unrotatedRect: PdfRectSchema.nullable().optional(),\n subtype: z.literal('stamp'),\n});\n","import type { StampDraft, StampWireDraft } from './draft';\nimport type { StampAnnotationDTO } from './dto';\nimport type { StampPatch, StampWirePatch } from './patch';\nimport { StampDTOSchema, StampWireDraftSchema, StampWirePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { StampAnnotationDTO } from './dto';\nexport type { StampDraft, StampWireDraft, StampFit } from './draft';\nexport type { StampPatch, StampWirePatch } from './patch';\nexport {\n StampDTOSchema,\n StampWireDraftSchema,\n StampWirePatchSchema,\n ResourceRefSchema,\n} from './schema';\nexport { normalizeStampDraft, normalizeStampPatch } from './normalize';\n\n/**\n * The kind module is WIRE-typed (schemas validate the post-normalization\n * form). The authoring types with inline bytes (`StampDraft`, `StampPatch`)\n * are swapped into the public `AnnotationDraft`/`AnnotationPatch` unions in\n * `kinds/index.ts`; `annotation/normalize.ts` bridges the two.\n */\nexport const StampKind: AnnotationKindModule<\n 'stamp',\n StampAnnotationDTO,\n StampWireDraft,\n StampWirePatch\n> = {\n subtype: 'stamp',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.STAMP,\n dtoSchema: StampDTOSchema,\n draftSchema: StampWireDraftSchema,\n patchSchema: StampWirePatchSchema,\n};\n","import { z } from 'zod';\n\nimport {\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n StrikeoutIntentSchema,\n} from '../../base.schema';\nimport {\n TextMarkupDTOShape,\n TextMarkupDraftShape,\n TextMarkupPatchShape,\n} from '../text-markup.shared';\nimport type { StrikeoutDraft } from './draft';\nimport type { StrikeoutAnnotationDTO } from './dto';\nimport type { StrikeoutPatch } from './patch';\n\nexport const StrikeoutDTOSchema: z.ZodType<StrikeoutAnnotationDTO> = z.object({\n ...TextMarkupDTOShape,\n intent: StrikeoutIntentSchema.nullable(),\n subtype: z.literal('strikeout'),\n}) as unknown as z.ZodType<StrikeoutAnnotationDTO>;\n\nexport const StrikeoutDraftSchema: z.ZodType<StrikeoutDraft> = z.object({\n ...TextMarkupDraftShape,\n ...AnnotationDraftBaseShape,\n intent: StrikeoutIntentSchema.optional(),\n subtype: z.literal('strikeout'),\n});\n\nexport const StrikeoutPatchSchema: z.ZodType<StrikeoutPatch> = z.object({\n ...TextMarkupPatchShape,\n ...AnnotationPatchBaseShape,\n intent: StrikeoutIntentSchema.optional(),\n subtype: z.literal('strikeout'),\n});\n","import type { StrikeoutDraft } from './draft';\nimport type { StrikeoutAnnotationDTO } from './dto';\nimport type { StrikeoutPatch } from './patch';\nimport { StrikeoutDTOSchema, StrikeoutDraftSchema, StrikeoutPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { StrikeoutAnnotationDTO } from './dto';\nexport type { StrikeoutDraft } from './draft';\nexport type { StrikeoutPatch } from './patch';\nexport { StrikeoutDTOSchema, StrikeoutDraftSchema, StrikeoutPatchSchema } from './schema';\n\nexport const StrikeoutKind: AnnotationKindModule<\n 'strikeout',\n StrikeoutAnnotationDTO,\n StrikeoutDraft,\n StrikeoutPatch\n> = {\n subtype: 'strikeout',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.STRIKEOUT,\n dtoSchema: StrikeoutDTOSchema,\n draftSchema: StrikeoutDraftSchema,\n patchSchema: StrikeoutPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport { ColorStyleDTOShape, ColorStyleDraftShape, ColorStylePatchShape } from '../style.shared';\nimport type { NoteIcon, TextDraft } from './draft';\nimport type { TextAnnotationDTO } from './dto';\nimport type { TextPatch } from './patch';\n\nexport const NoteIconSchema: z.ZodType<NoteIcon> = z.enum([\n 'comment',\n 'key',\n 'note',\n 'help',\n 'new-paragraph',\n 'paragraph',\n 'insert',\n]);\n\nexport const TextDTOSchema: z.ZodType<TextAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...ColorStyleDTOShape,\n icon: NoteIconSchema,\n subtype: z.literal('text'),\n}) as unknown as z.ZodType<TextAnnotationDTO>;\n\nexport const TextDraftSchema: z.ZodType<TextDraft> = z.object({\n ...ColorStyleDraftShape,\n ...AnnotationDraftBaseShape,\n rect: PdfRectSchema,\n icon: NoteIconSchema.optional(),\n subtype: z.literal('text'),\n});\n\nexport const TextPatchSchema: z.ZodType<TextPatch> = z.object({\n ...ColorStylePatchShape,\n ...AnnotationPatchBaseShape,\n rect: PdfRectSchema.optional(),\n icon: NoteIconSchema.optional(),\n subtype: z.literal('text'),\n});\n","import type { TextDraft } from './draft';\nimport type { TextAnnotationDTO } from './dto';\nimport type { TextPatch } from './patch';\nimport { TextDTOSchema, TextDraftSchema, TextPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { TextAnnotationDTO } from './dto';\nexport type { TextDraft, NoteIcon } from './draft';\nexport type { TextPatch } from './patch';\nexport { TextDTOSchema, TextDraftSchema, TextPatchSchema, NoteIconSchema } from './schema';\n\nexport const TextKind: AnnotationKindModule<'text', TextAnnotationDTO, TextDraft, TextPatch> = {\n subtype: 'text',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.TEXT,\n dtoSchema: TextDTOSchema,\n draftSchema: TextDraftSchema,\n patchSchema: TextPatchSchema,\n};\n","import { z } from 'zod';\n\nimport { AnnotationDraftBaseShape, AnnotationPatchBaseShape } from '../../base.schema';\nimport {\n TextMarkupDTOShape,\n TextMarkupDraftShape,\n TextMarkupPatchShape,\n} from '../text-markup.shared';\nimport type { UnderlineDraft } from './draft';\nimport type { UnderlineAnnotationDTO } from './dto';\nimport type { UnderlinePatch } from './patch';\n\nexport const UnderlineDTOSchema: z.ZodType<UnderlineAnnotationDTO> = z.object({\n ...TextMarkupDTOShape,\n subtype: z.literal('underline'),\n}) as unknown as z.ZodType<UnderlineAnnotationDTO>;\n\nexport const UnderlineDraftSchema: z.ZodType<UnderlineDraft> = z.object({\n ...TextMarkupDraftShape,\n ...AnnotationDraftBaseShape,\n subtype: z.literal('underline'),\n});\n\nexport const UnderlinePatchSchema: z.ZodType<UnderlinePatch> = z.object({\n ...TextMarkupPatchShape,\n ...AnnotationPatchBaseShape,\n subtype: z.literal('underline'),\n});\n","import type { UnderlineDraft } from './draft';\nimport type { UnderlineAnnotationDTO } from './dto';\nimport type { UnderlinePatch } from './patch';\nimport { UnderlineDTOSchema, UnderlineDraftSchema, UnderlinePatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { UnderlineAnnotationDTO } from './dto';\nexport type { UnderlineDraft } from './draft';\nexport type { UnderlinePatch } from './patch';\nexport { UnderlineDTOSchema, UnderlineDraftSchema, UnderlinePatchSchema } from './schema';\n\nexport const UnderlineKind: AnnotationKindModule<\n 'underline',\n UnderlineAnnotationDTO,\n UnderlineDraft,\n UnderlinePatch\n> = {\n subtype: 'underline',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.UNDERLINE,\n dtoSchema: UnderlineDTOSchema,\n draftSchema: UnderlineDraftSchema,\n patchSchema: UnderlinePatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { UnsupportedAnnotationDTO } from './dto';\nimport { AnnotationBaseShape } from '../../base.schema';\n\nexport const UnsupportedDTOSchema: z.ZodType<UnsupportedAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n subtype: z.literal('unsupported'),\n rawSubtypeCode: z.number().int(),\n rawSubtypeName: z.string().nullable(),\n}) as unknown as z.ZodType<UnsupportedAnnotationDTO>;\n\nexport const UnsupportedDraftSchema: z.ZodType<never> = z.never();\nexport const UnsupportedPatchSchema: z.ZodType<never> = z.never();\n","import type { UnsupportedAnnotationDTO } from './dto';\nimport { UnsupportedDTOSchema, UnsupportedDraftSchema, UnsupportedPatchSchema } from './schema';\nimport type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\n\nexport type { UnsupportedAnnotationDTO } from './dto';\nexport type { UnsupportedDraft } from './draft';\nexport type { UnsupportedPatch } from './patch';\nexport { UnsupportedDTOSchema, UnsupportedDraftSchema, UnsupportedPatchSchema } from './schema';\n\nexport const UnsupportedKind: AnnotationKindModule<\n 'unsupported',\n UnsupportedAnnotationDTO,\n never,\n never\n> = {\n subtype: 'unsupported',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.UNKNOWN,\n dtoSchema: UnsupportedDTOSchema,\n draftSchema: UnsupportedDraftSchema,\n patchSchema: UnsupportedPatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { AnnotationBorderStyle, Color, StandardFont, TextAlignment } from '../primitives';\nimport {\n AnnotationBorderStyleSchema,\n ColorSchema,\n StandardFontSchema,\n TextAlignmentSchema,\n} from '../base.schema';\n\n/**\n * Widget-plane styling, using the same vocabulary as the sibling kinds\n * (`color` strokes the border, `interiorColor` fills, `strokeWidth` is the\n * border width — the free-text/shape convention) mapped onto the widget\n * dictionaries: /MK for colors, /BS for the border, /DA for the text\n * defaults, /Q for alignment.\n *\n * These fields are shared VERBATIM with `doc.forms` authoring: a\n * `WidgetPlacement.appearance` in `createField` is exactly\n * {@link WidgetAppearance}, and one writer applies both underneath.\n */\nexport interface WidgetStyleFields {\n /** `/MK /BC` — border colour. `null` when the widget draws no border colour. */\n color: Color | null;\n /** `/MK /BG` — background. `null` = transparent (no entry). */\n interiorColor: Color | null;\n /** `/BS /W` — border width. */\n strokeWidth: number;\n /** `/BS /S` — border style. */\n borderStyle: AnnotationBorderStyle;\n /** `/DA` font. Absent when the widget has no default appearance. */\n fontFamily?: StandardFont;\n /** `/DA` size; `0` = auto-size. */\n fontSize?: number;\n /** `/DA` colour. */\n fontColor?: Color;\n /** `/Q`. */\n textAlign: TextAlignment;\n}\n\nexport interface WidgetStyleDraftFields {\n /** `/MK /BC`. `null` = write no border colour. */\n color?: Color | null;\n /** `/MK /BG`. `null` = transparent. */\n interiorColor?: Color | null;\n strokeWidth?: number;\n borderStyle?: AnnotationBorderStyle;\n fontFamily?: StandardFont;\n /** `0` = auto-size. */\n fontSize?: number;\n fontColor?: Color;\n textAlign?: TextAlignment;\n}\n\n/** Patch fields are the draft fields; `null` clears the colour entries. */\nexport type WidgetStylePatchFields = WidgetStyleDraftFields;\n\n/**\n * The widget appearance vocabulary as consumed by `doc.forms` authoring\n * (`WidgetPlacement.appearance`). Identical to the widget annotation\n * draft's style surface — one vocabulary, one writer.\n */\nexport type WidgetAppearance = WidgetStyleDraftFields;\n\nexport const WidgetStyleDTOShape = {\n color: ColorSchema.nullable(),\n interiorColor: ColorSchema.nullable(),\n strokeWidth: z.number().nonnegative(),\n borderStyle: AnnotationBorderStyleSchema,\n fontFamily: StandardFontSchema.optional(),\n fontSize: z.number().nonnegative().optional(),\n fontColor: ColorSchema.optional(),\n textAlign: TextAlignmentSchema,\n} as const;\n\nexport const WidgetStyleDraftShape = {\n color: ColorSchema.nullable().optional(),\n interiorColor: ColorSchema.nullable().optional(),\n strokeWidth: z.number().nonnegative().optional(),\n borderStyle: AnnotationBorderStyleSchema.optional(),\n fontFamily: StandardFontSchema.optional(),\n fontSize: z.number().nonnegative().optional(),\n fontColor: ColorSchema.optional(),\n textAlign: TextAlignmentSchema.optional(),\n} as const;\n\nexport const WidgetStylePatchShape = WidgetStyleDraftShape;\n\nexport const WidgetAppearanceSchema: z.ZodType<WidgetAppearance> = z.object(WidgetStyleDraftShape);\n","import { z } from 'zod';\n\nimport { PdfRectSchema } from '../../../geometry/schemas';\nimport {\n AnnotationBaseShape,\n AnnotationDraftBaseShape,\n AnnotationPatchBaseShape,\n} from '../../base.schema';\nimport {\n WidgetStyleDTOShape,\n WidgetStyleDraftShape,\n WidgetStylePatchShape,\n} from '../widget.shared';\nimport type { WidgetAnnotationDTO } from './dto';\nimport type { WidgetDraft } from './draft';\nimport type { WidgetPatch } from './patch';\n\nexport const WidgetDTOSchema: z.ZodType<WidgetAnnotationDTO> = z.object({\n ...AnnotationBaseShape,\n ...WidgetStyleDTOShape,\n subtype: z.literal('widget'),\n fieldObjectNumber: z.number().int().nonnegative(),\n // Keep in sync with FormFieldFamily (forms/field.ts); inlined to avoid a\n // forms/schema <-> widget schema import loop.\n fieldFamily: z.enum([\n 'text',\n 'checkbox',\n 'radio',\n 'combobox',\n 'listbox',\n 'pushbutton',\n 'signature',\n 'unknown',\n ]),\n}) as unknown as z.ZodType<WidgetAnnotationDTO>;\n\nexport const WidgetDraftSchema: z.ZodType<WidgetDraft> = z.object({\n ...AnnotationDraftBaseShape,\n ...WidgetStyleDraftShape,\n subtype: z.literal('widget'),\n rect: PdfRectSchema,\n}) as unknown as z.ZodType<WidgetDraft>;\n\nexport const WidgetPatchSchema: z.ZodType<WidgetPatch> = z.object({\n ...AnnotationPatchBaseShape,\n ...WidgetStylePatchShape,\n subtype: z.literal('widget'),\n rect: PdfRectSchema.optional(),\n}) as unknown as z.ZodType<WidgetPatch>;\n","import type { AnnotationKindModule } from '../../registry';\nimport { PdfAnnotationSubtypeCode } from '../../subtype';\nimport type { WidgetDraft } from './draft';\nimport type { WidgetAnnotationDTO } from './dto';\nimport type { WidgetPatch } from './patch';\nimport { WidgetDTOSchema, WidgetDraftSchema, WidgetPatchSchema } from './schema';\n\nexport type { WidgetAnnotationDTO } from './dto';\nexport type { WidgetDraft } from './draft';\nexport type { WidgetPatch } from './patch';\nexport { WidgetDTOSchema, WidgetDraftSchema, WidgetPatchSchema } from './schema';\n\nexport const WidgetKind: AnnotationKindModule<\n 'widget',\n WidgetAnnotationDTO,\n WidgetDraft,\n WidgetPatch\n> = {\n subtype: 'widget',\n pdfSubtypeCode: PdfAnnotationSubtypeCode.WIDGET,\n dtoSchema: WidgetDTOSchema,\n draftSchema: WidgetDraftSchema,\n patchSchema: WidgetPatchSchema,\n};\n","import { z } from 'zod';\n\nimport type { AnnotationKindModule } from '../registry';\nimport { CaretKind } from './caret';\nimport { CircleKind } from './circle';\nimport type { FileAttachmentDraft, FileAttachmentWireDraft } from './file-attachment';\nimport { FileAttachmentKind } from './file-attachment';\nimport { FreeTextKind } from './free-text';\nimport { HighlightKind } from './highlight';\nimport { InkKind } from './ink';\nimport { LineKind } from './line';\nimport { LinkKind } from './link';\nimport { PolygonKind } from './polygon';\nimport { PolylineKind } from './polyline';\nimport { RedactKind } from './redact';\nimport { SquareKind } from './square';\nimport { SquigglyKind } from './squiggly';\nimport type { StampDraft, StampPatch, StampWireDraft, StampWirePatch } from './stamp';\nimport { StampKind } from './stamp';\nimport { StrikeoutKind } from './strikeout';\nimport { TextKind } from './text';\nimport { UnderlineKind } from './underline';\nimport { UnsupportedKind } from './unsupported';\nimport { WidgetKind } from './widget';\n\nexport * from './highlight';\nexport * from './underline';\nexport * from './squiggly';\nexport * from './strikeout';\nexport * from './circle';\nexport * from './square';\nexport * from './polygon';\nexport * from './polyline';\nexport * from './line';\nexport * from './link';\nexport * from './ink';\nexport * from './free-text';\nexport * from './caret';\nexport * from './text';\nexport * from './stamp';\nexport * from './file-attachment';\nexport * from './widget';\nexport * from './redact';\nexport * from './unsupported';\nexport * from './text-markup.shared';\nexport * from './shape.shared';\nexport * from './style.shared';\nexport * from './vertex.shared';\n\n/**\n * The closed-world catalog of currently-implemented annotation kinds.\n *\n * Adding a new subtype is one folder under `kinds/<name>/` exporting the\n * five files (dto, draft, patch, schema, index) and one entry in this\n * tuple. The discriminated unions and zod discriminator below regenerate\n * automatically; no other file in the package needs to change.\n *\n * Every subtype the engine has not yet wired up rides on\n * `UnsupportedKind`. The wire format is stable: when a per-subtype reader\n * lands later, the engine starts emitting the dedicated DTO instead of\n * `unsupported`, and existing clients widen their handling without a\n * version bump.\n */\nexport const ANNOTATION_KINDS = [\n HighlightKind,\n UnderlineKind,\n SquigglyKind,\n StrikeoutKind,\n CircleKind,\n SquareKind,\n PolygonKind,\n PolylineKind,\n LineKind,\n LinkKind,\n InkKind,\n FreeTextKind,\n CaretKind,\n TextKind,\n StampKind,\n FileAttachmentKind,\n WidgetKind,\n RedactKind,\n UnsupportedKind,\n] as const;\n\nexport type AnnotationKind = (typeof ANNOTATION_KINDS)[number];\n\nexport type AnnotationSubtypeOfKind = AnnotationKind['subtype'];\n\n/**\n * Lookup helper for the engine's reader catalog and identity resolver.\n * O(1) by `subtype` literal at runtime.\n */\nexport const KIND_BY_SUBTYPE: Readonly<{\n [K in AnnotationKind as K['subtype']]: K;\n}> = Object.freeze(\n Object.fromEntries(ANNOTATION_KINDS.map((kind) => [kind.subtype, kind])) as Record<\n AnnotationSubtypeOfKind,\n AnnotationKind\n >,\n) as Readonly<{ [K in AnnotationKind as K['subtype']]: K }>;\n\ntype DTOFromKind<K> =\n K extends AnnotationKindModule<infer _S, infer D, infer _Dr, infer _Pa> ? D : never;\ntype DraftFromKind<K> =\n K extends AnnotationKindModule<infer _S, infer _D, infer Dr, infer _Pa> ? Dr : never;\ntype PatchFromKind<K> =\n K extends AnnotationKindModule<infer _S, infer _D, infer _Dr, infer Pa> ? Pa : never;\n\n/** Discriminated union over `subtype`, derived from the registry. */\nexport type AnnotationDTO = DTOFromKind<AnnotationKind>;\n\n/**\n * WIRE drafts/patches: pure JSON, what the worker protocol and HTTP\n * surface carry and what the Zod schemas below validate. Kind modules are\n * wire-typed, so these derive straight from the registry.\n */\nexport type WireAnnotationDraft = Exclude<DraftFromKind<AnnotationKind>, never>;\nexport type WireAnnotationPatch = Exclude<PatchFromKind<AnnotationKind>, never>;\n\n/**\n * AUTHORING drafts/patches: what callers pass to `create()`/`update()`.\n * Identical to the wire forms except for binary-carrying kinds, whose\n * inline-`BinarySource` authoring types are swapped in here. Engines\n * bridge the two via `annotation/normalize.ts` — see that module for the\n * uniform binary rule.\n */\nexport type AnnotationDraft =\n | Exclude<WireAnnotationDraft, StampWireDraft | FileAttachmentWireDraft>\n | StampDraft\n | FileAttachmentDraft;\nexport type AnnotationPatch = Exclude<WireAnnotationPatch, StampWirePatch> | StampPatch;\n\n/**\n * Runtime zod schema for the discriminated union. The cast unwinds the\n * generic schema map into the specific tuple form `discriminatedUnion`\n * needs. Servers and cloud clients use this to validate every annotation\n * payload on the wire.\n */\nexport const AnnotationDTOSchema: z.ZodType<AnnotationDTO> = z.discriminatedUnion('subtype', [\n HighlightKind.dtoSchema,\n UnderlineKind.dtoSchema,\n SquigglyKind.dtoSchema,\n StrikeoutKind.dtoSchema,\n CircleKind.dtoSchema,\n SquareKind.dtoSchema,\n PolygonKind.dtoSchema,\n PolylineKind.dtoSchema,\n LineKind.dtoSchema,\n LinkKind.dtoSchema,\n InkKind.dtoSchema,\n FreeTextKind.dtoSchema,\n CaretKind.dtoSchema,\n TextKind.dtoSchema,\n StampKind.dtoSchema,\n FileAttachmentKind.dtoSchema,\n WidgetKind.dtoSchema,\n RedactKind.dtoSchema,\n UnsupportedKind.dtoSchema,\n] as unknown as [\n z.ZodDiscriminatedUnionOption<'subtype'>,\n ...z.ZodDiscriminatedUnionOption<'subtype'>[],\n]) as unknown as z.ZodType<AnnotationDTO>;\n\n/**\n * Validates the WIRE draft form (post-normalization) — binary-carrying\n * kinds appear here with `{ resource }` refs, never inline bytes.\n */\nexport const AnnotationDraftSchema: z.ZodType<WireAnnotationDraft> = z.discriminatedUnion(\n 'subtype',\n [\n HighlightKind.draftSchema,\n UnderlineKind.draftSchema,\n SquigglyKind.draftSchema,\n StrikeoutKind.draftSchema,\n CircleKind.draftSchema,\n SquareKind.draftSchema,\n PolygonKind.draftSchema,\n PolylineKind.draftSchema,\n LineKind.draftSchema,\n LinkKind.draftSchema,\n InkKind.draftSchema,\n FreeTextKind.draftSchema,\n CaretKind.draftSchema,\n TextKind.draftSchema,\n StampKind.draftSchema,\n FileAttachmentKind.draftSchema,\n WidgetKind.draftSchema,\n RedactKind.draftSchema,\n ] as unknown as [\n z.ZodDiscriminatedUnionOption<'subtype'>,\n ...z.ZodDiscriminatedUnionOption<'subtype'>[],\n ],\n) as unknown as z.ZodType<WireAnnotationDraft>;\n\n/** Validates the WIRE patch form (post-normalization). */\nexport const AnnotationPatchSchema: z.ZodType<WireAnnotationPatch> = z.discriminatedUnion(\n 'subtype',\n [\n HighlightKind.patchSchema,\n UnderlineKind.patchSchema,\n SquigglyKind.patchSchema,\n StrikeoutKind.patchSchema,\n CircleKind.patchSchema,\n SquareKind.patchSchema,\n PolygonKind.patchSchema,\n PolylineKind.patchSchema,\n LineKind.patchSchema,\n LinkKind.patchSchema,\n InkKind.patchSchema,\n FreeTextKind.patchSchema,\n CaretKind.patchSchema,\n TextKind.patchSchema,\n StampKind.patchSchema,\n FileAttachmentKind.patchSchema,\n WidgetKind.patchSchema,\n RedactKind.patchSchema,\n ] as unknown as [\n z.ZodDiscriminatedUnionOption<'subtype'>,\n ...z.ZodDiscriminatedUnionOption<'subtype'>[],\n ],\n) as unknown as z.ZodType<WireAnnotationPatch>;\n","import { z } from 'zod';\n\nimport { WidgetAppearanceSchema } from '../annotation/kinds/widget.shared';\nimport { PdfRectSchema } from '../geometry/schemas';\nimport type { FormFieldRef, FormWidgetRef } from '../identity/FormFieldRef';\nimport type { FormFieldDraft, FormFieldOptionInput, WidgetPlacement } from './draft';\nimport type { FormFieldPatch } from './patch';\nimport type { FormFieldDTO, FormFieldFlags, FormFieldOption, ToggleFieldWidget } from './field';\nimport type { FormKind, FormSnapshot } from './snapshot';\nimport type { FormDataFormat, FormFieldValue } from './value';\nimport type { FormValueEntry } from './value-entry';\nimport { PdfFieldActionsSchema } from '../dto/PdfAction.schema';\n\nexport const FormFieldRefSchema: z.ZodType<FormFieldRef> = z.discriminatedUnion('kind', [\n z.object({\n kind: z.literal('objectNumber'),\n fieldObjectNumber: z.number().int().positive(),\n }),\n z.object({\n kind: z.literal('fqn'),\n name: z.string().min(1),\n }),\n]);\n\nconst FormWidgetRefShape = {\n // 0 = direct (unaddressable) widget / unplaced widget respectively.\n annotObjectNumber: z.number().int().nonnegative(),\n pageObjectNumber: z.number().int().nonnegative(),\n};\n\nexport const FormWidgetRefSchema: z.ZodType<FormWidgetRef> = z.object(FormWidgetRefShape);\n\nexport const FormFieldFlagsSchema: z.ZodType<FormFieldFlags> = z.object({\n readOnly: z.boolean(),\n required: z.boolean(),\n noExport: z.boolean(),\n raw: z.number().int().nonnegative(),\n});\n\nexport const ToggleFieldWidgetSchema: z.ZodType<ToggleFieldWidget> = z.object({\n ...FormWidgetRefShape,\n onState: z.string(),\n exportValue: z.string(),\n checked: z.boolean(),\n});\n\nexport const FormFieldOptionSchema: z.ZodType<FormFieldOption> = z.object({\n label: z.string(),\n value: z.string(),\n selected: z.boolean(),\n});\n\nexport const FormValueEntrySchema: z.ZodType<FormValueEntry> = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('none') }),\n z.object({ kind: z.literal('scalar'), value: z.string() }),\n z.object({ kind: z.literal('array'), values: z.array(z.string()) }),\n z.object({ kind: z.literal('unsupported') }),\n]);\n\nconst FormFieldBaseShape = {\n ref: FormFieldRefSchema,\n fieldObjectNumber: z.number().int().nonnegative(),\n name: z.string(),\n origin: z.enum(['acroform', 'recovered']),\n flags: FormFieldFlagsSchema,\n alternateName: z.string().nullable(),\n mappingName: z.string().nullable(),\n valueEntry: FormValueEntrySchema,\n defaultValueEntry: FormValueEntrySchema,\n actions: PdfFieldActionsSchema.optional(),\n widgets: z.array(FormWidgetRefSchema),\n};\n\nexport const FormFieldDTOSchema: z.ZodType<FormFieldDTO> = z.discriminatedUnion('family', [\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('text'),\n value: z.string(),\n defaultValue: z.string(),\n maxLength: z.number().int().positive().nullable(),\n multiline: z.boolean(),\n password: z.boolean(),\n comb: z.boolean(),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('checkbox'),\n checked: z.boolean(),\n exportValue: z.string(),\n widgets: z.array(ToggleFieldWidgetSchema),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('radio'),\n value: z.string(),\n radiosInUnison: z.boolean(),\n noToggleToOff: z.boolean(),\n widgets: z.array(ToggleFieldWidgetSchema),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('combobox'),\n value: z.string(),\n defaultValue: z.string(),\n edit: z.boolean(),\n options: z.array(FormFieldOptionSchema),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('listbox'),\n selectedValues: z.array(z.string()),\n multiSelect: z.boolean(),\n options: z.array(FormFieldOptionSchema),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('pushbutton'),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('signature'),\n }),\n z.object({\n ...FormFieldBaseShape,\n family: z.literal('unknown'),\n rawValue: z.string(),\n }),\n]) as unknown as z.ZodType<FormFieldDTO>;\n\nexport const FormKindSchema: z.ZodType<FormKind> = z.enum(['none', 'acroform', 'xfa']);\n\nexport const FormSnapshotSchema: z.ZodType<FormSnapshot> = z.object({\n formKind: FormKindSchema,\n needsAppearances: z.boolean(),\n fields: z.array(FormFieldDTOSchema),\n calculationOrder: z.array(FormFieldRefSchema.nullable()),\n});\n\nexport const FormFieldValueSchema: z.ZodType<FormFieldValue> = z.discriminatedUnion('type', [\n z.object({ type: z.literal('text'), value: z.string() }),\n z.object({ type: z.literal('toggle'), state: z.string().nullable() }),\n z.object({ type: z.literal('choice'), values: z.array(z.string()) }),\n]);\n\nexport const FormDataFormatSchema: z.ZodType<FormDataFormat> = z.enum(['fdf', 'xfdf']);\n\nexport { WidgetAppearanceSchema };\n\nexport const WidgetPlacementSchema: z.ZodType<WidgetPlacement> = z.object({\n pageObjectNumber: z.number().int().positive(),\n rect: PdfRectSchema,\n onState: z.string().min(1).optional(),\n appearance: WidgetAppearanceSchema.optional(),\n});\n\nexport const FormFieldOptionInputSchema: z.ZodType<FormFieldOptionInput> = z.object({\n label: z.string(),\n value: z.string(),\n});\n\nconst FormFieldDraftBaseShape = {\n name: z.string().min(1),\n readOnly: z.boolean().optional(),\n required: z.boolean().optional(),\n noExport: z.boolean().optional(),\n alternateName: z.string().optional(),\n mappingName: z.string().optional(),\n};\n\nexport const FormFieldDraftSchema: z.ZodType<FormFieldDraft> = z.discriminatedUnion('family', [\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('text'),\n defaultValue: z.string().optional(),\n maxLength: z.number().int().positive().optional(),\n multiline: z.boolean().optional(),\n password: z.boolean().optional(),\n comb: z.boolean().optional(),\n widget: WidgetPlacementSchema.optional(),\n }),\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('checkbox'),\n widget: WidgetPlacementSchema.optional(),\n }),\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('radio'),\n radiosInUnison: z.boolean().optional(),\n noToggleToOff: z.boolean().optional(),\n widgets: z.array(WidgetPlacementSchema).optional(),\n }),\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('combobox'),\n edit: z.boolean().optional(),\n options: z.array(FormFieldOptionInputSchema).optional(),\n defaultValue: z.string().optional(),\n widget: WidgetPlacementSchema.optional(),\n }),\n z.object({\n ...FormFieldDraftBaseShape,\n family: z.literal('listbox'),\n multiSelect: z.boolean().optional(),\n options: z.array(FormFieldOptionInputSchema).optional(),\n widget: WidgetPlacementSchema.optional(),\n }),\n]) as unknown as z.ZodType<FormFieldDraft>;\n\nconst FormFieldPatchBaseShape = {\n name: z.string().min(1).optional(),\n readOnly: z.boolean().optional(),\n required: z.boolean().optional(),\n noExport: z.boolean().optional(),\n alternateName: z.string().nullable().optional(),\n mappingName: z.string().nullable().optional(),\n};\n\nexport const FormFieldPatchSchema: z.ZodType<FormFieldPatch> = z.discriminatedUnion('family', [\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('text'),\n defaultValue: z.string().nullable().optional(),\n maxLength: z.number().int().positive().nullable().optional(),\n multiline: z.boolean().optional(),\n password: z.boolean().optional(),\n comb: z.boolean().optional(),\n }),\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('checkbox'),\n }),\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('radio'),\n radiosInUnison: z.boolean().optional(),\n noToggleToOff: z.boolean().optional(),\n }),\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('combobox'),\n edit: z.boolean().optional(),\n defaultValue: z.string().nullable().optional(),\n options: z.array(FormFieldOptionInputSchema).optional(),\n }),\n z.object({\n ...FormFieldPatchBaseShape,\n family: z.literal('listbox'),\n multiSelect: z.boolean().optional(),\n options: z.array(FormFieldOptionInputSchema).optional(),\n }),\n]) as unknown as z.ZodType<FormFieldPatch>;\n","import { z } from 'zod';\n\nimport type {\n AnnotationListPageSnapshot,\n AnnotationListSnapshotAllPages,\n} from '../annotation/AnnotationListSnapshot';\nimport {\n AnnotationRefSchema,\n AnnotationStableIdSchema,\n RevisionTokenSchema,\n} from '../annotation/base.schema';\nimport { AnnotationDTOSchema } from '../annotation/kinds';\nimport type {\n AnnotationAppearanceImageOptions,\n AnnotationAppearanceManifest,\n AnnotationAppearancesQuery,\n} from '../dto/AnnotationRender';\nimport { EmbeddedFileItemSchema, EmbeddedFileRefSchema } from '../dto/Attachment.schema';\nimport type { CachePins } from '../dto/CachePins';\nimport type { DocumentManifest, ManifestPage } from '../dto/DocumentManifest';\nimport type { LayerScopes } from '../dto/LayerScopes';\nimport type { DocumentMetadata } from '../dto/DocumentMetadata';\nimport type { MetadataPatch } from '../dto/MetadataPatch';\nimport type { PageGeometryRun, PageGeometrySnapshot } from '../dto/PageGeometrySnapshot';\nimport { charMapViolation } from '../text/charmap';\nimport type { PageBoxes, PageLayout } from '../dto/PageLayout';\nimport type { PageListSnapshot } from '../dto/PageListSnapshot';\nimport type { PageImageOptions, PageNetworkRenderFormat, PageRenderQuery } from '../dto/PageRender';\nimport type { PageTextSnapshot } from '../dto/PageTextSnapshot';\nimport { PdfPageActionsSchema } from '../dto/PdfAction.schema';\nimport type { PdfSaveMode } from '../dto/PdfSaveMode';\nimport type { DocumentSecurityState, PdfPermissionInfo } from '../engine/DocumentSecurityService';\nimport type { SerializedEngineError } from '../errors/EngineError';\nimport { EngineErrorCode } from '../errors/EngineErrorCode';\nimport type { FormEffectsResult, FormEffect } from '../forms/effects';\nimport { FormFieldDTOSchema, FormSnapshotSchema, FormWidgetRefSchema } from '../forms/schema';\nimport { FormFieldRefSchema, FormFieldValueSchema } from '../forms/schema';\nimport {\n PdfQuadSchema,\n PdfRectSchema,\n PdfRotationSchema,\n PdfSizeSchema,\n} from '../geometry/schemas';\nimport type { AppearanceOutcome } from '../annotation/appearance';\nimport type { AnnotationListMutationMeta } from '../mutation/AnnotationListMutationMeta';\nimport type {\n AnnotationCreateResult,\n AnnotationDeleteResult,\n AnnotationMoveResult,\n AnnotationUpdateResult,\n} from '../mutation/AnnotationMutationResults';\nimport type {\n AttachmentCreateResult,\n AttachmentDeleteResult,\n AttachmentsCache,\n} from '../mutation/AttachmentMutationResults';\nimport type {\n FormFieldCreateResult,\n FormFieldDeleteResult,\n FormFieldUpdateResult,\n FormImportResult,\n FormRepairResult,\n FormSetValueResult,\n FormWidgetLinkResult,\n} from '../mutation/FormMutationResults';\nimport type { MetadataUpdateResult } from '../mutation/MetadataUpdateResult';\nimport type { CacheDelta, MutationMeta } from '../mutation/MutationMeta';\nimport type { PageDeleteInput } from '../mutation/PageDeleteInput';\nimport type { PageDeleteResult } from '../mutation/PageDeleteResult';\nimport type { PageFlattenInput, PageFlattenResult } from '../mutation/PageFlattenResult';\nimport type { RedactionApplyResult, RedactionApplyScope } from '../mutation/RedactionApplyResult';\nimport type { PageMoveInput } from '../mutation/PageMoveInput';\nimport type { PageMoveResult } from '../mutation/PageMoveResult';\nimport type { PageRotateInput } from '../mutation/PageRotateInput';\nimport type { PageRotateResult } from '../mutation/PageRotateResult';\nimport type { PageStructureCache } from '../mutation/PageStructureCache';\nimport type { RefetchReason } from '../mutation/RefetchReason';\nimport type { PageState } from '../revision/PageState';\nimport type { WeakAnnotationState } from '../revision/WeakAnnotationState';\nimport type {\n SearchMatch,\n SearchQuery,\n SearchRequest,\n SearchSlice,\n SearchSnippet,\n} from '../search/types';\nimport type { PdfTextSegment } from '../text/layout';\nexport type { CacheDelta, MutationMeta } from '../mutation/MutationMeta';\n\nexport const DocumentMetadataSchema: z.ZodType<DocumentMetadata> = z.object({\n title: z.string().nullable(),\n author: z.string().nullable(),\n subject: z.string().nullable(),\n keywords: z.string().nullable(),\n producer: z.string().nullable(),\n creator: z.string().nullable(),\n created: z.string().datetime().nullable(),\n modified: z.string().datetime().nullable(),\n trapped: z.enum(['true', 'false', 'unknown']),\n custom: z.record(z.string(), z.string()),\n});\n\n/**\n * Three-state metadata patch. Mirrors annotation patch semantics:\n * `undefined` leaves a field, `null` clears it, a value sets it. `custom`\n * is a per-key three-state map (string set / null clear / absent leave).\n */\nexport const MetadataPatchSchema: z.ZodType<MetadataPatch> = z\n .object({\n title: z.string().nullable().optional(),\n author: z.string().nullable().optional(),\n subject: z.string().nullable().optional(),\n keywords: z.string().nullable().optional(),\n producer: z.string().nullable().optional(),\n creator: z.string().nullable().optional(),\n created: z.string().datetime().nullable().optional(),\n modified: z.string().datetime().nullable().optional(),\n trapped: z.enum(['true', 'false', 'unknown']).optional(),\n custom: z.record(z.string(), z.string().nullable()).optional(),\n })\n .strict();\n\nexport const OpenDocumentResponseSchema = z.object({\n id: z.string(),\n});\nexport type OpenDocumentResponse = z.infer<typeof OpenDocumentResponseSchema>;\n\n/**\n * Wire shape of `GET /v1/docs/:docId/head`. Mirrors the server-side\n * `DocumentHead` interface; the schema is the source of truth so\n * older SDKs talking to newer servers degrade gracefully (extra\n * fields are accepted and ignored).\n *\n * `docVersion` is the single monotonic integer per doc; it bumps on\n * ANY mutation that could change the manifest's content (page list,\n * per-page content, per-page annotations, per-page weak-flag), which\n * makes `/manifest@docVersion=N` fully content-addressed and cache-friendly.\n * Phase 4 hard-codes it to `1`; Phase 5's mutation handler is what\n * actually bumps it.\n */\nexport const DocumentHeadSchema = z.object({\n id: z.string(),\n baseSha: z.string(),\n storageSizeBytes: z.number().int().nonnegative(),\n docVersion: z.number().int().positive(),\n state: z.enum(['pending', 'ready', 'failed', 'deleting']),\n encryption: z.object({\n state: z.enum(['unknown', 'none', 'encrypted', 'unsupported']),\n requiresPassword: z.boolean().nullable(),\n }),\n permissions: z.object({\n known: z.boolean(),\n bits: z.number().int().nonnegative().nullable(),\n allAllowed: z.boolean().nullable(),\n openedAs: z.enum(['none', 'user', 'owner']).nullable(),\n securityHandlerRevision: z.number().int().nullable(),\n canUpgradeToOwner: z.boolean(),\n }),\n access: z.object({\n required: z.boolean(),\n reasons: z.array(z.enum(['password', 'cdn', 'permissions-unknown'])),\n endpoint: z.string().optional(),\n }),\n});\nexport type DocumentHead = z.infer<typeof DocumentHeadSchema>;\n\nexport const AccessRequestSchema = z.object({\n /** Deprecated: the docId now rides the PATH (`/v1/docs/:docId/access`).\n * Kept optional for the legacy `/v1/access` alias, which requires it. */\n docId: z.string().min(1).optional(),\n layerName: z.string().min(1).optional(),\n password: z.string().optional(),\n passwordGrant: z.string().optional(),\n mode: z.enum(['any', 'owner']).optional(),\n});\nexport type AccessRequest = z.infer<typeof AccessRequestSchema>;\n\n/**\n * Typed boolean view of the PDF user-access permission word. Names\n * mirror the `PdfBits` shape in @embedpdf/engine-core/auth/scope; ISO\n * bit numbers (3, 4, 5, 6, 9, 10, 11, 12).\n */\nconst PdfBitsObjectSchema = z.object({\n bit3: z.boolean(),\n bit4: z.boolean(),\n bit5: z.boolean(),\n bit6: z.boolean(),\n bit9: z.boolean(),\n bit10: z.boolean(),\n bit11: z.boolean(),\n bit12: z.boolean(),\n});\n\n/**\n * Capability-shaped advisory for the client UI. Mirrors\n * `PdfPermissionAdvisory` in @embedpdf/engine-core/runtime; one\n * boolean per UI badge.\n */\nconst PdfPermissionAdvisoryObjectSchema = z.object({\n canPrint: z.boolean(),\n canPrintHigh: z.boolean(),\n canCopy: z.boolean(),\n canAnnotate: z.boolean(),\n canFillForms: z.boolean(),\n canModifyForms: z.boolean(),\n canModifyPages: z.boolean(),\n canAssemble: z.boolean(),\n});\n\nconst PdfPermissionInfoObjectSchema: z.ZodType<PdfPermissionInfo> = z.object({\n known: z.boolean(),\n allAllowed: z.boolean().nullable(),\n bits: z.number().int().nonnegative().nullable(),\n openedAs: z.enum(['none', 'user', 'owner']).nullable(),\n securityHandlerRevision: z.number().int().nullable(),\n // Enriched fields from /access (commit 14). Optional so /head, which\n // doesn't always populate them, stays valid against this schema too.\n flags: PdfBitsObjectSchema.optional(),\n advisory: PdfPermissionAdvisoryObjectSchema.optional(),\n});\n\nconst PdfPermissionInfoSchema = PdfPermissionInfoObjectSchema.nullable();\n\nexport const DocumentSecurityStateSchema: z.ZodType<DocumentSecurityState> = z.object({\n encryption: z.object({\n state: z.enum(['unknown', 'none', 'encrypted', 'unsupported']),\n requiresPassword: z.boolean().nullable(),\n }),\n permissions: z.object({\n known: z.boolean(),\n bits: z.number().int().nonnegative().nullable(),\n allAllowed: z.boolean().nullable(),\n openedAs: z.enum(['none', 'user', 'owner']).nullable(),\n securityHandlerRevision: z.number().int().nullable(),\n canUpgradeToOwner: z.boolean(),\n }),\n access: z.object({\n required: z.boolean(),\n reasons: z.array(z.enum(['password', 'cdn', 'permissions-unknown'])),\n endpoint: z.string().optional(),\n }),\n});\n\nexport const AccessResponseSchema = z.object({\n security: DocumentSecurityStateSchema,\n cdn: z.object({\n adapter: z.enum(['none', 'cloudfront', 'cloud-cdn', 'bunny', 'azure-fd', 'custom-hmac']),\n expiresAt: z.number().int().positive(),\n cache: z.object({\n scope: z.enum(['browser-private', 'edge-shared']),\n immutableVersionedReads: z.boolean(),\n }),\n baseUrlOverrides: z.record(z.string(), z.string()).nullable(),\n authHeader: z.object({ name: z.string(), value: z.string() }).nullable(),\n // Optional signing channels — each adapter populates the subset it uses\n signedQueryParams: z.record(z.string(), z.string()).nullable(),\n signedCookies: z\n .array(\n z.object({\n name: z.string(),\n value: z.string(),\n domain: z.string().optional(),\n path: z.string().optional(),\n expires: z.number().int().optional(),\n }),\n )\n .nullable(),\n signedPathPolicies: z\n .array(\n z.object({\n pathPrefix: z.string(),\n queryParams: z.record(z.string(), z.string()),\n }),\n )\n .nullable(),\n }),\n passwordGrant: z.string().nullable(),\n pdfPermissions: PdfPermissionInfoSchema,\n scope: z.array(z.string()),\n /**\n * Concrete capability set granted to this caller after expanding\n * `pdf.permissions` and applying resolver implication rules. Client\n * UI should drive feature visibility off this, not off raw `scope`.\n * Always present in /access responses (server populates from\n * `expandRawScope`). Sorted alphabetically for stable change\n * detection.\n */\n effectiveScope: z.array(z.string()),\n identity: z.object({\n user_id: z.string().optional(),\n group_id: z.string().optional(),\n groups: z.array(z.string()).optional(),\n display_name: z.string().optional(),\n }),\n originPasswordPolicy: z.object({\n mode: z.enum(['not-needed', 'client-retry', 'server-session']),\n }),\n expiresAt: z.number().int().positive(),\n /**\n * The deployment's render lattice — the canonical parameter points the\n * server treats as durable, CDN-shared artifacts. Lives HERE and never in\n * the manifest: manifests are version-pinned immutable objects; the\n * lattice is mutable deployment policy. The SDK exposes it (and a pure\n * `snap` helper) but NEVER conforms requests implicitly — the same render\n * call must not return different pixels on local vs cloud. When\n * `enforced` is true the server rejects off-lattice render tokens with\n * 400; when false, off-lattice renders are computed but not persisted.\n * Absent on older servers → treat as unenforced/unknown.\n */\n renderPolicy: z\n .object({\n /**\n * Full-page renders quantize on `viewport.width` — the bounded\n * quantity is OUTPUT PIXELS, never zoom (PDF page space is\n * effectively unbounded, so a scale lattice bounds artifact count\n * but not size).\n */\n fullPage: z.object({\n widths: z.array(z.number().int().positive()),\n }),\n /**\n * RESERVED for deep-zoom tile support: scale-based pyramid ×\n * fixed tile size, constant per-job cost. Absent until the tiling\n * plugin ships.\n */\n tiles: z\n .object({\n tileSizes: z.array(z.number().int().positive()),\n scales: z.array(z.number().positive()),\n })\n .optional(),\n /**\n * Annotation-appearance lattice — SCALE-based (appearances are sized\n * by `rect × scale` and must track the page's effective render scale\n * for crisp composites).\n */\n appearances: z\n .object({\n scales: z.array(z.number().positive()),\n })\n .optional(),\n /** Worker-side output budget for degenerate page geometry. */\n maxRenderPixels: z.number().int().positive().optional(),\n formats: z.array(z.enum(['webp', 'png'])),\n background: z.enum(['white']),\n enforced: z.boolean(),\n })\n .optional(),\n});\nexport type AccessResponse = z.infer<typeof AccessResponseSchema>;\nexport type RenderPolicy = NonNullable<AccessResponse['renderPolicy']>;\n\nexport const PdfSaveModeSchema: z.ZodType<PdfSaveMode> = z.enum(['incremental', 'rewrite']);\n\nconst engineErrorCodeValues = Object.values(EngineErrorCode) as [\n EngineErrorCode,\n ...EngineErrorCode[],\n];\n\nexport const EngineErrorPayloadSchema: z.ZodType<SerializedEngineError> = z.object({\n name: z.literal('EngineError'),\n code: z.enum(engineErrorCodeValues),\n message: z.string(),\n details: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport const WeakAnnotationStateSchema: z.ZodType<WeakAnnotationState> = z.discriminatedUnion(\n 'kind',\n [\n z.object({ kind: z.literal('unknown') }),\n z.object({\n kind: z.literal('known'),\n hasAnyWeakAnnotations: z.boolean(),\n }),\n ],\n);\n\nexport const PageStateSchema: z.ZodType<PageState> = z.object({\n pageObjectNumber: z.number().int().positive(),\n revision: RevisionTokenSchema,\n weakAnnotationState: WeakAnnotationStateSchema,\n});\n\nexport const CachePinsSchema: z.ZodType<CachePins> = z.object({\n contentVersion: z.number().int().positive(),\n annotationVersion: z.number().int().positive(),\n});\n\n/**\n * Plane scopes are DERIVED from the version counters at every emission\n * point (layer manifests, mutation cache envelopes, SSE rows), never stored.\n * Additive/optional both ways: old clients ignore it, old servers omit it\n * (consumers treat absence as all-'layer' — never wrong, only unshared).\n */\nconst LayerScopeValueSchema = z.enum(['base', 'layer']);\nexport const LayerScopesSchema: z.ZodType<LayerScopes> = z.object({\n content: LayerScopeValueSchema,\n annotations: LayerScopeValueSchema,\n layout: LayerScopeValueSchema,\n attachments: LayerScopeValueSchema,\n metadata: LayerScopeValueSchema,\n actions: LayerScopeValueSchema,\n});\nexport type { LayerScopes, LayerScopePlane } from '../dto/LayerScopes';\n\n/**\n * Per-page envelope inside `DocumentManifest`. Carries the full\n * `PageState` plus the cache-busting integers the SDK embeds in\n * leaf URLs (`/pages/:pon/text@contentVersion=N`, `/pages/:pon/annotations@annotationVersion=N`).\n *\n * `contentVersion` bumps when the page's content stream changes\n * (text, page reorder doesn't, the pon is durable). `annotationVersion`\n * bumps when /Annots gains/loses entries or when a tracked annotation\n * mutates. `hasWeakAnnotations` is hoisted from `PageState` so the\n * SDK can decide whether to display a \"stale-on-reorder\" badge\n * without re-fetching the page.\n *\n * Phase 4 hard-codes all three to (1, 1, false); Phase 5's\n * `layer_pages` table drives the real values.\n */\nexport const ManifestPageSchema: z.ZodType<ManifestPage> = z\n .object({\n state: PageStateSchema,\n cache: CachePinsSchema,\n })\n .superRefine((page, ctx) => {\n if (page.state.weakAnnotationState.kind !== 'known') {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['state', 'weakAnnotationState'],\n message: 'manifest pages must have a known weak annotation state',\n });\n }\n }) as z.ZodType<ManifestPage>;\nexport type { ManifestPage } from '../dto/DocumentManifest';\n\n/**\n * Wire shape of `GET /v1/docs/:docId/manifest@docVersion=N`. Content-addressed\n * by `docVersion`; safe to cache with `Cache-Control: public,\n * max-age=31536000, immutable`.\n */\nexport const DocumentManifestSchema = z.object({\n docVersion: z.number().int().positive(),\n layoutVersion: z.number().int().positive(),\n metadataVersion: z.number().int().positive(),\n actionsVersion: z.number().int().positive().default(1),\n attachmentsVersion: z.number().int().positive().default(1),\n auditHead: z.number().int().nonnegative(),\n baseSha: z.string(),\n // Plane scopes: layer manifests only; absent = all-'layer'.\n scopes: LayerScopesSchema.optional(),\n pages: z.array(ManifestPageSchema),\n}) as unknown as z.ZodType<DocumentManifest>;\nexport type { DocumentManifest } from '../dto/DocumentManifest';\n\nexport const AnnotationListPageSnapshotSchema: z.ZodType<AnnotationListPageSnapshot> = z.object({\n pageState: PageStateSchema,\n annotations: z.array(AnnotationDTOSchema),\n});\n\nexport const AnnotationListSnapshotAllPagesSchema: z.ZodType<AnnotationListSnapshotAllPages> =\n z.object({\n pages: z.array(AnnotationListPageSnapshotSchema),\n });\n\n/**\n * Wire shape of `GET …/text/pages/:pon/data@<contentVersion>` and the\n * `pages.text` worker result: the UTF-16-faithful extraction, the CHARACTER\n * space size (`charCount` — the space geometry runs tile; NOT `text.length`),\n * and the optional character→text anchor map. Malformed maps are rejected\n * here with the shared `charMapViolation` invariants — absent/empty map\n * REQUIRES `charCount === text.length` (identity).\n */\nexport const PageTextSnapshotSchema: z.ZodType<PageTextSnapshot> = z\n .object({\n text: z.string(),\n charCount: z.number().int().nonnegative(),\n charMap: z\n .array(z.tuple([z.number().int().nonnegative(), z.number().int().nonnegative()]))\n .optional(),\n })\n .superRefine((snapshot, ctx) => {\n const violation = charMapViolation(snapshot.charCount, snapshot.text.length, snapshot.charMap);\n if (violation !== null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: ['charMap'], message: violation });\n }\n });\n\nexport const PageGeometryGlyphSchema = z.object({\n looseBox: PdfRectSchema,\n flags: z.number().int().nonnegative(),\n tightBox: PdfRectSchema.optional(),\n});\n\nexport const RotatedGeometryGlyphSchema = z.object({\n looseQuad: PdfQuadSchema,\n flags: z.number().int().nonnegative(),\n tightQuad: PdfQuadSchema.optional(),\n});\n\nexport const UprightGeometryRunSchema = z.object({\n rect: PdfRectSchema,\n charStart: z.number().int().nonnegative(),\n glyphs: z.array(PageGeometryGlyphSchema),\n fontSize: z.number().optional(),\n});\n\nexport const RotatedGeometryRunSchema = z.object({\n rect: PdfRectSchema,\n charStart: z.number().int().nonnegative(),\n glyphs: z.array(RotatedGeometryGlyphSchema),\n rotation: z.number(),\n ascentFlip: z.boolean(),\n fontSize: z.number().optional(),\n});\n\n// Rotated first: in zod's default strip mode the upright shape would accept a\n// zero-glyph rotated run and silently drop its rotation; the rotated shape can\n// never swallow an upright run (it requires `rotation`/`ascentFlip`).\nexport const PageGeometryRunSchema: z.ZodType<PageGeometryRun> = z.union([\n RotatedGeometryRunSchema,\n UprightGeometryRunSchema,\n]);\n\nexport const PageGeometrySnapshotSchema: z.ZodType<PageGeometrySnapshot> = z.object({\n runs: z.array(PageGeometryRunSchema),\n});\n\n/**\n * Search wire shapes: the request body of the layer search route and the\n * `search.query` worker/route result. The server re-validates the query\n * semantics (`validateSearchQuery`: regex dialect + flag combos) after\n * parse — the schema only checks structure.\n */\nexport const SearchQuerySchema: z.ZodType<SearchQuery> = z.object({\n text: z.string(),\n regex: z.boolean().optional(),\n matchCase: z.boolean().optional(),\n wholeWord: z.boolean().optional(),\n matchDiacritics: z.boolean().optional(),\n});\n\nexport const SearchModeSchema = z.enum(['rects', 'full']);\n\nexport const SearchRequestSchema: z.ZodType<SearchRequest> = z.object({\n query: SearchQuerySchema,\n mode: SearchModeSchema.optional(),\n cursor: z.string().optional(),\n startPage: z.number().int().positive().optional(),\n skip: z.number().int().nonnegative().optional(),\n budget: z\n .object({\n maxMatches: z.number().int().positive().optional(),\n maxPages: z.number().int().positive().optional(),\n })\n .optional(),\n});\n\nexport const SearchSnippetSchema: z.ZodType<SearchSnippet> = z.object({\n text: z.string(),\n matchStart: z.number().int().nonnegative(),\n matchLength: z.number().int().positive(),\n});\n\nexport const PdfTextSegmentSchema: z.ZodType<PdfTextSegment> = z.object({\n quad: PdfQuadSchema,\n rect: PdfRectSchema,\n advance: z.union([z.literal(1), z.literal(-1)]),\n});\n\nexport const SearchMatchSchema: z.ZodType<SearchMatch> = z.object({\n pageObjectNumber: z.number().int().positive(),\n charStart: z.number().int().nonnegative(),\n charCount: z.number().int().positive(),\n segments: z.array(PdfTextSegmentSchema),\n snippet: SearchSnippetSchema.optional(),\n});\n\nexport const SearchSliceSchema: z.ZodType<SearchSlice> = z.object({\n matches: z.array(SearchMatchSchema),\n nextCursor: z.string().nullable(),\n scannedPages: z.number().int().nonnegative(),\n totalPages: z.number().int().nonnegative(),\n});\n\nexport const PageNetworkRenderFormatSchema: z.ZodType<PageNetworkRenderFormat> = z.enum([\n 'png',\n 'webp',\n]);\n\n/**\n * Wire schema for the cloud render endpoints, applied to the **nested**\n * shape produced by `unflatten(...)` of the parsed token or query string.\n *\n * Adding a new render option is one change here (a new field plus any\n * cross-field rule in `superRefine`) plus one entry in\n * `RenderTokenSchema.fields`. The token codec, flatten/unflatten helpers,\n * route handlers, and SDK URL builder are all generic and pick the new\n * field up automatically.\n *\n * Coercion: token fields and query strings both arrive as strings, so every\n * scalar uses `z.coerce.*`. Discriminated unions on `viewport.kind` and\n * `target.kind` enforce viewport / rect coherence by construction — no\n * superRefine for \"fields must appear together\" rules.\n */\n\nconst RenderViewportSchema = z.discriminatedUnion('kind', [\n z\n .object({\n kind: z.literal('width'),\n width: z.coerce.number().positive().finite(),\n })\n .strict(),\n z\n .object({\n kind: z.literal('scale'),\n scale: z.coerce.number().positive().finite().optional(),\n })\n .strict(),\n]);\n\nconst RenderTargetSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('page') }).strict(),\n z\n .object({\n kind: z.literal('rect'),\n rect: z\n .object({\n left: z.coerce.number().finite(),\n bottom: z.coerce.number().finite(),\n right: z.coerce.number().finite(),\n top: z.coerce.number().finite(),\n })\n .strict(),\n })\n .strict(),\n]);\n\nconst RenderRotationSchema = z.preprocess(\n (raw) => (raw === undefined ? undefined : Number(raw)),\n z.number().refine((n) => n === 0 || n === 90 || n === 180 || n === 270, {\n message: 'render rotation must be 0, 90, 180, or 270',\n }),\n);\n\nconst RenderBackgroundSchema = z.enum(['white', 'transparent']);\n\nconst RenderQualitySchema = z.coerce.number().int().min(1).max(100);\n\n/**\n * Token/path rule: annotatedness is PATH-expressed —\n * the render FAMILY the route belongs to — never token/query-expressed.\n * Each family therefore gets its own query schema, built from one shared\n * base:\n *\n * - the annotation-free family (`…/render/pages/`) has NO\n * `annotationVersion` field at all — `.strict()` rejects it as an\n * unrecognized key, so the illegal combination is unrepresentable;\n * - the annotated family (`…/render/annotated/pages/`) REQUIRES\n * `annotationVersion` on versioned requests — its artifact depends on\n * the `annotations` plane, so the pin must be in the cache key.\n *\n * Both transforms stamp `includeAnnotations` onto the parsed SDK options\n * from the family, so downstream consumers (worker options, classify) are\n * family-blind.\n */\nfunction buildPageRenderQuerySchema(annotated: boolean): z.ZodType<PageRenderQuery> {\n return z\n .object({\n contentVersion: z.coerce.number().int().positive().optional(),\n ...(annotated ? { annotationVersion: z.coerce.number().int().positive().optional() } : {}),\n format: PageNetworkRenderFormatSchema.optional(),\n viewport: RenderViewportSchema.optional(),\n target: RenderTargetSchema.optional(),\n rotation: RenderRotationSchema.optional(),\n background: RenderBackgroundSchema.optional(),\n quality: RenderQualitySchema.optional(),\n })\n .strict()\n .superRefine((v, ctx) => {\n // The object shape is family-dependent (the free family has no\n // `annotationVersion` key at all), so read the pins through one\n // explicit view instead of letting the conditional spread's union\n // type leak into the refinement.\n const pins = v as { contentVersion?: number; annotationVersion?: number };\n if (pins.contentVersion !== undefined && v.format === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['format'],\n message: 'versioned render requires format',\n });\n }\n if (annotated && pins.annotationVersion !== undefined && pins.contentVersion === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['annotationVersion'],\n message: 'annotationVersion requires contentVersion',\n });\n }\n if (annotated && pins.contentVersion !== undefined && pins.annotationVersion === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['annotationVersion'],\n message: 'versioned annotated render requires annotationVersion',\n });\n }\n })\n .transform((v) => {\n const pins = v as { contentVersion?: number; annotationVersion?: number };\n const options: PageImageOptions = {\n ...(v.target ? { target: v.target } : {}),\n ...(v.viewport ? { viewport: v.viewport } : {}),\n ...(v.rotation !== undefined ? { rotation: v.rotation } : {}),\n ...(v.background !== undefined ? { background: v.background } : {}),\n ...(v.quality !== undefined ? { quality: v.quality } : {}),\n ...(v.format !== undefined ? { format: v.format } : {}),\n includeAnnotations: annotated,\n };\n return {\n options,\n ...(pins.contentVersion !== undefined ? { contentVersion: pins.contentVersion } : {}),\n ...(pins.annotationVersion !== undefined\n ? { annotationVersion: pins.annotationVersion }\n : {}),\n };\n }) as unknown as z.ZodType<PageRenderQuery>;\n}\n\n/** Query/token schema for the annotation-free render family (`page-render`). */\nexport const PageRenderQuerySchema = buildPageRenderQuerySchema(false);\n/** Query/token schema for the annotated render family (`page-render-annotated`). */\nexport const PageRenderAnnotatedQuerySchema = buildPageRenderQuerySchema(true);\n\n/**\n * Query/token schema for the batch annotation-appearance render endpoint.\n * Mirrors `PageRenderQuerySchema` but without page target/viewport/background\n * or `includeAnnotations` (appearances are always annotation-derived), and\n * keyed by `annotationVersion` only — appearance bitmaps do not depend on\n * page base content, so `contentVersion` is not part of the cache key. The\n * endpoint renders the Normal appearance only.\n */\nexport const AnnotationAppearancesQuerySchema = z\n .object({\n annotationVersion: z.coerce.number().int().positive().optional(),\n format: PageNetworkRenderFormatSchema.optional(),\n rotation: RenderRotationSchema.optional(),\n scale: z.coerce.number().positive().finite().optional(),\n quality: RenderQualitySchema.optional(),\n })\n .strict()\n .superRefine((v, ctx) => {\n // A versioned (cacheable) request pins the annotation version and must\n // declare the encoded format so the cached URL is unambiguous.\n if (v.annotationVersion !== undefined && v.format === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['format'],\n message: 'versioned appearance render requires format',\n });\n }\n })\n .transform((v) => {\n const options: AnnotationAppearanceImageOptions = {\n ...(v.rotation !== undefined ? { rotation: v.rotation } : {}),\n ...(v.scale !== undefined ? { scale: v.scale } : {}),\n ...(v.quality !== undefined ? { quality: v.quality } : {}),\n ...(v.format !== undefined ? { format: v.format } : {}),\n };\n return {\n options,\n ...(v.annotationVersion !== undefined ? { annotationVersion: v.annotationVersion } : {}),\n };\n }) as unknown as z.ZodType<AnnotationAppearancesQuery>;\n\n/**\n * The JSON manifest part of the appearance `multipart/form-data` response.\n * Wire-stable; the cloud client validates the parsed `manifest` part against\n * this before reconstructing image handles from the binary parts.\n */\nexport const AnnotationAppearanceManifestSchema: z.ZodType<AnnotationAppearanceManifest> = z.object(\n {\n pageState: PageStateSchema,\n appearances: z.array(\n z.object({\n part: z.string().min(1),\n ref: AnnotationRefSchema,\n mode: z.enum(['normal', 'rollover', 'down']),\n rect: PdfRectSchema,\n width: z.number().int().positive(),\n height: z.number().int().positive(),\n format: PageNetworkRenderFormatSchema,\n contentType: z.string().min(1),\n }),\n ),\n },\n);\n\n/**\n * Reasons a mutation tells the client its old snapshot is stale. Wire-stable;\n * extend with care (forward-compat clients accept only known values).\n */\nexport const RefetchReasonSchema: z.ZodType<RefetchReason> = z.enum([\n 'weakRefsInvalidated',\n 'externalChange',\n 'pageRebuilt',\n]);\n\nexport const CacheDeltaSchema: z.ZodType<CacheDelta> = z.object({\n previousDocVersion: z.number().int().positive(),\n docVersion: z.number().int().positive(),\n pages: z.array(\n z.object({\n pageObjectNumber: z.number().int().positive(),\n cache: CachePinsSchema,\n }),\n ),\n});\n\nexport const MutationMetaSchema: z.ZodType<MutationMeta> = z.object({\n affectedPages: z.array(PageStateSchema),\n cacheDelta: CacheDeltaSchema.nullable(),\n});\n\n/**\n * Per-page side-effect envelope every annotation mutation returns. Mirrors\n * `AnnotationListMutationMeta`. The `shouldRefetch` field is `null` when the\n * client's existing index-based references remain valid; non-null only when\n * the engine knows for sure the snapshot is stale.\n */\nexport const AnnotationListMutationMetaSchema: z.ZodType<AnnotationListMutationMeta> = z.object({\n affectedPages: z.array(PageStateSchema),\n cacheDelta: CacheDeltaSchema.nullable(),\n changed: z.array(AnnotationStableIdSchema),\n weakRefsInvalidated: z.boolean(),\n shouldRefetch: z.object({ reason: RefetchReasonSchema }).nullable(),\n});\n\nexport const AnnotationCreateResultSchema: z.ZodType<AnnotationCreateResult> = z.object({\n created: AnnotationDTOSchema,\n meta: AnnotationListMutationMetaSchema,\n});\n\n/** The engine's `/AP` verdict riding every update result (see engine-core\n * `annotation/appearance.ts`). `changed` drives client raster invalidation. */\nexport const AppearanceOutcomeSchema: z.ZodType<AppearanceOutcome> = z.object({\n action: z.enum(['preserved', 'regenerated', 'generation-unavailable']),\n changed: z.boolean(),\n});\n\nexport const AnnotationUpdateResultSchema: z.ZodType<AnnotationUpdateResult> = z.object({\n updated: AnnotationDTOSchema,\n appearance: AppearanceOutcomeSchema,\n meta: AnnotationListMutationMetaSchema,\n});\n\n/**\n * `deleted` is nullable: a weak annotation (no /NM, no indirect object\n * number) has no durable id to report after removal. Cloud server and local\n * worker both emit `null` in that case so callers don't have to special-case\n * a sentinel.\n */\nexport const AnnotationDeleteResultSchema: z.ZodType<AnnotationDeleteResult> = z.object({\n deleted: AnnotationStableIdSchema.nullable(),\n meta: AnnotationListMutationMetaSchema,\n});\n\n/**\n * Batch annotation move (contiguous-block, symmetric with `pages.move`).\n * `moved` is in caller order; each `moved[i]` lives at index `toIndex + i`\n * after the move. ONE structural envelope per batch.\n */\nexport const AnnotationMoveResultSchema: z.ZodType<AnnotationMoveResult> = z.object({\n moved: z.array(AnnotationDTOSchema),\n meta: AnnotationListMutationMetaSchema,\n});\n\nexport const FormSetValueResultSchema: z.ZodType<FormSetValueResult> = z.object({\n field: FormFieldDTOSchema,\n changedWidgets: z.array(FormWidgetRefSchema),\n meta: MutationMetaSchema,\n});\n\nexport const FormEffectSchema: z.ZodType<FormEffect> = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('setValue'), ref: FormFieldRefSchema, value: FormFieldValueSchema }),\n z.object({\n kind: z.literal('setDisplay'),\n ref: FormFieldRefSchema,\n display: z.enum(['visible', 'hidden', 'noPrint', 'noView']),\n }),\n z.object({ kind: z.literal('setAppearanceText'), ref: FormFieldRefSchema, text: z.string() }),\n z.object({ kind: z.literal('reset'), refs: z.array(FormFieldRefSchema) }),\n]);\n\nexport const FormEffectsResultSchema: z.ZodType<FormEffectsResult> = z.object({\n results: z.array(\n z.object({\n index: z.number().int().nonnegative(),\n status: z.enum(['applied', 'unchanged', 'rejected', 'failed', 'skipped']),\n fields: z.array(FormFieldDTOSchema),\n changedWidgets: z.array(FormWidgetRefSchema),\n error: EngineErrorPayloadSchema.optional(),\n }),\n ),\n changedWidgets: z.array(FormWidgetRefSchema),\n meta: MutationMetaSchema.nullable(),\n});\n\nexport const FormImportResultSchema: z.ZodType<FormImportResult> = z.object({\n fieldsTotal: z.number().int().nonnegative(),\n fieldsApplied: z.number().int().nonnegative(),\n fieldsSkipped: z.number().int().nonnegative(),\n widgetsChanged: z.number().int().nonnegative(),\n snapshot: FormSnapshotSchema,\n meta: MutationMetaSchema,\n});\n\nexport const FormFieldCreateResultSchema: z.ZodType<FormFieldCreateResult> = z.object({\n field: FormFieldDTOSchema,\n meta: MutationMetaSchema,\n});\n\nexport const FormFieldUpdateResultSchema: z.ZodType<FormFieldUpdateResult> = z.object({\n field: FormFieldDTOSchema,\n meta: MutationMetaSchema,\n});\n\nexport const FormFieldDeleteResultSchema: z.ZodType<FormFieldDeleteResult> = z.object({\n deletedFieldObjectNumber: z.number().int().positive(),\n removedWidgets: z.array(FormWidgetRefSchema),\n meta: MutationMetaSchema,\n});\n\nexport const FormWidgetLinkResultSchema: z.ZodType<FormWidgetLinkResult> = z.object({\n field: FormFieldDTOSchema,\n meta: MutationMetaSchema,\n});\n\nexport const FormRepairResultSchema: z.ZodType<FormRepairResult> = z.object({\n acroformCreated: z.boolean(),\n fieldsLinked: z.number().int().nonnegative(),\n widgetsLinked: z.number().int().nonnegative(),\n fieldsUnrepairable: z.number().int().nonnegative(),\n appearancesBaked: z.number().int().nonnegative(),\n needAppearancesCleared: z.boolean(),\n meta: MutationMetaSchema,\n});\n\n/**\n * A PDF box in PDF user space as a `PdfRect` (`{ left, bottom, right, top }`,\n * y-up edges, un-rotated, not origin-normalized). Re-exported from the\n * canonical geometry schema so the wire and the runtime agree.\n */\nexport { PdfRectSchema };\n\nexport const PageBoxesSchema: z.ZodType<PageBoxes> = z.object({\n media: PdfRectSchema,\n crop: PdfRectSchema,\n bleed: PdfRectSchema.optional(),\n trim: PdfRectSchema.optional(),\n art: PdfRectSchema.optional(),\n});\n\n/**\n * Pure geometry for one page (`pages.list()` element). No annotation\n * liveness — that lives on annotation reads and the manifest.\n */\nexport const PageLayoutSchema: z.ZodType<PageLayout> = z.object({\n index: z.number().int().nonnegative(),\n pageObjectNumber: z.number().int().positive(),\n label: z.string().nullable(),\n size: PdfSizeSchema,\n rotation: PdfRotationSchema,\n userUnit: z.number().positive(),\n boxes: PageBoxesSchema,\n actions: PdfPageActionsSchema.optional(),\n});\n\nexport const PageFlattenResultSchema: z.ZodType<PageFlattenResult> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n usage: z.enum(['display', 'print']),\n results: z.array(\n z.object({\n pageObjectNumber: z.number().int().positive(),\n status: z.enum(['applied', 'unchanged', 'failed', 'skipped']),\n error: EngineErrorPayloadSchema.optional(),\n }),\n ),\n meta: MutationMetaSchema.nullable(),\n});\n\nexport const PageFlattenInputSchema: z.ZodType<PageFlattenInput> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n usage: z.enum(['display', 'print']),\n});\n\nexport const RedactionApplyScopeSchema: z.ZodType<RedactionApplyScope> = z.discriminatedUnion(\n 'kind',\n [\n z.object({\n kind: z.literal('pages'),\n pageObjectNumbers: z.array(z.number().int().positive()),\n }),\n z.object({\n kind: z.literal('annotations'),\n refs: z.array(AnnotationRefSchema),\n }),\n ],\n) as unknown as z.ZodType<RedactionApplyScope>;\n\nexport const RedactionApplyResultSchema: z.ZodType<RedactionApplyResult> = z.object({\n scope: RedactionApplyScopeSchema,\n results: z.array(\n z.object({\n pageObjectNumber: z.number().int().positive(),\n status: z.enum(['applied', 'unchanged', 'failed', 'skipped']),\n removedAnnotationCount: z.number().int().nonnegative(),\n error: EngineErrorPayloadSchema.optional(),\n }),\n ),\n removedAnnotationCount: z.number().int().nonnegative(),\n meta: MutationMetaSchema.nullable(),\n});\n\n/**\n * Snapshot of every page in display order. Pages are addressed by\n * `pageObjectNumber` everywhere except the per-element `index`, which is\n * display order and intentionally not an identity. Carries geometry only.\n */\nexport const PageListSnapshotSchema: z.ZodType<PageListSnapshot> = z.object({\n pageCount: z.number().int().nonnegative(),\n pages: z.array(PageLayoutSchema),\n});\n\n/**\n * Page reorder input. Pages are always addressed by `pageObjectNumber`;\n * `destIndex` is the insertion point in the post-removal index space.\n */\nexport const PageMoveInputSchema: z.ZodType<PageMoveInput> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n destIndex: z.number().int().nonnegative(),\n});\n\n/**\n * Coherence pins shared by every page-STRUCTURE result (move/rotate/delete) —\n * see `PageStructureCache`. Nullable at each use site (local engines).\n */\nexport const PageStructureCacheSchema: z.ZodType<PageStructureCache> = z.object({\n previousDocVersion: z.number().int().nonnegative(),\n docVersion: z.number().int().positive(),\n layoutVersion: z.number().int().positive(),\n});\n\n/**\n * Page reorder result. No revision is bumped (no doc-level revision exists,\n * and per-page revisions intentionally survive a page reorder). The full\n * post-move order is returned so callers can swap their snapshot directly.\n */\nexport const PageMoveResultSchema: z.ZodType<PageMoveResult> = z.object({\n layout: PageListSnapshotSchema,\n cache: PageStructureCacheSchema.nullable(),\n});\n\n/**\n * Page rotate input. ABSOLUTE rotation (idempotent — see `PageRotateInput`),\n * one value applied to every listed page.\n */\nexport const PageRotateInputSchema: z.ZodType<PageRotateInput> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n rotation: PdfRotationSchema,\n});\n\n/**\n * Page rotate result. Rotation is presentation metadata over normalized\n * content: nothing per-page invalidates; the new `layout` carries the\n * rotation values (see `PageRotateResult`).\n */\nexport const PageRotateResultSchema: z.ZodType<PageRotateResult> = z.object({\n layout: PageListSnapshotSchema,\n cache: PageStructureCacheSchema.nullable(),\n});\n\n/** Page delete input. Deleting every page is rejected server/worker-side. */\nexport const PageDeleteInputSchema: z.ZodType<PageDeleteInput> = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()),\n});\n\n/**\n * Page delete result. Deleted PONs are retired (never recycled); surviving\n * pages keep identity + revisions (see `PageDeleteResult`).\n */\nexport const PageDeleteResultSchema: z.ZodType<PageDeleteResult> = z.object({\n layout: PageListSnapshotSchema,\n cache: PageStructureCacheSchema.nullable(),\n});\n\n/**\n * Metadata write result. The Info dict is rewritten in place, so the\n * result returns the re-read `metadata` plus cloud coherence pins. No\n * `layoutVersion` is touched — a metadata edit bumps only `docVersion`\n * and `metadataVersion`. `cache` is `null` for local engines.\n */\nexport const AttachmentsCacheSchema: z.ZodType<AttachmentsCache> = z.object({\n previousDocVersion: z.number().int().nonnegative(),\n docVersion: z.number().int().positive(),\n attachmentsVersion: z.number().int().positive(),\n});\n\nexport const AttachmentCreateResultSchema: z.ZodType<AttachmentCreateResult> = z.object({\n created: EmbeddedFileItemSchema,\n cache: AttachmentsCacheSchema.nullable(),\n});\n\nexport const AttachmentDeleteResultSchema: z.ZodType<AttachmentDeleteResult> = z.object({\n deleted: EmbeddedFileRefSchema,\n cache: AttachmentsCacheSchema.nullable(),\n});\n\nexport const MetadataUpdateResultSchema: z.ZodType<MetadataUpdateResult> = z.object({\n metadata: DocumentMetadataSchema,\n cache: z\n .object({\n previousDocVersion: z.number().int().nonnegative(),\n docVersion: z.number().int().positive(),\n metadataVersion: z.number().int().positive(),\n })\n .nullable(),\n});\n\nexport const WeakAnnotationSessionResponseSchema = z.object({\n sessionId: z.string().min(1),\n expiresAt: z.number().int().positive(),\n heartbeatIntervalMs: z.number().int().positive(),\n pageObjectNumbers: z.array(z.number().int().positive()),\n});\nexport type WeakAnnotationSessionResponse = z.infer<typeof WeakAnnotationSessionResponseSchema>;\n\nexport const WeakAnnotationSessionPagesRequestSchema = z.object({\n pageObjectNumbers: z.array(z.number().int().positive()).transform((pages) => [...new Set(pages)]),\n});\nexport type WeakAnnotationSessionPagesRequest = z.infer<\n typeof WeakAnnotationSessionPagesRequestSchema\n>;\n"],"mappings":";;;;;;;AAkBA,MAAa,iBAAsCA,IAAAA,EAAE,OAAO;CAC1D,GAAGA,IAAAA,EAAE,OAAO;CACZ,GAAGA,IAAAA,EAAE,OAAO;AACd,CAAC;AAED,MAAa,mBAA0CA,IAAAA,EAAE,OAAO;CAC9D,OAAO;CACP,KAAK;AACP,CAAC;;AAGD,MAAa,oBAA4CA,IAAAA,EAAE,MAAM,CAC/DA,IAAAA,EAAE,MAAM,CAAC,gBAAgB,cAAc,CAAC,GACxCA,IAAAA,EAAE,MAAM;CAAC;CAAgB;CAAgB;AAAc,CAAC,CAC1D,CAAC;;AAGD,MAAa,gBAAoCA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,cAAc,CAAC;AAEhF,MAAa,gBAAoCA,IAAAA,EAAE,OAAO;CACxD,MAAMA,IAAAA,EAAE,OAAO;CACf,QAAQA,IAAAA,EAAE,OAAO;CACjB,OAAOA,IAAAA,EAAE,OAAO;CAChB,KAAKA,IAAAA,EAAE,OAAO;AAChB,CAAC;AAED,MAAa,gBAAoCA,IAAAA,EAAE,OAAO;CACxD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,YAAY;CAC9B,QAAQA,IAAAA,EAA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