@tscircuit/core 0.0.1949 → 0.0.1951
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 +33 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -15213,15 +15213,41 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
15213
15213
|
if (config.schematicSymbolName && !opts.ignoreSymbolPorts) {
|
|
15214
15214
|
const sym = symbols2[this._getSchematicSymbolNameOrThrow()];
|
|
15215
15215
|
if (!sym) return;
|
|
15216
|
+
const hasSymbolPortAliases = sym.ports.some(
|
|
15217
|
+
(port) => port.labels.some((label) => !/^(?:pin)?\d+$/.test(label))
|
|
15218
|
+
);
|
|
15219
|
+
if (hasSymbolPortAliases && pinLabels) {
|
|
15220
|
+
for (let pinNumber = 1; pinNumber <= (opts.pinCount ?? 0); pinNumber++) {
|
|
15221
|
+
if (!hasExistingOrQueuedPortWithPinNumber(pinNumber)) {
|
|
15222
|
+
portsToCreate.push(new Port({ pinNumber }));
|
|
15223
|
+
}
|
|
15224
|
+
}
|
|
15225
|
+
}
|
|
15226
|
+
const availablePorts = [
|
|
15227
|
+
...this._getAllPortsFromChildren(),
|
|
15228
|
+
...portsToCreate
|
|
15229
|
+
];
|
|
15230
|
+
const symbolPortMatches = /* @__PURE__ */ new Map();
|
|
15231
|
+
for (const symPort of sym.ports) {
|
|
15232
|
+
const aliases = symPort.labels.filter(
|
|
15233
|
+
(label) => !/^(?:pin)?\d+$/.test(label)
|
|
15234
|
+
);
|
|
15235
|
+
const matches = availablePorts.filter(
|
|
15236
|
+
(port) => port.getNameAndAliases().some((alias) => aliases.includes(alias))
|
|
15237
|
+
);
|
|
15238
|
+
if (matches.length === 1) symbolPortMatches.set(symPort, matches[0]);
|
|
15239
|
+
}
|
|
15216
15240
|
for (const symPort of sym.ports) {
|
|
15217
15241
|
const pinNumber = getPinNumberFromLabels(symPort.labels);
|
|
15218
15242
|
if (!pinNumber) continue;
|
|
15219
|
-
const
|
|
15220
|
-
(
|
|
15221
|
-
) ?? portsToCreate.find(
|
|
15222
|
-
(p) => p._parsedProps.pinNumber === Number(pinNumber)
|
|
15243
|
+
const unmatchedPorts = availablePorts.filter(
|
|
15244
|
+
(port) => ![...symbolPortMatches.values()].includes(port)
|
|
15223
15245
|
);
|
|
15246
|
+
const existingPort = symbolPortMatches.get(symPort) ?? unmatchedPorts.find(
|
|
15247
|
+
(port) => port._parsedProps.pinNumber === Number(pinNumber)
|
|
15248
|
+
) ?? (hasSymbolPortAliases && sym.ports.length - symbolPortMatches.size === 1 && unmatchedPorts.length === 1 ? unmatchedPorts[0] : void 0);
|
|
15224
15249
|
if (existingPort) {
|
|
15250
|
+
symbolPortMatches.set(symPort, existingPort);
|
|
15225
15251
|
existingPort.schematicSymbolPortDef = symPort;
|
|
15226
15252
|
} else {
|
|
15227
15253
|
const port = getPortFromHints(
|
|
@@ -63461,7 +63487,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
63461
63487
|
var package_default = {
|
|
63462
63488
|
name: "@tscircuit/core",
|
|
63463
63489
|
type: "module",
|
|
63464
|
-
version: "0.0.
|
|
63490
|
+
version: "0.0.1950",
|
|
63465
63491
|
types: "dist/index.d.ts",
|
|
63466
63492
|
main: "dist/index.js",
|
|
63467
63493
|
module: "dist/index.js",
|
|
@@ -63497,7 +63523,7 @@ var package_default = {
|
|
|
63497
63523
|
"@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39",
|
|
63498
63524
|
"@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
|
|
63499
63525
|
"@tscircuit/capacity-autorouter": "^0.0.913",
|
|
63500
|
-
"@tscircuit/checks": "^0.0.
|
|
63526
|
+
"@tscircuit/checks": "^0.0.205",
|
|
63501
63527
|
"@tscircuit/circuit-json-util": "^0.0.114",
|
|
63502
63528
|
"@tscircuit/common": "^0.0.20",
|
|
63503
63529
|
"@tscircuit/copper-pour-solver": "^0.0.56",
|
|
@@ -63551,7 +63577,7 @@ var package_default = {
|
|
|
63551
63577
|
poppygl: "^0.0.29",
|
|
63552
63578
|
react: "^19.1.0",
|
|
63553
63579
|
"react-dom": "^19.1.0",
|
|
63554
|
-
"schematic-symbols": "^0.0.
|
|
63580
|
+
"schematic-symbols": "^0.0.246",
|
|
63555
63581
|
spicets: "^0.0.4",
|
|
63556
63582
|
spicey: "^0.0.14",
|
|
63557
63583
|
"stack-svgs": "^0.0.1",
|
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.1951",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39",
|
|
38
38
|
"@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
|
|
39
39
|
"@tscircuit/capacity-autorouter": "^0.0.913",
|
|
40
|
-
"@tscircuit/checks": "^0.0.
|
|
40
|
+
"@tscircuit/checks": "^0.0.205",
|
|
41
41
|
"@tscircuit/circuit-json-util": "^0.0.114",
|
|
42
42
|
"@tscircuit/common": "^0.0.20",
|
|
43
43
|
"@tscircuit/copper-pour-solver": "^0.0.56",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"poppygl": "^0.0.29",
|
|
92
92
|
"react": "^19.1.0",
|
|
93
93
|
"react-dom": "^19.1.0",
|
|
94
|
-
"schematic-symbols": "^0.0.
|
|
94
|
+
"schematic-symbols": "^0.0.246",
|
|
95
95
|
"spicets": "^0.0.4",
|
|
96
96
|
"spicey": "^0.0.14",
|
|
97
97
|
"stack-svgs": "^0.0.1",
|