@tscircuit/core 0.0.1078 → 0.0.1079

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1712,6 +1712,7 @@ var PrimitiveComponent2 = class extends Renderable {
1712
1712
  doInitialOptimizeSelectorCache() {
1713
1713
  if (!this.isSubcircuit) return;
1714
1714
  const ports = this.selectAll("port");
1715
+ const isValidShorthandName = (name) => /^[A-Za-z_][A-Za-z0-9_-]*$/.test(name);
1715
1716
  for (const port of ports) {
1716
1717
  const parentComponent = port.getParentNormalComponent?.() ?? port.parent;
1717
1718
  const parentAliases = parentComponent?.getNameAndAliases();
@@ -1723,6 +1724,9 @@ var PrimitiveComponent2 = class extends Renderable {
1723
1724
  `.${parentAlias} > .${portAlias}`,
1724
1725
  `.${parentAlias} .${portAlias}`
1725
1726
  ];
1727
+ if (isValidShorthandName(parentAlias) && isValidShorthandName(portAlias)) {
1728
+ selectors.push(`${parentAlias}.${portAlias}`);
1729
+ }
1726
1730
  for (const selector of selectors) {
1727
1731
  const ar = this._cachedSelectAllQueries.get(selector);
1728
1732
  if (ar) {
@@ -18114,7 +18118,7 @@ import { identity as identity5 } from "transformation-matrix";
18114
18118
  var package_default = {
18115
18119
  name: "@tscircuit/core",
18116
18120
  type: "module",
18117
- version: "0.0.1077",
18121
+ version: "0.0.1078",
18118
18122
  types: "dist/index.d.ts",
18119
18123
  main: "dist/index.js",
18120
18124
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1078",
4
+ "version": "0.0.1079",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",