@tscircuit/core 0.0.1364 → 0.0.1366
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 +45 -5
- package/dist/index.js +215 -100
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as circuit_json from 'circuit-json';
|
|
2
2
|
import { PcbTraceError, PcbPlacementError, PcbManualEditConflictWarning, PcbViaClearanceError, LayerRef, AnyCircuitElement, Size, PcbTrace as PcbTrace$1, PcbVia as PcbVia$1, PcbTraceRoutePoint, AnySourceComponent, PcbComponent, SchematicPort, SchematicComponent, PcbSilkscreenGraphic, RouteHintPoint, CircuitJson } from 'circuit-json';
|
|
3
3
|
import * as _tscircuit_props from '@tscircuit/props';
|
|
4
|
-
import { PlatformConfig, traceProps, netProps, AutorouterProp, AutoroutingPhaseProps, subcircuitGroupProps, AutorouterConfig, PcbSx, portProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, subcircuitProps, subpanelProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, interconnectProps, solderjumperProps, ledProps, powerSourceProps, voltageSourceProps, currentSourceProps, ammeterProps, resistorProps, constraintProps, drcCheckProps, autoroutingPhaseProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, fabricationNoteDimensionProps, pcbNoteLineProps, pcbNoteRectProps, pcbNoteTextProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, courtyardCircleProps, courtyardOutlineProps, courtyardRectProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, silkscreenGraphicProps, smtPadProps, fiducialProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, opampProps, OpAmpPinLabels, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicPathProps, schematicBoxProps, schematicSectionProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, voltageProbeProps, spicemodelProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
4
|
+
import { PlatformConfig, traceProps, netProps, AutorouterProp, AutoroutingPhaseProps, subcircuitGroupProps, AutorouterConfig, PcbSx, portProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, subcircuitProps, subpanelProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, interconnectProps, solderjumperProps, ledProps, powerSourceProps, voltageSourceProps, currentSourceProps, ammeterProps, resistorProps, constraintProps, drcCheckProps, autoroutingPhaseProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, fabricationNoteDimensionProps, pcbNoteLineProps, pcbNoteRectProps, pcbNoteTextProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, courtyardCircleProps, courtyardOutlineProps, courtyardRectProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, silkscreenGraphicProps, smtPadProps, fiducialProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, opampProps, OpAmpPinLabels, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicPathProps, schematicBoxProps, schematicSectionProps, schematicSheetProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, voltageProbeProps, spicemodelProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
5
5
|
export { kicadFootprintStrings } from '@tscircuit/props';
|
|
6
6
|
import * as react from 'react';
|
|
7
7
|
import react__default, { ReactElement } from 'react';
|
|
@@ -238,9 +238,9 @@ interface IIsolatedCircuit {
|
|
|
238
238
|
interface IRootCircuit extends IIsolatedCircuit {
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "RenderIsolatedSubcircuits", "InflateSubcircuitCircuitJson", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "FetchPartFootprint", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "CreateAutoplacedBreakoutPoints", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceComponentPropertyValidation", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SymbolContainerRender", "SchematicPrimitiveRender", "SchematicSymbolResize", "SchematicComponentSizeCalculation", "SchematicLayout", "SchematicSectionRender", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PanelBoardLayout", "ValidatePcbCoordinates", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbComponentAnchorAlignment", "PcbCalcPlacementResolution", "PcbLayout", "PcbBoardAutoSize", "PanelLayout", "PcbAutoplaceBreakoutPoints", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbCopperPourRender", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender", "SupplierFootprintMismatchWarning", "SimulationSpiceEngineRender"];
|
|
241
|
+
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "RenderIsolatedSubcircuits", "InflateSubcircuitCircuitJson", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "FetchPartFootprint", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "CreateAutoplacedBreakoutPoints", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceComponentPropertyValidation", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SymbolContainerRender", "SchematicPrimitiveRender", "SchematicSymbolResize", "SchematicComponentSizeCalculation", "SchematicLayout", "SchematicSectionRender", "SchematicTraceRender", "SchematicSheetRender", "SchematicReplaceNetLabelsWithSymbols", "PanelBoardLayout", "ValidatePcbCoordinates", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbComponentAnchorAlignment", "PcbCalcPlacementResolution", "PcbLayout", "PcbBoardAutoSize", "PanelLayout", "PcbAutoplaceBreakoutPoints", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbCopperPourRender", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender", "SupplierFootprintMismatchWarning", "SimulationSpiceEngineRender"];
|
|
242
242
|
type RenderPhase = (typeof orderedRenderPhases)[number];
|
|
243
|
-
declare const renderPhaseIndexMap: Map<"ReactSubtreesRender" | "RenderIsolatedSubcircuits" | "InflateSubcircuitCircuitJson" | "SourceNameDuplicateComponentRemoval" | "PcbFootprintStringRender" | "FetchPartFootprint" | "InitializePortsFromChildren" | "CreateNetsFromProps" | "AssignFallbackProps" | "CreateTracesFromProps" | "CreateTracesFromNetLabels" | "CreateTraceHintsFromProps" | "CreateAutoplacedBreakoutPoints" | "SourceGroupRender" | "AssignNameToUnnamedComponents" | "SourceRender" | "SourceComponentPropertyValidation" | "SourceParentAttachment" | "PortMatching" | "OptimizeSelectorCache" | "SourceTraceRender" | "SourceAddConnectivityMapKey" | "SourceDesignRuleChecks" | "SimulationRender" | "SchematicComponentRender" | "SchematicPortRender" | "SymbolContainerRender" | "SchematicPrimitiveRender" | "SchematicSymbolResize" | "SchematicComponentSizeCalculation" | "SchematicLayout" | "SchematicSectionRender" | "SchematicTraceRender" | "SchematicReplaceNetLabelsWithSymbols" | "PanelBoardLayout" | "ValidatePcbCoordinates" | "PcbComponentRender" | "PcbPrimitiveRender" | "PcbFootprintLayout" | "PcbPortRender" | "PcbPortAttachment" | "PcbComponentSizeCalculation" | "PcbComponentAnchorAlignment" | "PcbCalcPlacementResolution" | "PcbLayout" | "PcbBoardAutoSize" | "PanelLayout" | "PcbAutoplaceBreakoutPoints" | "PcbTraceHintRender" | "PcbManualTraceRender" | "PcbTraceRender" | "PcbRouteNetIslands" | "PcbCopperPourRender" | "PcbDesignRuleChecks" | "SilkscreenOverlapAdjustment" | "CadModelRender" | "PartsEngineRender" | "SupplierFootprintMismatchWarning" | "SimulationSpiceEngineRender", number>;
|
|
243
|
+
declare const renderPhaseIndexMap: Map<"ReactSubtreesRender" | "RenderIsolatedSubcircuits" | "InflateSubcircuitCircuitJson" | "SourceNameDuplicateComponentRemoval" | "PcbFootprintStringRender" | "FetchPartFootprint" | "InitializePortsFromChildren" | "CreateNetsFromProps" | "AssignFallbackProps" | "CreateTracesFromProps" | "CreateTracesFromNetLabels" | "CreateTraceHintsFromProps" | "CreateAutoplacedBreakoutPoints" | "SourceGroupRender" | "AssignNameToUnnamedComponents" | "SourceRender" | "SourceComponentPropertyValidation" | "SourceParentAttachment" | "PortMatching" | "OptimizeSelectorCache" | "SourceTraceRender" | "SourceAddConnectivityMapKey" | "SourceDesignRuleChecks" | "SimulationRender" | "SchematicComponentRender" | "SchematicPortRender" | "SymbolContainerRender" | "SchematicPrimitiveRender" | "SchematicSymbolResize" | "SchematicComponentSizeCalculation" | "SchematicLayout" | "SchematicSectionRender" | "SchematicTraceRender" | "SchematicSheetRender" | "SchematicReplaceNetLabelsWithSymbols" | "PanelBoardLayout" | "ValidatePcbCoordinates" | "PcbComponentRender" | "PcbPrimitiveRender" | "PcbFootprintLayout" | "PcbPortRender" | "PcbPortAttachment" | "PcbComponentSizeCalculation" | "PcbComponentAnchorAlignment" | "PcbCalcPlacementResolution" | "PcbLayout" | "PcbBoardAutoSize" | "PanelLayout" | "PcbAutoplaceBreakoutPoints" | "PcbTraceHintRender" | "PcbManualTraceRender" | "PcbTraceRender" | "PcbRouteNetIslands" | "PcbCopperPourRender" | "PcbDesignRuleChecks" | "SilkscreenOverlapAdjustment" | "CadModelRender" | "PartsEngineRender" | "SupplierFootprintMismatchWarning" | "SimulationSpiceEngineRender", number>;
|
|
244
244
|
type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
|
|
245
245
|
type RenderPhaseStates = Record<RenderPhase, {
|
|
246
246
|
initialized: boolean;
|
|
@@ -1548,6 +1548,7 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
|
|
|
1548
1548
|
source_group_id: string | null;
|
|
1549
1549
|
source_component_id: string | null;
|
|
1550
1550
|
schematic_component_id: string | null;
|
|
1551
|
+
schematic_sheet_id?: string | null;
|
|
1551
1552
|
pcb_component_id: string | null;
|
|
1552
1553
|
cad_component_id: string | null;
|
|
1553
1554
|
_reportedInvalidPcbCalcWarnings: Set<string>;
|
|
@@ -1732,6 +1733,7 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
|
|
|
1732
1733
|
doesSelectorMatch(selector: string): boolean;
|
|
1733
1734
|
getSubcircuit(): ISubcircuit;
|
|
1734
1735
|
getGroup(): IGroup | null;
|
|
1736
|
+
_resolveSchematicSheetId(): string | undefined;
|
|
1735
1737
|
doInitialAssignNameToUnnamedComponents(): void;
|
|
1736
1738
|
doInitialOptimizeSelectorCache(): void;
|
|
1737
1739
|
/**
|
|
@@ -2167,7 +2169,7 @@ declare class NormalComponent<ZodProps extends z.ZodType = any, PortNames extend
|
|
|
2167
2169
|
_hasStartedFootprintUrlLoad: boolean;
|
|
2168
2170
|
_hasStartedSupplierFootprintMismatchWarningCheck: boolean;
|
|
2169
2171
|
private _invalidFootprintPropMessages;
|
|
2170
|
-
|
|
2172
|
+
_invalidPinLabelMessages: string[];
|
|
2171
2173
|
/**
|
|
2172
2174
|
* Set to true to enable automatic silkscreen text adjustment when it overlaps with other components
|
|
2173
2175
|
*/
|
|
@@ -2901,6 +2903,7 @@ declare class Board extends Group<typeof boardProps> implements BoardI, Subcircu
|
|
|
2901
2903
|
name: zod.ZodOptional<zod.ZodString>;
|
|
2902
2904
|
children: zod.ZodOptional<zod.ZodAny>;
|
|
2903
2905
|
schTitle: zod.ZodOptional<zod.ZodString>;
|
|
2906
|
+
schSheetName: zod.ZodOptional<zod.ZodString>;
|
|
2904
2907
|
key: zod.ZodOptional<zod.ZodAny>;
|
|
2905
2908
|
showAsSchematicBox: zod.ZodOptional<zod.ZodBoolean>;
|
|
2906
2909
|
connections: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>>;
|
|
@@ -3348,6 +3351,7 @@ declare class Board extends Group<typeof boardProps> implements BoardI, Subcircu
|
|
|
3348
3351
|
} | undefined;
|
|
3349
3352
|
schRelative?: boolean | undefined;
|
|
3350
3353
|
children?: any;
|
|
3354
|
+
schSheetName?: string | undefined;
|
|
3351
3355
|
grid?: boolean | undefined;
|
|
3352
3356
|
flex?: string | boolean | undefined;
|
|
3353
3357
|
layoutMode?: "none" | "relative" | "grid" | "flex" | "match-adapt" | undefined;
|
|
@@ -3683,6 +3687,7 @@ declare class Board extends Group<typeof boardProps> implements BoardI, Subcircu
|
|
|
3683
3687
|
} | undefined;
|
|
3684
3688
|
schRelative?: boolean | undefined;
|
|
3685
3689
|
children?: any;
|
|
3690
|
+
schSheetName?: string | undefined;
|
|
3686
3691
|
grid?: boolean | undefined;
|
|
3687
3692
|
flex?: string | boolean | undefined;
|
|
3688
3693
|
layoutMode?: "none" | "relative" | "grid" | "flex" | "match-adapt" | undefined;
|
|
@@ -4444,6 +4449,7 @@ declare class MountedBoard extends Subcircuit implements BoardI {
|
|
|
4444
4449
|
name: zod.ZodOptional<zod.ZodString>;
|
|
4445
4450
|
children: zod.ZodOptional<zod.ZodAny>;
|
|
4446
4451
|
schTitle: zod.ZodOptional<zod.ZodString>;
|
|
4452
|
+
schSheetName: zod.ZodOptional<zod.ZodString>;
|
|
4447
4453
|
key: zod.ZodOptional<zod.ZodAny>;
|
|
4448
4454
|
showAsSchematicBox: zod.ZodOptional<zod.ZodBoolean>;
|
|
4449
4455
|
connections: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>>;
|
|
@@ -5006,6 +5012,7 @@ declare class MountedBoard extends Subcircuit implements BoardI {
|
|
|
5006
5012
|
schRelative?: boolean | undefined;
|
|
5007
5013
|
children?: any;
|
|
5008
5014
|
manufacturerPartNumber?: string | undefined;
|
|
5015
|
+
schSheetName?: string | undefined;
|
|
5009
5016
|
grid?: boolean | undefined;
|
|
5010
5017
|
flex?: string | boolean | undefined;
|
|
5011
5018
|
layoutMode?: "none" | "relative" | "grid" | "flex" | "match-adapt" | undefined;
|
|
@@ -5364,6 +5371,7 @@ declare class MountedBoard extends Subcircuit implements BoardI {
|
|
|
5364
5371
|
schRelative?: boolean | undefined;
|
|
5365
5372
|
children?: any;
|
|
5366
5373
|
manufacturerPartNumber?: string | undefined;
|
|
5374
|
+
schSheetName?: string | undefined;
|
|
5367
5375
|
grid?: boolean | undefined;
|
|
5368
5376
|
flex?: string | boolean | undefined;
|
|
5369
5377
|
layoutMode?: "none" | "relative" | "grid" | "flex" | "match-adapt" | undefined;
|
|
@@ -6100,6 +6108,7 @@ declare class Subpanel extends Group<typeof subpanelProps> {
|
|
|
6100
6108
|
name: zod.ZodOptional<zod.ZodString>;
|
|
6101
6109
|
children: zod.ZodOptional<zod.ZodAny>;
|
|
6102
6110
|
schTitle: zod.ZodOptional<zod.ZodString>;
|
|
6111
|
+
schSheetName: zod.ZodOptional<zod.ZodString>;
|
|
6103
6112
|
key: zod.ZodOptional<zod.ZodAny>;
|
|
6104
6113
|
showAsSchematicBox: zod.ZodOptional<zod.ZodBoolean>;
|
|
6105
6114
|
connections: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>>;
|
|
@@ -6330,6 +6339,7 @@ declare class Subpanel extends Group<typeof subpanelProps> {
|
|
|
6330
6339
|
} | undefined;
|
|
6331
6340
|
schRelative?: boolean | undefined;
|
|
6332
6341
|
children?: any;
|
|
6342
|
+
schSheetName?: string | undefined;
|
|
6333
6343
|
grid?: boolean | undefined;
|
|
6334
6344
|
flex?: string | boolean | undefined;
|
|
6335
6345
|
layoutMode?: "none" | "grid" | "pack" | undefined;
|
|
@@ -6606,6 +6616,7 @@ declare class Subpanel extends Group<typeof subpanelProps> {
|
|
|
6606
6616
|
} | undefined;
|
|
6607
6617
|
schRelative?: boolean | undefined;
|
|
6608
6618
|
children?: any;
|
|
6619
|
+
schSheetName?: string | undefined;
|
|
6609
6620
|
grid?: boolean | undefined;
|
|
6610
6621
|
flex?: string | boolean | undefined;
|
|
6611
6622
|
layoutMode?: "none" | "grid" | "pack" | undefined;
|
|
@@ -7301,6 +7312,7 @@ declare class Panel extends Subpanel {
|
|
|
7301
7312
|
name: zod.ZodOptional<zod.ZodString>;
|
|
7302
7313
|
children: zod.ZodOptional<zod.ZodAny>;
|
|
7303
7314
|
schTitle: zod.ZodOptional<zod.ZodString>;
|
|
7315
|
+
schSheetName: zod.ZodOptional<zod.ZodString>;
|
|
7304
7316
|
key: zod.ZodOptional<zod.ZodAny>;
|
|
7305
7317
|
showAsSchematicBox: zod.ZodOptional<zod.ZodBoolean>;
|
|
7306
7318
|
connections: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>>;
|
|
@@ -7531,6 +7543,7 @@ declare class Panel extends Subpanel {
|
|
|
7531
7543
|
} | undefined;
|
|
7532
7544
|
schRelative?: boolean | undefined;
|
|
7533
7545
|
children?: any;
|
|
7546
|
+
schSheetName?: string | undefined;
|
|
7534
7547
|
grid?: boolean | undefined;
|
|
7535
7548
|
flex?: string | boolean | undefined;
|
|
7536
7549
|
layoutMode?: "none" | "grid" | "pack" | undefined;
|
|
@@ -7807,6 +7820,7 @@ declare class Panel extends Subpanel {
|
|
|
7807
7820
|
} | undefined;
|
|
7808
7821
|
schRelative?: boolean | undefined;
|
|
7809
7822
|
children?: any;
|
|
7823
|
+
schSheetName?: string | undefined;
|
|
7810
7824
|
grid?: boolean | undefined;
|
|
7811
7825
|
flex?: string | boolean | undefined;
|
|
7812
7826
|
layoutMode?: "none" | "grid" | "pack" | undefined;
|
|
@@ -152797,6 +152811,31 @@ declare class SchematicSection extends PrimitiveComponent<typeof schematicSectio
|
|
|
152797
152811
|
doInitialSchematicSectionRender(): void;
|
|
152798
152812
|
}
|
|
152799
152813
|
|
|
152814
|
+
declare class SchematicSheet extends PrimitiveComponent<typeof schematicSheetProps> {
|
|
152815
|
+
isSchematicPrimitive: boolean;
|
|
152816
|
+
get config(): {
|
|
152817
|
+
componentName: string;
|
|
152818
|
+
zodProps: zod.ZodObject<{
|
|
152819
|
+
name: zod.ZodString;
|
|
152820
|
+
displayName: zod.ZodString;
|
|
152821
|
+
sheetIndex: zod.ZodOptional<zod.ZodNumber>;
|
|
152822
|
+
children: zod.ZodOptional<zod.ZodAny>;
|
|
152823
|
+
}, "strip", zod.ZodTypeAny, {
|
|
152824
|
+
name: string;
|
|
152825
|
+
displayName: string;
|
|
152826
|
+
children?: any;
|
|
152827
|
+
sheetIndex?: number | undefined;
|
|
152828
|
+
}, {
|
|
152829
|
+
name: string;
|
|
152830
|
+
displayName: string;
|
|
152831
|
+
children?: any;
|
|
152832
|
+
sheetIndex?: number | undefined;
|
|
152833
|
+
}>;
|
|
152834
|
+
};
|
|
152835
|
+
doInitialSourceGroupRender(): void;
|
|
152836
|
+
doInitialSchematicSheetRender(): void;
|
|
152837
|
+
}
|
|
152838
|
+
|
|
152800
152839
|
declare class SchematicTable extends PrimitiveComponent<typeof schematicTableProps> {
|
|
152801
152840
|
isSchematicPrimitive: boolean;
|
|
152802
152841
|
schematic_table_id: string | null;
|
|
@@ -158980,6 +159019,7 @@ interface TscircuitElements {
|
|
|
158980
159019
|
pinout: _tscircuit_props.PinoutProps;
|
|
158981
159020
|
powersource: _tscircuit_props.PowerSourceProps;
|
|
158982
159021
|
schematicsection: _tscircuit_props.SchematicSectionProps;
|
|
159022
|
+
schematicsheet: _tscircuit_props.SchematicSheetProps;
|
|
158983
159023
|
via: _tscircuit_props.ViaProps;
|
|
158984
159024
|
schematicbox: _tscircuit_props.SchematicBoxProps;
|
|
158985
159025
|
schematicline: _tscircuit_props.SchematicLineProps;
|
|
@@ -159075,4 +159115,4 @@ declare module "react/jsx-runtime" {
|
|
|
159075
159115
|
}
|
|
159076
159116
|
}
|
|
159077
159117
|
|
|
159078
|
-
export { Ammeter, AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, AutoroutingPhase, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Connector, Constraint, CopperPour, CopperText, CourtyardCircle, CourtyardOutline, CourtyardRect, Crystal, CurrentSource, Cutout, type DebugLogOutputEvent, Diode, DrcCheck, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Breakout as Fanout, BreakoutPoint as FanoutPoint, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IIsolatedCircuit, type IRenderable, type IRootCircuit, Inductor, Interconnect, IsolatedCircuit, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, MountedBoard, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, PcbVia, PinHeader, type PinLabelSpec, Pinout, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SOLVERS, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicPath, SchematicRect, SchematicRow, SchematicSection, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenGraphic, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, type SolverName, type SolverStartedEvent, SpiceModel, Subcircuit, Subpanel, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, renderPhaseIndexMap, resolveStaticFileImport, sel, unrouteCircuitJson, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
|
159118
|
+
export { Ammeter, AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, AutoroutingPhase, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Connector, Constraint, CopperPour, CopperText, CourtyardCircle, CourtyardOutline, CourtyardRect, Crystal, CurrentSource, Cutout, type DebugLogOutputEvent, Diode, DrcCheck, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Breakout as Fanout, BreakoutPoint as FanoutPoint, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IIsolatedCircuit, type IRenderable, type IRootCircuit, Inductor, Interconnect, IsolatedCircuit, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, MountedBoard, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, PcbVia, PinHeader, type PinLabelSpec, Pinout, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SOLVERS, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicPath, SchematicRect, SchematicRow, SchematicSection, SchematicSheet, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenGraphic, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, type SolverName, type SolverStartedEvent, SpiceModel, Subcircuit, Subpanel, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, renderPhaseIndexMap, resolveStaticFileImport, sel, unrouteCircuitJson, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -80,6 +80,7 @@ __export(components_exports, {
|
|
|
80
80
|
SchematicRect: () => SchematicRect,
|
|
81
81
|
SchematicRow: () => SchematicRow,
|
|
82
82
|
SchematicSection: () => SchematicSection,
|
|
83
|
+
SchematicSheet: () => SchematicSheet,
|
|
83
84
|
SchematicTable: () => SchematicTable,
|
|
84
85
|
SchematicText: () => SchematicText,
|
|
85
86
|
SilkscreenCircle: () => SilkscreenCircle,
|
|
@@ -113,7 +114,6 @@ import {
|
|
|
113
114
|
pcb_manual_edit_conflict_warning,
|
|
114
115
|
point3 as point32,
|
|
115
116
|
rotation as rotation2,
|
|
116
|
-
schematic_manual_edit_conflict_warning,
|
|
117
117
|
unknown_error_finding_part as unknown_error_finding_part2
|
|
118
118
|
} from "circuit-json";
|
|
119
119
|
import Debug5 from "debug";
|
|
@@ -353,6 +353,7 @@ var orderedRenderPhases = [
|
|
|
353
353
|
"SchematicLayout",
|
|
354
354
|
"SchematicSectionRender",
|
|
355
355
|
"SchematicTraceRender",
|
|
356
|
+
"SchematicSheetRender",
|
|
356
357
|
"SchematicReplaceNetLabelsWithSymbols",
|
|
357
358
|
"PanelBoardLayout",
|
|
358
359
|
"ValidatePcbCoordinates",
|
|
@@ -397,6 +398,7 @@ var asyncPhaseDependencies = {
|
|
|
397
398
|
SchematicLayout: ["PcbFootprintStringRender", "FetchPartFootprint"],
|
|
398
399
|
SchematicSectionRender: ["PcbFootprintStringRender", "FetchPartFootprint"],
|
|
399
400
|
SchematicTraceRender: ["PcbFootprintStringRender", "FetchPartFootprint"],
|
|
401
|
+
SchematicSheetRender: ["PcbFootprintStringRender", "FetchPartFootprint"],
|
|
400
402
|
SchematicReplaceNetLabelsWithSymbols: [
|
|
401
403
|
"PcbFootprintStringRender",
|
|
402
404
|
"FetchPartFootprint"
|
|
@@ -1319,6 +1321,7 @@ var PrimitiveComponent2 = class extends Renderable {
|
|
|
1319
1321
|
source_group_id = null;
|
|
1320
1322
|
source_component_id = null;
|
|
1321
1323
|
schematic_component_id = null;
|
|
1324
|
+
schematic_sheet_id = null;
|
|
1322
1325
|
pcb_component_id = null;
|
|
1323
1326
|
cad_component_id = null;
|
|
1324
1327
|
_reportedInvalidPcbCalcWarnings = /* @__PURE__ */ new Set();
|
|
@@ -2000,6 +2003,15 @@ var PrimitiveComponent2 = class extends Renderable {
|
|
|
2000
2003
|
if (this.isGroup) return this;
|
|
2001
2004
|
return this.parent?.getGroup?.() ?? null;
|
|
2002
2005
|
}
|
|
2006
|
+
_resolveSchematicSheetId() {
|
|
2007
|
+
const schSheetName = this._parsedProps?.schSheetName ?? this.props.schSheetName;
|
|
2008
|
+
if (schSheetName) {
|
|
2009
|
+
const matchingSheet = this.root?.db.schematic_sheet.list().find((sheet) => sheet.name === schSheetName);
|
|
2010
|
+
if (matchingSheet) return matchingSheet.schematic_sheet_id;
|
|
2011
|
+
}
|
|
2012
|
+
if (this.schematic_sheet_id) return this.schematic_sheet_id;
|
|
2013
|
+
return this.parent?._resolveSchematicSheetId?.();
|
|
2014
|
+
}
|
|
2003
2015
|
doInitialAssignNameToUnnamedComponents() {
|
|
2004
2016
|
if (!this._parsedProps.name) {
|
|
2005
2017
|
this.fallbackUnassignedName = this.getSubcircuit().getNextAvailableName(this);
|
|
@@ -3808,7 +3820,8 @@ var Trace_doInitialSchematicTraceRender = (trace) => {
|
|
|
3808
3820
|
source_trace_id: trace.source_trace_id,
|
|
3809
3821
|
edges: edges2,
|
|
3810
3822
|
junctions: junctions2,
|
|
3811
|
-
subcircuit_connectivity_map_key: trace.subcircuit_connectivity_map_key ?? void 0
|
|
3823
|
+
subcircuit_connectivity_map_key: trace.subcircuit_connectivity_map_key ?? void 0,
|
|
3824
|
+
schematic_sheet_id: trace._resolveSchematicSheetId()
|
|
3812
3825
|
});
|
|
3813
3826
|
trace.schematic_trace_id = dbTrace2.schematic_trace_id;
|
|
3814
3827
|
return;
|
|
@@ -3824,7 +3837,8 @@ var Trace_doInitialSchematicTraceRender = (trace) => {
|
|
|
3824
3837
|
anchor_side: side2,
|
|
3825
3838
|
text: schematicNetLabelText
|
|
3826
3839
|
}),
|
|
3827
|
-
anchor_side: side2
|
|
3840
|
+
anchor_side: side2,
|
|
3841
|
+
schematic_sheet_id: trace._resolveSchematicSheetId()
|
|
3828
3842
|
});
|
|
3829
3843
|
return;
|
|
3830
3844
|
}
|
|
@@ -3838,7 +3852,8 @@ var Trace_doInitialSchematicTraceRender = (trace) => {
|
|
|
3838
3852
|
anchor_side: side,
|
|
3839
3853
|
text: net._parsedProps.name
|
|
3840
3854
|
}),
|
|
3841
|
-
anchor_side: side
|
|
3855
|
+
anchor_side: side,
|
|
3856
|
+
schematic_sheet_id: trace._resolveSchematicSheetId()
|
|
3842
3857
|
});
|
|
3843
3858
|
return;
|
|
3844
3859
|
}
|
|
@@ -4042,7 +4057,8 @@ var Trace_doInitialSchematicTraceRender = (trace) => {
|
|
|
4042
4057
|
source_trace_id: trace.source_trace_id,
|
|
4043
4058
|
edges,
|
|
4044
4059
|
junctions,
|
|
4045
|
-
subcircuit_connectivity_map_key: trace.subcircuit_connectivity_map_key ?? void 0
|
|
4060
|
+
subcircuit_connectivity_map_key: trace.subcircuit_connectivity_map_key ?? void 0,
|
|
4061
|
+
schematic_sheet_id: trace._resolveSchematicSheetId()
|
|
4046
4062
|
});
|
|
4047
4063
|
trace.schematic_trace_id = dbTrace.schematic_trace_id;
|
|
4048
4064
|
for (const { port } of connectedPorts) {
|
|
@@ -5164,7 +5180,8 @@ function Trace__doInitialSchematicTraceRenderWithDisplayLabel(trace) {
|
|
|
5164
5180
|
anchor_side: toSide,
|
|
5165
5181
|
text: netLabelText
|
|
5166
5182
|
}),
|
|
5167
|
-
anchor_side: toSide
|
|
5183
|
+
anchor_side: toSide,
|
|
5184
|
+
schematic_sheet_id: trace._resolveSchematicSheetId()
|
|
5168
5185
|
});
|
|
5169
5186
|
}
|
|
5170
5187
|
if (!existingFromNetLabel) {
|
|
@@ -5178,7 +5195,8 @@ function Trace__doInitialSchematicTraceRenderWithDisplayLabel(trace) {
|
|
|
5178
5195
|
anchor_side: fromSide,
|
|
5179
5196
|
text: netLabelText
|
|
5180
5197
|
}),
|
|
5181
|
-
anchor_side: fromSide
|
|
5198
|
+
anchor_side: fromSide,
|
|
5199
|
+
schematic_sheet_id: trace._resolveSchematicSheetId()
|
|
5182
5200
|
});
|
|
5183
5201
|
}
|
|
5184
5202
|
}
|
|
@@ -7869,7 +7887,8 @@ var SchematicArc = class extends PrimitiveComponent2 {
|
|
|
7869
7887
|
stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
7870
7888
|
color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
7871
7889
|
is_dashed: props.isDashed,
|
|
7872
|
-
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
|
|
7890
|
+
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
|
|
7891
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
7873
7892
|
});
|
|
7874
7893
|
this.schematic_arc_id = schematic_arc.schematic_arc_id;
|
|
7875
7894
|
}
|
|
@@ -7928,7 +7947,8 @@ var SchematicCircle = class extends PrimitiveComponent2 {
|
|
|
7928
7947
|
is_filled: props.isFilled,
|
|
7929
7948
|
fill_color: props.fillColor,
|
|
7930
7949
|
is_dashed: props.isDashed,
|
|
7931
|
-
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
|
|
7950
|
+
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
|
|
7951
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
7932
7952
|
});
|
|
7933
7953
|
this.schematic_circle_id = schematic_circle.schematic_circle_id;
|
|
7934
7954
|
}
|
|
@@ -7986,7 +8006,8 @@ var SchematicLine = class extends PrimitiveComponent2 {
|
|
|
7986
8006
|
is_dashed: props.isDashed || props.dashLength !== void 0 || props.dashGap !== void 0,
|
|
7987
8007
|
dash_length: props.dashLength,
|
|
7988
8008
|
dash_gap: props.dashGap,
|
|
7989
|
-
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
|
|
8009
|
+
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
|
|
8010
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
7990
8011
|
});
|
|
7991
8012
|
this.schematic_line_id = schematic_line.schematic_line_id;
|
|
7992
8013
|
}
|
|
@@ -8179,7 +8200,8 @@ var SchematicPath = class extends PrimitiveComponent2 {
|
|
|
8179
8200
|
stroke_width: props.strokeWidth,
|
|
8180
8201
|
dash_length: props.dashLength,
|
|
8181
8202
|
dash_gap: props.dashGap,
|
|
8182
|
-
subcircuit_id
|
|
8203
|
+
subcircuit_id,
|
|
8204
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
8183
8205
|
});
|
|
8184
8206
|
this.schematic_path_ids.push(schematic_path.schematic_path_id);
|
|
8185
8207
|
}
|
|
@@ -8198,7 +8220,8 @@ var SchematicPath = class extends PrimitiveComponent2 {
|
|
|
8198
8220
|
stroke_width: props.strokeWidth,
|
|
8199
8221
|
dash_length: props.dashLength,
|
|
8200
8222
|
dash_gap: props.dashGap,
|
|
8201
|
-
subcircuit_id
|
|
8223
|
+
subcircuit_id,
|
|
8224
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
8202
8225
|
});
|
|
8203
8226
|
this.schematic_path_ids.push(schematic_path.schematic_path_id);
|
|
8204
8227
|
}
|
|
@@ -8258,7 +8281,8 @@ var SchematicRect = class extends PrimitiveComponent2 {
|
|
|
8258
8281
|
schematic_component_id,
|
|
8259
8282
|
is_dashed: props.isDashed,
|
|
8260
8283
|
rotation: props.rotation ?? 0,
|
|
8261
|
-
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
|
|
8284
|
+
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
|
|
8285
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
8262
8286
|
});
|
|
8263
8287
|
this.schematic_rect_id = schematic_rect.schematic_rect_id;
|
|
8264
8288
|
}
|
|
@@ -8323,7 +8347,8 @@ var SchematicText = class extends PrimitiveComponent2 {
|
|
|
8323
8347
|
x: globalPos.x,
|
|
8324
8348
|
y: globalPos.y
|
|
8325
8349
|
},
|
|
8326
|
-
rotation: props.schRotation ?? 0
|
|
8350
|
+
rotation: props.schRotation ?? 0,
|
|
8351
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
8327
8352
|
});
|
|
8328
8353
|
this.schematic_text_id = schematic_text.schematic_text_id;
|
|
8329
8354
|
}
|
|
@@ -9915,7 +9940,8 @@ var Port = class extends PrimitiveComponent2 {
|
|
|
9915
9940
|
pin_number: props.pinNumber,
|
|
9916
9941
|
true_ccw_index: localPortInfo?.trueIndex,
|
|
9917
9942
|
display_pin_label: bestDisplayPinLabel,
|
|
9918
|
-
is_connected: false
|
|
9943
|
+
is_connected: false,
|
|
9944
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
9919
9945
|
};
|
|
9920
9946
|
for (const attributes of this._getMatchingPinAttributes()) {
|
|
9921
9947
|
if (attributes.requiresPower) {
|
|
@@ -9943,7 +9969,8 @@ var Port = class extends PrimitiveComponent2 {
|
|
|
9943
9969
|
y2,
|
|
9944
9970
|
stroke_width: 0.02,
|
|
9945
9971
|
color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
9946
|
-
is_dashed: false
|
|
9972
|
+
is_dashed: false,
|
|
9973
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
9947
9974
|
});
|
|
9948
9975
|
this.schematic_stem_line_id = stemLine.schematic_line_id;
|
|
9949
9976
|
}
|
|
@@ -11432,7 +11459,7 @@ var getNumericSchPinStyle = (pinStyles, pinLabels) => {
|
|
|
11432
11459
|
|
|
11433
11460
|
// lib/components/base-components/NormalComponent/NormalComponent.ts
|
|
11434
11461
|
import {
|
|
11435
|
-
isValidElement as
|
|
11462
|
+
isValidElement as isReactElement3,
|
|
11436
11463
|
isValidElement
|
|
11437
11464
|
} from "react";
|
|
11438
11465
|
import { symbols as symbols2 } from "schematic-symbols";
|
|
@@ -12555,6 +12582,79 @@ function NormalComponent_doInitialSupplierFootprintMismatchWarning(component) {
|
|
|
12555
12582
|
});
|
|
12556
12583
|
}
|
|
12557
12584
|
|
|
12585
|
+
// lib/components/base-components/NormalComponent/NormalComponent_doInitialSchematicComponentRender.ts
|
|
12586
|
+
import { schematic_manual_edit_conflict_warning } from "circuit-json";
|
|
12587
|
+
import { isValidElement as isReactElement2 } from "react";
|
|
12588
|
+
function NormalComponent_doInitialSchematicComponentRender(component) {
|
|
12589
|
+
if (component.root?.schematicDisabled) return;
|
|
12590
|
+
if (component.getCollapsedSchematicBoxAncestor()) return;
|
|
12591
|
+
const { db } = component.root;
|
|
12592
|
+
if (component._invalidPinLabelMessages?.length && component.root?.db) {
|
|
12593
|
+
for (const message of component._invalidPinLabelMessages) {
|
|
12594
|
+
let property_name = "pinLabels";
|
|
12595
|
+
const match = message.match(/^Invalid pin label:\s*([^=]+)=\s*'([^']+)'/);
|
|
12596
|
+
if (match) {
|
|
12597
|
+
const label = match[2];
|
|
12598
|
+
property_name = `pinLabels['${label}']`;
|
|
12599
|
+
}
|
|
12600
|
+
component.root.db.source_property_ignored_warning.insert({
|
|
12601
|
+
source_component_id: component.source_component_id,
|
|
12602
|
+
property_name,
|
|
12603
|
+
message,
|
|
12604
|
+
error_type: "source_property_ignored_warning"
|
|
12605
|
+
});
|
|
12606
|
+
}
|
|
12607
|
+
}
|
|
12608
|
+
if (component._parsedProps.schPinSpacing !== void 0 && component.root?.db) {
|
|
12609
|
+
component.root.db.source_property_ignored_warning.insert({
|
|
12610
|
+
source_component_id: component.source_component_id,
|
|
12611
|
+
property_name: "schPinSpacing",
|
|
12612
|
+
error_type: "source_property_ignored_warning",
|
|
12613
|
+
message: "schPinSpacing is deprecated and will be ignored. Pin spacing is always 0.2."
|
|
12614
|
+
});
|
|
12615
|
+
}
|
|
12616
|
+
const { schematicSymbolName } = component.config;
|
|
12617
|
+
const { _parsedProps: props } = component;
|
|
12618
|
+
const hasSymbolChild = component.children.some(
|
|
12619
|
+
(c) => c.componentName === "Symbol"
|
|
12620
|
+
);
|
|
12621
|
+
if (props.symbol && isReactElement2(props.symbol) || hasSymbolChild) {
|
|
12622
|
+
component._doInitialSchematicComponentRenderWithReactSymbol(props.symbol);
|
|
12623
|
+
} else if (schematicSymbolName) {
|
|
12624
|
+
component._doInitialSchematicComponentRenderWithSymbol();
|
|
12625
|
+
} else {
|
|
12626
|
+
const dimensions = component._getSchematicBoxDimensions();
|
|
12627
|
+
if (dimensions) {
|
|
12628
|
+
component._doInitialSchematicComponentRenderWithSchematicBoxDimensions();
|
|
12629
|
+
}
|
|
12630
|
+
}
|
|
12631
|
+
const manualPlacement = component.getSubcircuit()?._getSchematicManualPlacementForComponent(component);
|
|
12632
|
+
if (component.schematic_component_id && (component.props.schX !== void 0 || component.props.schY !== void 0) && !!manualPlacement) {
|
|
12633
|
+
if (!component.schematic_component_id) {
|
|
12634
|
+
return;
|
|
12635
|
+
}
|
|
12636
|
+
const warning = schematic_manual_edit_conflict_warning.parse({
|
|
12637
|
+
type: "schematic_manual_edit_conflict_warning",
|
|
12638
|
+
schematic_manual_edit_conflict_warning_id: `schematic_manual_edit_conflict_${component.source_component_id}`,
|
|
12639
|
+
message: `${component.getString()} has both manual placement and prop coordinates. schX and schY will be used. Remove schX/schY or clear the manual placement.`,
|
|
12640
|
+
schematic_component_id: component.schematic_component_id,
|
|
12641
|
+
source_component_id: component.source_component_id,
|
|
12642
|
+
subcircuit_id: component.getSubcircuit()?.subcircuit_id
|
|
12643
|
+
});
|
|
12644
|
+
db.schematic_manual_edit_conflict_warning.insert(warning);
|
|
12645
|
+
}
|
|
12646
|
+
const schSheetName = component._parsedProps?.schSheetName ?? component.props.schSheetName;
|
|
12647
|
+
if (schSheetName && component.source_component_id && !component._resolveSchematicSheetId()) {
|
|
12648
|
+
db.source_property_ignored_warning.insert({
|
|
12649
|
+
source_component_id: component.source_component_id,
|
|
12650
|
+
property_name: "schSheetName",
|
|
12651
|
+
error_type: "source_property_ignored_warning",
|
|
12652
|
+
subcircuit_id: component.getSubcircuit()?.subcircuit_id ?? void 0,
|
|
12653
|
+
message: `${component.getString()} references schSheetName "${schSheetName}", which does not match any schematic sheet and will be ignored.`
|
|
12654
|
+
});
|
|
12655
|
+
}
|
|
12656
|
+
}
|
|
12657
|
+
|
|
12558
12658
|
// lib/components/base-components/NormalComponent/utils/canMergePortDefinitions.ts
|
|
12559
12659
|
var canMergePortDefinitions = (a, b) => {
|
|
12560
12660
|
const aPinNumber = a._parsedProps.pinNumber;
|
|
@@ -13120,65 +13220,7 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
13120
13220
|
* You can override this method to do more complicated things.
|
|
13121
13221
|
*/
|
|
13122
13222
|
doInitialSchematicComponentRender() {
|
|
13123
|
-
|
|
13124
|
-
if (this.getCollapsedSchematicBoxAncestor()) return;
|
|
13125
|
-
const { db } = this.root;
|
|
13126
|
-
if (this._invalidPinLabelMessages?.length && this.root?.db) {
|
|
13127
|
-
for (const message of this._invalidPinLabelMessages) {
|
|
13128
|
-
let property_name = "pinLabels";
|
|
13129
|
-
const match = message.match(
|
|
13130
|
-
/^Invalid pin label:\s*([^=]+)=\s*'([^']+)'/
|
|
13131
|
-
);
|
|
13132
|
-
if (match) {
|
|
13133
|
-
const label = match[2];
|
|
13134
|
-
property_name = `pinLabels['${label}']`;
|
|
13135
|
-
}
|
|
13136
|
-
this.root.db.source_property_ignored_warning.insert({
|
|
13137
|
-
source_component_id: this.source_component_id,
|
|
13138
|
-
property_name,
|
|
13139
|
-
message,
|
|
13140
|
-
error_type: "source_property_ignored_warning"
|
|
13141
|
-
});
|
|
13142
|
-
}
|
|
13143
|
-
}
|
|
13144
|
-
if (this._parsedProps.schPinSpacing !== void 0 && this.root?.db) {
|
|
13145
|
-
this.root.db.source_property_ignored_warning.insert({
|
|
13146
|
-
source_component_id: this.source_component_id,
|
|
13147
|
-
property_name: "schPinSpacing",
|
|
13148
|
-
error_type: "source_property_ignored_warning",
|
|
13149
|
-
message: "schPinSpacing is deprecated and will be ignored. Pin spacing is always 0.2."
|
|
13150
|
-
});
|
|
13151
|
-
}
|
|
13152
|
-
const { schematicSymbolName } = this.config;
|
|
13153
|
-
const { _parsedProps: props } = this;
|
|
13154
|
-
const hasSymbolChild = this.children.some(
|
|
13155
|
-
(c) => c.componentName === "Symbol"
|
|
13156
|
-
);
|
|
13157
|
-
if (props.symbol && isReactElement2(props.symbol) || hasSymbolChild) {
|
|
13158
|
-
this._doInitialSchematicComponentRenderWithReactSymbol(props.symbol);
|
|
13159
|
-
} else if (schematicSymbolName) {
|
|
13160
|
-
this._doInitialSchematicComponentRenderWithSymbol();
|
|
13161
|
-
} else {
|
|
13162
|
-
const dimensions = this._getSchematicBoxDimensions();
|
|
13163
|
-
if (dimensions) {
|
|
13164
|
-
this._doInitialSchematicComponentRenderWithSchematicBoxDimensions();
|
|
13165
|
-
}
|
|
13166
|
-
}
|
|
13167
|
-
const manualPlacement = this.getSubcircuit()?._getSchematicManualPlacementForComponent(this);
|
|
13168
|
-
if (this.schematic_component_id && (this.props.schX !== void 0 || this.props.schY !== void 0) && !!manualPlacement) {
|
|
13169
|
-
if (!this.schematic_component_id) {
|
|
13170
|
-
return;
|
|
13171
|
-
}
|
|
13172
|
-
const warning = schematic_manual_edit_conflict_warning.parse({
|
|
13173
|
-
type: "schematic_manual_edit_conflict_warning",
|
|
13174
|
-
schematic_manual_edit_conflict_warning_id: `schematic_manual_edit_conflict_${this.source_component_id}`,
|
|
13175
|
-
message: `${this.getString()} has both manual placement and prop coordinates. schX and schY will be used. Remove schX/schY or clear the manual placement.`,
|
|
13176
|
-
schematic_component_id: this.schematic_component_id,
|
|
13177
|
-
source_component_id: this.source_component_id,
|
|
13178
|
-
subcircuit_id: this.getSubcircuit()?.subcircuit_id
|
|
13179
|
-
});
|
|
13180
|
-
db.schematic_manual_edit_conflict_warning.insert(warning);
|
|
13181
|
-
}
|
|
13223
|
+
NormalComponent_doInitialSchematicComponentRender(this);
|
|
13182
13224
|
}
|
|
13183
13225
|
_getSchematicSymbolDisplayValue() {
|
|
13184
13226
|
return void 0;
|
|
@@ -13209,6 +13251,7 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
13209
13251
|
source_component_id: this.source_component_id,
|
|
13210
13252
|
is_box_with_pins: true,
|
|
13211
13253
|
symbol_name,
|
|
13254
|
+
schematic_sheet_id: this._resolveSchematicSheetId(),
|
|
13212
13255
|
symbol_display_value: this._getSchematicSymbolDisplayValue()
|
|
13213
13256
|
});
|
|
13214
13257
|
this.schematic_component_id = schematic_component2.schematic_component_id;
|
|
@@ -13224,7 +13267,8 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
13224
13267
|
size: { width: 0, height: 0 },
|
|
13225
13268
|
source_component_id: this.source_component_id,
|
|
13226
13269
|
symbol_display_value: this._getSchematicSymbolDisplayValue(),
|
|
13227
|
-
is_box_with_pins: false
|
|
13270
|
+
is_box_with_pins: false,
|
|
13271
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
13228
13272
|
});
|
|
13229
13273
|
this.schematic_component_id = schematic_component2.schematic_component_id;
|
|
13230
13274
|
}
|
|
@@ -13258,7 +13302,8 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
13258
13302
|
// @ts-ignore soup needs to support distance for pin_styles
|
|
13259
13303
|
pin_styles: underscorifyPinStyles(props.schPinStyle, props.pinLabels),
|
|
13260
13304
|
port_labels: primaryPortLabels,
|
|
13261
|
-
source_component_id: this.source_component_id
|
|
13305
|
+
source_component_id: this.source_component_id,
|
|
13306
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
13262
13307
|
});
|
|
13263
13308
|
const hasTopOrBottomPins = schPortArrangement?.topSide !== void 0 || schPortArrangement?.bottomSide !== void 0;
|
|
13264
13309
|
const schematic_box_width = dimensions?.getSize().width;
|
|
@@ -13273,7 +13318,8 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
13273
13318
|
y: hasTopOrBottomPins ? center.y + (schematic_box_height ?? 0) / 2 + 0.35 : center.y - (schematic_box_height ?? 0) / 2 - 0.13
|
|
13274
13319
|
},
|
|
13275
13320
|
color: "#006464",
|
|
13276
|
-
font_size: 0.18
|
|
13321
|
+
font_size: 0.18,
|
|
13322
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
13277
13323
|
});
|
|
13278
13324
|
const component_name_text = db.schematic_text.insert({
|
|
13279
13325
|
text: props.displayName ?? props.name ?? "",
|
|
@@ -13285,7 +13331,8 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
13285
13331
|
y: hasTopOrBottomPins ? center.y + (schematic_box_height ?? 0) / 2 + 0.55 : center.y + (schematic_box_height ?? 0) / 2 + 0.13
|
|
13286
13332
|
},
|
|
13287
13333
|
color: "#006464",
|
|
13288
|
-
font_size: 0.18
|
|
13334
|
+
font_size: 0.18,
|
|
13335
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
13289
13336
|
});
|
|
13290
13337
|
this.schematic_component_id = schematic_component2.schematic_component_id;
|
|
13291
13338
|
}
|
|
@@ -13603,7 +13650,7 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
13603
13650
|
}
|
|
13604
13651
|
add(componentOrElm) {
|
|
13605
13652
|
let component;
|
|
13606
|
-
if (
|
|
13653
|
+
if (isReactElement3(componentOrElm)) {
|
|
13607
13654
|
const subtree = this._renderReactSubtree(componentOrElm);
|
|
13608
13655
|
this.reactSubtrees.push(subtree);
|
|
13609
13656
|
component = subtree.component;
|
|
@@ -19267,7 +19314,8 @@ var Group_doInitialSchematicBoxComponentRender = (group) => {
|
|
|
19267
19314
|
props.schPinStyle,
|
|
19268
19315
|
portLabels
|
|
19269
19316
|
),
|
|
19270
|
-
port_labels: portLabels
|
|
19317
|
+
port_labels: portLabels,
|
|
19318
|
+
schematic_sheet_id: group._resolveSchematicSheetId()
|
|
19271
19319
|
});
|
|
19272
19320
|
group.schematic_component_id = schematicComponent.schematic_component_id;
|
|
19273
19321
|
if (group.schematic_group_id) {
|
|
@@ -19290,7 +19338,8 @@ var Group_doInitialSchematicBoxComponentRender = (group) => {
|
|
|
19290
19338
|
y: center.y + size.height / 2 + 0.13
|
|
19291
19339
|
},
|
|
19292
19340
|
color: "#006464",
|
|
19293
|
-
font_size: 0.18
|
|
19341
|
+
font_size: 0.18,
|
|
19342
|
+
schematic_sheet_id: group._resolveSchematicSheetId()
|
|
19294
19343
|
});
|
|
19295
19344
|
}
|
|
19296
19345
|
};
|
|
@@ -20166,7 +20215,8 @@ function applyTracesFromSolverOutput(args) {
|
|
|
20166
20215
|
junctions: junctionsById[t.source_trace_id] ?? [],
|
|
20167
20216
|
subcircuit_connectivity_map_key: pendingTraces.find(
|
|
20168
20217
|
(p) => p.source_trace_id === t.source_trace_id
|
|
20169
|
-
)?.subcircuit_connectivity_map_key
|
|
20218
|
+
)?.subcircuit_connectivity_map_key,
|
|
20219
|
+
schematic_sheet_id: group._resolveSchematicSheetId()
|
|
20170
20220
|
});
|
|
20171
20221
|
}
|
|
20172
20222
|
}
|
|
@@ -20309,7 +20359,8 @@ function applyNetLabelPlacements(args) {
|
|
|
20309
20359
|
source_net_id: sourceNet.source_net_id,
|
|
20310
20360
|
anchor_position,
|
|
20311
20361
|
center: center2,
|
|
20312
|
-
anchor_side
|
|
20362
|
+
anchor_side,
|
|
20363
|
+
schematic_sheet_id: group._resolveSchematicSheetId()
|
|
20313
20364
|
};
|
|
20314
20365
|
db.schematic_net_label.insert(netLabel2);
|
|
20315
20366
|
continue;
|
|
@@ -20336,7 +20387,8 @@ function applyNetLabelPlacements(args) {
|
|
|
20336
20387
|
source_net_id: placementConnKey ?? placement.netId ?? placement.globalConnNetId,
|
|
20337
20388
|
anchor_position,
|
|
20338
20389
|
center,
|
|
20339
|
-
anchor_side
|
|
20390
|
+
anchor_side,
|
|
20391
|
+
schematic_sheet_id: group._resolveSchematicSheetId()
|
|
20340
20392
|
};
|
|
20341
20393
|
db.schematic_net_label.insert(netLabel);
|
|
20342
20394
|
}
|
|
@@ -20531,7 +20583,8 @@ var insertNetLabelsForPortsMissingTrace = ({
|
|
|
20531
20583
|
source_net_id: sourceNet?.source_net_id ?? connKey,
|
|
20532
20584
|
anchor_position: schPort.center,
|
|
20533
20585
|
center,
|
|
20534
|
-
anchor_side: side
|
|
20586
|
+
anchor_side: side,
|
|
20587
|
+
schematic_sheet_id: group._resolveSchematicSheetId()
|
|
20535
20588
|
};
|
|
20536
20589
|
db.schematic_net_label.insert(netLabel);
|
|
20537
20590
|
}
|
|
@@ -24306,7 +24359,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
24306
24359
|
var package_default = {
|
|
24307
24360
|
name: "@tscircuit/core",
|
|
24308
24361
|
type: "module",
|
|
24309
|
-
version: "0.0.
|
|
24362
|
+
version: "0.0.1365",
|
|
24310
24363
|
types: "dist/index.d.ts",
|
|
24311
24364
|
main: "dist/index.js",
|
|
24312
24365
|
module: "dist/index.js",
|
|
@@ -24355,7 +24408,7 @@ var package_default = {
|
|
|
24355
24408
|
"@tscircuit/math-utils": "^0.0.36",
|
|
24356
24409
|
"@tscircuit/miniflex": "^0.0.4",
|
|
24357
24410
|
"@tscircuit/ngspice-spice-engine": "^0.0.18",
|
|
24358
|
-
"@tscircuit/props": "^0.0.
|
|
24411
|
+
"@tscircuit/props": "^0.0.561",
|
|
24359
24412
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
24360
24413
|
"@tscircuit/schematic-trace-solver": "^0.0.72",
|
|
24361
24414
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -24369,13 +24422,13 @@ var package_default = {
|
|
|
24369
24422
|
"bun-match-svg": "0.0.12",
|
|
24370
24423
|
"calculate-elbow": "^0.0.12",
|
|
24371
24424
|
"chokidar-cli": "^3.0.0",
|
|
24372
|
-
"circuit-json": "^0.0.
|
|
24425
|
+
"circuit-json": "^0.0.442",
|
|
24373
24426
|
"circuit-json-to-bpc": "^0.0.13",
|
|
24374
24427
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
24375
24428
|
"circuit-json-to-gltf": "^0.0.105",
|
|
24376
24429
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
24377
24430
|
"circuit-json-to-spice": "^0.0.40",
|
|
24378
|
-
"circuit-to-svg": "^0.0.
|
|
24431
|
+
"circuit-to-svg": "^0.0.364",
|
|
24379
24432
|
concurrently: "^9.1.2",
|
|
24380
24433
|
"connectivity-map": "^1.0.0",
|
|
24381
24434
|
debug: "^4.3.6",
|
|
@@ -28598,7 +28651,8 @@ var NetLabel = class extends PrimitiveComponent2 {
|
|
|
28598
28651
|
source_net_id: net.source_net_id,
|
|
28599
28652
|
anchor_position: anchorPos,
|
|
28600
28653
|
center,
|
|
28601
|
-
anchor_side: anchorSide
|
|
28654
|
+
anchor_side: anchorSide,
|
|
28655
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
28602
28656
|
});
|
|
28603
28657
|
this.source_net_label_id = netLabel.source_net_id;
|
|
28604
28658
|
}
|
|
@@ -28709,7 +28763,8 @@ var NetLabel = class extends PrimitiveComponent2 {
|
|
|
28709
28763
|
source_trace_id,
|
|
28710
28764
|
edges,
|
|
28711
28765
|
junctions: [],
|
|
28712
|
-
subcircuit_connectivity_map_key
|
|
28766
|
+
subcircuit_connectivity_map_key,
|
|
28767
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
28713
28768
|
});
|
|
28714
28769
|
db.schematic_port.update(port.schematic_port_id, { is_connected: true });
|
|
28715
28770
|
}
|
|
@@ -29458,7 +29513,8 @@ function insertInnerSymbolInSchematicBox(connector, symbol) {
|
|
|
29458
29513
|
is_dashed: false,
|
|
29459
29514
|
fill_color: primitive.fill ? SCHEMATIC_COMPONENT_OUTLINE_COLOR : void 0,
|
|
29460
29515
|
stroke_width: 0.02,
|
|
29461
|
-
subcircuit_id
|
|
29516
|
+
subcircuit_id,
|
|
29517
|
+
schematic_sheet_id: connector._resolveSchematicSheetId()
|
|
29462
29518
|
});
|
|
29463
29519
|
} else if (primitive.type === "circle") {
|
|
29464
29520
|
db.schematic_circle.insert({
|
|
@@ -29470,7 +29526,8 @@ function insertInnerSymbolInSchematicBox(connector, symbol) {
|
|
|
29470
29526
|
is_filled: primitive.fill,
|
|
29471
29527
|
fill_color: primitive.fill ? SCHEMATIC_COMPONENT_OUTLINE_COLOR : void 0,
|
|
29472
29528
|
is_dashed: false,
|
|
29473
|
-
subcircuit_id
|
|
29529
|
+
subcircuit_id,
|
|
29530
|
+
schematic_sheet_id: connector._resolveSchematicSheetId()
|
|
29474
29531
|
});
|
|
29475
29532
|
} else if (primitive.type === "box") {
|
|
29476
29533
|
const topLeft = transformPoint({ x: primitive.x, y: primitive.y });
|
|
@@ -29491,7 +29548,8 @@ function insertInnerSymbolInSchematicBox(connector, symbol) {
|
|
|
29491
29548
|
is_filled: false,
|
|
29492
29549
|
is_dashed: false,
|
|
29493
29550
|
rotation: 0,
|
|
29494
|
-
subcircuit_id
|
|
29551
|
+
subcircuit_id,
|
|
29552
|
+
schematic_sheet_id: connector._resolveSchematicSheetId()
|
|
29495
29553
|
});
|
|
29496
29554
|
}
|
|
29497
29555
|
}
|
|
@@ -30564,7 +30622,8 @@ var SchematicBox = class extends PrimitiveComponent2 {
|
|
|
30564
30622
|
x: titleX,
|
|
30565
30623
|
y: titleY
|
|
30566
30624
|
},
|
|
30567
|
-
rotation: 0
|
|
30625
|
+
rotation: 0,
|
|
30626
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
30568
30627
|
});
|
|
30569
30628
|
}
|
|
30570
30629
|
}
|
|
@@ -30670,7 +30729,8 @@ var SchematicSection = class _SchematicSection extends PrimitiveComponent2 {
|
|
|
30670
30729
|
y2: line.end.y,
|
|
30671
30730
|
stroke_width: STROKE_WIDTH,
|
|
30672
30731
|
color: "#000000",
|
|
30673
|
-
is_dashed: false
|
|
30732
|
+
is_dashed: false,
|
|
30733
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
30674
30734
|
});
|
|
30675
30735
|
}
|
|
30676
30736
|
const hDividers = dividers.filter(
|
|
@@ -30698,12 +30758,65 @@ var SchematicSection = class _SchematicSection extends PrimitiveComponent2 {
|
|
|
30698
30758
|
x: leftBoundary + LABEL_PADDING,
|
|
30699
30759
|
y: topBoundary - LABEL_PADDING
|
|
30700
30760
|
},
|
|
30701
|
-
rotation: 0
|
|
30761
|
+
rotation: 0,
|
|
30762
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
30702
30763
|
});
|
|
30703
30764
|
}
|
|
30704
30765
|
}
|
|
30705
30766
|
};
|
|
30706
30767
|
|
|
30768
|
+
// lib/components/primitive-components/SchematicSheet.ts
|
|
30769
|
+
import { schematicSheetProps } from "@tscircuit/props";
|
|
30770
|
+
var SchematicSheet = class extends PrimitiveComponent2 {
|
|
30771
|
+
isSchematicPrimitive = true;
|
|
30772
|
+
get config() {
|
|
30773
|
+
return {
|
|
30774
|
+
componentName: "SchematicSheet",
|
|
30775
|
+
zodProps: schematicSheetProps
|
|
30776
|
+
};
|
|
30777
|
+
}
|
|
30778
|
+
doInitialSourceGroupRender() {
|
|
30779
|
+
if (this.root?.schematicDisabled) return;
|
|
30780
|
+
const { db } = this.root;
|
|
30781
|
+
const { _parsedProps: props } = this;
|
|
30782
|
+
const schematicSheet = db.schematic_sheet.insert({
|
|
30783
|
+
name: props.name,
|
|
30784
|
+
display_name: props.displayName,
|
|
30785
|
+
sheet_index: props.sheetIndex,
|
|
30786
|
+
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
|
|
30787
|
+
});
|
|
30788
|
+
this.schematic_sheet_id = schematicSheet.schematic_sheet_id;
|
|
30789
|
+
}
|
|
30790
|
+
doInitialSchematicSheetRender() {
|
|
30791
|
+
if (this.root?.schematicDisabled) return;
|
|
30792
|
+
if (!this.schematic_sheet_id) return;
|
|
30793
|
+
const { db } = this.root;
|
|
30794
|
+
const schematicElements = [
|
|
30795
|
+
...db.schematic_component.list(),
|
|
30796
|
+
...db.schematic_port.list(),
|
|
30797
|
+
...db.schematic_text.list(),
|
|
30798
|
+
...db.schematic_line.list(),
|
|
30799
|
+
...db.schematic_rect.list(),
|
|
30800
|
+
...db.schematic_circle.list(),
|
|
30801
|
+
...db.schematic_arc.list(),
|
|
30802
|
+
...db.schematic_path.list()
|
|
30803
|
+
].filter(
|
|
30804
|
+
(element) => element.schematic_sheet_id === this.schematic_sheet_id
|
|
30805
|
+
);
|
|
30806
|
+
if (schematicElements.length === 0) return;
|
|
30807
|
+
const bounds = getBoundsForSchematic(schematicElements);
|
|
30808
|
+
if (!Number.isFinite(bounds.minX) || !Number.isFinite(bounds.maxX) || !Number.isFinite(bounds.minY) || !Number.isFinite(bounds.maxY)) {
|
|
30809
|
+
return;
|
|
30810
|
+
}
|
|
30811
|
+
db.schematic_sheet.update(this.schematic_sheet_id, {
|
|
30812
|
+
center: {
|
|
30813
|
+
x: (bounds.minX + bounds.maxX) / 2,
|
|
30814
|
+
y: (bounds.minY + bounds.maxY) / 2
|
|
30815
|
+
}
|
|
30816
|
+
});
|
|
30817
|
+
}
|
|
30818
|
+
};
|
|
30819
|
+
|
|
30707
30820
|
// lib/components/primitive-components/SchematicTable.ts
|
|
30708
30821
|
import { schematicTableProps } from "@tscircuit/props";
|
|
30709
30822
|
var SchematicTable = class extends PrimitiveComponent2 {
|
|
@@ -30784,7 +30897,8 @@ var SchematicTable = class extends PrimitiveComponent2 {
|
|
|
30784
30897
|
border_width: props.borderWidth,
|
|
30785
30898
|
anchor: props.anchor,
|
|
30786
30899
|
subcircuit_id: this.getSubcircuit()?.subcircuit_id || "",
|
|
30787
|
-
schematic_component_id: this.parent?.schematic_component_id || ""
|
|
30900
|
+
schematic_component_id: this.parent?.schematic_component_id || "",
|
|
30901
|
+
schematic_sheet_id: this._resolveSchematicSheetId()
|
|
30788
30902
|
});
|
|
30789
30903
|
this.schematic_table_id = table.schematic_table_id;
|
|
30790
30904
|
const processedCells = /* @__PURE__ */ new Set();
|
|
@@ -31563,6 +31677,7 @@ export {
|
|
|
31563
31677
|
SchematicRect,
|
|
31564
31678
|
SchematicRow,
|
|
31565
31679
|
SchematicSection,
|
|
31680
|
+
SchematicSheet,
|
|
31566
31681
|
SchematicTable,
|
|
31567
31682
|
SchematicText,
|
|
31568
31683
|
SilkscreenCircle,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1366",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@tscircuit/math-utils": "^0.0.36",
|
|
51
51
|
"@tscircuit/miniflex": "^0.0.4",
|
|
52
52
|
"@tscircuit/ngspice-spice-engine": "^0.0.18",
|
|
53
|
-
"@tscircuit/props": "^0.0.
|
|
53
|
+
"@tscircuit/props": "^0.0.561",
|
|
54
54
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
55
55
|
"@tscircuit/schematic-trace-solver": "^0.0.72",
|
|
56
56
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"bun-match-svg": "0.0.12",
|
|
65
65
|
"calculate-elbow": "^0.0.12",
|
|
66
66
|
"chokidar-cli": "^3.0.0",
|
|
67
|
-
"circuit-json": "^0.0.
|
|
67
|
+
"circuit-json": "^0.0.442",
|
|
68
68
|
"circuit-json-to-bpc": "^0.0.13",
|
|
69
69
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
70
70
|
"circuit-json-to-gltf": "^0.0.105",
|
|
71
71
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
72
72
|
"circuit-json-to-spice": "^0.0.40",
|
|
73
|
-
"circuit-to-svg": "^0.0.
|
|
73
|
+
"circuit-to-svg": "^0.0.364",
|
|
74
74
|
"concurrently": "^9.1.2",
|
|
75
75
|
"connectivity-map": "^1.0.0",
|
|
76
76
|
"debug": "^4.3.6",
|