@tscircuit/core 0.0.892 → 0.0.894

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 +13 -4
  2. package/dist/index.js +2464 -2443
  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,15 @@ 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
+ source_group_id: string | null;
1369
+ }
1370
+
1371
+ declare class Board extends Group<typeof boardProps> implements BoardI, SubcircuitI {
1364
1372
  pcb_board_id: string | null;
1365
1373
  source_board_id: string | null;
1366
1374
  _drcChecksComplete: boolean;
@@ -2769,6 +2777,7 @@ declare class Board extends Group<typeof boardProps> implements BoardI {
2769
2777
  */
2770
2778
  private _addBoardInformationToSilkscreen;
2771
2779
  doInitialSourceRender(): void;
2780
+ doInitialInflateSubcircuitCircuitJson(): void;
2772
2781
  doInitialPcbComponentRender(): void;
2773
2782
  removePcbComponentRender(): void;
2774
2783
  doInitialPcbDesignRuleChecks(): void;
@@ -3848,7 +3857,7 @@ declare class Panel extends Group<typeof panelProps> {
3848
3857
  get isGroup(): boolean;
3849
3858
  get isSubcircuit(): boolean;
3850
3859
  add(component: PrimitiveComponent): void;
3851
- doInitialPcbComponentAnchorAlignment(): void;
3860
+ doInitialPanelLayout(): void;
3852
3861
  runRenderCycle(): void;
3853
3862
  doInitialPcbComponentRender(): void;
3854
3863
  updatePcbComponentRender(): void;
@@ -21593,7 +21602,7 @@ declare class Footprint extends PrimitiveComponent<typeof footprintProps> {
21593
21602
  doInitialPcbFootprintLayout(): void;
21594
21603
  }
21595
21604
 
21596
- declare class Subcircuit extends Group<typeof subcircuitProps> {
21605
+ declare class Subcircuit extends Group<typeof subcircuitProps> implements SubcircuitI {
21597
21606
  constructor(props: z.input<typeof subcircuitProps>);
21598
21607
  /**
21599
21608
  * During this phase, we inflate the subcircuit circuit json into class