@tscircuit/core 0.0.762 → 0.0.764

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
@@ -32494,16 +32494,8 @@ declare class SchematicRect extends PrimitiveComponent<typeof schematicRectProps
32494
32494
  get config(): {
32495
32495
  componentName: string;
32496
32496
  zodProps: zod.ZodObject<{
32497
- center: zod.ZodObject<{
32498
- x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
32499
- y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
32500
- }, "strip", zod.ZodTypeAny, {
32501
- x: number;
32502
- y: number;
32503
- }, {
32504
- x: string | number;
32505
- y: string | number;
32506
- }>;
32497
+ schX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
32498
+ schY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
32507
32499
  width: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
32508
32500
  height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
32509
32501
  rotation: zod.ZodDefault<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
@@ -32513,25 +32505,21 @@ declare class SchematicRect extends PrimitiveComponent<typeof schematicRectProps
32513
32505
  fillColor: zod.ZodOptional<zod.ZodString>;
32514
32506
  isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
32515
32507
  }, "strip", zod.ZodTypeAny, {
32516
- center: {
32517
- x: number;
32518
- y: number;
32519
- };
32520
32508
  width: number;
32521
32509
  height: number;
32522
32510
  color: string;
32523
32511
  isDashed: boolean;
32524
32512
  isFilled: boolean;
32525
32513
  rotation: number;
32514
+ schX?: number | undefined;
32515
+ schY?: number | undefined;
32526
32516
  strokeWidth?: number | undefined;
32527
32517
  fillColor?: string | undefined;
32528
32518
  }, {
32529
- center: {
32530
- x: string | number;
32531
- y: string | number;
32532
- };
32533
32519
  width: string | number;
32534
32520
  height: string | number;
32521
+ schX?: string | number | undefined;
32522
+ schY?: string | number | undefined;
32535
32523
  strokeWidth?: string | number | undefined;
32536
32524
  color?: string | undefined;
32537
32525
  isDashed?: boolean | undefined;
package/dist/index.js CHANGED
@@ -7845,7 +7845,13 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
7845
7845
  const width = Math.abs(bounds.maxX - bounds.minX);
7846
7846
  const height = Math.abs(bounds.maxY - bounds.minY);
7847
7847
  if (width === 0 && height === 0) return;
7848
+ const centerX = (bounds.minX + bounds.maxX) / 2;
7849
+ const centerY = (bounds.minY + bounds.maxY) / 2;
7848
7850
  db.schematic_component.update(this.schematic_component_id, {
7851
+ center: {
7852
+ x: centerX,
7853
+ y: centerY
7854
+ },
7849
7855
  size: {
7850
7856
  width,
7851
7857
  height
@@ -8302,7 +8308,7 @@ import {
8302
8308
  } from "@tscircuit/props";
8303
8309
 
8304
8310
  // lib/utils/autorouting/CapacityMeshAutorouter.ts
8305
- import { CapacityMeshSolver } from "@tscircuit/capacity-autorouter";
8311
+ import { AutoroutingPipelineSolver } from "@tscircuit/capacity-autorouter";
8306
8312
  var CapacityMeshAutorouter = class {
8307
8313
  input;
8308
8314
  isRouting = false;
@@ -8318,7 +8324,7 @@ var CapacityMeshAutorouter = class {
8318
8324
  constructor(input, options = {}) {
8319
8325
  this.input = input;
8320
8326
  const { capacityDepth, targetMinCapacity, stepDelay = 0 } = options;
8321
- this.solver = new CapacityMeshSolver(input, {
8327
+ this.solver = new AutoroutingPipelineSolver(input, {
8322
8328
  capacityDepth,
8323
8329
  targetMinCapacity,
8324
8330
  cacheProvider: null
@@ -15492,8 +15498,8 @@ var SchematicRect = class extends PrimitiveComponent2 {
15492
15498
  const schematic_component_id = this.getPrimitiveContainer()?.parent?.schematic_component_id;
15493
15499
  const schematic_rect = db.schematic_rect.insert({
15494
15500
  center: {
15495
- x: props.center.x + globalPos.x,
15496
- y: props.center.y + globalPos.y
15501
+ x: globalPos.x,
15502
+ y: globalPos.y
15497
15503
  },
15498
15504
  width: props.width,
15499
15505
  height: props.height,
@@ -15964,7 +15970,7 @@ import { identity as identity6 } from "transformation-matrix";
15964
15970
  var package_default = {
15965
15971
  name: "@tscircuit/core",
15966
15972
  type: "module",
15967
- version: "0.0.761",
15973
+ version: "0.0.763",
15968
15974
  types: "dist/index.d.ts",
15969
15975
  main: "dist/index.js",
15970
15976
  module: "dist/index.js",
@@ -15993,7 +15999,7 @@ var package_default = {
15993
15999
  },
15994
16000
  devDependencies: {
15995
16001
  "@biomejs/biome": "^1.8.3",
15996
- "@tscircuit/capacity-autorouter": "^0.0.123",
16002
+ "@tscircuit/capacity-autorouter": "^0.0.129",
15997
16003
  "@tscircuit/checks": "^0.0.79",
15998
16004
  "@tscircuit/circuit-json-util": "^0.0.67",
15999
16005
  "@tscircuit/footprinter": "^0.0.236",
@@ -16003,7 +16009,7 @@ var package_default = {
16003
16009
  "@tscircuit/matchpack": "^0.0.16",
16004
16010
  "@tscircuit/math-utils": "^0.0.21",
16005
16011
  "@tscircuit/miniflex": "^0.0.4",
16006
- "@tscircuit/props": "0.0.346",
16012
+ "@tscircuit/props": "0.0.349",
16007
16013
  "@tscircuit/schematic-autolayout": "^0.0.6",
16008
16014
  "@tscircuit/schematic-match-adapt": "^0.0.16",
16009
16015
  "@tscircuit/schematic-trace-solver": "^0.0.40",
@@ -16022,7 +16028,7 @@ var package_default = {
16022
16028
  "circuit-json-to-gltf": "^0.0.7",
16023
16029
  "circuit-json-to-simple-3d": "^0.0.9",
16024
16030
  "circuit-json-to-spice": "^0.0.10",
16025
- "circuit-to-svg": "^0.0.217",
16031
+ "circuit-to-svg": "^0.0.221",
16026
16032
  concurrently: "^9.1.2",
16027
16033
  "connectivity-map": "^1.0.0",
16028
16034
  debug: "^4.3.6",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.762",
4
+ "version": "0.0.764",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@biomejs/biome": "^1.8.3",
33
- "@tscircuit/capacity-autorouter": "^0.0.123",
33
+ "@tscircuit/capacity-autorouter": "^0.0.129",
34
34
  "@tscircuit/checks": "^0.0.79",
35
35
  "@tscircuit/circuit-json-util": "^0.0.67",
36
36
  "@tscircuit/footprinter": "^0.0.236",
@@ -40,7 +40,7 @@
40
40
  "@tscircuit/matchpack": "^0.0.16",
41
41
  "@tscircuit/math-utils": "^0.0.21",
42
42
  "@tscircuit/miniflex": "^0.0.4",
43
- "@tscircuit/props": "0.0.346",
43
+ "@tscircuit/props": "0.0.349",
44
44
  "@tscircuit/schematic-autolayout": "^0.0.6",
45
45
  "@tscircuit/schematic-match-adapt": "^0.0.16",
46
46
  "@tscircuit/schematic-trace-solver": "^0.0.40",
@@ -59,7 +59,7 @@
59
59
  "circuit-json-to-gltf": "^0.0.7",
60
60
  "circuit-json-to-simple-3d": "^0.0.9",
61
61
  "circuit-json-to-spice": "^0.0.10",
62
- "circuit-to-svg": "^0.0.217",
62
+ "circuit-to-svg": "^0.0.221",
63
63
  "concurrently": "^9.1.2",
64
64
  "connectivity-map": "^1.0.0",
65
65
  "debug": "^4.3.6",