@tscircuit/core 0.0.892 → 0.0.893

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 (3) hide show
  1. package/dist/index.d.ts +12 -4
  2. package/dist/index.js +2151 -2142
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
13
13
  import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
14
14
  import { GraphicsObject } from 'graphics-debug';
15
15
 
16
- declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "InflateSubcircuitCircuitJson", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicComponentSizeCalculation", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbComponentAnchorAlignment", "PcbLayout", "PcbBoardAutoSize", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbCopperPourRender", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender", "SimulationSpiceEngineRender"];
16
+ declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "InflateSubcircuitCircuitJson", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicComponentSizeCalculation", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbComponentAnchorAlignment", "PcbLayout", "PcbBoardAutoSize", "PanelLayout", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbCopperPourRender", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender", "SimulationSpiceEngineRender"];
17
17
  type RenderPhase = (typeof orderedRenderPhases)[number];
18
18
  type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
19
19
  type RenderPhaseStates = Record<RenderPhase, {
@@ -1360,7 +1360,14 @@ declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
1360
1360
  }): void;
1361
1361
  }
1362
1362
 
1363
- declare class Board extends Group<typeof boardProps> implements BoardI {
1363
+ interface SubcircuitI {
1364
+ subcircuit_id: string | null;
1365
+ add(component: PrimitiveComponent): void;
1366
+ root: RootCircuit | null;
1367
+ getGroup(): IGroup | null;
1368
+ }
1369
+
1370
+ declare class Board extends Group<typeof boardProps> implements BoardI, SubcircuitI {
1364
1371
  pcb_board_id: string | null;
1365
1372
  source_board_id: string | null;
1366
1373
  _drcChecksComplete: boolean;
@@ -2769,6 +2776,7 @@ declare class Board extends Group<typeof boardProps> implements BoardI {
2769
2776
  */
2770
2777
  private _addBoardInformationToSilkscreen;
2771
2778
  doInitialSourceRender(): void;
2779
+ doInitialInflateSubcircuitCircuitJson(): void;
2772
2780
  doInitialPcbComponentRender(): void;
2773
2781
  removePcbComponentRender(): void;
2774
2782
  doInitialPcbDesignRuleChecks(): void;
@@ -3848,7 +3856,7 @@ declare class Panel extends Group<typeof panelProps> {
3848
3856
  get isGroup(): boolean;
3849
3857
  get isSubcircuit(): boolean;
3850
3858
  add(component: PrimitiveComponent): void;
3851
- doInitialPcbComponentAnchorAlignment(): void;
3859
+ doInitialPanelLayout(): void;
3852
3860
  runRenderCycle(): void;
3853
3861
  doInitialPcbComponentRender(): void;
3854
3862
  updatePcbComponentRender(): void;
@@ -21593,7 +21601,7 @@ declare class Footprint extends PrimitiveComponent<typeof footprintProps> {
21593
21601
  doInitialPcbFootprintLayout(): void;
21594
21602
  }
21595
21603
 
21596
- declare class Subcircuit extends Group<typeof subcircuitProps> {
21604
+ declare class Subcircuit extends Group<typeof subcircuitProps> implements SubcircuitI {
21597
21605
  constructor(props: z.input<typeof subcircuitProps>);
21598
21606
  /**
21599
21607
  * During this phase, we inflate the subcircuit circuit json into class