@tscircuit/core 0.0.804 → 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 +10 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -4437,7 +4437,8 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
4437
4437
|
const bounds = parent._getPcbCircuitJsonBounds();
|
|
4438
4438
|
const pcb_component = db.pcb_component.get(parent.pcb_component_id);
|
|
4439
4439
|
const props = this._parsedProps;
|
|
4440
|
-
if (!props || typeof props.modelUrl !== "string")
|
|
4440
|
+
if (!props || typeof props.modelUrl !== "string" && typeof props.stepUrl !== "string")
|
|
4441
|
+
return;
|
|
4441
4442
|
const parentTransform = parent._computePcbGlobalTransformBeforeLayout();
|
|
4442
4443
|
const decomposedTransform = decomposeTSR4(parentTransform);
|
|
4443
4444
|
const accumulatedRotation = decomposedTransform.rotation.angle * 180 / Math.PI;
|
|
@@ -4458,7 +4459,7 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
4458
4459
|
});
|
|
4459
4460
|
const zOffsetFromSurface = props.zOffsetFromSurface !== void 0 ? distance.parse(props.zOffsetFromSurface) : 0;
|
|
4460
4461
|
const layer = parent.props.layer === "bottom" ? "bottom" : "top";
|
|
4461
|
-
const ext = getFileExtension(props.modelUrl);
|
|
4462
|
+
const ext = props.modelUrl ? getFileExtension(props.modelUrl) : void 0;
|
|
4462
4463
|
const urlProps = {};
|
|
4463
4464
|
if (ext === "stl")
|
|
4464
4465
|
urlProps.model_stl_url = this._addCachebustToModelUrl(props.modelUrl);
|
|
@@ -4473,6 +4474,10 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
4473
4474
|
else if (ext === "wrl" || ext === "vrml")
|
|
4474
4475
|
urlProps.model_wrl_url = this._addCachebustToModelUrl(props.modelUrl);
|
|
4475
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
|
+
}
|
|
4476
4481
|
const cad = db.cad_component.insert({
|
|
4477
4482
|
position: {
|
|
4478
4483
|
x: bounds.center.x + Number(positionOffset.x),
|
|
@@ -17112,7 +17117,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
17112
17117
|
var package_default = {
|
|
17113
17118
|
name: "@tscircuit/core",
|
|
17114
17119
|
type: "module",
|
|
17115
|
-
version: "0.0.
|
|
17120
|
+
version: "0.0.804",
|
|
17116
17121
|
types: "dist/index.d.ts",
|
|
17117
17122
|
main: "dist/index.js",
|
|
17118
17123
|
module: "dist/index.js",
|
|
@@ -17152,7 +17157,7 @@ var package_default = {
|
|
|
17152
17157
|
"@tscircuit/matchpack": "^0.0.16",
|
|
17153
17158
|
"@tscircuit/math-utils": "^0.0.29",
|
|
17154
17159
|
"@tscircuit/miniflex": "^0.0.4",
|
|
17155
|
-
"@tscircuit/props": "0.0.
|
|
17160
|
+
"@tscircuit/props": "0.0.371",
|
|
17156
17161
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
17157
17162
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
17158
17163
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -17170,7 +17175,7 @@ var package_default = {
|
|
|
17170
17175
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
17171
17176
|
"circuit-json-to-gltf": "^0.0.26",
|
|
17172
17177
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
17173
|
-
"circuit-to-svg": "^0.0.
|
|
17178
|
+
"circuit-to-svg": "^0.0.250",
|
|
17174
17179
|
"circuit-json-to-spice": "^0.0.15",
|
|
17175
17180
|
concurrently: "^9.1.2",
|
|
17176
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",
|