@tscircuit/core 0.0.1084 → 0.0.1086

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 +28 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7826,6 +7826,12 @@ function isValidPinLabel(pin, label) {
7826
7826
  }
7827
7827
 
7828
7828
  // lib/utils/get-bounds-of-pcb-components.ts
7829
+ var NON_PHYSICAL_PCB_PRIMITIVE_PREFIXES = [
7830
+ "Silkscreen",
7831
+ "PcbNote",
7832
+ "Courtyard",
7833
+ "FabricationNote"
7834
+ ];
7829
7835
  function getBoundsOfPcbComponents(components) {
7830
7836
  let minX = Infinity;
7831
7837
  let minY = Infinity;
@@ -7833,7 +7839,9 @@ function getBoundsOfPcbComponents(components) {
7833
7839
  let maxY = -Infinity;
7834
7840
  let hasValidComponents = false;
7835
7841
  for (const child of components) {
7836
- if (child.isPcbPrimitive && !child.componentName.startsWith("Silkscreen") && !child.componentName.startsWith("PcbNote")) {
7842
+ if (child.isPcbPrimitive && !NON_PHYSICAL_PCB_PRIMITIVE_PREFIXES.some(
7843
+ (prefix) => child.componentName.startsWith(prefix)
7844
+ )) {
7837
7845
  const { x, y } = child._getGlobalPcbPositionBeforeLayout();
7838
7846
  const { width: width2, height: height2 } = child.getPcbSize();
7839
7847
  minX = Math.min(minX, x - width2 / 2);
@@ -10498,6 +10506,15 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
10498
10506
  const text = db.schematic_text.get(child.schematic_text_id);
10499
10507
  if (text) schematicElements.push(text);
10500
10508
  }
10509
+ if (child.isSchematicPrimitive && child.componentName === "SchematicPath") {
10510
+ const pathIds = child.schematic_path_ids;
10511
+ if (pathIds) {
10512
+ for (const pathId of pathIds) {
10513
+ const path = db.schematic_path.get(pathId);
10514
+ if (path) schematicElements.push(path);
10515
+ }
10516
+ }
10517
+ }
10501
10518
  if (child.children && child.children.length > 0) {
10502
10519
  collectSchematicPrimitives(child.children);
10503
10520
  }
@@ -14352,6 +14369,15 @@ function updateSchematicPrimitivesForLayoutShift({
14352
14369
  arc.center.x += deltaX;
14353
14370
  arc.center.y += deltaY;
14354
14371
  }
14372
+ const paths = db.schematic_path.list({
14373
+ schematic_component_id: schematicComponentId
14374
+ });
14375
+ for (const path of paths) {
14376
+ for (const point6 of path.points) {
14377
+ point6.x += deltaX;
14378
+ point6.y += deltaY;
14379
+ }
14380
+ }
14355
14381
  }
14356
14382
 
14357
14383
  // lib/components/primitive-components/Group/Group_doInitialSchematicLayoutGrid.ts
@@ -18168,7 +18194,7 @@ import { identity as identity5 } from "transformation-matrix";
18168
18194
  var package_default = {
18169
18195
  name: "@tscircuit/core",
18170
18196
  type: "module",
18171
- version: "0.0.1083",
18197
+ version: "0.0.1085",
18172
18198
  types: "dist/index.d.ts",
18173
18199
  main: "dist/index.js",
18174
18200
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1084",
4
+ "version": "0.0.1086",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",