@tscircuit/core 0.0.1165 → 0.0.1167

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 +14 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -19609,7 +19609,7 @@ import { identity as identity5 } from "transformation-matrix";
19609
19609
  var package_default = {
19610
19610
  name: "@tscircuit/core",
19611
19611
  type: "module",
19612
- version: "0.0.1164",
19612
+ version: "0.0.1166",
19613
19613
  types: "dist/index.d.ts",
19614
19614
  main: "dist/index.js",
19615
19615
  module: "dist/index.js",
@@ -19642,7 +19642,7 @@ var package_default = {
19642
19642
  "@resvg/resvg-js": "^2.6.2",
19643
19643
  "@tscircuit/alphabet": "0.0.25",
19644
19644
  "@tscircuit/capacity-autorouter": "^0.0.425",
19645
- "@tscircuit/checks": "0.0.116",
19645
+ "@tscircuit/checks": "0.0.117",
19646
19646
  "@tscircuit/circuit-json-util": "^0.0.92",
19647
19647
  "@tscircuit/common": "^0.0.20",
19648
19648
  "@tscircuit/copper-pour-solver": "^0.0.20",
@@ -19668,7 +19668,7 @@ var package_default = {
19668
19668
  "bun-match-svg": "0.0.12",
19669
19669
  "calculate-elbow": "^0.0.12",
19670
19670
  "chokidar-cli": "^3.0.0",
19671
- "circuit-json": "^0.0.407",
19671
+ "circuit-json": "^0.0.408",
19672
19672
  "circuit-json-to-bpc": "^0.0.13",
19673
19673
  "circuit-json-to-connectivity-map": "^0.0.23",
19674
19674
  "circuit-json-to-gltf": "^0.0.91",
@@ -23811,15 +23811,25 @@ var Connector = class extends Chip {
23811
23811
  doInitialSourceRender() {
23812
23812
  const { db } = this.root;
23813
23813
  const props = this._getConnectorProps();
23814
+ const manufacturerPartNumber = props.manufacturerPartNumber ?? props.mfn;
23814
23815
  const source_component = db.source_component.insert({
23815
23816
  ftype: "simple_connector",
23816
23817
  name: this.name,
23817
- manufacturer_part_number: props.manufacturerPartNumber ?? props.mfn,
23818
+ manufacturer_part_number: manufacturerPartNumber,
23818
23819
  supplier_part_numbers: props.supplierPartNumbers,
23819
23820
  display_name: props.displayName,
23820
23821
  standard: props.standard
23821
23822
  });
23822
23823
  this.source_component_id = source_component.source_component_id;
23824
+ if (props.standard && !manufacturerPartNumber) {
23825
+ db.source_missing_manufacturer_part_number_warning.insert({
23826
+ source_component_id: this.source_component_id,
23827
+ standard: props.standard,
23828
+ subcircuit_id: this.getSubcircuit()?.subcircuit_id ?? void 0,
23829
+ warning_type: "source_missing_manufacturer_part_number_warning",
23830
+ message: `${this.getString()} has standard="${props.standard}" but no manufacturerPartNumber (mfn). Add mfn if you do not want the USB-C part to change in future.`
23831
+ });
23832
+ }
23823
23833
  }
23824
23834
  _isUsingStandardPartsEngineCircuitJsonFlow() {
23825
23835
  if (!this._shouldUseStandardPartsEngineCircuitJsonFlow()) return false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1165",
4
+ "version": "0.0.1167",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "@resvg/resvg-js": "^2.6.2",
35
35
  "@tscircuit/alphabet": "0.0.25",
36
36
  "@tscircuit/capacity-autorouter": "^0.0.425",
37
- "@tscircuit/checks": "0.0.116",
37
+ "@tscircuit/checks": "0.0.117",
38
38
  "@tscircuit/circuit-json-util": "^0.0.92",
39
39
  "@tscircuit/common": "^0.0.20",
40
40
  "@tscircuit/copper-pour-solver": "^0.0.20",
@@ -60,7 +60,7 @@
60
60
  "bun-match-svg": "0.0.12",
61
61
  "calculate-elbow": "^0.0.12",
62
62
  "chokidar-cli": "^3.0.0",
63
- "circuit-json": "^0.0.407",
63
+ "circuit-json": "^0.0.408",
64
64
  "circuit-json-to-bpc": "^0.0.13",
65
65
  "circuit-json-to-connectivity-map": "^0.0.23",
66
66
  "circuit-json-to-gltf": "^0.0.91",