@tscircuit/core 0.0.803 → 0.0.805
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.d.ts +570 -7
- package/dist/index.js +12 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1949,6 +1949,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1949
1949
|
shape: "rect",
|
|
1950
1950
|
width: isRotated90Degrees ? props.height : props.width,
|
|
1951
1951
|
height: isRotated90Degrees ? props.width : props.height,
|
|
1952
|
+
corner_radius: props.cornerRadius ?? 0,
|
|
1952
1953
|
port_hints: props.portHints.map((ph) => ph.toString()),
|
|
1953
1954
|
is_covered_with_solder_mask: isCoveredWithSolderMask,
|
|
1954
1955
|
x: position.x,
|
|
@@ -1961,6 +1962,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1961
1962
|
shape: "rotated_rect",
|
|
1962
1963
|
width: props.width,
|
|
1963
1964
|
height: props.height,
|
|
1965
|
+
corner_radius: props.cornerRadius ?? 0,
|
|
1964
1966
|
x: position.x,
|
|
1965
1967
|
y: position.y,
|
|
1966
1968
|
ccw_rotation: finalRotationDegrees,
|
|
@@ -4435,7 +4437,8 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
4435
4437
|
const bounds = parent._getPcbCircuitJsonBounds();
|
|
4436
4438
|
const pcb_component = db.pcb_component.get(parent.pcb_component_id);
|
|
4437
4439
|
const props = this._parsedProps;
|
|
4438
|
-
if (!props || typeof props.modelUrl !== "string")
|
|
4440
|
+
if (!props || typeof props.modelUrl !== "string" && typeof props.stepUrl !== "string")
|
|
4441
|
+
return;
|
|
4439
4442
|
const parentTransform = parent._computePcbGlobalTransformBeforeLayout();
|
|
4440
4443
|
const decomposedTransform = decomposeTSR4(parentTransform);
|
|
4441
4444
|
const accumulatedRotation = decomposedTransform.rotation.angle * 180 / Math.PI;
|
|
@@ -4456,7 +4459,7 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
4456
4459
|
});
|
|
4457
4460
|
const zOffsetFromSurface = props.zOffsetFromSurface !== void 0 ? distance.parse(props.zOffsetFromSurface) : 0;
|
|
4458
4461
|
const layer = parent.props.layer === "bottom" ? "bottom" : "top";
|
|
4459
|
-
const ext = getFileExtension(props.modelUrl);
|
|
4462
|
+
const ext = props.modelUrl ? getFileExtension(props.modelUrl) : void 0;
|
|
4460
4463
|
const urlProps = {};
|
|
4461
4464
|
if (ext === "stl")
|
|
4462
4465
|
urlProps.model_stl_url = this._addCachebustToModelUrl(props.modelUrl);
|
|
@@ -4471,6 +4474,10 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
4471
4474
|
else if (ext === "wrl" || ext === "vrml")
|
|
4472
4475
|
urlProps.model_wrl_url = this._addCachebustToModelUrl(props.modelUrl);
|
|
4473
4476
|
else urlProps.model_stl_url = this._addCachebustToModelUrl(props.modelUrl);
|
|
4477
|
+
if (props.stepUrl) {
|
|
4478
|
+
const transformed = this._addCachebustToModelUrl(props.stepUrl);
|
|
4479
|
+
if (transformed) urlProps.model_step_url = transformed;
|
|
4480
|
+
}
|
|
4474
4481
|
const cad = db.cad_component.insert({
|
|
4475
4482
|
position: {
|
|
4476
4483
|
x: bounds.center.x + Number(positionOffset.x),
|
|
@@ -17110,7 +17117,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
17110
17117
|
var package_default = {
|
|
17111
17118
|
name: "@tscircuit/core",
|
|
17112
17119
|
type: "module",
|
|
17113
|
-
version: "0.0.
|
|
17120
|
+
version: "0.0.804",
|
|
17114
17121
|
types: "dist/index.d.ts",
|
|
17115
17122
|
main: "dist/index.js",
|
|
17116
17123
|
module: "dist/index.js",
|
|
@@ -17150,7 +17157,7 @@ var package_default = {
|
|
|
17150
17157
|
"@tscircuit/matchpack": "^0.0.16",
|
|
17151
17158
|
"@tscircuit/math-utils": "^0.0.29",
|
|
17152
17159
|
"@tscircuit/miniflex": "^0.0.4",
|
|
17153
|
-
"@tscircuit/props": "0.0.
|
|
17160
|
+
"@tscircuit/props": "0.0.371",
|
|
17154
17161
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
17155
17162
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
17156
17163
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -17168,7 +17175,7 @@ var package_default = {
|
|
|
17168
17175
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
17169
17176
|
"circuit-json-to-gltf": "^0.0.26",
|
|
17170
17177
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
17171
|
-
"circuit-to-svg": "^0.0.
|
|
17178
|
+
"circuit-to-svg": "^0.0.250",
|
|
17172
17179
|
"circuit-json-to-spice": "^0.0.15",
|
|
17173
17180
|
concurrently: "^9.1.2",
|
|
17174
17181
|
"connectivity-map": "^1.0.0",
|
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.805",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@tscircuit/matchpack": "^0.0.16",
|
|
42
42
|
"@tscircuit/math-utils": "^0.0.29",
|
|
43
43
|
"@tscircuit/miniflex": "^0.0.4",
|
|
44
|
-
"@tscircuit/props": "0.0.
|
|
44
|
+
"@tscircuit/props": "0.0.371",
|
|
45
45
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
46
46
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
47
47
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
60
60
|
"circuit-json-to-gltf": "^0.0.26",
|
|
61
61
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
62
|
-
"circuit-to-svg": "^0.0.
|
|
62
|
+
"circuit-to-svg": "^0.0.250",
|
|
63
63
|
"circuit-json-to-spice": "^0.0.15",
|
|
64
64
|
"concurrently": "^9.1.2",
|
|
65
65
|
"connectivity-map": "^1.0.0",
|