@tscircuit/core 0.0.1941 → 0.0.1943
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 -0
- package/dist/index.js +33 -14
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -99218,6 +99218,8 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
|
|
|
99218
99218
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
99219
99219
|
}>, "many">>;
|
|
99220
99220
|
warningOnly: zod.ZodOptional<zod.ZodBoolean>;
|
|
99221
|
+
allowTraces: zod.ZodOptional<zod.ZodBoolean>;
|
|
99222
|
+
allowPlacements: zod.ZodOptional<zod.ZodBoolean>;
|
|
99221
99223
|
excludeRefs: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
99222
99224
|
}, "strip", zod.ZodTypeAny, {
|
|
99223
99225
|
shape: "circle";
|
|
@@ -99255,6 +99257,8 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
|
|
|
99255
99257
|
pcbRelative?: boolean | undefined;
|
|
99256
99258
|
relative?: boolean | undefined;
|
|
99257
99259
|
warningOnly?: boolean | undefined;
|
|
99260
|
+
allowTraces?: boolean | undefined;
|
|
99261
|
+
allowPlacements?: boolean | undefined;
|
|
99258
99262
|
excludeRefs?: string[] | undefined;
|
|
99259
99263
|
}, {
|
|
99260
99264
|
shape: "circle";
|
|
@@ -99296,6 +99300,8 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
|
|
|
99296
99300
|
pcbRelative?: boolean | undefined;
|
|
99297
99301
|
relative?: boolean | undefined;
|
|
99298
99302
|
warningOnly?: boolean | undefined;
|
|
99303
|
+
allowTraces?: boolean | undefined;
|
|
99304
|
+
allowPlacements?: boolean | undefined;
|
|
99299
99305
|
excludeRefs?: string[] | undefined;
|
|
99300
99306
|
}>, zod.ZodObject<{
|
|
99301
99307
|
pcbX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
@@ -99376,6 +99382,8 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
|
|
|
99376
99382
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
99377
99383
|
}>, "many">>;
|
|
99378
99384
|
warningOnly: zod.ZodOptional<zod.ZodBoolean>;
|
|
99385
|
+
allowTraces: zod.ZodOptional<zod.ZodBoolean>;
|
|
99386
|
+
allowPlacements: zod.ZodOptional<zod.ZodBoolean>;
|
|
99379
99387
|
excludeRefs: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
99380
99388
|
}, "strip", zod.ZodTypeAny, {
|
|
99381
99389
|
shape: "rect";
|
|
@@ -99415,6 +99423,8 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
|
|
|
99415
99423
|
pcbRelative?: boolean | undefined;
|
|
99416
99424
|
relative?: boolean | undefined;
|
|
99417
99425
|
warningOnly?: boolean | undefined;
|
|
99426
|
+
allowTraces?: boolean | undefined;
|
|
99427
|
+
allowPlacements?: boolean | undefined;
|
|
99418
99428
|
excludeRefs?: string[] | undefined;
|
|
99419
99429
|
}, {
|
|
99420
99430
|
shape: "rect";
|
|
@@ -99458,6 +99468,8 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
|
|
|
99458
99468
|
pcbRelative?: boolean | undefined;
|
|
99459
99469
|
relative?: boolean | undefined;
|
|
99460
99470
|
warningOnly?: boolean | undefined;
|
|
99471
|
+
allowTraces?: boolean | undefined;
|
|
99472
|
+
allowPlacements?: boolean | undefined;
|
|
99461
99473
|
excludeRefs?: string[] | undefined;
|
|
99462
99474
|
}>]>;
|
|
99463
99475
|
};
|
package/dist/index.js
CHANGED
|
@@ -2544,6 +2544,7 @@ var Net = class extends PrimitiveComponent2 {
|
|
|
2544
2544
|
member_source_group_ids: [],
|
|
2545
2545
|
is_ground: isGround,
|
|
2546
2546
|
is_power: isPositiveVoltageSource,
|
|
2547
|
+
trace_width: props.nominalTraceWidth,
|
|
2547
2548
|
// @ts-ignore
|
|
2548
2549
|
is_positive_voltage_source: isPositiveVoltageSource
|
|
2549
2550
|
});
|
|
@@ -3166,7 +3167,7 @@ var getObstaclesFromCircuitJson = (circuitJson, connMap) => {
|
|
|
3166
3167
|
}
|
|
3167
3168
|
}
|
|
3168
3169
|
} else if (element.type === "pcb_keepout") {
|
|
3169
|
-
if (element.warning_only) continue;
|
|
3170
|
+
if (element.warning_only || element.allow_traces) continue;
|
|
3170
3171
|
if (element.shape === "circle") {
|
|
3171
3172
|
obstacles.push({
|
|
3172
3173
|
componentId: pcbComponentId,
|
|
@@ -9042,6 +9043,8 @@ var Keepout = class extends PrimitiveComponent2 {
|
|
|
9042
9043
|
layers,
|
|
9043
9044
|
shape: "circle",
|
|
9044
9045
|
...pcbKeepoutExclusionProps,
|
|
9046
|
+
...props.allowTraces !== void 0 ? { allow_traces: props.allowTraces } : {},
|
|
9047
|
+
...props.allowPlacements !== void 0 ? { allow_placements: props.allowPlacements } : {},
|
|
9045
9048
|
...props.warningOnly !== void 0 ? { warning_only: props.warningOnly } : {},
|
|
9046
9049
|
// @ts-ignore: no idea why this is triggering
|
|
9047
9050
|
radius: props.radius,
|
|
@@ -9057,6 +9060,8 @@ var Keepout = class extends PrimitiveComponent2 {
|
|
|
9057
9060
|
layers,
|
|
9058
9061
|
shape: "rect",
|
|
9059
9062
|
...pcbKeepoutExclusionProps,
|
|
9063
|
+
...props.allowTraces !== void 0 ? { allow_traces: props.allowTraces } : {},
|
|
9064
|
+
...props.allowPlacements !== void 0 ? { allow_placements: props.allowPlacements } : {},
|
|
9060
9065
|
...props.warningOnly !== void 0 ? { warning_only: props.warningOnly } : {},
|
|
9061
9066
|
...isRotated90 ? { width: props.height, height: props.width } : { width: props.width, height: props.height },
|
|
9062
9067
|
// @ts-ignore: no idea why this is triggering
|
|
@@ -11951,6 +11956,8 @@ var createComponentsFromCircuitJson = ({
|
|
|
11951
11956
|
components.push(
|
|
11952
11957
|
new Keepout({
|
|
11953
11958
|
warningOnly: elm.warning_only,
|
|
11959
|
+
allowTraces: elm.allow_traces,
|
|
11960
|
+
allowPlacements: elm.allow_placements,
|
|
11954
11961
|
layers: elm.layers.map((layer) => layer_ref2.parse(layer)),
|
|
11955
11962
|
pcbX: elm.center.x,
|
|
11956
11963
|
pcbY: elm.center.y,
|
|
@@ -11962,6 +11969,8 @@ var createComponentsFromCircuitJson = ({
|
|
|
11962
11969
|
components.push(
|
|
11963
11970
|
new Keepout({
|
|
11964
11971
|
warningOnly: elm.warning_only,
|
|
11972
|
+
allowTraces: elm.allow_traces,
|
|
11973
|
+
allowPlacements: elm.allow_placements,
|
|
11965
11974
|
layers: elm.layers.map((layer) => layer_ref2.parse(layer)),
|
|
11966
11975
|
pcbX: elm.center.x,
|
|
11967
11976
|
pcbY: elm.center.y,
|
|
@@ -54622,19 +54631,29 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
54622
54631
|
continue;
|
|
54623
54632
|
}
|
|
54624
54633
|
handledNetConnectivityKeys.add(netConnectivityKey);
|
|
54625
|
-
const
|
|
54634
|
+
const connectedSourceNets = source_nets.filter(
|
|
54626
54635
|
(sourceNet) => getSourceConnectivityKey(sourceNet.source_net_id) === netConnectivityKey
|
|
54627
|
-
)
|
|
54636
|
+
);
|
|
54637
|
+
const connectedSourceNetIds = connectedSourceNets.map(
|
|
54638
|
+
(sourceNet) => sourceNet.source_net_id
|
|
54639
|
+
);
|
|
54628
54640
|
const connectedSourceTraces = sourceTracesEligibleForNetConnections.filter(
|
|
54629
54641
|
(st) => [st.source_trace_id, ...st.connected_source_net_ids ?? []].some(
|
|
54630
54642
|
(id) => getSourceConnectivityKey(id) === netConnectivityKey
|
|
54631
54643
|
)
|
|
54632
54644
|
);
|
|
54633
|
-
let
|
|
54645
|
+
let nominalTraceWidthForConnection;
|
|
54646
|
+
for (const sourceNet of connectedSourceNets) {
|
|
54647
|
+
if (sourceNet.trace_width === void 0) continue;
|
|
54648
|
+
nominalTraceWidthForConnection = Math.max(
|
|
54649
|
+
nominalTraceWidthForConnection ?? 0,
|
|
54650
|
+
sourceNet.trace_width
|
|
54651
|
+
);
|
|
54652
|
+
}
|
|
54634
54653
|
for (const sourceTrace of connectedSourceTraces) {
|
|
54635
54654
|
if (sourceTrace.min_trace_thickness === void 0) continue;
|
|
54636
|
-
|
|
54637
|
-
|
|
54655
|
+
nominalTraceWidthForConnection = Math.max(
|
|
54656
|
+
nominalTraceWidthForConnection ?? 0,
|
|
54638
54657
|
sourceTrace.min_trace_thickness
|
|
54639
54658
|
);
|
|
54640
54659
|
}
|
|
@@ -54651,8 +54670,8 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
54651
54670
|
}
|
|
54652
54671
|
const connection = {
|
|
54653
54672
|
name: net.source_net_id ?? sharedConnMap.getNetConnectedToId(net.source_net_id),
|
|
54654
|
-
nominalTraceWidth:
|
|
54655
|
-
width:
|
|
54673
|
+
nominalTraceWidth: nominalTraceWidthForConnection,
|
|
54674
|
+
width: nominalTraceWidthForConnection,
|
|
54656
54675
|
pointsToConnect
|
|
54657
54676
|
};
|
|
54658
54677
|
if (pointsToConnect.length === 0) continue;
|
|
@@ -63408,7 +63427,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
63408
63427
|
var package_default = {
|
|
63409
63428
|
name: "@tscircuit/core",
|
|
63410
63429
|
type: "module",
|
|
63411
|
-
version: "0.0.
|
|
63430
|
+
version: "0.0.1942",
|
|
63412
63431
|
types: "dist/index.d.ts",
|
|
63413
63432
|
main: "dist/index.js",
|
|
63414
63433
|
module: "dist/index.js",
|
|
@@ -63444,7 +63463,7 @@ var package_default = {
|
|
|
63444
63463
|
"@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39",
|
|
63445
63464
|
"@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
|
|
63446
63465
|
"@tscircuit/capacity-autorouter": "^0.0.913",
|
|
63447
|
-
"@tscircuit/checks": "^0.0.
|
|
63466
|
+
"@tscircuit/checks": "^0.0.203",
|
|
63448
63467
|
"@tscircuit/circuit-json-util": "^0.0.114",
|
|
63449
63468
|
"@tscircuit/common": "^0.0.20",
|
|
63450
63469
|
"@tscircuit/copper-pour-solver": "^0.0.54",
|
|
@@ -63462,7 +63481,7 @@ var package_default = {
|
|
|
63462
63481
|
"@tscircuit/math-utils": "^0.0.36",
|
|
63463
63482
|
"@tscircuit/miniflex": "^0.0.4",
|
|
63464
63483
|
"@tscircuit/ngspice-spice-engine": "^0.0.20",
|
|
63465
|
-
"@tscircuit/props": "^0.0.
|
|
63484
|
+
"@tscircuit/props": "^0.0.662",
|
|
63466
63485
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
63467
63486
|
"@tscircuit/schematic-trace-solver": "^0.0.201",
|
|
63468
63487
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -63478,7 +63497,7 @@ var package_default = {
|
|
|
63478
63497
|
"bun-match-svg": "0.0.12",
|
|
63479
63498
|
"calculate-elbow": "^0.0.12",
|
|
63480
63499
|
"chokidar-cli": "^3.0.0",
|
|
63481
|
-
"circuit-json": "^0.0.
|
|
63500
|
+
"circuit-json": "^0.0.495",
|
|
63482
63501
|
"circuit-json-to-bpc": "^0.0.13",
|
|
63483
63502
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
63484
63503
|
"circuit-json-to-gltf": "^0.0.128",
|
|
@@ -63541,8 +63560,8 @@ var package_default = {
|
|
|
63541
63560
|
},
|
|
63542
63561
|
overrides: {
|
|
63543
63562
|
"@tscircuit/circuit-json-util": "^0.0.114",
|
|
63544
|
-
"@tscircuit/props": "^0.0.
|
|
63545
|
-
"circuit-json": "^0.0.
|
|
63563
|
+
"@tscircuit/props": "^0.0.662",
|
|
63564
|
+
"circuit-json": "^0.0.495"
|
|
63546
63565
|
}
|
|
63547
63566
|
};
|
|
63548
63567
|
|
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.1943",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39",
|
|
38
38
|
"@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
|
|
39
39
|
"@tscircuit/capacity-autorouter": "^0.0.913",
|
|
40
|
-
"@tscircuit/checks": "^0.0.
|
|
40
|
+
"@tscircuit/checks": "^0.0.203",
|
|
41
41
|
"@tscircuit/circuit-json-util": "^0.0.114",
|
|
42
42
|
"@tscircuit/common": "^0.0.20",
|
|
43
43
|
"@tscircuit/copper-pour-solver": "^0.0.54",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@tscircuit/math-utils": "^0.0.36",
|
|
56
56
|
"@tscircuit/miniflex": "^0.0.4",
|
|
57
57
|
"@tscircuit/ngspice-spice-engine": "^0.0.20",
|
|
58
|
-
"@tscircuit/props": "^0.0.
|
|
58
|
+
"@tscircuit/props": "^0.0.662",
|
|
59
59
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
60
60
|
"@tscircuit/schematic-trace-solver": "^0.0.201",
|
|
61
61
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"bun-match-svg": "0.0.12",
|
|
72
72
|
"calculate-elbow": "^0.0.12",
|
|
73
73
|
"chokidar-cli": "^3.0.0",
|
|
74
|
-
"circuit-json": "^0.0.
|
|
74
|
+
"circuit-json": "^0.0.495",
|
|
75
75
|
"circuit-json-to-bpc": "^0.0.13",
|
|
76
76
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
77
77
|
"circuit-json-to-gltf": "^0.0.128",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
},
|
|
135
135
|
"overrides": {
|
|
136
136
|
"@tscircuit/circuit-json-util": "^0.0.114",
|
|
137
|
-
"@tscircuit/props": "^0.0.
|
|
138
|
-
"circuit-json": "^0.0.
|
|
137
|
+
"@tscircuit/props": "^0.0.662",
|
|
138
|
+
"circuit-json": "^0.0.495"
|
|
139
139
|
}
|
|
140
140
|
}
|