@tscircuit/core 0.0.1942 → 0.0.1944

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 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
@@ -3167,7 +3167,7 @@ var getObstaclesFromCircuitJson = (circuitJson, connMap) => {
3167
3167
  }
3168
3168
  }
3169
3169
  } else if (element.type === "pcb_keepout") {
3170
- if (element.warning_only) continue;
3170
+ if (element.warning_only || element.allow_traces) continue;
3171
3171
  if (element.shape === "circle") {
3172
3172
  obstacles.push({
3173
3173
  componentId: pcbComponentId,
@@ -9043,6 +9043,8 @@ var Keepout = class extends PrimitiveComponent2 {
9043
9043
  layers,
9044
9044
  shape: "circle",
9045
9045
  ...pcbKeepoutExclusionProps,
9046
+ ...props.allowTraces !== void 0 ? { allow_traces: props.allowTraces } : {},
9047
+ ...props.allowPlacements !== void 0 ? { allow_placements: props.allowPlacements } : {},
9046
9048
  ...props.warningOnly !== void 0 ? { warning_only: props.warningOnly } : {},
9047
9049
  // @ts-ignore: no idea why this is triggering
9048
9050
  radius: props.radius,
@@ -9058,6 +9060,8 @@ var Keepout = class extends PrimitiveComponent2 {
9058
9060
  layers,
9059
9061
  shape: "rect",
9060
9062
  ...pcbKeepoutExclusionProps,
9063
+ ...props.allowTraces !== void 0 ? { allow_traces: props.allowTraces } : {},
9064
+ ...props.allowPlacements !== void 0 ? { allow_placements: props.allowPlacements } : {},
9061
9065
  ...props.warningOnly !== void 0 ? { warning_only: props.warningOnly } : {},
9062
9066
  ...isRotated90 ? { width: props.height, height: props.width } : { width: props.width, height: props.height },
9063
9067
  // @ts-ignore: no idea why this is triggering
@@ -11952,6 +11956,8 @@ var createComponentsFromCircuitJson = ({
11952
11956
  components.push(
11953
11957
  new Keepout({
11954
11958
  warningOnly: elm.warning_only,
11959
+ allowTraces: elm.allow_traces,
11960
+ allowPlacements: elm.allow_placements,
11955
11961
  layers: elm.layers.map((layer) => layer_ref2.parse(layer)),
11956
11962
  pcbX: elm.center.x,
11957
11963
  pcbY: elm.center.y,
@@ -11963,6 +11969,8 @@ var createComponentsFromCircuitJson = ({
11963
11969
  components.push(
11964
11970
  new Keepout({
11965
11971
  warningOnly: elm.warning_only,
11972
+ allowTraces: elm.allow_traces,
11973
+ allowPlacements: elm.allow_placements,
11966
11974
  layers: elm.layers.map((layer) => layer_ref2.parse(layer)),
11967
11975
  pcbX: elm.center.x,
11968
11976
  pcbY: elm.center.y,
@@ -53607,6 +53615,9 @@ var resolvePointToPointConnection = (differentialPair, connectionSelector) => {
53607
53615
  (sourcePort) => sourcePort.subcircuit_connectivity_map_key === connectivityMapKey
53608
53616
  );
53609
53617
  return {
53618
+ sourceTraceIds: subcircuitSourceTraces.filter(
53619
+ (trace) => trace.subcircuit_connectivity_map_key === connectivityMapKey
53620
+ ).map((trace) => trace.source_trace_id),
53610
53621
  sourcePorts,
53611
53622
  sourceTraceName: matchingSourceTraces.length > 0 ? connectionSelector : void 0
53612
53623
  };
@@ -53649,6 +53660,8 @@ var DifferentialPair_doInitialSourceDesignRuleChecks = (differentialPair) => {
53649
53660
  name: sourceComponent.name
53650
53661
  });
53651
53662
  }
53663
+ const memberTraceIds = [];
53664
+ let resolvedPolarityCount = 0;
53652
53665
  for (const connectionPolarity of ["positive", "negative"]) {
53653
53666
  let connectionSelector = differentialPair._parsedProps.negativeConnection;
53654
53667
  if (connectionPolarity === "positive") {
@@ -53659,6 +53672,8 @@ var DifferentialPair_doInitialSourceDesignRuleChecks = (differentialPair) => {
53659
53672
  connectionSelector
53660
53673
  );
53661
53674
  if (!resolvedConnection) continue;
53675
+ resolvedPolarityCount++;
53676
+ memberTraceIds.push(...resolvedConnection.sourceTraceIds);
53662
53677
  const terminalSourcePorts = resolvedConnection.sourcePorts;
53663
53678
  if (terminalSourcePorts.length === 2) continue;
53664
53679
  let warningSourceComponentId = "";
@@ -53688,6 +53703,14 @@ var DifferentialPair_doInitialSourceDesignRuleChecks = (differentialPair) => {
53688
53703
  subcircuit_id: differentialPair.getSubcircuit().subcircuit_id ?? void 0
53689
53704
  });
53690
53705
  }
53706
+ if (resolvedPolarityCount === 2 && memberTraceIds.length > 0) {
53707
+ db.source_bus.insert({
53708
+ name: differentialPair.name,
53709
+ source_trace_ids: [...new Set(memberTraceIds)],
53710
+ max_length_skew: differentialPair._parsedProps.maxLengthSkew,
53711
+ subcircuit_id: differentialPair.getSubcircuit().subcircuit_id ?? void 0
53712
+ });
53713
+ }
53691
53714
  };
53692
53715
 
53693
53716
  // lib/components/primitive-components/DifferentialPair.ts
@@ -63419,7 +63442,7 @@ function Group_getRoutingPhasePlans(group) {
63419
63442
  var package_default = {
63420
63443
  name: "@tscircuit/core",
63421
63444
  type: "module",
63422
- version: "0.0.1941",
63445
+ version: "0.0.1943",
63423
63446
  types: "dist/index.d.ts",
63424
63447
  main: "dist/index.js",
63425
63448
  module: "dist/index.js",
@@ -63455,7 +63478,7 @@ var package_default = {
63455
63478
  "@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39",
63456
63479
  "@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
63457
63480
  "@tscircuit/capacity-autorouter": "^0.0.913",
63458
- "@tscircuit/checks": "^0.0.202",
63481
+ "@tscircuit/checks": "^0.0.203",
63459
63482
  "@tscircuit/circuit-json-util": "^0.0.114",
63460
63483
  "@tscircuit/common": "^0.0.20",
63461
63484
  "@tscircuit/copper-pour-solver": "^0.0.54",
@@ -63473,7 +63496,7 @@ var package_default = {
63473
63496
  "@tscircuit/math-utils": "^0.0.36",
63474
63497
  "@tscircuit/miniflex": "^0.0.4",
63475
63498
  "@tscircuit/ngspice-spice-engine": "^0.0.20",
63476
- "@tscircuit/props": "^0.0.661",
63499
+ "@tscircuit/props": "^0.0.662",
63477
63500
  "@tscircuit/schematic-match-adapt": "^0.0.18",
63478
63501
  "@tscircuit/schematic-trace-solver": "^0.0.201",
63479
63502
  "@tscircuit/solver-utils": "^0.0.16",
@@ -63489,7 +63512,7 @@ var package_default = {
63489
63512
  "bun-match-svg": "0.0.12",
63490
63513
  "calculate-elbow": "^0.0.12",
63491
63514
  "chokidar-cli": "^3.0.0",
63492
- "circuit-json": "^0.0.494",
63515
+ "circuit-json": "^0.0.495",
63493
63516
  "circuit-json-to-bpc": "^0.0.13",
63494
63517
  "circuit-json-to-connectivity-map": "^0.0.30",
63495
63518
  "circuit-json-to-gltf": "^0.0.128",
@@ -63552,8 +63575,8 @@ var package_default = {
63552
63575
  },
63553
63576
  overrides: {
63554
63577
  "@tscircuit/circuit-json-util": "^0.0.114",
63555
- "@tscircuit/props": "^0.0.661",
63556
- "circuit-json": "^0.0.494"
63578
+ "@tscircuit/props": "^0.0.662",
63579
+ "circuit-json": "^0.0.495"
63557
63580
  }
63558
63581
  };
63559
63582
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1942",
4
+ "version": "0.0.1944",
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.202",
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.661",
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.494",
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.661",
138
- "circuit-json": "^0.0.494"
137
+ "@tscircuit/props": "^0.0.662",
138
+ "circuit-json": "^0.0.495"
139
139
  }
140
140
  }