@tscircuit/schematic-viewer 2.0.100 → 2.0.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +12 -2
- package/dist/index.js +514 -318
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,14 @@ declare const useSchematicViewerController: () => {
|
|
|
24
24
|
focusSchematicComponent: (schematicComponentId: string) => void;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
/** Stable identity for hosts to locate the component on their PCB. */
|
|
28
|
+
interface ViewPcbComponentEvent {
|
|
29
|
+
source_component_id: string;
|
|
30
|
+
schematic_component_id: string;
|
|
31
|
+
pcb_component_id: string;
|
|
32
|
+
refdes: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
27
35
|
interface Props$1 {
|
|
28
36
|
circuitJson: CircuitJson;
|
|
29
37
|
containerStyle?: React.CSSProperties;
|
|
@@ -51,8 +59,10 @@ interface Props$1 {
|
|
|
51
59
|
searchEnabled?: boolean;
|
|
52
60
|
/** Connect the controller returned by useSchematicViewerController. */
|
|
53
61
|
controller?: SchematicViewerController;
|
|
62
|
+
/** Omit when the host has no enabled PCB view. */
|
|
63
|
+
onViewPcbComponent?: (event: ViewPcbComponentEvent) => void;
|
|
54
64
|
}
|
|
55
|
-
declare const SchematicViewer: ({ circuitJson, containerStyle, debugGrid, debug, clickToInteractEnabled, colorOverrides, disableGroups, netHoverHighlightEnabled, onSchematicComponentClicked, showSchematicPorts, onSchematicPortClicked, onSchematicSheetChange, searchEnabled, controller, css, className, }: Props$1) => react.JSX.Element;
|
|
65
|
+
declare const SchematicViewer: ({ circuitJson, containerStyle, debugGrid, debug, clickToInteractEnabled, colorOverrides, disableGroups, netHoverHighlightEnabled, onSchematicComponentClicked, showSchematicPorts, onSchematicPortClicked, onSchematicSheetChange, searchEnabled, controller, onViewPcbComponent, css, className, }: Props$1) => react.JSX.Element;
|
|
56
66
|
|
|
57
67
|
interface BoundingBoxBounds {
|
|
58
68
|
minX: number;
|
|
@@ -88,4 +98,4 @@ interface Props {
|
|
|
88
98
|
}
|
|
89
99
|
declare const AnalogSimulationViewer: ({ circuitJson: inputCircuitJson, containerStyle, colorOverrides, width, height, className, hideSchematic, onSimulationChange, acSweepView, }: Props) => react.JSX.Element;
|
|
90
100
|
|
|
91
|
-
export { AnalogSimulationViewer, MouseTracker, SchematicViewer, type SchematicViewerController, useMouseEventsOverBoundingBox, useSchematicViewerController };
|
|
101
|
+
export { AnalogSimulationViewer, MouseTracker, SchematicViewer, type SchematicViewerController, type ViewPcbComponentEvent, useMouseEventsOverBoundingBox, useSchematicViewerController };
|