@tscircuit/core 0.0.1096 → 0.0.1097

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 +17 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -18210,7 +18210,7 @@ import { identity as identity5 } from "transformation-matrix";
18210
18210
  var package_default = {
18211
18211
  name: "@tscircuit/core",
18212
18212
  type: "module",
18213
- version: "0.0.1095",
18213
+ version: "0.0.1096",
18214
18214
  types: "dist/index.d.ts",
18215
18215
  main: "dist/index.js",
18216
18216
  module: "dist/index.js",
@@ -20642,6 +20642,14 @@ var VoltageSource = class extends NormalComponent3 {
20642
20642
  }
20643
20643
  }
20644
20644
  doInitialPcbComponentRender() {
20645
+ const hasExplicitPcbPosition = this._hasUserDefinedPcbPosition();
20646
+ if (!this._parsedProps.footprint) {
20647
+ if (!hasExplicitPcbPosition) return;
20648
+ throw new Error(
20649
+ "VoltageSource requires a footprint when pcbX/pcbY or pcb edge position props are used"
20650
+ );
20651
+ }
20652
+ super.doInitialPcbComponentRender();
20645
20653
  }
20646
20654
  initPorts() {
20647
20655
  super.initPorts({
@@ -20725,6 +20733,14 @@ var CurrentSource = class extends NormalComponent3 {
20725
20733
  }
20726
20734
  }
20727
20735
  doInitialPcbComponentRender() {
20736
+ const hasExplicitPcbPosition = this._hasUserDefinedPcbPosition();
20737
+ if (!this._parsedProps.footprint) {
20738
+ if (!hasExplicitPcbPosition) return;
20739
+ throw new Error(
20740
+ "CurrentSource requires a footprint when pcbX/pcbY or pcb edge position props are used"
20741
+ );
20742
+ }
20743
+ super.doInitialPcbComponentRender();
20728
20744
  }
20729
20745
  initPorts() {
20730
20746
  super.initPorts({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1096",
4
+ "version": "0.0.1097",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",