import { A as AltiumBinaryPcbDoc, a as AltiumCompoundFile, b as AltiumIniDocument, c as AltiumOutJob, d as AltiumPcbDoc, e as AltiumPrjPcb, f as AltiumSchDoc, g as AltiumWorkspace, h as AltiumNode, i as AltiumRecord, j as AltiumValidationProfile, k as AltiumValidationResult, l as AltiumNetRecord, m as AltiumSourceLocation, P as ParseAltiumOptions, n as AltiumPcbLayerStack, o as AltiumRecordInit, p as AltiumPoint, q as AltiumBounds, r as AltiumSize, s as AltiumLine, t as AltiumLineTerminator, u as AltiumNodeInit, v as AltiumSchematicRecord, w as AltiumPcbDocument } from './altium-serialization-Bnv5ycub.js'; export { x as ALTIUM_NO_INDEX, y as AltiumBoardRecord, z as AltiumClassRecord, B as AltiumComponentRecord, C as AltiumCompoundEntry, D as AltiumCompoundEntryMetadata, E as AltiumCompoundEntryType, F as AltiumCompoundFileHeader, G as AltiumCompoundStorage, H as AltiumCompoundStream, I as AltiumContourWinding, J as AltiumDetectedContainer, K as AltiumDetectedDocumentKind, L as AltiumDiagnostic, M as AltiumDiagnosticCollector, N as AltiumDiagnosticHandler, O as AltiumDiagnosticSeverity, Q as AltiumDxpRuleRecord, R as AltiumEmbeddedModel, S as AltiumEmbeddedSchematicImage, T as AltiumField, U as AltiumFileDetection, V as AltiumIniCommentLine, W as AltiumIniKeyValueLine, X as AltiumIniLine, Y as AltiumIniRawLine, Z as AltiumIniSection, _ as AltiumIniSectionLine, $ as AltiumLineInit, a0 as AltiumMeasurement, a1 as AltiumMeasurementInit, a2 as AltiumMeasurementInput, a3 as AltiumMeasurementParts, a4 as AltiumMeasurementUnit, a5 as AltiumModelRecord, a6 as AltiumNodeVisitor, a7 as AltiumOutputCategory, a8 as AltiumOutputJobEntry, a9 as AltiumParseMode, aa as AltiumPcbBoardGeometry, ab as AltiumPcbConnectivityEdge, ac as AltiumPcbConnectivityGraph, ad as AltiumPcbContour, ae as AltiumPcbContourArc, af as AltiumPcbContourVertex, ag as AltiumPcbContourVertexKind, ah as AltiumPcbDanglingReference, ai as AltiumPcbDocumentIndex, aj as AltiumPcbGridSettings, ak as AltiumPcbImpedanceProfile, al as AltiumPcbLayerPair, am as AltiumPcbLayerStackEntry, an as AltiumPcbLayerSubStack, ao as AltiumPcbReferenceField, ap as AltiumPcbRegionGeometry, aq as AltiumPcbResolvedReference, ar as AltiumPcbSide, as as AltiumPcbStreamSummary, at as AltiumPcbTraceImpedanceConfiguration, au as AltiumPolygonRecord, av as AltiumProjectDocumentGraph, aw as AltiumProjectDocumentGraphNode, ax as AltiumProjectDocumentReference, ay as AltiumProjectSetting, az as AltiumProjectVariant, aA as AltiumRawField, aB as AltiumRecordItem, aC as AltiumRecordNode, aD as AltiumRegionRecord, aE as AltiumRoundTripLevel, aF as AltiumRoutingLayerSetting, aG as AltiumRuleCategory, aH as AltiumRuleLayerConstraint, aI as AltiumRuleMeasurementRange, aJ as AltiumRuleNumericRange, aK as AltiumRuleRecord, aL as AltiumSchArcRecord, aM as AltiumSchBezierRecord, aN as AltiumSchBusEntryRecord, aO as AltiumSchBusRecord, aP as AltiumSchComponentRecord, aQ as AltiumSchDesignatorRecord, aR as AltiumSchDifferentialPairRecord, aS as AltiumSchDocSourceFormat, aT as AltiumSchEllipseRecord, aU as AltiumSchEllipticalArcRecord, aV as AltiumSchImageRecord, aW as AltiumSchImplementationListRecord, aX as AltiumSchImplementationMapRecord, aY as AltiumSchImplementationParameterRecord, aZ as AltiumSchImplementationRecord, a_ as AltiumSchJunctionRecord, a$ as AltiumSchLabelRecord, b0 as AltiumSchLineRecord, b1 as AltiumSchNetLabelRecord, b2 as AltiumSchNoErcRecord, b3 as AltiumSchNoteRecord, b4 as AltiumSchParameterRecord, aR as AltiumSchParameterSetRecord, b5 as AltiumSchPinRecord, b6 as AltiumSchPolygonRecord, b7 as AltiumSchPolylineRecord, b8 as AltiumSchPortRecord, b9 as AltiumSchPowerPortRecord, ba as AltiumSchRectangleRecord, bb as AltiumSchRoundedRectangleRecord, bc as AltiumSchSheetEntryRecord, bd as AltiumSchSheetFileNameRecord, be as AltiumSchSheetNameRecord, bf as AltiumSchSheetRecord, bg as AltiumSchSheetSymbolRecord, bh as AltiumSchTemplateRecord, bi as AltiumSchTextFrameRecord, bj as AltiumSchWireRecord, bk as AltiumSchematicDocumentIndex, bl as AltiumSchematicImagePayload, bm as AltiumSchematicImageStorageEntry, bn as AltiumSchematicNet, bo as AltiumSchematicNetGraph, bp as AltiumSchematicSheetLink, bq as AltiumSerializationMode, br as AltiumSerializationOptions, bs as AltiumSerializationResult, bt as AltiumSignalClassRecord, bu as AltiumTestPointSettings, bv as AltiumTextEncoding, bw as AltiumTextEncodingOverride, bx as AltiumThermalReliefSettings, by as AltiumTransform, bz as AltiumValidationIssue, bA as AltiumValidationOptions, bB as AltiumVector, bC as AltiumWorkspaceProjectReference, bD as DecodeAltiumSchematicImageOptions, bE as DecodedAltiumText, bF as DecompressAltiumEmbeddedModelOptions, bG as DetectAltiumFileOptions, bH as ParseAltiumBinaryPcbDocOptions, bI as ParseAltiumCompoundFileOptions, bJ as ParseAltiumFileOptions, bK as ParseAltiumSchDocOptions, bL as ParsedAltiumFile, bM as ParsedAltiumFileResult, bN as SerializableAltiumDocument, bO as altiumColorToRgb, bP as altiumPointsEqual, bQ as boardToComponentPoint, bR as clearPcbDocumentIndex, bS as componentToBoardPoint, bT as decodeAltiumSchematicBitmap, bU as decodeAltiumSchematicImagePayload, bV as decodeAltiumText, bW as decompressAltiumEmbeddedModel, bX as detectAltiumFile, bY as encodeAltiumText, bZ as encodeWindowsBitmapAsPng, b_ as expandAltiumBounds, b$ as formatAltiumMeasurement, c0 as formatAltiumSourceLocation, c1 as getAltiumBounds, c2 as getAltiumContourSignedArea, c3 as getAltiumContourWinding, c4 as getAltiumDocumentBytes, c5 as getAltiumRoundTripLevel, c6 as getCcwSweepDegrees, c7 as getDanglingPcbReferences, c8 as getPcbBoardGeometry, c9 as getPcbComponentBounds, ca as getPcbComponentByIndex, cb as getPcbComponents, cc as getPcbConnectivityGraph, cd as getPcbContour, ce as getPcbContourVertices, cf as getPcbDocumentIndex, cg as getPcbLayerStack, ch as getPcbNetByIndex, ci as getPcbNets, cj as getPcbPolygonByIndex, ck as getPcbRecordComponent, cl as getPcbRecordComponentIndex, cm as getPcbRecordNet, cn as getPcbRecordNetIndex, co as getPcbRecordPolygon, cp as getPcbRecordPolygonIndex, cq as getPcbRecordRule, cr as getPcbRecordRuleIndex, cs as getPcbRecordsForPolygon, ct as getPcbRecordsForRule, cu as getPcbRecordsOnNet, cv as getPcbRecordsOwnedByComponent, cw as getPcbReference, cx as getPcbRegionGeometry, cy as getPcbRegionSemanticKind, cz as getPcbRuleByIndex, cA as getSchematicDocumentIndex, cB as getSchematicNetGraph, cC as getSchematicRecordPoints, cD as getSchematicSheetLinks, cE as isAbsoluteAltiumPath, cF as isAltiumCompoundFile, cG as isAltiumRecord, cH as mergeAltiumBounds, cI as normalizeAltiumAngle, cJ as normalizeAltiumMeasurement, cK as parseAltiumAscii, cL as parseAltiumAsciiStream, cM as parseAltiumBinaryPcbDoc, cN as parseAltiumCompoundFile, cO as parseAltiumEmbeddedSchematicImages, cP as parseAltiumFile, cQ as parseAltiumIni, cR as parseAltiumIniLines, cS as parseAltiumMeasurement, cT as parseAltiumMeasurementToMils, cU as parseAltiumOutJob, cV as parseAltiumPrjPcb, cW as parseAltiumSchDoc, cX as parseAltiumWorkspace, cY as parseSchematicImageStorage, cZ as resolveAltiumProjectPath, c_ as serializeAltiumAsciiStream, c$ as serializeAltiumDocument, d0 as transformAltiumPoint, d1 as validateAltiumDocument } from './altium-serialization-Bnv5ycub.js'; /** Common, byte-serializable contract shared by every parsed root document. */ interface AltiumDocumentNode extends AltiumNode { getBytes(): Uint8Array; } type AltiumDocument = AltiumBinaryPcbDoc | AltiumCompoundFile | AltiumIniDocument | AltiumOutJob | AltiumPcbDoc | AltiumPrjPcb | AltiumSchDoc | AltiumWorkspace; declare function isAltiumDocument(value: unknown): value is AltiumDocument; interface AltiumTransformContext { depth: number; parent?: AltiumNode; } type AltiumNodeTransformer = (node: AltiumNode, context: AltiumTransformContext) => AltiumNode | null | undefined; interface CloneAltiumNodeOptions { preserveBinaryPayload?: boolean; preserveNodeIds?: boolean; preserveSourceLocations?: boolean; } interface AltiumRecordSearch { field?: string; kind?: string; layer?: string; owner?: number; value?: string | RegExp; } /** * Applies a post-order transformer. Returning `undefined` keeps a node, * returning `null` removes it, and returning another compatible node replaces * it. Container compatibility is checked before mutation. */ declare function transformAltiumTree(root: AltiumNode, transformer: AltiumNodeTransformer): AltiumNode | null; declare function cloneAltiumNode(node: T, options?: CloneAltiumNodeOptions): T; declare function searchAltiumRecords(root: AltiumNode, query?: AltiumRecordSearch): AltiumRecord[]; declare function isAltiumNode(value: unknown): value is AltiumNode; declare function isAltiumRecordNode(value: unknown): value is AltiumRecord; declare function isAltiumTextDocument(value: unknown): value is AltiumIniDocument | AltiumPcbDoc | AltiumSchDoc; interface AltiumPreservedEnum { known?: T; raw: number; } declare class AltiumBinaryReader { readonly bytes: Uint8Array; private readonly view; offset: number; constructor(bytes: Uint8Array, offset?: number); get remaining(): number; ensure(length: number): void; skip(length: number): void; uint8(): number; int8(): number; uint16(): number; int16(): number; uint32(): number; int32(): number; float32(): number; float64(): number; bigint64(): bigint; biguint64(): bigint; readBytes(length: number, copy?: boolean): Uint8Array; uint8LengthPrefixedBytes(maximumLength?: number): Uint8Array; uint16LengthPrefixedBytes(maximumLength?: number): Uint8Array; uint32LengthPrefixedBytes(maximumLength?: number): Uint8Array; pascalString(encoding?: "utf-8" | "windows-1252", maximumLength?: number): string; nullTerminatedString(encoding?: "utf-8" | "windows-1252", maximumLength?: number): string; guid(): string; fileTime(): Date | undefined; bit(byteOffset: number, bitIndex: number): boolean; preservedEnum(raw: number, values: Readonly>): AltiumPreservedEnum; private lengthPrefixedBytes; } declare class AltiumBinaryWriter { readonly maximumLength: number; private bytes; private view; private _length; constructor(initialCapacity?: number, maximumLength?: number); get length(): number; uint8(value: number): this; int8(value: number): this; uint16(value: number): this; int16(value: number): this; uint32(value: number): this; int32(value: number): this; float64(value: number): this; writeBytes(value: Uint8Array): this; uint32LengthPrefixedBytes(value: Uint8Array): this; pascalString(value: string, encoding?: "utf-8" | "windows-1252"): this; guid(value: string): this; toUint8Array(): Uint8Array; private ensure; } declare function boundedHexDump(bytes: Uint8Array, options?: { length?: number; offset?: number; }): string; type AltiumCapabilityLevel = "unsupported" | "detect" | "read" | "edit" | "write" | "exact-round-trip"; type AltiumFormatCapability = { ascii: readonly AltiumCapabilityLevel[]; binary: readonly AltiumCapabilityLevel[]; notes: string; testedVersions: readonly string[]; }; declare const altiumCompatibilityManifest: { readonly schemaVersion: 1; readonly packageStatus: "experimental"; readonly runtimes: { readonly browser: "Modern browsers with ES2022, TextDecoder, and Uint8Array"; readonly bun: "Bun 1.2 or newer"; readonly node: "Node.js 20 or newer"; }; readonly policies: { readonly altium365Metadata: "Preserved as unknown fields or streams where possible; no cloud API support."; readonly circuitMakerAndCircuitStudio: "Best-effort detection and parsing when their files use a tested Altium container."; readonly corruptedInput: "Strict mode throws typed errors; compatible and recovery modes may return diagnostics without discarding source text."; readonly deprecation: "Public APIs follow semver after 1.0. Before 1.0, breaking changes require a minor version and release notes."; readonly encryptedInput: "Encrypted and password-protected documents are detected only when recognizable and are not decrypted."; readonly experimentalCodecs: "Unverified binary codecs and semantic fields remain explicitly experimental until exercised by redistributable fixtures."; readonly legacyProtel: "Pre-Altium/Protel formats are out of scope unless a tested format is explicitly added to this manifest."; }; readonly formats: { pcbDocument: { ascii: ("detect" | "read" | "edit" | "write" | "exact-round-trip")[]; binary: ("detect" | "read" | "exact-round-trip")[]; notes: string; testedVersions: string[]; }; schematicDocument: { ascii: ("detect" | "read" | "edit" | "write" | "exact-round-trip")[]; binary: ("detect" | "read" | "exact-round-trip")[]; notes: string; testedVersions: string[]; }; pcbLibrary: { ascii: "detect"[]; binary: "detect"[]; notes: string; testedVersions: never[]; }; schematicLibrary: { ascii: "detect"[]; binary: "detect"[]; notes: string; testedVersions: never[]; }; integratedLibrary: { ascii: "unsupported"[]; binary: "detect"[]; notes: string; testedVersions: never[]; }; project: { ascii: ("detect" | "read" | "edit" | "write" | "exact-round-trip")[]; binary: "unsupported"[]; notes: string; testedVersions: string[]; }; outputJob: { ascii: ("detect" | "read" | "edit" | "write" | "exact-round-trip")[]; binary: "unsupported"[]; notes: string; testedVersions: string[]; }; workspace: { ascii: ("detect" | "read" | "edit" | "write" | "exact-round-trip")[]; binary: "unsupported"[]; notes: string; testedVersions: string[]; }; xml: { ascii: "detect"[]; binary: "unsupported"[]; notes: string; testedVersions: never[]; }; zip: { ascii: "unsupported"[]; binary: "detect"[]; notes: string; testedVersions: never[]; }; }; }; type AltiumCapabilityFormat = keyof typeof altiumCompatibilityManifest.formats; declare function getAltiumFormatCapability(format: AltiumCapabilityFormat): AltiumFormatCapability; declare function supportsAltiumOperation(format: AltiumCapabilityFormat, representation: "ascii" | "binary", operation: AltiumCapabilityLevel): boolean; interface AltiumPcbRecordChange { after?: string; afterIndex?: number; before?: string; beforeIndex?: number; nodeId: string; recordKind?: string; } interface AltiumPcbChangeSet { changes: AltiumPcbRecordChange[]; } interface AltiumPcbEditTransactionOptions { allowInvalid?: boolean; validationProfile?: AltiumValidationProfile; } interface AltiumPcbEditTransactionResult { changeSet: AltiumPcbChangeSet; document: AltiumPcbDoc; validation: AltiumValidationResult; } declare function renamePcbNet(document: AltiumPcbDoc, net: number | AltiumNetRecord, name: string): AltiumNetRecord; declare function reassignPcbRecordNet(document: AltiumPcbDoc, record: AltiumRecord, net: number | AltiumNetRecord | undefined): AltiumRecord; declare function reassignPcbRecordLayer(document: AltiumPcbDoc, record: AltiumRecord, layer: string): AltiumRecord; /** * Runs an edit against a deep text-document clone. The input remains unchanged * if the callback throws or validation rejects the draft. */ declare function runPcbEditTransaction(source: AltiumPcbDoc, edit: (draft: AltiumPcbDoc) => void, options?: AltiumPcbEditTransactionOptions): AltiumPcbEditTransactionResult; declare function diffAltiumPcbDocuments(before: AltiumPcbDoc, after: AltiumPcbDoc): AltiumPcbChangeSet; declare function invertAltiumPcbChangeSet(changeSet: AltiumPcbChangeSet): AltiumPcbChangeSet; declare function applyAltiumPcbChangeSet(document: AltiumPcbDoc, changeSet: AltiumPcbChangeSet): AltiumPcbDoc; declare class AltiumError extends Error { readonly code: string; constructor(message: string, code?: string, options?: ErrorOptions); } interface AltiumContextualErrorInit { cause?: unknown; excerpt?: string; fieldName?: string; location?: AltiumSourceLocation; recordKind?: string; streamPath?: string; } declare class AltiumSyntaxError extends AltiumError { readonly excerpt?: string; readonly fieldName?: string; readonly location?: AltiumSourceLocation; readonly recordKind?: string; constructor(message: string, init?: AltiumContextualErrorInit); } declare class AltiumFormatDetectionError extends AltiumError { constructor(message: string, options?: ErrorOptions); } declare class AltiumCorruptContainerError extends AltiumError { readonly byteOffset?: number; constructor(message: string, init?: { byteOffset?: number; cause?: unknown; }); } declare class AltiumUnsupportedVersionError extends AltiumError { constructor(message: string, options?: ErrorOptions); } declare class AltiumUnsupportedFeatureError extends AltiumError { constructor(message: string, options?: ErrorOptions); } declare class AltiumSerializationError extends AltiumError { constructor(message: string, options?: ErrorOptions); } declare class AltiumEditConflictError extends AltiumError { constructor(message: string, options?: ErrorOptions); } declare class AltiumTruncatedRecordError extends AltiumError { readonly byteOffset: number; constructor(message: string, byteOffset: number, options?: ErrorOptions); } /** * Replaces characters that cannot be represented inside an Altium ASCII * field with spaces. Valid Unicode and surrounding whitespace are preserved. */ declare function sanitizeAltiumFieldText(text: string): string; type AltiumBinaryPcbPrimitiveFamily = "Arcs6" | "BoardRegions" | "ComponentBodies6" | "Fills6" | "Pads6" | "Regions6" | "ShapeBasedRegions6" | "ShapeBasedComponentBodies6" | "Texts6" | "Tracks6" | "Vias6"; interface ParseAltiumBinaryPcbPrimitiveOptions { expectedRecordCount?: number; maximumRecordLength?: number; wideStrings?: ReadonlyMap; } /** * Parses the common type-byte + uint32-length framing used by Altium's binary * PCB primitive streams. The first implementation intentionally limits * semantic decoding to the verified primitive families while validating every * frame. */ declare function parseAltiumBinaryPcbPrimitiveStream(family: AltiumBinaryPcbPrimitiveFamily, bytes: Uint8Array, options?: ParseAltiumBinaryPcbPrimitiveOptions): AltiumRecord[]; declare function getAltiumPcbLayerName(layerId: number): string; declare function parseAltiumBinaryPcbWideStrings(bytes: Uint8Array, maximumStringLength?: number): Map; declare function parseAltiumBinaryPropertyRecord(payload: Uint8Array, fallbackRecordKind?: string, sourceLocation?: AltiumSourceLocation): AltiumRecord; declare function parseAltiumPcbDoc(source: string, options?: ParseAltiumOptions): AltiumPcbDoc; type NormalizedAltiumPcbLayerName = string; declare function normalizeAltiumPcbLayerName(layer: string): NormalizedAltiumPcbLayerName; declare function isKnownAltiumPcbLayerName(layer: string, stack?: AltiumPcbLayerStack): boolean; declare function isAltiumPcbCopperLayerName(layer: string, stack?: AltiumPcbLayerStack): boolean; declare function isAltiumPcbNoLayerSentinel(layer: string): boolean; declare class AltiumArcRecord extends AltiumRecord { readonly type = "arc-record"; constructor(init?: AltiumRecordInit); get center(): AltiumPoint | undefined; get radiusMils(): number | undefined; get widthMils(): number | undefined; get startAngle(): number; get endAngle(): number; get layer(): string | undefined; get netIndex(): number | undefined; get componentIndex(): number | undefined; get polygonIndex(): number | undefined; get isFullCircle(): boolean; } declare class AltiumComponentBodyRecord extends AltiumRecord { readonly type = "component-body-record"; constructor(init?: AltiumRecordInit); get componentIndex(): number | undefined; get bodyKind(): string | undefined; get identifier(): string | undefined; get modelId(): string | undefined; get modelEmbedded(): boolean | undefined; get modelPosition(): AltiumPoint | undefined; get modelRotation2d(): number; get modelRotation3d(): { x: number; y: number; z: number; }; get standoffHeightMils(): number | undefined; get overallHeightMils(): number | undefined; get opacity(): number | undefined; } declare class AltiumDifferentialPairRecord extends AltiumRecord { readonly type = "differential-pair-record"; constructor(init?: AltiumRecordInit); get name(): string | undefined; get positiveNet(): string | undefined; get negativeNet(): string | undefined; } declare class AltiumFromToRecord extends AltiumRecord { readonly type = "from-to-record"; get from(): string | undefined; get to(): string | undefined; get netIndex(): number | undefined; } declare class AltiumConnectionRecord extends AltiumRecord { readonly type = "connection-record"; get netIndex(): number | undefined; get from(): string | undefined; get to(): string | undefined; } declare class AltiumDimensionRecord extends AltiumRecord { readonly type = "dimension-record"; constructor(init?: AltiumRecordInit); get dimensionKind(): string | undefined; get start(): AltiumPoint | undefined; get end(): AltiumPoint | undefined; get dimensionLineAnchor(): AltiumPoint | undefined; get referencePoints(): AltiumPoint[]; get textPoints(): AltiumPoint[]; get unit(): string | undefined; get precision(): number | undefined; get prefix(): string | undefined; get suffix(): string | undefined; get lineWidthMils(): number | undefined; get textHeightMils(): number | undefined; } declare class AltiumCoordinateRecord extends AltiumRecord { readonly type = "coordinate-record"; get position(): AltiumPoint | undefined; } declare class AltiumEmbeddedBoardRecord extends AltiumRecord { readonly type = "embedded-board-record"; constructor(init?: AltiumRecordInit); get sourcePath(): string | undefined; get position(): AltiumPoint | undefined; get rotation(): number; get mirrored(): boolean | undefined; } declare class AltiumFillRecord extends AltiumRecord { readonly type = "fill-record"; constructor(init?: AltiumRecordInit); get start(): AltiumPoint | undefined; get end(): AltiumPoint | undefined; get bounds(): AltiumBounds | undefined; get rotation(): number; get layer(): string | undefined; get netIndex(): number | undefined; get componentIndex(): number | undefined; } declare class AltiumFileVersionInfoRecord extends AltiumRecord { readonly type = "file-version-info-record"; constructor(init?: AltiumRecordInit); get versions(): string[]; } declare class AltiumUniqueIdPrimitiveInformationRecord extends AltiumRecord { readonly type = "unique-id-primitive-information-record"; get primitiveIndex(): number | undefined; get primitiveObjectId(): string | undefined; get uniqueId(): string | undefined; } declare class AltiumOptionRecord extends AltiumRecord { readonly type: string; get optionFamily(): string | undefined; } declare class AltiumAdvancedPlacerOptionsRecord extends AltiumOptionRecord { readonly type = "advanced-placer-options-record"; } declare class AltiumDesignRuleCheckerOptionsRecord extends AltiumOptionRecord { readonly type = "design-rule-checker-options-record"; } declare class AltiumEngineeringChangeOrderOptionsRecord extends AltiumOptionRecord { readonly type = "engineering-change-order-options-record"; } declare class AltiumGerberOptionsRecord extends AltiumOptionRecord { readonly type = "gerber-options-record"; } declare class AltiumOutputOptionsRecord extends AltiumOptionRecord { readonly type = "output-options-record"; } declare class AltiumPinSwapOptionsRecord extends AltiumOptionRecord { readonly type = "pin-swap-options-record"; } declare class AltiumPrinterOptionsRecord extends AltiumOptionRecord { readonly type = "printer-options-record"; } declare class AltiumTestpointOptionsRecord extends AltiumOptionRecord { readonly type = "testpoint-options-record"; } type AltiumPadBehavior = "through-hole" | "smd" | "unknown"; declare class AltiumPadRecord extends AltiumRecord { readonly type = "pad-record"; constructor(init?: AltiumRecordInit); get name(): string | undefined; get componentIndex(): number | undefined; get netIndex(): number | undefined; get layer(): string | undefined; get position(): AltiumPoint | undefined; get size(): AltiumSize | undefined; get middleSize(): AltiumSize | undefined; get bottomSize(): AltiumSize | undefined; get holeSizeMils(): number | undefined; get holeWidthMils(): number | undefined; get shape(): string | undefined; get middleShape(): string | undefined; get bottomShape(): string | undefined; get holeType(): string | undefined; get rotation(): number; get holeRotation(): number; get plated(): boolean | undefined; get padMode(): number | undefined; get behavior(): AltiumPadBehavior; get pasteMaskExpansionMils(): number | undefined; get solderMaskExpansionMils(): number | undefined; get tentedTop(): boolean | undefined; get tentedBottom(): boolean | undefined; } declare class AltiumParameterRecord extends AltiumRecord { readonly type = "parameter-record"; constructor(init?: AltiumRecordInit); get name(): string | undefined; get value(): string | undefined; get primitiveIndex(): number | undefined; get imported(): boolean | undefined; } declare class AltiumRawLine extends AltiumLine { readonly type = "raw-line"; private _raw; constructor(init: { raw: string; terminator?: AltiumLineTerminator; } & AltiumNodeInit); get raw(): string; set raw(raw: string); getChildren(): AltiumNode[]; getString(): string; } declare class AltiumRoomRecord extends AltiumRecord { readonly type = "room-record"; constructor(init?: AltiumRecordInit); get name(): string | undefined; get start(): AltiumPoint | undefined; get end(): AltiumPoint | undefined; get bounds(): AltiumBounds | undefined; get ruleIndex(): number | undefined; } /** Maps a schematic pin to implementation terminals (footprint pads for PCBLIB). */ declare class AltiumSchMapDefinerRecord extends AltiumSchematicRecord { readonly type = "schematic-map-definer-record"; get interfaceDesignator(): string | undefined; get implementationCount(): number | undefined; /** Read a zero-based DESIMP entry, keeping alphanumeric pad names intact. */ getImplementationDesignator(index: number): string | undefined; } /** A reusable graphical definition in a schematic's ObjectDefinitions stream. */ declare class AltiumSchObjectDefinitionRecord extends AltiumSchematicRecord { readonly type = "schematic-object-definition-record"; get objectDefinitionId(): string | undefined; } declare class AltiumSmartUnionRecord extends AltiumRecord { readonly type = "smart-union-record"; constructor(init?: AltiumRecordInit); get start(): AltiumPoint | undefined; get end(): AltiumPoint | undefined; get bounds(): AltiumBounds | undefined; get unionType(): string | undefined; get unionIndex(): number | undefined; get rotation(): number; get mirrored(): boolean | undefined; } declare class AltiumTextRecord extends AltiumRecord { readonly type = "text-record"; constructor(init?: AltiumRecordInit); get text(): string | undefined; get position(): AltiumPoint | undefined; get layer(): string | undefined; get heightMils(): number | undefined; get strokeWidthMils(): number | undefined; get rotation(): number; get mirrored(): boolean | undefined; get inverted(): boolean | undefined; get justification(): string | undefined; get fontName(): string | undefined; get usesTrueTypeFont(): boolean | undefined; get textBoxSize(): AltiumSize | undefined; get componentIndex(): number | undefined; get isDesignator(): boolean; get isComment(): boolean; } declare class AltiumTrackRecord extends AltiumRecord { readonly type = "track-record"; constructor(init?: AltiumRecordInit); get start(): AltiumPoint | undefined; get end(): AltiumPoint | undefined; get widthMils(): number | undefined; get layer(): string | undefined; get netIndex(): number | undefined; get componentIndex(): number | undefined; get polygonIndex(): number | undefined; get unionIndex(): number | undefined; get uniqueId(): string | undefined; get keepout(): boolean | undefined; get polygonOutline(): boolean | undefined; get userRouted(): boolean | undefined; get isZeroLength(): boolean; } declare class AltiumUnknownRecord extends AltiumRecord { readonly type = "unknown-record"; constructor(init?: AltiumRecordInit); } type AltiumViaKind = "through" | "blind-buried" | "unknown"; declare class AltiumViaRecord extends AltiumRecord { readonly type = "via-record"; constructor(init?: AltiumRecordInit); get position(): AltiumPoint | undefined; get diameterMils(): number | undefined; get holeSizeMils(): number | undefined; get startLayer(): string | undefined; get endLayer(): string | undefined; get netIndex(): number | undefined; get kind(): AltiumViaKind; get tentedTop(): boolean | undefined; get tentedBottom(): boolean | undefined; } interface ResolveSchematicParameterReferenceInput { /** Current date text used for Altium's built-in `=CurrentDate` reference. */ currentDate?: string; /** Current time text used for Altium's built-in `=CurrentTime` reference. */ currentTime?: string; document: AltiumSchDoc; /** Current schematic filename, including its extension. */ documentName?: string; /** Parsed project that supplies user-defined project parameters. */ project?: AltiumPrjPcb; /** Current project filename, including its extension. */ projectName?: string; /** Record containing the reference, used to resolve component parameters. */ record?: AltiumRecord; reference: string; } /** * Resolves an Altium `=ParameterName` reference against document-level * schematic parameters. */ declare function resolveSchematicParameterReference(document: AltiumSchDoc, reference: string): string | undefined; declare function resolveSchematicParameterReferenceWithContext({ currentDate, currentTime, document, documentName, project, projectName, record, reference, }: ResolveSchematicParameterReferenceInput): string | undefined; /** * Encodes the supported subset of an ASCII PCB document into Altium's native * OLE/CFB PcbDoc container. Unsupported records and primitive fields throw * rather than producing a lossy document. */ declare function serializeAltiumPcbDocToBinary(document: string | AltiumPcbDoc): Uint8Array; type AltiumSchematicEmbeddedImageInput = { compressedBytes: Uint8Array; name: string; }; type SerializeAltiumSchDocToBinaryOptions = { embeddedImages?: readonly AltiumSchematicEmbeddedImageInput[]; /** RECORD=129 definitions and owned primitives, without a stream header. OwnerIndex is local to this array. */ objectDefinitionRecords?: readonly string[]; }; /** Encodes an ASCII schematic into Altium's native OLE/CFB SchDoc container. */ declare function serializeAltiumSchDocToBinary(document: string | AltiumSchDoc, options?: SerializeAltiumSchDocToBinaryOptions): Uint8Array; declare function isPcbSolderMaskLayer(layer: string | undefined): boolean; interface SvgPoint { x: number; y: number; } interface SvgBounds { minX: number; minY: number; maxX: number; maxY: number; } interface AltiumSvgRenderOptions { backgroundColor?: string; height?: number; margin?: number; showComponentOrigins?: boolean; showHidden?: boolean; showHoles?: boolean; showText?: boolean; title?: string; width?: number; } /** * A crop rectangle expressed in Altium board coordinates. `x` and `y` locate * the lower-left corner; all values use the document's normalized board unit. */ interface AltiumPcbViewBox { height: number; width: number; x: number; y: number; } interface AltiumPcbSvgOptions extends AltiumSvgRenderOptions { componentIndices?: number[]; /** * Fit the viewport to every rendered primitive, including records parked * outside the board outline. Defaults to fitting the physical board. */ fitToContent?: boolean; /** * Active PCB layer. Altium draws this at its Current Layer priority; static * SVG rendering defaults to Top Layer. */ currentLayer?: string; /** * Layer names from front to back. This replaces Altium's default grouped * drawing order; the first layer renders on top. */ layerDrawingOrder?: string[]; layers?: string[]; netIndices?: number[]; showBoardCutouts?: boolean; showBoardOutline?: boolean; viewBox?: AltiumPcbViewBox; } /** * A crop rectangle expressed in Altium schematic coordinates. `x` and `y` * locate the lower-left corner; all values use schematic document units. */ interface AltiumSchematicViewBox { height: number; width: number; x: number; y: number; } interface AltiumSheetSvgOptions extends AltiumSvgRenderOptions { /** Current date text used for Altium's built-in `=CurrentDate` reference. */ currentDate?: string; /** Current time text used for Altium's built-in `=CurrentTime` reference. */ currentTime?: string; /** Current schematic filename, including its extension. */ documentName?: string; /** Parsed project that supplies user-defined project parameters. */ project?: AltiumPrjPcb; /** Current project filename, including its extension. */ projectName?: string; showBorder?: boolean; /** * Region to render and clip. Defaults to the declared schematic paper, * which intentionally hides off-sheet records. */ viewBox?: AltiumSchematicViewBox; } interface SvgViewport { bounds: SvgBounds; height: number; margin: number; outputHeight: number; outputWidth: number; toX(x: number): number; toY(y: number): number; width: number; } declare function serializeAltiumPcbLayerToSvg(document: AltiumPcbDocument, layer: string, options?: Omit): string; declare function serializeAltiumPcbToSvg(document: AltiumPcbDocument, options?: AltiumPcbSvgOptions): string; declare function serializeAltiumSheetToSvg(source: AltiumPcbDoc | AltiumSchDoc | AltiumLine[], options?: AltiumSheetSvgOptions): string; /** Resource limits applied while converting an EMF payload to SVG. */ interface SerializeWindowsEnhancedMetafileToSvgOptions { /** Maximum decoded bitmap allocation in bytes. Defaults to 32 MiB. */ maximumBitmapSize?: number; /** Maximum accepted EMF input size in bytes. Defaults to 64 MiB. */ maximumInputSize?: number; /** Maximum number of simultaneously registered GDI objects. */ maximumObjectCount?: number; /** Maximum generated SVG length in UTF-16 code units. */ maximumOutputLength?: number; /** Maximum total number of points read from vector records. */ maximumPointCount?: number; /** Maximum number of EMF records processed. */ maximumRecordCount?: number; /** Maximum total number of text characters rendered. */ maximumTextLength?: number; } /** * Renders the GDI subset used by Altium clipboard EMFs as a self-contained SVG. * Invalid or unsupported metafiles return `undefined`, allowing callers to use * the bitmap preview stored alongside the metafile. */ declare function serializeWindowsEnhancedMetafileToSvg(bytes: Uint8Array, options?: SerializeWindowsEnhancedMetafileToSvgOptions): string | undefined; /** * Converts a supported Windows Enhanced Metafile into an SVG data URL. * Returns `undefined` when the payload is invalid or uses unsupported records. */ declare function serializeWindowsEnhancedMetafileToDataUrl(bytes: Uint8Array, options?: SerializeWindowsEnhancedMetafileToSvgOptions): string | undefined; export { AltiumAdvancedPlacerOptionsRecord, AltiumArcRecord, AltiumBinaryPcbDoc, type AltiumBinaryPcbPrimitiveFamily, AltiumBinaryReader, AltiumBinaryWriter, AltiumBounds, type AltiumCapabilityFormat, type AltiumCapabilityLevel, AltiumComponentBodyRecord, AltiumCompoundFile, AltiumConnectionRecord, type AltiumContextualErrorInit, AltiumCoordinateRecord, AltiumCorruptContainerError, AltiumDesignRuleCheckerOptionsRecord, AltiumDifferentialPairRecord, AltiumDimensionRecord, type AltiumDocument, type AltiumDocumentNode, AltiumEditConflictError, AltiumEmbeddedBoardRecord, AltiumEngineeringChangeOrderOptionsRecord, AltiumError, AltiumFileVersionInfoRecord, AltiumFillRecord, type AltiumFormatCapability, AltiumFormatDetectionError, AltiumFromToRecord, AltiumGerberOptionsRecord, AltiumIniDocument, AltiumLine, AltiumLineTerminator, AltiumNetRecord, AltiumNode, AltiumNodeInit, type AltiumNodeTransformer, AltiumOptionRecord, AltiumOutJob, AltiumOutputOptionsRecord, type AltiumPadBehavior, AltiumPadRecord, AltiumParameterRecord, type AltiumPcbChangeSet, AltiumPcbDoc, AltiumPcbDocument, type AltiumPcbEditTransactionOptions, type AltiumPcbEditTransactionResult, AltiumPcbLayerStack, type AltiumPcbRecordChange, type AltiumPcbSvgOptions, type AltiumPcbViewBox, AltiumPinSwapOptionsRecord, AltiumPoint, type AltiumPreservedEnum, AltiumPrinterOptionsRecord, AltiumPrjPcb, AltiumRawLine, AltiumRecord, AltiumRecordInit, type AltiumRecordSearch, AltiumRoomRecord, AltiumSchDoc, AltiumSchMapDefinerRecord, AltiumSchObjectDefinitionRecord, type AltiumSchematicEmbeddedImageInput, AltiumSchematicRecord, type AltiumSchematicViewBox, AltiumSerializationError, type AltiumSheetSvgOptions, AltiumSize, AltiumSmartUnionRecord, AltiumSourceLocation, type AltiumSvgRenderOptions, AltiumSyntaxError, AltiumTestpointOptionsRecord, AltiumTextRecord, AltiumTrackRecord, type AltiumTransformContext, AltiumTruncatedRecordError, AltiumUniqueIdPrimitiveInformationRecord, AltiumUnknownRecord, AltiumUnsupportedFeatureError, AltiumUnsupportedVersionError, AltiumValidationProfile, AltiumValidationResult, type AltiumViaKind, AltiumViaRecord, AltiumWorkspace, type CloneAltiumNodeOptions, type NormalizedAltiumPcbLayerName, type ParseAltiumBinaryPcbPrimitiveOptions, ParseAltiumOptions, type ResolveSchematicParameterReferenceInput, type SerializeAltiumSchDocToBinaryOptions, type SerializeWindowsEnhancedMetafileToSvgOptions, type SvgBounds, type SvgPoint, type SvgViewport, altiumCompatibilityManifest, applyAltiumPcbChangeSet, boundedHexDump, cloneAltiumNode, diffAltiumPcbDocuments, getAltiumFormatCapability, getAltiumPcbLayerName, invertAltiumPcbChangeSet, isAltiumDocument, isAltiumNode, isAltiumPcbCopperLayerName, isAltiumPcbNoLayerSentinel, isAltiumRecordNode, isAltiumTextDocument, isKnownAltiumPcbLayerName, isPcbSolderMaskLayer, normalizeAltiumPcbLayerName, parseAltiumBinaryPcbPrimitiveStream, parseAltiumBinaryPcbWideStrings, parseAltiumBinaryPropertyRecord, parseAltiumPcbDoc, reassignPcbRecordLayer, reassignPcbRecordNet, renamePcbNet, resolveSchematicParameterReference, resolveSchematicParameterReferenceWithContext, runPcbEditTransaction, sanitizeAltiumFieldText, searchAltiumRecords, serializeAltiumPcbDocToBinary, serializeAltiumPcbLayerToSvg, serializeAltiumPcbToSvg, serializeAltiumSchDocToBinary, serializeAltiumSheetToSvg, serializeWindowsEnhancedMetafileToDataUrl, serializeWindowsEnhancedMetafileToSvg, supportsAltiumOperation, transformAltiumTree };