@tscircuit/core 0.0.176 → 0.0.178
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 +18 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -671,6 +671,22 @@ var PrimitiveComponent = class extends Renderable {
|
|
|
671
671
|
const base_symbol_name = this.config.schematicSymbolName;
|
|
672
672
|
const symbol_name_horz = `${base_symbol_name}_horz`;
|
|
673
673
|
const symbol_name_vert = `${base_symbol_name}_vert`;
|
|
674
|
+
const symbol_name_up = `${base_symbol_name}_up`;
|
|
675
|
+
const symbol_name_down = `${base_symbol_name}_down`;
|
|
676
|
+
const symbol_name_left = `${base_symbol_name}_left`;
|
|
677
|
+
const symbol_name_right = `${base_symbol_name}_right`;
|
|
678
|
+
if (symbol_name_right in symbols && (props.schRotation === void 0 || props.schRotation === 0)) {
|
|
679
|
+
return symbol_name_right;
|
|
680
|
+
}
|
|
681
|
+
if (symbol_name_up in symbols && props.schRotation === 90) {
|
|
682
|
+
return symbol_name_up;
|
|
683
|
+
}
|
|
684
|
+
if (symbol_name_left in symbols && props.schRotation === 180) {
|
|
685
|
+
return symbol_name_left;
|
|
686
|
+
}
|
|
687
|
+
if (symbol_name_down in symbols && props.schRotation === 270) {
|
|
688
|
+
return symbol_name_down;
|
|
689
|
+
}
|
|
674
690
|
if (symbol_name_horz in symbols) {
|
|
675
691
|
if (props.schRotation === 0 || props.schRotation === void 0)
|
|
676
692
|
return symbol_name_horz;
|
|
@@ -3781,6 +3797,7 @@ var createSchematicTraceCrossingSegments = ({
|
|
|
3781
3797
|
x: crossingPoint.x + crossingUnitVec.x * crossingSegmentLength / 2,
|
|
3782
3798
|
y: crossingPoint.y + crossingUnitVec.y * crossingSegmentLength / 2
|
|
3783
3799
|
};
|
|
3800
|
+
const overshot = distance2(afterCrossing, edge.to) < crossingSegmentLength;
|
|
3784
3801
|
const newEdges = [
|
|
3785
3802
|
{ from: edge.from, to: beforeCrossing },
|
|
3786
3803
|
{ from: beforeCrossing, to: afterCrossing, is_crossing: true },
|
|
@@ -3788,7 +3805,7 @@ var createSchematicTraceCrossingSegments = ({
|
|
|
3788
3805
|
];
|
|
3789
3806
|
edges.splice(i, 1, ...newEdges);
|
|
3790
3807
|
i += newEdges.length - 2;
|
|
3791
|
-
if (
|
|
3808
|
+
if (overshot) {
|
|
3792
3809
|
i++;
|
|
3793
3810
|
}
|
|
3794
3811
|
}
|
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.178",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"@tscircuit/soup-util": "^0.0.40",
|
|
46
46
|
"circuit-json": "^0.0.104",
|
|
47
47
|
"circuit-json-to-connectivity-map": "^0.0.17",
|
|
48
|
-
"circuit-to-svg": "^0.0.
|
|
48
|
+
"circuit-to-svg": "^0.0.77",
|
|
49
49
|
"format-si-unit": "^0.0.2",
|
|
50
50
|
"nanoid": "^5.0.7",
|
|
51
51
|
"performance-now": "^2.1.0",
|
|
52
52
|
"react": "^18.3.1",
|
|
53
53
|
"react-reconciler": "^0.29.2",
|
|
54
|
-
"schematic-symbols": "^0.0.
|
|
54
|
+
"schematic-symbols": "^0.0.97",
|
|
55
55
|
"transformation-matrix": "^2.16.1",
|
|
56
56
|
"zod": "^3.23.8"
|
|
57
57
|
}
|