interface AltiumSourceLocation { byteOffset?: number; column?: number; endColumn?: number; endLine?: number; endOffset?: number; fieldIndex?: number; line?: number; recordIndex?: number; startOffset?: number; streamPath?: string; } declare function formatAltiumSourceLocation(location: AltiumSourceLocation | undefined): string | undefined; interface AltiumNodeInit { nodeId?: string; sourceLocation?: AltiumSourceLocation; } type AltiumNodeVisitor = (node: AltiumNode, context: { depth: number; parent?: AltiumNode; }) => unknown; declare abstract class AltiumNode { abstract readonly type: string; private _nodeId; private readonly hasExplicitNodeId; private _sourceLocation?; private _dirty; private _parent?; private _revision; protected constructor(init?: AltiumNodeInit); get document(): AltiumNode; get nodeId(): string; get isDirty(): boolean; get parent(): AltiumNode | undefined; get revision(): number; get sourceLocation(): AltiumSourceLocation | undefined; abstract getChildren(): AltiumNode[]; abstract getString(): string; setParent(parent: AltiumNode | undefined): this; setSourceLocation(location: AltiumSourceLocation | undefined): this; protected adoptChildren(children: readonly AltiumNode[]): void; markDirty(): void; clearDirty(recursive?: boolean): void; walk(includeSelf?: boolean): Generator; visit(visitor: AltiumNodeVisitor): void; findAll(predicate: (node: AltiumNode) => boolean, includeSelf?: boolean): AltiumNode[]; deepEquals(other: AltiumNode): boolean; getStructuralHash(): string; toJSON(): Record; } type AltiumCompoundEntryType = "storage" | "stream" | "root"; interface AltiumCompoundFileHeader { byteOrder: number; directorySectorCount: number; fatSectorCount: number; majorVersion: number; miniFatSectorCount: number; miniSectorSize: number; miniStreamCutoffSize: number; minorVersion: number; sectorSize: number; } interface AltiumCompoundEntryMetadata { childId: number; clsid: string; color: number; creationTime: bigint; id: number; leftSiblingId: number; modifiedTime: bigint; name: string; rightSiblingId: number; size: number; startSector: number; stateBits: number; type: AltiumCompoundEntryType; } declare abstract class AltiumCompoundEntry extends AltiumNode { abstract readonly type: string; readonly metadata: AltiumCompoundEntryMetadata; readonly path: string[]; protected constructor(metadata: AltiumCompoundEntryMetadata, path: string[]); get name(): string; get pathString(): string; getString(): string; } declare class AltiumCompoundStream extends AltiumCompoundEntry { readonly type = "compound-stream"; private readonly contentSource; private loadedContent?; constructor(metadata: AltiumCompoundEntryMetadata, path: string[], content: Uint8Array | (() => Uint8Array)); get content(): Uint8Array; get isContentLoaded(): boolean; replaceContent(content: Uint8Array): void; getChildren(): AltiumNode[]; } declare class AltiumCompoundStorage extends AltiumCompoundEntry { readonly type = "compound-storage"; readonly entries: AltiumCompoundEntry[]; constructor(metadata: AltiumCompoundEntryMetadata, path: string[], entries: AltiumCompoundEntry[]); get storages(): AltiumCompoundStorage[]; get streams(): AltiumCompoundStream[]; getChildren(): AltiumNode[]; } declare class AltiumCompoundFile extends AltiumNode { readonly type = "compound-file"; readonly header: AltiumCompoundFileHeader; readonly originalBytes: Uint8Array; readonly root: AltiumCompoundStorage; constructor(init: { header: AltiumCompoundFileHeader; originalBytes: Uint8Array; root: AltiumCompoundStorage; }); get entries(): AltiumCompoundEntry[]; get streams(): AltiumCompoundStream[]; getStream(path: string | string[]): AltiumCompoundStream | undefined; getBytes(): Uint8Array; getChildren(): AltiumNode[]; getString(): string; } type AltiumLineTerminator = "" | "\n" | "\r" | "\r\n"; interface AltiumLineInit extends AltiumNodeInit { terminator?: AltiumLineTerminator; } declare abstract class AltiumLine extends AltiumNode { abstract readonly type: string; terminator: AltiumLineTerminator; constructor(init?: AltiumLineInit); } declare class AltiumField extends AltiumNode { readonly type = "field"; private _key; private _value; constructor(init: { key: string; value?: string; } & AltiumNodeInit); get key(): string; set key(key: string); get value(): string; set value(value: string); getChildren(): AltiumNode[]; getString(): string; toJSON(): Record; } declare class AltiumRawField extends AltiumNode { readonly type = "raw-field"; private _raw; constructor(init: { raw: string; } & AltiumNodeInit); get raw(): string; set raw(raw: string); getChildren(): AltiumNode[]; getString(): string; toJSON(): Record; } interface AltiumPoint { x: number; y: number; } interface AltiumVector { x: number; y: number; } interface AltiumSize { height: number; width: number; } interface AltiumBounds { maxX: number; maxY: number; minX: number; minY: number; } interface AltiumTransform { mirrorX?: boolean; mirrorY?: boolean; origin?: AltiumPoint; rotation?: number; translation?: AltiumVector; } type AltiumContourWinding = "clockwise" | "counterclockwise" | "degenerate"; declare function normalizeAltiumAngle(angle: number): number; declare function getCcwSweepDegrees(startAngleDegrees: number, endAngleDegrees: number): number; declare function altiumPointsEqual(left: AltiumPoint, right: AltiumPoint, tolerance?: number): boolean; declare function getAltiumBounds(points: readonly AltiumPoint[]): AltiumBounds | undefined; declare function mergeAltiumBounds(left: AltiumBounds | undefined, right: AltiumBounds | undefined): AltiumBounds | undefined; declare function expandAltiumBounds(bounds: AltiumBounds, distance: number): AltiumBounds; declare function getAltiumContourSignedArea(points: readonly AltiumPoint[]): number; declare function getAltiumContourWinding(points: readonly AltiumPoint[]): AltiumContourWinding; declare function transformAltiumPoint(point: AltiumPoint, transform: AltiumTransform): AltiumPoint; declare function boardToComponentPoint(point: AltiumPoint, component: { mirrored?: boolean; position: AltiumPoint; rotation?: number; }): AltiumPoint; declare function componentToBoardPoint(point: AltiumPoint, component: { mirrored?: boolean; position: AltiumPoint; rotation?: number; }): AltiumPoint; declare function altiumColorToRgb(value: number): { blue: number; green: number; red: number; }; type AltiumMeasurementUnit = "cm" | "in" | "inch" | "inches" | "mil" | "mils" | "mm" | string; interface AltiumMeasurementInit { raw?: string; unit?: AltiumMeasurementUnit; value: number; } type AltiumMeasurementInput = AltiumMeasurement | AltiumMeasurementInit | number | string; declare class AltiumMeasurement { #private; readonly unit?: AltiumMeasurementUnit; readonly value: number; constructor(init: AltiumMeasurementInit); static parse(raw: string): AltiumMeasurement | undefined; get normalizedUnit(): string | undefined; get raw(): string; toMils(): number; toMillimeters(): number; to(unit: "mil" | "mm" | "cm" | "in"): number; equals(other: AltiumMeasurement, toleranceMils?: number): boolean; toString(): string; toJSON(): AltiumMeasurementInit; } declare function parseAltiumMeasurement(raw: string | undefined): AltiumMeasurement | undefined; declare function parseAltiumMeasurementToMils(raw: string | undefined): number | undefined; declare function normalizeAltiumMeasurement(input: AltiumMeasurementInput, defaultUnit?: AltiumMeasurementUnit): AltiumMeasurement; declare function formatAltiumMeasurement(input: AltiumMeasurementInput, defaultUnit?: AltiumMeasurementUnit): string; type AltiumRecordItem = AltiumField | AltiumRawField; interface AltiumMeasurementParts { value: number; unit?: string; } interface AltiumRecordInit extends AltiumLineInit { items?: AltiumRecordItem[]; originalBinaryPayload?: Uint8Array; terminator?: AltiumLineTerminator; } /** Shared syntax contract for records decoded from either text or binary. */ interface AltiumRecordNode { readonly originalBinaryPayload?: Uint8Array; readonly recordKind?: string; readonly type: string; getString(): string; } declare class AltiumRecord extends AltiumLine implements AltiumRecordNode { readonly type: string; items: AltiumRecordItem[]; private _originalBinaryPayload?; constructor(init?: AltiumRecordInit); /** * Returns a defensive copy of the binary payload that produced this record. * The payload is syntax-level evidence and is never regenerated from the * semantic fields. */ get originalBinaryPayload(): Uint8Array | undefined; setOriginalBinaryPayload(payload: Uint8Array | undefined): this; getAltiumMeasurement(key: string): AltiumMeasurement | undefined; get recordKind(): string | undefined; get fields(): AltiumField[]; get(key: string): string | undefined; getCaseInsensitive(key: string): string | undefined; getDecoded(key: string): string | undefined; getAll(key: string): string[]; getFirstField(key: string): AltiumField | undefined; getLastField(key: string): AltiumField | undefined; getAllFields(key: string): AltiumField[]; getBoolean(key: string): boolean | undefined; getNumber(key: string): number | undefined; getMeasurement(key: string): AltiumMeasurementParts | undefined; set(key: string, value: string): this; setMeasurement(key: string, value: AltiumMeasurementInput, defaultUnit?: AltiumMeasurementUnit): this; setPoint(keys: { x: string; y: string; }, point: AltiumPoint, unit?: AltiumMeasurementUnit): this; setSize(keys: { height: string; width: string; }, size: AltiumSize, unit?: AltiumMeasurementUnit): this; setAngle(key: string, angle: number): this; insertField(key: string, value: string, options?: { afterKey?: string; beforeKey?: string; index?: number; }): AltiumField; replaceFieldOccurrence(key: string, occurrence: number, value: string): boolean; delete(key: string): number; getChildren(): AltiumNode[]; getString(): string; toJSON(): Record; } declare class AltiumModelRecord extends AltiumRecord { readonly type = "model-record"; constructor(init?: AltiumRecordInit); get id(): string | undefined; get name(): string | undefined; get checksum(): string | undefined; get embedded(): boolean | undefined; get rotation(): { x: number; y: number; z: number; }; get standoffRaw(): number | undefined; } interface DecompressAltiumEmbeddedModelOptions { maximumOutputSize?: number; } declare class AltiumEmbeddedModel extends AltiumNode { readonly type = "embedded-model"; readonly index: number; readonly record: AltiumModelRecord; readonly stream: AltiumCompoundStream; constructor(init: { index: number; record: AltiumModelRecord; stream: AltiumCompoundStream; }); get compressedSize(): number; get isCompressedDataLoaded(): boolean; getCompressedBytes(): Uint8Array; getDecompressedBytes(options?: DecompressAltiumEmbeddedModelOptions): Promise; getChildren(): AltiumNode[]; getString(): string; } declare function decompressAltiumEmbeddedModel(compressedBytes: Uint8Array, options?: DecompressAltiumEmbeddedModelOptions): Promise; type AltiumTextEncoding = "utf-8" | "utf-8-bom" | "utf-16le" | "utf-16le-bom" | "utf-16be" | "utf-16be-bom" | "windows-1252"; type AltiumTextEncodingOverride = "utf-8" | "utf-16le" | "utf-16be" | "windows-1252"; interface DecodedAltiumText { encoding: AltiumTextEncoding; text: string; } declare function decodeAltiumText(bytes: Uint8Array, encoding?: AltiumTextEncodingOverride): DecodedAltiumText; declare function encodeAltiumText(text: string, encoding?: AltiumTextEncoding): Uint8Array; type AltiumPcbContourVertexKind = "arc" | "line" | "unknown"; interface AltiumPcbContourArc { center: AltiumPoint; endAngleDegrees: number; radiusMils: number; startAngleDegrees: number; } interface AltiumPcbContourVertex { arc?: AltiumPcbContourArc; index: number; kind: AltiumPcbContourVertexKind; position: AltiumPoint; rawKind?: number; } interface AltiumPcbContour { bounds?: AltiumBounds; isExplicitlyClosed: boolean; points: AltiumPoint[]; vertices: AltiumPcbContourVertex[]; winding: AltiumContourWinding; } interface AltiumPcbRegionGeometry { holes: AltiumPcbContour[]; outline: AltiumPcbContour; record: AltiumRecord; } interface AltiumPcbBoardGeometry { cutouts: AltiumPcbRegionGeometry[]; layerStackRegions: AltiumPcbRegionGeometry[]; outline: AltiumPcbContour; polygonCutouts: AltiumPcbRegionGeometry[]; } declare function getPcbContour(record: AltiumRecord): AltiumPcbContour; declare function getPcbContourVertices(record: AltiumRecord): AltiumPcbContourVertex[]; declare function getPcbRegionGeometry(record: AltiumRecord): AltiumPcbRegionGeometry; declare function getPcbBoardGeometry(document: AltiumPcbDocument): AltiumPcbBoardGeometry; declare function getPcbRegionSemanticKind(record: AltiumRecord): string | undefined; type AltiumPcbSide = "top" | "bottom" | "unknown"; declare class AltiumComponentRecord extends AltiumRecord { readonly type = "component-record"; constructor(init?: AltiumRecordInit); get id(): number | undefined; get designator(): string | undefined; get comment(): string | undefined; get footprint(): string | undefined; get footprintLibrary(): string | undefined; get sourceLibrary(): string | undefined; get sourceLibraryReference(): string | undefined; get sourceUniqueId(): string | undefined; get sourceHierarchicalPath(): string | undefined; get position(): AltiumPoint | undefined; get rotation(): number; get side(): AltiumPcbSide; get mirrored(): boolean; get locked(): boolean | undefined; get selected(): boolean | undefined; get unionIndex(): number | undefined; get channelOffset(): number | undefined; get heightMils(): number | undefined; getOwnedPrimitives(document: AltiumPcbDoc): AltiumRecord[]; getBounds(document: AltiumPcbDoc, layers?: string[]): AltiumBounds | undefined; } declare class AltiumNetRecord extends AltiumRecord { readonly type = "net-record"; constructor(init?: AltiumRecordInit); get id(): number | undefined; get name(): string | undefined; get visible(): boolean | undefined; get color(): number | undefined; } declare class AltiumPolygonRecord extends AltiumRecord { readonly type = "polygon-record"; constructor(init?: AltiumRecordInit); get id(): number | undefined; get name(): string | undefined; get layer(): string | undefined; get netIndex(): number | undefined; get polygonType(): string | undefined; get pourOverStyle(): string | undefined; get hatchStyle(): string | undefined; get pourIndex(): number | undefined; get priority(): number | undefined; get shelved(): boolean | undefined; get removeDeadCopper(): boolean | undefined; get trackWidthMils(): number | undefined; get gridSizeMils(): number | undefined; } type AltiumRuleCategory = "clearance" | "differential-pair" | "length" | "manufacturing" | "mask" | "plane-connect" | "polygon-connect" | "routing-layer" | "routing-width" | "unknown" | "via-style"; interface AltiumRuleMeasurementRange { maximumMils?: number; minimumMils?: number; preferredMils?: number; } interface AltiumRuleNumericRange { maximum?: number; minimum?: number; preferred?: number; } interface AltiumRuleLayerConstraint extends AltiumRuleMeasurementRange { gap?: AltiumRuleMeasurementRange; layer: string; } interface AltiumRoutingLayerSetting { enabled?: boolean; layer: string; mode?: string; } interface AltiumThermalReliefSettings { airGapMils?: number; angle?: string; conductorWidthMils?: number; connectionStyle?: string; expansionMils?: number; spokeCount?: number; } interface AltiumTestPointSettings { allowBottom?: boolean; allowTop?: boolean; gridMils?: number; holeSize?: AltiumRuleMeasurementRange; padSize?: AltiumRuleMeasurementRange; underComponent?: boolean; useGrid?: boolean; } declare class AltiumRuleRecord extends AltiumRecord { readonly type: string; constructor(init?: AltiumRecordInit); get name(): string | undefined; get ruleKind(): string | undefined; get priority(): number | undefined; get enabled(): boolean | undefined; get scope1Expression(): string | undefined; get scope2Expression(): string | undefined; get comment(): string | undefined; get uniqueId(): string | undefined; get category(): AltiumRuleCategory; get clearanceMils(): number | undefined; get verticalClearanceMils(): number | undefined; get widthConstraint(): AltiumRuleMeasurementRange | undefined; get layerConstraints(): AltiumRuleLayerConstraint[]; get viaDiameterConstraint(): AltiumRuleMeasurementRange | undefined; get viaHoleConstraint(): AltiumRuleMeasurementRange | undefined; get viaStyle(): string | undefined; get routingLayers(): AltiumRoutingLayerSetting[]; get differentialPairGap(): AltiumRuleMeasurementRange | undefined; get maximumUncoupledLengthMils(): number | undefined; get matchedLengthToleranceMils(): number | undefined; get impedanceConstraint(): AltiumRuleNumericRange | undefined; get thermalRelief(): AltiumThermalReliefSettings | undefined; get maskExpansionMils(): number | undefined; get heightConstraint(): AltiumRuleMeasurementRange | undefined; get holeSizeConstraint(): AltiumRuleMeasurementRange | undefined; get minimumSolderMaskSliverMils(): number | undefined; get minimumSilkClearanceMils(): number | undefined; get testPointSettings(): AltiumTestPointSettings | undefined; private get normalizedRuleKind(); } declare class AltiumDxpRuleRecord extends AltiumRuleRecord { readonly type = "dxp-rule-record"; } declare const ALTIUM_NO_INDEX = 65535; type AltiumPcbReferenceField = "COMPONENT" | "NET" | "POLYGON" | "RULE"; interface AltiumPcbDanglingReference { field: AltiumPcbReferenceField; index: number; record: AltiumRecord; } interface AltiumPcbResolvedReference { field: AltiumPcbReferenceField; index: number; record: AltiumRecord; target?: T; } declare class AltiumPcbDocumentIndex { readonly document: AltiumPcbDocument; readonly byComponent: Map; readonly byKind: Map; readonly byLayer: Map; readonly byNet: Map; readonly byPolygon: Map; readonly byRule: Map; readonly components: AltiumComponentRecord[]; readonly duplicateUniqueIds: Map; readonly nets: AltiumNetRecord[]; readonly polygons: AltiumPolygonRecord[]; readonly rules: AltiumRuleRecord[]; readonly uniqueIds: Map; private readonly componentTargets; private readonly netTargets; private readonly polygonTargets; private readonly ruleTargets; constructor(document: AltiumPcbDocument); getComponent(index: number): AltiumComponentRecord | undefined; getNet(index: number): AltiumNetRecord | undefined; getPolygon(index: number): AltiumPolygonRecord | undefined; getRule(index: number): AltiumRuleRecord | undefined; getRecordByUniqueId(uniqueId: string): AltiumRecord | undefined; getDanglingReferences(): AltiumPcbDanglingReference[]; } declare function getPcbDocumentIndex(document: AltiumPcbDocument): AltiumPcbDocumentIndex; declare function clearPcbDocumentIndex(document: AltiumPcbDocument): void; declare function getPcbComponents(document: AltiumPcbDocument): AltiumComponentRecord[]; declare function getPcbNets(document: AltiumPcbDocument): AltiumNetRecord[]; declare function getPcbComponentByIndex(document: AltiumPcbDocument, index: number): AltiumComponentRecord | undefined; declare function getPcbNetByIndex(document: AltiumPcbDocument, index: number): AltiumNetRecord | undefined; declare function getPcbPolygonByIndex(document: AltiumPcbDocument, index: number): AltiumPolygonRecord | undefined; declare function getPcbRuleByIndex(document: AltiumPcbDocument, index: number): AltiumRuleRecord | undefined; declare function getPcbRecordComponentIndex(document: AltiumPcbDocument, record: AltiumRecord): number | undefined; declare function getPcbRecordNetIndex(document: AltiumPcbDocument, record: AltiumRecord): number | undefined; declare function getPcbRecordPolygonIndex(document: AltiumPcbDocument, record: AltiumRecord): number | undefined; declare function getPcbRecordRuleIndex(document: AltiumPcbDocument, record: AltiumRecord): number | undefined; declare function getPcbRecordComponent(document: AltiumPcbDocument, record: AltiumRecord): AltiumComponentRecord | undefined; declare function getPcbRecordNet(document: AltiumPcbDocument, record: AltiumRecord): AltiumNetRecord | undefined; declare function getPcbRecordPolygon(document: AltiumPcbDocument, record: AltiumRecord): AltiumPolygonRecord | undefined; declare function getPcbRecordRule(document: AltiumPcbDocument, record: AltiumRecord): AltiumRuleRecord | undefined; declare function getPcbRecordsOwnedByComponent(document: AltiumPcbDocument, component: number | AltiumComponentRecord): AltiumRecord[]; declare function getPcbRecordsOnNet(document: AltiumPcbDocument, net: number | AltiumNetRecord): AltiumRecord[]; declare function getPcbRecordsForPolygon(document: AltiumPcbDocument, polygon: number | AltiumPolygonRecord): AltiumRecord[]; declare function getPcbRecordsForRule(document: AltiumPcbDocument, rule: number | AltiumRuleRecord): AltiumRecord[]; declare function getDanglingPcbReferences(document: AltiumPcbDocument): AltiumPcbDanglingReference[]; declare function getPcbReference(document: AltiumPcbDocument, record: AltiumRecord, field: AltiumPcbReferenceField): AltiumPcbResolvedReference | undefined; interface AltiumPcbLayerStackEntry { copperThickness?: AltiumMeasurement; dielectricConstant?: number; dielectricHeight?: AltiumMeasurement; dielectricMaterial?: string; dielectricType?: string; id?: string; index: number; isFlex?: boolean; layerId?: string; mechanicalEnabled?: boolean; name?: string; next?: string; previous?: string; source: "v8" | "v7" | "legacy"; usedByPrimitives?: boolean; } interface AltiumPcbLayerSubStack { id?: string; index: number; isFlex?: boolean; name?: string; service?: boolean; showBottomDielectric?: boolean; showTopDielectric?: boolean; source: "v9" | "v8"; type?: number; usedByPrimitives?: boolean; } interface AltiumPcbLayerPair { drillDrawing?: boolean; drillGuide?: boolean; highLayer?: string; index: number; lowLayer?: string; subStackIds: string[]; } interface AltiumPcbTraceImpedanceConfiguration { calculatedImpedanceOhms?: number; differentialPairGapMils?: number; differentialPairMaximumGapMils?: number; differentialPairMinimumGapMils?: number; enabled?: boolean; etchFactor?: number; impedanceErrorPercent?: number; index: number; layerId?: string; profileId?: string; propagationSpeed?: number; referenceBottomLayerId?: string; referenceTopLayerId?: string; subStackId?: string; traceGapLocked?: boolean; traceMaximumWidthMils?: number; traceMinimumWidthMils?: number; traceWidthLocked?: boolean; traceWidthMils?: number; } interface AltiumPcbImpedanceProfile { displayName?: string; id?: string; index: number; isDifferentialPair?: boolean; name?: string; targetImpedanceOhms?: number; traceConfigurations: AltiumPcbTraceImpedanceConfiguration[]; } interface AltiumPcbLayerStack { entries: AltiumPcbLayerStackEntry[]; id?: string; impedanceProfiles: AltiumPcbImpedanceProfile[]; isFlex?: boolean; layerPairs: AltiumPcbLayerPair[]; name?: string; style?: string; subStacks: AltiumPcbLayerSubStack[]; traceImpedanceConfigurations: AltiumPcbTraceImpedanceConfiguration[]; } declare function getPcbLayerStack(board: AltiumBoardRecord): AltiumPcbLayerStack; interface AltiumPcbGridSettings { dotGrid?: boolean; electricalGridEnabled?: boolean; electricalGridRangeMils?: number; largeVisibleGridMultiplier?: number; largeVisibleGridSize?: number; snapEnabled?: boolean; snapSizeMils?: number; visibleGridMultiplier?: number; visibleGridSize?: number; } declare class AltiumBoardRecord extends AltiumRecord { readonly type = "board-record"; constructor(init?: AltiumRecordInit); get fileName(): string | undefined; get version(): string | undefined; get date(): string | undefined; get time(): string | undefined; get displayUnit(): string | undefined; get origin(): AltiumPoint | undefined; get sheetOrigin(): AltiumPoint | undefined; get sheetSize(): AltiumSize | undefined; get uniqueId(): string | undefined; get grid(): AltiumPcbGridSettings; get outline(): AltiumPcbContour; get layerStack(): AltiumPcbLayerStack; } declare class AltiumClassRecord extends AltiumRecord { readonly type: string; constructor(init?: AltiumRecordInit); get name(): string | undefined; get classKind(): string | undefined; get superClass(): boolean | undefined; get uniqueId(): string | undefined; get members(): string[]; } declare class AltiumSignalClassRecord extends AltiumClassRecord { readonly type = "signal-class-record"; } declare class AltiumPcbDoc extends AltiumNode { readonly type = "pcb-document"; private _lines; private originalBytes?; private readonly originalSource?; private sourceEncoding?; constructor(init?: { lines?: AltiumLine[]; originalBytes?: Uint8Array; originalSource?: string; sourceEncoding?: AltiumTextEncoding; }); setOriginalBytes(bytes: Uint8Array, encoding: AltiumTextEncoding): this; getBytes(): Uint8Array; get lines(): AltiumLine[]; set lines(lines: AltiumLine[]); get records(): AltiumRecord[]; get board(): AltiumBoardRecord | undefined; get components(): AltiumComponentRecord[]; get nets(): AltiumNetRecord[]; get classes(): AltiumClassRecord[]; get index(): AltiumPcbDocumentIndex; get connectivity(): AltiumPcbConnectivityGraph; get boardGeometry(): AltiumPcbBoardGeometry; get polygons(): AltiumPolygonRecord[]; get rules(): AltiumRuleRecord[]; getComponentByIndex(index: number): AltiumComponentRecord | undefined; getNetByIndex(index: number): AltiumNetRecord | undefined; getPolygonByIndex(index: number): AltiumPolygonRecord | undefined; getRuleByIndex(index: number): AltiumRuleRecord | undefined; getComponentForRecord(record: AltiumRecord): AltiumComponentRecord | undefined; getNetForRecord(record: AltiumRecord): AltiumNetRecord | undefined; getPolygonForRecord(record: AltiumRecord): AltiumPolygonRecord | undefined; getRuleForRecord(record: AltiumRecord): AltiumRuleRecord | undefined; getRecordsOwnedByComponent(component: number | AltiumComponentRecord): AltiumRecord[]; getRecordsOnNet(net: number | AltiumNetRecord): AltiumRecord[]; getRecordsForPolygon(polygon: number | AltiumPolygonRecord): AltiumRecord[]; getRecordsForRule(rule: number | AltiumRuleRecord): AltiumRecord[]; getRecordsByLayer(layer: string): AltiumRecord[]; getComponentBounds(component: number | AltiumComponentRecord, layers?: string[]): AltiumBounds | undefined; getRecordByUniqueId(uniqueId: string): AltiumRecord | undefined; getRecordsByKind(kind: string): AltiumRecord[]; insertRecord(record: AltiumRecord, index?: number): this; removeRecord(record: AltiumRecord): boolean; allocateRecordId(kind: string, field?: string): number; getChildren(): AltiumNode[]; getString(): string; } /** * A PCB document that can supply semantic records to consumers such as the * SVG serializers, regardless of whether its source was ASCII or binary CFB. */ type AltiumPcbDocument = AltiumPcbDoc | AltiumBinaryPcbDoc; interface AltiumPcbConnectivityEdge { component?: AltiumComponentRecord; net: AltiumNetRecord; primitives: AltiumRecord[]; } declare class AltiumPcbConnectivityGraph { readonly document: AltiumPcbDocument; readonly edges: AltiumPcbConnectivityEdge[]; constructor(document: AltiumPcbDocument); getConnectedRecords(record: AltiumRecord): AltiumRecord[]; getNetsForComponent(component: number | AltiumComponentRecord): AltiumNetRecord[]; getComponentsForNet(net: number | AltiumNetRecord): AltiumComponentRecord[]; getConnectedComponents(component: number | AltiumComponentRecord): AltiumComponentRecord[]; } declare function getPcbConnectivityGraph(document: AltiumPcbDocument): AltiumPcbConnectivityGraph; declare function getPcbComponentBounds(document: AltiumPcbDocument, component: number | AltiumComponentRecord, requestedLayers?: string[]): AltiumBounds | undefined; declare class AltiumRegionRecord extends AltiumRecord { readonly type = "region-record"; constructor(init?: AltiumRecordInit); get layer(): string | undefined; get regionKind(): string | undefined; get componentIndex(): number | undefined; get netIndex(): number | undefined; get polygonIndex(): number | undefined; get holeCount(): number; get isGeneratedPour(): boolean; get isBoardCutout(): boolean; get isLayerStackRegion(): boolean; get isPolygonCutout(): boolean; get layerStackId(): string | undefined; get geometry(): AltiumPcbRegionGeometry; } interface AltiumPcbStreamSummary { dataSize?: number; declaredRecordCount?: number; decodedPrimitiveRecordCount: number; decodedPropertyRecordCount: number; family: string; hasData: boolean; hasHeader: boolean; } declare class AltiumBinaryPcbDoc extends AltiumNode { readonly type = "binary-pcb-document"; readonly compoundFile: AltiumCompoundFile; readonly embeddedModels: AltiumEmbeddedModel[]; readonly primitiveRecords: ReadonlyMap; readonly propertyRecords: ReadonlyMap; readonly streamSummaries: AltiumPcbStreamSummary[]; readonly wideStrings: ReadonlyMap; constructor(init: { compoundFile: AltiumCompoundFile; primitiveRecords: Map; propertyRecords: Map; streamSummaries: AltiumPcbStreamSummary[]; wideStrings?: ReadonlyMap; }); get records(): AltiumRecord[]; get board(): AltiumBoardRecord | undefined; get components(): AltiumComponentRecord[]; get componentBodies(): AltiumRecord[]; get legacyComponentBodies(): AltiumRecord[]; get nets(): AltiumNetRecord[]; get index(): AltiumPcbDocumentIndex; get connectivity(): AltiumPcbConnectivityGraph; get boardGeometry(): AltiumPcbBoardGeometry; get polygons(): AltiumPolygonRecord[]; get rules(): AltiumRuleRecord[]; getComponentByIndex(index: number): AltiumComponentRecord | undefined; getNetByIndex(index: number): AltiumNetRecord | undefined; getPolygonByIndex(index: number): AltiumPolygonRecord | undefined; getRuleByIndex(index: number): AltiumRuleRecord | undefined; getComponentForRecord(record: AltiumRecord): AltiumComponentRecord | undefined; getNetForRecord(record: AltiumRecord): AltiumNetRecord | undefined; getPolygonForRecord(record: AltiumRecord): AltiumPolygonRecord | undefined; getRuleForRecord(record: AltiumRecord): AltiumRuleRecord | undefined; getRecordsOwnedByComponent(component: number | AltiumComponentRecord): AltiumRecord[]; getRecordsOnNet(net: number | AltiumNetRecord): AltiumRecord[]; getRecordsForPolygon(polygon: number | AltiumPolygonRecord): AltiumRecord[]; getRecordsForRule(rule: number | AltiumRuleRecord): AltiumRecord[]; getRecordsByLayer(layer: string): AltiumRecord[]; getComponentBounds(component: number | AltiumComponentRecord, layers?: string[]): AltiumBounds | undefined; getRecordByUniqueId(uniqueId: string): AltiumRecord | undefined; get models(): AltiumModelRecord[]; getModelsById(id: string): AltiumModelRecord[]; getModelForComponentBody(body: AltiumRecord): AltiumModelRecord | undefined; getEmbeddedModelForComponentBody(body: AltiumRecord): AltiumEmbeddedModel | undefined; get tracks(): AltiumRecord[]; get arcs(): AltiumRecord[]; get vias(): AltiumRecord[]; get pads(): AltiumRecord[]; get fills(): AltiumRecord[]; get regions(): AltiumRegionRecord[]; get regionFills(): AltiumRegionRecord[]; get boardRegions(): AltiumRegionRecord[]; get texts(): AltiumRecord[]; getRecordsByKind(kind: string): AltiumRecord[]; getStreamSummary(family: string): AltiumPcbStreamSummary | undefined; getBytes(): Uint8Array; getChildren(): AltiumNode[]; getString(): string; } declare abstract class AltiumIniLine extends AltiumLine { abstract readonly type: string; } declare class AltiumIniSectionLine extends AltiumIniLine { readonly type = "ini-section-line"; private _name; readonly leading: string; readonly trailing: string; constructor(init: { leading?: string; name: string; trailing?: string; } & AltiumLineInit); get name(): string; set name(name: string); getChildren(): AltiumNode[]; getString(): string; } declare class AltiumIniKeyValueLine extends AltiumIniLine { readonly type = "ini-key-value-line"; private _key; private _value; readonly afterEquals: string; readonly beforeEquals: string; readonly leading: string; constructor(init: { afterEquals?: string; beforeEquals?: string; key: string; leading?: string; value?: string; } & AltiumLineInit); get key(): string; set key(key: string); get value(): string; set value(value: string); getChildren(): AltiumNode[]; getString(): string; } declare class AltiumIniCommentLine extends AltiumIniLine { readonly type: string; private _raw; constructor(init: { raw: string; } & AltiumLineInit); get raw(): string; set raw(raw: string); getChildren(): AltiumNode[]; getString(): string; } declare class AltiumIniRawLine extends AltiumIniCommentLine { readonly type = "ini-raw-line"; } interface AltiumIniSection { entries: AltiumIniKeyValueLine[]; header?: AltiumIniSectionLine; name: string; } declare class AltiumIniDocument extends AltiumNode { readonly type: string; private _lines; private originalBytes?; private readonly originalSource?; private sourceEncoding?; constructor(init?: { lines?: AltiumIniLine[]; originalBytes?: Uint8Array; originalSource?: string; sourceEncoding?: AltiumTextEncoding; }); setOriginalBytes(bytes: Uint8Array, encoding: AltiumTextEncoding): this; getBytes(): Uint8Array; get lines(): AltiumIniLine[]; set lines(lines: AltiumIniLine[]); get sections(): AltiumIniSection[]; getSection(name: string): AltiumIniSection | undefined; getAll(sectionName: string, key: string): string[]; get(sectionName: string, key: string): string | undefined; set(sectionName: string, key: string, value: string): this; removeSection(name: string): boolean; getChildren(): AltiumNode[]; getString(): string; } declare function parseAltiumIni(source: string): AltiumIniDocument; declare function parseAltiumIniLines(source: string): AltiumIniLine[]; interface AltiumOutputJobEntry { category: AltiumOutputCategory; dataSource?: string; outputType?: string; section: AltiumIniSection; settings: Readonly>; variant?: string; } type AltiumOutputCategory = "assembly" | "bom" | "drill" | "drawing" | "fabrication" | "pick-and-place" | "report" | "unknown"; declare class AltiumOutJob extends AltiumIniDocument { readonly type = "output-job-document"; constructor(init?: { lines?: AltiumIniLine[]; originalSource?: string; }); get outputs(): AltiumOutputJobEntry[]; get containers(): AltiumIniSection[]; get fabricationOutputs(): AltiumOutputJobEntry[]; get drillOutputs(): AltiumOutputJobEntry[]; get pickAndPlaceOutputs(): AltiumOutputJobEntry[]; get bomOutputs(): AltiumOutputJobEntry[]; get drawingOutputs(): AltiumOutputJobEntry[]; get reportOutputs(): AltiumOutputJobEntry[]; } declare function parseAltiumOutJob(source: string): AltiumOutJob; interface AltiumProjectDocumentReference { kind?: string; path: string; section: AltiumIniSection; uniqueId?: string; } interface AltiumProjectVariant { alternateParts: AltiumProjectSetting[]; description?: string; name: string; parameters: AltiumProjectSetting[]; section: AltiumIniSection; } interface AltiumProjectSetting { key: string; section: AltiumIniSection; value: string; } interface AltiumProjectDocumentGraphNode { kind?: string; path: string; reference: AltiumProjectDocumentReference; resolvedPath: string; uniqueId?: string; } declare class AltiumProjectDocumentGraph { readonly project: AltiumPrjPcb; readonly baseDirectory: string; readonly byPath: Map; readonly byUniqueId: Map; readonly nodes: AltiumProjectDocumentGraphNode[]; constructor(project: AltiumPrjPcb, baseDirectory: string); getByKind(kind: string): AltiumProjectDocumentGraphNode[]; getByPath(path: string): AltiumProjectDocumentGraphNode | undefined; getByUniqueId(uniqueId: string): AltiumProjectDocumentGraphNode | undefined; } declare class AltiumPrjPcb extends AltiumIniDocument { readonly type = "project-document"; constructor(init?: { lines?: AltiumIniLine[]; originalSource?: string; }); get documents(): AltiumProjectDocumentReference[]; get variants(): AltiumProjectVariant[]; get projectOptions(): AltiumIniSection[]; get projectParameters(): AltiumProjectSetting[]; get compilerSettings(): AltiumIniSection[]; get ecoSettings(): AltiumIniSection[]; resolveDocumentPaths(baseDirectory: string): string[]; getDocumentGraph(baseDirectory: string): AltiumProjectDocumentGraph; addDocument(path: string, options?: { kind?: string; uniqueId?: string; }): AltiumProjectDocumentReference; removeDocument(document: AltiumProjectDocumentReference | string): boolean; addVariant(name: string, options?: { description?: string; }): AltiumProjectVariant; removeVariant(variant: AltiumProjectVariant | string): boolean; } declare function parseAltiumPrjPcb(source: string): AltiumPrjPcb; declare function resolveAltiumProjectPath(baseDirectory: string, documentPath: string): string; declare function isAbsoluteAltiumPath(path: string): boolean; declare class AltiumSchematicRecord extends AltiumRecord { readonly type: string; constructor(init?: AltiumRecordInit); get ownerIndex(): number | undefined; get ownerPartId(): number | undefined; get indexInSheet(): number | undefined; get uniqueId(): string | undefined; get position(): AltiumPoint | undefined; } declare class AltiumSchComponentRecord extends AltiumSchematicRecord { readonly type = "schematic-component-record"; get libraryReference(): string | undefined; } declare class AltiumSchPinRecord extends AltiumSchematicRecord { readonly type = "schematic-pin-record"; get name(): string | undefined; get designator(): string | undefined; get electricalType(): number | undefined; get hidden(): boolean | undefined; } declare class AltiumSchLabelRecord extends AltiumSchematicRecord { readonly type = "schematic-label-record"; get text(): string | undefined; } declare class AltiumSchBezierRecord extends AltiumSchematicRecord { readonly type = "schematic-bezier-record"; } declare class AltiumSchPolylineRecord extends AltiumSchematicRecord { readonly type = "schematic-polyline-record"; } declare class AltiumSchPolygonRecord extends AltiumSchematicRecord { readonly type = "schematic-polygon-record"; } declare class AltiumSchEllipseRecord extends AltiumSchematicRecord { readonly type = "schematic-ellipse-record"; } declare class AltiumSchRoundedRectangleRecord extends AltiumSchematicRecord { readonly type = "schematic-rounded-rectangle-record"; } declare class AltiumSchEllipticalArcRecord extends AltiumSchematicRecord { readonly type = "schematic-elliptical-arc-record"; } declare class AltiumSchArcRecord extends AltiumSchematicRecord { readonly type = "schematic-arc-record"; } declare class AltiumSchLineRecord extends AltiumSchematicRecord { readonly type = "schematic-line-record"; } declare class AltiumSchRectangleRecord extends AltiumSchematicRecord { readonly type = "schematic-rectangle-record"; } declare class AltiumSchSheetSymbolRecord extends AltiumSchematicRecord { readonly type = "schematic-sheet-symbol-record"; get fileName(): string | undefined; } declare class AltiumSchSheetEntryRecord extends AltiumSchematicRecord { readonly type = "schematic-sheet-entry-record"; get name(): string | undefined; } declare class AltiumSchPowerPortRecord extends AltiumSchematicRecord { readonly type = "schematic-power-port-record"; get text(): string | undefined; } declare class AltiumSchPortRecord extends AltiumSchematicRecord { readonly type = "schematic-port-record"; get name(): string | undefined; } declare class AltiumSchNetLabelRecord extends AltiumSchematicRecord { readonly type = "schematic-net-label-record"; get text(): string | undefined; } declare class AltiumSchBusRecord extends AltiumSchematicRecord { readonly type = "schematic-bus-record"; } declare class AltiumSchBusEntryRecord extends AltiumSchematicRecord { readonly type = "schematic-bus-entry-record"; } declare class AltiumSchWireRecord extends AltiumSchematicRecord { readonly type = "schematic-wire-record"; } declare class AltiumSchNoErcRecord extends AltiumSchematicRecord { readonly type = "schematic-no-erc-record"; } declare class AltiumSchTextFrameRecord extends AltiumSchematicRecord { readonly type = "schematic-text-frame-record"; get text(): string | undefined; } declare class AltiumSchJunctionRecord extends AltiumSchematicRecord { readonly type = "schematic-junction-record"; } declare class AltiumSchImageRecord extends AltiumSchematicRecord { readonly type = "schematic-image-record"; get fileName(): string | undefined; } declare class AltiumSchSheetRecord extends AltiumSchematicRecord { readonly type = "schematic-sheet-record"; } declare class AltiumSchSheetNameRecord extends AltiumSchematicRecord { readonly type = "schematic-sheet-name-record"; } declare class AltiumSchSheetFileNameRecord extends AltiumSchematicRecord { readonly type = "schematic-sheet-file-name-record"; } declare class AltiumSchDesignatorRecord extends AltiumSchematicRecord { readonly type = "schematic-designator-record"; get text(): string | undefined; } declare class AltiumSchParameterSetRecord extends AltiumSchematicRecord { readonly type = "schematic-parameter-set-record"; get name(): string | undefined; get color(): number | undefined; get isDifferentialPair(): boolean; } declare class AltiumSchTemplateRecord extends AltiumSchematicRecord { readonly type = "schematic-template-record"; get fileName(): string | undefined; } declare class AltiumSchParameterRecord extends AltiumSchematicRecord { readonly type = "schematic-parameter-record"; get name(): string | undefined; get text(): string | undefined; } declare class AltiumSchImplementationListRecord extends AltiumSchematicRecord { readonly type = "schematic-implementation-list-record"; } declare class AltiumSchImplementationRecord extends AltiumSchematicRecord { readonly type = "schematic-implementation-record"; get modelName(): string | undefined; get modelType(): string | undefined; } declare class AltiumSchImplementationMapRecord extends AltiumSchematicRecord { readonly type = "schematic-implementation-map-record"; } declare class AltiumSchImplementationParameterRecord extends AltiumSchematicRecord { readonly type = "schematic-implementation-parameter-record"; } declare class AltiumSchNoteRecord extends AltiumSchematicRecord { readonly type = "schematic-note-record"; get text(): string | undefined; } interface DecodeAltiumSchematicImageOptions { maximumBitmapSize?: number; maximumMetafileSize?: number; maximumNativeImageSize?: number; maximumOutputSize?: number; } interface AltiumSchematicImagePayload { bitmapBytes: Uint8Array; enhancedMetafileBytes?: Uint8Array; nativePngBytes?: Uint8Array; } interface AltiumSchematicImageStorageEntry { compressedBytes: Uint8Array; name: string; } declare class AltiumEmbeddedSchematicImage { readonly index: number; readonly name: string; readonly record: AltiumSchImageRecord; readonly storage: AltiumCompoundStream; private readonly compressedBytes; private decodedPayload?; constructor(init: { compressedBytes: Uint8Array; index: number; name: string; record: AltiumSchImageRecord; storage: AltiumCompoundStream; }); get compressedSize(): number; getCompressedBytes(): Uint8Array; getBitmapBytes(options?: DecodeAltiumSchematicImageOptions): Uint8Array; getEnhancedMetafileBytes(options?: DecodeAltiumSchematicImageOptions): Uint8Array | undefined; getNativePngBytes(options?: DecodeAltiumSchematicImageOptions): Uint8Array | undefined; getDataUrl(options?: DecodeAltiumSchematicImageOptions): string; getPngBytes(options?: DecodeAltiumSchematicImageOptions): Uint8Array; private getPayload; } declare function parseAltiumEmbeddedSchematicImages(storage: AltiumCompoundStream | undefined, records: AltiumSchImageRecord[]): AltiumEmbeddedSchematicImage[]; declare function parseSchematicImageStorage(bytes: Uint8Array): AltiumSchematicImageStorageEntry[]; declare function decodeAltiumSchematicBitmap(compressedBytes: Uint8Array, options?: DecodeAltiumSchematicImageOptions): Uint8Array; declare function decodeAltiumSchematicImagePayload(compressedBytes: Uint8Array, options?: DecodeAltiumSchematicImageOptions): AltiumSchematicImagePayload; declare function encodeWindowsBitmapAsPng(bitmap: Uint8Array): Uint8Array; interface AltiumSchematicSheetLink { fileName?: string; fileNameRecord?: AltiumSchSheetFileNameRecord; name?: string; nameRecord?: AltiumSchSheetNameRecord; symbol: AltiumSchSheetSymbolRecord; } declare class AltiumSchematicDocumentIndex { readonly document: AltiumSchDoc; readonly byOwner: Map; readonly duplicateUniqueIds: Map; readonly records: AltiumRecord[]; readonly uniqueIds: Map; constructor(document: AltiumSchDoc); getParent(record: AltiumRecord): AltiumRecord | undefined; getOwnedRecords(owner: AltiumRecord | number): AltiumRecord[]; getRecordByUniqueId(uniqueId: string): AltiumRecord | undefined; getOwnershipCycles(): AltiumRecord[][]; } interface AltiumSchematicNet { id: string; names: string[]; points: AltiumPoint[]; records: AltiumRecord[]; } declare class AltiumSchematicNetGraph { readonly document: AltiumSchDoc; readonly nets: AltiumSchematicNet[]; private readonly recordNets; constructor(document: AltiumSchDoc); getNetForRecord(record: AltiumRecord): AltiumSchematicNet | undefined; getNetsByName(name: string): AltiumSchematicNet[]; getPinsForComponent(component: AltiumSchComponentRecord): AltiumSchPinRecord[]; } declare function getSchematicDocumentIndex(document: AltiumSchDoc): AltiumSchematicDocumentIndex; declare function getSchematicNetGraph(document: AltiumSchDoc): AltiumSchematicNetGraph; declare function getSchematicSheetLinks(document: AltiumSchDoc): AltiumSchematicSheetLink[]; declare function getSchematicRecordPoints(record: AltiumRecord): AltiumPoint[]; type AltiumSchDocSourceFormat = "ascii" | "binary"; declare class AltiumSchDoc extends AltiumNode { readonly type = "schematic-document"; readonly compoundFile?: AltiumCompoundFile; readonly embeddedImages: AltiumEmbeddedSchematicImage[]; /** Native definition-stream records, including its header, in original order. */ readonly objectDefinitionRecords: AltiumRecord[]; readonly originalBytes?: Uint8Array; readonly originalText?: string; readonly sourceEncoding?: AltiumTextEncoding; readonly sourceFormat: AltiumSchDocSourceFormat; private _lines; constructor(init: { compoundFile?: AltiumCompoundFile; lines?: AltiumLine[]; objectDefinitionRecords?: AltiumRecord[]; originalBytes?: Uint8Array; originalText?: string; sourceEncoding?: AltiumTextEncoding; sourceFormat: AltiumSchDocSourceFormat; }); get lines(): AltiumLine[]; set lines(lines: AltiumLine[]); get header(): AltiumRecord | undefined; get records(): AltiumRecord[]; get index(): AltiumSchematicDocumentIndex; get netGraph(): AltiumSchematicNetGraph; get components(): AltiumSchComponentRecord[]; get pins(): AltiumSchPinRecord[]; get wires(): AltiumSchWireRecord[]; get labels(): AltiumSchLabelRecord[]; get netLabels(): AltiumSchNetLabelRecord[]; get ports(): AltiumSchPortRecord[]; get powerPorts(): AltiumSchPowerPortRecord[]; get sheetSymbols(): AltiumSchSheetSymbolRecord[]; get parameterSets(): AltiumSchParameterSetRecord[]; get differentialPairs(): AltiumSchParameterSetRecord[]; get sheetLinks(): AltiumSchematicSheetLink[]; getEmbeddedImageForRecord(record: AltiumSchImageRecord): AltiumEmbeddedSchematicImage | undefined; getRecordsByKind(kind: string): AltiumRecord[]; getParent(record: AltiumRecord): AltiumRecord | undefined; getOwnedRecords(owner: AltiumRecord | number): AltiumRecord[]; getRecordByUniqueId(uniqueId: string): AltiumRecord | undefined; /** Resolve direct children using indices local to ObjectDefinitions, excluding its header. */ getObjectDefinitionGraphics(id: string): AltiumRecord[] | undefined; getBytes(): Uint8Array; getChildren(): AltiumNode[]; getString(): string; } interface AltiumWorkspaceProjectReference { key: string; path: string; section: AltiumIniSection; } declare class AltiumWorkspace extends AltiumIniDocument { readonly type = "workspace-document"; constructor(init?: { lines?: AltiumIniLine[]; originalSource?: string; }); get projects(): AltiumWorkspaceProjectReference[]; get sessionSections(): AltiumIniSection[]; resolveProjectPaths(baseDirectory: string): string[]; } declare function parseAltiumWorkspace(source: string): AltiumWorkspace; interface ParseAltiumCompoundFileOptions { maxChainLength?: number; maxDirectoryEntries?: number; maxFileSize?: number; } declare function isAltiumCompoundFile(bytes: Uint8Array): boolean; declare function parseAltiumCompoundFile(source: Uint8Array, options?: ParseAltiumCompoundFileOptions): AltiumCompoundFile; type AltiumDiagnosticSeverity = "warning" | "error" | "fatal"; interface AltiumDiagnostic { code: string; context?: { fieldName?: string; recordKind?: string; streamPath?: string; }; excerpt?: string; location?: AltiumSourceLocation; message: string; severity: AltiumDiagnosticSeverity; suggestion?: string; } type AltiumDiagnosticHandler = (diagnostic: AltiumDiagnostic) => void; declare class AltiumDiagnosticCollector { readonly diagnostics: AltiumDiagnostic[]; readonly handle: AltiumDiagnosticHandler; get errors(): AltiumDiagnostic[]; get warnings(): AltiumDiagnostic[]; clear(): void; } type AltiumValidationProfile = "basic" | "strict"; interface AltiumValidationIssue extends AltiumDiagnostic { nodeId?: string; } interface AltiumValidationOptions { loadCompoundStreams?: boolean; maxIssues?: number; onDiagnostic?: AltiumDiagnosticHandler; profile?: AltiumValidationProfile; } interface AltiumValidationResult { issues: AltiumValidationIssue[]; profile: AltiumValidationProfile; summary: { errors: number; fatals: number; warnings: number; }; valid: boolean; } declare function validateAltiumDocument(document: AltiumPcbDocument | AltiumSchDoc | AltiumCompoundFile | AltiumIniDocument, options?: AltiumValidationOptions): AltiumValidationResult; type AltiumDetectedContainer = "ascii" | "cfb" | "ini" | "xml" | "zip"; type AltiumDetectedDocumentKind = "pcb-document" | "pcb-library" | "schematic-document" | "schematic-library" | "integrated-library" | "project" | "output-job" | "workspace" | "ini-document" | "xml-document" | "zip-container" | "compound-file" | "unknown"; interface AltiumFileDetection { confidence: number; container: AltiumDetectedContainer; documentKind: AltiumDetectedDocumentKind; encoding: AltiumTextEncoding | "binary"; evidence: string[]; } interface DetectAltiumFileOptions extends ParseAltiumCompoundFileOptions { encoding?: AltiumTextEncodingOverride; } declare function detectAltiumFile(bytes: Uint8Array, options?: DetectAltiumFileOptions): AltiumFileDetection; interface ParseAltiumOptions { maxFieldsPerRecord?: number; maxLineCount?: number; maxLineLength?: number; mode?: AltiumParseMode; onDiagnostic?: AltiumDiagnosticHandler; redactSourceText?: boolean; signal?: AbortSignal; strict?: boolean; } type AltiumParseMode = "strict" | "compatible" | "recovery"; declare function parseAltiumAscii(source: string, options?: ParseAltiumOptions): AltiumLine[]; /** * Incrementally parses already-decoded text chunks without buffering the * complete document. A trailing CR is held until the next chunk so CRLF pairs * remain intact across arbitrary chunk boundaries. */ declare function parseAltiumAsciiStream(chunks: AsyncIterable, options?: ParseAltiumOptions): AsyncGenerator; declare function serializeAltiumAsciiStream(lines: AsyncIterable | Iterable): AsyncGenerator; declare function isAltiumRecord(line: AltiumLine): line is AltiumRecord; interface ParseAltiumBinaryPcbDocOptions extends ParseAltiumCompoundFileOptions { maxPrimitiveRecordLength?: number; maxPropertyRecordLength?: number; } declare function parseAltiumBinaryPcbDoc(source: Uint8Array, options?: ParseAltiumBinaryPcbDocOptions): AltiumBinaryPcbDoc; interface ParseAltiumSchDocOptions extends ParseAltiumOptions, ParseAltiumCompoundFileOptions { maxRecordLength?: number; encoding?: AltiumTextEncodingOverride; } declare function parseAltiumSchDoc(source: string | Uint8Array, options?: ParseAltiumSchDocOptions): AltiumSchDoc; type ParsedAltiumFile = AltiumBinaryPcbDoc | AltiumCompoundFile | AltiumIniDocument | AltiumOutJob | AltiumPcbDoc | AltiumPrjPcb | AltiumSchDoc | AltiumWorkspace; interface ParseAltiumFileOptions extends ParseAltiumBinaryPcbDocOptions, ParseAltiumSchDocOptions { allowUnknownCompoundFile?: boolean; allowUnknownIni?: boolean; encoding?: AltiumTextEncodingOverride; } interface ParsedAltiumFileResult { detection: AltiumFileDetection; document: ParsedAltiumFile; } declare function parseAltiumFile(source: Uint8Array, options?: ParseAltiumFileOptions): ParsedAltiumFileResult; type SerializableAltiumDocument = AltiumBinaryPcbDoc | AltiumCompoundFile | AltiumIniDocument | AltiumPcbDoc | AltiumSchDoc; type AltiumSerializationMode = "preserve-source" | "canonical"; type AltiumRoundTripLevel = "exact" | "structural" | "semantic" | "none"; interface AltiumSerializationOptions { allowInvalid?: boolean; mode?: AltiumSerializationMode; validate?: boolean; validationProfile?: AltiumValidationProfile; } interface AltiumSerializationResult { bytes: Uint8Array; mode: AltiumSerializationMode; roundTripLevel: AltiumRoundTripLevel; validation?: AltiumValidationResult; } declare function getAltiumRoundTripLevel(document: SerializableAltiumDocument): AltiumRoundTripLevel; declare function serializeAltiumDocument(document: SerializableAltiumDocument, options?: AltiumSerializationOptions): AltiumSerializationResult; declare function getAltiumDocumentBytes(document: SerializableAltiumDocument): Uint8Array; export { type AltiumLineInit as $, AltiumBinaryPcbDoc as A, AltiumComponentRecord as B, AltiumCompoundEntry as C, type AltiumCompoundEntryMetadata as D, type AltiumCompoundEntryType as E, type AltiumCompoundFileHeader as F, AltiumCompoundStorage as G, AltiumCompoundStream as H, type AltiumContourWinding as I, type AltiumDetectedContainer as J, type AltiumDetectedDocumentKind as K, type AltiumDiagnostic as L, AltiumDiagnosticCollector as M, type AltiumDiagnosticHandler as N, type AltiumDiagnosticSeverity as O, type ParseAltiumOptions as P, AltiumDxpRuleRecord as Q, AltiumEmbeddedModel as R, AltiumEmbeddedSchematicImage as S, AltiumField as T, type AltiumFileDetection as U, AltiumIniCommentLine as V, AltiumIniKeyValueLine as W, AltiumIniLine as X, AltiumIniRawLine as Y, type AltiumIniSection as Z, AltiumIniSectionLine as _, AltiumCompoundFile as a, AltiumSchLabelRecord as a$, AltiumMeasurement as a0, type AltiumMeasurementInit as a1, type AltiumMeasurementInput as a2, type AltiumMeasurementParts as a3, type AltiumMeasurementUnit as a4, AltiumModelRecord as a5, type AltiumNodeVisitor as a6, type AltiumOutputCategory as a7, type AltiumOutputJobEntry as a8, type AltiumParseMode as a9, AltiumRawField as aA, type AltiumRecordItem as aB, type AltiumRecordNode as aC, AltiumRegionRecord as aD, type AltiumRoundTripLevel as aE, type AltiumRoutingLayerSetting as aF, type AltiumRuleCategory as aG, type AltiumRuleLayerConstraint as aH, type AltiumRuleMeasurementRange as aI, type AltiumRuleNumericRange as aJ, AltiumRuleRecord as aK, AltiumSchArcRecord as aL, AltiumSchBezierRecord as aM, AltiumSchBusEntryRecord as aN, AltiumSchBusRecord as aO, AltiumSchComponentRecord as aP, AltiumSchDesignatorRecord as aQ, AltiumSchParameterSetRecord as aR, type AltiumSchDocSourceFormat as aS, AltiumSchEllipseRecord as aT, AltiumSchEllipticalArcRecord as aU, AltiumSchImageRecord as aV, AltiumSchImplementationListRecord as aW, AltiumSchImplementationMapRecord as aX, AltiumSchImplementationParameterRecord as aY, AltiumSchImplementationRecord as aZ, AltiumSchJunctionRecord as a_, type AltiumPcbBoardGeometry as aa, type AltiumPcbConnectivityEdge as ab, AltiumPcbConnectivityGraph as ac, type AltiumPcbContour as ad, type AltiumPcbContourArc as ae, type AltiumPcbContourVertex as af, type AltiumPcbContourVertexKind as ag, type AltiumPcbDanglingReference as ah, AltiumPcbDocumentIndex as ai, type AltiumPcbGridSettings as aj, type AltiumPcbImpedanceProfile as ak, type AltiumPcbLayerPair as al, type AltiumPcbLayerStackEntry as am, type AltiumPcbLayerSubStack as an, type AltiumPcbReferenceField as ao, type AltiumPcbRegionGeometry as ap, type AltiumPcbResolvedReference as aq, type AltiumPcbSide as ar, type AltiumPcbStreamSummary as as, type AltiumPcbTraceImpedanceConfiguration as at, AltiumPolygonRecord as au, AltiumProjectDocumentGraph as av, type AltiumProjectDocumentGraphNode as aw, type AltiumProjectDocumentReference as ax, type AltiumProjectSetting as ay, type AltiumProjectVariant as az, AltiumIniDocument as b, formatAltiumMeasurement as b$, AltiumSchLineRecord as b0, AltiumSchNetLabelRecord as b1, AltiumSchNoErcRecord as b2, AltiumSchNoteRecord as b3, AltiumSchParameterRecord as b4, AltiumSchPinRecord as b5, AltiumSchPolygonRecord as b6, AltiumSchPolylineRecord as b7, AltiumSchPortRecord as b8, AltiumSchPowerPortRecord as b9, type AltiumValidationOptions as bA, type AltiumVector as bB, type AltiumWorkspaceProjectReference as bC, type DecodeAltiumSchematicImageOptions as bD, type DecodedAltiumText as bE, type DecompressAltiumEmbeddedModelOptions as bF, type DetectAltiumFileOptions as bG, type ParseAltiumBinaryPcbDocOptions as bH, type ParseAltiumCompoundFileOptions as bI, type ParseAltiumFileOptions as bJ, type ParseAltiumSchDocOptions as bK, type ParsedAltiumFile as bL, type ParsedAltiumFileResult as bM, type SerializableAltiumDocument as bN, altiumColorToRgb as bO, altiumPointsEqual as bP, boardToComponentPoint as bQ, clearPcbDocumentIndex as bR, componentToBoardPoint as bS, decodeAltiumSchematicBitmap as bT, decodeAltiumSchematicImagePayload as bU, decodeAltiumText as bV, decompressAltiumEmbeddedModel as bW, detectAltiumFile as bX, encodeAltiumText as bY, encodeWindowsBitmapAsPng as bZ, expandAltiumBounds as b_, AltiumSchRectangleRecord as ba, AltiumSchRoundedRectangleRecord as bb, AltiumSchSheetEntryRecord as bc, AltiumSchSheetFileNameRecord as bd, AltiumSchSheetNameRecord as be, AltiumSchSheetRecord as bf, AltiumSchSheetSymbolRecord as bg, AltiumSchTemplateRecord as bh, AltiumSchTextFrameRecord as bi, AltiumSchWireRecord as bj, AltiumSchematicDocumentIndex as bk, type AltiumSchematicImagePayload as bl, type AltiumSchematicImageStorageEntry as bm, type AltiumSchematicNet as bn, AltiumSchematicNetGraph as bo, type AltiumSchematicSheetLink as bp, type AltiumSerializationMode as bq, type AltiumSerializationOptions as br, type AltiumSerializationResult as bs, AltiumSignalClassRecord as bt, type AltiumTestPointSettings as bu, type AltiumTextEncoding as bv, type AltiumTextEncodingOverride as bw, type AltiumThermalReliefSettings as bx, type AltiumTransform as by, type AltiumValidationIssue as bz, AltiumOutJob as c, serializeAltiumDocument as c$, formatAltiumSourceLocation as c0, getAltiumBounds as c1, getAltiumContourSignedArea as c2, getAltiumContourWinding as c3, getAltiumDocumentBytes as c4, getAltiumRoundTripLevel as c5, getCcwSweepDegrees as c6, getDanglingPcbReferences as c7, getPcbBoardGeometry as c8, getPcbComponentBounds as c9, getSchematicDocumentIndex as cA, getSchematicNetGraph as cB, getSchematicRecordPoints as cC, getSchematicSheetLinks as cD, isAbsoluteAltiumPath as cE, isAltiumCompoundFile as cF, isAltiumRecord as cG, mergeAltiumBounds as cH, normalizeAltiumAngle as cI, normalizeAltiumMeasurement as cJ, parseAltiumAscii as cK, parseAltiumAsciiStream as cL, parseAltiumBinaryPcbDoc as cM, parseAltiumCompoundFile as cN, parseAltiumEmbeddedSchematicImages as cO, parseAltiumFile as cP, parseAltiumIni as cQ, parseAltiumIniLines as cR, parseAltiumMeasurement as cS, parseAltiumMeasurementToMils as cT, parseAltiumOutJob as cU, parseAltiumPrjPcb as cV, parseAltiumSchDoc as cW, parseAltiumWorkspace as cX, parseSchematicImageStorage as cY, resolveAltiumProjectPath as cZ, serializeAltiumAsciiStream as c_, getPcbComponentByIndex as ca, getPcbComponents as cb, getPcbConnectivityGraph as cc, getPcbContour as cd, getPcbContourVertices as ce, getPcbDocumentIndex as cf, getPcbLayerStack as cg, getPcbNetByIndex as ch, getPcbNets as ci, getPcbPolygonByIndex as cj, getPcbRecordComponent as ck, getPcbRecordComponentIndex as cl, getPcbRecordNet as cm, getPcbRecordNetIndex as cn, getPcbRecordPolygon as co, getPcbRecordPolygonIndex as cp, getPcbRecordRule as cq, getPcbRecordRuleIndex as cr, getPcbRecordsForPolygon as cs, getPcbRecordsForRule as ct, getPcbRecordsOnNet as cu, getPcbRecordsOwnedByComponent as cv, getPcbReference as cw, getPcbRegionGeometry as cx, getPcbRegionSemanticKind as cy, getPcbRuleByIndex as cz, AltiumPcbDoc as d, transformAltiumPoint as d0, validateAltiumDocument as d1, AltiumPrjPcb as e, AltiumSchDoc as f, AltiumWorkspace as g, AltiumNode as h, AltiumRecord as i, type AltiumValidationProfile as j, type AltiumValidationResult as k, AltiumNetRecord as l, type AltiumSourceLocation as m, type AltiumPcbLayerStack as n, type AltiumRecordInit as o, type AltiumPoint as p, type AltiumBounds as q, type AltiumSize as r, AltiumLine as s, type AltiumLineTerminator as t, type AltiumNodeInit as u, AltiumSchematicRecord as v, type AltiumPcbDocument as w, ALTIUM_NO_INDEX as x, AltiumBoardRecord as y, AltiumClassRecord as z };