@tscircuit/core 0.0.372 → 0.0.374
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 +6 -3
- package/dist/index.js +12 -12
- package/package.json +4 -5
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { z, ZodType } from 'zod';
|
|
|
7
7
|
import { symbols, SchSymbol, BaseSymbolName } from 'schematic-symbols';
|
|
8
8
|
import { PcbTraceError, PcbPlacementError, PcbManualEditConflictError, LayerRef, AnyCircuitElement, AnySourceComponent, PcbTraceRoutePoint, PcbTrace, PcbVia, RouteHintPoint, CircuitJson } from 'circuit-json';
|
|
9
9
|
import { Matrix } from 'transformation-matrix';
|
|
10
|
-
import {
|
|
10
|
+
import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
|
|
11
11
|
import * as _tscircuit_layout from '@tscircuit/layout';
|
|
12
12
|
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
13
13
|
import { GraphicsObject } from 'graphics-debug';
|
|
@@ -189,7 +189,7 @@ interface AutoroutingEndEvent {
|
|
|
189
189
|
declare class RootCircuit {
|
|
190
190
|
firstChild: PrimitiveComponent | null;
|
|
191
191
|
children: PrimitiveComponent[];
|
|
192
|
-
db:
|
|
192
|
+
db: CircuitJsonUtilObjects;
|
|
193
193
|
root: RootCircuit | null;
|
|
194
194
|
isRoot: boolean;
|
|
195
195
|
schematicDisabled: boolean;
|
|
@@ -1408,7 +1408,9 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1408
1408
|
}>, "many">>;
|
|
1409
1409
|
outlineOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1410
1410
|
outlineOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1411
|
+
material: zod.ZodDefault<zod.ZodEnum<["fr4", "fr1"]>>;
|
|
1411
1412
|
}>, "strip", zod.ZodTypeAny, {
|
|
1413
|
+
material: "fr4" | "fr1";
|
|
1412
1414
|
pcbX?: number | undefined;
|
|
1413
1415
|
pcbY?: number | undefined;
|
|
1414
1416
|
pcbRotation?: number | undefined;
|
|
@@ -1656,6 +1658,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1656
1658
|
}[] | undefined;
|
|
1657
1659
|
outlineOffsetX?: string | number | undefined;
|
|
1658
1660
|
outlineOffsetY?: string | number | undefined;
|
|
1661
|
+
material?: "fr4" | "fr1" | undefined;
|
|
1659
1662
|
}>;
|
|
1660
1663
|
};
|
|
1661
1664
|
get boardThickness(): number;
|
|
@@ -11443,7 +11446,7 @@ declare const applyEditEvents: ({ circuitJson, editEvents, }: {
|
|
|
11443
11446
|
* This function can only be called in the PcbTraceRender phase or later
|
|
11444
11447
|
*/
|
|
11445
11448
|
declare const getSimpleRouteJsonFromCircuitJson: ({ db, circuitJson, subcircuit_id, minTraceWidth, }: {
|
|
11446
|
-
db?:
|
|
11449
|
+
db?: CircuitJsonUtilObjects;
|
|
11447
11450
|
circuitJson?: AnyCircuitElement[];
|
|
11448
11451
|
subcircuit_id?: string | null;
|
|
11449
11452
|
minTraceWidth?: number;
|
package/dist/index.js
CHANGED
|
@@ -5406,7 +5406,7 @@ var TraceHint = class extends PrimitiveComponent {
|
|
|
5406
5406
|
|
|
5407
5407
|
// lib/utils/edit-events/apply-pcb-edit-events-to-manual-edits-file.ts
|
|
5408
5408
|
import "zod";
|
|
5409
|
-
import { su } from "@tscircuit/
|
|
5409
|
+
import { su } from "@tscircuit/circuit-json-util";
|
|
5410
5410
|
var applyPcbEditEventsToManualEditsFile = ({
|
|
5411
5411
|
circuitJson,
|
|
5412
5412
|
editEvents,
|
|
@@ -5444,7 +5444,7 @@ var applyPcbEditEventsToManualEditsFile = ({
|
|
|
5444
5444
|
};
|
|
5445
5445
|
|
|
5446
5446
|
// lib/utils/edit-events/apply-schematic-edit-events-to-manual-edits-file.ts
|
|
5447
|
-
import { su as su2 } from "@tscircuit/
|
|
5447
|
+
import { su as su2 } from "@tscircuit/circuit-json-util";
|
|
5448
5448
|
import "zod";
|
|
5449
5449
|
var applySchematicEditEventsToManualEditsFile = ({
|
|
5450
5450
|
circuitJson,
|
|
@@ -5515,11 +5515,11 @@ var applyEditEventsToManualEditsFile = ({
|
|
|
5515
5515
|
};
|
|
5516
5516
|
|
|
5517
5517
|
// lib/utils/edit-events/apply-edit-events-to-circuit-json.ts
|
|
5518
|
-
import { transformPCBElement } from "@tscircuit/
|
|
5518
|
+
import { transformPCBElement } from "@tscircuit/circuit-json-util";
|
|
5519
5519
|
import { translate as translate3 } from "transformation-matrix";
|
|
5520
5520
|
|
|
5521
5521
|
// lib/utils/edit-events/apply-trace-hint-edit-event.ts
|
|
5522
|
-
import { su as su3 } from "@tscircuit/
|
|
5522
|
+
import { su as su3 } from "@tscircuit/circuit-json-util";
|
|
5523
5523
|
var applyTraceHintEditEvent = (circuitJson, edit_event) => {
|
|
5524
5524
|
const existingTraceHint = su3(circuitJson).pcb_trace_hint.get(
|
|
5525
5525
|
edit_event.pcb_trace_hint_id
|
|
@@ -5588,7 +5588,7 @@ var applyEditEvents = ({
|
|
|
5588
5588
|
|
|
5589
5589
|
// lib/utils/autorouting/getSimpleRouteJsonFromCircuitJson.ts
|
|
5590
5590
|
import { getObstaclesFromSoup as getObstaclesFromSoup2 } from "@tscircuit/infgrid-ijump-astar";
|
|
5591
|
-
import { su as su4 } from "@tscircuit/
|
|
5591
|
+
import { su as su4 } from "@tscircuit/circuit-json-util";
|
|
5592
5592
|
import {
|
|
5593
5593
|
getFullConnectivityMapFromCircuitJson as getFullConnectivityMapFromCircuitJson2
|
|
5594
5594
|
} from "circuit-json-to-connectivity-map";
|
|
@@ -6388,7 +6388,8 @@ var Board = class extends Group {
|
|
|
6388
6388
|
outline: props.outline?.map((point) => ({
|
|
6389
6389
|
x: point.x + (props.outlineOffsetX ?? 0),
|
|
6390
6390
|
y: point.y + (props.outlineOffsetY ?? 0)
|
|
6391
|
-
}))
|
|
6391
|
+
})),
|
|
6392
|
+
material: props.material
|
|
6392
6393
|
});
|
|
6393
6394
|
this.pcb_board_id = pcb_board.pcb_board_id;
|
|
6394
6395
|
}
|
|
@@ -7505,7 +7506,7 @@ var Switch = class extends NormalComponent {
|
|
|
7505
7506
|
};
|
|
7506
7507
|
|
|
7507
7508
|
// lib/RootCircuit.ts
|
|
7508
|
-
import { su as su5 } from "@tscircuit/
|
|
7509
|
+
import { su as su5 } from "@tscircuit/circuit-json-util";
|
|
7509
7510
|
import { isValidElement as isValidElement2 } from "react";
|
|
7510
7511
|
import { identity as identity4 } from "transformation-matrix";
|
|
7511
7512
|
|
|
@@ -7513,7 +7514,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
7513
7514
|
var package_default = {
|
|
7514
7515
|
name: "@tscircuit/core",
|
|
7515
7516
|
type: "module",
|
|
7516
|
-
version: "0.0.
|
|
7517
|
+
version: "0.0.373",
|
|
7517
7518
|
types: "dist/index.d.ts",
|
|
7518
7519
|
main: "dist/index.js",
|
|
7519
7520
|
module: "dist/index.js",
|
|
@@ -7567,13 +7568,12 @@ var package_default = {
|
|
|
7567
7568
|
"@lume/kiwi": "^0.4.3",
|
|
7568
7569
|
"@tscircuit/capacity-autorouter": "^0.0.52",
|
|
7569
7570
|
"@tscircuit/checks": "^0.0.36",
|
|
7570
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
7571
|
+
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
7571
7572
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
7572
7573
|
"@tscircuit/math-utils": "^0.0.12",
|
|
7573
|
-
"@tscircuit/props": "^0.0.
|
|
7574
|
+
"@tscircuit/props": "^0.0.172",
|
|
7574
7575
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
7575
|
-
"
|
|
7576
|
-
"circuit-json": "^0.0.153",
|
|
7576
|
+
"circuit-json": "^0.0.154",
|
|
7577
7577
|
"circuit-json-to-connectivity-map": "^0.0.20",
|
|
7578
7578
|
"format-si-unit": "^0.0.3",
|
|
7579
7579
|
nanoid: "^5.0.7",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.374",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -55,13 +55,12 @@
|
|
|
55
55
|
"@lume/kiwi": "^0.4.3",
|
|
56
56
|
"@tscircuit/capacity-autorouter": "^0.0.52",
|
|
57
57
|
"@tscircuit/checks": "^0.0.36",
|
|
58
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
58
|
+
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
59
59
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
60
60
|
"@tscircuit/math-utils": "^0.0.12",
|
|
61
|
-
"@tscircuit/props": "^0.0.
|
|
61
|
+
"@tscircuit/props": "^0.0.172",
|
|
62
62
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
63
|
-
"
|
|
64
|
-
"circuit-json": "^0.0.153",
|
|
63
|
+
"circuit-json": "^0.0.154",
|
|
65
64
|
"circuit-json-to-connectivity-map": "^0.0.20",
|
|
66
65
|
"format-si-unit": "^0.0.3",
|
|
67
66
|
"nanoid": "^5.0.7",
|