@tscircuit/core 0.0.2017 → 0.0.2019
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 +2880 -2285
- package/dist/index.js +31 -13
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -64561,7 +64561,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
64561
64561
|
var package_default = {
|
|
64562
64562
|
name: "@tscircuit/core",
|
|
64563
64563
|
type: "module",
|
|
64564
|
-
version: "0.0.
|
|
64564
|
+
version: "0.0.2018",
|
|
64565
64565
|
types: "dist/index.d.ts",
|
|
64566
64566
|
main: "dist/index.js",
|
|
64567
64567
|
module: "dist/index.js",
|
|
@@ -64616,7 +64616,7 @@ var package_default = {
|
|
|
64616
64616
|
"@tscircuit/math-utils": "^0.0.36",
|
|
64617
64617
|
"@tscircuit/miniflex": "^0.0.4",
|
|
64618
64618
|
"@tscircuit/ngspice-spice-engine": "^0.0.20",
|
|
64619
|
-
"@tscircuit/props": "^0.0.
|
|
64619
|
+
"@tscircuit/props": "^0.0.672",
|
|
64620
64620
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
64621
64621
|
"@tscircuit/schematic-trace-solver": "^0.0.212",
|
|
64622
64622
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -64634,7 +64634,7 @@ var package_default = {
|
|
|
64634
64634
|
"chokidar-cli": "^3.0.0",
|
|
64635
64635
|
"circuit-json": "^0.0.507",
|
|
64636
64636
|
"circuit-json-to-bpc": "^0.0.13",
|
|
64637
|
-
"circuit-json-to-connectivity-map": "^0.0.
|
|
64637
|
+
"circuit-json-to-connectivity-map": "^0.0.32",
|
|
64638
64638
|
"circuit-json-to-gltf": "^0.0.133",
|
|
64639
64639
|
"circuit-json-to-spice": "^0.0.45",
|
|
64640
64640
|
"circuit-to-svg": "^0.0.433",
|
|
@@ -64695,7 +64695,7 @@ var package_default = {
|
|
|
64695
64695
|
},
|
|
64696
64696
|
overrides: {
|
|
64697
64697
|
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
64698
|
-
"@tscircuit/props": "^0.0.
|
|
64698
|
+
"@tscircuit/props": "^0.0.672",
|
|
64699
64699
|
"circuit-json": "^0.0.507"
|
|
64700
64700
|
}
|
|
64701
64701
|
};
|
|
@@ -76550,6 +76550,22 @@ var CopperPour = class extends PrimitiveComponent2 {
|
|
|
76550
76550
|
// lib/components/primitive-components/AssemblyDevice.ts
|
|
76551
76551
|
import { assemblyDeviceProps } from "@tscircuit/props";
|
|
76552
76552
|
import { identity as identity10 } from "transformation-matrix";
|
|
76553
|
+
|
|
76554
|
+
// lib/components/primitive-components/resolve-assembly-model.ts
|
|
76555
|
+
var resolveAssemblyModel = (props) => {
|
|
76556
|
+
if (props.model !== void 0) {
|
|
76557
|
+
if (/^https?:\/\//i.test(props.model))
|
|
76558
|
+
return resolveAssemblyModelUrl(props.model);
|
|
76559
|
+
return {
|
|
76560
|
+
glbUrl: `https://modelcdn.tscircuit.com/jscad_models/${encodeURIComponent(props.model)}.glb`
|
|
76561
|
+
};
|
|
76562
|
+
}
|
|
76563
|
+
if (props.modelUrl !== void 0)
|
|
76564
|
+
return resolveAssemblyModelUrl(props.modelUrl);
|
|
76565
|
+
return void 0;
|
|
76566
|
+
};
|
|
76567
|
+
|
|
76568
|
+
// lib/components/primitive-components/AssemblyDevice.ts
|
|
76553
76569
|
var AssemblyDevice = class extends PrimitiveComponent2 {
|
|
76554
76570
|
isAssemblyDeviceContainer = true;
|
|
76555
76571
|
get config() {
|
|
@@ -76567,20 +76583,22 @@ var AssemblyDevice = class extends PrimitiveComponent2 {
|
|
|
76567
76583
|
return identity10();
|
|
76568
76584
|
}
|
|
76569
76585
|
doInitialSourceRender() {
|
|
76570
|
-
if (this._parsedProps.modelUrl === void 0 || !this.root)
|
|
76586
|
+
if (this._parsedProps.modelUrl === void 0 && this._parsedProps.model === void 0 || !this.root)
|
|
76587
|
+
return;
|
|
76571
76588
|
this.source_component_id = this.root.db.source_component.insert({
|
|
76572
76589
|
ftype: "simple_chip",
|
|
76573
76590
|
name: this.name
|
|
76574
76591
|
}).source_component_id;
|
|
76575
76592
|
}
|
|
76576
76593
|
doInitialCadModelRender() {
|
|
76577
|
-
|
|
76594
|
+
const model = resolveAssemblyModel(this._parsedProps);
|
|
76595
|
+
if (!this.root || this.root.pcbDisabled || !this.source_component_id || !model)
|
|
76578
76596
|
return;
|
|
76579
|
-
this.cad_component_id = renderAssemblyCadModel(
|
|
76580
|
-
|
|
76581
|
-
|
|
76582
|
-
|
|
76583
|
-
);
|
|
76597
|
+
this.cad_component_id = renderAssemblyCadModel(this, model, {
|
|
76598
|
+
position: { x: 0, y: 0, z: 0 },
|
|
76599
|
+
pcbRotation: 0,
|
|
76600
|
+
layer: "top"
|
|
76601
|
+
});
|
|
76584
76602
|
}
|
|
76585
76603
|
};
|
|
76586
76604
|
|
|
@@ -76604,7 +76622,7 @@ var AssemblyScreen_doInitialCadModelRender = (component) => {
|
|
|
76604
76622
|
const placement = resolveAssemblyPlacement(component);
|
|
76605
76623
|
component.cad_component_id = renderAssemblyCadModel(
|
|
76606
76624
|
component,
|
|
76607
|
-
|
|
76625
|
+
resolveAssemblyModel(component._parsedProps) ?? component._parsedProps.cadModel ?? getDefaultFlexScreenModel(component),
|
|
76608
76626
|
placement
|
|
76609
76627
|
);
|
|
76610
76628
|
};
|
|
@@ -76663,7 +76681,7 @@ var AssemblySubassembly = class extends PrimitiveComponent2 {
|
|
|
76663
76681
|
doInitialCadModelRender() {
|
|
76664
76682
|
if (!this.root || this.root.pcbDisabled || !this.source_component_id) return;
|
|
76665
76683
|
const placement = resolveAssemblyPlacement(this);
|
|
76666
|
-
const model =
|
|
76684
|
+
const model = resolveAssemblyModel(this._parsedProps) ?? this._parsedProps.cadModel;
|
|
76667
76685
|
if (model && !(typeof model === "object" && "type" in model)) {
|
|
76668
76686
|
this.cad_component_id = renderAssemblyCadModel(this, model, placement);
|
|
76669
76687
|
}
|
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.2019",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@tscircuit/math-utils": "^0.0.36",
|
|
57
57
|
"@tscircuit/miniflex": "^0.0.4",
|
|
58
58
|
"@tscircuit/ngspice-spice-engine": "^0.0.20",
|
|
59
|
-
"@tscircuit/props": "^0.0.
|
|
59
|
+
"@tscircuit/props": "^0.0.672",
|
|
60
60
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
61
61
|
"@tscircuit/schematic-trace-solver": "^0.0.212",
|
|
62
62
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"chokidar-cli": "^3.0.0",
|
|
75
75
|
"circuit-json": "^0.0.507",
|
|
76
76
|
"circuit-json-to-bpc": "^0.0.13",
|
|
77
|
-
"circuit-json-to-connectivity-map": "^0.0.
|
|
77
|
+
"circuit-json-to-connectivity-map": "^0.0.32",
|
|
78
78
|
"circuit-json-to-gltf": "^0.0.133",
|
|
79
79
|
"circuit-json-to-spice": "^0.0.45",
|
|
80
80
|
"circuit-to-svg": "^0.0.433",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
},
|
|
136
136
|
"overrides": {
|
|
137
137
|
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
138
|
-
"@tscircuit/props": "^0.0.
|
|
138
|
+
"@tscircuit/props": "^0.0.672",
|
|
139
139
|
"circuit-json": "^0.0.507"
|
|
140
140
|
}
|
|
141
141
|
}
|