@tscircuit/core 0.0.676 → 0.0.678

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.d.ts CHANGED
@@ -1008,6 +1008,10 @@ declare class NormalComponent<ZodProps extends z.ZodType = any, PortNames extend
1008
1008
  reactSubtrees: Array<ReactSubtree>;
1009
1009
  _impliedFootprint?: string | undefined;
1010
1010
  isPrimitiveContainer: boolean;
1011
+ _isNormalComponent: boolean;
1012
+ _attributeLowerToCamelNameMap: {
1013
+ _isnormalcomponent: string;
1014
+ };
1011
1015
  _asyncSupplierPartNumbers?: SupplierPartNumbers;
1012
1016
  pcb_missing_footprint_error_id?: string;
1013
1017
  _hasStartedFootprintUrlLoad: boolean;
package/dist/index.js CHANGED
@@ -424,6 +424,18 @@ var cssSelectPrimitiveComponentAdapter = {
424
424
  const value = node._parsedProps[name];
425
425
  return typeof value === "string" ? value : value !== null && value !== void 0 ? String(value) : null;
426
426
  }
427
+ if (name in node) {
428
+ const value = node[name];
429
+ return typeof value === "string" ? value : value !== null && value !== void 0 ? String(value) : null;
430
+ }
431
+ const reverseMap = node._attributeLowerToCamelNameMap;
432
+ if (reverseMap) {
433
+ const camelCaseName = reverseMap[name];
434
+ if (camelCaseName && camelCaseName in node) {
435
+ const value = node[camelCaseName];
436
+ return typeof value === "string" ? value : value !== null && value !== void 0 ? String(value) : null;
437
+ }
438
+ }
427
439
  return null;
428
440
  },
429
441
  // Check if a node has an attribute
@@ -431,7 +443,20 @@ var cssSelectPrimitiveComponentAdapter = {
431
443
  if (name === "class") {
432
444
  return !!node._parsedProps?.name;
433
445
  }
434
- return node._parsedProps && name in node._parsedProps;
446
+ if (node._parsedProps && name in node._parsedProps) {
447
+ return true;
448
+ }
449
+ if (name in node) {
450
+ return true;
451
+ }
452
+ const reverseMap = node._attributeLowerToCamelNameMap;
453
+ if (reverseMap) {
454
+ const camelCaseName = reverseMap[name];
455
+ if (camelCaseName && camelCaseName in node) {
456
+ return true;
457
+ }
458
+ }
459
+ return false;
435
460
  },
436
461
  // Get the siblings of the node
437
462
  getSiblings: (node) => {
@@ -6337,6 +6362,13 @@ var NormalComponent = class extends PrimitiveComponent2 {
6337
6362
  reactSubtrees = [];
6338
6363
  _impliedFootprint;
6339
6364
  isPrimitiveContainer = true;
6365
+ _isNormalComponent = true;
6366
+ // Mapping from camelCase attribute names to their lowercase equivalents
6367
+ // This is used by the CSS selector adapter for fast attribute lookups
6368
+ // Reverse mapping from lowercase to camelCase for O(1) lookups
6369
+ _attributeLowerToCamelNameMap = {
6370
+ _isnormalcomponent: "_isNormalComponent"
6371
+ };
6340
6372
  _asyncSupplierPartNumbers;
6341
6373
  pcb_missing_footprint_error_id;
6342
6374
  _hasStartedFootprintUrlLoad = false;
@@ -9813,10 +9845,12 @@ function createSchematicTraceSolverInputProblem(group) {
9813
9845
  )) {
9814
9846
  if (!net.name) continue;
9815
9847
  if (!presentNetIds.has(net.name)) continue;
9816
- if (net.is_ground || net.name.startsWith("GND")) {
9848
+ if (net.is_ground || net.name.toLowerCase().startsWith("gnd")) {
9817
9849
  netToAllowedOrientations[net.name] = ["y-"];
9818
- } else if (/^V/.test(net.name)) {
9850
+ } else if (net.is_power || net.name.toLowerCase().startsWith("v")) {
9819
9851
  netToAllowedOrientations[net.name] = ["y+"];
9852
+ } else {
9853
+ netToAllowedOrientations[net.name] = ["x-", "x+"];
9820
9854
  }
9821
9855
  }
9822
9856
  return netToAllowedOrientations;
@@ -13879,7 +13913,7 @@ import { identity as identity5 } from "transformation-matrix";
13879
13913
  var package_default = {
13880
13914
  name: "@tscircuit/core",
13881
13915
  type: "module",
13882
- version: "0.0.675",
13916
+ version: "0.0.677",
13883
13917
  types: "dist/index.d.ts",
13884
13918
  main: "dist/index.js",
13885
13919
  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.676",
4
+ "version": "0.0.678",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",