@tscircuit/core 0.0.2156 → 0.0.2158
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 +13 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18292,6 +18292,9 @@ var NormalComponent = class extends PrimitiveComponent2 {
|
|
|
18292
18292
|
propsPinLabels.map((label, index2) => [`pin${index2 + 1}`, label])
|
|
18293
18293
|
) : propsPinLabels ? getNumericPinLabels(propsPinLabels) : void 0;
|
|
18294
18294
|
const existingChildPorts = this._getAllPortsFromChildren();
|
|
18295
|
+
const hasCustomSymbolPorts = existingChildPorts.some(
|
|
18296
|
+
(port) => port._getSymbolAncestor() !== null
|
|
18297
|
+
);
|
|
18295
18298
|
const hasExistingOrQueuedPortWithPinNumber = (pinNumber) => existingChildPorts.some((p2) => p2._parsedProps.pinNumber === pinNumber) || portsToCreate.some((p2) => p2._parsedProps.pinNumber === pinNumber);
|
|
18296
18299
|
const schPortArrangement = this._getSchematicPortArrangement();
|
|
18297
18300
|
if (schPortArrangement && !pinLabels) {
|
|
@@ -18418,6 +18421,7 @@ var NormalComponent = class extends PrimitiveComponent2 {
|
|
|
18418
18421
|
symbolPortMatches.set(symPort, existingPort);
|
|
18419
18422
|
existingPort.schematicSymbolPortDef = symPort;
|
|
18420
18423
|
} else {
|
|
18424
|
+
if (hasCustomSymbolPorts) continue;
|
|
18421
18425
|
const port = getPortFromHints(
|
|
18422
18426
|
symPort.labels.concat(
|
|
18423
18427
|
opts.additionalAliases?.[`pin${pinNumber}`] ?? []
|
|
@@ -119173,7 +119177,7 @@ var RoutingPhasePreparationError = class extends Error {
|
|
|
119173
119177
|
var package_default = {
|
|
119174
119178
|
name: "@tscircuit/core",
|
|
119175
119179
|
type: "module",
|
|
119176
|
-
version: "0.0.
|
|
119180
|
+
version: "0.0.2157",
|
|
119177
119181
|
types: "dist/index.d.ts",
|
|
119178
119182
|
main: "dist/index.js",
|
|
119179
119183
|
module: "dist/index.js",
|
|
@@ -119980,13 +119984,20 @@ function getEndpointSourcePortIdsFromGeometry(db2, trace) {
|
|
|
119980
119984
|
(point6) => Boolean(point6) && point6.route_type === "wire" && point6.x !== void 0 && point6.y !== void 0
|
|
119981
119985
|
);
|
|
119982
119986
|
for (const endpoint of endpoints) {
|
|
119987
|
+
const exactEndpointSourcePortIds = /* @__PURE__ */ new Set();
|
|
119983
119988
|
for (const pcbPort of db2.pcb_port.list()) {
|
|
119984
119989
|
if (!pcbPort.source_port_id) continue;
|
|
119985
119990
|
if (endpoint.layer && pcbPort.layers && !pcbPort.layers.includes(endpoint.layer))
|
|
119986
119991
|
continue;
|
|
119987
119992
|
if (distance18(endpoint, pcbPort) <= 0.01) {
|
|
119988
|
-
|
|
119993
|
+
exactEndpointSourcePortIds.add(pcbPort.source_port_id);
|
|
119994
|
+
}
|
|
119995
|
+
}
|
|
119996
|
+
if (exactEndpointSourcePortIds.size > 0) {
|
|
119997
|
+
for (const sourcePortId of exactEndpointSourcePortIds) {
|
|
119998
|
+
sourcePortIds.add(sourcePortId);
|
|
119989
119999
|
}
|
|
120000
|
+
continue;
|
|
119990
120001
|
}
|
|
119991
120002
|
for (const smtpad of db2.pcb_smtpad.list()) {
|
|
119992
120003
|
if (!smtpad.pcb_port_id) continue;
|