@tscircuit/3d-viewer 0.0.409 → 0.0.410

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.
Files changed (2) hide show
  1. package/dist/index.js +1573 -1091
  2. package/package.json +10 -6
package/dist/index.js CHANGED
@@ -144,8 +144,8 @@ var require_dist = __commonJS({
144
144
  fromValues: (x, y) => [x, y]
145
145
  },
146
146
  vec3: {
147
- create: (x, y, z105) => [x, y, z105],
148
- fromValues: (x, y, z105) => [x, y, z105]
147
+ create: (x, y, z126) => [x, y, z126],
148
+ fromValues: (x, y, z126) => [x, y, z126]
149
149
  }
150
150
  },
151
151
  geometries: {
@@ -532,29 +532,29 @@ var require_fromRotation = __commonJS({
532
532
  var { sin: sin2, cos: cos2 } = require_trigonometry();
533
533
  var identity = require_identity();
534
534
  var fromRotation = (out, rad, axis) => {
535
- let [x, y, z105] = axis;
536
- const lengthSquared = x * x + y * y + z105 * z105;
535
+ let [x, y, z126] = axis;
536
+ const lengthSquared = x * x + y * y + z126 * z126;
537
537
  if (Math.abs(lengthSquared) < EPS) {
538
538
  return identity(out);
539
539
  }
540
540
  const len = 1 / Math.sqrt(lengthSquared);
541
541
  x *= len;
542
542
  y *= len;
543
- z105 *= len;
543
+ z126 *= len;
544
544
  const s = sin2(rad);
545
545
  const c = cos2(rad);
546
546
  const t = 1 - c;
547
547
  out[0] = x * x * t + c;
548
- out[1] = y * x * t + z105 * s;
549
- out[2] = z105 * x * t - y * s;
548
+ out[1] = y * x * t + z126 * s;
549
+ out[2] = z126 * x * t - y * s;
550
550
  out[3] = 0;
551
- out[4] = x * y * t - z105 * s;
551
+ out[4] = x * y * t - z126 * s;
552
552
  out[5] = y * y * t + c;
553
- out[6] = z105 * y * t + x * s;
553
+ out[6] = z126 * y * t + x * s;
554
554
  out[7] = 0;
555
- out[8] = x * z105 * t + y * s;
556
- out[9] = y * z105 * t - x * s;
557
- out[10] = z105 * z105 * t + c;
555
+ out[8] = x * z126 * t + y * s;
556
+ out[9] = y * z126 * t - x * s;
557
+ out[10] = z126 * z126 * t + c;
558
558
  out[11] = 0;
559
559
  out[12] = 0;
560
560
  out[13] = 0;
@@ -808,8 +808,8 @@ var require_distance = __commonJS({
808
808
  var distance2 = (a, b) => {
809
809
  const x = b[0] - a[0];
810
810
  const y = b[1] - a[1];
811
- const z105 = b[2] - a[2];
812
- return Math.sqrt(x * x + y * y + z105 * z105);
811
+ const z126 = b[2] - a[2];
812
+ return Math.sqrt(x * x + y * y + z126 * z126);
813
813
  };
814
814
  module.exports = distance2;
815
815
  }
@@ -857,11 +857,11 @@ var require_fromValues2 = __commonJS({
857
857
  "node_modules/@jscad/modeling/src/maths/vec3/fromValues.js"(exports, module) {
858
858
  "use strict";
859
859
  var create = require_create2();
860
- var fromValues = (x, y, z105) => {
860
+ var fromValues = (x, y, z126) => {
861
861
  const out = create();
862
862
  out[0] = x;
863
863
  out[1] = y;
864
- out[2] = z105;
864
+ out[2] = z126;
865
865
  return out;
866
866
  };
867
867
  module.exports = fromValues;
@@ -872,10 +872,10 @@ var require_fromValues2 = __commonJS({
872
872
  var require_fromVec2 = __commonJS({
873
873
  "node_modules/@jscad/modeling/src/maths/vec3/fromVec2.js"(exports, module) {
874
874
  "use strict";
875
- var fromVector2 = (out, vector, z105 = 0) => {
875
+ var fromVector2 = (out, vector, z126 = 0) => {
876
876
  out[0] = vector[0];
877
877
  out[1] = vector[1];
878
- out[2] = z105;
878
+ out[2] = z126;
879
879
  return out;
880
880
  };
881
881
  module.exports = fromVector2;
@@ -889,8 +889,8 @@ var require_length = __commonJS({
889
889
  var length2 = (vector) => {
890
890
  const x = vector[0];
891
891
  const y = vector[1];
892
- const z105 = vector[2];
893
- return Math.sqrt(x * x + y * y + z105 * z105);
892
+ const z126 = vector[2];
893
+ return Math.sqrt(x * x + y * y + z126 * z126);
894
894
  };
895
895
  module.exports = length2;
896
896
  }
@@ -973,14 +973,14 @@ var require_normalize = __commonJS({
973
973
  var normalize = (out, vector) => {
974
974
  const x = vector[0];
975
975
  const y = vector[1];
976
- const z105 = vector[2];
977
- let len = x * x + y * y + z105 * z105;
976
+ const z126 = vector[2];
977
+ let len = x * x + y * y + z126 * z126;
978
978
  if (len > 0) {
979
979
  len = 1 / Math.sqrt(len);
980
980
  }
981
981
  out[0] = x * len;
982
982
  out[1] = y * len;
983
- out[2] = z105 * len;
983
+ out[2] = z126 * len;
984
984
  return out;
985
985
  };
986
986
  module.exports = normalize;
@@ -1104,8 +1104,8 @@ var require_squaredDistance = __commonJS({
1104
1104
  var squaredDistance = (a, b) => {
1105
1105
  const x = b[0] - a[0];
1106
1106
  const y = b[1] - a[1];
1107
- const z105 = b[2] - a[2];
1108
- return x * x + y * y + z105 * z105;
1107
+ const z126 = b[2] - a[2];
1108
+ return x * x + y * y + z126 * z126;
1109
1109
  };
1110
1110
  module.exports = squaredDistance;
1111
1111
  }
@@ -1118,8 +1118,8 @@ var require_squaredLength = __commonJS({
1118
1118
  var squaredLength = (vector) => {
1119
1119
  const x = vector[0];
1120
1120
  const y = vector[1];
1121
- const z105 = vector[2];
1122
- return x * x + y * y + z105 * z105;
1121
+ const z126 = vector[2];
1122
+ return x * x + y * y + z126 * z126;
1123
1123
  };
1124
1124
  module.exports = squaredLength;
1125
1125
  }
@@ -1155,12 +1155,12 @@ var require_transform = __commonJS({
1155
1155
  var transform2 = (out, vector, matrix) => {
1156
1156
  const x = vector[0];
1157
1157
  const y = vector[1];
1158
- const z105 = vector[2];
1159
- let w = matrix[3] * x + matrix[7] * y + matrix[11] * z105 + matrix[15];
1158
+ const z126 = vector[2];
1159
+ let w = matrix[3] * x + matrix[7] * y + matrix[11] * z126 + matrix[15];
1160
1160
  w = w || 1;
1161
- out[0] = (matrix[0] * x + matrix[4] * y + matrix[8] * z105 + matrix[12]) / w;
1162
- out[1] = (matrix[1] * x + matrix[5] * y + matrix[9] * z105 + matrix[13]) / w;
1163
- out[2] = (matrix[2] * x + matrix[6] * y + matrix[10] * z105 + matrix[14]) / w;
1161
+ out[0] = (matrix[0] * x + matrix[4] * y + matrix[8] * z126 + matrix[12]) / w;
1162
+ out[1] = (matrix[1] * x + matrix[5] * y + matrix[9] * z126 + matrix[13]) / w;
1163
+ out[2] = (matrix[2] * x + matrix[6] * y + matrix[10] * z126 + matrix[14]) / w;
1164
1164
  return out;
1165
1165
  };
1166
1166
  module.exports = transform2;
@@ -1362,8 +1362,8 @@ var require_isMirroring = __commonJS({
1362
1362
  var isMirroring = (matrix) => {
1363
1363
  const x = matrix[4] * matrix[9] - matrix[8] * matrix[5];
1364
1364
  const y = matrix[8] * matrix[1] - matrix[0] * matrix[9];
1365
- const z105 = matrix[0] * matrix[5] - matrix[4] * matrix[1];
1366
- const d = x * matrix[2] + y * matrix[6] + z105 * matrix[10];
1365
+ const z126 = matrix[0] * matrix[5] - matrix[4] * matrix[1];
1366
+ const d = x * matrix[2] + y * matrix[6] + z126 * matrix[10];
1367
1367
  return d < 0;
1368
1368
  };
1369
1369
  module.exports = isMirroring;
@@ -1465,15 +1465,15 @@ var require_rotate = __commonJS({
1465
1465
  var { sin: sin2, cos: cos2 } = require_trigonometry();
1466
1466
  var copy = require_copy();
1467
1467
  var rotate2 = (out, matrix, radians, axis) => {
1468
- let [x, y, z105] = axis;
1469
- const lengthSquared = x * x + y * y + z105 * z105;
1468
+ let [x, y, z126] = axis;
1469
+ const lengthSquared = x * x + y * y + z126 * z126;
1470
1470
  if (Math.abs(lengthSquared) < EPS) {
1471
1471
  return copy(out, matrix);
1472
1472
  }
1473
1473
  const len = 1 / Math.sqrt(lengthSquared);
1474
1474
  x *= len;
1475
1475
  y *= len;
1476
- z105 *= len;
1476
+ z126 *= len;
1477
1477
  const s = sin2(radians);
1478
1478
  const c = cos2(radians);
1479
1479
  const t = 1 - c;
@@ -1490,14 +1490,14 @@ var require_rotate = __commonJS({
1490
1490
  const a22 = matrix[10];
1491
1491
  const a23 = matrix[11];
1492
1492
  const b00 = x * x * t + c;
1493
- const b01 = y * x * t + z105 * s;
1494
- const b02 = z105 * x * t - y * s;
1495
- const b10 = x * y * t - z105 * s;
1493
+ const b01 = y * x * t + z126 * s;
1494
+ const b02 = z126 * x * t - y * s;
1495
+ const b10 = x * y * t - z126 * s;
1496
1496
  const b11 = y * y * t + c;
1497
- const b12 = z105 * y * t + x * s;
1498
- const b20 = x * z105 * t + y * s;
1499
- const b21 = y * z105 * t - x * s;
1500
- const b22 = z105 * z105 * t + c;
1497
+ const b12 = z126 * y * t + x * s;
1498
+ const b20 = x * z126 * t + y * s;
1499
+ const b21 = y * z126 * t - x * s;
1500
+ const b22 = z126 * z126 * t + c;
1501
1501
  out[0] = a00 * b00 + a10 * b01 + a20 * b02;
1502
1502
  out[1] = a01 * b00 + a11 * b01 + a21 * b02;
1503
1503
  out[2] = a02 * b00 + a12 * b01 + a22 * b02;
@@ -1649,7 +1649,7 @@ var require_scale2 = __commonJS({
1649
1649
  var scale2 = (out, matrix, dimensions) => {
1650
1650
  const x = dimensions[0];
1651
1651
  const y = dimensions[1];
1652
- const z105 = dimensions[2];
1652
+ const z126 = dimensions[2];
1653
1653
  out[0] = matrix[0] * x;
1654
1654
  out[1] = matrix[1] * x;
1655
1655
  out[2] = matrix[2] * x;
@@ -1658,10 +1658,10 @@ var require_scale2 = __commonJS({
1658
1658
  out[5] = matrix[5] * y;
1659
1659
  out[6] = matrix[6] * y;
1660
1660
  out[7] = matrix[7] * y;
1661
- out[8] = matrix[8] * z105;
1662
- out[9] = matrix[9] * z105;
1663
- out[10] = matrix[10] * z105;
1664
- out[11] = matrix[11] * z105;
1661
+ out[8] = matrix[8] * z126;
1662
+ out[9] = matrix[9] * z126;
1663
+ out[10] = matrix[10] * z126;
1664
+ out[11] = matrix[11] * z126;
1665
1665
  out[12] = matrix[12];
1666
1666
  out[13] = matrix[13];
1667
1667
  out[14] = matrix[14];
@@ -1715,7 +1715,7 @@ var require_translate = __commonJS({
1715
1715
  var translate6 = (out, matrix, offsets) => {
1716
1716
  const x = offsets[0];
1717
1717
  const y = offsets[1];
1718
- const z105 = offsets[2];
1718
+ const z126 = offsets[2];
1719
1719
  let a00;
1720
1720
  let a01;
1721
1721
  let a02;
@@ -1729,10 +1729,10 @@ var require_translate = __commonJS({
1729
1729
  let a22;
1730
1730
  let a23;
1731
1731
  if (matrix === out) {
1732
- out[12] = matrix[0] * x + matrix[4] * y + matrix[8] * z105 + matrix[12];
1733
- out[13] = matrix[1] * x + matrix[5] * y + matrix[9] * z105 + matrix[13];
1734
- out[14] = matrix[2] * x + matrix[6] * y + matrix[10] * z105 + matrix[14];
1735
- out[15] = matrix[3] * x + matrix[7] * y + matrix[11] * z105 + matrix[15];
1732
+ out[12] = matrix[0] * x + matrix[4] * y + matrix[8] * z126 + matrix[12];
1733
+ out[13] = matrix[1] * x + matrix[5] * y + matrix[9] * z126 + matrix[13];
1734
+ out[14] = matrix[2] * x + matrix[6] * y + matrix[10] * z126 + matrix[14];
1735
+ out[15] = matrix[3] * x + matrix[7] * y + matrix[11] * z126 + matrix[15];
1736
1736
  } else {
1737
1737
  a00 = matrix[0];
1738
1738
  a01 = matrix[1];
@@ -1758,10 +1758,10 @@ var require_translate = __commonJS({
1758
1758
  out[9] = a21;
1759
1759
  out[10] = a22;
1760
1760
  out[11] = a23;
1761
- out[12] = a00 * x + a10 * y + a20 * z105 + matrix[12];
1762
- out[13] = a01 * x + a11 * y + a21 * z105 + matrix[13];
1763
- out[14] = a02 * x + a12 * y + a22 * z105 + matrix[14];
1764
- out[15] = a03 * x + a13 * y + a23 * z105 + matrix[15];
1761
+ out[12] = a00 * x + a10 * y + a20 * z126 + matrix[12];
1762
+ out[13] = a01 * x + a11 * y + a21 * z126 + matrix[13];
1763
+ out[14] = a02 * x + a12 * y + a22 * z126 + matrix[14];
1764
+ out[15] = a03 * x + a13 * y + a23 * z126 + matrix[15];
1765
1765
  }
1766
1766
  return out;
1767
1767
  };
@@ -2534,27 +2534,27 @@ var require_toCompactBinary = __commonJS({
2534
2534
  "use strict";
2535
2535
  var toCompactBinary = (geometry) => {
2536
2536
  const sides = geometry.sides;
2537
- const transforms2 = geometry.transforms;
2537
+ const transforms = geometry.transforms;
2538
2538
  let color = [-1, -1, -1, -1];
2539
2539
  if (geometry.color) color = geometry.color;
2540
2540
  const compacted = new Float32Array(1 + 16 + 4 + sides.length * 4);
2541
2541
  compacted[0] = 0;
2542
- compacted[1] = transforms2[0];
2543
- compacted[2] = transforms2[1];
2544
- compacted[3] = transforms2[2];
2545
- compacted[4] = transforms2[3];
2546
- compacted[5] = transforms2[4];
2547
- compacted[6] = transforms2[5];
2548
- compacted[7] = transforms2[6];
2549
- compacted[8] = transforms2[7];
2550
- compacted[9] = transforms2[8];
2551
- compacted[10] = transforms2[9];
2552
- compacted[11] = transforms2[10];
2553
- compacted[12] = transforms2[11];
2554
- compacted[13] = transforms2[12];
2555
- compacted[14] = transforms2[13];
2556
- compacted[15] = transforms2[14];
2557
- compacted[16] = transforms2[15];
2542
+ compacted[1] = transforms[0];
2543
+ compacted[2] = transforms[1];
2544
+ compacted[3] = transforms[2];
2545
+ compacted[4] = transforms[3];
2546
+ compacted[5] = transforms[4];
2547
+ compacted[6] = transforms[5];
2548
+ compacted[7] = transforms[6];
2549
+ compacted[8] = transforms[7];
2550
+ compacted[9] = transforms[8];
2551
+ compacted[10] = transforms[9];
2552
+ compacted[11] = transforms[10];
2553
+ compacted[12] = transforms[11];
2554
+ compacted[13] = transforms[12];
2555
+ compacted[14] = transforms[13];
2556
+ compacted[15] = transforms[14];
2557
+ compacted[16] = transforms[15];
2558
2558
  compacted[17] = color[0];
2559
2559
  compacted[18] = color[1];
2560
2560
  compacted[19] = color[2];
@@ -2581,8 +2581,8 @@ var require_transform3 = __commonJS({
2581
2581
  var mat4 = require_mat4();
2582
2582
  var reverse = require_reverse();
2583
2583
  var transform2 = (matrix, geometry) => {
2584
- const transforms2 = mat4.multiply(mat4.create(), matrix, geometry.transforms);
2585
- const transformed = Object.assign({}, geometry, { transforms: transforms2 });
2584
+ const transforms = mat4.multiply(mat4.create(), matrix, geometry.transforms);
2585
+ const transformed = Object.assign({}, geometry, { transforms });
2586
2586
  if (matrix[0] * matrix[5] - matrix[4] * matrix[1] < 0) {
2587
2587
  return reverse(transformed);
2588
2588
  }
@@ -3831,11 +3831,11 @@ var require_fromValues4 = __commonJS({
3831
3831
  "node_modules/@jscad/modeling/src/maths/vec4/fromValues.js"(exports, module) {
3832
3832
  "use strict";
3833
3833
  var create = require_create7();
3834
- var fromValues = (x, y, z105, w) => {
3834
+ var fromValues = (x, y, z126, w) => {
3835
3835
  const out = create();
3836
3836
  out[0] = x;
3837
3837
  out[1] = y;
3838
- out[2] = z105;
3838
+ out[2] = z126;
3839
3839
  out[3] = w;
3840
3840
  return out;
3841
3841
  };
@@ -3993,8 +3993,8 @@ var require_projectionOfPoint = __commonJS({
3993
3993
  const a = point2[0] * plane[0] + point2[1] * plane[1] + point2[2] * plane[2] - plane[3];
3994
3994
  const x = point2[0] - a * plane[0];
3995
3995
  const y = point2[1] - a * plane[1];
3996
- const z105 = point2[2] - a * plane[2];
3997
- return vec3.fromValues(x, y, z105);
3996
+ const z126 = point2[2] - a * plane[2];
3997
+ return vec3.fromValues(x, y, z126);
3998
3998
  };
3999
3999
  module.exports = projectionOfPoint;
4000
4000
  }
@@ -4298,11 +4298,11 @@ var require_transform5 = __commonJS({
4298
4298
  "node_modules/@jscad/modeling/src/maths/vec4/transform.js"(exports, module) {
4299
4299
  "use strict";
4300
4300
  var transform2 = (out, vector, matrix) => {
4301
- const [x, y, z105, w] = vector;
4302
- out[0] = matrix[0] * x + matrix[4] * y + matrix[8] * z105 + matrix[12] * w;
4303
- out[1] = matrix[1] * x + matrix[5] * y + matrix[9] * z105 + matrix[13] * w;
4304
- out[2] = matrix[2] * x + matrix[6] * y + matrix[10] * z105 + matrix[14] * w;
4305
- out[3] = matrix[3] * x + matrix[7] * y + matrix[11] * z105 + matrix[15] * w;
4301
+ const [x, y, z126, w] = vector;
4302
+ out[0] = matrix[0] * x + matrix[4] * y + matrix[8] * z126 + matrix[12] * w;
4303
+ out[1] = matrix[1] * x + matrix[5] * y + matrix[9] * z126 + matrix[13] * w;
4304
+ out[2] = matrix[2] * x + matrix[6] * y + matrix[10] * z126 + matrix[14] * w;
4305
+ out[3] = matrix[3] * x + matrix[7] * y + matrix[11] * z126 + matrix[15] * w;
4306
4306
  return out;
4307
4307
  };
4308
4308
  module.exports = transform2;
@@ -4364,8 +4364,8 @@ var require_measureBoundingSphere = __commonJS({
4364
4364
  out[2] = (minz[2] + maxz[2]) * 0.5;
4365
4365
  const x = out[0] - maxx[0];
4366
4366
  const y = out[1] - maxy[1];
4367
- const z105 = out[2] - maxz[2];
4368
- out[3] = Math.sqrt(x * x + y * y + z105 * z105);
4367
+ const z126 = out[2] - maxz[2];
4368
+ out[3] = Math.sqrt(x * x + y * y + z126 * z126);
4369
4369
  cache.set(polygon3, out);
4370
4370
  return out;
4371
4371
  };
@@ -4687,29 +4687,29 @@ var require_toCompactBinary2 = __commonJS({
4687
4687
  var poly3 = require_poly3();
4688
4688
  var toCompactBinary = (geometry) => {
4689
4689
  const polygons = geometry.polygons;
4690
- const transforms2 = geometry.transforms;
4690
+ const transforms = geometry.transforms;
4691
4691
  const numberOfPolygons = polygons.length;
4692
4692
  const numberOfVertices = polygons.reduce((count, polygon3) => count + polygon3.vertices.length, 0);
4693
4693
  let color = [-1, -1, -1, -1];
4694
4694
  if (geometry.color) color = geometry.color;
4695
4695
  const compacted = new Float32Array(1 + 16 + 4 + 1 + numberOfPolygons + numberOfVertices * 3);
4696
4696
  compacted[0] = 1;
4697
- compacted[1] = transforms2[0];
4698
- compacted[2] = transforms2[1];
4699
- compacted[3] = transforms2[2];
4700
- compacted[4] = transforms2[3];
4701
- compacted[5] = transforms2[4];
4702
- compacted[6] = transforms2[5];
4703
- compacted[7] = transforms2[6];
4704
- compacted[8] = transforms2[7];
4705
- compacted[9] = transforms2[8];
4706
- compacted[10] = transforms2[9];
4707
- compacted[11] = transforms2[10];
4708
- compacted[12] = transforms2[11];
4709
- compacted[13] = transforms2[12];
4710
- compacted[14] = transforms2[13];
4711
- compacted[15] = transforms2[14];
4712
- compacted[16] = transforms2[15];
4697
+ compacted[1] = transforms[0];
4698
+ compacted[2] = transforms[1];
4699
+ compacted[3] = transforms[2];
4700
+ compacted[4] = transforms[3];
4701
+ compacted[5] = transforms[4];
4702
+ compacted[6] = transforms[5];
4703
+ compacted[7] = transforms[6];
4704
+ compacted[8] = transforms[7];
4705
+ compacted[9] = transforms[8];
4706
+ compacted[10] = transforms[9];
4707
+ compacted[11] = transforms[10];
4708
+ compacted[12] = transforms[11];
4709
+ compacted[13] = transforms[12];
4710
+ compacted[14] = transforms[13];
4711
+ compacted[15] = transforms[14];
4712
+ compacted[16] = transforms[15];
4713
4713
  compacted[17] = color[0];
4714
4714
  compacted[18] = color[1];
4715
4715
  compacted[19] = color[2];
@@ -4741,8 +4741,8 @@ var require_transform7 = __commonJS({
4741
4741
  "use strict";
4742
4742
  var mat4 = require_mat4();
4743
4743
  var transform2 = (matrix, geometry) => {
4744
- const transforms2 = mat4.multiply(mat4.create(), matrix, geometry.transforms);
4745
- return Object.assign({}, geometry, { transforms: transforms2 });
4744
+ const transforms = mat4.multiply(mat4.create(), matrix, geometry.transforms);
4745
+ return Object.assign({}, geometry, { transforms });
4746
4746
  };
4747
4747
  module.exports = transform2;
4748
4748
  }
@@ -5290,27 +5290,27 @@ var require_toCompactBinary3 = __commonJS({
5290
5290
  "use strict";
5291
5291
  var toCompactBinary = (geometry) => {
5292
5292
  const points = geometry.points;
5293
- const transforms2 = geometry.transforms;
5293
+ const transforms = geometry.transforms;
5294
5294
  let color = [-1, -1, -1, -1];
5295
5295
  if (geometry.color) color = geometry.color;
5296
5296
  const compacted = new Float32Array(1 + 16 + 1 + 4 + points.length * 2);
5297
5297
  compacted[0] = 2;
5298
- compacted[1] = transforms2[0];
5299
- compacted[2] = transforms2[1];
5300
- compacted[3] = transforms2[2];
5301
- compacted[4] = transforms2[3];
5302
- compacted[5] = transforms2[4];
5303
- compacted[6] = transforms2[5];
5304
- compacted[7] = transforms2[6];
5305
- compacted[8] = transforms2[7];
5306
- compacted[9] = transforms2[8];
5307
- compacted[10] = transforms2[9];
5308
- compacted[11] = transforms2[10];
5309
- compacted[12] = transforms2[11];
5310
- compacted[13] = transforms2[12];
5311
- compacted[14] = transforms2[13];
5312
- compacted[15] = transforms2[14];
5313
- compacted[16] = transforms2[15];
5298
+ compacted[1] = transforms[0];
5299
+ compacted[2] = transforms[1];
5300
+ compacted[3] = transforms[2];
5301
+ compacted[4] = transforms[3];
5302
+ compacted[5] = transforms[4];
5303
+ compacted[6] = transforms[5];
5304
+ compacted[7] = transforms[6];
5305
+ compacted[8] = transforms[7];
5306
+ compacted[9] = transforms[8];
5307
+ compacted[10] = transforms[9];
5308
+ compacted[11] = transforms[10];
5309
+ compacted[12] = transforms[11];
5310
+ compacted[13] = transforms[12];
5311
+ compacted[14] = transforms[13];
5312
+ compacted[15] = transforms[14];
5313
+ compacted[16] = transforms[15];
5314
5314
  compacted[17] = geometry.isClosed ? 1 : 0;
5315
5315
  compacted[18] = color[0];
5316
5316
  compacted[19] = color[1];
@@ -5334,8 +5334,8 @@ var require_transform8 = __commonJS({
5334
5334
  "use strict";
5335
5335
  var mat4 = require_mat4();
5336
5336
  var transform2 = (matrix, geometry) => {
5337
- const transforms2 = mat4.multiply(mat4.create(), matrix, geometry.transforms);
5338
- return Object.assign({}, geometry, { transforms: transforms2 });
5337
+ const transforms = mat4.multiply(mat4.create(), matrix, geometry.transforms);
5338
+ return Object.assign({}, geometry, { transforms });
5339
5339
  };
5340
5340
  module.exports = transform2;
5341
5341
  }
@@ -6901,10 +6901,10 @@ var require_measureArea3 = __commonJS({
6901
6901
  cache.set(geometry, area);
6902
6902
  return area;
6903
6903
  };
6904
- var measureArea = (...geometries2) => {
6905
- geometries2 = flatten(geometries2);
6906
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
6907
- const results = geometries2.map((geometry) => {
6904
+ var measureArea = (...geometries) => {
6905
+ geometries = flatten(geometries);
6906
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
6907
+ const results = geometries.map((geometry) => {
6908
6908
  if (path2.isA(geometry)) return measureAreaOfPath2(geometry);
6909
6909
  if (geom2.isA(geometry)) return measureAreaOfGeom2(geometry);
6910
6910
  if (geom3.isA(geometry)) return measureAreaOfGeom3(geometry);
@@ -6922,11 +6922,11 @@ var require_measureAggregateArea = __commonJS({
6922
6922
  "use strict";
6923
6923
  var flatten = require_flatten();
6924
6924
  var measureArea = require_measureArea3();
6925
- var measureAggregateArea = (...geometries2) => {
6926
- geometries2 = flatten(geometries2);
6927
- if (geometries2.length === 0) throw new Error("measureAggregateArea: no geometries supplied");
6928
- const areas = measureArea(geometries2);
6929
- if (geometries2.length === 1) {
6925
+ var measureAggregateArea = (...geometries) => {
6926
+ geometries = flatten(geometries);
6927
+ if (geometries.length === 0) throw new Error("measureAggregateArea: no geometries supplied");
6928
+ const areas = measureArea(geometries);
6929
+ if (geometries.length === 1) {
6930
6930
  return areas;
6931
6931
  }
6932
6932
  const result = 0;
@@ -7012,10 +7012,10 @@ var require_measureBoundingBox2 = __commonJS({
7012
7012
  cache.set(geometry, boundingBox);
7013
7013
  return boundingBox;
7014
7014
  };
7015
- var measureBoundingBox = (...geometries2) => {
7016
- geometries2 = flatten(geometries2);
7017
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
7018
- const results = geometries2.map((geometry) => {
7015
+ var measureBoundingBox = (...geometries) => {
7016
+ geometries = flatten(geometries);
7017
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
7018
+ const results = geometries.map((geometry) => {
7019
7019
  if (path2.isA(geometry)) return measureBoundingBoxOfPath2(geometry);
7020
7020
  if (geom2.isA(geometry)) return measureBoundingBoxOfGeom2(geometry);
7021
7021
  if (geom3.isA(geometry)) return measureBoundingBoxOfGeom3(geometry);
@@ -7035,11 +7035,11 @@ var require_measureAggregateBoundingBox = __commonJS({
7035
7035
  var vec3min = require_min();
7036
7036
  var vec3max = require_max();
7037
7037
  var measureBoundingBox = require_measureBoundingBox2();
7038
- var measureAggregateBoundingBox = (...geometries2) => {
7039
- geometries2 = flatten(geometries2);
7040
- if (geometries2.length === 0) throw new Error("measureAggregateBoundingBox: no geometries supplied");
7041
- const bounds = measureBoundingBox(geometries2);
7042
- if (geometries2.length === 1) {
7038
+ var measureAggregateBoundingBox = (...geometries) => {
7039
+ geometries = flatten(geometries);
7040
+ if (geometries.length === 0) throw new Error("measureAggregateBoundingBox: no geometries supplied");
7041
+ const bounds = measureBoundingBox(geometries);
7042
+ if (geometries.length === 1) {
7043
7043
  return bounds;
7044
7044
  }
7045
7045
  const result = [[Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE], [-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE]];
@@ -7076,12 +7076,12 @@ var require_measureAggregateEpsilon = __commonJS({
7076
7076
  var measureAggregateBoundingBox = require_measureAggregateBoundingBox();
7077
7077
  var calculateEpsilonFromBounds = require_calculateEpsilonFromBounds();
7078
7078
  var { geom2, geom3, path2 } = require_geometries();
7079
- var measureAggregateEpsilon = (...geometries2) => {
7080
- geometries2 = flatten(geometries2);
7081
- if (geometries2.length === 0) throw new Error("measureAggregateEpsilon: no geometries supplied");
7082
- const bounds = measureAggregateBoundingBox(geometries2);
7079
+ var measureAggregateEpsilon = (...geometries) => {
7080
+ geometries = flatten(geometries);
7081
+ if (geometries.length === 0) throw new Error("measureAggregateEpsilon: no geometries supplied");
7082
+ const bounds = measureAggregateBoundingBox(geometries);
7083
7083
  let dimensions = 0;
7084
- dimensions = geometries2.reduce((dimensions2, geometry) => {
7084
+ dimensions = geometries.reduce((dimensions2, geometry) => {
7085
7085
  if (path2.isA(geometry) || geom2.isA(geometry)) return Math.max(dimensions2, 2);
7086
7086
  if (geom3.isA(geometry)) return Math.max(dimensions2, 3);
7087
7087
  return 0;
@@ -7112,10 +7112,10 @@ var require_measureVolume = __commonJS({
7112
7112
  cache.set(geometry, volume);
7113
7113
  return volume;
7114
7114
  };
7115
- var measureVolume = (...geometries2) => {
7116
- geometries2 = flatten(geometries2);
7117
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
7118
- const results = geometries2.map((geometry) => {
7115
+ var measureVolume = (...geometries) => {
7116
+ geometries = flatten(geometries);
7117
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
7118
+ const results = geometries.map((geometry) => {
7119
7119
  if (path2.isA(geometry)) return measureVolumeOfPath2(geometry);
7120
7120
  if (geom2.isA(geometry)) return measureVolumeOfGeom2(geometry);
7121
7121
  if (geom3.isA(geometry)) return measureVolumeOfGeom3(geometry);
@@ -7133,11 +7133,11 @@ var require_measureAggregateVolume = __commonJS({
7133
7133
  "use strict";
7134
7134
  var flatten = require_flatten();
7135
7135
  var measureVolume = require_measureVolume();
7136
- var measureAggregateVolume = (...geometries2) => {
7137
- geometries2 = flatten(geometries2);
7138
- if (geometries2.length === 0) throw new Error("measureAggregateVolume: no geometries supplied");
7139
- const volumes = measureVolume(geometries2);
7140
- if (geometries2.length === 1) {
7136
+ var measureAggregateVolume = (...geometries) => {
7137
+ geometries = flatten(geometries);
7138
+ if (geometries.length === 0) throw new Error("measureAggregateVolume: no geometries supplied");
7139
+ const volumes = measureVolume(geometries);
7140
+ if (geometries.length === 1) {
7141
7141
  return volumes;
7142
7142
  }
7143
7143
  const result = 0;
@@ -7231,9 +7231,9 @@ var require_measureBoundingSphere2 = __commonJS({
7231
7231
  cacheOfBoundingSpheres.set(geometry, boundingSphere);
7232
7232
  return boundingSphere;
7233
7233
  };
7234
- var measureBoundingSphere = (...geometries2) => {
7235
- geometries2 = flatten(geometries2);
7236
- const results = geometries2.map((geometry) => {
7234
+ var measureBoundingSphere = (...geometries) => {
7235
+ geometries = flatten(geometries);
7236
+ const results = geometries.map((geometry) => {
7237
7237
  if (path2.isA(geometry)) return measureBoundingSphereOfPath2(geometry);
7238
7238
  if (geom2.isA(geometry)) return measureBoundingSphereOfGeom2(geometry);
7239
7239
  if (geom3.isA(geometry)) return measureBoundingSphereOfGeom3(geometry);
@@ -7251,9 +7251,9 @@ var require_measureCenter = __commonJS({
7251
7251
  "use strict";
7252
7252
  var flatten = require_flatten();
7253
7253
  var measureBoundingBox = require_measureBoundingBox2();
7254
- var measureCenter = (...geometries2) => {
7255
- geometries2 = flatten(geometries2);
7256
- const results = geometries2.map((geometry) => {
7254
+ var measureCenter = (...geometries) => {
7255
+ geometries = flatten(geometries);
7256
+ const results = geometries.map((geometry) => {
7257
7257
  const bounds = measureBoundingBox(geometry);
7258
7258
  return [
7259
7259
  bounds[0][0] + (bounds[1][0] - bounds[0][0]) / 2,
@@ -7325,9 +7325,9 @@ var require_measureCenterOfMass = __commonJS({
7325
7325
  cacheOfCenterOfMass.set(geometry, centerOfMass);
7326
7326
  return centerOfMass;
7327
7327
  };
7328
- var measureCenterOfMass = (...geometries2) => {
7329
- geometries2 = flatten(geometries2);
7330
- const results = geometries2.map((geometry) => {
7328
+ var measureCenterOfMass = (...geometries) => {
7329
+ geometries = flatten(geometries);
7330
+ const results = geometries.map((geometry) => {
7331
7331
  if (geom2.isA(geometry)) return measureCenterOfMassGeom2(geometry);
7332
7332
  if (geom3.isA(geometry)) return measureCenterOfMassGeom3(geometry);
7333
7333
  return [0, 0, 0];
@@ -7344,9 +7344,9 @@ var require_measureDimensions = __commonJS({
7344
7344
  "use strict";
7345
7345
  var flatten = require_flatten();
7346
7346
  var measureBoundingBox = require_measureBoundingBox2();
7347
- var measureDimensions = (...geometries2) => {
7348
- geometries2 = flatten(geometries2);
7349
- const results = geometries2.map((geometry) => {
7347
+ var measureDimensions = (...geometries) => {
7348
+ geometries = flatten(geometries);
7349
+ const results = geometries.map((geometry) => {
7350
7350
  const boundingBox = measureBoundingBox(geometry);
7351
7351
  return [
7352
7352
  boundingBox[1][0] - boundingBox[0][0],
@@ -7371,10 +7371,10 @@ var require_measureEpsilon = __commonJS({
7371
7371
  var measureEpsilonOfPath2 = (geometry) => calculateEpsilonFromBounds(measureBoundingBox(geometry), 2);
7372
7372
  var measureEpsilonOfGeom2 = (geometry) => calculateEpsilonFromBounds(measureBoundingBox(geometry), 2);
7373
7373
  var measureEpsilonOfGeom3 = (geometry) => calculateEpsilonFromBounds(measureBoundingBox(geometry), 3);
7374
- var measureEpsilon = (...geometries2) => {
7375
- geometries2 = flatten(geometries2);
7376
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
7377
- const results = geometries2.map((geometry) => {
7374
+ var measureEpsilon = (...geometries) => {
7375
+ geometries = flatten(geometries);
7376
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
7377
+ const results = geometries.map((geometry) => {
7378
7378
  if (path2.isA(geometry)) return measureEpsilonOfPath2(geometry);
7379
7379
  if (geom2.isA(geometry)) return measureEpsilonOfGeom2(geometry);
7380
7380
  if (geom3.isA(geometry)) return measureEpsilonOfGeom3(geometry);
@@ -11424,10 +11424,10 @@ var require_intersectGeom3 = __commonJS({
11424
11424
  var flatten = require_flatten();
11425
11425
  var retessellate = require_retessellate();
11426
11426
  var intersectSub = require_intersectGeom3Sub();
11427
- var intersect3 = (...geometries2) => {
11428
- geometries2 = flatten(geometries2);
11429
- let newgeometry = geometries2.shift();
11430
- geometries2.forEach((geometry) => {
11427
+ var intersect3 = (...geometries) => {
11428
+ geometries = flatten(geometries);
11429
+ let newgeometry = geometries.shift();
11430
+ geometries.forEach((geometry) => {
11431
11431
  newgeometry = intersectSub(newgeometry, geometry);
11432
11432
  });
11433
11433
  newgeometry = retessellate(newgeometry);
@@ -11447,9 +11447,9 @@ var require_intersectGeom2 = __commonJS({
11447
11447
  var fromFakePolygons = require_fromFakePolygons();
11448
11448
  var to3DWalls = require_to3DWalls();
11449
11449
  var intersectGeom3 = require_intersectGeom3();
11450
- var intersect3 = (...geometries2) => {
11451
- geometries2 = flatten(geometries2);
11452
- const newgeometries = geometries2.map((geometry) => to3DWalls({ z0: -1, z1: 1 }, geometry));
11450
+ var intersect3 = (...geometries) => {
11451
+ geometries = flatten(geometries);
11452
+ const newgeometries = geometries.map((geometry) => to3DWalls({ z0: -1, z1: 1 }, geometry));
11453
11453
  const newgeom3 = intersectGeom3(newgeometries);
11454
11454
  const epsilon = measureEpsilon(newgeom3);
11455
11455
  return fromFakePolygons(epsilon, geom3.toPolygons(newgeom3));
@@ -11468,15 +11468,15 @@ var require_intersect2 = __commonJS({
11468
11468
  var geom3 = require_geom3();
11469
11469
  var intersectGeom2 = require_intersectGeom2();
11470
11470
  var intersectGeom3 = require_intersectGeom3();
11471
- var intersect3 = (...geometries2) => {
11472
- geometries2 = flatten(geometries2);
11473
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
11474
- if (!areAllShapesTheSameType(geometries2)) {
11471
+ var intersect3 = (...geometries) => {
11472
+ geometries = flatten(geometries);
11473
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
11474
+ if (!areAllShapesTheSameType(geometries)) {
11475
11475
  throw new Error("only intersect of the types are supported");
11476
11476
  }
11477
- const geometry = geometries2[0];
11478
- if (geom2.isA(geometry)) return intersectGeom2(geometries2);
11479
- if (geom3.isA(geometry)) return intersectGeom3(geometries2);
11477
+ const geometry = geometries[0];
11478
+ if (geom2.isA(geometry)) return intersectGeom2(geometries);
11479
+ if (geom3.isA(geometry)) return intersectGeom3(geometries);
11480
11480
  return geometry;
11481
11481
  };
11482
11482
  module.exports = intersect3;
@@ -11612,10 +11612,10 @@ var require_subtractGeom3 = __commonJS({
11612
11612
  var flatten = require_flatten();
11613
11613
  var retessellate = require_retessellate();
11614
11614
  var subtractSub = require_subtractGeom3Sub();
11615
- var subtract4 = (...geometries2) => {
11616
- geometries2 = flatten(geometries2);
11617
- let newgeometry = geometries2.shift();
11618
- geometries2.forEach((geometry) => {
11615
+ var subtract4 = (...geometries) => {
11616
+ geometries = flatten(geometries);
11617
+ let newgeometry = geometries.shift();
11618
+ geometries.forEach((geometry) => {
11619
11619
  newgeometry = subtractSub(newgeometry, geometry);
11620
11620
  });
11621
11621
  newgeometry = retessellate(newgeometry);
@@ -11635,9 +11635,9 @@ var require_subtractGeom2 = __commonJS({
11635
11635
  var fromFakePolygons = require_fromFakePolygons();
11636
11636
  var to3DWalls = require_to3DWalls();
11637
11637
  var subtractGeom3 = require_subtractGeom3();
11638
- var subtract4 = (...geometries2) => {
11639
- geometries2 = flatten(geometries2);
11640
- const newgeometries = geometries2.map((geometry) => to3DWalls({ z0: -1, z1: 1 }, geometry));
11638
+ var subtract4 = (...geometries) => {
11639
+ geometries = flatten(geometries);
11640
+ const newgeometries = geometries.map((geometry) => to3DWalls({ z0: -1, z1: 1 }, geometry));
11641
11641
  const newgeom3 = subtractGeom3(newgeometries);
11642
11642
  const epsilon = measureEpsilon(newgeom3);
11643
11643
  return fromFakePolygons(epsilon, geom3.toPolygons(newgeom3));
@@ -11656,15 +11656,15 @@ var require_subtract4 = __commonJS({
11656
11656
  var geom3 = require_geom3();
11657
11657
  var subtractGeom2 = require_subtractGeom2();
11658
11658
  var subtractGeom3 = require_subtractGeom3();
11659
- var subtract4 = (...geometries2) => {
11660
- geometries2 = flatten(geometries2);
11661
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
11662
- if (!areAllShapesTheSameType(geometries2)) {
11659
+ var subtract4 = (...geometries) => {
11660
+ geometries = flatten(geometries);
11661
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
11662
+ if (!areAllShapesTheSameType(geometries)) {
11663
11663
  throw new Error("only subtract of the types are supported");
11664
11664
  }
11665
- const geometry = geometries2[0];
11666
- if (geom2.isA(geometry)) return subtractGeom2(geometries2);
11667
- if (geom3.isA(geometry)) return subtractGeom3(geometries2);
11665
+ const geometry = geometries[0];
11666
+ if (geom2.isA(geometry)) return subtractGeom2(geometries);
11667
+ if (geom3.isA(geometry)) return subtractGeom3(geometries);
11668
11668
  return geometry;
11669
11669
  };
11670
11670
  module.exports = subtract4;
@@ -11709,13 +11709,13 @@ var require_unionGeom3 = __commonJS({
11709
11709
  var flatten = require_flatten();
11710
11710
  var retessellate = require_retessellate();
11711
11711
  var unionSub = require_unionGeom3Sub();
11712
- var union3 = (...geometries2) => {
11713
- geometries2 = flatten(geometries2);
11712
+ var union3 = (...geometries) => {
11713
+ geometries = flatten(geometries);
11714
11714
  let i;
11715
- for (i = 1; i < geometries2.length; i += 2) {
11716
- geometries2.push(unionSub(geometries2[i - 1], geometries2[i]));
11715
+ for (i = 1; i < geometries.length; i += 2) {
11716
+ geometries.push(unionSub(geometries[i - 1], geometries[i]));
11717
11717
  }
11718
- let newgeometry = geometries2[i - 1];
11718
+ let newgeometry = geometries[i - 1];
11719
11719
  newgeometry = retessellate(newgeometry);
11720
11720
  return newgeometry;
11721
11721
  };
@@ -11733,9 +11733,9 @@ var require_unionGeom2 = __commonJS({
11733
11733
  var fromFakePolygons = require_fromFakePolygons();
11734
11734
  var to3DWalls = require_to3DWalls();
11735
11735
  var unionGeom3 = require_unionGeom3();
11736
- var union3 = (...geometries2) => {
11737
- geometries2 = flatten(geometries2);
11738
- const newgeometries = geometries2.map((geometry) => to3DWalls({ z0: -1, z1: 1 }, geometry));
11736
+ var union3 = (...geometries) => {
11737
+ geometries = flatten(geometries);
11738
+ const newgeometries = geometries.map((geometry) => to3DWalls({ z0: -1, z1: 1 }, geometry));
11739
11739
  const newgeom3 = unionGeom3(newgeometries);
11740
11740
  const epsilon = measureEpsilon(newgeom3);
11741
11741
  return fromFakePolygons(epsilon, geom3.toPolygons(newgeom3));
@@ -11754,15 +11754,15 @@ var require_union = __commonJS({
11754
11754
  var geom3 = require_geom3();
11755
11755
  var unionGeom2 = require_unionGeom2();
11756
11756
  var unionGeom3 = require_unionGeom3();
11757
- var union3 = (...geometries2) => {
11758
- geometries2 = flatten(geometries2);
11759
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
11760
- if (!areAllShapesTheSameType(geometries2)) {
11757
+ var union3 = (...geometries) => {
11758
+ geometries = flatten(geometries);
11759
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
11760
+ if (!areAllShapesTheSameType(geometries)) {
11761
11761
  throw new Error("only unions of the same type are supported");
11762
11762
  }
11763
- const geometry = geometries2[0];
11764
- if (geom2.isA(geometry)) return unionGeom2(geometries2);
11765
- if (geom3.isA(geometry)) return unionGeom3(geometries2);
11763
+ const geometry = geometries[0];
11764
+ if (geom2.isA(geometry)) return unionGeom2(geometries);
11765
+ if (geom3.isA(geometry)) return unionGeom3(geometries);
11766
11766
  return geometry;
11767
11767
  };
11768
11768
  module.exports = union3;
@@ -12755,7 +12755,7 @@ var require_toUniquePoints = __commonJS({
12755
12755
  var geom2 = require_geom2();
12756
12756
  var geom3 = require_geom3();
12757
12757
  var path2 = require_path2();
12758
- var toUniquePoints = (geometries2) => {
12758
+ var toUniquePoints = (geometries) => {
12759
12759
  const found = /* @__PURE__ */ new Set();
12760
12760
  const uniquePoints = [];
12761
12761
  const addPoint = (point2) => {
@@ -12765,7 +12765,7 @@ var require_toUniquePoints = __commonJS({
12765
12765
  found.add(key);
12766
12766
  }
12767
12767
  };
12768
- geometries2.forEach((geometry) => {
12768
+ geometries.forEach((geometry) => {
12769
12769
  if (geom2.isA(geometry)) {
12770
12770
  geom2.toPoints(geometry).forEach(addPoint);
12771
12771
  } else if (geom3.isA(geometry)) {
@@ -12788,9 +12788,9 @@ var require_hullPath2 = __commonJS({
12788
12788
  var path2 = require_path2();
12789
12789
  var hullPoints2 = require_hullPoints2();
12790
12790
  var toUniquePoints = require_toUniquePoints();
12791
- var hullPath2 = (...geometries2) => {
12792
- geometries2 = flatten(geometries2);
12793
- const unique = toUniquePoints(geometries2);
12791
+ var hullPath2 = (...geometries) => {
12792
+ geometries = flatten(geometries);
12793
+ const unique = toUniquePoints(geometries);
12794
12794
  const hullPoints = hullPoints2(unique);
12795
12795
  return path2.fromPoints({ closed: true }, hullPoints);
12796
12796
  };
@@ -12806,9 +12806,9 @@ var require_hullGeom2 = __commonJS({
12806
12806
  var geom2 = require_geom2();
12807
12807
  var hullPoints2 = require_hullPoints2();
12808
12808
  var toUniquePoints = require_toUniquePoints();
12809
- var hullGeom2 = (...geometries2) => {
12810
- geometries2 = flatten(geometries2);
12811
- const unique = toUniquePoints(geometries2);
12809
+ var hullGeom2 = (...geometries) => {
12810
+ geometries = flatten(geometries);
12811
+ const unique = toUniquePoints(geometries);
12812
12812
  const hullPoints = hullPoints2(unique);
12813
12813
  if (hullPoints.length < 3) return geom2.create();
12814
12814
  return geom2.fromPoints(hullPoints);
@@ -12843,9 +12843,9 @@ var require_hullGeom3 = __commonJS({
12843
12843
  var geom3 = require_geom3();
12844
12844
  var toUniquePoints = require_toUniquePoints();
12845
12845
  var hullPoints3 = require_hullPoints3();
12846
- var hullGeom3 = (...geometries2) => {
12847
- geometries2 = flatten(geometries2);
12848
- const unique = toUniquePoints(geometries2);
12846
+ var hullGeom3 = (...geometries) => {
12847
+ geometries = flatten(geometries);
12848
+ const unique = toUniquePoints(geometries);
12849
12849
  if (unique.length === 0) return geom3.create();
12850
12850
  return geom3.create(hullPoints3(unique));
12851
12851
  };
@@ -12865,16 +12865,16 @@ var require_hull = __commonJS({
12865
12865
  var hullPath2 = require_hullPath2();
12866
12866
  var hullGeom2 = require_hullGeom2();
12867
12867
  var hullGeom3 = require_hullGeom3();
12868
- var hull = (...geometries2) => {
12869
- geometries2 = flatten(geometries2);
12870
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
12871
- if (!areAllShapesTheSameType(geometries2)) {
12868
+ var hull = (...geometries) => {
12869
+ geometries = flatten(geometries);
12870
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
12871
+ if (!areAllShapesTheSameType(geometries)) {
12872
12872
  throw new Error("only hulls of the same type are supported");
12873
12873
  }
12874
- const geometry = geometries2[0];
12875
- if (path2.isA(geometry)) return hullPath2(geometries2);
12876
- if (geom2.isA(geometry)) return hullGeom2(geometries2);
12877
- if (geom3.isA(geometry)) return hullGeom3(geometries2);
12874
+ const geometry = geometries[0];
12875
+ if (path2.isA(geometry)) return hullPath2(geometries);
12876
+ if (geom2.isA(geometry)) return hullGeom2(geometries);
12877
+ if (geom3.isA(geometry)) return hullGeom3(geometries);
12878
12878
  return geometry;
12879
12879
  };
12880
12880
  module.exports = hull;
@@ -12888,14 +12888,14 @@ var require_hullChain = __commonJS({
12888
12888
  var flatten = require_flatten();
12889
12889
  var union3 = require_union();
12890
12890
  var hull = require_hull();
12891
- var hullChain = (...geometries2) => {
12892
- geometries2 = flatten(geometries2);
12893
- if (geometries2.length < 2) throw new Error("wrong number of arguments");
12894
- const hulls2 = [];
12895
- for (let i = 1; i < geometries2.length; i++) {
12896
- hulls2.push(hull(geometries2[i - 1], geometries2[i]));
12891
+ var hullChain = (...geometries) => {
12892
+ geometries = flatten(geometries);
12893
+ if (geometries.length < 2) throw new Error("wrong number of arguments");
12894
+ const hulls = [];
12895
+ for (let i = 1; i < geometries.length; i++) {
12896
+ hulls.push(hull(geometries[i - 1], geometries[i]));
12897
12897
  }
12898
- return union3(hulls2);
12898
+ return union3(hulls);
12899
12899
  };
12900
12900
  module.exports = hullChain;
12901
12901
  }
@@ -13434,10 +13434,10 @@ var require_generalize = __commonJS({
13434
13434
  clone.polygons = polygons;
13435
13435
  return clone;
13436
13436
  };
13437
- var generalize = (options, ...geometries2) => {
13438
- geometries2 = flatten(geometries2);
13439
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
13440
- const results = geometries2.map((geometry) => {
13437
+ var generalize = (options, ...geometries) => {
13438
+ geometries = flatten(geometries);
13439
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
13440
+ const results = geometries.map((geometry) => {
13441
13441
  if (path2.isA(geometry)) return generalizePath2(options, geometry);
13442
13442
  if (geom2.isA(geometry)) return generalizeGeom2(options, geometry);
13443
13443
  if (geom3.isA(geometry)) return generalizeGeom3(options, geometry);
@@ -13479,10 +13479,10 @@ var require_snap3 = __commonJS({
13479
13479
  const newpolygons = snapPolygons(epsilon, polygons);
13480
13480
  return geom3.create(newpolygons);
13481
13481
  };
13482
- var snap = (...geometries2) => {
13483
- geometries2 = flatten(geometries2);
13484
- if (geometries2.length === 0) throw new Error("wrong number of arguments");
13485
- const results = geometries2.map((geometry) => {
13482
+ var snap = (...geometries) => {
13483
+ geometries = flatten(geometries);
13484
+ if (geometries.length === 0) throw new Error("wrong number of arguments");
13485
+ const results = geometries.map((geometry) => {
13486
13486
  if (path2.isA(geometry)) return snapPath2(geometry);
13487
13487
  if (geom2.isA(geometry)) return snapGeom2(geometry);
13488
13488
  if (geom3.isA(geometry)) return snapGeom3(geometry);
@@ -13567,7 +13567,7 @@ var require_align = __commonJS({
13567
13567
  }
13568
13568
  return translate6(translation, geometry);
13569
13569
  };
13570
- var align = (options, ...geometries2) => {
13570
+ var align = (options, ...geometries) => {
13571
13571
  const defaults = {
13572
13572
  modes: ["center", "center", "min"],
13573
13573
  relativeTo: [0, 0, 0],
@@ -13576,18 +13576,18 @@ var require_align = __commonJS({
13576
13576
  options = Object.assign({}, defaults, options);
13577
13577
  options = validateOptions(options);
13578
13578
  let { modes, relativeTo, grouped } = options;
13579
- geometries2 = flatten(geometries2);
13580
- if (geometries2.length === 0) throw new Error("align(): No geometries were provided to act upon");
13579
+ geometries = flatten(geometries);
13580
+ if (geometries.length === 0) throw new Error("align(): No geometries were provided to act upon");
13581
13581
  if (relativeTo.filter((val) => val == null).length) {
13582
- const bounds = measureAggregateBoundingBox(geometries2);
13582
+ const bounds = measureAggregateBoundingBox(geometries);
13583
13583
  relativeTo = populateRelativeToFromBounds(relativeTo, modes, bounds);
13584
13584
  }
13585
13585
  if (grouped) {
13586
- geometries2 = alignGeometries(geometries2, modes, relativeTo);
13586
+ geometries = alignGeometries(geometries, modes, relativeTo);
13587
13587
  } else {
13588
- geometries2 = geometries2.map((geometry) => alignGeometries(geometry, modes, relativeTo));
13588
+ geometries = geometries.map((geometry) => alignGeometries(geometry, modes, relativeTo));
13589
13589
  }
13590
- return geometries2.length === 1 ? geometries2[0] : geometries2;
13590
+ return geometries.length === 1 ? geometries[0] : geometries;
13591
13591
  };
13592
13592
  module.exports = align;
13593
13593
  }
@@ -13839,41 +13839,41 @@ var require_ms = __commonJS({
13839
13839
  return void 0;
13840
13840
  }
13841
13841
  }
13842
- function fmtShort(ms) {
13843
- var msAbs = Math.abs(ms);
13842
+ function fmtShort(ms2) {
13843
+ var msAbs = Math.abs(ms2);
13844
13844
  if (msAbs >= d) {
13845
- return Math.round(ms / d) + "d";
13845
+ return Math.round(ms2 / d) + "d";
13846
13846
  }
13847
13847
  if (msAbs >= h2) {
13848
- return Math.round(ms / h2) + "h";
13848
+ return Math.round(ms2 / h2) + "h";
13849
13849
  }
13850
13850
  if (msAbs >= m) {
13851
- return Math.round(ms / m) + "m";
13851
+ return Math.round(ms2 / m) + "m";
13852
13852
  }
13853
13853
  if (msAbs >= s) {
13854
- return Math.round(ms / s) + "s";
13854
+ return Math.round(ms2 / s) + "s";
13855
13855
  }
13856
- return ms + "ms";
13856
+ return ms2 + "ms";
13857
13857
  }
13858
- function fmtLong(ms) {
13859
- var msAbs = Math.abs(ms);
13858
+ function fmtLong(ms2) {
13859
+ var msAbs = Math.abs(ms2);
13860
13860
  if (msAbs >= d) {
13861
- return plural(ms, msAbs, d, "day");
13861
+ return plural(ms2, msAbs, d, "day");
13862
13862
  }
13863
13863
  if (msAbs >= h2) {
13864
- return plural(ms, msAbs, h2, "hour");
13864
+ return plural(ms2, msAbs, h2, "hour");
13865
13865
  }
13866
13866
  if (msAbs >= m) {
13867
- return plural(ms, msAbs, m, "minute");
13867
+ return plural(ms2, msAbs, m, "minute");
13868
13868
  }
13869
13869
  if (msAbs >= s) {
13870
- return plural(ms, msAbs, s, "second");
13870
+ return plural(ms2, msAbs, s, "second");
13871
13871
  }
13872
- return ms + " ms";
13872
+ return ms2 + " ms";
13873
13873
  }
13874
- function plural(ms, msAbs, n, name) {
13874
+ function plural(ms2, msAbs, n, name) {
13875
13875
  var isPlural = msAbs >= n * 1.5;
13876
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
13876
+ return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
13877
13877
  }
13878
13878
  }
13879
13879
  });
@@ -13917,8 +13917,8 @@ var require_common = __commonJS({
13917
13917
  }
13918
13918
  const self = debug;
13919
13919
  const curr = Number(/* @__PURE__ */ new Date());
13920
- const ms = curr - (prevTime || curr);
13921
- self.diff = ms;
13920
+ const ms2 = curr - (prevTime || curr);
13921
+ self.diff = ms2;
13922
13922
  self.prev = prevTime;
13923
13923
  self.curr = curr;
13924
13924
  prevTime = curr;
@@ -14747,10 +14747,10 @@ function GltfModel({
14747
14747
 
14748
14748
  // src/three-components/JscadModel.tsx
14749
14749
  var import_jscad_planner = __toESM(require_dist(), 1);
14750
- var import_modeling2 = __toESM(require_src(), 1);
14750
+ var import_modeling = __toESM(require_src(), 1);
14751
14751
 
14752
14752
  // node_modules/@tscircuit/footprinter/dist/index.js
14753
- import { z as z104 } from "zod";
14753
+ import { z as z124 } from "zod";
14754
14754
 
14755
14755
  // node_modules/@tscircuit/mm/dist/index.js
14756
14756
  var unitToMm = {
@@ -14819,19 +14819,19 @@ import { z as z37 } from "zod";
14819
14819
  import { z as z38 } from "zod";
14820
14820
  import { z as z39 } from "zod";
14821
14821
  import { z as z40 } from "zod";
14822
- import { z as z42 } from "zod";
14823
14822
  import { z as z41 } from "zod";
14824
14823
  import { z as z43 } from "zod";
14824
+ import { z as z42 } from "zod";
14825
14825
  import { z as z44 } from "zod";
14826
14826
  import { z as z45 } from "zod";
14827
14827
  import { z as z46 } from "zod";
14828
14828
  import { z as z47 } from "zod";
14829
- import { z as z49 } from "zod";
14830
14829
  import { z as z48 } from "zod";
14830
+ import { z as z49 } from "zod";
14831
14831
  import { z as z50 } from "zod";
14832
14832
  import { z as z51 } from "zod";
14833
- import { z as z52 } from "zod";
14834
14833
  import { z as z53 } from "zod";
14834
+ import { z as z52 } from "zod";
14835
14835
  import { z as z54 } from "zod";
14836
14836
  import { z as z55 } from "zod";
14837
14837
  import { z as z56 } from "zod";
@@ -14882,6 +14882,26 @@ import { z as z100 } from "zod";
14882
14882
  import { z as z101 } from "zod";
14883
14883
  import { z as z102 } from "zod";
14884
14884
  import { z as z103 } from "zod";
14885
+ import { z as z104 } from "zod";
14886
+ import { z as z105 } from "zod";
14887
+ import { z as z106 } from "zod";
14888
+ import { z as z107 } from "zod";
14889
+ import { z as z108 } from "zod";
14890
+ import { z as z109 } from "zod";
14891
+ import { z as z110 } from "zod";
14892
+ import { z as z111 } from "zod";
14893
+ import { z as z112 } from "zod";
14894
+ import { z as z113 } from "zod";
14895
+ import { z as z114 } from "zod";
14896
+ import { z as z115 } from "zod";
14897
+ import { z as z116 } from "zod";
14898
+ import { z as z117 } from "zod";
14899
+ import { z as z118 } from "zod";
14900
+ import { z as z119 } from "zod";
14901
+ import { z as z120 } from "zod";
14902
+ import { z as z121 } from "zod";
14903
+ import { z as z122 } from "zod";
14904
+ import { z as z123 } from "zod";
14885
14905
  var unitMappings = {
14886
14906
  Hz: {
14887
14907
  baseUnit: "Hz",
@@ -14963,6 +14983,12 @@ var unitMappings = {
14963
14983
  ms: {
14964
14984
  baseUnit: "ms",
14965
14985
  variants: {
14986
+ fs: 1e-12,
14987
+ ps: 1e-9,
14988
+ ns: 1e-6,
14989
+ us: 1e-3,
14990
+ \u00B5s: 1e-3,
14991
+ ms: 1,
14966
14992
  s: 1e3
14967
14993
  }
14968
14994
  },
@@ -15031,8 +15057,8 @@ var si_prefix_multiplier = {
15031
15057
  pico: 1e-12,
15032
15058
  p: 1e-12
15033
15059
  };
15034
- var parseAndConvertSiUnit = (v) => {
15035
- if (typeof v === "undefined")
15060
+ function parseAndConvertSiUnit(v) {
15061
+ if (v === void 0 || v === null)
15036
15062
  return { parsedUnit: null, unitOfValue: null, value: null };
15037
15063
  if (typeof v === "string" && v.match(/^-?[\d\.]+$/))
15038
15064
  return {
@@ -15044,12 +15070,17 @@ var parseAndConvertSiUnit = (v) => {
15044
15070
  return { value: v, parsedUnit: null, unitOfValue: null };
15045
15071
  if (typeof v === "object" && "x" in v && "y" in v) {
15046
15072
  const { parsedUnit, unitOfValue } = parseAndConvertSiUnit(v.x);
15073
+ const xResult = parseAndConvertSiUnit(v.x);
15074
+ const yResult = parseAndConvertSiUnit(v.y);
15075
+ if (xResult.value === null || yResult.value === null) {
15076
+ return { parsedUnit: null, unitOfValue: null, value: null };
15077
+ }
15047
15078
  return {
15048
15079
  parsedUnit,
15049
15080
  unitOfValue,
15050
15081
  value: {
15051
- x: parseAndConvertSiUnit(v.x).value,
15052
- y: parseAndConvertSiUnit(v.y).value
15082
+ x: xResult.value,
15083
+ y: yResult.value
15053
15084
  }
15054
15085
  };
15055
15086
  }
@@ -15074,7 +15105,7 @@ var parseAndConvertSiUnit = (v) => {
15074
15105
  unitOfValue: baseUnit,
15075
15106
  value: conversionFactor * Number.parseFloat(numberPart)
15076
15107
  };
15077
- };
15108
+ }
15078
15109
  var resistance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
15079
15110
  var capacitance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value).transform((value) => {
15080
15111
  return Number.parseFloat(value.toPrecision(12));
@@ -15085,7 +15116,9 @@ var length = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v)
15085
15116
  var frequency = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
15086
15117
  var distance = length;
15087
15118
  var current = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
15088
- var time = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
15119
+ var duration_ms = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
15120
+ var ms = duration_ms;
15121
+ var timestamp = z.string().datetime();
15089
15122
  var rotation = z.string().or(z.number()).transform((arg) => {
15090
15123
  if (typeof arg === "number") return arg;
15091
15124
  if (arg.endsWith("deg")) {
@@ -15305,7 +15338,7 @@ var source_project_metadata = z29.object({
15305
15338
  name: z29.string().optional(),
15306
15339
  software_used_string: z29.string().optional(),
15307
15340
  project_url: z29.string().optional(),
15308
- created_at: z29.string().datetime().optional()
15341
+ created_at: timestamp.optional()
15309
15342
  });
15310
15343
  expectTypesMatch(true);
15311
15344
  var source_missing_property_error = z30.object({
@@ -15440,7 +15473,8 @@ var source_group = z38.object({
15440
15473
  parent_source_group_id: z38.string().optional(),
15441
15474
  is_subcircuit: z38.boolean().optional(),
15442
15475
  show_as_schematic_box: z38.boolean().optional(),
15443
- name: z38.string().optional()
15476
+ name: z38.string().optional(),
15477
+ was_automatically_named: z38.boolean().optional()
15444
15478
  });
15445
15479
  expectTypesMatch(true);
15446
15480
  var source_net = z39.object({
@@ -15458,12 +15492,19 @@ var source_net = z39.object({
15458
15492
  subcircuit_connectivity_map_key: z39.string().optional()
15459
15493
  });
15460
15494
  expectTypesMatch(true);
15461
- var source_pcb_ground_plane = z40.object({
15462
- type: z40.literal("source_pcb_ground_plane"),
15463
- source_pcb_ground_plane_id: z40.string(),
15495
+ var source_board = z40.object({
15496
+ type: z40.literal("source_board"),
15497
+ source_board_id: z40.string(),
15464
15498
  source_group_id: z40.string(),
15465
- source_net_id: z40.string(),
15466
- subcircuit_id: z40.string().optional()
15499
+ title: z40.string().optional()
15500
+ }).describe("Defines a board in the source domain");
15501
+ expectTypesMatch(true);
15502
+ var source_pcb_ground_plane = z41.object({
15503
+ type: z41.literal("source_pcb_ground_plane"),
15504
+ source_pcb_ground_plane_id: z41.string(),
15505
+ source_group_id: z41.string(),
15506
+ source_net_id: z41.string(),
15507
+ subcircuit_id: z41.string().optional()
15467
15508
  }).describe("Defines a ground plane in the source domain");
15468
15509
  expectTypesMatch(true);
15469
15510
  var all_layers = [
@@ -15476,9 +15517,9 @@ var all_layers = [
15476
15517
  "inner5",
15477
15518
  "inner6"
15478
15519
  ];
15479
- var layer_string = z41.enum(all_layers);
15520
+ var layer_string = z42.enum(all_layers);
15480
15521
  var layer_ref = layer_string.or(
15481
- z41.object({
15522
+ z42.object({
15482
15523
  name: layer_string
15483
15524
  })
15484
15525
  ).transform((layer) => {
@@ -15488,138 +15529,188 @@ var layer_ref = layer_string.or(
15488
15529
  return layer.name;
15489
15530
  });
15490
15531
  expectTypesMatch(true);
15491
- var visible_layer = z41.enum(["top", "bottom"]);
15492
- var source_manually_placed_via = z42.object({
15493
- type: z42.literal("source_manually_placed_via"),
15494
- source_manually_placed_via_id: z42.string(),
15495
- source_group_id: z42.string(),
15496
- source_net_id: z42.string(),
15497
- subcircuit_id: z42.string().optional(),
15498
- source_trace_id: z42.string().optional()
15532
+ var visible_layer = z42.enum(["top", "bottom"]);
15533
+ var source_manually_placed_via = z43.object({
15534
+ type: z43.literal("source_manually_placed_via"),
15535
+ source_manually_placed_via_id: z43.string(),
15536
+ source_group_id: z43.string(),
15537
+ source_net_id: z43.string(),
15538
+ subcircuit_id: z43.string().optional(),
15539
+ source_trace_id: z43.string().optional()
15499
15540
  }).describe("Defines a via that is manually placed in the source domain");
15500
15541
  expectTypesMatch(true);
15501
- var schematic_box = z43.object({
15502
- type: z43.literal("schematic_box"),
15503
- schematic_component_id: z43.string().optional(),
15542
+ var schematic_box = z44.object({
15543
+ type: z44.literal("schematic_box"),
15544
+ schematic_component_id: z44.string().optional(),
15504
15545
  width: distance,
15505
15546
  height: distance,
15506
- is_dashed: z43.boolean().default(false),
15547
+ is_dashed: z44.boolean().default(false),
15507
15548
  x: distance,
15508
15549
  y: distance,
15509
- subcircuit_id: z43.string().optional()
15550
+ subcircuit_id: z44.string().optional()
15510
15551
  }).describe("Draws a box on the schematic");
15511
15552
  expectTypesMatch(true);
15512
- var schematic_path = z44.object({
15513
- type: z44.literal("schematic_path"),
15514
- schematic_component_id: z44.string(),
15515
- fill_color: z44.enum(["red", "blue"]).optional(),
15516
- is_filled: z44.boolean().optional(),
15517
- points: z44.array(point),
15518
- subcircuit_id: z44.string().optional()
15553
+ var schematic_path = z45.object({
15554
+ type: z45.literal("schematic_path"),
15555
+ schematic_component_id: z45.string(),
15556
+ fill_color: z45.enum(["red", "blue"]).optional(),
15557
+ is_filled: z45.boolean().optional(),
15558
+ points: z45.array(point),
15559
+ subcircuit_id: z45.string().optional()
15519
15560
  });
15520
15561
  expectTypesMatch(true);
15521
- var schematic_pin_styles = z45.record(
15522
- z45.object({
15562
+ var schematic_pin_styles = z46.record(
15563
+ z46.object({
15523
15564
  left_margin: length.optional(),
15524
15565
  right_margin: length.optional(),
15525
15566
  top_margin: length.optional(),
15526
15567
  bottom_margin: length.optional()
15527
15568
  })
15528
15569
  );
15529
- var schematic_component_port_arrangement_by_size = z45.object({
15530
- left_size: z45.number(),
15531
- right_size: z45.number(),
15532
- top_size: z45.number().optional(),
15533
- bottom_size: z45.number().optional()
15570
+ var schematic_component_port_arrangement_by_size = z46.object({
15571
+ left_size: z46.number(),
15572
+ right_size: z46.number(),
15573
+ top_size: z46.number().optional(),
15574
+ bottom_size: z46.number().optional()
15534
15575
  });
15535
15576
  expectTypesMatch(true);
15536
- var schematic_component_port_arrangement_by_sides = z45.object({
15537
- left_side: z45.object({
15538
- pins: z45.array(z45.number()),
15577
+ var schematic_component_port_arrangement_by_sides = z46.object({
15578
+ left_side: z46.object({
15579
+ pins: z46.array(z46.number()),
15539
15580
  // @ts-ignore
15540
- direction: z45.enum(["top-to-bottom", "bottom-to-top"]).optional()
15581
+ direction: z46.enum(["top-to-bottom", "bottom-to-top"]).optional()
15541
15582
  }).optional(),
15542
- right_side: z45.object({
15543
- pins: z45.array(z45.number()),
15583
+ right_side: z46.object({
15584
+ pins: z46.array(z46.number()),
15544
15585
  // @ts-ignore
15545
- direction: z45.enum(["top-to-bottom", "bottom-to-top"]).optional()
15586
+ direction: z46.enum(["top-to-bottom", "bottom-to-top"]).optional()
15546
15587
  }).optional(),
15547
- top_side: z45.object({
15548
- pins: z45.array(z45.number()),
15588
+ top_side: z46.object({
15589
+ pins: z46.array(z46.number()),
15549
15590
  // @ts-ignore
15550
- direction: z45.enum(["left-to-right", "right-to-left"]).optional()
15591
+ direction: z46.enum(["left-to-right", "right-to-left"]).optional()
15551
15592
  }).optional(),
15552
- bottom_side: z45.object({
15553
- pins: z45.array(z45.number()),
15593
+ bottom_side: z46.object({
15594
+ pins: z46.array(z46.number()),
15554
15595
  // @ts-ignore
15555
- direction: z45.enum(["left-to-right", "right-to-left"]).optional()
15596
+ direction: z46.enum(["left-to-right", "right-to-left"]).optional()
15556
15597
  }).optional()
15557
15598
  });
15558
15599
  expectTypesMatch(true);
15559
- var port_arrangement = z45.union([
15600
+ var port_arrangement = z46.union([
15560
15601
  schematic_component_port_arrangement_by_size,
15561
15602
  schematic_component_port_arrangement_by_sides
15562
15603
  ]);
15563
- var schematic_component = z45.object({
15564
- type: z45.literal("schematic_component"),
15604
+ var schematic_component = z46.object({
15605
+ type: z46.literal("schematic_component"),
15565
15606
  size,
15566
15607
  center: point,
15567
- source_component_id: z45.string().optional(),
15568
- schematic_component_id: z45.string(),
15608
+ source_component_id: z46.string().optional(),
15609
+ schematic_component_id: z46.string(),
15569
15610
  pin_spacing: length.optional(),
15570
15611
  pin_styles: schematic_pin_styles.optional(),
15571
15612
  box_width: length.optional(),
15572
- symbol_name: z45.string().optional(),
15613
+ symbol_name: z46.string().optional(),
15573
15614
  port_arrangement: port_arrangement.optional(),
15574
- port_labels: z45.record(z45.string()).optional(),
15575
- symbol_display_value: z45.string().optional(),
15576
- subcircuit_id: z45.string().optional(),
15577
- schematic_group_id: z45.string().optional(),
15578
- is_schematic_group: z45.boolean().optional(),
15579
- source_group_id: z45.string().optional()
15615
+ port_labels: z46.record(z46.string()).optional(),
15616
+ symbol_display_value: z46.string().optional(),
15617
+ subcircuit_id: z46.string().optional(),
15618
+ schematic_group_id: z46.string().optional(),
15619
+ is_schematic_group: z46.boolean().optional(),
15620
+ source_group_id: z46.string().optional(),
15621
+ is_box_with_pins: z46.boolean().optional().default(true)
15580
15622
  });
15581
15623
  expectTypesMatch(true);
15582
- var schematic_line = z46.object({
15583
- type: z46.literal("schematic_line"),
15584
- schematic_component_id: z46.string(),
15624
+ var schematic_line = z47.object({
15625
+ type: z47.literal("schematic_line"),
15626
+ schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
15627
+ schematic_component_id: z47.string(),
15585
15628
  x1: distance,
15586
- x2: distance,
15587
15629
  y1: distance,
15630
+ x2: distance,
15588
15631
  y2: distance,
15589
- subcircuit_id: z46.string().optional()
15590
- });
15632
+ stroke_width: distance.nullable().optional(),
15633
+ color: z47.string().default("#000000"),
15634
+ is_dashed: z47.boolean().default(false),
15635
+ subcircuit_id: z47.string().optional()
15636
+ }).describe("Draws a styled line on the schematic");
15637
+ expectTypesMatch(true);
15638
+ var schematic_rect = z48.object({
15639
+ type: z48.literal("schematic_rect"),
15640
+ schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
15641
+ schematic_component_id: z48.string(),
15642
+ center: point,
15643
+ width: distance,
15644
+ height: distance,
15645
+ rotation: rotation.default(0),
15646
+ stroke_width: distance.nullable().optional(),
15647
+ color: z48.string().default("#000000"),
15648
+ is_filled: z48.boolean().default(false),
15649
+ fill_color: z48.string().optional(),
15650
+ is_dashed: z48.boolean().default(false),
15651
+ subcircuit_id: z48.string().optional()
15652
+ }).describe("Draws a styled rectangle on the schematic");
15653
+ expectTypesMatch(true);
15654
+ var schematic_circle = z49.object({
15655
+ type: z49.literal("schematic_circle"),
15656
+ schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
15657
+ schematic_component_id: z49.string(),
15658
+ center: point,
15659
+ radius: distance,
15660
+ stroke_width: distance.nullable().optional(),
15661
+ color: z49.string().default("#000000"),
15662
+ is_filled: z49.boolean().default(false),
15663
+ fill_color: z49.string().optional(),
15664
+ is_dashed: z49.boolean().default(false),
15665
+ subcircuit_id: z49.string().optional()
15666
+ }).describe("Draws a styled circle on the schematic");
15591
15667
  expectTypesMatch(true);
15592
- var schematic_trace = z47.object({
15593
- type: z47.literal("schematic_trace"),
15594
- schematic_trace_id: z47.string(),
15595
- source_trace_id: z47.string().optional(),
15596
- junctions: z47.array(
15597
- z47.object({
15598
- x: z47.number(),
15599
- y: z47.number()
15668
+ var schematic_arc = z50.object({
15669
+ type: z50.literal("schematic_arc"),
15670
+ schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
15671
+ schematic_component_id: z50.string(),
15672
+ center: point,
15673
+ radius: distance,
15674
+ start_angle_degrees: rotation,
15675
+ end_angle_degrees: rotation,
15676
+ direction: z50.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
15677
+ stroke_width: distance.nullable().optional(),
15678
+ color: z50.string().default("#000000"),
15679
+ is_dashed: z50.boolean().default(false),
15680
+ subcircuit_id: z50.string().optional()
15681
+ }).describe("Draws a styled arc on the schematic");
15682
+ expectTypesMatch(true);
15683
+ var schematic_trace = z51.object({
15684
+ type: z51.literal("schematic_trace"),
15685
+ schematic_trace_id: z51.string(),
15686
+ source_trace_id: z51.string().optional(),
15687
+ junctions: z51.array(
15688
+ z51.object({
15689
+ x: z51.number(),
15690
+ y: z51.number()
15600
15691
  })
15601
15692
  ),
15602
- edges: z47.array(
15603
- z47.object({
15604
- from: z47.object({
15605
- x: z47.number(),
15606
- y: z47.number()
15693
+ edges: z51.array(
15694
+ z51.object({
15695
+ from: z51.object({
15696
+ x: z51.number(),
15697
+ y: z51.number()
15607
15698
  }),
15608
- to: z47.object({
15609
- x: z47.number(),
15610
- y: z47.number()
15699
+ to: z51.object({
15700
+ x: z51.number(),
15701
+ y: z51.number()
15611
15702
  }),
15612
- is_crossing: z47.boolean().optional(),
15613
- from_schematic_port_id: z47.string().optional(),
15614
- to_schematic_port_id: z47.string().optional()
15703
+ is_crossing: z51.boolean().optional(),
15704
+ from_schematic_port_id: z51.string().optional(),
15705
+ to_schematic_port_id: z51.string().optional()
15615
15706
  })
15616
15707
  ),
15617
- subcircuit_id: z47.string().optional(),
15708
+ subcircuit_id: z51.string().optional(),
15618
15709
  // TODO: make required in a future release
15619
- subcircuit_connectivity_map_key: z47.string().optional()
15710
+ subcircuit_connectivity_map_key: z51.string().optional()
15620
15711
  });
15621
15712
  expectTypesMatch(true);
15622
- var fivePointAnchor = z48.enum([
15713
+ var fivePointAnchor = z52.enum([
15623
15714
  "center",
15624
15715
  "left",
15625
15716
  "right",
@@ -15627,225 +15718,229 @@ var fivePointAnchor = z48.enum([
15627
15718
  "bottom"
15628
15719
  ]);
15629
15720
  expectTypesMatch(true);
15630
- var schematic_text = z49.object({
15631
- type: z49.literal("schematic_text"),
15632
- schematic_component_id: z49.string().optional(),
15633
- schematic_text_id: z49.string(),
15634
- text: z49.string(),
15635
- font_size: z49.number().default(0.18),
15636
- position: z49.object({
15721
+ var schematic_text = z53.object({
15722
+ type: z53.literal("schematic_text"),
15723
+ schematic_component_id: z53.string().optional(),
15724
+ schematic_text_id: z53.string(),
15725
+ text: z53.string(),
15726
+ font_size: z53.number().default(0.18),
15727
+ position: z53.object({
15637
15728
  x: distance,
15638
15729
  y: distance
15639
15730
  }),
15640
- rotation: z49.number().default(0),
15641
- anchor: z49.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
15642
- color: z49.string().default("#000000"),
15643
- subcircuit_id: z49.string().optional()
15731
+ rotation: z53.number().default(0),
15732
+ anchor: z53.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
15733
+ color: z53.string().default("#000000"),
15734
+ subcircuit_id: z53.string().optional()
15644
15735
  });
15645
15736
  expectTypesMatch(true);
15646
- var schematic_port = z50.object({
15647
- type: z50.literal("schematic_port"),
15648
- schematic_port_id: z50.string(),
15649
- source_port_id: z50.string(),
15650
- schematic_component_id: z50.string().optional(),
15737
+ var schematic_port = z54.object({
15738
+ type: z54.literal("schematic_port"),
15739
+ schematic_port_id: z54.string(),
15740
+ source_port_id: z54.string(),
15741
+ schematic_component_id: z54.string().optional(),
15651
15742
  center: point,
15652
- facing_direction: z50.enum(["up", "down", "left", "right"]).optional(),
15653
- distance_from_component_edge: z50.number().optional(),
15654
- side_of_component: z50.enum(["top", "bottom", "left", "right"]).optional(),
15655
- true_ccw_index: z50.number().optional(),
15656
- pin_number: z50.number().optional(),
15657
- display_pin_label: z50.string().optional(),
15658
- subcircuit_id: z50.string().optional(),
15659
- is_connected: z50.boolean().optional(),
15660
- has_input_arrow: z50.boolean().optional(),
15661
- has_output_arrow: z50.boolean().optional()
15743
+ facing_direction: z54.enum(["up", "down", "left", "right"]).optional(),
15744
+ distance_from_component_edge: z54.number().optional(),
15745
+ side_of_component: z54.enum(["top", "bottom", "left", "right"]).optional(),
15746
+ true_ccw_index: z54.number().optional(),
15747
+ pin_number: z54.number().optional(),
15748
+ display_pin_label: z54.string().optional(),
15749
+ subcircuit_id: z54.string().optional(),
15750
+ is_connected: z54.boolean().optional(),
15751
+ has_input_arrow: z54.boolean().optional(),
15752
+ has_output_arrow: z54.boolean().optional()
15662
15753
  }).describe("Defines a port on a schematic component");
15663
15754
  expectTypesMatch(true);
15664
- var schematic_net_label = z51.object({
15665
- type: z51.literal("schematic_net_label"),
15755
+ var schematic_net_label = z55.object({
15756
+ type: z55.literal("schematic_net_label"),
15666
15757
  schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
15667
- schematic_trace_id: z51.string().optional(),
15668
- source_trace_id: z51.string().optional(),
15669
- source_net_id: z51.string(),
15758
+ schematic_trace_id: z55.string().optional(),
15759
+ source_trace_id: z55.string().optional(),
15760
+ source_net_id: z55.string(),
15670
15761
  center: point,
15671
15762
  anchor_position: point.optional(),
15672
- anchor_side: z51.enum(["top", "bottom", "left", "right"]),
15673
- text: z51.string(),
15674
- symbol_name: z51.string().optional(),
15675
- is_movable: z51.boolean().optional(),
15676
- subcircuit_id: z51.string().optional()
15763
+ anchor_side: z55.enum(["top", "bottom", "left", "right"]),
15764
+ text: z55.string(),
15765
+ symbol_name: z55.string().optional(),
15766
+ is_movable: z55.boolean().optional(),
15767
+ subcircuit_id: z55.string().optional()
15677
15768
  });
15678
15769
  expectTypesMatch(true);
15679
- var schematic_error = z52.object({
15680
- type: z52.literal("schematic_error"),
15681
- schematic_error_id: z52.string(),
15770
+ var schematic_error = z56.object({
15771
+ type: z56.literal("schematic_error"),
15772
+ schematic_error_id: z56.string(),
15682
15773
  // eventually each error type should be broken out into a dir of files
15683
- error_type: z52.literal("schematic_port_not_found").default("schematic_port_not_found"),
15684
- message: z52.string(),
15685
- subcircuit_id: z52.string().optional()
15774
+ error_type: z56.literal("schematic_port_not_found").default("schematic_port_not_found"),
15775
+ message: z56.string(),
15776
+ subcircuit_id: z56.string().optional()
15686
15777
  }).describe("Defines a schematic error on the schematic");
15687
15778
  expectTypesMatch(true);
15688
- var schematic_layout_error = z53.object({
15689
- type: z53.literal("schematic_layout_error"),
15779
+ var schematic_layout_error = z57.object({
15780
+ type: z57.literal("schematic_layout_error"),
15690
15781
  schematic_layout_error_id: getZodPrefixedIdWithDefault(
15691
15782
  "schematic_layout_error"
15692
15783
  ),
15693
- error_type: z53.literal("schematic_layout_error").default("schematic_layout_error"),
15694
- message: z53.string(),
15695
- source_group_id: z53.string(),
15696
- schematic_group_id: z53.string(),
15697
- subcircuit_id: z53.string().optional()
15784
+ error_type: z57.literal("schematic_layout_error").default("schematic_layout_error"),
15785
+ message: z57.string(),
15786
+ source_group_id: z57.string(),
15787
+ schematic_group_id: z57.string(),
15788
+ subcircuit_id: z57.string().optional()
15698
15789
  }).describe("Error emitted when schematic layout fails for a group");
15699
15790
  expectTypesMatch(true);
15700
- var schematic_debug_object_base = z54.object({
15701
- type: z54.literal("schematic_debug_object"),
15702
- label: z54.string().optional(),
15703
- subcircuit_id: z54.string().optional()
15791
+ var schematic_debug_object_base = z58.object({
15792
+ type: z58.literal("schematic_debug_object"),
15793
+ label: z58.string().optional(),
15794
+ subcircuit_id: z58.string().optional()
15704
15795
  });
15705
15796
  var schematic_debug_rect = schematic_debug_object_base.extend({
15706
- shape: z54.literal("rect"),
15797
+ shape: z58.literal("rect"),
15707
15798
  center: point,
15708
15799
  size
15709
15800
  });
15710
15801
  var schematic_debug_line = schematic_debug_object_base.extend({
15711
- shape: z54.literal("line"),
15802
+ shape: z58.literal("line"),
15712
15803
  start: point,
15713
15804
  end: point
15714
15805
  });
15715
15806
  var schematic_debug_point = schematic_debug_object_base.extend({
15716
- shape: z54.literal("point"),
15807
+ shape: z58.literal("point"),
15717
15808
  center: point
15718
15809
  });
15719
- var schematic_debug_object = z54.discriminatedUnion("shape", [
15810
+ var schematic_debug_object = z58.discriminatedUnion("shape", [
15720
15811
  schematic_debug_rect,
15721
15812
  schematic_debug_line,
15722
15813
  schematic_debug_point
15723
15814
  ]);
15724
15815
  expectTypesMatch(true);
15725
- var schematic_voltage_probe = z55.object({
15726
- type: z55.literal("schematic_voltage_probe"),
15727
- schematic_voltage_probe_id: z55.string(),
15816
+ var schematic_voltage_probe = z59.object({
15817
+ type: z59.literal("schematic_voltage_probe"),
15818
+ schematic_voltage_probe_id: z59.string(),
15728
15819
  position: point,
15729
- schematic_trace_id: z55.string(),
15820
+ schematic_trace_id: z59.string(),
15730
15821
  voltage: voltage.optional(),
15731
- subcircuit_id: z55.string().optional()
15822
+ subcircuit_id: z59.string().optional()
15732
15823
  }).describe("Defines a voltage probe measurement point on a schematic trace");
15733
15824
  expectTypesMatch(true);
15734
- var schematic_manual_edit_conflict_warning = z56.object({
15735
- type: z56.literal("schematic_manual_edit_conflict_warning"),
15825
+ var schematic_manual_edit_conflict_warning = z60.object({
15826
+ type: z60.literal("schematic_manual_edit_conflict_warning"),
15736
15827
  schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
15737
15828
  "schematic_manual_edit_conflict_warning"
15738
15829
  ),
15739
- warning_type: z56.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
15740
- message: z56.string(),
15741
- schematic_component_id: z56.string(),
15742
- schematic_group_id: z56.string().optional(),
15743
- subcircuit_id: z56.string().optional(),
15744
- source_component_id: z56.string()
15830
+ warning_type: z60.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
15831
+ message: z60.string(),
15832
+ schematic_component_id: z60.string(),
15833
+ schematic_group_id: z60.string().optional(),
15834
+ subcircuit_id: z60.string().optional(),
15835
+ source_component_id: z60.string()
15745
15836
  }).describe(
15746
15837
  "Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
15747
15838
  );
15748
15839
  expectTypesMatch(true);
15749
- var schematic_group = z57.object({
15750
- type: z57.literal("schematic_group"),
15840
+ var schematic_group = z61.object({
15841
+ type: z61.literal("schematic_group"),
15751
15842
  schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
15752
- source_group_id: z57.string(),
15753
- is_subcircuit: z57.boolean().optional(),
15754
- subcircuit_id: z57.string().optional(),
15843
+ source_group_id: z61.string(),
15844
+ is_subcircuit: z61.boolean().optional(),
15845
+ subcircuit_id: z61.string().optional(),
15755
15846
  width: length,
15756
15847
  height: length,
15757
15848
  center: point,
15758
- schematic_component_ids: z57.array(z57.string()),
15759
- show_as_schematic_box: z57.boolean().optional(),
15760
- name: z57.string().optional(),
15761
- description: z57.string().optional()
15849
+ schematic_component_ids: z61.array(z61.string()),
15850
+ show_as_schematic_box: z61.boolean().optional(),
15851
+ name: z61.string().optional(),
15852
+ description: z61.string().optional()
15762
15853
  }).describe("Defines a group of components on the schematic");
15763
15854
  expectTypesMatch(true);
15764
- var schematic_table = z58.object({
15765
- type: z58.literal("schematic_table"),
15855
+ var schematic_table = z62.object({
15856
+ type: z62.literal("schematic_table"),
15766
15857
  schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
15767
15858
  anchor_position: point,
15768
- column_widths: z58.array(distance),
15769
- row_heights: z58.array(distance),
15859
+ column_widths: z62.array(distance),
15860
+ row_heights: z62.array(distance),
15770
15861
  cell_padding: distance.optional(),
15771
15862
  border_width: distance.optional(),
15772
- subcircuit_id: z58.string().optional(),
15773
- schematic_component_id: z58.string().optional(),
15863
+ subcircuit_id: z62.string().optional(),
15864
+ schematic_component_id: z62.string().optional(),
15774
15865
  anchor: ninePointAnchor.optional()
15775
15866
  }).describe("Defines a table on the schematic");
15776
15867
  expectTypesMatch(true);
15777
- var schematic_table_cell = z59.object({
15778
- type: z59.literal("schematic_table_cell"),
15868
+ var schematic_table_cell = z63.object({
15869
+ type: z63.literal("schematic_table_cell"),
15779
15870
  schematic_table_cell_id: getZodPrefixedIdWithDefault(
15780
15871
  "schematic_table_cell"
15781
15872
  ),
15782
- schematic_table_id: z59.string(),
15783
- start_row_index: z59.number(),
15784
- end_row_index: z59.number(),
15785
- start_column_index: z59.number(),
15786
- end_column_index: z59.number(),
15787
- text: z59.string().optional(),
15873
+ schematic_table_id: z63.string(),
15874
+ start_row_index: z63.number(),
15875
+ end_row_index: z63.number(),
15876
+ start_column_index: z63.number(),
15877
+ end_column_index: z63.number(),
15878
+ text: z63.string().optional(),
15788
15879
  center: point,
15789
15880
  width: distance,
15790
15881
  height: distance,
15791
- horizontal_align: z59.enum(["left", "center", "right"]).optional(),
15792
- vertical_align: z59.enum(["top", "middle", "bottom"]).optional(),
15882
+ horizontal_align: z63.enum(["left", "center", "right"]).optional(),
15883
+ vertical_align: z63.enum(["top", "middle", "bottom"]).optional(),
15793
15884
  font_size: distance.optional(),
15794
- subcircuit_id: z59.string().optional()
15885
+ subcircuit_id: z63.string().optional()
15795
15886
  }).describe("Defines a cell within a schematic_table");
15796
15887
  expectTypesMatch(true);
15797
- var point_with_bulge = z60.object({
15888
+ var point_with_bulge = z64.object({
15798
15889
  x: distance,
15799
15890
  y: distance,
15800
- bulge: z60.number().optional()
15891
+ bulge: z64.number().optional()
15801
15892
  });
15802
15893
  expectTypesMatch(true);
15803
- var ring = z60.object({
15804
- vertices: z60.array(point_with_bulge)
15894
+ var ring = z64.object({
15895
+ vertices: z64.array(point_with_bulge)
15805
15896
  });
15806
15897
  expectTypesMatch(true);
15807
- var brep_shape = z60.object({
15898
+ var brep_shape = z64.object({
15808
15899
  outer_ring: ring,
15809
- inner_rings: z60.array(ring).default([])
15900
+ inner_rings: z64.array(ring).default([])
15810
15901
  });
15811
15902
  expectTypesMatch(true);
15812
- var pcb_route_hint = z61.object({
15903
+ var pcb_route_hint = z65.object({
15813
15904
  x: distance,
15814
15905
  y: distance,
15815
- via: z61.boolean().optional(),
15906
+ via: z65.boolean().optional(),
15816
15907
  via_to_layer: layer_ref.optional()
15817
15908
  });
15818
- var pcb_route_hints = z61.array(pcb_route_hint);
15909
+ var pcb_route_hints = z65.array(pcb_route_hint);
15819
15910
  expectTypesMatch(true);
15820
15911
  expectTypesMatch(true);
15821
- var route_hint_point = z62.object({
15912
+ var route_hint_point = z66.object({
15822
15913
  x: distance,
15823
15914
  y: distance,
15824
- via: z62.boolean().optional(),
15915
+ via: z66.boolean().optional(),
15825
15916
  to_layer: layer_ref.optional(),
15826
15917
  trace_width: distance.optional()
15827
15918
  });
15828
15919
  expectTypesMatch(true);
15829
- var pcb_component = z63.object({
15830
- type: z63.literal("pcb_component"),
15920
+ var pcb_component = z67.object({
15921
+ type: z67.literal("pcb_component"),
15831
15922
  pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
15832
- source_component_id: z63.string(),
15923
+ source_component_id: z67.string(),
15833
15924
  center: point,
15834
15925
  layer: layer_ref,
15835
15926
  rotation,
15836
15927
  width: length,
15837
15928
  height: length,
15838
- subcircuit_id: z63.string().optional(),
15839
- pcb_group_id: z63.string().optional()
15929
+ do_not_place: z67.boolean().optional(),
15930
+ subcircuit_id: z67.string().optional(),
15931
+ pcb_group_id: z67.string().optional(),
15932
+ obstructs_within_bounds: z67.boolean().default(true).describe(
15933
+ "Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"
15934
+ )
15840
15935
  }).describe("Defines a component on the PCB");
15841
15936
  expectTypesMatch(true);
15842
- var pcb_hole_circle_or_square = z64.object({
15843
- type: z64.literal("pcb_hole"),
15937
+ var pcb_hole_circle_or_square = z68.object({
15938
+ type: z68.literal("pcb_hole"),
15844
15939
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
15845
- pcb_group_id: z64.string().optional(),
15846
- subcircuit_id: z64.string().optional(),
15847
- hole_shape: z64.enum(["circle", "square"]),
15848
- hole_diameter: z64.number(),
15940
+ pcb_group_id: z68.string().optional(),
15941
+ subcircuit_id: z68.string().optional(),
15942
+ hole_shape: z68.enum(["circle", "square"]),
15943
+ hole_diameter: z68.number(),
15849
15944
  x: distance,
15850
15945
  y: distance
15851
15946
  });
@@ -15853,14 +15948,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
15853
15948
  "Defines a circular or square hole on the PCB"
15854
15949
  );
15855
15950
  expectTypesMatch(true);
15856
- var pcb_hole_oval = z64.object({
15857
- type: z64.literal("pcb_hole"),
15951
+ var pcb_hole_oval = z68.object({
15952
+ type: z68.literal("pcb_hole"),
15858
15953
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
15859
- pcb_group_id: z64.string().optional(),
15860
- subcircuit_id: z64.string().optional(),
15861
- hole_shape: z64.literal("oval"),
15862
- hole_width: z64.number(),
15863
- hole_height: z64.number(),
15954
+ pcb_group_id: z68.string().optional(),
15955
+ subcircuit_id: z68.string().optional(),
15956
+ hole_shape: z68.literal("oval"),
15957
+ hole_width: z68.number(),
15958
+ hole_height: z68.number(),
15864
15959
  x: distance,
15865
15960
  y: distance
15866
15961
  });
@@ -15868,104 +15963,139 @@ var pcb_hole_oval_shape = pcb_hole_oval.describe(
15868
15963
  "Defines an oval hole on the PCB"
15869
15964
  );
15870
15965
  expectTypesMatch(true);
15871
- var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
15872
- var pcb_plated_hole_circle = z65.object({
15873
- type: z65.literal("pcb_plated_hole"),
15874
- shape: z65.literal("circle"),
15875
- pcb_group_id: z65.string().optional(),
15876
- subcircuit_id: z65.string().optional(),
15877
- outer_diameter: z65.number(),
15878
- hole_diameter: z65.number(),
15966
+ var pcb_hole_pill = z68.object({
15967
+ type: z68.literal("pcb_hole"),
15968
+ pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
15969
+ pcb_group_id: z68.string().optional(),
15970
+ subcircuit_id: z68.string().optional(),
15971
+ hole_shape: z68.literal("pill"),
15972
+ hole_width: z68.number(),
15973
+ hole_height: z68.number(),
15974
+ x: distance,
15975
+ y: distance
15976
+ });
15977
+ var pcb_hole_pill_shape = pcb_hole_pill.describe(
15978
+ "Defines a pill-shaped hole on the PCB"
15979
+ );
15980
+ expectTypesMatch(true);
15981
+ var pcb_hole_rotated_pill = z68.object({
15982
+ type: z68.literal("pcb_hole"),
15983
+ pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
15984
+ pcb_group_id: z68.string().optional(),
15985
+ subcircuit_id: z68.string().optional(),
15986
+ hole_shape: z68.literal("rotated_pill"),
15987
+ hole_width: z68.number(),
15988
+ hole_height: z68.number(),
15989
+ x: distance,
15990
+ y: distance,
15991
+ ccw_rotation: rotation
15992
+ });
15993
+ var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
15994
+ "Defines a rotated pill-shaped hole on the PCB"
15995
+ );
15996
+ expectTypesMatch(true);
15997
+ var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill);
15998
+ var pcb_plated_hole_circle = z69.object({
15999
+ type: z69.literal("pcb_plated_hole"),
16000
+ shape: z69.literal("circle"),
16001
+ pcb_group_id: z69.string().optional(),
16002
+ subcircuit_id: z69.string().optional(),
16003
+ outer_diameter: z69.number(),
16004
+ hole_diameter: z69.number(),
15879
16005
  x: distance,
15880
16006
  y: distance,
15881
- layers: z65.array(layer_ref),
15882
- port_hints: z65.array(z65.string()).optional(),
15883
- pcb_component_id: z65.string().optional(),
15884
- pcb_port_id: z65.string().optional(),
16007
+ layers: z69.array(layer_ref),
16008
+ port_hints: z69.array(z69.string()).optional(),
16009
+ pcb_component_id: z69.string().optional(),
16010
+ pcb_port_id: z69.string().optional(),
15885
16011
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
15886
16012
  });
15887
- var pcb_plated_hole_oval = z65.object({
15888
- type: z65.literal("pcb_plated_hole"),
15889
- shape: z65.enum(["oval", "pill"]),
15890
- pcb_group_id: z65.string().optional(),
15891
- subcircuit_id: z65.string().optional(),
15892
- outer_width: z65.number(),
15893
- outer_height: z65.number(),
15894
- hole_width: z65.number(),
15895
- hole_height: z65.number(),
16013
+ var pcb_plated_hole_oval = z69.object({
16014
+ type: z69.literal("pcb_plated_hole"),
16015
+ shape: z69.enum(["oval", "pill"]),
16016
+ pcb_group_id: z69.string().optional(),
16017
+ subcircuit_id: z69.string().optional(),
16018
+ outer_width: z69.number(),
16019
+ outer_height: z69.number(),
16020
+ hole_width: z69.number(),
16021
+ hole_height: z69.number(),
15896
16022
  x: distance,
15897
16023
  y: distance,
15898
16024
  ccw_rotation: rotation,
15899
- layers: z65.array(layer_ref),
15900
- port_hints: z65.array(z65.string()).optional(),
15901
- pcb_component_id: z65.string().optional(),
15902
- pcb_port_id: z65.string().optional(),
16025
+ layers: z69.array(layer_ref),
16026
+ port_hints: z69.array(z69.string()).optional(),
16027
+ pcb_component_id: z69.string().optional(),
16028
+ pcb_port_id: z69.string().optional(),
15903
16029
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
15904
16030
  });
15905
- var pcb_circular_hole_with_rect_pad = z65.object({
15906
- type: z65.literal("pcb_plated_hole"),
15907
- shape: z65.literal("circular_hole_with_rect_pad"),
15908
- pcb_group_id: z65.string().optional(),
15909
- subcircuit_id: z65.string().optional(),
15910
- hole_shape: z65.literal("circle"),
15911
- pad_shape: z65.literal("rect"),
15912
- hole_diameter: z65.number(),
15913
- rect_pad_width: z65.number(),
15914
- rect_pad_height: z65.number(),
15915
- rect_border_radius: z65.number().optional(),
16031
+ var pcb_circular_hole_with_rect_pad = z69.object({
16032
+ type: z69.literal("pcb_plated_hole"),
16033
+ shape: z69.literal("circular_hole_with_rect_pad"),
16034
+ pcb_group_id: z69.string().optional(),
16035
+ subcircuit_id: z69.string().optional(),
16036
+ hole_shape: z69.literal("circle"),
16037
+ pad_shape: z69.literal("rect"),
16038
+ hole_diameter: z69.number(),
16039
+ rect_pad_width: z69.number(),
16040
+ rect_pad_height: z69.number(),
16041
+ rect_border_radius: z69.number().optional(),
15916
16042
  hole_offset_x: distance.default(0),
15917
16043
  hole_offset_y: distance.default(0),
15918
16044
  x: distance,
15919
16045
  y: distance,
15920
- layers: z65.array(layer_ref),
15921
- port_hints: z65.array(z65.string()).optional(),
15922
- pcb_component_id: z65.string().optional(),
15923
- pcb_port_id: z65.string().optional(),
16046
+ layers: z69.array(layer_ref),
16047
+ port_hints: z69.array(z69.string()).optional(),
16048
+ pcb_component_id: z69.string().optional(),
16049
+ pcb_port_id: z69.string().optional(),
15924
16050
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
15925
16051
  });
15926
- var pcb_pill_hole_with_rect_pad = z65.object({
15927
- type: z65.literal("pcb_plated_hole"),
15928
- shape: z65.literal("pill_hole_with_rect_pad"),
15929
- pcb_group_id: z65.string().optional(),
15930
- subcircuit_id: z65.string().optional(),
15931
- hole_shape: z65.literal("pill"),
15932
- pad_shape: z65.literal("rect"),
15933
- hole_width: z65.number(),
15934
- hole_height: z65.number(),
15935
- rect_pad_width: z65.number(),
15936
- rect_pad_height: z65.number(),
15937
- rect_border_radius: z65.number().optional(),
16052
+ var pcb_pill_hole_with_rect_pad = z69.object({
16053
+ type: z69.literal("pcb_plated_hole"),
16054
+ shape: z69.literal("pill_hole_with_rect_pad"),
16055
+ pcb_group_id: z69.string().optional(),
16056
+ subcircuit_id: z69.string().optional(),
16057
+ hole_shape: z69.literal("pill"),
16058
+ pad_shape: z69.literal("rect"),
16059
+ hole_width: z69.number(),
16060
+ hole_height: z69.number(),
16061
+ rect_pad_width: z69.number(),
16062
+ rect_pad_height: z69.number(),
16063
+ rect_border_radius: z69.number().optional(),
16064
+ hole_offset_x: distance.default(0),
16065
+ hole_offset_y: distance.default(0),
15938
16066
  x: distance,
15939
16067
  y: distance,
15940
- layers: z65.array(layer_ref),
15941
- port_hints: z65.array(z65.string()).optional(),
15942
- pcb_component_id: z65.string().optional(),
15943
- pcb_port_id: z65.string().optional(),
16068
+ layers: z69.array(layer_ref),
16069
+ port_hints: z69.array(z69.string()).optional(),
16070
+ pcb_component_id: z69.string().optional(),
16071
+ pcb_port_id: z69.string().optional(),
15944
16072
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
15945
16073
  });
15946
- var pcb_rotated_pill_hole_with_rect_pad = z65.object({
15947
- type: z65.literal("pcb_plated_hole"),
15948
- shape: z65.literal("rotated_pill_hole_with_rect_pad"),
15949
- pcb_group_id: z65.string().optional(),
15950
- subcircuit_id: z65.string().optional(),
15951
- hole_shape: z65.literal("rotated_pill"),
15952
- pad_shape: z65.literal("rect"),
15953
- hole_width: z65.number(),
15954
- hole_height: z65.number(),
16074
+ var pcb_rotated_pill_hole_with_rect_pad = z69.object({
16075
+ type: z69.literal("pcb_plated_hole"),
16076
+ shape: z69.literal("rotated_pill_hole_with_rect_pad"),
16077
+ pcb_group_id: z69.string().optional(),
16078
+ subcircuit_id: z69.string().optional(),
16079
+ hole_shape: z69.literal("rotated_pill"),
16080
+ pad_shape: z69.literal("rect"),
16081
+ hole_width: z69.number(),
16082
+ hole_height: z69.number(),
15955
16083
  hole_ccw_rotation: rotation,
15956
- rect_pad_width: z65.number(),
15957
- rect_pad_height: z65.number(),
15958
- rect_border_radius: z65.number().optional(),
16084
+ rect_pad_width: z69.number(),
16085
+ rect_pad_height: z69.number(),
16086
+ rect_border_radius: z69.number().optional(),
15959
16087
  rect_ccw_rotation: rotation,
16088
+ hole_offset_x: distance.default(0),
16089
+ hole_offset_y: distance.default(0),
15960
16090
  x: distance,
15961
16091
  y: distance,
15962
- layers: z65.array(layer_ref),
15963
- port_hints: z65.array(z65.string()).optional(),
15964
- pcb_component_id: z65.string().optional(),
15965
- pcb_port_id: z65.string().optional(),
16092
+ layers: z69.array(layer_ref),
16093
+ port_hints: z69.array(z69.string()).optional(),
16094
+ pcb_component_id: z69.string().optional(),
16095
+ pcb_port_id: z69.string().optional(),
15966
16096
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
15967
16097
  });
15968
- var pcb_plated_hole = z65.union([
16098
+ var pcb_plated_hole = z69.union([
15969
16099
  pcb_plated_hole_circle,
15970
16100
  pcb_plated_hole_oval,
15971
16101
  pcb_circular_hole_with_rect_pad,
@@ -15979,118 +16109,118 @@ expectTypesMatch(true);
15979
16109
  expectTypesMatch(true);
15980
16110
  expectTypesMatch(true);
15981
16111
  expectTypesMatch(true);
15982
- var pcb_port = z66.object({
15983
- type: z66.literal("pcb_port"),
16112
+ var pcb_port = z70.object({
16113
+ type: z70.literal("pcb_port"),
15984
16114
  pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
15985
- pcb_group_id: z66.string().optional(),
15986
- subcircuit_id: z66.string().optional(),
15987
- source_port_id: z66.string(),
15988
- pcb_component_id: z66.string(),
16115
+ pcb_group_id: z70.string().optional(),
16116
+ subcircuit_id: z70.string().optional(),
16117
+ source_port_id: z70.string(),
16118
+ pcb_component_id: z70.string(),
15989
16119
  x: distance,
15990
16120
  y: distance,
15991
- layers: z66.array(layer_ref),
15992
- is_board_pinout: z66.boolean().optional()
16121
+ layers: z70.array(layer_ref),
16122
+ is_board_pinout: z70.boolean().optional()
15993
16123
  }).describe("Defines a port on the PCB");
15994
16124
  expectTypesMatch(true);
15995
- var pcb_smtpad_circle = z67.object({
15996
- type: z67.literal("pcb_smtpad"),
15997
- shape: z67.literal("circle"),
16125
+ var pcb_smtpad_circle = z71.object({
16126
+ type: z71.literal("pcb_smtpad"),
16127
+ shape: z71.literal("circle"),
15998
16128
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
15999
- pcb_group_id: z67.string().optional(),
16000
- subcircuit_id: z67.string().optional(),
16129
+ pcb_group_id: z71.string().optional(),
16130
+ subcircuit_id: z71.string().optional(),
16001
16131
  x: distance,
16002
16132
  y: distance,
16003
- radius: z67.number(),
16133
+ radius: z71.number(),
16004
16134
  layer: layer_ref,
16005
- port_hints: z67.array(z67.string()).optional(),
16006
- pcb_component_id: z67.string().optional(),
16007
- pcb_port_id: z67.string().optional(),
16008
- is_covered_with_solder_mask: z67.boolean().optional()
16009
- });
16010
- var pcb_smtpad_rect = z67.object({
16011
- type: z67.literal("pcb_smtpad"),
16012
- shape: z67.literal("rect"),
16135
+ port_hints: z71.array(z71.string()).optional(),
16136
+ pcb_component_id: z71.string().optional(),
16137
+ pcb_port_id: z71.string().optional(),
16138
+ is_covered_with_solder_mask: z71.boolean().optional()
16139
+ });
16140
+ var pcb_smtpad_rect = z71.object({
16141
+ type: z71.literal("pcb_smtpad"),
16142
+ shape: z71.literal("rect"),
16013
16143
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
16014
- pcb_group_id: z67.string().optional(),
16015
- subcircuit_id: z67.string().optional(),
16144
+ pcb_group_id: z71.string().optional(),
16145
+ subcircuit_id: z71.string().optional(),
16016
16146
  x: distance,
16017
16147
  y: distance,
16018
- width: z67.number(),
16019
- height: z67.number(),
16020
- rect_border_radius: z67.number().optional(),
16148
+ width: z71.number(),
16149
+ height: z71.number(),
16150
+ rect_border_radius: z71.number().optional(),
16021
16151
  layer: layer_ref,
16022
- port_hints: z67.array(z67.string()).optional(),
16023
- pcb_component_id: z67.string().optional(),
16024
- pcb_port_id: z67.string().optional(),
16025
- is_covered_with_solder_mask: z67.boolean().optional()
16026
- });
16027
- var pcb_smtpad_rotated_rect = z67.object({
16028
- type: z67.literal("pcb_smtpad"),
16029
- shape: z67.literal("rotated_rect"),
16152
+ port_hints: z71.array(z71.string()).optional(),
16153
+ pcb_component_id: z71.string().optional(),
16154
+ pcb_port_id: z71.string().optional(),
16155
+ is_covered_with_solder_mask: z71.boolean().optional()
16156
+ });
16157
+ var pcb_smtpad_rotated_rect = z71.object({
16158
+ type: z71.literal("pcb_smtpad"),
16159
+ shape: z71.literal("rotated_rect"),
16030
16160
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
16031
- pcb_group_id: z67.string().optional(),
16032
- subcircuit_id: z67.string().optional(),
16161
+ pcb_group_id: z71.string().optional(),
16162
+ subcircuit_id: z71.string().optional(),
16033
16163
  x: distance,
16034
16164
  y: distance,
16035
- width: z67.number(),
16036
- height: z67.number(),
16037
- rect_border_radius: z67.number().optional(),
16165
+ width: z71.number(),
16166
+ height: z71.number(),
16167
+ rect_border_radius: z71.number().optional(),
16038
16168
  ccw_rotation: rotation,
16039
16169
  layer: layer_ref,
16040
- port_hints: z67.array(z67.string()).optional(),
16041
- pcb_component_id: z67.string().optional(),
16042
- pcb_port_id: z67.string().optional(),
16043
- is_covered_with_solder_mask: z67.boolean().optional()
16044
- });
16045
- var pcb_smtpad_pill = z67.object({
16046
- type: z67.literal("pcb_smtpad"),
16047
- shape: z67.literal("pill"),
16170
+ port_hints: z71.array(z71.string()).optional(),
16171
+ pcb_component_id: z71.string().optional(),
16172
+ pcb_port_id: z71.string().optional(),
16173
+ is_covered_with_solder_mask: z71.boolean().optional()
16174
+ });
16175
+ var pcb_smtpad_pill = z71.object({
16176
+ type: z71.literal("pcb_smtpad"),
16177
+ shape: z71.literal("pill"),
16048
16178
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
16049
- pcb_group_id: z67.string().optional(),
16050
- subcircuit_id: z67.string().optional(),
16179
+ pcb_group_id: z71.string().optional(),
16180
+ subcircuit_id: z71.string().optional(),
16051
16181
  x: distance,
16052
16182
  y: distance,
16053
- width: z67.number(),
16054
- height: z67.number(),
16055
- radius: z67.number(),
16183
+ width: z71.number(),
16184
+ height: z71.number(),
16185
+ radius: z71.number(),
16056
16186
  layer: layer_ref,
16057
- port_hints: z67.array(z67.string()).optional(),
16058
- pcb_component_id: z67.string().optional(),
16059
- pcb_port_id: z67.string().optional(),
16060
- is_covered_with_solder_mask: z67.boolean().optional()
16061
- });
16062
- var pcb_smtpad_rotated_pill = z67.object({
16063
- type: z67.literal("pcb_smtpad"),
16064
- shape: z67.literal("rotated_pill"),
16187
+ port_hints: z71.array(z71.string()).optional(),
16188
+ pcb_component_id: z71.string().optional(),
16189
+ pcb_port_id: z71.string().optional(),
16190
+ is_covered_with_solder_mask: z71.boolean().optional()
16191
+ });
16192
+ var pcb_smtpad_rotated_pill = z71.object({
16193
+ type: z71.literal("pcb_smtpad"),
16194
+ shape: z71.literal("rotated_pill"),
16065
16195
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
16066
- pcb_group_id: z67.string().optional(),
16067
- subcircuit_id: z67.string().optional(),
16196
+ pcb_group_id: z71.string().optional(),
16197
+ subcircuit_id: z71.string().optional(),
16068
16198
  x: distance,
16069
16199
  y: distance,
16070
- width: z67.number(),
16071
- height: z67.number(),
16072
- radius: z67.number(),
16200
+ width: z71.number(),
16201
+ height: z71.number(),
16202
+ radius: z71.number(),
16073
16203
  ccw_rotation: rotation,
16074
16204
  layer: layer_ref,
16075
- port_hints: z67.array(z67.string()).optional(),
16076
- pcb_component_id: z67.string().optional(),
16077
- pcb_port_id: z67.string().optional(),
16078
- is_covered_with_solder_mask: z67.boolean().optional()
16079
- });
16080
- var pcb_smtpad_polygon = z67.object({
16081
- type: z67.literal("pcb_smtpad"),
16082
- shape: z67.literal("polygon"),
16205
+ port_hints: z71.array(z71.string()).optional(),
16206
+ pcb_component_id: z71.string().optional(),
16207
+ pcb_port_id: z71.string().optional(),
16208
+ is_covered_with_solder_mask: z71.boolean().optional()
16209
+ });
16210
+ var pcb_smtpad_polygon = z71.object({
16211
+ type: z71.literal("pcb_smtpad"),
16212
+ shape: z71.literal("polygon"),
16083
16213
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
16084
- pcb_group_id: z67.string().optional(),
16085
- subcircuit_id: z67.string().optional(),
16086
- points: z67.array(point),
16214
+ pcb_group_id: z71.string().optional(),
16215
+ subcircuit_id: z71.string().optional(),
16216
+ points: z71.array(point),
16087
16217
  layer: layer_ref,
16088
- port_hints: z67.array(z67.string()).optional(),
16089
- pcb_component_id: z67.string().optional(),
16090
- pcb_port_id: z67.string().optional(),
16091
- is_covered_with_solder_mask: z67.boolean().optional()
16218
+ port_hints: z71.array(z71.string()).optional(),
16219
+ pcb_component_id: z71.string().optional(),
16220
+ pcb_port_id: z71.string().optional(),
16221
+ is_covered_with_solder_mask: z71.boolean().optional()
16092
16222
  });
16093
- var pcb_smtpad = z67.discriminatedUnion("shape", [
16223
+ var pcb_smtpad = z71.discriminatedUnion("shape", [
16094
16224
  pcb_smtpad_circle,
16095
16225
  pcb_smtpad_rect,
16096
16226
  pcb_smtpad_rotated_rect,
@@ -16104,78 +16234,78 @@ expectTypesMatch(true);
16104
16234
  expectTypesMatch(true);
16105
16235
  expectTypesMatch(true);
16106
16236
  expectTypesMatch(true);
16107
- var pcb_solder_paste_circle = z68.object({
16108
- type: z68.literal("pcb_solder_paste"),
16109
- shape: z68.literal("circle"),
16237
+ var pcb_solder_paste_circle = z72.object({
16238
+ type: z72.literal("pcb_solder_paste"),
16239
+ shape: z72.literal("circle"),
16110
16240
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
16111
- pcb_group_id: z68.string().optional(),
16112
- subcircuit_id: z68.string().optional(),
16241
+ pcb_group_id: z72.string().optional(),
16242
+ subcircuit_id: z72.string().optional(),
16113
16243
  x: distance,
16114
16244
  y: distance,
16115
- radius: z68.number(),
16245
+ radius: z72.number(),
16116
16246
  layer: layer_ref,
16117
- pcb_component_id: z68.string().optional(),
16118
- pcb_smtpad_id: z68.string().optional()
16247
+ pcb_component_id: z72.string().optional(),
16248
+ pcb_smtpad_id: z72.string().optional()
16119
16249
  });
16120
- var pcb_solder_paste_rect = z68.object({
16121
- type: z68.literal("pcb_solder_paste"),
16122
- shape: z68.literal("rect"),
16250
+ var pcb_solder_paste_rect = z72.object({
16251
+ type: z72.literal("pcb_solder_paste"),
16252
+ shape: z72.literal("rect"),
16123
16253
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
16124
- pcb_group_id: z68.string().optional(),
16125
- subcircuit_id: z68.string().optional(),
16254
+ pcb_group_id: z72.string().optional(),
16255
+ subcircuit_id: z72.string().optional(),
16126
16256
  x: distance,
16127
16257
  y: distance,
16128
- width: z68.number(),
16129
- height: z68.number(),
16258
+ width: z72.number(),
16259
+ height: z72.number(),
16130
16260
  layer: layer_ref,
16131
- pcb_component_id: z68.string().optional(),
16132
- pcb_smtpad_id: z68.string().optional()
16261
+ pcb_component_id: z72.string().optional(),
16262
+ pcb_smtpad_id: z72.string().optional()
16133
16263
  });
16134
- var pcb_solder_paste_pill = z68.object({
16135
- type: z68.literal("pcb_solder_paste"),
16136
- shape: z68.literal("pill"),
16264
+ var pcb_solder_paste_pill = z72.object({
16265
+ type: z72.literal("pcb_solder_paste"),
16266
+ shape: z72.literal("pill"),
16137
16267
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
16138
- pcb_group_id: z68.string().optional(),
16139
- subcircuit_id: z68.string().optional(),
16268
+ pcb_group_id: z72.string().optional(),
16269
+ subcircuit_id: z72.string().optional(),
16140
16270
  x: distance,
16141
16271
  y: distance,
16142
- width: z68.number(),
16143
- height: z68.number(),
16144
- radius: z68.number(),
16272
+ width: z72.number(),
16273
+ height: z72.number(),
16274
+ radius: z72.number(),
16145
16275
  layer: layer_ref,
16146
- pcb_component_id: z68.string().optional(),
16147
- pcb_smtpad_id: z68.string().optional()
16276
+ pcb_component_id: z72.string().optional(),
16277
+ pcb_smtpad_id: z72.string().optional()
16148
16278
  });
16149
- var pcb_solder_paste_rotated_rect = z68.object({
16150
- type: z68.literal("pcb_solder_paste"),
16151
- shape: z68.literal("rotated_rect"),
16279
+ var pcb_solder_paste_rotated_rect = z72.object({
16280
+ type: z72.literal("pcb_solder_paste"),
16281
+ shape: z72.literal("rotated_rect"),
16152
16282
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
16153
- pcb_group_id: z68.string().optional(),
16154
- subcircuit_id: z68.string().optional(),
16283
+ pcb_group_id: z72.string().optional(),
16284
+ subcircuit_id: z72.string().optional(),
16155
16285
  x: distance,
16156
16286
  y: distance,
16157
- width: z68.number(),
16158
- height: z68.number(),
16287
+ width: z72.number(),
16288
+ height: z72.number(),
16159
16289
  ccw_rotation: distance,
16160
16290
  layer: layer_ref,
16161
- pcb_component_id: z68.string().optional(),
16162
- pcb_smtpad_id: z68.string().optional()
16291
+ pcb_component_id: z72.string().optional(),
16292
+ pcb_smtpad_id: z72.string().optional()
16163
16293
  });
16164
- var pcb_solder_paste_oval = z68.object({
16165
- type: z68.literal("pcb_solder_paste"),
16166
- shape: z68.literal("oval"),
16294
+ var pcb_solder_paste_oval = z72.object({
16295
+ type: z72.literal("pcb_solder_paste"),
16296
+ shape: z72.literal("oval"),
16167
16297
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
16168
- pcb_group_id: z68.string().optional(),
16169
- subcircuit_id: z68.string().optional(),
16298
+ pcb_group_id: z72.string().optional(),
16299
+ subcircuit_id: z72.string().optional(),
16170
16300
  x: distance,
16171
16301
  y: distance,
16172
- width: z68.number(),
16173
- height: z68.number(),
16302
+ width: z72.number(),
16303
+ height: z72.number(),
16174
16304
  layer: layer_ref,
16175
- pcb_component_id: z68.string().optional(),
16176
- pcb_smtpad_id: z68.string().optional()
16305
+ pcb_component_id: z72.string().optional(),
16306
+ pcb_smtpad_id: z72.string().optional()
16177
16307
  });
16178
- var pcb_solder_paste = z68.union([
16308
+ var pcb_solder_paste = z72.union([
16179
16309
  pcb_solder_paste_circle,
16180
16310
  pcb_solder_paste_rect,
16181
16311
  pcb_solder_paste_pill,
@@ -16189,115 +16319,123 @@ expectTypesMatch(
16189
16319
  true
16190
16320
  );
16191
16321
  expectTypesMatch(true);
16192
- var pcb_text = z69.object({
16193
- type: z69.literal("pcb_text"),
16322
+ var pcb_text = z73.object({
16323
+ type: z73.literal("pcb_text"),
16194
16324
  pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
16195
- pcb_group_id: z69.string().optional(),
16196
- subcircuit_id: z69.string().optional(),
16197
- text: z69.string(),
16325
+ pcb_group_id: z73.string().optional(),
16326
+ subcircuit_id: z73.string().optional(),
16327
+ text: z73.string(),
16198
16328
  center: point,
16199
16329
  layer: layer_ref,
16200
16330
  width: length,
16201
16331
  height: length,
16202
- lines: z69.number(),
16332
+ lines: z73.number(),
16203
16333
  // @ts-ignore
16204
- align: z69.enum(["bottom-left"])
16334
+ align: z73.enum(["bottom-left"])
16205
16335
  }).describe("Defines text on the PCB");
16206
16336
  expectTypesMatch(true);
16207
- var pcb_trace_route_point_wire = z70.object({
16208
- route_type: z70.literal("wire"),
16337
+ var pcb_trace_route_point_wire = z74.object({
16338
+ route_type: z74.literal("wire"),
16209
16339
  x: distance,
16210
16340
  y: distance,
16211
16341
  width: distance,
16212
- start_pcb_port_id: z70.string().optional(),
16213
- end_pcb_port_id: z70.string().optional(),
16342
+ start_pcb_port_id: z74.string().optional(),
16343
+ end_pcb_port_id: z74.string().optional(),
16214
16344
  layer: layer_ref
16215
16345
  });
16216
- var pcb_trace_route_point_via = z70.object({
16217
- route_type: z70.literal("via"),
16346
+ var pcb_trace_route_point_via = z74.object({
16347
+ route_type: z74.literal("via"),
16218
16348
  x: distance,
16219
16349
  y: distance,
16220
16350
  hole_diameter: distance.optional(),
16221
16351
  outer_diameter: distance.optional(),
16222
- from_layer: z70.string(),
16223
- to_layer: z70.string()
16352
+ from_layer: z74.string(),
16353
+ to_layer: z74.string()
16224
16354
  });
16225
- var pcb_trace_route_point = z70.union([
16355
+ var pcb_trace_route_point = z74.union([
16226
16356
  pcb_trace_route_point_wire,
16227
16357
  pcb_trace_route_point_via
16228
16358
  ]);
16229
- var pcb_trace = z70.object({
16230
- type: z70.literal("pcb_trace"),
16231
- source_trace_id: z70.string().optional(),
16232
- pcb_component_id: z70.string().optional(),
16359
+ var pcb_trace = z74.object({
16360
+ type: z74.literal("pcb_trace"),
16361
+ source_trace_id: z74.string().optional(),
16362
+ pcb_component_id: z74.string().optional(),
16233
16363
  pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
16234
- pcb_group_id: z70.string().optional(),
16235
- subcircuit_id: z70.string().optional(),
16236
- route_thickness_mode: z70.enum(["constant", "interpolated"]).default("constant").optional(),
16237
- route_order_index: z70.number().optional(),
16238
- should_round_corners: z70.boolean().optional(),
16239
- trace_length: z70.number().optional(),
16240
- route: z70.array(pcb_trace_route_point)
16364
+ pcb_group_id: z74.string().optional(),
16365
+ subcircuit_id: z74.string().optional(),
16366
+ route_thickness_mode: z74.enum(["constant", "interpolated"]).default("constant").optional(),
16367
+ route_order_index: z74.number().optional(),
16368
+ should_round_corners: z74.boolean().optional(),
16369
+ trace_length: z74.number().optional(),
16370
+ highlight_color: z74.string().optional(),
16371
+ route: z74.array(pcb_trace_route_point)
16241
16372
  }).describe("Defines a trace on the PCB");
16242
16373
  expectTypesMatch(true);
16243
16374
  expectTypesMatch(true);
16244
- var pcb_trace_error = z71.object({
16245
- type: z71.literal("pcb_trace_error"),
16375
+ var pcb_trace_error = z75.object({
16376
+ type: z75.literal("pcb_trace_error"),
16246
16377
  pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
16247
- error_type: z71.literal("pcb_trace_error").default("pcb_trace_error"),
16248
- message: z71.string(),
16378
+ error_type: z75.literal("pcb_trace_error").default("pcb_trace_error"),
16379
+ message: z75.string(),
16249
16380
  center: point.optional(),
16250
- pcb_trace_id: z71.string(),
16251
- source_trace_id: z71.string(),
16252
- pcb_component_ids: z71.array(z71.string()),
16253
- pcb_port_ids: z71.array(z71.string()),
16254
- subcircuit_id: z71.string().optional()
16381
+ pcb_trace_id: z75.string(),
16382
+ source_trace_id: z75.string(),
16383
+ pcb_component_ids: z75.array(z75.string()),
16384
+ pcb_port_ids: z75.array(z75.string()),
16385
+ subcircuit_id: z75.string().optional()
16255
16386
  }).describe("Defines a trace error on the PCB");
16256
16387
  expectTypesMatch(true);
16257
- var pcb_trace_missing_error = z72.object({
16258
- type: z72.literal("pcb_trace_missing_error"),
16388
+ var pcb_trace_missing_error = z76.object({
16389
+ type: z76.literal("pcb_trace_missing_error"),
16259
16390
  pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
16260
16391
  "pcb_trace_missing_error"
16261
16392
  ),
16262
- error_type: z72.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
16263
- message: z72.string(),
16393
+ error_type: z76.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
16394
+ message: z76.string(),
16264
16395
  center: point.optional(),
16265
- source_trace_id: z72.string(),
16266
- pcb_component_ids: z72.array(z72.string()),
16267
- pcb_port_ids: z72.array(z72.string()),
16268
- subcircuit_id: z72.string().optional()
16396
+ source_trace_id: z76.string(),
16397
+ pcb_component_ids: z76.array(z76.string()),
16398
+ pcb_port_ids: z76.array(z76.string()),
16399
+ subcircuit_id: z76.string().optional()
16269
16400
  }).describe(
16270
16401
  "Defines an error when a source trace has no corresponding PCB trace"
16271
16402
  );
16272
16403
  expectTypesMatch(true);
16273
- var pcb_port_not_matched_error = z73.object({
16274
- type: z73.literal("pcb_port_not_matched_error"),
16404
+ var pcb_port_not_matched_error = z77.object({
16405
+ type: z77.literal("pcb_port_not_matched_error"),
16275
16406
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
16276
- error_type: z73.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
16277
- message: z73.string(),
16278
- pcb_component_ids: z73.array(z73.string()),
16279
- subcircuit_id: z73.string().optional()
16407
+ error_type: z77.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
16408
+ message: z77.string(),
16409
+ pcb_component_ids: z77.array(z77.string()),
16410
+ subcircuit_id: z77.string().optional()
16280
16411
  }).describe("Defines a trace error on the PCB where a port is not matched");
16281
16412
  expectTypesMatch(true);
16282
- var pcb_port_not_connected_error = z74.object({
16283
- type: z74.literal("pcb_port_not_connected_error"),
16413
+ var pcb_port_not_connected_error = z78.object({
16414
+ type: z78.literal("pcb_port_not_connected_error"),
16284
16415
  pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
16285
16416
  "pcb_port_not_connected_error"
16286
16417
  ),
16287
- error_type: z74.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
16288
- message: z74.string(),
16289
- pcb_port_ids: z74.array(z74.string()),
16290
- pcb_component_ids: z74.array(z74.string()),
16291
- subcircuit_id: z74.string().optional()
16418
+ error_type: z78.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
16419
+ message: z78.string(),
16420
+ pcb_port_ids: z78.array(z78.string()),
16421
+ pcb_component_ids: z78.array(z78.string()),
16422
+ subcircuit_id: z78.string().optional()
16292
16423
  }).describe("Defines an error when a pcb port is not connected to any trace");
16293
16424
  expectTypesMatch(
16294
16425
  true
16295
16426
  );
16296
- var pcb_via = z75.object({
16297
- type: z75.literal("pcb_via"),
16427
+ var pcb_net = z79.object({
16428
+ type: z79.literal("pcb_net"),
16429
+ pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
16430
+ source_net_id: z79.string().optional(),
16431
+ highlight_color: z79.string().optional()
16432
+ }).describe("Defines a net on the PCB");
16433
+ expectTypesMatch(true);
16434
+ var pcb_via = z80.object({
16435
+ type: z80.literal("pcb_via"),
16298
16436
  pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
16299
- pcb_group_id: z75.string().optional(),
16300
- subcircuit_id: z75.string().optional(),
16437
+ pcb_group_id: z80.string().optional(),
16438
+ subcircuit_id: z80.string().optional(),
16301
16439
  x: distance,
16302
16440
  y: distance,
16303
16441
  outer_diameter: distance.default("0.6mm"),
@@ -16306,47 +16444,47 @@ var pcb_via = z75.object({
16306
16444
  from_layer: layer_ref.optional(),
16307
16445
  /** @deprecated */
16308
16446
  to_layer: layer_ref.optional(),
16309
- layers: z75.array(layer_ref),
16310
- pcb_trace_id: z75.string().optional()
16447
+ layers: z80.array(layer_ref),
16448
+ pcb_trace_id: z80.string().optional()
16311
16449
  }).describe("Defines a via on the PCB");
16312
16450
  expectTypesMatch(true);
16313
- var pcb_board = z76.object({
16314
- type: z76.literal("pcb_board"),
16451
+ var pcb_board = z81.object({
16452
+ type: z81.literal("pcb_board"),
16315
16453
  pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
16316
- is_subcircuit: z76.boolean().optional(),
16317
- subcircuit_id: z76.string().optional(),
16454
+ is_subcircuit: z81.boolean().optional(),
16455
+ subcircuit_id: z81.string().optional(),
16318
16456
  width: length,
16319
16457
  height: length,
16320
16458
  center: point,
16321
16459
  thickness: length.optional().default(1.4),
16322
- num_layers: z76.number().optional().default(4),
16323
- outline: z76.array(point).optional(),
16324
- material: z76.enum(["fr4", "fr1"]).default("fr4")
16460
+ num_layers: z81.number().optional().default(4),
16461
+ outline: z81.array(point).optional(),
16462
+ material: z81.enum(["fr4", "fr1"]).default("fr4")
16325
16463
  }).describe("Defines the board outline of the PCB");
16326
16464
  expectTypesMatch(true);
16327
- var pcb_placement_error = z77.object({
16328
- type: z77.literal("pcb_placement_error"),
16465
+ var pcb_placement_error = z82.object({
16466
+ type: z82.literal("pcb_placement_error"),
16329
16467
  pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
16330
- error_type: z77.literal("pcb_placement_error").default("pcb_placement_error"),
16331
- message: z77.string(),
16332
- subcircuit_id: z77.string().optional()
16468
+ error_type: z82.literal("pcb_placement_error").default("pcb_placement_error"),
16469
+ message: z82.string(),
16470
+ subcircuit_id: z82.string().optional()
16333
16471
  }).describe("Defines a placement error on the PCB");
16334
16472
  expectTypesMatch(true);
16335
- var pcb_trace_hint = z78.object({
16336
- type: z78.literal("pcb_trace_hint"),
16473
+ var pcb_trace_hint = z83.object({
16474
+ type: z83.literal("pcb_trace_hint"),
16337
16475
  pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
16338
- pcb_port_id: z78.string(),
16339
- pcb_component_id: z78.string(),
16340
- route: z78.array(route_hint_point),
16341
- subcircuit_id: z78.string().optional()
16476
+ pcb_port_id: z83.string(),
16477
+ pcb_component_id: z83.string(),
16478
+ route: z83.array(route_hint_point),
16479
+ subcircuit_id: z83.string().optional()
16342
16480
  }).describe("A hint that can be used during generation of a PCB trace");
16343
16481
  expectTypesMatch(true);
16344
- var pcb_silkscreen_line = z79.object({
16345
- type: z79.literal("pcb_silkscreen_line"),
16482
+ var pcb_silkscreen_line = z84.object({
16483
+ type: z84.literal("pcb_silkscreen_line"),
16346
16484
  pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
16347
- pcb_component_id: z79.string(),
16348
- pcb_group_id: z79.string().optional(),
16349
- subcircuit_id: z79.string().optional(),
16485
+ pcb_component_id: z84.string(),
16486
+ pcb_group_id: z84.string().optional(),
16487
+ subcircuit_id: z84.string().optional(),
16350
16488
  stroke_width: distance.default("0.1mm"),
16351
16489
  x1: distance,
16352
16490
  y1: distance,
@@ -16355,28 +16493,28 @@ var pcb_silkscreen_line = z79.object({
16355
16493
  layer: visible_layer
16356
16494
  }).describe("Defines a silkscreen line on the PCB");
16357
16495
  expectTypesMatch(true);
16358
- var pcb_silkscreen_path = z80.object({
16359
- type: z80.literal("pcb_silkscreen_path"),
16496
+ var pcb_silkscreen_path = z85.object({
16497
+ type: z85.literal("pcb_silkscreen_path"),
16360
16498
  pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
16361
- pcb_component_id: z80.string(),
16362
- pcb_group_id: z80.string().optional(),
16363
- subcircuit_id: z80.string().optional(),
16499
+ pcb_component_id: z85.string(),
16500
+ pcb_group_id: z85.string().optional(),
16501
+ subcircuit_id: z85.string().optional(),
16364
16502
  layer: visible_layer,
16365
- route: z80.array(point),
16503
+ route: z85.array(point),
16366
16504
  stroke_width: length
16367
16505
  }).describe("Defines a silkscreen path on the PCB");
16368
16506
  expectTypesMatch(true);
16369
- var pcb_silkscreen_text = z81.object({
16370
- type: z81.literal("pcb_silkscreen_text"),
16507
+ var pcb_silkscreen_text = z86.object({
16508
+ type: z86.literal("pcb_silkscreen_text"),
16371
16509
  pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
16372
- pcb_group_id: z81.string().optional(),
16373
- subcircuit_id: z81.string().optional(),
16374
- font: z81.literal("tscircuit2024").default("tscircuit2024"),
16510
+ pcb_group_id: z86.string().optional(),
16511
+ subcircuit_id: z86.string().optional(),
16512
+ font: z86.literal("tscircuit2024").default("tscircuit2024"),
16375
16513
  font_size: distance.default("0.2mm"),
16376
- pcb_component_id: z81.string(),
16377
- text: z81.string(),
16378
- is_knockout: z81.boolean().default(false).optional(),
16379
- knockout_padding: z81.object({
16514
+ pcb_component_id: z86.string(),
16515
+ text: z86.string(),
16516
+ is_knockout: z86.boolean().default(false).optional(),
16517
+ knockout_padding: z86.object({
16380
16518
  left: length,
16381
16519
  top: length,
16382
16520
  bottom: length,
@@ -16387,139 +16525,248 @@ var pcb_silkscreen_text = z81.object({
16387
16525
  bottom: "0.2mm",
16388
16526
  right: "0.2mm"
16389
16527
  }).optional(),
16390
- ccw_rotation: z81.number().optional(),
16528
+ ccw_rotation: z86.number().optional(),
16391
16529
  layer: layer_ref,
16392
- is_mirrored: z81.boolean().default(false).optional(),
16530
+ is_mirrored: z86.boolean().default(false).optional(),
16393
16531
  anchor_position: point.default({ x: 0, y: 0 }),
16394
16532
  anchor_alignment: ninePointAnchor.default("center")
16395
16533
  }).describe("Defines silkscreen text on the PCB");
16396
16534
  expectTypesMatch(true);
16397
- var pcb_silkscreen_rect = z82.object({
16398
- type: z82.literal("pcb_silkscreen_rect"),
16535
+ var pcb_silkscreen_rect = z87.object({
16536
+ type: z87.literal("pcb_silkscreen_rect"),
16399
16537
  pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
16400
- pcb_component_id: z82.string(),
16401
- pcb_group_id: z82.string().optional(),
16402
- subcircuit_id: z82.string().optional(),
16538
+ pcb_component_id: z87.string(),
16539
+ pcb_group_id: z87.string().optional(),
16540
+ subcircuit_id: z87.string().optional(),
16403
16541
  center: point,
16404
16542
  width: length,
16405
16543
  height: length,
16406
16544
  layer: layer_ref,
16407
16545
  stroke_width: length.default("1mm"),
16408
- is_filled: z82.boolean().default(true).optional(),
16409
- has_stroke: z82.boolean().optional(),
16410
- is_stroke_dashed: z82.boolean().optional()
16546
+ is_filled: z87.boolean().default(true).optional(),
16547
+ has_stroke: z87.boolean().optional(),
16548
+ is_stroke_dashed: z87.boolean().optional()
16411
16549
  }).describe("Defines a silkscreen rect on the PCB");
16412
16550
  expectTypesMatch(true);
16413
- var pcb_silkscreen_circle = z83.object({
16414
- type: z83.literal("pcb_silkscreen_circle"),
16551
+ var pcb_silkscreen_circle = z88.object({
16552
+ type: z88.literal("pcb_silkscreen_circle"),
16415
16553
  pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
16416
16554
  "pcb_silkscreen_circle"
16417
16555
  ),
16418
- pcb_component_id: z83.string(),
16419
- pcb_group_id: z83.string().optional(),
16420
- subcircuit_id: z83.string().optional(),
16556
+ pcb_component_id: z88.string(),
16557
+ pcb_group_id: z88.string().optional(),
16558
+ subcircuit_id: z88.string().optional(),
16421
16559
  center: point,
16422
16560
  radius: length,
16423
16561
  layer: visible_layer,
16424
16562
  stroke_width: length.default("1mm")
16425
16563
  }).describe("Defines a silkscreen circle on the PCB");
16426
16564
  expectTypesMatch(true);
16427
- var pcb_silkscreen_oval = z84.object({
16428
- type: z84.literal("pcb_silkscreen_oval"),
16565
+ var pcb_silkscreen_oval = z89.object({
16566
+ type: z89.literal("pcb_silkscreen_oval"),
16429
16567
  pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
16430
- pcb_component_id: z84.string(),
16431
- pcb_group_id: z84.string().optional(),
16432
- subcircuit_id: z84.string().optional(),
16568
+ pcb_component_id: z89.string(),
16569
+ pcb_group_id: z89.string().optional(),
16570
+ subcircuit_id: z89.string().optional(),
16433
16571
  center: point,
16434
16572
  radius_x: distance,
16435
16573
  radius_y: distance,
16436
16574
  layer: visible_layer
16437
16575
  }).describe("Defines a silkscreen oval on the PCB");
16438
16576
  expectTypesMatch(true);
16439
- var pcb_fabrication_note_text = z85.object({
16440
- type: z85.literal("pcb_fabrication_note_text"),
16577
+ var pcb_fabrication_note_text = z90.object({
16578
+ type: z90.literal("pcb_fabrication_note_text"),
16441
16579
  pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
16442
16580
  "pcb_fabrication_note_text"
16443
16581
  ),
16444
- subcircuit_id: z85.string().optional(),
16445
- pcb_group_id: z85.string().optional(),
16446
- font: z85.literal("tscircuit2024").default("tscircuit2024"),
16582
+ subcircuit_id: z90.string().optional(),
16583
+ pcb_group_id: z90.string().optional(),
16584
+ font: z90.literal("tscircuit2024").default("tscircuit2024"),
16447
16585
  font_size: distance.default("1mm"),
16448
- pcb_component_id: z85.string(),
16449
- text: z85.string(),
16586
+ pcb_component_id: z90.string(),
16587
+ text: z90.string(),
16450
16588
  layer: visible_layer,
16451
16589
  anchor_position: point.default({ x: 0, y: 0 }),
16452
- anchor_alignment: z85.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
16453
- color: z85.string().optional()
16590
+ anchor_alignment: z90.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
16591
+ color: z90.string().optional()
16454
16592
  }).describe(
16455
16593
  "Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
16456
16594
  );
16457
16595
  expectTypesMatch(true);
16458
- var pcb_fabrication_note_path = z86.object({
16459
- type: z86.literal("pcb_fabrication_note_path"),
16596
+ var pcb_fabrication_note_path = z91.object({
16597
+ type: z91.literal("pcb_fabrication_note_path"),
16460
16598
  pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
16461
16599
  "pcb_fabrication_note_path"
16462
16600
  ),
16463
- pcb_component_id: z86.string(),
16464
- subcircuit_id: z86.string().optional(),
16601
+ pcb_component_id: z91.string(),
16602
+ subcircuit_id: z91.string().optional(),
16465
16603
  layer: layer_ref,
16466
- route: z86.array(point),
16604
+ route: z91.array(point),
16467
16605
  stroke_width: length,
16468
- color: z86.string().optional()
16606
+ color: z91.string().optional()
16469
16607
  }).describe(
16470
16608
  "Defines a fabrication path on the PCB for fabricators or assemblers"
16471
16609
  );
16472
16610
  expectTypesMatch(true);
16473
- var pcb_footprint_overlap_error = z87.object({
16474
- type: z87.literal("pcb_footprint_overlap_error"),
16611
+ var pcb_fabrication_note_rect = z92.object({
16612
+ type: z92.literal("pcb_fabrication_note_rect"),
16613
+ pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
16614
+ "pcb_fabrication_note_rect"
16615
+ ),
16616
+ pcb_component_id: z92.string(),
16617
+ pcb_group_id: z92.string().optional(),
16618
+ subcircuit_id: z92.string().optional(),
16619
+ center: point,
16620
+ width: length,
16621
+ height: length,
16622
+ layer: visible_layer,
16623
+ stroke_width: length.default("0.1mm"),
16624
+ is_filled: z92.boolean().optional(),
16625
+ has_stroke: z92.boolean().optional(),
16626
+ is_stroke_dashed: z92.boolean().optional(),
16627
+ color: z92.string().optional()
16628
+ }).describe("Defines a fabrication note rectangle on the PCB");
16629
+ expectTypesMatch(true);
16630
+ var pcb_fabrication_note_dimension = z93.object({
16631
+ type: z93.literal("pcb_fabrication_note_dimension"),
16632
+ pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
16633
+ "pcb_fabrication_note_dimension"
16634
+ ),
16635
+ pcb_component_id: z93.string(),
16636
+ pcb_group_id: z93.string().optional(),
16637
+ subcircuit_id: z93.string().optional(),
16638
+ layer: visible_layer,
16639
+ from: point.or(z93.string()),
16640
+ to: point.or(z93.string()),
16641
+ text: z93.string().optional(),
16642
+ offset: length.optional(),
16643
+ font: z93.literal("tscircuit2024").default("tscircuit2024"),
16644
+ font_size: length.default("1mm"),
16645
+ color: z93.string().optional(),
16646
+ arrow_size: length.default("1mm")
16647
+ }).describe("Defines a measurement annotation within PCB fabrication notes");
16648
+ expectTypesMatch(true);
16649
+ var pcb_note_text = z94.object({
16650
+ type: z94.literal("pcb_note_text"),
16651
+ pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
16652
+ pcb_component_id: z94.string().optional(),
16653
+ pcb_group_id: z94.string().optional(),
16654
+ subcircuit_id: z94.string().optional(),
16655
+ font: z94.literal("tscircuit2024").default("tscircuit2024"),
16656
+ font_size: distance.default("1mm"),
16657
+ text: z94.string(),
16658
+ anchor_position: point.default({ x: 0, y: 0 }),
16659
+ anchor_alignment: z94.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
16660
+ color: z94.string().optional()
16661
+ }).describe("Defines a documentation note in text on the PCB");
16662
+ expectTypesMatch(true);
16663
+ var pcb_note_rect = z95.object({
16664
+ type: z95.literal("pcb_note_rect"),
16665
+ pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
16666
+ pcb_component_id: z95.string().optional(),
16667
+ pcb_group_id: z95.string().optional(),
16668
+ subcircuit_id: z95.string().optional(),
16669
+ center: point,
16670
+ width: length,
16671
+ height: length,
16672
+ stroke_width: length.default("0.1mm"),
16673
+ is_filled: z95.boolean().optional(),
16674
+ has_stroke: z95.boolean().optional(),
16675
+ is_stroke_dashed: z95.boolean().optional(),
16676
+ color: z95.string().optional()
16677
+ }).describe("Defines a rectangular documentation note on the PCB");
16678
+ expectTypesMatch(true);
16679
+ var pcb_note_path = z96.object({
16680
+ type: z96.literal("pcb_note_path"),
16681
+ pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
16682
+ pcb_component_id: z96.string().optional(),
16683
+ pcb_group_id: z96.string().optional(),
16684
+ subcircuit_id: z96.string().optional(),
16685
+ route: z96.array(point),
16686
+ stroke_width: length.default("0.1mm"),
16687
+ color: z96.string().optional()
16688
+ }).describe("Defines a polyline documentation note on the PCB");
16689
+ expectTypesMatch(true);
16690
+ var pcb_note_line = z97.object({
16691
+ type: z97.literal("pcb_note_line"),
16692
+ pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
16693
+ pcb_component_id: z97.string().optional(),
16694
+ pcb_group_id: z97.string().optional(),
16695
+ subcircuit_id: z97.string().optional(),
16696
+ x1: distance,
16697
+ y1: distance,
16698
+ x2: distance,
16699
+ y2: distance,
16700
+ stroke_width: distance.default("0.1mm"),
16701
+ color: z97.string().optional(),
16702
+ is_dashed: z97.boolean().optional()
16703
+ }).describe("Defines a straight documentation note line on the PCB");
16704
+ expectTypesMatch(true);
16705
+ var pcb_note_dimension = z98.object({
16706
+ type: z98.literal("pcb_note_dimension"),
16707
+ pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
16708
+ pcb_component_id: z98.string().optional(),
16709
+ pcb_group_id: z98.string().optional(),
16710
+ subcircuit_id: z98.string().optional(),
16711
+ from: point,
16712
+ to: point,
16713
+ text: z98.string().optional(),
16714
+ font: z98.literal("tscircuit2024").default("tscircuit2024"),
16715
+ font_size: length.default("1mm"),
16716
+ color: z98.string().optional(),
16717
+ arrow_size: length.default("1mm")
16718
+ }).describe("Defines a measurement annotation within PCB documentation notes");
16719
+ expectTypesMatch(true);
16720
+ var pcb_footprint_overlap_error = z99.object({
16721
+ type: z99.literal("pcb_footprint_overlap_error"),
16475
16722
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
16476
- error_type: z87.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
16477
- message: z87.string(),
16478
- pcb_smtpad_ids: z87.array(z87.string()).optional(),
16479
- pcb_plated_hole_ids: z87.array(z87.string()).optional(),
16480
- pcb_hole_ids: z87.array(z87.string()).optional(),
16481
- pcb_keepout_ids: z87.array(z87.string()).optional()
16723
+ error_type: z99.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
16724
+ message: z99.string(),
16725
+ pcb_smtpad_ids: z99.array(z99.string()).optional(),
16726
+ pcb_plated_hole_ids: z99.array(z99.string()).optional(),
16727
+ pcb_hole_ids: z99.array(z99.string()).optional(),
16728
+ pcb_keepout_ids: z99.array(z99.string()).optional()
16482
16729
  }).describe("Error emitted when a pcb footprint overlaps with another element");
16483
16730
  expectTypesMatch(
16484
16731
  true
16485
16732
  );
16486
- var pcb_keepout = z88.object({
16487
- type: z88.literal("pcb_keepout"),
16488
- shape: z88.literal("rect"),
16489
- pcb_group_id: z88.string().optional(),
16490
- subcircuit_id: z88.string().optional(),
16733
+ var pcb_keepout = z100.object({
16734
+ type: z100.literal("pcb_keepout"),
16735
+ shape: z100.literal("rect"),
16736
+ pcb_group_id: z100.string().optional(),
16737
+ subcircuit_id: z100.string().optional(),
16491
16738
  center: point,
16492
16739
  width: distance,
16493
16740
  height: distance,
16494
- pcb_keepout_id: z88.string(),
16495
- layers: z88.array(z88.string()),
16741
+ pcb_keepout_id: z100.string(),
16742
+ layers: z100.array(z100.string()),
16496
16743
  // Specify layers where the keepout applies
16497
- description: z88.string().optional()
16744
+ description: z100.string().optional()
16498
16745
  // Optional description of the keepout
16499
16746
  }).or(
16500
- z88.object({
16501
- type: z88.literal("pcb_keepout"),
16502
- shape: z88.literal("circle"),
16503
- pcb_group_id: z88.string().optional(),
16504
- subcircuit_id: z88.string().optional(),
16747
+ z100.object({
16748
+ type: z100.literal("pcb_keepout"),
16749
+ shape: z100.literal("circle"),
16750
+ pcb_group_id: z100.string().optional(),
16751
+ subcircuit_id: z100.string().optional(),
16505
16752
  center: point,
16506
16753
  radius: distance,
16507
- pcb_keepout_id: z88.string(),
16508
- layers: z88.array(z88.string()),
16754
+ pcb_keepout_id: z100.string(),
16755
+ layers: z100.array(z100.string()),
16509
16756
  // Specify layers where the keepout applies
16510
- description: z88.string().optional()
16757
+ description: z100.string().optional()
16511
16758
  // Optional description of the keepout
16512
16759
  })
16513
16760
  );
16514
16761
  expectTypesMatch(true);
16515
- var pcb_cutout_base = z89.object({
16516
- type: z89.literal("pcb_cutout"),
16762
+ var pcb_cutout_base = z101.object({
16763
+ type: z101.literal("pcb_cutout"),
16517
16764
  pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
16518
- pcb_group_id: z89.string().optional(),
16519
- subcircuit_id: z89.string().optional()
16765
+ pcb_group_id: z101.string().optional(),
16766
+ subcircuit_id: z101.string().optional()
16520
16767
  });
16521
16768
  var pcb_cutout_rect = pcb_cutout_base.extend({
16522
- shape: z89.literal("rect"),
16769
+ shape: z101.literal("rect"),
16523
16770
  center: point,
16524
16771
  width: length,
16525
16772
  height: length,
@@ -16527,150 +16774,164 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
16527
16774
  });
16528
16775
  expectTypesMatch(true);
16529
16776
  var pcb_cutout_circle = pcb_cutout_base.extend({
16530
- shape: z89.literal("circle"),
16777
+ shape: z101.literal("circle"),
16531
16778
  center: point,
16532
16779
  radius: length
16533
16780
  });
16534
16781
  expectTypesMatch(true);
16535
16782
  var pcb_cutout_polygon = pcb_cutout_base.extend({
16536
- shape: z89.literal("polygon"),
16537
- points: z89.array(point)
16783
+ shape: z101.literal("polygon"),
16784
+ points: z101.array(point)
16538
16785
  });
16539
16786
  expectTypesMatch(true);
16540
- var pcb_cutout = z89.discriminatedUnion("shape", [
16787
+ var pcb_cutout = z101.discriminatedUnion("shape", [
16541
16788
  pcb_cutout_rect,
16542
16789
  pcb_cutout_circle,
16543
16790
  pcb_cutout_polygon
16544
16791
  ]).describe("Defines a cutout on the PCB, removing board material.");
16545
16792
  expectTypesMatch(true);
16546
- var pcb_missing_footprint_error = z90.object({
16547
- type: z90.literal("pcb_missing_footprint_error"),
16793
+ var pcb_missing_footprint_error = z102.object({
16794
+ type: z102.literal("pcb_missing_footprint_error"),
16548
16795
  pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
16549
16796
  "pcb_missing_footprint_error"
16550
16797
  ),
16551
- pcb_group_id: z90.string().optional(),
16552
- subcircuit_id: z90.string().optional(),
16553
- error_type: z90.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
16554
- source_component_id: z90.string(),
16555
- message: z90.string()
16798
+ pcb_group_id: z102.string().optional(),
16799
+ subcircuit_id: z102.string().optional(),
16800
+ error_type: z102.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
16801
+ source_component_id: z102.string(),
16802
+ message: z102.string()
16556
16803
  }).describe("Defines a missing footprint error on the PCB");
16557
16804
  expectTypesMatch(
16558
16805
  true
16559
16806
  );
16560
- var external_footprint_load_error = z91.object({
16561
- type: z91.literal("external_footprint_load_error"),
16807
+ var external_footprint_load_error = z103.object({
16808
+ type: z103.literal("external_footprint_load_error"),
16562
16809
  external_footprint_load_error_id: getZodPrefixedIdWithDefault(
16563
16810
  "external_footprint_load_error"
16564
16811
  ),
16565
- pcb_component_id: z91.string(),
16566
- source_component_id: z91.string(),
16567
- pcb_group_id: z91.string().optional(),
16568
- subcircuit_id: z91.string().optional(),
16569
- footprinter_string: z91.string().optional(),
16570
- error_type: z91.literal("external_footprint_load_error").default("external_footprint_load_error"),
16571
- message: z91.string()
16812
+ pcb_component_id: z103.string(),
16813
+ source_component_id: z103.string(),
16814
+ pcb_group_id: z103.string().optional(),
16815
+ subcircuit_id: z103.string().optional(),
16816
+ footprinter_string: z103.string().optional(),
16817
+ error_type: z103.literal("external_footprint_load_error").default("external_footprint_load_error"),
16818
+ message: z103.string()
16572
16819
  }).describe("Defines an error when an external footprint fails to load");
16573
16820
  expectTypesMatch(true);
16574
- var pcb_group = z92.object({
16575
- type: z92.literal("pcb_group"),
16821
+ var circuit_json_footprint_load_error = z104.object({
16822
+ type: z104.literal("circuit_json_footprint_load_error"),
16823
+ circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
16824
+ "circuit_json_footprint_load_error"
16825
+ ),
16826
+ pcb_component_id: z104.string(),
16827
+ source_component_id: z104.string(),
16828
+ pcb_group_id: z104.string().optional(),
16829
+ subcircuit_id: z104.string().optional(),
16830
+ error_type: z104.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
16831
+ message: z104.string(),
16832
+ circuit_json: z104.array(z104.any()).optional()
16833
+ }).describe("Defines an error when a circuit JSON footprint fails to load");
16834
+ expectTypesMatch(true);
16835
+ var pcb_group = z105.object({
16836
+ type: z105.literal("pcb_group"),
16576
16837
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
16577
- source_group_id: z92.string(),
16578
- is_subcircuit: z92.boolean().optional(),
16579
- subcircuit_id: z92.string().optional(),
16838
+ source_group_id: z105.string(),
16839
+ is_subcircuit: z105.boolean().optional(),
16840
+ subcircuit_id: z105.string().optional(),
16580
16841
  width: length,
16581
16842
  height: length,
16582
16843
  center: point,
16583
- pcb_component_ids: z92.array(z92.string()),
16584
- name: z92.string().optional(),
16585
- description: z92.string().optional(),
16586
- layout_mode: z92.string().optional(),
16587
- autorouter_configuration: z92.object({
16844
+ pcb_component_ids: z105.array(z105.string()),
16845
+ name: z105.string().optional(),
16846
+ description: z105.string().optional(),
16847
+ layout_mode: z105.string().optional(),
16848
+ autorouter_configuration: z105.object({
16588
16849
  trace_clearance: length
16589
16850
  }).optional(),
16590
- autorouter_used_string: z92.string().optional()
16851
+ autorouter_used_string: z105.string().optional()
16591
16852
  }).describe("Defines a group of components on the PCB");
16592
16853
  expectTypesMatch(true);
16593
- var pcb_autorouting_error = z93.object({
16594
- type: z93.literal("pcb_autorouting_error"),
16854
+ var pcb_autorouting_error = z106.object({
16855
+ type: z106.literal("pcb_autorouting_error"),
16595
16856
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
16596
- error_type: z93.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
16597
- message: z93.string(),
16598
- subcircuit_id: z93.string().optional()
16857
+ error_type: z106.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
16858
+ message: z106.string(),
16859
+ subcircuit_id: z106.string().optional()
16599
16860
  }).describe("The autorouting has failed to route a portion of the board");
16600
16861
  expectTypesMatch(true);
16601
- var pcb_manual_edit_conflict_warning = z94.object({
16602
- type: z94.literal("pcb_manual_edit_conflict_warning"),
16862
+ var pcb_manual_edit_conflict_warning = z107.object({
16863
+ type: z107.literal("pcb_manual_edit_conflict_warning"),
16603
16864
  pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
16604
16865
  "pcb_manual_edit_conflict_warning"
16605
16866
  ),
16606
- warning_type: z94.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
16607
- message: z94.string(),
16608
- pcb_component_id: z94.string(),
16609
- pcb_group_id: z94.string().optional(),
16610
- subcircuit_id: z94.string().optional(),
16611
- source_component_id: z94.string()
16867
+ warning_type: z107.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
16868
+ message: z107.string(),
16869
+ pcb_component_id: z107.string(),
16870
+ pcb_group_id: z107.string().optional(),
16871
+ subcircuit_id: z107.string().optional(),
16872
+ source_component_id: z107.string()
16612
16873
  }).describe(
16613
16874
  "Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
16614
16875
  );
16615
16876
  expectTypesMatch(true);
16616
- var pcb_breakout_point = z95.object({
16617
- type: z95.literal("pcb_breakout_point"),
16877
+ var pcb_breakout_point = z108.object({
16878
+ type: z108.literal("pcb_breakout_point"),
16618
16879
  pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
16619
- pcb_group_id: z95.string(),
16620
- subcircuit_id: z95.string().optional(),
16621
- source_trace_id: z95.string().optional(),
16622
- source_port_id: z95.string().optional(),
16623
- source_net_id: z95.string().optional(),
16880
+ pcb_group_id: z108.string(),
16881
+ subcircuit_id: z108.string().optional(),
16882
+ source_trace_id: z108.string().optional(),
16883
+ source_port_id: z108.string().optional(),
16884
+ source_net_id: z108.string().optional(),
16624
16885
  x: distance,
16625
16886
  y: distance
16626
16887
  }).describe(
16627
16888
  "Defines a routing target within a pcb_group for a source_trace or source_net"
16628
16889
  );
16629
16890
  expectTypesMatch(true);
16630
- var pcb_ground_plane = z96.object({
16631
- type: z96.literal("pcb_ground_plane"),
16891
+ var pcb_ground_plane = z109.object({
16892
+ type: z109.literal("pcb_ground_plane"),
16632
16893
  pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
16633
- source_pcb_ground_plane_id: z96.string(),
16634
- source_net_id: z96.string(),
16635
- pcb_group_id: z96.string().optional(),
16636
- subcircuit_id: z96.string().optional()
16894
+ source_pcb_ground_plane_id: z109.string(),
16895
+ source_net_id: z109.string(),
16896
+ pcb_group_id: z109.string().optional(),
16897
+ subcircuit_id: z109.string().optional()
16637
16898
  }).describe("Defines a ground plane on the PCB");
16638
16899
  expectTypesMatch(true);
16639
- var pcb_ground_plane_region = z97.object({
16640
- type: z97.literal("pcb_ground_plane_region"),
16900
+ var pcb_ground_plane_region = z110.object({
16901
+ type: z110.literal("pcb_ground_plane_region"),
16641
16902
  pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
16642
16903
  "pcb_ground_plane_region"
16643
16904
  ),
16644
- pcb_ground_plane_id: z97.string(),
16645
- pcb_group_id: z97.string().optional(),
16646
- subcircuit_id: z97.string().optional(),
16905
+ pcb_ground_plane_id: z110.string(),
16906
+ pcb_group_id: z110.string().optional(),
16907
+ subcircuit_id: z110.string().optional(),
16647
16908
  layer: layer_ref,
16648
- points: z97.array(point)
16909
+ points: z110.array(point)
16649
16910
  }).describe("Defines a polygon region of a ground plane");
16650
16911
  expectTypesMatch(true);
16651
- var pcb_thermal_spoke = z98.object({
16652
- type: z98.literal("pcb_thermal_spoke"),
16912
+ var pcb_thermal_spoke = z111.object({
16913
+ type: z111.literal("pcb_thermal_spoke"),
16653
16914
  pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
16654
- pcb_ground_plane_id: z98.string(),
16655
- shape: z98.string(),
16656
- spoke_count: z98.number(),
16915
+ pcb_ground_plane_id: z111.string(),
16916
+ shape: z111.string(),
16917
+ spoke_count: z111.number(),
16657
16918
  spoke_thickness: distance,
16658
16919
  spoke_inner_diameter: distance,
16659
16920
  spoke_outer_diameter: distance,
16660
- pcb_plated_hole_id: z98.string().optional(),
16661
- subcircuit_id: z98.string().optional()
16921
+ pcb_plated_hole_id: z111.string().optional(),
16922
+ subcircuit_id: z111.string().optional()
16662
16923
  }).describe("Pattern for connecting a ground plane to a plated hole");
16663
16924
  expectTypesMatch(true);
16664
- var pcb_copper_pour_base = z99.object({
16665
- type: z99.literal("pcb_copper_pour"),
16925
+ var pcb_copper_pour_base = z112.object({
16926
+ type: z112.literal("pcb_copper_pour"),
16666
16927
  pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
16667
- pcb_group_id: z99.string().optional(),
16668
- subcircuit_id: z99.string().optional(),
16928
+ pcb_group_id: z112.string().optional(),
16929
+ subcircuit_id: z112.string().optional(),
16669
16930
  layer: layer_ref,
16670
- source_net_id: z99.string().optional()
16931
+ source_net_id: z112.string().optional()
16671
16932
  });
16672
16933
  var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
16673
- shape: z99.literal("rect"),
16934
+ shape: z112.literal("rect"),
16674
16935
  center: point,
16675
16936
  width: length,
16676
16937
  height: length,
@@ -16678,68 +16939,116 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
16678
16939
  });
16679
16940
  expectTypesMatch(true);
16680
16941
  var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
16681
- shape: z99.literal("brep"),
16942
+ shape: z112.literal("brep"),
16682
16943
  brep_shape
16683
16944
  });
16684
16945
  expectTypesMatch(true);
16685
16946
  var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
16686
- shape: z99.literal("polygon"),
16687
- points: z99.array(point)
16947
+ shape: z112.literal("polygon"),
16948
+ points: z112.array(point)
16688
16949
  });
16689
16950
  expectTypesMatch(true);
16690
- var pcb_copper_pour = z99.discriminatedUnion("shape", [
16951
+ var pcb_copper_pour = z112.discriminatedUnion("shape", [
16691
16952
  pcb_copper_pour_rect,
16692
16953
  pcb_copper_pour_brep,
16693
16954
  pcb_copper_pour_polygon
16694
16955
  ]).describe("Defines a copper pour on the PCB.");
16695
16956
  expectTypesMatch(true);
16696
- var pcb_component_outside_board_error = z100.object({
16697
- type: z100.literal("pcb_component_outside_board_error"),
16957
+ var pcb_component_outside_board_error = z113.object({
16958
+ type: z113.literal("pcb_component_outside_board_error"),
16698
16959
  pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
16699
16960
  "pcb_component_outside_board_error"
16700
16961
  ),
16701
- error_type: z100.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
16702
- message: z100.string(),
16703
- pcb_component_id: z100.string(),
16704
- pcb_board_id: z100.string(),
16962
+ error_type: z113.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
16963
+ message: z113.string(),
16964
+ pcb_component_id: z113.string(),
16965
+ pcb_board_id: z113.string(),
16705
16966
  component_center: point,
16706
- component_bounds: z100.object({
16707
- min_x: z100.number(),
16708
- max_x: z100.number(),
16709
- min_y: z100.number(),
16710
- max_y: z100.number()
16967
+ component_bounds: z113.object({
16968
+ min_x: z113.number(),
16969
+ max_x: z113.number(),
16970
+ min_y: z113.number(),
16971
+ max_y: z113.number()
16711
16972
  }),
16712
- subcircuit_id: z100.string().optional(),
16713
- source_component_id: z100.string().optional()
16973
+ subcircuit_id: z113.string().optional(),
16974
+ source_component_id: z113.string().optional()
16714
16975
  }).describe(
16715
16976
  "Error emitted when a PCB component is placed outside the board boundaries"
16716
16977
  );
16717
16978
  expectTypesMatch(true);
16718
- var cad_component = z101.object({
16719
- type: z101.literal("cad_component"),
16720
- cad_component_id: z101.string(),
16721
- pcb_component_id: z101.string(),
16722
- source_component_id: z101.string(),
16979
+ var pcb_via_clearance_error = z114.object({
16980
+ type: z114.literal("pcb_via_clearance_error"),
16981
+ pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
16982
+ error_type: z114.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
16983
+ message: z114.string(),
16984
+ pcb_via_ids: z114.array(z114.string()).min(2),
16985
+ minimum_clearance: distance.optional(),
16986
+ actual_clearance: distance.optional(),
16987
+ pcb_center: z114.object({
16988
+ x: z114.number().optional(),
16989
+ y: z114.number().optional()
16990
+ }).optional(),
16991
+ subcircuit_id: z114.string().optional()
16992
+ }).describe("Error emitted when vias are closer than the allowed clearance");
16993
+ expectTypesMatch(true);
16994
+ var pcb_courtyard_rect = z115.object({
16995
+ type: z115.literal("pcb_courtyard_rect"),
16996
+ pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
16997
+ pcb_component_id: z115.string(),
16998
+ pcb_group_id: z115.string().optional(),
16999
+ subcircuit_id: z115.string().optional(),
17000
+ center: point,
17001
+ width: length,
17002
+ height: length,
17003
+ layer: visible_layer,
17004
+ stroke_width: length.default("0.1mm"),
17005
+ is_filled: z115.boolean().optional(),
17006
+ has_stroke: z115.boolean().optional(),
17007
+ is_stroke_dashed: z115.boolean().optional(),
17008
+ color: z115.string().optional()
17009
+ }).describe("Defines a courtyard rectangle on the PCB");
17010
+ expectTypesMatch(true);
17011
+ var pcb_courtyard_outline = z116.object({
17012
+ type: z116.literal("pcb_courtyard_outline"),
17013
+ pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
17014
+ "pcb_courtyard_outline"
17015
+ ),
17016
+ pcb_component_id: z116.string(),
17017
+ pcb_group_id: z116.string().optional(),
17018
+ subcircuit_id: z116.string().optional(),
17019
+ layer: visible_layer,
17020
+ outline: z116.array(point).min(2),
17021
+ stroke_width: length.default("0.1mm"),
17022
+ is_closed: z116.boolean().optional(),
17023
+ is_stroke_dashed: z116.boolean().optional(),
17024
+ color: z116.string().optional()
17025
+ }).describe("Defines a courtyard outline on the PCB");
17026
+ expectTypesMatch(true);
17027
+ var cad_component = z117.object({
17028
+ type: z117.literal("cad_component"),
17029
+ cad_component_id: z117.string(),
17030
+ pcb_component_id: z117.string(),
17031
+ source_component_id: z117.string(),
16723
17032
  position: point3,
16724
17033
  rotation: point3.optional(),
16725
17034
  size: point3.optional(),
16726
17035
  layer: layer_ref.optional(),
16727
- subcircuit_id: z101.string().optional(),
17036
+ subcircuit_id: z117.string().optional(),
16728
17037
  // These are all ways to generate/load the 3d model
16729
- footprinter_string: z101.string().optional(),
16730
- model_obj_url: z101.string().optional(),
16731
- model_stl_url: z101.string().optional(),
16732
- model_3mf_url: z101.string().optional(),
16733
- model_gltf_url: z101.string().optional(),
16734
- model_glb_url: z101.string().optional(),
16735
- model_step_url: z101.string().optional(),
16736
- model_wrl_url: z101.string().optional(),
16737
- model_unit_to_mm_scale_factor: z101.number().optional(),
16738
- model_jscad: z101.any().optional()
17038
+ footprinter_string: z117.string().optional(),
17039
+ model_obj_url: z117.string().optional(),
17040
+ model_stl_url: z117.string().optional(),
17041
+ model_3mf_url: z117.string().optional(),
17042
+ model_gltf_url: z117.string().optional(),
17043
+ model_glb_url: z117.string().optional(),
17044
+ model_step_url: z117.string().optional(),
17045
+ model_wrl_url: z117.string().optional(),
17046
+ model_unit_to_mm_scale_factor: z117.number().optional(),
17047
+ model_jscad: z117.any().optional()
16739
17048
  }).describe("Defines a component on the PCB");
16740
17049
  expectTypesMatch(true);
16741
- var wave_shape = z102.enum(["sinewave", "square", "triangle", "sawtooth"]);
16742
- var percentage = z102.union([z102.string(), z102.number()]).transform((val) => {
17050
+ var wave_shape = z118.enum(["sinewave", "square", "triangle", "sawtooth"]);
17051
+ var percentage = z118.union([z118.string(), z118.number()]).transform((val) => {
16743
17052
  if (typeof val === "string") {
16744
17053
  if (val.endsWith("%")) {
16745
17054
  return parseFloat(val.slice(0, -1)) / 100;
@@ -16748,30 +17057,30 @@ var percentage = z102.union([z102.string(), z102.number()]).transform((val) => {
16748
17057
  }
16749
17058
  return val;
16750
17059
  }).pipe(
16751
- z102.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
17060
+ z118.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
16752
17061
  );
16753
- var simulation_dc_voltage_source = z102.object({
16754
- type: z102.literal("simulation_voltage_source"),
17062
+ var simulation_dc_voltage_source = z118.object({
17063
+ type: z118.literal("simulation_voltage_source"),
16755
17064
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
16756
17065
  "simulation_voltage_source"
16757
17066
  ),
16758
- is_dc_source: z102.literal(true).optional().default(true),
16759
- positive_source_port_id: z102.string().optional(),
16760
- negative_source_port_id: z102.string().optional(),
16761
- positive_source_net_id: z102.string().optional(),
16762
- negative_source_net_id: z102.string().optional(),
17067
+ is_dc_source: z118.literal(true).optional().default(true),
17068
+ positive_source_port_id: z118.string().optional(),
17069
+ negative_source_port_id: z118.string().optional(),
17070
+ positive_source_net_id: z118.string().optional(),
17071
+ negative_source_net_id: z118.string().optional(),
16763
17072
  voltage
16764
17073
  }).describe("Defines a DC voltage source for simulation");
16765
- var simulation_ac_voltage_source = z102.object({
16766
- type: z102.literal("simulation_voltage_source"),
17074
+ var simulation_ac_voltage_source = z118.object({
17075
+ type: z118.literal("simulation_voltage_source"),
16767
17076
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
16768
17077
  "simulation_voltage_source"
16769
17078
  ),
16770
- is_dc_source: z102.literal(false),
16771
- terminal1_source_port_id: z102.string().optional(),
16772
- terminal2_source_port_id: z102.string().optional(),
16773
- terminal1_source_net_id: z102.string().optional(),
16774
- terminal2_source_net_id: z102.string().optional(),
17079
+ is_dc_source: z118.literal(false),
17080
+ terminal1_source_port_id: z118.string().optional(),
17081
+ terminal2_source_port_id: z118.string().optional(),
17082
+ terminal1_source_net_id: z118.string().optional(),
17083
+ terminal2_source_net_id: z118.string().optional(),
16775
17084
  voltage: voltage.optional(),
16776
17085
  frequency: frequency.optional(),
16777
17086
  peak_to_peak_voltage: voltage.optional(),
@@ -16779,11 +17088,72 @@ var simulation_ac_voltage_source = z102.object({
16779
17088
  phase: rotation.optional(),
16780
17089
  duty_cycle: percentage.optional()
16781
17090
  }).describe("Defines an AC voltage source for simulation");
16782
- var simulation_voltage_source = z102.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
17091
+ var simulation_voltage_source = z118.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
17092
+ expectTypesMatch(true);
17093
+ expectTypesMatch(true);
16783
17094
  expectTypesMatch(true);
17095
+ var experiment_type = z119.union([
17096
+ z119.literal("spice_dc_sweep"),
17097
+ z119.literal("spice_dc_operating_point"),
17098
+ z119.literal("spice_transient_analysis"),
17099
+ z119.literal("spice_ac_analysis")
17100
+ ]);
17101
+ var simulation_experiment = z119.object({
17102
+ type: z119.literal("simulation_experiment"),
17103
+ simulation_experiment_id: getZodPrefixedIdWithDefault(
17104
+ "simulation_experiment"
17105
+ ),
17106
+ name: z119.string(),
17107
+ experiment_type,
17108
+ time_per_step: duration_ms.optional(),
17109
+ start_time_ms: ms.optional(),
17110
+ end_time_ms: ms.optional()
17111
+ }).describe("Defines a simulation experiment configuration");
17112
+ expectTypesMatch(true);
17113
+ var simulation_transient_voltage_graph = z120.object({
17114
+ type: z120.literal("simulation_transient_voltage_graph"),
17115
+ simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
17116
+ "simulation_transient_voltage_graph"
17117
+ ),
17118
+ simulation_experiment_id: z120.string(),
17119
+ timestamps_ms: z120.array(z120.number()).optional(),
17120
+ voltage_levels: z120.array(z120.number()),
17121
+ schematic_voltage_probe_id: z120.string().optional(),
17122
+ subcircuit_connectivity_map_key: z120.string().optional(),
17123
+ time_per_step: duration_ms,
17124
+ start_time_ms: ms,
17125
+ end_time_ms: ms,
17126
+ name: z120.string().optional()
17127
+ }).describe("Stores voltage measurements over time for a simulation");
16784
17128
  expectTypesMatch(true);
17129
+ var simulation_switch = z121.object({
17130
+ type: z121.literal("simulation_switch"),
17131
+ simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
17132
+ closes_at: ms.optional(),
17133
+ opens_at: ms.optional(),
17134
+ starts_closed: z121.boolean().optional(),
17135
+ switching_frequency: frequency.optional()
17136
+ }).describe("Defines a switch for simulation timing control");
16785
17137
  expectTypesMatch(true);
16786
- var any_circuit_element = z103.union([
17138
+ var simulation_voltage_probe = z122.object({
17139
+ type: z122.literal("simulation_voltage_probe"),
17140
+ simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
17141
+ "simulation_voltage_probe"
17142
+ ),
17143
+ source_port_id: z122.string().optional(),
17144
+ source_net_id: z122.string().optional(),
17145
+ name: z122.string().optional(),
17146
+ subcircuit_id: z122.string().optional()
17147
+ }).describe(
17148
+ "Defines a voltage probe for simulation, connected to a port or a net"
17149
+ ).refine(
17150
+ (data) => Boolean(data.source_port_id) !== Boolean(data.source_net_id),
17151
+ {
17152
+ message: "Exactly one of source_port_id or source_net_id must be provided to simulation_voltage_probe"
17153
+ }
17154
+ );
17155
+ expectTypesMatch(true);
17156
+ var any_circuit_element = z123.union([
16787
17157
  source_trace,
16788
17158
  source_port,
16789
17159
  any_source_component,
@@ -16808,6 +17178,7 @@ var any_circuit_element = z103.union([
16808
17178
  source_simple_push_button,
16809
17179
  source_pcb_ground_plane,
16810
17180
  source_manually_placed_via,
17181
+ source_board,
16811
17182
  source_project_metadata,
16812
17183
  source_trace_not_connected_error,
16813
17184
  source_pin_missing_trace_warning,
@@ -16815,10 +17186,12 @@ var any_circuit_element = z103.union([
16815
17186
  pcb_hole,
16816
17187
  pcb_missing_footprint_error,
16817
17188
  external_footprint_load_error,
17189
+ circuit_json_footprint_load_error,
16818
17190
  pcb_manual_edit_conflict_warning,
16819
17191
  pcb_plated_hole,
16820
17192
  pcb_keepout,
16821
17193
  pcb_port,
17194
+ pcb_net,
16822
17195
  pcb_text,
16823
17196
  pcb_trace,
16824
17197
  pcb_via,
@@ -16838,8 +17211,16 @@ var any_circuit_element = z103.union([
16838
17211
  pcb_placement_error,
16839
17212
  pcb_port_not_matched_error,
16840
17213
  pcb_port_not_connected_error,
17214
+ pcb_via_clearance_error,
16841
17215
  pcb_fabrication_note_path,
16842
17216
  pcb_fabrication_note_text,
17217
+ pcb_fabrication_note_rect,
17218
+ pcb_fabrication_note_dimension,
17219
+ pcb_note_text,
17220
+ pcb_note_rect,
17221
+ pcb_note_path,
17222
+ pcb_note_line,
17223
+ pcb_note_dimension,
16843
17224
  pcb_autorouting_error,
16844
17225
  pcb_footprint_overlap_error,
16845
17226
  pcb_breakout_point,
@@ -16849,9 +17230,14 @@ var any_circuit_element = z103.union([
16849
17230
  pcb_thermal_spoke,
16850
17231
  pcb_copper_pour,
16851
17232
  pcb_component_outside_board_error,
17233
+ pcb_courtyard_rect,
17234
+ pcb_courtyard_outline,
16852
17235
  schematic_box,
16853
17236
  schematic_text,
16854
17237
  schematic_line,
17238
+ schematic_rect,
17239
+ schematic_circle,
17240
+ schematic_arc,
16855
17241
  schematic_component,
16856
17242
  schematic_port,
16857
17243
  schematic_trace,
@@ -16866,7 +17252,11 @@ var any_circuit_element = z103.union([
16866
17252
  schematic_table,
16867
17253
  schematic_table_cell,
16868
17254
  cad_component,
16869
- simulation_voltage_source
17255
+ simulation_voltage_source,
17256
+ simulation_experiment,
17257
+ simulation_transient_voltage_graph,
17258
+ simulation_switch,
17259
+ simulation_voltage_probe
16870
17260
  ]);
16871
17261
  expectTypesMatch(true);
16872
17262
  expectStringUnionsMatch(true);
@@ -16881,7 +17271,7 @@ import { z as z710 } from "zod";
16881
17271
  import { z as z910 } from "zod";
16882
17272
  import "zod";
16883
17273
  import "zod";
16884
- import { z as z122 } from "zod";
17274
+ import { z as z125 } from "zod";
16885
17275
  import { z as z132 } from "zod";
16886
17276
  import { z as z142 } from "zod";
16887
17277
  import { z as z152 } from "zod";
@@ -17057,12 +17447,12 @@ function convertMilToMm(value) {
17057
17447
  }
17058
17448
  return Number(value);
17059
17449
  }
17060
- var lengthInMm = z104.union([z104.string(), z104.number()]).transform((val) => convertMilToMm(val));
17061
- var extendDipDef = (newDefaults) => z104.object({
17062
- fn: z104.string(),
17063
- num_pins: z104.number().optional().default(6),
17064
- wide: z104.boolean().optional(),
17065
- narrow: z104.boolean().optional(),
17450
+ var lengthInMm = z124.union([z124.string(), z124.number()]).transform((val) => convertMilToMm(val));
17451
+ var extendDipDef = (newDefaults) => z124.object({
17452
+ fn: z124.string(),
17453
+ num_pins: z124.number().optional().default(6),
17454
+ wide: z124.boolean().optional(),
17455
+ narrow: z124.boolean().optional(),
17066
17456
  w: lengthInMm.optional(),
17067
17457
  p: lengthInMm.default(newDefaults.p ?? "2.54mm"),
17068
17458
  id: lengthInMm.optional(),
@@ -18499,24 +18889,24 @@ function determinePinlabelAnchorSide({
18499
18889
  }
18500
18890
  return pinlabelAnchorSide;
18501
18891
  }
18502
- var pinrow_def = z122.object({
18503
- fn: z122.string(),
18504
- num_pins: z122.number().optional().default(6),
18505
- rows: z122.union([z122.string(), z122.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
18892
+ var pinrow_def = z125.object({
18893
+ fn: z125.string(),
18894
+ num_pins: z125.number().optional().default(6),
18895
+ rows: z125.union([z125.string(), z125.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
18506
18896
  p: length.default("0.1in").describe("pitch"),
18507
18897
  id: length.default("1.0mm").describe("inner diameter"),
18508
18898
  od: length.default("1.5mm").describe("outer diameter"),
18509
- male: z122.boolean().optional().describe("for male pin headers"),
18510
- female: z122.boolean().optional().describe("for female pin headers"),
18511
- pinlabeltextalignleft: z122.boolean().optional().default(false),
18512
- pinlabeltextaligncenter: z122.boolean().optional().default(false),
18513
- pinlabeltextalignright: z122.boolean().optional().default(false),
18514
- pinlabelverticallyinverted: z122.boolean().optional().default(false),
18515
- pinlabelorthogonal: z122.boolean().optional().default(false),
18516
- nosquareplating: z122.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
18517
- nopinlabels: z122.boolean().optional().default(false).describe("omit silkscreen pin labels"),
18518
- doublesidedpinlabel: z122.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
18519
- bottomsidepinlabel: z122.boolean().optional().default(false).describe(
18899
+ male: z125.boolean().optional().describe("for male pin headers"),
18900
+ female: z125.boolean().optional().describe("for female pin headers"),
18901
+ pinlabeltextalignleft: z125.boolean().optional().default(false),
18902
+ pinlabeltextaligncenter: z125.boolean().optional().default(false),
18903
+ pinlabeltextalignright: z125.boolean().optional().default(false),
18904
+ pinlabelverticallyinverted: z125.boolean().optional().default(false),
18905
+ pinlabelorthogonal: z125.boolean().optional().default(false),
18906
+ nosquareplating: z125.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
18907
+ nopinlabels: z125.boolean().optional().default(false).describe("omit silkscreen pin labels"),
18908
+ doublesidedpinlabel: z125.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
18909
+ bottomsidepinlabel: z125.boolean().optional().default(false).describe(
18520
18910
  "place the silkscreen reference text on the bottom layer instead of top"
18521
18911
  )
18522
18912
  }).transform((data) => {
@@ -18530,7 +18920,7 @@ var pinrow_def = z122.object({
18530
18920
  }).superRefine((data, ctx) => {
18531
18921
  if (data.male && data.female) {
18532
18922
  ctx.addIssue({
18533
- code: z122.ZodIssueCode.custom,
18923
+ code: z125.ZodIssueCode.custom,
18534
18924
  message: "'male' and 'female' cannot both be true; it should be male or female.",
18535
18925
  path: ["male", "female"]
18536
18926
  });
@@ -24008,7 +24398,6 @@ footprinter.getFootprintNames = getFootprintNames;
24008
24398
  var fp = footprinter;
24009
24399
 
24010
24400
  // node_modules/jscad-electronics/dist/vanilla.js
24011
- var import_modeling = __toESM(require_src(), 1);
24012
24401
  import {
24013
24402
  BufferAttribute,
24014
24403
  BufferGeometry,
@@ -24055,7 +24444,29 @@ var ChipBody = ({
24055
24444
  height: height10,
24056
24445
  heightAboveSurface: heightAboveSurface2 = 0.15
24057
24446
  }) => {
24058
- return /* @__PURE__ */ jsx5(Colorize, { color: "#555", children: /* @__PURE__ */ jsx5(Translate, { offset: center, children: /* @__PURE__ */ jsx5(Translate, { offset: { x: 0, y: 0, z: height10 / 2 + heightAboveSurface2 }, children: /* @__PURE__ */ jsx5(RoundedCuboid, { roundRadius: 0.2, size: [width10, length2, height10] }) }) }) });
24447
+ const straightHeight = height10 * 0.5;
24448
+ const taperHeight = height10 - straightHeight;
24449
+ const taperInset = Math.min(width10, length2) * 0.12;
24450
+ const faceWidth = Math.max(width10 - taperInset, width10 * 0.75);
24451
+ const faceLength = Math.max(length2 - taperInset, length2 * 0.75);
24452
+ const notchRadius = Math.min(width10, length2) * 0.12;
24453
+ const notchCenterZ = height10 - notchRadius * 0.6;
24454
+ const notchCenterY = length2 / 2 - notchRadius * 0.25;
24455
+ const notchLength = faceLength / 8;
24456
+ const notchWidth = height10 / 4;
24457
+ return /* @__PURE__ */ jsx5(Colorize, { color: "#555", children: /* @__PURE__ */ jsx5(Translate, { offset: center, children: /* @__PURE__ */ jsx5(Translate, { offset: { x: 0, y: 0, z: heightAboveSurface2 }, children: /* @__PURE__ */ jsxs(Subtract, { children: [
24458
+ /* @__PURE__ */ jsxs(Union, { children: [
24459
+ /* @__PURE__ */ jsxs(Hull, { children: [
24460
+ /* @__PURE__ */ jsx5(Translate, { z: 5e-3, children: /* @__PURE__ */ jsx5(Cuboid, { size: [faceWidth, faceLength, 0.01] }) }),
24461
+ /* @__PURE__ */ jsx5(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx5(Cuboid, { size: [width10, length2, 0.01] }) })
24462
+ ] }),
24463
+ /* @__PURE__ */ jsxs(Hull, { children: [
24464
+ /* @__PURE__ */ jsx5(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx5(Cuboid, { size: [width10, length2, 0.01] }) }),
24465
+ /* @__PURE__ */ jsx5(Translate, { z: straightHeight + taperHeight, children: /* @__PURE__ */ jsx5(Cuboid, { size: [faceWidth, faceLength, 0.01] }) })
24466
+ ] })
24467
+ ] }),
24468
+ /* @__PURE__ */ jsx5(Translate, { offset: { x: 0, y: notchCenterY, z: height10 }, children: /* @__PURE__ */ jsx5(Rotate, { rotation: [0, 0, 0], children: /* @__PURE__ */ jsx5(Cylinder, { radius: notchLength, height: notchWidth }) }) })
24469
+ ] }) }) }) });
24059
24470
  };
24060
24471
  var range = (end) => Array.from({ length: end }, (_, i) => i);
24061
24472
  function getExpandedStroke(strokeInput, width10) {
@@ -24141,17 +24552,17 @@ var svgPathPoints = normalizeOnY([
24141
24552
  ]);
24142
24553
  var DIP_PIN_HEIGHT = 5.47;
24143
24554
  var heightAboveSurface = 0.5;
24144
- var DipPinLeg = ({ x, y, z: z105 }) => {
24555
+ var DipPinLeg = ({ x, y, z: z126 }) => {
24145
24556
  const isRotated = x > 0;
24146
24557
  return /* @__PURE__ */ jsxs(Fragment22, { children: [
24147
- /* @__PURE__ */ jsx5(Translate, { offset: { x: x + 0.25 / 2, y, z: z105 }, children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 0.25, children: /* @__PURE__ */ jsx5(Polygon, { points: svgPathPoints.map((p) => [p.x, p.y]) }) }) }) }),
24558
+ /* @__PURE__ */ jsx5(Translate, { offset: { x: x + 0.25 / 2, y, z: z126 }, children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 0.25, children: /* @__PURE__ */ jsx5(Polygon, { points: svgPathPoints.map((p) => [p.x, p.y]) }) }) }) }),
24148
24559
  /* @__PURE__ */ jsx5(
24149
24560
  Translate,
24150
24561
  {
24151
24562
  offset: {
24152
24563
  x,
24153
24564
  y: y + (isRotated ? 1 : -1),
24154
- z: z105
24565
+ z: z126
24155
24566
  },
24156
24567
  children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 2, children: /* @__PURE__ */ jsx5(
24157
24568
  Polygon,
@@ -25432,6 +25843,50 @@ var VSSOP = ({
25432
25843
  )
25433
25844
  ] });
25434
25845
  };
25846
+ var SOD523 = () => {
25847
+ const fullWidth = 2.15;
25848
+ const bodyLength10 = 0.8;
25849
+ const bodyHeight = 0.6;
25850
+ const padWidth = 0.6;
25851
+ const padLength = 0.5;
25852
+ const padThickness = 0.12;
25853
+ const bodyWidth = fullWidth - padLength;
25854
+ const leftPadCenterX = -bodyWidth / 2 + padLength / 2 - 0.15;
25855
+ const rightPadCenterX = bodyWidth / 2 - padLength / 2 + 0.15;
25856
+ const taperOffset = 0.2;
25857
+ const straightHeight = bodyHeight * 0.5;
25858
+ const Body = /* @__PURE__ */ jsx5(Colorize, { color: "#222", children: /* @__PURE__ */ jsxs(Union, { children: [
25859
+ /* @__PURE__ */ jsx5(Translate, { z: straightHeight / 2, children: /* @__PURE__ */ jsx5(Cuboid, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
25860
+ /* @__PURE__ */ jsxs(Hull, { children: [
25861
+ /* @__PURE__ */ jsx5(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx5(Cuboid, { size: [bodyWidth, bodyLength10, 0.01] }) }),
25862
+ /* @__PURE__ */ jsx5(Translate, { z: bodyHeight, children: /* @__PURE__ */ jsx5(
25863
+ Cuboid,
25864
+ {
25865
+ size: [bodyWidth - taperOffset, bodyLength10 - taperOffset, 0.01]
25866
+ }
25867
+ ) })
25868
+ ] })
25869
+ ] }) });
25870
+ return /* @__PURE__ */ jsxs(Fragment22, { children: [
25871
+ /* @__PURE__ */ jsx5(
25872
+ Cuboid,
25873
+ {
25874
+ color: "#ccc",
25875
+ size: [padLength, padWidth, padThickness],
25876
+ center: [leftPadCenterX, 0, padThickness / 2]
25877
+ }
25878
+ ),
25879
+ /* @__PURE__ */ jsx5(
25880
+ Cuboid,
25881
+ {
25882
+ color: "#ccc",
25883
+ size: [padLength, padWidth, padThickness],
25884
+ center: [rightPadCenterX, 0, padThickness / 2]
25885
+ }
25886
+ ),
25887
+ Body
25888
+ ] });
25889
+ };
25435
25890
  var Footprinter3d = ({ footprint }) => {
25436
25891
  const fpJson = fp.string(footprint).json();
25437
25892
  switch (fpJson.fn) {
@@ -25536,26 +25991,30 @@ var Footprinter3d = ({ footprint }) => {
25536
25991
  bodyWidth: fpJson.w
25537
25992
  }
25538
25993
  );
25994
+ case "sod523":
25995
+ return /* @__PURE__ */ jsx5(SOD523, {});
25539
25996
  }
25997
+ const colorMatch = footprint.match(/_color\(([^)]+)\)/);
25998
+ const color = colorMatch ? colorMatch[1] : void 0;
25540
25999
  switch (fpJson.imperial) {
25541
26000
  case "0402":
25542
- return /* @__PURE__ */ jsx5(A0402, {});
26001
+ return /* @__PURE__ */ jsx5(A0402, { color });
25543
26002
  case "0603":
25544
- return /* @__PURE__ */ jsx5(A0603, {});
26003
+ return /* @__PURE__ */ jsx5(A0603, { color });
25545
26004
  case "0805":
25546
- return /* @__PURE__ */ jsx5(A0805, {});
26005
+ return /* @__PURE__ */ jsx5(A0805, { color });
25547
26006
  case "0201":
25548
- return /* @__PURE__ */ jsx5(A0201, {});
26007
+ return /* @__PURE__ */ jsx5(A0201, { color });
25549
26008
  case "01005":
25550
- return /* @__PURE__ */ jsx5(A01005, {});
26009
+ return /* @__PURE__ */ jsx5(A01005, { color });
25551
26010
  case "1206":
25552
- return /* @__PURE__ */ jsx5(A1206, {});
26011
+ return /* @__PURE__ */ jsx5(A1206, { color });
25553
26012
  case "1210":
25554
- return /* @__PURE__ */ jsx5(A1210, {});
26013
+ return /* @__PURE__ */ jsx5(A1210, { color });
25555
26014
  case "2010":
25556
- return /* @__PURE__ */ jsx5(A2010, {});
26015
+ return /* @__PURE__ */ jsx5(A2010, { color });
25557
26016
  case "2512":
25558
- return /* @__PURE__ */ jsx5(A2512, {});
26017
+ return /* @__PURE__ */ jsx5(A2512, { color });
25559
26018
  }
25560
26019
  return null;
25561
26020
  };
@@ -25577,25 +26036,33 @@ var toVec3 = (v) => {
25577
26036
  return [Number(v.x) || 0, Number(v.y) || 0, Number(v.z) || 0];
25578
26037
  return [0, 0, 0];
25579
26038
  };
25580
- function renderNode(node, colorCtx) {
26039
+ function renderNode(node, colorCtx, renderCtx) {
26040
+ const {
26041
+ jscad: { primitives, booleans, hulls, geometries, extrusions, transforms }
26042
+ } = renderCtx;
25581
26043
  if (node == null || node === false) return [];
25582
- if (Array.isArray(node)) return node.flatMap((n) => renderNode(n, colorCtx));
26044
+ if (Array.isArray(node))
26045
+ return node.flatMap((n) => renderNode(n, colorCtx, renderCtx));
25583
26046
  if (!isVNode(node)) return [];
25584
26047
  const { type, props, children } = node;
25585
26048
  if (type === Fragment2) {
25586
- return (children ?? []).flatMap((c) => renderNode(c, colorCtx));
26049
+ return (children ?? []).flatMap((c) => renderNode(c, colorCtx, renderCtx));
25587
26050
  }
25588
26051
  if (type === Colorize) {
25589
26052
  const newColor = props?.color;
25590
- return (children ?? []).flatMap((c) => renderNode(c, newColor ?? colorCtx));
26053
+ return (children ?? []).flatMap(
26054
+ (c) => renderNode(c, newColor ?? colorCtx, renderCtx)
26055
+ );
25591
26056
  }
25592
26057
  if (type === Translate) {
25593
26058
  const off = toVec3(
25594
26059
  props?.offset ?? { x: props?.x, y: props?.y, z: props?.z }
25595
26060
  );
25596
- const geoms = (children ?? []).flatMap((c) => renderNode(c, colorCtx));
26061
+ const geoms = (children ?? []).flatMap(
26062
+ (c) => renderNode(c, colorCtx, renderCtx)
26063
+ );
25597
26064
  return geoms.map(({ geom, color }) => ({
25598
- geom: import_modeling.transforms.translate(off, geom),
26065
+ geom: transforms.translate(off, geom),
25599
26066
  color: color ?? colorCtx
25600
26067
  }));
25601
26068
  }
@@ -25609,36 +26076,44 @@ function renderNode(node, colorCtx) {
25609
26076
  degToRad(props?.y ?? 0),
25610
26077
  degToRad(props?.z ?? 0)
25611
26078
  ];
25612
- const geoms = (children ?? []).flatMap((c) => renderNode(c, colorCtx));
26079
+ const geoms = (children ?? []).flatMap(
26080
+ (c) => renderNode(c, colorCtx, renderCtx)
26081
+ );
25613
26082
  return geoms.map(({ geom, color }) => ({
25614
- geom: import_modeling.transforms.rotateZ(
26083
+ geom: transforms.rotateZ(
25615
26084
  rot[2],
25616
- import_modeling.transforms.rotateY(rot[1], import_modeling.transforms.rotateX(rot[0], geom))
26085
+ transforms.rotateY(rot[1], transforms.rotateX(rot[0], geom))
25617
26086
  ),
25618
26087
  color
25619
26088
  }));
25620
26089
  }
25621
26090
  if (type === Union || type === Subtract || type === Hull) {
25622
- const geoms = (children ?? []).flatMap((c) => renderNode(c, colorCtx)).map((g) => g.geom);
26091
+ const geoms = (children ?? []).flatMap((c) => renderNode(c, colorCtx, renderCtx)).map((g) => g.geom);
25623
26092
  if (geoms.length === 0) return [];
25624
26093
  let geom;
25625
- if (type === Union) geom = import_modeling.booleans.union(geoms);
26094
+ if (type === Union) geom = booleans.union(geoms);
25626
26095
  else if (type === Subtract)
25627
- geom = import_modeling.booleans.subtract(geoms[0], geoms.slice(1));
25628
- else geom = import_modeling.hulls.hull(geoms);
26096
+ geom = booleans.subtract(geoms[0], geoms.slice(1));
26097
+ else geom = hulls.hull(geoms);
25629
26098
  return [{ geom }];
25630
26099
  }
25631
26100
  if (type === Polygon) {
25632
26101
  const points = props?.points ?? [];
25633
- const g2 = import_modeling.geometries.geom2.fromPoints(points);
26102
+ const g2 = geometries.geom2.fromPoints(points);
25634
26103
  return [{ geom: g2, color: colorCtx ?? props?.color }];
25635
26104
  }
25636
26105
  if (type === ExtrudeLinear) {
25637
- const geoms2 = (children ?? []).flatMap((c) => renderNode(c, colorCtx)).map((g) => g.geom);
26106
+ const geoms2 = (children ?? []).flatMap((c) => renderNode(c, colorCtx, renderCtx)).map((g) => g.geom);
25638
26107
  if (geoms2.length === 0) return [];
25639
- const base2 = geoms2.length > 1 ? import_modeling.booleans.union(geoms2) : geoms2[0];
26108
+ const base2 = geoms2.length > 1 ? booleans.union(geoms2) : geoms2[0];
25640
26109
  const height10 = props?.height ?? props?.h ?? 1;
25641
- let g3 = import_modeling.extrusions.extrudeLinear({ height: height10 }, base2);
26110
+ let g3 = extrusions.extrudeLinear({ height: height10 }, base2);
26111
+ if (g3.polygons) {
26112
+ for (const poly of g3.polygons) {
26113
+ if (!poly.plane || !poly.vertices || poly.vertices.length < 3) continue;
26114
+ poly.vertices.reverse();
26115
+ }
26116
+ }
25642
26117
  return [{ geom: g3, color: colorCtx ?? props?.color }];
25643
26118
  }
25644
26119
  if (type === Cuboid || type === Cube || type === Cylinder || type === Sphere || type === RoundedCuboid) {
@@ -25647,38 +26122,38 @@ function renderNode(node, colorCtx) {
25647
26122
  const size2 = props?.size ?? [1, 1, 1];
25648
26123
  const offset = props?.offset;
25649
26124
  const center = props?.center ?? (offset ? [offset[0], offset[1], offset[2]] : [0, 0, 0]);
25650
- g = import_modeling.primitives.cuboid({ size: size2, center });
26125
+ g = primitives.cuboid({ size: size2, center });
25651
26126
  } else if (type === Cube) {
25652
26127
  const size2 = props?.size ?? 1;
25653
26128
  const offset = props?.offset;
25654
26129
  const center = props?.center ?? (offset ? [offset[0], offset[1], offset[2]] : [0, 0, 0]);
25655
- g = import_modeling.primitives.cube({ size: size2, center });
26130
+ g = primitives.cube({ size: size2, center });
25656
26131
  } else if (type === Cylinder) {
25657
26132
  const height10 = props?.height ?? 1;
25658
26133
  const radius = props?.radius ?? 1;
25659
26134
  const center = props?.center ?? [0, 0, 0];
25660
- g = import_modeling.primitives.cylinder({ height: height10, radius, center });
26135
+ g = primitives.cylinder({ height: height10, radius, center });
25661
26136
  } else if (type === Sphere) {
25662
26137
  const radius = props?.radius ?? 1;
25663
26138
  const center = props?.center ?? [0, 0, 0];
25664
- g = import_modeling.primitives.sphere({ radius, center });
26139
+ g = primitives.sphere({ radius, center });
25665
26140
  } else {
25666
26141
  const size2 = props?.size ?? [1, 1, 1];
25667
26142
  const roundRadius = props?.roundRadius ?? 0.1;
25668
26143
  const center = props?.center ?? [0, 0, 0];
25669
- g = import_modeling.primitives.roundedCuboid({ size: size2, roundRadius, center });
26144
+ g = primitives.roundedCuboid({ size: size2, roundRadius, center });
25670
26145
  }
25671
26146
  return [{ geom: g, color: colorCtx ?? props?.color }];
25672
26147
  }
25673
26148
  if (typeof type === "function") {
25674
26149
  const out = type(props ?? {});
25675
- return renderNode(out, colorCtx);
26150
+ return renderNode(out, colorCtx, renderCtx);
25676
26151
  }
25677
- return (children ?? []).flatMap((c) => renderNode(c, colorCtx));
26152
+ return (children ?? []).flatMap((c) => renderNode(c, colorCtx, renderCtx));
25678
26153
  }
25679
- function render(root) {
25680
- const geometries2 = renderNode(root);
25681
- return { geometries: geometries2 };
26154
+ function render(root, jscad3) {
26155
+ const geometries = renderNode(root, void 0, { jscad: jscad3 });
26156
+ return { geometries };
25682
26157
  }
25683
26158
  function convertCSGToThreeGeom(csg) {
25684
26159
  if (csg.polygons) {
@@ -25717,9 +26192,9 @@ function convertCSGToThreeGeom(csg) {
25717
26192
  );
25718
26193
  }
25719
26194
  if (csg.transforms) {
25720
- const transforms2 = new Matrix4();
25721
- transforms2.fromArray(csg.transforms);
25722
- geo.applyMatrix4(transforms2);
26195
+ const transforms = new Matrix4();
26196
+ transforms.fromArray(csg.transforms);
26197
+ geo.applyMatrix4(transforms);
25723
26198
  }
25724
26199
  geo.computeVertexNormals();
25725
26200
  return geo;
@@ -25747,18 +26222,18 @@ function convertCSGToThreeGeom(csg) {
25747
26222
  );
25748
26223
  }
25749
26224
  if (csg.transforms) {
25750
- const transforms2 = new Matrix4();
25751
- transforms2.fromArray(csg.transforms);
25752
- geo.applyMatrix4(transforms2);
26225
+ const transforms = new Matrix4();
26226
+ transforms.fromArray(csg.transforms);
26227
+ geo.applyMatrix4(transforms);
25753
26228
  }
25754
26229
  return geo;
25755
26230
  }
25756
26231
  console.error("Invalid CSG object: neither polygons nor sides found");
25757
26232
  return new BufferGeometry();
25758
26233
  }
25759
- function getJscadModelForFootprint(footprint) {
26234
+ function getJscadModelForFootprint(footprint, jscad3) {
25760
26235
  const vnode = h(Footprinter3d, { footprint });
25761
- return render(vnode);
26236
+ return render(vnode, jscad3);
25762
26237
  }
25763
26238
 
25764
26239
  // src/three-components/JscadModel.tsx
@@ -25776,7 +26251,7 @@ var JscadModel = ({
25776
26251
  }) => {
25777
26252
  const { rootObject } = useThree();
25778
26253
  const { threeGeom, material } = useMemo4(() => {
25779
- const jscadObject = (0, import_jscad_planner.executeJscadOperations)(import_modeling2.default, jscadPlan);
26254
+ const jscadObject = (0, import_jscad_planner.executeJscadOperations)(import_modeling.default, jscadPlan);
25780
26255
  if (!jscadObject || !jscadObject.polygons && !jscadObject.sides) {
25781
26256
  return { threeGeom: null, material: null };
25782
26257
  }
@@ -25838,6 +26313,7 @@ var JscadModel = ({
25838
26313
  };
25839
26314
 
25840
26315
  // src/three-components/FootprinterModel.tsx
26316
+ var jscadModeling = __toESM(require_src(), 1);
25841
26317
  import { useMemo as useMemo5, useEffect as useEffect7 } from "react";
25842
26318
  import * as THREE6 from "three";
25843
26319
  import { jsx as jsx7 } from "react/jsx-runtime";
@@ -25853,9 +26329,9 @@ var FootprinterModel = ({
25853
26329
  const { rootObject } = useThree();
25854
26330
  const group = useMemo5(() => {
25855
26331
  if (!footprint) return null;
25856
- const { geometries: geometries2 } = getJscadModelForFootprint(footprint);
26332
+ const { geometries } = getJscadModelForFootprint(footprint, jscadModeling);
25857
26333
  const group2 = new THREE6.Group();
25858
- for (const geomInfo of geometries2.flat(Infinity)) {
26334
+ for (const geomInfo of geometries.flat(Infinity)) {
25859
26335
  const geom = geomInfo.geom;
25860
26336
  if (!geom || !geom.polygons && !geom.sides) {
25861
26337
  continue;
@@ -26100,7 +26576,7 @@ import * as THREE13 from "three";
26100
26576
  // package.json
26101
26577
  var package_default = {
26102
26578
  name: "@tscircuit/3d-viewer",
26103
- version: "0.0.408",
26579
+ version: "0.0.409",
26104
26580
  main: "./dist/index.js",
26105
26581
  module: "./dist/index.js",
26106
26582
  type: "module",
@@ -26147,8 +26623,12 @@ var package_default = {
26147
26623
  "@storybook/blocks": "9.0.0-alpha.17",
26148
26624
  "@storybook/react-vite": "^9.1.5",
26149
26625
  "@tscircuit/circuit-json-util": "^0.0.72",
26150
- "@tscircuit/core": "^0.0.734",
26151
- "@tscircuit/props": "^0.0.339",
26626
+ "@tscircuit/core": "^0.0.781",
26627
+ "@tscircuit/props": "^0.0.360",
26628
+ "@tscircuit/checks": "^0.0.85",
26629
+ "@tscircuit/math-utils": "^0.0.27",
26630
+ "@tscircuit/capacity-autorouter": "^0.0.131",
26631
+ "calculate-packing": "^0.0.48",
26152
26632
  "@types/jsdom": "^21.1.7",
26153
26633
  "@types/react": "19",
26154
26634
  "@types/react-dom": "19",
@@ -26156,17 +26636,17 @@ var package_default = {
26156
26636
  "@vitejs/plugin-react": "^4.3.4",
26157
26637
  "bun-match-svg": "^0.0.9",
26158
26638
  "bun-types": "1.2.1",
26159
- "circuit-json": "0.0.256",
26639
+ "circuit-json": "0.0.278",
26160
26640
  "circuit-to-svg": "^0.0.179",
26161
26641
  debug: "^4.4.0",
26162
- "jscad-electronics": "^0.0.38",
26642
+ "jscad-electronics": "^0.0.48",
26163
26643
  "jscad-planner": "^0.0.13",
26164
26644
  jsdom: "^26.0.0",
26165
26645
  "manifold-3d": "^3.2.1",
26166
26646
  "react-use-gesture": "^9.1.3",
26167
26647
  semver: "^7.7.0",
26168
26648
  "strip-ansi": "^7.1.0",
26169
- tscircuit: "^0.0.649",
26649
+ tscircuit: "^0.0.742",
26170
26650
  tsup: "^8.3.6",
26171
26651
  typescript: "^5.7.3",
26172
26652
  vite: "^7.1.5",
@@ -26450,9 +26930,9 @@ var Canvas = forwardRef(
26450
26930
  let animationFrameId;
26451
26931
  const clock = new THREE10.Clock();
26452
26932
  const animate = () => {
26453
- const time2 = clock.getElapsedTime();
26933
+ const time = clock.getElapsedTime();
26454
26934
  const delta = clock.getDelta();
26455
- frameListeners.current.forEach((listener) => listener(time2, delta));
26935
+ frameListeners.current.forEach((listener) => listener(time, delta));
26456
26936
  renderer.render(scene, camera);
26457
26937
  animationFrameId = requestAnimationFrame(animate);
26458
26938
  };
@@ -26845,8 +27325,8 @@ var useStlsFromGeom = (geom) => {
26845
27325
  if (!geom) return;
26846
27326
  const generateStls = async () => {
26847
27327
  setLoading(true);
26848
- const geometries2 = Array.isArray(geom) ? geom : [geom];
26849
- const stlPromises = geometries2.map(async (g) => {
27328
+ const geometries = Array.isArray(geom) ? geom : [geom];
27329
+ const stlPromises = geometries.map(async (g) => {
26850
27330
  const rawParts = stlSerializer.serialize({ binary: true }, [g]);
26851
27331
  const blob = new Blob(rawParts);
26852
27332
  const stlData = await blob.arrayBuffer();
@@ -27487,9 +27967,9 @@ function createSilkscreenTextGeoms(silkscreenText) {
27487
27967
  } else if (silkscreenText.anchor_alignment?.includes("bottom")) {
27488
27968
  yOffset = -textBounds.minY;
27489
27969
  }
27490
- const transforms2 = [];
27970
+ const transforms = [];
27491
27971
  if (silkscreenText.layer === "bottom") {
27492
- transforms2.push(
27972
+ transforms.push(
27493
27973
  translate3(centerX, centerY),
27494
27974
  { a: -1, b: 0, c: 0, d: 1, e: 0, f: 0 },
27495
27975
  // horizontal flip matrix
@@ -27499,15 +27979,15 @@ function createSilkscreenTextGeoms(silkscreenText) {
27499
27979
  }
27500
27980
  if (rotationDegrees) {
27501
27981
  const rad = rotationDegrees * Math.PI / 180;
27502
- transforms2.push(
27982
+ transforms.push(
27503
27983
  translate3(centerX, centerY),
27504
27984
  rotate(rad),
27505
27985
  translate3(-centerX, -centerY)
27506
27986
  );
27507
27987
  }
27508
27988
  let transformedOutlines = textOutlines;
27509
- if (transforms2.length > 0) {
27510
- const matrix = compose(...transforms2);
27989
+ if (transforms.length > 0) {
27990
+ const matrix = compose(...transforms);
27511
27991
  transformedOutlines = textOutlines.map(
27512
27992
  (outline) => outline.map(([x, y]) => {
27513
27993
  const { x: nx, y: ny } = applyToPoint(matrix, { x, y });
@@ -30727,8 +31207,9 @@ function createGeometryFromPolygons(polygons) {
30727
31207
  }
30728
31208
 
30729
31209
  // src/utils/render-component.tsx
30730
- var import_modeling3 = __toESM(require_src(), 1);
31210
+ var import_modeling2 = __toESM(require_src(), 1);
30731
31211
  var import_jscad_planner2 = __toESM(require_dist(), 1);
31212
+ var jscadModeling2 = __toESM(require_src(), 1);
30732
31213
  import * as THREE29 from "three";
30733
31214
 
30734
31215
  // src/utils/load-model.ts
@@ -30789,7 +31270,7 @@ async function renderComponent(component, scene) {
30789
31270
  }
30790
31271
  if (component.model_jscad) {
30791
31272
  const jscadObject = (0, import_jscad_planner2.executeJscadOperations)(
30792
- import_modeling3.default,
31273
+ import_modeling2.default,
30793
31274
  component.model_jscad
30794
31275
  );
30795
31276
  if (jscadObject && (jscadObject.polygons || jscadObject.sides)) {
@@ -30820,10 +31301,11 @@ async function renderComponent(component, scene) {
30820
31301
  return;
30821
31302
  }
30822
31303
  if (component.footprinter_string) {
30823
- const { geometries: geometries2 } = getJscadModelForFootprint(
30824
- component.footprinter_string
31304
+ const { geometries } = getJscadModelForFootprint(
31305
+ component.footprinter_string,
31306
+ jscadModeling2
30825
31307
  );
30826
- for (const geomInfo of geometries2.flat(Infinity)) {
31308
+ for (const geomInfo of geometries.flat(Infinity)) {
30827
31309
  const geom = geomInfo.geom;
30828
31310
  if (!geom || !geom.polygons && !geom.sides) {
30829
31311
  continue;