@tscircuit/core 0.0.74 → 0.0.75
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 +9 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -893,10 +893,15 @@ var Port = class extends PrimitiveComponent {
|
|
|
893
893
|
doInitialSchematicPortRender() {
|
|
894
894
|
const { db } = this.root;
|
|
895
895
|
const { _parsedProps: props } = this;
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
896
|
+
const container = this.getPrimitiveContainer();
|
|
897
|
+
if (!container) return;
|
|
898
|
+
let center = this._getGlobalSchematicPositionBeforeLayout();
|
|
899
|
+
if ("schematicDimensions" in container && props.pinNumber !== void 0) {
|
|
900
|
+
const chipDims = container.schematicDimensions;
|
|
901
|
+
center = chipDims.getPortPositionByPinNumber(props.pinNumber);
|
|
902
|
+
}
|
|
903
|
+
const containerCenter = container._getGlobalSchematicPositionBeforeLayout();
|
|
904
|
+
this.facingDirection = getRelativeDirection(containerCenter, center);
|
|
900
905
|
const schematic_port = db.schematic_port.insert({
|
|
901
906
|
schematic_component_id: this.parent?.schematic_component_id,
|
|
902
907
|
center,
|
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.75",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@types/react": "^18.3.3",
|
|
22
22
|
"@types/react-reconciler": "^0.28.8",
|
|
23
23
|
"bun-match-svg": "0.0.2",
|
|
24
|
-
"circuit-to-svg": "^0.0.
|
|
24
|
+
"circuit-to-svg": "^0.0.36",
|
|
25
25
|
"debug": "^4.3.6",
|
|
26
26
|
"howfat": "^0.3.8",
|
|
27
27
|
"looks-same": "^9.0.1",
|