@tscircuit/core 0.0.731 → 0.0.732

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3295,6 +3295,23 @@ var Port = class extends PrimitiveComponent2 {
3295
3295
  ])
3296
3296
  );
3297
3297
  }
3298
+ _getMatchingPinAttributes() {
3299
+ const pinAttributes = this.parent?._parsedProps?.pinAttributes;
3300
+ if (!pinAttributes) return [];
3301
+ const matches = [];
3302
+ for (const alias of this.getNameAndAliases()) {
3303
+ const attributes = pinAttributes[alias];
3304
+ if (attributes) {
3305
+ matches.push(attributes);
3306
+ }
3307
+ }
3308
+ return matches;
3309
+ }
3310
+ _shouldIncludeInBoardPinout() {
3311
+ return this._getMatchingPinAttributes().some(
3312
+ (attributes) => attributes.includeInBoardPinout === true
3313
+ );
3314
+ }
3298
3315
  isMatchingPort(port) {
3299
3316
  return this.isMatchingAnyOf(port.getNameAndAliases());
3300
3317
  }
@@ -3370,11 +3387,13 @@ var Port = class extends PrimitiveComponent2 {
3370
3387
  }
3371
3388
  if (matchCenter) {
3372
3389
  const subcircuit = this.getSubcircuit();
3390
+ const isBoardPinout = this._shouldIncludeInBoardPinout();
3373
3391
  const pcb_port = db.pcb_port.insert({
3374
3392
  pcb_component_id: this.parent?.pcb_component_id,
3375
3393
  layers: this.getAvailablePcbLayers(),
3376
3394
  subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
3377
3395
  pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0,
3396
+ ...isBoardPinout ? { is_board_pinout: true } : {},
3378
3397
  ...matchCenter,
3379
3398
  source_port_id: this.source_port_id
3380
3399
  });
@@ -3406,11 +3425,13 @@ var Port = class extends PrimitiveComponent2 {
3406
3425
  }
3407
3426
  if (!matchCenter) return;
3408
3427
  const subcircuit = this.getSubcircuit();
3428
+ const isBoardPinout = this._shouldIncludeInBoardPinout();
3409
3429
  const pcb_port = db.pcb_port.insert({
3410
3430
  pcb_component_id: this.parent?.pcb_component_id,
3411
3431
  layers: this.getAvailablePcbLayers(),
3412
3432
  subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
3413
3433
  pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0,
3434
+ ...isBoardPinout ? { is_board_pinout: true } : {},
3414
3435
  ...matchCenter,
3415
3436
  source_port_id: this.source_port_id
3416
3437
  });
@@ -3465,7 +3486,6 @@ var Port = class extends PrimitiveComponent2 {
3465
3486
  } else if (labelHints.length > 0) {
3466
3487
  bestDisplayPinLabel = labelHints[0];
3467
3488
  }
3468
- const pinAttributes = this.parent?._parsedProps?.pinAttributes;
3469
3489
  const schematicPortInsertProps = {
3470
3490
  type: "schematic_port",
3471
3491
  schematic_component_id: this.parent?.schematic_component_id,
@@ -3479,17 +3499,12 @@ var Port = class extends PrimitiveComponent2 {
3479
3499
  display_pin_label: bestDisplayPinLabel,
3480
3500
  is_connected: false
3481
3501
  };
3482
- if (pinAttributes) {
3483
- for (const alias of this.getNameAndAliases()) {
3484
- if (pinAttributes[alias]) {
3485
- const attributes = pinAttributes[alias];
3486
- if (attributes.requiresPower) {
3487
- schematicPortInsertProps.has_input_arrow = true;
3488
- }
3489
- if (attributes.providesPower) {
3490
- schematicPortInsertProps.has_output_arrow = true;
3491
- }
3492
- }
3502
+ for (const attributes of this._getMatchingPinAttributes()) {
3503
+ if (attributes.requiresPower) {
3504
+ schematicPortInsertProps.has_input_arrow = true;
3505
+ }
3506
+ if (attributes.providesPower) {
3507
+ schematicPortInsertProps.has_output_arrow = true;
3493
3508
  }
3494
3509
  }
3495
3510
  const schematic_port = db.schematic_port.insert(schematicPortInsertProps);
@@ -8210,6 +8225,7 @@ var applySchematicEditEventsToManualEditsFile = ({
8210
8225
  schematic_component_id
8211
8226
  );
8212
8227
  if (!schematic_component2) continue;
8228
+ if (!schematic_component2.source_component_id) continue;
8213
8229
  const source_component = su2(circuitJson).source_component.get(
8214
8230
  schematic_component2.source_component_id
8215
8231
  );
@@ -15283,7 +15299,7 @@ import { identity as identity6 } from "transformation-matrix";
15283
15299
  var package_default = {
15284
15300
  name: "@tscircuit/core",
15285
15301
  type: "module",
15286
- version: "0.0.730",
15302
+ version: "0.0.731",
15287
15303
  types: "dist/index.d.ts",
15288
15304
  main: "dist/index.js",
15289
15305
  module: "dist/index.js",
@@ -15322,7 +15338,7 @@ var package_default = {
15322
15338
  "@tscircuit/matchpack": "^0.0.16",
15323
15339
  "@tscircuit/math-utils": "^0.0.21",
15324
15340
  "@tscircuit/miniflex": "^0.0.4",
15325
- "@tscircuit/props": "0.0.324",
15341
+ "@tscircuit/props": "0.0.326",
15326
15342
  "@tscircuit/schematic-autolayout": "^0.0.6",
15327
15343
  "@tscircuit/schematic-match-adapt": "^0.0.16",
15328
15344
  "@tscircuit/schematic-trace-solver": "^0.0.37",
@@ -15336,7 +15352,7 @@ var package_default = {
15336
15352
  "bun-match-svg": "0.0.12",
15337
15353
  "calculate-elbow": "^0.0.12",
15338
15354
  "chokidar-cli": "^3.0.0",
15339
- "circuit-json": "^0.0.253",
15355
+ "circuit-json": "^0.0.255",
15340
15356
  "circuit-json-to-bpc": "^0.0.13",
15341
15357
  "circuit-json-to-connectivity-map": "^0.0.22",
15342
15358
  "circuit-json-to-simple-3d": "^0.0.8",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.731",
4
+ "version": "0.0.732",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -40,7 +40,7 @@
40
40
  "@tscircuit/matchpack": "^0.0.16",
41
41
  "@tscircuit/math-utils": "^0.0.21",
42
42
  "@tscircuit/miniflex": "^0.0.4",
43
- "@tscircuit/props": "0.0.324",
43
+ "@tscircuit/props": "0.0.326",
44
44
  "@tscircuit/schematic-autolayout": "^0.0.6",
45
45
  "@tscircuit/schematic-match-adapt": "^0.0.16",
46
46
  "@tscircuit/schematic-trace-solver": "^0.0.37",
@@ -54,7 +54,7 @@
54
54
  "bun-match-svg": "0.0.12",
55
55
  "calculate-elbow": "^0.0.12",
56
56
  "chokidar-cli": "^3.0.0",
57
- "circuit-json": "^0.0.253",
57
+ "circuit-json": "^0.0.255",
58
58
  "circuit-json-to-bpc": "^0.0.13",
59
59
  "circuit-json-to-connectivity-map": "^0.0.22",
60
60
  "circuit-json-to-simple-3d": "^0.0.8",