@tscircuit/core 0.0.1435 → 0.0.1436
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 +23 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ __export(components_exports, {
|
|
|
39
39
|
Fiducial: () => Fiducial,
|
|
40
40
|
Footprint: () => Footprint,
|
|
41
41
|
Fuse: () => Fuse,
|
|
42
|
-
Group: () =>
|
|
42
|
+
Group: () => Group,
|
|
43
43
|
Hole: () => Hole,
|
|
44
44
|
Inductor: () => Inductor,
|
|
45
45
|
Interconnect: () => Interconnect,
|
|
@@ -20318,8 +20318,19 @@ var SCHEMATIC_RAIL_NET_LABEL_HEIGHT = 0.42;
|
|
|
20318
20318
|
function createSchematicTraceSolverInputProblem(group) {
|
|
20319
20319
|
const { db } = group.root;
|
|
20320
20320
|
const connKeyToSourceNet = /* @__PURE__ */ new Map();
|
|
20321
|
-
const
|
|
20322
|
-
const
|
|
20321
|
+
const childGroups = [];
|
|
20322
|
+
const componentsToVisit = [...group.children].reverse();
|
|
20323
|
+
while (componentsToVisit.length > 0) {
|
|
20324
|
+
const child = componentsToVisit.pop();
|
|
20325
|
+
if (child instanceof Group) {
|
|
20326
|
+
if (child.isSubcircuit) {
|
|
20327
|
+
if (child._parsedProps.showAsSchematicBox) childGroups.push(child);
|
|
20328
|
+
continue;
|
|
20329
|
+
}
|
|
20330
|
+
childGroups.push(child);
|
|
20331
|
+
}
|
|
20332
|
+
componentsToVisit.push(...[...child.children].reverse());
|
|
20333
|
+
}
|
|
20323
20334
|
const allSchematicGroupIds = [
|
|
20324
20335
|
group.schematic_group_id,
|
|
20325
20336
|
...childGroups.map((a) => a.schematic_group_id)
|
|
@@ -22476,7 +22487,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
22476
22487
|
var package_default = {
|
|
22477
22488
|
name: "@tscircuit/core",
|
|
22478
22489
|
type: "module",
|
|
22479
|
-
version: "0.0.
|
|
22490
|
+
version: "0.0.1435",
|
|
22480
22491
|
types: "dist/index.d.ts",
|
|
22481
22492
|
main: "dist/index.js",
|
|
22482
22493
|
module: "dist/index.js",
|
|
@@ -23505,7 +23516,7 @@ var ensureRouteStartsAtSourceTraceStart = ({
|
|
|
23505
23516
|
const lastPoint = route[route.length - 1];
|
|
23506
23517
|
return getDistanceToPoint(lastPoint, firstPcbPort) < getDistanceToPoint(firstPoint, firstPcbPort) ? reversePcbTraceRoute(route) : route;
|
|
23507
23518
|
};
|
|
23508
|
-
var
|
|
23519
|
+
var Group = class extends NormalComponent3 {
|
|
23509
23520
|
pcb_group_id = null;
|
|
23510
23521
|
schematic_group_id = null;
|
|
23511
23522
|
subcircuit_id = null;
|
|
@@ -24918,7 +24929,7 @@ function inflateSourceGroup(sourceGroup, inflatorContext) {
|
|
|
24918
24929
|
if (pcbGroup?.anchor_alignment) {
|
|
24919
24930
|
groupProps2.pcbAnchorAlignment = pcbGroup.anchor_alignment;
|
|
24920
24931
|
}
|
|
24921
|
-
const group = new
|
|
24932
|
+
const group = new Group(groupProps2);
|
|
24922
24933
|
group._isInflatedFromCircuitJson = true;
|
|
24923
24934
|
group.source_group_id = sourceGroup.source_group_id;
|
|
24924
24935
|
if (groupsMap) {
|
|
@@ -26086,7 +26097,7 @@ var IsolatedCircuit = class {
|
|
|
26086
26097
|
this.firstChild = this.children[0];
|
|
26087
26098
|
return;
|
|
26088
26099
|
}
|
|
26089
|
-
const group = new
|
|
26100
|
+
const group = new Group({ subcircuit: true });
|
|
26090
26101
|
group.parent = this;
|
|
26091
26102
|
group.addAll(this.children);
|
|
26092
26103
|
this.children = [group];
|
|
@@ -26492,7 +26503,7 @@ var getRoundedRectOutline = (width, height, radius) => {
|
|
|
26492
26503
|
}
|
|
26493
26504
|
return outline;
|
|
26494
26505
|
};
|
|
26495
|
-
var Board = class extends
|
|
26506
|
+
var Board = class extends Group {
|
|
26496
26507
|
pcb_board_id = null;
|
|
26497
26508
|
source_board_id = null;
|
|
26498
26509
|
_drcChecksComplete = false;
|
|
@@ -26956,7 +26967,7 @@ import { mountedboardProps } from "@tscircuit/props";
|
|
|
26956
26967
|
|
|
26957
26968
|
// lib/components/primitive-components/Group/Subcircuit/Subcircuit.ts
|
|
26958
26969
|
import "@tscircuit/props";
|
|
26959
|
-
var Subcircuit = class extends
|
|
26970
|
+
var Subcircuit = class extends Group {
|
|
26960
26971
|
constructor(props) {
|
|
26961
26972
|
super({
|
|
26962
26973
|
...props,
|
|
@@ -27528,7 +27539,7 @@ function getItemDimensions(item, db) {
|
|
|
27528
27539
|
}
|
|
27529
27540
|
|
|
27530
27541
|
// lib/components/normal-components/Subpanel.ts
|
|
27531
|
-
var Subpanel = class _Subpanel extends
|
|
27542
|
+
var Subpanel = class _Subpanel extends Group {
|
|
27532
27543
|
pcb_panel_id = null;
|
|
27533
27544
|
_tabsAndMouseBitesGenerated = false;
|
|
27534
27545
|
get config() {
|
|
@@ -30151,7 +30162,7 @@ var createBreakoutPointSolverInput = (breakout) => {
|
|
|
30151
30162
|
};
|
|
30152
30163
|
|
|
30153
30164
|
// lib/components/primitive-components/Breakout/Breakout.ts
|
|
30154
|
-
var Breakout = class extends
|
|
30165
|
+
var Breakout = class extends Group {
|
|
30155
30166
|
constructor(props) {
|
|
30156
30167
|
super({
|
|
30157
30168
|
...props,
|
|
@@ -33410,7 +33421,7 @@ export {
|
|
|
33410
33421
|
Fiducial,
|
|
33411
33422
|
Footprint,
|
|
33412
33423
|
Fuse,
|
|
33413
|
-
|
|
33424
|
+
Group,
|
|
33414
33425
|
Hole,
|
|
33415
33426
|
Inductor,
|
|
33416
33427
|
Interconnect,
|