@tscircuit/core 0.0.351 → 0.0.352
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 +2 -2
- package/dist/index.js +22 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { createElement } from 'react';
|
|
|
5
5
|
import * as zod from 'zod';
|
|
6
6
|
import { z, ZodType } from 'zod';
|
|
7
7
|
import { symbols, SchSymbol, BaseSymbolName } from 'schematic-symbols';
|
|
8
|
-
import { PcbTraceError, PcbPlacementError, PcbManualEditConflictError, LayerRef, AnyCircuitElement, AnySourceComponent, PcbTraceRoutePoint, PcbTrace, RouteHintPoint, CircuitJson } from 'circuit-json';
|
|
8
|
+
import { PcbTraceError, PcbPlacementError, PcbManualEditConflictError, LayerRef, AnyCircuitElement, AnySourceComponent, PcbTraceRoutePoint, PcbTrace, PcbVia, RouteHintPoint, CircuitJson } from 'circuit-json';
|
|
9
9
|
import { Matrix } from 'transformation-matrix';
|
|
10
10
|
import { SoupUtilObjects } from '@tscircuit/soup-util';
|
|
11
11
|
import * as _tscircuit_layout from '@tscircuit/layout';
|
|
@@ -1001,7 +1001,7 @@ declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
|
|
|
1001
1001
|
_hasStartedAsyncAutorouting: boolean;
|
|
1002
1002
|
_asyncAutoroutingResult: {
|
|
1003
1003
|
output_simple_route_json?: SimpleRouteJson;
|
|
1004
|
-
output_pcb_traces?: PcbTrace[];
|
|
1004
|
+
output_pcb_traces?: (PcbTrace | PcbVia)[];
|
|
1005
1005
|
} | null;
|
|
1006
1006
|
get config(): {
|
|
1007
1007
|
zodProps: Props;
|
package/dist/index.js
CHANGED
|
@@ -6009,6 +6009,7 @@ var Group = class extends NormalComponent {
|
|
|
6009
6009
|
if (!output_pcb_traces) return;
|
|
6010
6010
|
const { db } = this.root;
|
|
6011
6011
|
for (const pcb_trace of output_pcb_traces) {
|
|
6012
|
+
if (pcb_trace.type !== "pcb_trace") continue;
|
|
6012
6013
|
pcb_trace.subcircuit_id = this.subcircuit_id;
|
|
6013
6014
|
if (pcb_trace.connection_name) {
|
|
6014
6015
|
const sourceTraceId = pcb_trace.connection_name;
|
|
@@ -6017,18 +6018,26 @@ var Group = class extends NormalComponent {
|
|
|
6017
6018
|
db.pcb_trace.insert(pcb_trace);
|
|
6018
6019
|
}
|
|
6019
6020
|
for (const pcb_trace of output_pcb_traces) {
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6021
|
+
if (pcb_trace.type === "pcb_via") {
|
|
6022
|
+
continue;
|
|
6023
|
+
}
|
|
6024
|
+
if (pcb_trace.type === "pcb_trace") {
|
|
6025
|
+
for (const point of pcb_trace.route) {
|
|
6026
|
+
if (point.route_type === "via") {
|
|
6027
|
+
db.pcb_via.insert({
|
|
6028
|
+
pcb_trace_id: pcb_trace.pcb_trace_id,
|
|
6029
|
+
x: point.x,
|
|
6030
|
+
y: point.y,
|
|
6031
|
+
hole_diameter: 0.3,
|
|
6032
|
+
outer_diameter: 0.6,
|
|
6033
|
+
layers: [
|
|
6034
|
+
point.from_layer,
|
|
6035
|
+
point.to_layer
|
|
6036
|
+
],
|
|
6037
|
+
from_layer: point.from_layer,
|
|
6038
|
+
to_layer: point.to_layer
|
|
6039
|
+
});
|
|
6040
|
+
}
|
|
6032
6041
|
}
|
|
6033
6042
|
}
|
|
6034
6043
|
}
|
|
@@ -7305,7 +7314,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
7305
7314
|
var package_default = {
|
|
7306
7315
|
name: "@tscircuit/core",
|
|
7307
7316
|
type: "module",
|
|
7308
|
-
version: "0.0.
|
|
7317
|
+
version: "0.0.351",
|
|
7309
7318
|
types: "dist/index.d.ts",
|
|
7310
7319
|
main: "dist/index.js",
|
|
7311
7320
|
module: "dist/index.js",
|