@tscircuit/core 0.0.2149 → 0.0.2151

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 (3) hide show
  1. package/dist/index.d.ts +319 -3
  2. package/dist/index.js +318 -119
  3. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -123,6 +123,7 @@ __export(components_exports, {
123
123
  SilkscreenText: () => SilkscreenText,
124
124
  SmtPad: () => SmtPad,
125
125
  SolderJumper: () => SolderJumper,
126
+ SolderPaste: () => SolderPaste,
126
127
  SpiceModel: () => SpiceModel,
127
128
  Subcircuit: () => Subcircuit,
128
129
  Subpanel: () => Subpanel,
@@ -9555,8 +9556,8 @@ var underscorifyPortArrangement = (portArrangement) => {
9555
9556
  // lib/utils/createComponentsFromCircuitJson.ts
9556
9557
  import { getUnitVectorFromDirection as getUnitVectorFromDirection2 } from "@tscircuit/math-utils";
9557
9558
  import {
9558
- pcb_via as pcb_via2,
9559
- layer_ref as layer_ref2
9559
+ layer_ref as layer_ref2,
9560
+ pcb_via as pcb_via2
9560
9561
  } from "circuit-json";
9561
9562
 
9562
9563
  // lib/utils/normalizeTextForCircuitJson.ts
@@ -11293,12 +11294,14 @@ var PlatedHole = class extends PrimitiveComponent2 {
11293
11294
  "padOutline is required for hole_with_polygon_pad shape"
11294
11295
  );
11295
11296
  }
11296
- const xs = props.padOutline.map(
11297
- (p2) => typeof p2.x === "number" ? p2.x : parseFloat(String(p2.x))
11298
- );
11299
- const ys = props.padOutline.map(
11300
- (p2) => typeof p2.y === "number" ? p2.y : parseFloat(String(p2.y))
11301
- );
11297
+ const xs = props.padOutline.map((p2) => {
11298
+ if (typeof p2.x === "number") return p2.x;
11299
+ return parseFloat(String(p2.x));
11300
+ });
11301
+ const ys = props.padOutline.map((p2) => {
11302
+ if (typeof p2.y === "number") return p2.y;
11303
+ return parseFloat(String(p2.y));
11304
+ });
11302
11305
  const minX = Math.min(...xs);
11303
11306
  const maxX = Math.max(...xs);
11304
11307
  const minY = Math.min(...ys);
@@ -11385,7 +11388,7 @@ var PlatedHole = class extends PrimitiveComponent2 {
11385
11388
  pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
11386
11389
  });
11387
11390
  this.pcb_plated_hole_id = pcb_plated_hole.pcb_plated_hole_id;
11388
- if (shouldCreateSolderPaste) {
11391
+ if (shouldCreateSolderPaste && !subcircuit._isInflatedFromCircuitJson) {
11389
11392
  db2.pcb_solder_paste.insert({
11390
11393
  layer: "top",
11391
11394
  shape: "circle",
@@ -11578,13 +11581,23 @@ var PlatedHole = class extends PrimitiveComponent2 {
11578
11581
  }
11579
11582
  } else if (props.shape === "hole_with_polygon_pad") {
11580
11583
  const padOutline = (props.padOutline || []).map((point6) => {
11581
- const x2 = typeof point6.x === "number" ? point6.x : parseFloat(String(point6.x));
11582
- const y2 = typeof point6.y === "number" ? point6.y : parseFloat(String(point6.y));
11584
+ let x2 = point6.x;
11585
+ if (typeof x2 !== "number") x2 = parseFloat(String(x2));
11586
+ let y2 = point6.y;
11587
+ if (typeof y2 !== "number") y2 = parseFloat(String(y2));
11583
11588
  return {
11584
11589
  x: x2,
11585
11590
  y: y2
11586
11591
  };
11587
11592
  });
11593
+ let holeOffsetX = props.holeOffsetX;
11594
+ if (typeof holeOffsetX !== "number") {
11595
+ holeOffsetX = parseFloat(String(holeOffsetX || 0));
11596
+ }
11597
+ let holeOffsetY = props.holeOffsetY;
11598
+ if (typeof holeOffsetY !== "number") {
11599
+ holeOffsetY = parseFloat(String(holeOffsetY || 0));
11600
+ }
11588
11601
  const pcb_plated_hole = db2.pcb_plated_hole.insert({
11589
11602
  pcb_component_id,
11590
11603
  pcb_port_id: this.matchedPort?.pcb_port_id,
@@ -11594,8 +11607,8 @@ var PlatedHole = class extends PrimitiveComponent2 {
11594
11607
  hole_width: props.holeWidth,
11595
11608
  hole_height: props.holeHeight,
11596
11609
  pad_outline: padOutline,
11597
- hole_offset_x: typeof props.holeOffsetX === "number" ? props.holeOffsetX : parseFloat(String(props.holeOffsetX || 0)),
11598
- hole_offset_y: typeof props.holeOffsetY === "number" ? props.holeOffsetY : parseFloat(String(props.holeOffsetY || 0)),
11610
+ hole_offset_x: holeOffsetX,
11611
+ hole_offset_y: holeOffsetY,
11599
11612
  port_hints: this.getNameAndAliases(),
11600
11613
  x: position.x,
11601
11614
  y: position.y,
@@ -13305,6 +13318,124 @@ var SmtPad = class extends PrimitiveComponent2 {
13305
13318
  }
13306
13319
  };
13307
13320
 
13321
+ // lib/components/primitive-components/SolderPaste.ts
13322
+ import { solderPasteProps } from "@tscircuit/props";
13323
+ import { applyToPoint as applyToPoint28, decomposeTSR as decomposeTSR9 } from "transformation-matrix";
13324
+ var isStandalonePcbSolderPaste = (element) => element.type === "pcb_solder_paste" && !element.pcb_smtpad_id && (element.shape === "circle" || element.shape === "rect" || element.shape === "rotated_rect");
13325
+ var SolderPaste = class _SolderPaste extends PrimitiveComponent2 {
13326
+ pcb_solder_paste_id = null;
13327
+ isPcbPrimitive = true;
13328
+ circuitJsonRotation = 0;
13329
+ /**
13330
+ * Reconstruct an aperture already in its parent's local PCB frame (+X right,
13331
+ * +Y top, +Z above, right-handed, mm). Its center is a point and its rotation
13332
+ * is in CCW degrees; coordinate transforms happen before this import.
13333
+ * Cached records may carry rotation even though the authored props expose
13334
+ * only axis-aligned shapes. Keep that derived state separate from props.
13335
+ */
13336
+ static fromCircuitJson(aperture) {
13337
+ const placement = {
13338
+ pcbX: aperture.x,
13339
+ pcbY: aperture.y,
13340
+ layer: aperture.layer
13341
+ };
13342
+ let props;
13343
+ if (aperture.shape === "circle") {
13344
+ props = { ...placement, shape: "circle", radius: aperture.radius };
13345
+ } else {
13346
+ props = {
13347
+ ...placement,
13348
+ shape: "rect",
13349
+ width: aperture.width,
13350
+ height: aperture.height
13351
+ };
13352
+ }
13353
+ const paste = new _SolderPaste(props);
13354
+ if (aperture.shape === "rotated_rect") {
13355
+ paste.circuitJsonRotation = aperture.ccw_rotation;
13356
+ }
13357
+ return paste;
13358
+ }
13359
+ _getPcbRotationBeforeLayout() {
13360
+ return this.circuitJsonRotation;
13361
+ }
13362
+ get config() {
13363
+ return { componentName: "SolderPaste", zodProps: solderPasteProps };
13364
+ }
13365
+ getPcbSize() {
13366
+ const props = this._parsedProps;
13367
+ if (props.shape === "circle") {
13368
+ return { width: props.radius * 2, height: props.radius * 2 };
13369
+ }
13370
+ return { width: props.width, height: props.height };
13371
+ }
13372
+ doInitialPcbPrimitiveRender() {
13373
+ if (this.root?.pcbDisabled) return;
13374
+ const { db: db2 } = this.root;
13375
+ const props = this._parsedProps;
13376
+ const authoredLayer = props.layer ?? "top";
13377
+ if (authoredLayer !== "top" && authoredLayer !== "bottom") {
13378
+ throw new Error(
13379
+ `Invalid layer "${authoredLayer}" for SolderPaste. Must be "top" or "bottom".`
13380
+ );
13381
+ }
13382
+ const transform = this._computePcbGlobalTransformBeforeLayout();
13383
+ const { maybeFlipLayer, isFlipped } = this._getPcbPrimitiveFlippedHelpers();
13384
+ const center = applyToPoint28(transform, { x: 0, y: 0 });
13385
+ const rotation5 = decomposeTSR9(transform, false, isFlipped).rotation.angle * 180 / Math.PI;
13386
+ const base = {
13387
+ ...center,
13388
+ layer: maybeFlipLayer(authoredLayer),
13389
+ pcb_component_id: this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id ?? void 0,
13390
+ pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0,
13391
+ subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
13392
+ };
13393
+ let aperture;
13394
+ if (props.shape === "circle") {
13395
+ aperture = db2.pcb_solder_paste.insert({
13396
+ ...base,
13397
+ shape: "circle",
13398
+ radius: props.radius
13399
+ });
13400
+ } else if (Math.abs(rotation5) < 1e-8) {
13401
+ aperture = db2.pcb_solder_paste.insert({
13402
+ ...base,
13403
+ shape: "rect",
13404
+ width: props.width,
13405
+ height: props.height
13406
+ });
13407
+ } else {
13408
+ aperture = db2.pcb_solder_paste.insert({
13409
+ ...base,
13410
+ shape: "rotated_rect",
13411
+ ccw_rotation: rotation5,
13412
+ width: props.width,
13413
+ height: props.height
13414
+ });
13415
+ }
13416
+ this.pcb_solder_paste_id = aperture.pcb_solder_paste_id;
13417
+ }
13418
+ _moveCircuitJsonElements({
13419
+ deltaX,
13420
+ deltaY
13421
+ }) {
13422
+ if (!this.pcb_solder_paste_id) return;
13423
+ const { db: db2 } = this.root;
13424
+ const aperture = db2.pcb_solder_paste.get(
13425
+ this.pcb_solder_paste_id
13426
+ );
13427
+ db2.pcb_solder_paste.update(this.pcb_solder_paste_id, {
13428
+ x: aperture.x + deltaX,
13429
+ y: aperture.y + deltaY
13430
+ });
13431
+ }
13432
+ removePcbPrimitiveRender() {
13433
+ if (!this.pcb_solder_paste_id) return;
13434
+ this.root.db.pcb_solder_paste.delete(this.pcb_solder_paste_id);
13435
+ this.pcb_solder_paste_id = null;
13436
+ }
13437
+ };
13438
+
13308
13439
  // lib/components/primitive-components/Symbol/Symbol.ts
13309
13440
  import { symbolProps } from "@tscircuit/props";
13310
13441
  import { compose as compose7, translate as translate5, scale as scale2 } from "transformation-matrix";
@@ -13497,7 +13628,10 @@ var isSchematicPrimitiveWithStrokeWidth = (elm) => schematicPrimitiveTypesWithSt
13497
13628
  );
13498
13629
  var getSchematicSymbolId = (elm) => {
13499
13630
  if (!("schematic_symbol_id" in elm)) return void 0;
13500
- return typeof elm.schematic_symbol_id === "string" ? elm.schematic_symbol_id : void 0;
13631
+ if (typeof elm.schematic_symbol_id === "string") {
13632
+ return elm.schematic_symbol_id;
13633
+ }
13634
+ return void 0;
13501
13635
  };
13502
13636
  var createComponentsFromCircuitJson = ({
13503
13637
  sourcePortOwner,
@@ -13550,8 +13684,10 @@ var createComponentsFromCircuitJson = ({
13550
13684
  }
13551
13685
  const getPortHintsWithSourcePortAliases = (portHints, pcbComponentId) => {
13552
13686
  const pinNumber = getPinNumberFromPortHints(portHints);
13553
- const sourceComponentId = typeof pcbComponentId === "string" ? sourceComponentIdByPcbComponentId.get(pcbComponentId) : void 0;
13554
- const sourcePort = typeof pinNumber === "number" && sourceComponentId ? sourcePortsByComponentAndPinNumber.get(sourceComponentId)?.get(pinNumber) : void 0;
13687
+ if (typeof pcbComponentId !== "string") return portHints;
13688
+ const sourceComponentId = sourceComponentIdByPcbComponentId.get(pcbComponentId);
13689
+ if (typeof pinNumber !== "number" || !sourceComponentId) return portHints;
13690
+ const sourcePort = sourcePortsByComponentAndPinNumber.get(sourceComponentId)?.get(pinNumber);
13555
13691
  if (!sourcePort) return portHints;
13556
13692
  const mergedPortHints = Array.from(
13557
13693
  new Set(
@@ -13564,7 +13700,8 @@ var createComponentsFromCircuitJson = ({
13564
13700
  )
13565
13701
  )
13566
13702
  );
13567
- return mergedPortHints.length > 0 ? mergedPortHints : portHints;
13703
+ if (mergedPortHints.length > 0) return mergedPortHints;
13704
+ return portHints;
13568
13705
  };
13569
13706
  for (const elm of circuitJson) {
13570
13707
  if (elm.type !== "schematic_symbol") continue;
@@ -13588,39 +13725,76 @@ var createComponentsFromCircuitJson = ({
13588
13725
  schematicComponentsByImportedId.set(elm.schematic_component_id, elm);
13589
13726
  }
13590
13727
  const addSchematicPrimitive = (elm, primitive) => {
13591
- const schematicSymbolId = getSchematicSymbolId(elm) ?? ("schematic_component_id" in elm && typeof elm.schematic_component_id === "string" ? schematicComponentsByImportedId.get(elm.schematic_component_id)?.schematic_symbol_id : void 0);
13592
- const parentSymbol = typeof schematicSymbolId === "string" ? schematicSymbolsByImportedId.get(schematicSymbolId) : void 0;
13593
- if (parentSymbol) {
13594
- parentSymbol.add(primitive);
13595
- } else {
13596
- components.push(primitive);
13728
+ let schematicSymbolId = getSchematicSymbolId(elm);
13729
+ if (schematicSymbolId === void 0 && "schematic_component_id" in elm && typeof elm.schematic_component_id === "string") {
13730
+ schematicSymbolId = schematicComponentsByImportedId.get(
13731
+ elm.schematic_component_id
13732
+ )?.schematic_symbol_id;
13733
+ }
13734
+ if (typeof schematicSymbolId === "string") {
13735
+ const parentSymbol = schematicSymbolsByImportedId.get(schematicSymbolId);
13736
+ if (parentSymbol) {
13737
+ parentSymbol.add(primitive);
13738
+ return;
13739
+ }
13597
13740
  }
13741
+ components.push(primitive);
13598
13742
  };
13599
13743
  for (const elm of circuitJson) {
13600
- const resolvedPortHints = "port_hints" in elm ? getPortHintsWithSourcePortAliases(
13601
- elm.port_hints,
13602
- "pcb_component_id" in elm ? elm.pcb_component_id : void 0
13603
- ) : void 0;
13604
- if (elm.type === "pcb_soldermask_opening") {
13605
- components.push(
13606
- new PcbSoldermaskOpening(
13607
- elm.shape === "polygon" ? { shape: "polygon", layer: elm.layer, points: elm.points } : elm.shape === "circle" ? {
13608
- shape: "circle",
13609
- layer: elm.layer,
13610
- pcbX: elm.x,
13611
- pcbY: elm.y,
13612
- radius: elm.radius
13613
- } : {
13614
- shape: "rect",
13615
- layer: elm.layer,
13616
- pcbX: elm.x,
13617
- pcbY: elm.y,
13618
- width: elm.width,
13619
- height: elm.height,
13620
- pcbRotation: elm.shape === "rotated_rect" ? elm.ccw_rotation : 0
13621
- }
13622
- )
13623
- );
13744
+ let resolvedPortHints;
13745
+ if ("port_hints" in elm) {
13746
+ resolvedPortHints = elm.port_hints;
13747
+ if ("pcb_component_id" in elm) {
13748
+ resolvedPortHints = getPortHintsWithSourcePortAliases(
13749
+ elm.port_hints,
13750
+ elm.pcb_component_id
13751
+ );
13752
+ }
13753
+ }
13754
+ let solderPasteMargin;
13755
+ if (preserveSolderPaste && elm.type === "pcb_smtpad" && !circuitJson.some(
13756
+ (paste) => paste.type === "pcb_solder_paste" && paste.pcb_smtpad_id === elm.pcb_smtpad_id
13757
+ )) {
13758
+ if (elm.shape === "circle") {
13759
+ solderPasteMargin = -elm.radius;
13760
+ } else if (elm.shape !== "polygon") {
13761
+ solderPasteMargin = -Math.min(elm.width, elm.height) / 2;
13762
+ }
13763
+ }
13764
+ if (isStandalonePcbSolderPaste(elm)) {
13765
+ components.push(SolderPaste.fromCircuitJson(elm));
13766
+ } else if (elm.type === "pcb_soldermask_opening") {
13767
+ let openingProps;
13768
+ if (elm.shape === "polygon") {
13769
+ openingProps = {
13770
+ shape: "polygon",
13771
+ layer: elm.layer,
13772
+ points: elm.points
13773
+ };
13774
+ } else if (elm.shape === "circle") {
13775
+ openingProps = {
13776
+ shape: "circle",
13777
+ layer: elm.layer,
13778
+ pcbX: elm.x,
13779
+ pcbY: elm.y,
13780
+ radius: elm.radius
13781
+ };
13782
+ } else {
13783
+ let pcbRotation = 0;
13784
+ if (elm.shape === "rotated_rect") {
13785
+ pcbRotation = elm.ccw_rotation;
13786
+ }
13787
+ openingProps = {
13788
+ shape: "rect",
13789
+ layer: elm.layer,
13790
+ pcbX: elm.x,
13791
+ pcbY: elm.y,
13792
+ width: elm.width,
13793
+ height: elm.height,
13794
+ pcbRotation
13795
+ };
13796
+ }
13797
+ components.push(new PcbSoldermaskOpening(openingProps));
13624
13798
  } else if (elm.type === "pcb_smtpad" && elm.shape === "rect") {
13625
13799
  components.push(
13626
13800
  new SmtPad({
@@ -13631,7 +13805,8 @@ var createComponentsFromCircuitJson = ({
13631
13805
  height: elm.height,
13632
13806
  width: elm.width,
13633
13807
  portHints: resolvedPortHints,
13634
- rectBorderRadius: elm.rect_border_radius
13808
+ rectBorderRadius: elm.rect_border_radius,
13809
+ solderPasteMargin
13635
13810
  })
13636
13811
  );
13637
13812
  } else if (elm.type === "pcb_smtpad" && elm.shape === "circle") {
@@ -13642,7 +13817,8 @@ var createComponentsFromCircuitJson = ({
13642
13817
  layer: elm.layer,
13643
13818
  shape: "circle",
13644
13819
  radius: elm.radius,
13645
- portHints: resolvedPortHints
13820
+ portHints: resolvedPortHints,
13821
+ solderPasteMargin
13646
13822
  })
13647
13823
  );
13648
13824
  } else if (elm.type === "pcb_smtpad" && elm.shape === "pill") {
@@ -13655,7 +13831,8 @@ var createComponentsFromCircuitJson = ({
13655
13831
  portHints: resolvedPortHints,
13656
13832
  pcbX: elm.x,
13657
13833
  pcbY: elm.y,
13658
- layer: elm.layer
13834
+ layer: elm.layer,
13835
+ solderPasteMargin
13659
13836
  })
13660
13837
  );
13661
13838
  } else if (elm.type === "pcb_smtpad" && elm.shape === "rotated_pill") {
@@ -13669,7 +13846,8 @@ var createComponentsFromCircuitJson = ({
13669
13846
  pcbX: elm.x,
13670
13847
  pcbY: elm.y,
13671
13848
  layer: elm.layer,
13672
- ccwRotation: elm.ccw_rotation
13849
+ ccwRotation: elm.ccw_rotation,
13850
+ solderPasteMargin
13673
13851
  })
13674
13852
  );
13675
13853
  } else if (elm.type === "pcb_smtpad" && elm.shape === "rotated_rect") {
@@ -13683,7 +13861,8 @@ var createComponentsFromCircuitJson = ({
13683
13861
  width: elm.width,
13684
13862
  ccwRotation: elm.ccw_rotation,
13685
13863
  cornerRadius: elm.corner_radius,
13686
- portHints: resolvedPortHints
13864
+ portHints: resolvedPortHints,
13865
+ solderPasteMargin
13687
13866
  })
13688
13867
  );
13689
13868
  } else if (elm.type === "pcb_smtpad" && elm.shape === "polygon") {
@@ -13938,15 +14117,18 @@ var createComponentsFromCircuitJson = ({
13938
14117
  })
13939
14118
  );
13940
14119
  } else {
14120
+ let text = componentName || elm.text;
14121
+ if (footprinterString?.includes("silkscreenlabel(") && elm.text !== "{REF}" && elm.text !== "{NAME}" && elm.text !== "{REFERENCE}") {
14122
+ text = elm.text;
14123
+ }
14124
+ let pcbX = elm.anchor_position.x;
14125
+ if (Number.isNaN(pcbX)) {
14126
+ pcbX = 0;
14127
+ }
13941
14128
  const silkscreenText = new SilkscreenText({
13942
14129
  anchorAlignment: elm.anchor_alignment || "center",
13943
- // Footprinter-generated reference text is a placeholder that should
13944
- // resolve to the component name. A literal from the explicit
13945
- // `silkscreenlabel(...)` footprint option is an intentional custom
13946
- // label (for example a module name) and must be preserved. Other
13947
- // imported footprint text keeps the legacy component-name fallback.
13948
- text: footprinterString?.includes("silkscreenlabel(") && elm.text !== "{REF}" && elm.text !== "{NAME}" && elm.text !== "{REFERENCE}" ? elm.text : componentName || elm.text,
13949
- pcbX: Number.isNaN(elm.anchor_position.x) ? 0 : elm.anchor_position.x,
14130
+ text,
14131
+ pcbX,
13950
14132
  pcbY: elm.anchor_position.y,
13951
14133
  pcbRotation: ccwRotation ?? 0
13952
14134
  });
@@ -14212,7 +14394,10 @@ var createComponentsFromCircuitJson = ({
14212
14394
  if (typeof schematicComponentId !== "string") continue;
14213
14395
  const schematicComponent = schematicComponentsByImportedId.get(schematicComponentId);
14214
14396
  const schematicSymbolId = schematicComponent?.schematic_symbol_id;
14215
- const parentSymbol = typeof schematicSymbolId === "string" ? schematicSymbolsByImportedId.get(schematicSymbolId) : void 0;
14397
+ let parentSymbol;
14398
+ if (typeof schematicSymbolId === "string") {
14399
+ parentSymbol = schematicSymbolsByImportedId.get(schematicSymbolId);
14400
+ }
14216
14401
  if (parentSymbol && schematicComponent?.is_box_with_pins === true && elm.center && elm.side_of_component) {
14217
14402
  const distance27 = elm.distance_from_component_edge;
14218
14403
  const facingDirection = getFacingDirectionFromSide(
@@ -14220,7 +14405,10 @@ var createComponentsFromCircuitJson = ({
14220
14405
  );
14221
14406
  if (!facingDirection) continue;
14222
14407
  const directionVector = getUnitVectorFromDirection2(facingDirection);
14223
- const stemDirection = elm.facing_direction === facingDirection ? 1 : -1;
14408
+ let stemDirection = -1;
14409
+ if (elm.facing_direction === facingDirection) {
14410
+ stemDirection = 1;
14411
+ }
14224
14412
  const portCenter = {
14225
14413
  x: elm.center.x + directionVector.x * distance27 * stemDirection,
14226
14414
  y: elm.center.y + directionVector.y * distance27 * stemDirection
@@ -14237,7 +14425,10 @@ var createComponentsFromCircuitJson = ({
14237
14425
  )
14238
14426
  )
14239
14427
  );
14240
- const fallbackPortName = elm.pin_number ? `pin${elm.pin_number}` : elm.schematic_port_id;
14428
+ let fallbackPortName = elm.schematic_port_id;
14429
+ if (elm.pin_number) {
14430
+ fallbackPortName = `pin${elm.pin_number}`;
14431
+ }
14241
14432
  const portName = aliases[0] ?? elm.source_port_id ?? fallbackPortName;
14242
14433
  parentSymbol.add(
14243
14434
  new Port({
@@ -14249,15 +14440,19 @@ var createComponentsFromCircuitJson = ({
14249
14440
  direction: facingDirection
14250
14441
  })
14251
14442
  );
14443
+ let strokeWidth;
14444
+ if (typeof schematicSymbolId === "string") {
14445
+ strokeWidth = optional(
14446
+ schematicStrokeWidthBySymbolId.get(schematicSymbolId)
14447
+ );
14448
+ }
14252
14449
  parentSymbol.add(
14253
14450
  new SchematicLine({
14254
14451
  x1: elm.center.x,
14255
14452
  y1: elm.center.y,
14256
14453
  x2: portCenter.x,
14257
14454
  y2: portCenter.y,
14258
- strokeWidth: typeof schematicSymbolId === "string" ? optional(
14259
- schematicStrokeWidthBySymbolId.get(schematicSymbolId)
14260
- ) : void 0,
14455
+ strokeWidth,
14261
14456
  isDashed: false
14262
14457
  })
14263
14458
  );
@@ -14268,7 +14463,7 @@ var createComponentsFromCircuitJson = ({
14268
14463
  };
14269
14464
 
14270
14465
  // lib/utils/get-bounds-of-pcb-components.ts
14271
- import { applyToPoint as applyToPoint28 } from "transformation-matrix";
14466
+ import { applyToPoint as applyToPoint29 } from "transformation-matrix";
14272
14467
  var NON_PHYSICAL_PCB_PRIMITIVE_PREFIXES = [
14273
14468
  "Silkscreen",
14274
14469
  "PcbNote",
@@ -14293,7 +14488,7 @@ function getBoundsOfPcbComponents(components) {
14293
14488
  { x: localBounds.left, y: localBounds.top }
14294
14489
  ];
14295
14490
  const boardWorldCorners = footprintLocalCorners.map(
14296
- (corner) => applyToPoint28(child._computePcbGlobalTransformBeforeLayout(), corner)
14491
+ (corner) => applyToPoint29(child._computePcbGlobalTransformBeforeLayout(), corner)
14297
14492
  );
14298
14493
  const cornerXs = boardWorldCorners.map((corner) => corner.x);
14299
14494
  const cornerYs = boardWorldCorners.map((corner) => corner.y);
@@ -14986,7 +15181,7 @@ import {
14986
15181
  isValidElement
14987
15182
  } from "react";
14988
15183
  import { symbols as symbols2 } from "schematic-symbols";
14989
- import { decomposeTSR as decomposeTSR10 } from "transformation-matrix";
15184
+ import { decomposeTSR as decomposeTSR11 } from "transformation-matrix";
14990
15185
  import { z as z10 } from "zod";
14991
15186
 
14992
15187
  // lib/components/primitive-components/CadAssembly.ts
@@ -15477,7 +15672,7 @@ var constructAssetUrl = (targetUrl, baseUrl) => {
15477
15672
  };
15478
15673
 
15479
15674
  // lib/components/primitive-components/CadModel.ts
15480
- import { decomposeTSR as decomposeTSR9 } from "transformation-matrix";
15675
+ import { decomposeTSR as decomposeTSR10 } from "transformation-matrix";
15481
15676
  import { z as z9 } from "zod";
15482
15677
 
15483
15678
  // lib/components/base-components/NormalComponent/utils/getFileExtension.ts
@@ -15536,7 +15731,7 @@ var getAssemblyEulerAngles = (transform) => {
15536
15731
 
15537
15732
  // lib/components/primitive-components/render-assembly-cad-model.ts
15538
15733
  import {
15539
- applyToPoint as applyToPoint29,
15734
+ applyToPoint as applyToPoint30,
15540
15735
  compose as compose8,
15541
15736
  flipY as flipY4,
15542
15737
  identity as identity8,
@@ -15552,7 +15747,7 @@ var renderAssemblyCadModel = (owner, model, placement) => {
15552
15747
  rotate3(placement.pcbRotation * Math.PI / 180),
15553
15748
  bottom ? flipY4() : identity8()
15554
15749
  );
15555
- const xy2 = applyToPoint29(transform, offset);
15750
+ const xy2 = applyToPoint30(transform, offset);
15556
15751
  const authoredRotation = base.pcbRotationOffset ?? base.rotationOffset ?? 0;
15557
15752
  const rotationOffset = typeof authoredRotation === "number" ? { x: 0, y: 0, z: authoredRotation } : {
15558
15753
  x: rotation.parse(authoredRotation.x),
@@ -15671,7 +15866,7 @@ var CadModel = class extends PrimitiveComponent2 {
15671
15866
  if (!props || typeof props.modelUrl !== "string" && typeof props.stepUrl !== "string")
15672
15867
  return;
15673
15868
  const parentTransform = parent._computePcbGlobalTransformBeforeLayout();
15674
- const decomposedTransform = decomposeTSR9(parentTransform);
15869
+ const decomposedTransform = decomposeTSR10(parentTransform);
15675
15870
  const accumulatedRotation = decomposedTransform.rotation.angle * 180 / Math.PI;
15676
15871
  const sourceRotationOffset = props.pcbRotationOffset ?? props.rotationOffset;
15677
15872
  const rotationOffset = rotation3.parse({ x: 0, y: 0, z: 0 });
@@ -18613,7 +18808,7 @@ var NormalComponent = class extends PrimitiveComponent2 {
18613
18808
  }
18614
18809
  getGlobalTransformRotation() {
18615
18810
  const globalTransform = this._computePcbGlobalTransformBeforeLayout();
18616
- const decomposedTransform = decomposeTSR10(globalTransform);
18811
+ const decomposedTransform = decomposeTSR11(globalTransform);
18617
18812
  return decomposedTransform.rotation.angle * 180 / Math.PI;
18618
18813
  }
18619
18814
  _footprintChildCache;
@@ -19173,7 +19368,7 @@ var NormalComponent = class extends PrimitiveComponent2 {
19173
19368
  const computedLayer = this.props.layer === "bottom" ? "bottom" : "top";
19174
19369
  const pcbComponent = db2.pcb_component.get(this.pcb_component_id);
19175
19370
  const globalTransform = this._computePcbGlobalTransformBeforeLayout();
19176
- const decomposedTransform = decomposeTSR10(globalTransform);
19371
+ const decomposedTransform = decomposeTSR11(globalTransform);
19177
19372
  const preLayoutRotation = decomposedTransform.rotation.angle * 180 / Math.PI;
19178
19373
  const totalRotation = pcbComponent?.position_mode === "packed" ? pcbComponent.rotation ?? preLayoutRotation : preLayoutRotation;
19179
19374
  const isBottomLayer = computedLayer === "bottom";
@@ -19661,7 +19856,7 @@ import { formatSiUnit } from "format-si-unit";
19661
19856
  import { symbols as symbols3 } from "schematic-symbols";
19662
19857
 
19663
19858
  // lib/components/normal-components/Capacitor_addPolarityFabricationSymbols.ts
19664
- import { applyToPoint as applyToPoint30, compose as compose9, rotate as rotate4, translate as translate7 } from "transformation-matrix";
19859
+ import { applyToPoint as applyToPoint31, compose as compose9, rotate as rotate4, translate as translate7 } from "transformation-matrix";
19665
19860
  var generatedPaths = /* @__PURE__ */ new WeakMap();
19666
19861
  var getPolarity = (port) => {
19667
19862
  const hints = [port.name, ...port.port_hints ?? []].map(
@@ -19707,7 +19902,7 @@ var Capacitor_addPolarityFabricationSymbols = (capacitor) => {
19707
19902
  translate7((positive.x + negative.x) / 2, (positive.y + negative.y) / 2),
19708
19903
  rotate4(Math.atan2(negative.y - positive.y, negative.x - positive.x))
19709
19904
  );
19710
- const point6 = (x2, y2) => applyToPoint30(frame, { x: x2, y: y2 });
19905
+ const point6 = (x2, y2) => applyToPoint31(frame, { x: x2, y: y2 });
19711
19906
  const offset = distance27 / 4;
19712
19907
  const halfSize = Math.min(distance27 * 0.12, 0.3);
19713
19908
  const routes = [
@@ -19879,7 +20074,7 @@ var extractPcbPrimitivesFromCircuitJson = ({
19879
20074
  clonedRelativeElements,
19880
20075
  absoluteToComponentRelativeTransform
19881
20076
  );
19882
- const components = createComponentsFromCircuitJson(
20077
+ return createComponentsFromCircuitJson(
19883
20078
  {
19884
20079
  componentName,
19885
20080
  componentRotation: "0deg",
@@ -19888,7 +20083,6 @@ var extractPcbPrimitivesFromCircuitJson = ({
19888
20083
  },
19889
20084
  clonedRelativeElements
19890
20085
  );
19891
- return components;
19892
20086
  };
19893
20087
 
19894
20088
  // lib/components/primitive-components/Group/Subcircuit/inflators/inflateFootprintComponent.ts
@@ -21408,7 +21602,7 @@ function inflateSourceFiducial(sourceElm, inflatorContext) {
21408
21602
 
21409
21603
  // lib/components/primitive-components/Group/get-autorouting-phase-pcb-trace-paths.ts
21410
21604
  import { fanoutTracePath as fanoutTracePath2 } from "@tscircuit/props";
21411
- import { applyToPoint as applyToPoint32, inverse as inverse2 } from "transformation-matrix";
21605
+ import { applyToPoint as applyToPoint33, inverse as inverse2 } from "transformation-matrix";
21412
21606
 
21413
21607
  // lib/components/primitive-components/Group/get-saved-pcb-trace-path-transform.ts
21414
21608
  import { compose as compose11, translate as translate9 } from "transformation-matrix";
@@ -21422,7 +21616,7 @@ function getSavedPcbTracePathTransform(group, port) {
21422
21616
  }
21423
21617
 
21424
21618
  // lib/components/primitive-components/Group/get-saved-autorouting-phase-traces.ts
21425
- import { applyToPoint as applyToPoint31 } from "transformation-matrix";
21619
+ import { applyToPoint as applyToPoint32 } from "transformation-matrix";
21426
21620
  import "@tscircuit/props";
21427
21621
  var touchesEndpoint = ({
21428
21622
  point: point6,
@@ -21489,7 +21683,7 @@ function getSavedAutoroutingPhaseTracesFromPaths({
21489
21683
  const transform = getSavedPcbTracePathTransform(group, port);
21490
21684
  const route = resolveSavedTraceRouteWidths(path.route).map((point6) => ({
21491
21685
  ...point6,
21492
- ...applyToPoint31(transform, point6)
21686
+ ...applyToPoint32(transform, point6)
21493
21687
  }));
21494
21688
  for (const point6 of route) {
21495
21689
  const layers = point6.route_type === "wire" ? [point6.layer] : [point6.from_layer, point6.to_layer];
@@ -21702,7 +21896,7 @@ function getAutoroutingPhasePcbTracePaths({
21702
21896
  connection: selector,
21703
21897
  route: route.map((point6) => ({
21704
21898
  ...point6,
21705
- ...applyToPoint32(transform, point6)
21899
+ ...applyToPoint33(transform, point6)
21706
21900
  }))
21707
21901
  })
21708
21902
  );
@@ -84099,7 +84293,7 @@ import {
84099
84293
  midpoint,
84100
84294
  pointToSegmentClosestPoint as pointToSegmentClosestPoint2
84101
84295
  } from "@tscircuit/math-utils";
84102
- import { applyToPoint as applyToPoint34, compose as compose13, scale as scale3, translate as translate11 } from "transformation-matrix";
84296
+ import { applyToPoint as applyToPoint35, compose as compose13, scale as scale3, translate as translate11 } from "transformation-matrix";
84103
84297
 
84104
84298
  // node_modules/@tscircuit/implicit-copper-pour-solver/lib/geometry.ts
84105
84299
  import {
@@ -84115,7 +84309,7 @@ import {
84115
84309
  segmentToSegmentMinDistance
84116
84310
  } from "@tscircuit/math-utils";
84117
84311
  import {
84118
- applyToPoint as applyToPoint33,
84312
+ applyToPoint as applyToPoint34,
84119
84313
  compose as compose12,
84120
84314
  rotateDEG as rotateDEG2,
84121
84315
  translate as translate10
@@ -84169,7 +84363,7 @@ var distanceToPrimitive = (primitive, px2, py2) => {
84169
84363
  return distanceToPolygon(point6, primitive.points);
84170
84364
  }
84171
84365
  const { toLocal } = getRectTransforms(primitive);
84172
- return pointToBoxDistance(applyToPoint33(toLocal, point6), {
84366
+ return pointToBoxDistance(applyToPoint34(toLocal, point6), {
84173
84367
  center: { x: 0, y: 0 },
84174
84368
  width: primitive.halfWidth * 2,
84175
84369
  height: primitive.halfHeight * 2
@@ -84213,8 +84407,8 @@ var getClosestPointOnPrimitive = (primitive, point6) => {
84213
84407
  return closestPoint;
84214
84408
  }
84215
84409
  const { toLocal, toWorld } = getRectTransforms(primitive);
84216
- const localPoint = applyToPoint33(toLocal, point6);
84217
- return applyToPoint33(toWorld, {
84410
+ const localPoint = applyToPoint34(toLocal, point6);
84411
+ return applyToPoint34(toWorld, {
84218
84412
  x: clamp(localPoint.x, -primitive.halfWidth, primitive.halfWidth),
84219
84413
  y: clamp(localPoint.y, -primitive.halfHeight, primitive.halfHeight)
84220
84414
  });
@@ -84825,7 +85019,7 @@ var buildPowerPourPolygons = (problem) => {
84825
85019
  }
84826
85020
  const loop = loops[0];
84827
85021
  const points = loop.map(([i2, j2]) => {
84828
- const point6 = applyToPoint34(gridVertexToWorld, { x: i2, y: j2 });
85022
+ const point6 = applyToPoint35(gridVertexToWorld, { x: i2, y: j2 });
84829
85023
  return {
84830
85024
  x: clamp2(point6.x, problem.bounds.minX, problem.bounds.maxX),
84831
85025
  y: clamp2(point6.y, problem.bounds.minY, problem.bounds.maxY)
@@ -110318,7 +110512,7 @@ import "zod";
110318
110512
 
110319
110513
  // lib/components/primitive-components/TraceHint.ts
110320
110514
  import { traceHintProps } from "@tscircuit/props";
110321
- import { applyToPoint as applyToPoint35 } from "transformation-matrix";
110515
+ import { applyToPoint as applyToPoint36 } from "transformation-matrix";
110322
110516
  var TraceHint = class extends PrimitiveComponent2 {
110323
110517
  matchedPort = null;
110324
110518
  get config() {
@@ -110358,7 +110552,7 @@ var TraceHint = class extends PrimitiveComponent2 {
110358
110552
  const globalTransform = this._computePcbGlobalTransformBeforeLayout();
110359
110553
  return offsets.map(
110360
110554
  (offset) => ({
110361
- ...applyToPoint35(globalTransform, offset),
110555
+ ...applyToPoint36(globalTransform, offset),
110362
110556
  via: offset.via,
110363
110557
  to_layer: offset.to_layer,
110364
110558
  trace_width: offset.trace_width
@@ -114365,7 +114559,7 @@ import Debug13 from "debug";
114365
114559
  // lib/components/primitive-components/NetLabel.ts
114366
114560
  import { netLabelProps } from "@tscircuit/props";
114367
114561
  import {
114368
- applyToPoint as applyToPoint36,
114562
+ applyToPoint as applyToPoint37,
114369
114563
  identity as identity9,
114370
114564
  translate as translate15
114371
114565
  } from "transformation-matrix";
@@ -114430,7 +114624,7 @@ var NetLabel = class extends PrimitiveComponent2 {
114430
114624
  const connectedPorts = this._getConnectedPorts();
114431
114625
  if (connectedPorts.length > 0) {
114432
114626
  const portPos = connectedPorts[0]._getGlobalSchematicPositionBeforeLayout();
114433
- const parentCenter = applyToPoint36(
114627
+ const parentCenter = applyToPoint37(
114434
114628
  this.parent?.computeSchematicGlobalTransform?.() ?? identity9(),
114435
114629
  { x: 0, y: 0 }
114436
114630
  );
@@ -118090,7 +118284,7 @@ var Group_getFanoutPourNetMap = (group, routingPhasePlans) => {
118090
118284
  import { getBoundsFromPoints as getBoundsFromPoints11 } from "@tscircuit/math-utils";
118091
118285
 
118092
118286
  // lib/components/primitive-components/Breakout/get-saved-fanout-traces.ts
118093
- import { applyToPoint as applyToPoint37, compose as compose16, translate as translate16 } from "transformation-matrix";
118287
+ import { applyToPoint as applyToPoint38, compose as compose16, translate as translate16 } from "transformation-matrix";
118094
118288
 
118095
118289
  // lib/components/primitive-components/BreakoutPoint.ts
118096
118290
  import { breakoutPointProps } from "@tscircuit/props";
@@ -118258,9 +118452,9 @@ function getSavedFanoutTraces(breakout, input) {
118258
118452
  exit._computePcbGlobalTransformBeforeLayout(),
118259
118453
  translate16(-localExit.x, -localExit.y)
118260
118454
  );
118261
- const originalExit = applyToPoint37(transform, localExit);
118455
+ const originalExit = applyToPoint38(transform, localExit);
118262
118456
  const route = resolveSavedTraceRouteWidths(path.route).map((point6) => {
118263
- const position = applyToPoint37(transform, point6);
118457
+ const position = applyToPoint38(transform, point6);
118264
118458
  return {
118265
118459
  ...point6,
118266
118460
  x: position.x + pcbExit.x - originalExit.x,
@@ -118788,7 +118982,7 @@ var RoutingPhasePreparationError = class extends Error {
118788
118982
  var package_default = {
118789
118983
  name: "@tscircuit/core",
118790
118984
  type: "module",
118791
- version: "0.0.2148",
118985
+ version: "0.0.2150",
118792
118986
  types: "dist/index.d.ts",
118793
118987
  main: "dist/index.js",
118794
118988
  module: "dist/index.js",
@@ -118825,9 +119019,9 @@ var package_default = {
118825
119019
  "@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39",
118826
119020
  "@tscircuit/bus-lanes-solver": "https://jscdn.tscircuit.com/@tscircuit/bus-lanes-solver/0.0.21.tgz",
118827
119021
  "@tscircuit/cableprinter": "^0.0.6",
118828
- "@tscircuit/capacity-autorouter": "^0.0.974",
119022
+ "@tscircuit/capacity-autorouter": "^0.0.982",
118829
119023
  "@tscircuit/checks": "^0.0.253",
118830
- "@tscircuit/circuit-json-util": "^0.0.121",
119024
+ "@tscircuit/circuit-json-util": "^0.0.122",
118831
119025
  "@tscircuit/common": "^0.0.20",
118832
119026
  "@tscircuit/copper-pour-solver": "^0.0.67",
118833
119027
  "@tscircuit/create-fdm-enclosure": "0.0.4",
@@ -118930,7 +119124,7 @@ var package_default = {
118930
119124
  "jscad-fiber": "^0.0.88"
118931
119125
  },
118932
119126
  overrides: {
118933
- "@tscircuit/circuit-json-util": "^0.0.121",
119127
+ "@tscircuit/circuit-json-util": "^0.0.122",
118934
119128
  "@tscircuit/props": "^0.0.701",
118935
119129
  "circuit-json": "^0.0.525",
118936
119130
  "@tscircuit/cableprinter": "^0.0.6"
@@ -122197,7 +122391,7 @@ import { symbols as symbols7 } from "schematic-symbols";
122197
122391
  import { ledProps, resolveManufacturerPartNumber as resolveManufacturerPartNumber9 } from "@tscircuit/props";
122198
122392
 
122199
122393
  // lib/components/normal-components/Led_addPolarityFabricationSymbol.ts
122200
- import { applyToPoint as applyToPoint38, compose as compose17, rotate as rotate7, translate as translate17 } from "transformation-matrix";
122394
+ import { applyToPoint as applyToPoint39, compose as compose17, rotate as rotate7, translate as translate17 } from "transformation-matrix";
122201
122395
  var generatedNotes = /* @__PURE__ */ new WeakMap();
122202
122396
  var getPolarity2 = (port) => {
122203
122397
  const hints = [port.name, ...port.port_hints ?? []].map(
@@ -122242,7 +122436,7 @@ var Led_addPolarityFabricationSymbol = (led) => {
122242
122436
  translate17((a2.x + k2.x) / 2, (a2.y + k2.y) / 2),
122243
122437
  rotate7(angle)
122244
122438
  );
122245
- const point6 = (x2, y2) => applyToPoint38(frame, { x: x2, y: y2 });
122439
+ const point6 = (x2, y2) => applyToPoint39(frame, { x: x2, y: y2 });
122246
122440
  const common = {
122247
122441
  pcb_component_id: pcb.pcb_component_id,
122248
122442
  subcircuit_id: led.getSubcircuit()?.subcircuit_id ?? void 0,
@@ -123169,7 +123363,8 @@ function inflateStandalonePcbPrimitives(inflatorContext) {
123169
123363
  "pcb_hole",
123170
123364
  "pcb_plated_hole",
123171
123365
  "pcb_cutout",
123172
- "pcb_soldermask_opening"
123366
+ "pcb_soldermask_opening",
123367
+ "pcb_solder_paste"
123173
123368
  ];
123174
123369
  const standalonePrimitives = injectionDb.toArray().filter((elm) => {
123175
123370
  if (!standalonePrimitiveTypes.includes(elm.type)) return false;
@@ -123185,6 +123380,9 @@ function inflateStandalonePcbPrimitives(inflatorContext) {
123185
123380
  if (elm.type === "pcb_cutout") {
123186
123381
  return true;
123187
123382
  }
123383
+ if (elm.type === "pcb_solder_paste") {
123384
+ return elm.pcb_component_id === void 0 && !elm.pcb_smtpad_id;
123385
+ }
123188
123386
  if (elm.type === "pcb_soldermask_opening") {
123189
123387
  return elm.pcb_component_id === void 0;
123190
123388
  }
@@ -127513,10 +127711,10 @@ var AutoroutingPhase = class extends PrimitiveComponent2 {
127513
127711
 
127514
127712
  // lib/components/primitive-components/FabricationNoteDimension.ts
127515
127713
  import { fabricationNoteDimensionProps } from "@tscircuit/props";
127516
- import { applyToPoint as applyToPoint40 } from "transformation-matrix";
127714
+ import { applyToPoint as applyToPoint41 } from "transformation-matrix";
127517
127715
 
127518
127716
  // lib/utils/pcb/resolve-pcb-dimension-offset-direction.ts
127519
- import { applyToPoint as applyToPoint39 } from "transformation-matrix";
127717
+ import { applyToPoint as applyToPoint40 } from "transformation-matrix";
127520
127718
  var resolvePcbDimensionOffsetDirection = ({
127521
127719
  from,
127522
127720
  offset,
@@ -127525,7 +127723,7 @@ var resolvePcbDimensionOffsetDirection = ({
127525
127723
  transform
127526
127724
  }) => {
127527
127725
  if (offsetDirection) {
127528
- return applyToPoint39({ ...transform, e: 0, f: 0 }, offsetDirection);
127726
+ return applyToPoint40({ ...transform, e: 0, f: 0 }, offsetDirection);
127529
127727
  }
127530
127728
  const dx2 = to.x - from.x;
127531
127729
  const dy2 = to.y - from.y;
@@ -127553,13 +127751,13 @@ var FabricationNoteDimension = class extends PrimitiveComponent2 {
127553
127751
  this.renderError(
127554
127752
  `FabricationNoteDimension could not find selector "${input}"`
127555
127753
  );
127556
- return applyToPoint40(transform, { x: 0, y: 0 });
127754
+ return applyToPoint41(transform, { x: 0, y: 0 });
127557
127755
  }
127558
127756
  return target._getGlobalPcbPositionBeforeLayout();
127559
127757
  }
127560
127758
  const numericX = typeof input.x === "string" ? parseFloat(input.x) : input.x;
127561
127759
  const numericY = typeof input.y === "string" ? parseFloat(input.y) : input.y;
127562
- return applyToPoint40(transform, { x: numericX, y: numericY });
127760
+ return applyToPoint41(transform, { x: numericX, y: numericY });
127563
127761
  }
127564
127762
  doInitialPcbPrimitiveRender() {
127565
127763
  if (this.root?.pcbDisabled) return;
@@ -127663,7 +127861,7 @@ var FabricationNoteDimension = class extends PrimitiveComponent2 {
127663
127861
 
127664
127862
  // lib/components/primitive-components/PcbNoteDimension.ts
127665
127863
  import { pcbNoteDimensionProps } from "@tscircuit/props";
127666
- import { applyToPoint as applyToPoint41 } from "transformation-matrix";
127864
+ import { applyToPoint as applyToPoint42 } from "transformation-matrix";
127667
127865
  var PcbNoteDimension = class extends PrimitiveComponent2 {
127668
127866
  pcb_note_dimension_id = null;
127669
127867
  isPcbPrimitive = true;
@@ -127680,7 +127878,7 @@ var PcbNoteDimension = class extends PrimitiveComponent2 {
127680
127878
  );
127681
127879
  if (!target) {
127682
127880
  this.renderError(`PcbNoteDimension could not find selector "${input}"`);
127683
- return applyToPoint41(transform, { x: 0, y: 0 });
127881
+ return applyToPoint42(transform, { x: 0, y: 0 });
127684
127882
  }
127685
127883
  const targetPcbComponentId = target.pcb_component_id;
127686
127884
  const root = this.root;
@@ -127697,7 +127895,7 @@ var PcbNoteDimension = class extends PrimitiveComponent2 {
127697
127895
  }
127698
127896
  const numericX = typeof input.x === "string" ? parseFloat(input.x) : input.x;
127699
127897
  const numericY = typeof input.y === "string" ? parseFloat(input.y) : input.y;
127700
- return applyToPoint41(transform, { x: numericX, y: numericY });
127898
+ return applyToPoint42(transform, { x: numericX, y: numericY });
127701
127899
  }
127702
127900
  doInitialPcbPrimitiveRender() {
127703
127901
  if (this.root?.pcbDisabled) return;
@@ -130475,7 +130673,7 @@ import {
130475
130673
  getTransformedSvgPathRoutes,
130476
130674
  loadImageSource
130477
130675
  } from "@tscircuit/image-utils";
130478
- import { applyToPoint as applyToPoint42 } from "transformation-matrix";
130676
+ import { applyToPoint as applyToPoint43 } from "transformation-matrix";
130479
130677
  var SilkscreenGraphic = class extends PrimitiveComponent2 {
130480
130678
  pcb_silkscreen_graphic_id = null;
130481
130679
  pcb_silkscreen_graphic_ids = [];
@@ -130577,7 +130775,7 @@ var SilkscreenGraphic = class extends PrimitiveComponent2 {
130577
130775
  { x: halfWidth, y: -halfHeight },
130578
130776
  { x: -halfWidth, y: -halfHeight }
130579
130777
  ]).map(
130580
- (point6) => applyToPoint42(transform, point6)
130778
+ (point6) => applyToPoint43(transform, point6)
130581
130779
  )
130582
130780
  },
130583
130781
  inner_rings: []
@@ -134230,7 +134428,7 @@ var SpiceModel = class extends PrimitiveComponent2 {
134230
134428
 
134231
134429
  // lib/components/primitive-components/PcbBend.ts
134232
134430
  import { pcbBendProps } from "@tscircuit/props";
134233
- import { applyToPoint as applyToPoint43 } from "transformation-matrix";
134431
+ import { applyToPoint as applyToPoint44 } from "transformation-matrix";
134234
134432
 
134235
134433
  // lib/components/primitive-components/getPcbFlexBoardTransform.ts
134236
134434
  import { compose as compose20, translate as translate20 } from "transformation-matrix";
@@ -134264,8 +134462,8 @@ var PcbBend = class extends PrimitiveComponent2 {
134264
134462
  pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0,
134265
134463
  subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
134266
134464
  name: props.name,
134267
- start: applyToPoint43(transform, { x: props.x1, y: props.y1 }),
134268
- end: applyToPoint43(transform, { x: props.x2, y: props.y2 }),
134465
+ start: applyToPoint44(transform, { x: props.x1, y: props.y1 }),
134466
+ end: applyToPoint44(transform, { x: props.x2, y: props.y2 }),
134269
134467
  bend_angle: props.bendAngle,
134270
134468
  bend_radius: props.bendRadius,
134271
134469
  bend_side: props.bendSide
@@ -134301,7 +134499,7 @@ var PcbBend = class extends PrimitiveComponent2 {
134301
134499
 
134302
134500
  // lib/components/primitive-components/PcbStiffener.ts
134303
134501
  import { pcbStiffenerProps } from "@tscircuit/props";
134304
- import { applyToPoint as applyToPoint44, decomposeTSR as decomposeTSR11 } from "transformation-matrix";
134502
+ import { applyToPoint as applyToPoint45, decomposeTSR as decomposeTSR12 } from "transformation-matrix";
134305
134503
  var PcbStiffener = class extends PrimitiveComponent2 {
134306
134504
  pcb_stiffener_id = null;
134307
134505
  get config() {
@@ -134324,14 +134522,14 @@ var PcbStiffener = class extends PrimitiveComponent2 {
134324
134522
  };
134325
134523
  const geometry = props.shape === "rect" ? {
134326
134524
  shape: "rect",
134327
- center: applyToPoint44(transform, { x: 0, y: 0 }),
134328
- rotation: decomposeTSR11(transform).rotation.angle * 180 / Math.PI,
134525
+ center: applyToPoint45(transform, { x: 0, y: 0 }),
134526
+ rotation: decomposeTSR12(transform).rotation.angle * 180 / Math.PI,
134329
134527
  width: props.width,
134330
134528
  height: props.height
134331
134529
  } : {
134332
134530
  shape: "polygon",
134333
134531
  outline: props.outline.map(
134334
- (point6) => applyToPoint44(transform, point6)
134532
+ (point6) => applyToPoint45(transform, point6)
134335
134533
  )
134336
134534
  };
134337
134535
  this.pcb_stiffener_id = db2.pcb_stiffener.insert({
@@ -135676,6 +135874,7 @@ export {
135676
135874
  SilkscreenText,
135677
135875
  SmtPad,
135678
135876
  SolderJumper,
135877
+ SolderPaste,
135679
135878
  SpiceModel,
135680
135879
  Subcircuit,
135681
135880
  Subpanel,