@tscircuit/core 0.0.373 → 0.0.375

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
@@ -427,8 +427,10 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
427
427
  doesSelectorMatch(selector: string): boolean;
428
428
  getSubcircuit(): ISubcircuit;
429
429
  getGroup(): IGroup | null;
430
- selectAll(selector: string): PrimitiveComponent[];
431
- selectOne<T = PrimitiveComponent>(selector: string, options?: {
430
+ _cachedSelectAllQueries: Map<string, PrimitiveComponent[]>;
431
+ selectAll(selectorRaw: string): PrimitiveComponent[];
432
+ _cachedSelectOneQueries: Map<string, PrimitiveComponent | null>;
433
+ selectOne<T = PrimitiveComponent>(selectorRaw: string, options?: {
432
434
  type?: string;
433
435
  port?: boolean;
434
436
  pcbPrimitive?: boolean;
@@ -1408,7 +1410,9 @@ declare class Board extends Group<typeof boardProps> {
1408
1410
  }>, "many">>;
1409
1411
  outlineOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1410
1412
  outlineOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1413
+ material: zod.ZodDefault<zod.ZodEnum<["fr4", "fr1"]>>;
1411
1414
  }>, "strip", zod.ZodTypeAny, {
1415
+ material: "fr4" | "fr1";
1412
1416
  pcbX?: number | undefined;
1413
1417
  pcbY?: number | undefined;
1414
1418
  pcbRotation?: number | undefined;
@@ -1656,6 +1660,7 @@ declare class Board extends Group<typeof boardProps> {
1656
1660
  }[] | undefined;
1657
1661
  outlineOffsetX?: string | number | undefined;
1658
1662
  outlineOffsetY?: string | number | undefined;
1663
+ material?: "fr4" | "fr1" | undefined;
1659
1664
  }>;
1660
1665
  };
1661
1666
  get boardThickness(): number;
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ __export(components_exports, {
32
32
  Port: () => Port,
33
33
  Potentiometer: () => Potentiometer,
34
34
  PowerSource: () => PowerSource,
35
- PrimitiveComponent: () => PrimitiveComponent,
35
+ PrimitiveComponent: () => PrimitiveComponent2,
36
36
  PushButton: () => PushButton,
37
37
  Renderable: () => Renderable,
38
38
  Resistor: () => Resistor,
@@ -531,8 +531,8 @@ var underscorifyPortArrangement = (portArrangement) => {
531
531
  return void 0;
532
532
  };
533
533
 
534
- // lib/components/base-components/PrimitiveComponent.ts
535
- import Debug2 from "debug";
534
+ // lib/components/base-components/PrimitiveComponent/PrimitiveComponent.ts
535
+ import "debug";
536
536
 
537
537
  // lib/errors/InvalidProps.ts
538
538
  var InvalidProps = class extends Error {
@@ -590,7 +590,7 @@ function isMatchingSelector(component, selector) {
590
590
  });
591
591
  }
592
592
 
593
- // lib/components/base-components/PrimitiveComponent.ts
593
+ // lib/components/base-components/PrimitiveComponent/PrimitiveComponent.ts
594
594
  import { symbols } from "schematic-symbols";
595
595
  import {
596
596
  applyToPoint,
@@ -601,8 +601,123 @@ import {
601
601
  translate
602
602
  } from "transformation-matrix";
603
603
  import { z as z2 } from "zod";
604
- var debugSelectAll = Debug2("tscircuit:primitive-component:selectAll");
605
- var PrimitiveComponent = class extends Renderable {
604
+ import { selectOne, selectAll } from "css-select";
605
+
606
+ // lib/components/base-components/PrimitiveComponent/cssSelectPrimitiveComponentAdapter.ts
607
+ var cssSelectPrimitiveComponentAdapter = {
608
+ // Is the node an element?
609
+ isTag: (node) => true,
610
+ // Get the parent of the node
611
+ getParent: (node) => node.parent,
612
+ // Get the children of the node
613
+ getChildren: (node) => node.children,
614
+ // Get the name of the tag
615
+ getName: (node) => node.lowercaseComponentName,
616
+ // Get the attribute value
617
+ getAttributeValue: (node, name) => {
618
+ if (name === "class" && "getNameAndAliases" in node) {
619
+ return node.getNameAndAliases().join(" ");
620
+ }
621
+ if (name === "name" && node._parsedProps?.name) {
622
+ return node._parsedProps.name;
623
+ }
624
+ if (node._parsedProps && name in node._parsedProps) {
625
+ const value = node._parsedProps[name];
626
+ return typeof value === "string" ? value : value !== null && value !== void 0 ? String(value) : null;
627
+ }
628
+ return null;
629
+ },
630
+ // Check if a node has an attribute
631
+ hasAttrib: (node, name) => {
632
+ if (name === "class") {
633
+ return !!node._parsedProps?.name;
634
+ }
635
+ return node._parsedProps && name in node._parsedProps;
636
+ },
637
+ // Get the siblings of the node
638
+ getSiblings: (node) => {
639
+ if (!node.parent) return [];
640
+ return node.parent.children;
641
+ },
642
+ // Get the previous sibling
643
+ prevElementSibling: (node) => {
644
+ if (!node.parent) return null;
645
+ const siblings = node.parent.children;
646
+ const idx = siblings.indexOf(node);
647
+ return idx > 0 ? siblings[idx - 1] : null;
648
+ },
649
+ // Get the text content
650
+ getText: () => "",
651
+ // Remove the node
652
+ removeSubsets: (nodes) => {
653
+ return nodes.filter(
654
+ (node, i) => !nodes.some(
655
+ (other, j) => i !== j && other !== node && other.getDescendants().includes(node)
656
+ )
657
+ );
658
+ },
659
+ // Determine if element a is a subset of element b
660
+ existsOne: (test, nodes) => {
661
+ return nodes.some(test);
662
+ },
663
+ // Find all elements matching a selector
664
+ findAll: (test, nodes) => {
665
+ const result = [];
666
+ const recurse = (node) => {
667
+ if (test(node)) {
668
+ result.push(node);
669
+ }
670
+ for (const child of node.children) {
671
+ recurse(child);
672
+ }
673
+ };
674
+ for (const node of nodes) {
675
+ recurse(node);
676
+ }
677
+ return result;
678
+ },
679
+ // Find one element matching a selector
680
+ findOne: (test, nodes) => {
681
+ for (const node of nodes) {
682
+ if (test(node)) return node;
683
+ const children = node.children;
684
+ if (children.length > 0) {
685
+ const result = cssSelectPrimitiveComponentAdapter.findOne(
686
+ test,
687
+ children
688
+ );
689
+ if (result) return result;
690
+ }
691
+ }
692
+ return null;
693
+ },
694
+ equals: (a, b) => {
695
+ return a._renderId === b._renderId;
696
+ },
697
+ isHovered: (elem) => false,
698
+ isVisited: (elem) => false,
699
+ isActive: (elem) => false
700
+ };
701
+ var cssSelectPrimitiveComponentAdapterWithoutSubcircuits = {
702
+ ...cssSelectPrimitiveComponentAdapter,
703
+ getChildren: (node) => node.children.filter((c) => !c.isSubcircuit)
704
+ };
705
+ var cssSelectPrimitiveComponentAdapterOnlySubcircuits = {
706
+ ...cssSelectPrimitiveComponentAdapter,
707
+ getChildren: (node) => node.children.filter((c) => c.isSubcircuit)
708
+ };
709
+
710
+ // lib/components/base-components/PrimitiveComponent/preprocessSelector.ts
711
+ var preprocessSelector = (selector) => {
712
+ return selector.replace(/ pin/g, " port").replace(/ subcircuit\./g, " group[isSubcircuit=true]").trim();
713
+ };
714
+
715
+ // lib/components/base-components/PrimitiveComponent/PrimitiveComponent.ts
716
+ var cssSelectOptionsInsideSubcircuit = {
717
+ adapter: cssSelectPrimitiveComponentAdapterWithoutSubcircuits,
718
+ cacheResults: true
719
+ };
720
+ var PrimitiveComponent2 = class extends Renderable {
606
721
  parent = null;
607
722
  children;
608
723
  childrenPendingRemoval;
@@ -1007,57 +1122,65 @@ var PrimitiveComponent = class extends Renderable {
1007
1122
  if (this.isGroup) return this;
1008
1123
  return this.parent?.getGroup?.() ?? null;
1009
1124
  }
1010
- selectAll(selector) {
1011
- debugSelectAll(`selectAll: "${selector}"`);
1012
- const parts = selector.trim().split(/\s+/);
1013
- let currentSearch = parts[0] === ">" ? this.children : this.getSelectableDescendants();
1014
- let currentResults = [];
1015
- let onlyDirectChildren = false;
1016
- let iteration = -1;
1017
- for (const part of parts) {
1018
- iteration++;
1019
- debugSelectAll(`
1020
-
1021
- iteration: ${iteration}`);
1022
- debugSelectAll(`part: "${parts[iteration]}"`);
1023
- debugSelectAll(
1024
- `currentSearch: [${currentSearch.map((r) => r.getString()).join(",")}]`
1125
+ _cachedSelectAllQueries = /* @__PURE__ */ new Map();
1126
+ selectAll(selectorRaw) {
1127
+ if (this._cachedSelectAllQueries.has(selectorRaw)) {
1128
+ return this._cachedSelectAllQueries.get(
1129
+ selectorRaw
1025
1130
  );
1026
- debugSelectAll(
1027
- `currentResults: [${currentResults.map((r) => r.getString()).join(",")}]`
1028
- );
1029
- if (part === ">") {
1030
- onlyDirectChildren = true;
1031
- } else {
1032
- const newResults = currentSearch.filter(
1033
- (component) => isMatchingSelector(component, part)
1034
- );
1035
- const newSearch = newResults.flatMap((component) => {
1036
- if (onlyDirectChildren) return component.children;
1037
- return component.getSelectableDescendants();
1038
- });
1039
- currentSearch = newSearch;
1040
- currentResults = newResults;
1041
- onlyDirectChildren = false;
1042
- }
1043
1131
  }
1044
- return currentResults;
1045
- }
1046
- selectOne(selector, options) {
1047
- let type = options?.type?.toLowerCase();
1048
- if (options?.port) type = "port";
1049
- if (type) {
1050
- return this.selectAll(selector).find(
1051
- (c) => c.lowercaseComponentName === type
1052
- ) ?? null;
1132
+ const selector = preprocessSelector(selectorRaw);
1133
+ const result = selectAll(selector, this, cssSelectOptionsInsideSubcircuit);
1134
+ if (result.length > 0) {
1135
+ this._cachedSelectAllQueries.set(selectorRaw, result);
1136
+ return result;
1053
1137
  }
1054
- if (options?.pcbPrimitive) {
1055
- return this.selectAll(selector).find((c) => c.isPcbPrimitive) ?? null;
1138
+ const [firstpart, ...rest] = selector.split(" ");
1139
+ const subcircuit = selectOne(firstpart, this, {
1140
+ adapter: cssSelectPrimitiveComponentAdapterOnlySubcircuits
1141
+ });
1142
+ if (!subcircuit) return [];
1143
+ const result2 = subcircuit.selectAll(rest.join(" "));
1144
+ this._cachedSelectAllQueries.set(selectorRaw, result2);
1145
+ return result2;
1146
+ }
1147
+ _cachedSelectOneQueries = /* @__PURE__ */ new Map();
1148
+ selectOne(selectorRaw, options) {
1149
+ if (this._cachedSelectOneQueries.has(selectorRaw)) {
1150
+ return this._cachedSelectOneQueries.get(selectorRaw);
1151
+ }
1152
+ const selector = preprocessSelector(selectorRaw);
1153
+ if (options?.port) {
1154
+ options.type = "port";
1155
+ }
1156
+ let result = null;
1157
+ if (options?.type) {
1158
+ const allMatching = selectAll(
1159
+ selector,
1160
+ this,
1161
+ cssSelectOptionsInsideSubcircuit
1162
+ );
1163
+ result = allMatching.find(
1164
+ (n) => n.lowercaseComponentName === options.type
1165
+ );
1056
1166
  }
1057
- if (options?.schematicPrimitive) {
1058
- return this.selectAll(selector).find((c) => c.isSchematicPrimitive) ?? null;
1167
+ result ??= selectOne(
1168
+ selector,
1169
+ this,
1170
+ cssSelectOptionsInsideSubcircuit
1171
+ );
1172
+ if (result) {
1173
+ this._cachedSelectOneQueries.set(selectorRaw, result);
1174
+ return result;
1059
1175
  }
1060
- return this.selectAll(selector)[0] ?? null;
1176
+ const [firstpart, ...rest] = selector.split(" ");
1177
+ const subcircuit = selectOne(firstpart, this, {
1178
+ adapter: cssSelectPrimitiveComponentAdapterOnlySubcircuits
1179
+ });
1180
+ if (!subcircuit) return null;
1181
+ result = subcircuit.selectOne(rest.join(" "), options);
1182
+ this._cachedSelectOneQueries.set(selectorRaw, result);
1183
+ return result;
1061
1184
  }
1062
1185
  getAvailablePcbLayers() {
1063
1186
  if (this.isPcbPrimitive) {
@@ -1173,7 +1296,7 @@ import { autoroute } from "@tscircuit/infgrid-ijump-astar";
1173
1296
  var netProps = z3.object({
1174
1297
  name: z3.string()
1175
1298
  });
1176
- var Net = class extends PrimitiveComponent {
1299
+ var Net = class extends PrimitiveComponent2 {
1177
1300
  source_net_id;
1178
1301
  get config() {
1179
1302
  return {
@@ -1362,7 +1485,7 @@ var createNetsFromProps = (component, props) => {
1362
1485
  // lib/components/primitive-components/SmtPad.ts
1363
1486
  import { smtPadProps } from "@tscircuit/props";
1364
1487
  import { decomposeTSR } from "transformation-matrix";
1365
- var SmtPad = class extends PrimitiveComponent {
1488
+ var SmtPad = class extends PrimitiveComponent2 {
1366
1489
  pcb_smtpad_id = null;
1367
1490
  matchedPort = null;
1368
1491
  isPcbPrimitive = true;
@@ -1567,7 +1690,7 @@ var SmtPad = class extends PrimitiveComponent {
1567
1690
  // lib/components/primitive-components/SilkscreenPath.ts
1568
1691
  import { silkscreenPathProps } from "@tscircuit/props";
1569
1692
  import { applyToPoint as applyToPoint2 } from "transformation-matrix";
1570
- var SilkscreenPath = class extends PrimitiveComponent {
1693
+ var SilkscreenPath = class extends PrimitiveComponent2 {
1571
1694
  pcb_silkscreen_path_id = null;
1572
1695
  isPcbPrimitive = true;
1573
1696
  get config() {
@@ -1630,7 +1753,7 @@ var SilkscreenPath = class extends PrimitiveComponent {
1630
1753
 
1631
1754
  // lib/components/primitive-components/PlatedHole.ts
1632
1755
  import { platedHoleProps } from "@tscircuit/props";
1633
- var PlatedHole = class extends PrimitiveComponent {
1756
+ var PlatedHole = class extends PrimitiveComponent2 {
1634
1757
  pcb_plated_hole_id = null;
1635
1758
  matchedPort = null;
1636
1759
  isPcbPrimitive = true;
@@ -1749,7 +1872,7 @@ var PlatedHole = class extends PrimitiveComponent {
1749
1872
  // lib/components/primitive-components/Keepout.ts
1750
1873
  import { pcbKeepoutProps } from "@tscircuit/props";
1751
1874
  import { decomposeTSR as decomposeTSR2 } from "transformation-matrix";
1752
- var Keepout = class extends PrimitiveComponent {
1875
+ var Keepout = class extends PrimitiveComponent2 {
1753
1876
  pcb_keepout_id = null;
1754
1877
  isPcbPrimitive = true;
1755
1878
  get config() {
@@ -1804,7 +1927,7 @@ var Keepout = class extends PrimitiveComponent {
1804
1927
 
1805
1928
  // lib/components/primitive-components/Hole.ts
1806
1929
  import { holeProps } from "@tscircuit/props";
1807
- var Hole = class extends PrimitiveComponent {
1930
+ var Hole = class extends PrimitiveComponent2 {
1808
1931
  pcb_hole_id = null;
1809
1932
  isPcbPrimitive = true;
1810
1933
  get config() {
@@ -1861,7 +1984,7 @@ var Hole = class extends PrimitiveComponent {
1861
1984
 
1862
1985
  // lib/components/primitive-components/SilkscreenText.ts
1863
1986
  import { silkscreenTextProps } from "@tscircuit/props";
1864
- var SilkscreenText = class extends PrimitiveComponent {
1987
+ var SilkscreenText = class extends PrimitiveComponent2 {
1865
1988
  isPcbPrimitive = true;
1866
1989
  get config() {
1867
1990
  return {
@@ -2105,7 +2228,7 @@ var portProps = z4.object({
2105
2228
  pinNumber: z4.number().optional(),
2106
2229
  aliases: z4.array(z4.string()).optional()
2107
2230
  });
2108
- var Port = class extends PrimitiveComponent {
2231
+ var Port = class extends PrimitiveComponent2 {
2109
2232
  source_port_id = null;
2110
2233
  pcb_port_id = null;
2111
2234
  schematic_port_id = null;
@@ -2756,7 +2879,7 @@ import { footprintProps } from "@tscircuit/props";
2756
2879
  import * as kiwi from "@lume/kiwi";
2757
2880
  import Debug3 from "debug";
2758
2881
  var debug2 = Debug3("tscircuit:core:footprint");
2759
- var Footprint = class extends PrimitiveComponent {
2882
+ var Footprint = class extends PrimitiveComponent2 {
2760
2883
  get config() {
2761
2884
  return {
2762
2885
  componentName: "Footprint",
@@ -3708,7 +3831,7 @@ var portToObjective = (port) => {
3708
3831
  };
3709
3832
  };
3710
3833
  var SHOULD_USE_SINGLE_LAYER_ROUTING = false;
3711
- var Trace2 = class extends PrimitiveComponent {
3834
+ var Trace2 = class extends PrimitiveComponent2 {
3712
3835
  source_trace_id = null;
3713
3836
  pcb_trace_id = null;
3714
3837
  schematic_trace_id = null;
@@ -3759,7 +3882,7 @@ var Trace2 = class extends PrimitiveComponent {
3759
3882
  }));
3760
3883
  for (const { selector, port } of portsWithSelectors) {
3761
3884
  if (!port) {
3762
- const parentSelector = selector.replace(/\>.*$/, "");
3885
+ const parentSelector = selector.replace(/(\> )?[^ ]+$/, "");
3763
3886
  const targetComponent = this.getSubcircuit().selectOne(parentSelector);
3764
3887
  if (!targetComponent) {
3765
3888
  this.renderError(`Could not find port for selector "${selector}"`);
@@ -4457,7 +4580,7 @@ var rotation3 = z6.object({
4457
4580
  y: rotation,
4458
4581
  z: rotation
4459
4582
  });
4460
- var NormalComponent = class extends PrimitiveComponent {
4583
+ var NormalComponent = class extends PrimitiveComponent2 {
4461
4584
  reactSubtrees = [];
4462
4585
  _impliedFootprint;
4463
4586
  isPrimitiveContainer = true;
@@ -5346,7 +5469,7 @@ import "zod";
5346
5469
  // lib/components/primitive-components/TraceHint.ts
5347
5470
  import { traceHintProps } from "@tscircuit/props";
5348
5471
  import { applyToPoint as applyToPoint4 } from "transformation-matrix";
5349
- var TraceHint = class extends PrimitiveComponent {
5472
+ var TraceHint = class extends PrimitiveComponent2 {
5350
5473
  matchedPort = null;
5351
5474
  get config() {
5352
5475
  return {
@@ -6388,7 +6511,8 @@ var Board = class extends Group {
6388
6511
  outline: props.outline?.map((point) => ({
6389
6512
  x: point.x + (props.outlineOffsetX ?? 0),
6390
6513
  y: point.y + (props.outlineOffsetY ?? 0)
6391
- }))
6514
+ })),
6515
+ material: props.material
6392
6516
  });
6393
6517
  this.pcb_board_id = pcb_board.pcb_board_id;
6394
6518
  }
@@ -6755,7 +6879,7 @@ var edgeSpecifiers = [
6755
6879
  "bottomedge",
6756
6880
  "center"
6757
6881
  ];
6758
- var Constraint2 = class extends PrimitiveComponent {
6882
+ var Constraint2 = class extends PrimitiveComponent2 {
6759
6883
  get config() {
6760
6884
  return {
6761
6885
  componentName: "Constraint",
@@ -6811,7 +6935,7 @@ var Constraint2 = class extends PrimitiveComponent {
6811
6935
  // lib/components/primitive-components/FabricationNotePath.ts
6812
6936
  import { fabricationNotePathProps } from "@tscircuit/props";
6813
6937
  import { applyToPoint as applyToPoint5 } from "transformation-matrix";
6814
- var FabricationNotePath = class extends PrimitiveComponent {
6938
+ var FabricationNotePath = class extends PrimitiveComponent2 {
6815
6939
  fabrication_note_path_id = null;
6816
6940
  get config() {
6817
6941
  return {
@@ -6855,7 +6979,7 @@ var FabricationNotePath = class extends PrimitiveComponent {
6855
6979
 
6856
6980
  // lib/components/primitive-components/FabricationNoteText.ts
6857
6981
  import { fabricationNoteTextProps } from "@tscircuit/props";
6858
- var FabricationNoteText = class extends PrimitiveComponent {
6982
+ var FabricationNoteText = class extends PrimitiveComponent2 {
6859
6983
  get config() {
6860
6984
  return {
6861
6985
  componentName: "FabricationNoteText",
@@ -6899,7 +7023,7 @@ var Subcircuit = class extends Group {
6899
7023
 
6900
7024
  // lib/components/primitive-components/NetAlias.ts
6901
7025
  import { netAliasProps } from "@tscircuit/props";
6902
- var NetAlias = class extends PrimitiveComponent {
7026
+ var NetAlias = class extends PrimitiveComponent2 {
6903
7027
  source_net_alias_id;
6904
7028
  get config() {
6905
7029
  return {
@@ -6926,7 +7050,7 @@ var NetAlias = class extends PrimitiveComponent {
6926
7050
 
6927
7051
  // lib/components/primitive-components/SilkscreenCircle.ts
6928
7052
  import { silkscreenCircleProps } from "@tscircuit/props";
6929
- var SilkscreenCircle = class extends PrimitiveComponent {
7053
+ var SilkscreenCircle = class extends PrimitiveComponent2 {
6930
7054
  pcb_silkscreen_circle_id = null;
6931
7055
  isPcbPrimitive = true;
6932
7056
  get config() {
@@ -6971,7 +7095,7 @@ var SilkscreenCircle = class extends PrimitiveComponent {
6971
7095
 
6972
7096
  // lib/components/primitive-components/SilkscreenRect.ts
6973
7097
  import { silkscreenRectProps } from "@tscircuit/props";
6974
- var SilkscreenRect = class extends PrimitiveComponent {
7098
+ var SilkscreenRect = class extends PrimitiveComponent2 {
6975
7099
  pcb_silkscreen_rect_id = null;
6976
7100
  isPcbPrimitive = true;
6977
7101
  get config() {
@@ -7015,7 +7139,7 @@ var SilkscreenRect = class extends PrimitiveComponent {
7015
7139
 
7016
7140
  // lib/components/primitive-components/SilkscreenLine.ts
7017
7141
  import { silkscreenLineProps } from "@tscircuit/props";
7018
- var SilkscreenLine = class extends PrimitiveComponent {
7142
+ var SilkscreenLine = class extends PrimitiveComponent2 {
7019
7143
  pcb_silkscreen_line_id = null;
7020
7144
  isPcbPrimitive = true;
7021
7145
  get config() {
@@ -7059,7 +7183,7 @@ var SilkscreenLine = class extends PrimitiveComponent {
7059
7183
 
7060
7184
  // lib/components/primitive-components/Via.ts
7061
7185
  import { viaProps } from "@tscircuit/props";
7062
- var Via = class extends PrimitiveComponent {
7186
+ var Via = class extends PrimitiveComponent2 {
7063
7187
  pcb_via_id = null;
7064
7188
  matchedPort = null;
7065
7189
  isPcbPrimitive = true;
@@ -7513,7 +7637,7 @@ import { identity as identity4 } from "transformation-matrix";
7513
7637
  var package_default = {
7514
7638
  name: "@tscircuit/core",
7515
7639
  type: "module",
7516
- version: "0.0.372",
7640
+ version: "0.0.374",
7517
7641
  types: "dist/index.d.ts",
7518
7642
  main: "dist/index.js",
7519
7643
  module: "dist/index.js",
@@ -7548,6 +7672,7 @@ var package_default = {
7548
7672
  "chokidar-cli": "^3.0.0",
7549
7673
  "circuit-to-svg": "^0.0.113",
7550
7674
  concurrently: "^9.1.2",
7675
+ "css-select": "^5.1.0",
7551
7676
  debug: "^4.3.6",
7552
7677
  "graphics-debug": "^0.0.4",
7553
7678
  howfat: "^0.3.8",
@@ -7570,9 +7695,9 @@ var package_default = {
7570
7695
  "@tscircuit/circuit-json-util": "^0.0.47",
7571
7696
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
7572
7697
  "@tscircuit/math-utils": "^0.0.12",
7573
- "@tscircuit/props": "^0.0.171",
7698
+ "@tscircuit/props": "^0.0.172",
7574
7699
  "@tscircuit/schematic-autolayout": "^0.0.6",
7575
- "circuit-json": "^0.0.153",
7700
+ "circuit-json": "^0.0.154",
7576
7701
  "circuit-json-to-connectivity-map": "^0.0.20",
7577
7702
  "format-si-unit": "^0.0.3",
7578
7703
  nanoid: "^5.0.7",
@@ -7967,7 +8092,7 @@ export {
7967
8092
  Port,
7968
8093
  Potentiometer,
7969
8094
  PowerSource,
7970
- PrimitiveComponent,
8095
+ PrimitiveComponent2 as PrimitiveComponent,
7971
8096
  Project,
7972
8097
  PushButton,
7973
8098
  Renderable,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.373",
4
+ "version": "0.0.375",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -36,6 +36,7 @@
36
36
  "chokidar-cli": "^3.0.0",
37
37
  "circuit-to-svg": "^0.0.113",
38
38
  "concurrently": "^9.1.2",
39
+ "css-select": "^5.1.0",
39
40
  "debug": "^4.3.6",
40
41
  "graphics-debug": "^0.0.4",
41
42
  "howfat": "^0.3.8",
@@ -58,9 +59,9 @@
58
59
  "@tscircuit/circuit-json-util": "^0.0.47",
59
60
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
60
61
  "@tscircuit/math-utils": "^0.0.12",
61
- "@tscircuit/props": "^0.0.171",
62
+ "@tscircuit/props": "^0.0.172",
62
63
  "@tscircuit/schematic-autolayout": "^0.0.6",
63
- "circuit-json": "^0.0.153",
64
+ "circuit-json": "^0.0.154",
64
65
  "circuit-json-to-connectivity-map": "^0.0.20",
65
66
  "format-si-unit": "^0.0.3",
66
67
  "nanoid": "^5.0.7",