@tscircuit/core 0.0.1164 → 0.0.1166
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 +24 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -16242,6 +16242,17 @@ function Group_doInitialSchematicLayoutMatchPack(group) {
|
|
|
16242
16242
|
`_${rotateDirection(schematicSymbolDirection[1], placement.ccwRotationDegrees)}`
|
|
16243
16243
|
);
|
|
16244
16244
|
}
|
|
16245
|
+
const schematicSymbolOrientation = schematicComponent.symbol_name.match(/_(horz|vert)$/);
|
|
16246
|
+
if (schematicSymbolOrientation) {
|
|
16247
|
+
const normalizedRotation2 = (placement.ccwRotationDegrees % 360 + 360) % 360;
|
|
16248
|
+
const shouldSwapOrientation = normalizedRotation2 === 90 || normalizedRotation2 === 270;
|
|
16249
|
+
if (shouldSwapOrientation) {
|
|
16250
|
+
schematicComponent.symbol_name = schematicComponent.symbol_name.replace(
|
|
16251
|
+
schematicSymbolOrientation[0],
|
|
16252
|
+
schematicSymbolOrientation[1] === "horz" ? "_vert" : "_horz"
|
|
16253
|
+
);
|
|
16254
|
+
}
|
|
16255
|
+
}
|
|
16245
16256
|
}
|
|
16246
16257
|
}
|
|
16247
16258
|
}
|
|
@@ -19598,7 +19609,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19598
19609
|
var package_default = {
|
|
19599
19610
|
name: "@tscircuit/core",
|
|
19600
19611
|
type: "module",
|
|
19601
|
-
version: "0.0.
|
|
19612
|
+
version: "0.0.1165",
|
|
19602
19613
|
types: "dist/index.d.ts",
|
|
19603
19614
|
main: "dist/index.js",
|
|
19604
19615
|
module: "dist/index.js",
|
|
@@ -19657,7 +19668,7 @@ var package_default = {
|
|
|
19657
19668
|
"bun-match-svg": "0.0.12",
|
|
19658
19669
|
"calculate-elbow": "^0.0.12",
|
|
19659
19670
|
"chokidar-cli": "^3.0.0",
|
|
19660
|
-
"circuit-json": "^0.0.
|
|
19671
|
+
"circuit-json": "^0.0.408",
|
|
19661
19672
|
"circuit-json-to-bpc": "^0.0.13",
|
|
19662
19673
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
19663
19674
|
"circuit-json-to-gltf": "^0.0.91",
|
|
@@ -23800,15 +23811,25 @@ var Connector = class extends Chip {
|
|
|
23800
23811
|
doInitialSourceRender() {
|
|
23801
23812
|
const { db } = this.root;
|
|
23802
23813
|
const props = this._getConnectorProps();
|
|
23814
|
+
const manufacturerPartNumber = props.manufacturerPartNumber ?? props.mfn;
|
|
23803
23815
|
const source_component = db.source_component.insert({
|
|
23804
23816
|
ftype: "simple_connector",
|
|
23805
23817
|
name: this.name,
|
|
23806
|
-
manufacturer_part_number:
|
|
23818
|
+
manufacturer_part_number: manufacturerPartNumber,
|
|
23807
23819
|
supplier_part_numbers: props.supplierPartNumbers,
|
|
23808
23820
|
display_name: props.displayName,
|
|
23809
23821
|
standard: props.standard
|
|
23810
23822
|
});
|
|
23811
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
|
+
}
|
|
23812
23833
|
}
|
|
23813
23834
|
_isUsingStandardPartsEngineCircuitJsonFlow() {
|
|
23814
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.
|
|
4
|
+
"version": "0.0.1166",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -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.
|
|
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",
|