@tscircuit/core 0.0.1458 → 0.0.1459
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 +34 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21401,10 +21401,22 @@ function applyTracesFromSolverOutput(args) {
|
|
|
21401
21401
|
subcircuit_connectivity_map_key = sourcePortConnKeys[0];
|
|
21402
21402
|
}
|
|
21403
21403
|
}
|
|
21404
|
+
const endpointSchematicSheetIds = new Set(
|
|
21405
|
+
solvedTraceSchematicPortIds.map(
|
|
21406
|
+
(schematicPortId) => db.schematic_port.get(schematicPortId)?.schematic_sheet_id
|
|
21407
|
+
).filter((sheetId) => Boolean(sheetId))
|
|
21408
|
+
);
|
|
21409
|
+
let schematicSheetId2;
|
|
21410
|
+
if (endpointSchematicSheetIds.size === 1) {
|
|
21411
|
+
schematicSheetId2 = endpointSchematicSheetIds.values().next().value;
|
|
21412
|
+
} else if (endpointSchematicSheetIds.size === 0) {
|
|
21413
|
+
schematicSheetId2 = group._resolveSchematicSheetId();
|
|
21414
|
+
}
|
|
21404
21415
|
pendingTraces.push({
|
|
21405
21416
|
source_trace_id,
|
|
21406
21417
|
edges,
|
|
21407
|
-
subcircuit_connectivity_map_key
|
|
21418
|
+
subcircuit_connectivity_map_key,
|
|
21419
|
+
schematic_sheet_id: schematicSheetId2
|
|
21408
21420
|
});
|
|
21409
21421
|
}
|
|
21410
21422
|
debug8(
|
|
@@ -21452,14 +21464,19 @@ function applyTracesFromSolverOutput(args) {
|
|
|
21452
21464
|
...visibleExistingTraces
|
|
21453
21465
|
]);
|
|
21454
21466
|
for (const t of visibleTraces) {
|
|
21467
|
+
const pendingTrace = pendingTraces.find(
|
|
21468
|
+
(pendingTrace2) => pendingTrace2.source_trace_id === t.source_trace_id
|
|
21469
|
+
);
|
|
21470
|
+
let traceSchematicSheetId = schematicSheetId;
|
|
21471
|
+
if (pendingTrace?.schematic_sheet_id) {
|
|
21472
|
+
traceSchematicSheetId = pendingTrace.schematic_sheet_id;
|
|
21473
|
+
}
|
|
21455
21474
|
db.schematic_trace.insert({
|
|
21456
21475
|
source_trace_id: t.source_trace_id,
|
|
21457
21476
|
edges: t.edges,
|
|
21458
21477
|
junctions: junctionsById[t.source_trace_id] ?? [],
|
|
21459
|
-
subcircuit_connectivity_map_key:
|
|
21460
|
-
|
|
21461
|
-
)?.subcircuit_connectivity_map_key,
|
|
21462
|
-
schematic_sheet_id: schematicSheetId
|
|
21478
|
+
subcircuit_connectivity_map_key: pendingTrace?.subcircuit_connectivity_map_key,
|
|
21479
|
+
schematic_sheet_id: traceSchematicSheetId
|
|
21463
21480
|
});
|
|
21464
21481
|
}
|
|
21465
21482
|
}
|
|
@@ -21609,6 +21626,11 @@ function applyNetLabelPlacements(args) {
|
|
|
21609
21626
|
const schPortIds = placement.pinIds.map(
|
|
21610
21627
|
(pinId) => pinIdToSchematicPortId.get(pinId)
|
|
21611
21628
|
);
|
|
21629
|
+
let schematicSheetId = group._resolveSchematicSheetId();
|
|
21630
|
+
const schematicPort = db.schematic_port.get(schPortIds[0]);
|
|
21631
|
+
if (schematicPort?.schematic_sheet_id) {
|
|
21632
|
+
schematicSheetId = schematicPort.schematic_sheet_id;
|
|
21633
|
+
}
|
|
21612
21634
|
let anchor_position = placement.anchorPoint;
|
|
21613
21635
|
if (schPortIds.length === 1 && schPortIds[0]) {
|
|
21614
21636
|
const anchorSchPort = db.schematic_port.get(schPortIds[0]);
|
|
@@ -21665,7 +21687,7 @@ function applyNetLabelPlacements(args) {
|
|
|
21665
21687
|
anchor_position,
|
|
21666
21688
|
center: center2,
|
|
21667
21689
|
anchor_side,
|
|
21668
|
-
schematic_sheet_id:
|
|
21690
|
+
schematic_sheet_id: schematicSheetId
|
|
21669
21691
|
};
|
|
21670
21692
|
db.schematic_net_label.insert(netLabel2);
|
|
21671
21693
|
continue;
|
|
@@ -21693,7 +21715,7 @@ function applyNetLabelPlacements(args) {
|
|
|
21693
21715
|
anchor_position,
|
|
21694
21716
|
center,
|
|
21695
21717
|
anchor_side,
|
|
21696
|
-
schematic_sheet_id:
|
|
21718
|
+
schematic_sheet_id: schematicSheetId
|
|
21697
21719
|
};
|
|
21698
21720
|
db.schematic_net_label.insert(netLabel);
|
|
21699
21721
|
}
|
|
@@ -22812,7 +22834,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
22812
22834
|
var package_default = {
|
|
22813
22835
|
name: "@tscircuit/core",
|
|
22814
22836
|
type: "module",
|
|
22815
|
-
version: "0.0.
|
|
22837
|
+
version: "0.0.1458",
|
|
22816
22838
|
types: "dist/index.d.ts",
|
|
22817
22839
|
main: "dist/index.js",
|
|
22818
22840
|
module: "dist/index.js",
|
|
@@ -24026,7 +24048,8 @@ var Group = class extends NormalComponent3 {
|
|
|
24026
24048
|
}
|
|
24027
24049
|
doInitialSourceRender() {
|
|
24028
24050
|
const { db } = this.root;
|
|
24029
|
-
for (const child of this.
|
|
24051
|
+
for (const child of this.getDescendants()) {
|
|
24052
|
+
if (child.getGroup()?.source_group_id !== this.source_group_id) continue;
|
|
24030
24053
|
db.source_component.update(child.source_component_id, {
|
|
24031
24054
|
source_group_id: this.source_group_id
|
|
24032
24055
|
});
|
|
@@ -24896,7 +24919,8 @@ var Group = class extends NormalComponent3 {
|
|
|
24896
24919
|
if (props.showAsSchematicBox) {
|
|
24897
24920
|
Group_doInitialSchematicBoxComponentRender(this);
|
|
24898
24921
|
}
|
|
24899
|
-
for (const child of this.
|
|
24922
|
+
for (const child of this.getDescendants()) {
|
|
24923
|
+
if (child.getGroup()?.source_group_id !== this.source_group_id) continue;
|
|
24900
24924
|
if (child._parsedProps?.showAsSchematicBox) continue;
|
|
24901
24925
|
if (child.schematic_component_id) {
|
|
24902
24926
|
db.schematic_component.update(child.schematic_component_id, {
|