Skip to documentation
Download SDK 1.2.1 ↗

API reference

Self-hosted SDK 1.2.1 · npm / CDN 1.2.1 · MPL-2.0

Core embed API 1.0 is stable. Net selection retains the 3D camera; unrelated geometry fades to translucent gray in Dim mode. The current SDK reduces rendering work during motion, inspects saved schematic classes and links 2D component hover to the BoM. Expanded 3D, saved BOM, linked previews and registered WayriCAD results remain available. The same release is available through npm/CDN. Release details and downloads ↗

This reference describes the 0.3.0 base API and later self-hosted additions. The 0.4.0 additions include native 3D result registration, saved layers and linked probes; 0.5.0 adds saved BoM and board data. The current npm/CDN package is 1.2.1. The separately maintained IRCA demonstrations may have additional site-specific capabilities. Import from the versioned module or use the same names on the classic KiCadWebView global.

import { Viewer, EMBED_API_VERSION } from
  'https://unpkg.com/@wayrisignals/kicad-webview@1.2.1/dist/kivi-viewer.js';
console.log(EMBED_API_VERSION); // '1.0'

No package manager is required. Types in this reference use TypeScript notation to explain the JavaScript inputs; they do not require a TypeScript build.

Public exports

The table includes the base exports and identifies later additions by version. Types and interfaces describe data, not additional runtime exports.

Export Purpose and detailed contract
BOMViewer, buildBOM, analyzeBoard, bomToCSV 0.5.0 saved BoM, board statistics and linked selection. BoM and board data guide.
Viewer, KiCadViewer The same compact viewer class. Construction, loading, inspection, cameras, layers, analysis and events.
registerKiCadViewer Register the optional HTML custom element. Signature and attributes.
ProjectViewer, AdvancedKiCadViewer The same two-pane project wrapper. Methods, options and events.
EMBED_API_VERSION Contract identifier.
ViewerCarousel Explicit, cancellable drawing presentations.
linkViewers Saved-identity selection linking.
captureViewState Snapshot native views and exact source hashes.
restoreViewState Restore validated, source-matched views.
validateViewState Validate and copy a view-state object.
createViewLink Encode state in an HTTP(S) URL fragment.
parseViewLink Read an optional view-state fragment.
DemoController Scripted LEDs, displays, buttons, knobs and scoped keys.
ProjectTree Interactive independent schematic hierarchy.
buildProjectHierarchy Build hierarchy data from saved source strings.
loadProjectHierarchy Load a bounded project hierarchy.
hierarchyToSVG Export a script-free hierarchy diagram.
AltiumViewer Opt-in online provider adapter, not native parsing.
readZip Validated in-memory archive reader.
parseManufacturing Gerber/Excellon parser dispatch.
parseAnalysis Validate imported scalar fields.
createStandaloneHTML Generate a self-contained viewer document.
analysisSourceHash Hash the exact saved PCB text.
WayriCADResultsViewer Saved WayriCAD results: contract, source identity and display limits.
parseWayriCADResults Saved WayriCAD results: contract, source identity and display limits.
classifyWayriCADSource Saved WayriCAD results: contract, source identity and display limits.
getWayriCADSourceLinks Saved WayriCAD results: contract, source identity and display limits.
createWayriCADSurface Saved WayriCAD results: contract, source identity and display limits.
getWayriCADFrame Saved WayriCAD results: contract, source identity and display limits.
probeWayriCADPlot Saved WayriCAD results: contract, source identity and display limits.
getWayriCADPointHistory Saved WayriCAD results: contract, source identity and display limits.

createStandaloneHTML is exported by the main entry and the separate /html module.

Embed API version

const EMBED_API_VERSION: '1.0'

This legacy embedding-contract identifier is retained for compatibility. It is separate from the SDK/package release version. Reading it has no side effects and does not test browser capabilities, source compatibility or solver validity. Pin the complete release directory when integrating; this identifier alone does not freeze every future beta implementation.

Shared conventions

Release boundaries

This release does not expose the later modelsready event, setDemoInteraction method, or display anchor faceSelection / minFaceAreaMm2 options used by newer site code. Use only the methods documented for your pinned copy.

The downloadable release uses MPL-2.0; commercial use and integration need no individual approval. Keep its notices and matching-source link when distributing builds. The source repository is public; input designs and third-party dependencies have separate terms.