@tscircuit/core 0.0.1078 → 0.0.1080
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 +10 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -371,7 +371,8 @@ var asyncPhaseDependencies = {
|
|
|
371
371
|
CadModelRender: ["PcbFootprintStringRender"],
|
|
372
372
|
PartsEngineRender: ["PcbFootprintStringRender"],
|
|
373
373
|
PcbComponentAnchorAlignment: ["PcbFootprintStringRender"],
|
|
374
|
-
PcbCalcPlacementResolution: ["PcbFootprintStringRender"]
|
|
374
|
+
PcbCalcPlacementResolution: ["PcbFootprintStringRender"],
|
|
375
|
+
SourceTraceRender: ["PcbFootprintStringRender"]
|
|
375
376
|
};
|
|
376
377
|
var globalRenderCounter = 0;
|
|
377
378
|
var globalAsyncEffectCounter = 0;
|
|
@@ -1712,6 +1713,7 @@ var PrimitiveComponent2 = class extends Renderable {
|
|
|
1712
1713
|
doInitialOptimizeSelectorCache() {
|
|
1713
1714
|
if (!this.isSubcircuit) return;
|
|
1714
1715
|
const ports = this.selectAll("port");
|
|
1716
|
+
const isValidShorthandName = (name) => /^[A-Za-z_][A-Za-z0-9_-]*$/.test(name);
|
|
1715
1717
|
for (const port of ports) {
|
|
1716
1718
|
const parentComponent = port.getParentNormalComponent?.() ?? port.parent;
|
|
1717
1719
|
const parentAliases = parentComponent?.getNameAndAliases();
|
|
@@ -1723,6 +1725,9 @@ var PrimitiveComponent2 = class extends Renderable {
|
|
|
1723
1725
|
`.${parentAlias} > .${portAlias}`,
|
|
1724
1726
|
`.${parentAlias} .${portAlias}`
|
|
1725
1727
|
];
|
|
1728
|
+
if (isValidShorthandName(parentAlias) && isValidShorthandName(portAlias)) {
|
|
1729
|
+
selectors.push(`${parentAlias}.${portAlias}`);
|
|
1730
|
+
}
|
|
1726
1731
|
for (const selector of selectors) {
|
|
1727
1732
|
const ar = this._cachedSelectAllQueries.get(selector);
|
|
1728
1733
|
if (ar) {
|
|
@@ -10591,7 +10596,9 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
10591
10596
|
}
|
|
10592
10597
|
getPortsFromFootprint(opts) {
|
|
10593
10598
|
let { footprint } = this.props;
|
|
10594
|
-
if (
|
|
10599
|
+
if (typeof footprint === "string" && parseLibraryFootprintRef(footprint) && this.children.some((c) => c.componentName === "Footprint")) {
|
|
10600
|
+
footprint = this.children.find((c) => c.componentName === "Footprint");
|
|
10601
|
+
} else if (!footprint || isValidElement(footprint)) {
|
|
10595
10602
|
footprint = this.children.find((c) => c.componentName === "Footprint");
|
|
10596
10603
|
}
|
|
10597
10604
|
if (typeof footprint === "string") {
|
|
@@ -18114,7 +18121,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
18114
18121
|
var package_default = {
|
|
18115
18122
|
name: "@tscircuit/core",
|
|
18116
18123
|
type: "module",
|
|
18117
|
-
version: "0.0.
|
|
18124
|
+
version: "0.0.1079",
|
|
18118
18125
|
types: "dist/index.d.ts",
|
|
18119
18126
|
main: "dist/index.js",
|
|
18120
18127
|
module: "dist/index.js",
|