@tscircuit/core 0.0.780 → 0.0.782
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 +405 -2
- package/dist/index.js +225 -8
- package/package.json +1 -1
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, AnySourceComponent, PcbTraceRoutePoint, PcbTrace as PcbTrace$1, PcbVia, SchematicPort, SchematicComponent, RouteHintPoint, CircuitJson } from 'circuit-json';
|
|
3
3
|
import * as _tscircuit_props from '@tscircuit/props';
|
|
4
|
-
import { PlatformConfig, subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, solderjumperProps, ledProps, powerSourceProps, CommonComponentProps, resistorProps, constraintProps, fabricationNotePathProps, fabricationNoteTextProps, pcbNoteLineProps, footprintProps, subcircuitProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, traceHintProps, viaProps, copperPourProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicBoxProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
4
|
+
import { PlatformConfig, subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, solderjumperProps, ledProps, powerSourceProps, CommonComponentProps, resistorProps, constraintProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, pcbNoteLineProps, pcbNoteRectProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, subcircuitProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, traceHintProps, viaProps, copperPourProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicBoxProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactElement, DetailedHTMLProps, SVGProps } from 'react';
|
|
7
7
|
export { createElement } from 'react';
|
|
@@ -17055,6 +17055,91 @@ declare class Constraint extends PrimitiveComponent<typeof constraintProps> {
|
|
|
17055
17055
|
};
|
|
17056
17056
|
}
|
|
17057
17057
|
|
|
17058
|
+
declare class FabricationNoteRect extends PrimitiveComponent<typeof fabricationNoteRectProps> {
|
|
17059
|
+
fabrication_note_rect_id: string | null;
|
|
17060
|
+
get config(): {
|
|
17061
|
+
componentName: string;
|
|
17062
|
+
zodProps: zod.ZodObject<Omit<{
|
|
17063
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17064
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17065
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17066
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
17067
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
17068
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
17069
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17070
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17071
|
+
}, {
|
|
17072
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17073
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17074
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17075
|
+
}>>;
|
|
17076
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17077
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17078
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17079
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17080
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17081
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17082
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17083
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17084
|
+
}, "pcbRotation"> & {
|
|
17085
|
+
width: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17086
|
+
height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17087
|
+
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17088
|
+
isFilled: zod.ZodOptional<zod.ZodBoolean>;
|
|
17089
|
+
hasStroke: zod.ZodOptional<zod.ZodBoolean>;
|
|
17090
|
+
isStrokeDashed: zod.ZodOptional<zod.ZodBoolean>;
|
|
17091
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
17092
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17093
|
+
width: number;
|
|
17094
|
+
height: number;
|
|
17095
|
+
pcbX?: number | undefined;
|
|
17096
|
+
pcbY?: number | undefined;
|
|
17097
|
+
pcbPositionAnchor?: string | undefined;
|
|
17098
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17099
|
+
pcbMarginTop?: number | undefined;
|
|
17100
|
+
pcbMarginRight?: number | undefined;
|
|
17101
|
+
pcbMarginBottom?: number | undefined;
|
|
17102
|
+
pcbMarginLeft?: number | undefined;
|
|
17103
|
+
pcbMarginX?: number | undefined;
|
|
17104
|
+
pcbMarginY?: number | undefined;
|
|
17105
|
+
pcbRelative?: boolean | undefined;
|
|
17106
|
+
relative?: boolean | undefined;
|
|
17107
|
+
strokeWidth?: number | undefined;
|
|
17108
|
+
color?: string | undefined;
|
|
17109
|
+
isFilled?: boolean | undefined;
|
|
17110
|
+
hasStroke?: boolean | undefined;
|
|
17111
|
+
isStrokeDashed?: boolean | undefined;
|
|
17112
|
+
}, {
|
|
17113
|
+
width: string | number;
|
|
17114
|
+
height: string | number;
|
|
17115
|
+
pcbX?: string | number | undefined;
|
|
17116
|
+
pcbY?: string | number | undefined;
|
|
17117
|
+
pcbPositionAnchor?: string | undefined;
|
|
17118
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17119
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17120
|
+
} | undefined;
|
|
17121
|
+
pcbMarginTop?: string | number | undefined;
|
|
17122
|
+
pcbMarginRight?: string | number | undefined;
|
|
17123
|
+
pcbMarginBottom?: string | number | undefined;
|
|
17124
|
+
pcbMarginLeft?: string | number | undefined;
|
|
17125
|
+
pcbMarginX?: string | number | undefined;
|
|
17126
|
+
pcbMarginY?: string | number | undefined;
|
|
17127
|
+
pcbRelative?: boolean | undefined;
|
|
17128
|
+
relative?: boolean | undefined;
|
|
17129
|
+
strokeWidth?: string | number | undefined;
|
|
17130
|
+
color?: string | undefined;
|
|
17131
|
+
isFilled?: boolean | undefined;
|
|
17132
|
+
hasStroke?: boolean | undefined;
|
|
17133
|
+
isStrokeDashed?: boolean | undefined;
|
|
17134
|
+
}>;
|
|
17135
|
+
};
|
|
17136
|
+
doInitialPcbPrimitiveRender(): void;
|
|
17137
|
+
getPcbSize(): {
|
|
17138
|
+
width: number;
|
|
17139
|
+
height: number;
|
|
17140
|
+
};
|
|
17141
|
+
}
|
|
17142
|
+
|
|
17058
17143
|
declare class FabricationNotePath extends PrimitiveComponent<typeof fabricationNotePathProps> {
|
|
17059
17144
|
fabrication_note_path_id: string | null;
|
|
17060
17145
|
get config(): {
|
|
@@ -17320,6 +17405,320 @@ declare class PcbNoteLine extends PrimitiveComponent<typeof pcbNoteLineProps> {
|
|
|
17320
17405
|
};
|
|
17321
17406
|
}
|
|
17322
17407
|
|
|
17408
|
+
declare class PcbNoteRect extends PrimitiveComponent<typeof pcbNoteRectProps> {
|
|
17409
|
+
pcb_note_rect_id: string | null;
|
|
17410
|
+
isPcbPrimitive: boolean;
|
|
17411
|
+
get config(): {
|
|
17412
|
+
componentName: string;
|
|
17413
|
+
zodProps: zod.ZodObject<Omit<{
|
|
17414
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17415
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17416
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17417
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
17418
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
17419
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
17420
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17421
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17422
|
+
}, {
|
|
17423
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17424
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17425
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17426
|
+
}>>;
|
|
17427
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17428
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17429
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17430
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17431
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17432
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17433
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17434
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17435
|
+
}, "pcbRotation"> & {
|
|
17436
|
+
width: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17437
|
+
height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17438
|
+
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17439
|
+
isFilled: zod.ZodOptional<zod.ZodBoolean>;
|
|
17440
|
+
hasStroke: zod.ZodOptional<zod.ZodBoolean>;
|
|
17441
|
+
isStrokeDashed: zod.ZodOptional<zod.ZodBoolean>;
|
|
17442
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
17443
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17444
|
+
width: number;
|
|
17445
|
+
height: number;
|
|
17446
|
+
pcbX?: number | undefined;
|
|
17447
|
+
pcbY?: number | undefined;
|
|
17448
|
+
pcbPositionAnchor?: string | undefined;
|
|
17449
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17450
|
+
pcbMarginTop?: number | undefined;
|
|
17451
|
+
pcbMarginRight?: number | undefined;
|
|
17452
|
+
pcbMarginBottom?: number | undefined;
|
|
17453
|
+
pcbMarginLeft?: number | undefined;
|
|
17454
|
+
pcbMarginX?: number | undefined;
|
|
17455
|
+
pcbMarginY?: number | undefined;
|
|
17456
|
+
pcbRelative?: boolean | undefined;
|
|
17457
|
+
relative?: boolean | undefined;
|
|
17458
|
+
strokeWidth?: number | undefined;
|
|
17459
|
+
color?: string | undefined;
|
|
17460
|
+
isFilled?: boolean | undefined;
|
|
17461
|
+
hasStroke?: boolean | undefined;
|
|
17462
|
+
isStrokeDashed?: boolean | undefined;
|
|
17463
|
+
}, {
|
|
17464
|
+
width: string | number;
|
|
17465
|
+
height: string | number;
|
|
17466
|
+
pcbX?: string | number | undefined;
|
|
17467
|
+
pcbY?: string | number | undefined;
|
|
17468
|
+
pcbPositionAnchor?: string | undefined;
|
|
17469
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17470
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17471
|
+
} | undefined;
|
|
17472
|
+
pcbMarginTop?: string | number | undefined;
|
|
17473
|
+
pcbMarginRight?: string | number | undefined;
|
|
17474
|
+
pcbMarginBottom?: string | number | undefined;
|
|
17475
|
+
pcbMarginLeft?: string | number | undefined;
|
|
17476
|
+
pcbMarginX?: string | number | undefined;
|
|
17477
|
+
pcbMarginY?: string | number | undefined;
|
|
17478
|
+
pcbRelative?: boolean | undefined;
|
|
17479
|
+
relative?: boolean | undefined;
|
|
17480
|
+
strokeWidth?: string | number | undefined;
|
|
17481
|
+
color?: string | undefined;
|
|
17482
|
+
isFilled?: boolean | undefined;
|
|
17483
|
+
hasStroke?: boolean | undefined;
|
|
17484
|
+
isStrokeDashed?: boolean | undefined;
|
|
17485
|
+
}>;
|
|
17486
|
+
};
|
|
17487
|
+
doInitialPcbPrimitiveRender(): void;
|
|
17488
|
+
getPcbSize(): {
|
|
17489
|
+
width: number;
|
|
17490
|
+
height: number;
|
|
17491
|
+
};
|
|
17492
|
+
}
|
|
17493
|
+
|
|
17494
|
+
declare class PcbNotePath extends PrimitiveComponent<typeof pcbNotePathProps> {
|
|
17495
|
+
pcb_note_path_id: string | null;
|
|
17496
|
+
isPcbPrimitive: boolean;
|
|
17497
|
+
get config(): {
|
|
17498
|
+
componentName: string;
|
|
17499
|
+
zodProps: zod.ZodObject<Omit<{
|
|
17500
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17501
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17502
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17503
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
17504
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
17505
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
17506
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17507
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17508
|
+
}, {
|
|
17509
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17510
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17511
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17512
|
+
}>>;
|
|
17513
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17514
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17515
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17516
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17517
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17518
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17519
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17520
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17521
|
+
}, "pcbRotation" | "pcbX" | "pcbY"> & {
|
|
17522
|
+
route: zod.ZodArray<zod.ZodObject<{
|
|
17523
|
+
x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17524
|
+
y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17525
|
+
via: zod.ZodOptional<zod.ZodBoolean>;
|
|
17526
|
+
to_layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
17527
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
17528
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17529
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17530
|
+
}, {
|
|
17531
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17532
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17533
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17534
|
+
}>>;
|
|
17535
|
+
trace_width: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17536
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17537
|
+
x: number;
|
|
17538
|
+
y: number;
|
|
17539
|
+
via?: boolean | undefined;
|
|
17540
|
+
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17541
|
+
trace_width?: number | undefined;
|
|
17542
|
+
}, {
|
|
17543
|
+
x: string | number;
|
|
17544
|
+
y: string | number;
|
|
17545
|
+
via?: boolean | undefined;
|
|
17546
|
+
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17547
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17548
|
+
} | undefined;
|
|
17549
|
+
trace_width?: string | number | undefined;
|
|
17550
|
+
}>, "many">;
|
|
17551
|
+
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17552
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
17553
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17554
|
+
route: {
|
|
17555
|
+
x: number;
|
|
17556
|
+
y: number;
|
|
17557
|
+
via?: boolean | undefined;
|
|
17558
|
+
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17559
|
+
trace_width?: number | undefined;
|
|
17560
|
+
}[];
|
|
17561
|
+
pcbPositionAnchor?: string | undefined;
|
|
17562
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17563
|
+
pcbMarginTop?: number | undefined;
|
|
17564
|
+
pcbMarginRight?: number | undefined;
|
|
17565
|
+
pcbMarginBottom?: number | undefined;
|
|
17566
|
+
pcbMarginLeft?: number | undefined;
|
|
17567
|
+
pcbMarginX?: number | undefined;
|
|
17568
|
+
pcbMarginY?: number | undefined;
|
|
17569
|
+
pcbRelative?: boolean | undefined;
|
|
17570
|
+
relative?: boolean | undefined;
|
|
17571
|
+
strokeWidth?: number | undefined;
|
|
17572
|
+
color?: string | undefined;
|
|
17573
|
+
}, {
|
|
17574
|
+
route: {
|
|
17575
|
+
x: string | number;
|
|
17576
|
+
y: string | number;
|
|
17577
|
+
via?: boolean | undefined;
|
|
17578
|
+
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17579
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17580
|
+
} | undefined;
|
|
17581
|
+
trace_width?: string | number | undefined;
|
|
17582
|
+
}[];
|
|
17583
|
+
pcbPositionAnchor?: string | undefined;
|
|
17584
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17585
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17586
|
+
} | undefined;
|
|
17587
|
+
pcbMarginTop?: string | number | undefined;
|
|
17588
|
+
pcbMarginRight?: string | number | undefined;
|
|
17589
|
+
pcbMarginBottom?: string | number | undefined;
|
|
17590
|
+
pcbMarginLeft?: string | number | undefined;
|
|
17591
|
+
pcbMarginX?: string | number | undefined;
|
|
17592
|
+
pcbMarginY?: string | number | undefined;
|
|
17593
|
+
pcbRelative?: boolean | undefined;
|
|
17594
|
+
relative?: boolean | undefined;
|
|
17595
|
+
strokeWidth?: string | number | undefined;
|
|
17596
|
+
color?: string | undefined;
|
|
17597
|
+
}>;
|
|
17598
|
+
};
|
|
17599
|
+
doInitialPcbPrimitiveRender(): void;
|
|
17600
|
+
getPcbSize(): {
|
|
17601
|
+
width: number;
|
|
17602
|
+
height: number;
|
|
17603
|
+
};
|
|
17604
|
+
}
|
|
17605
|
+
|
|
17606
|
+
declare class PcbNoteDimension extends PrimitiveComponent<typeof pcbNoteDimensionProps> {
|
|
17607
|
+
pcb_note_dimension_id: string | null;
|
|
17608
|
+
isPcbPrimitive: boolean;
|
|
17609
|
+
get config(): {
|
|
17610
|
+
componentName: string;
|
|
17611
|
+
zodProps: zod.ZodObject<Omit<{
|
|
17612
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17613
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17614
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17615
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
17616
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
17617
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
17618
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17619
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17620
|
+
}, {
|
|
17621
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17622
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17623
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17624
|
+
}>>;
|
|
17625
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17626
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17627
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17628
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17629
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17630
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17631
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17632
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17633
|
+
}, "pcbRotation" | "pcbX" | "pcbY"> & {
|
|
17634
|
+
from: zod.ZodUnion<[zod.ZodString, zod.ZodObject<{
|
|
17635
|
+
x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17636
|
+
y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17637
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17638
|
+
x: number;
|
|
17639
|
+
y: number;
|
|
17640
|
+
}, {
|
|
17641
|
+
x: string | number;
|
|
17642
|
+
y: string | number;
|
|
17643
|
+
}>]>;
|
|
17644
|
+
to: zod.ZodUnion<[zod.ZodString, zod.ZodObject<{
|
|
17645
|
+
x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17646
|
+
y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17647
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17648
|
+
x: number;
|
|
17649
|
+
y: number;
|
|
17650
|
+
}, {
|
|
17651
|
+
x: string | number;
|
|
17652
|
+
y: string | number;
|
|
17653
|
+
}>]>;
|
|
17654
|
+
text: zod.ZodOptional<zod.ZodString>;
|
|
17655
|
+
offset: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17656
|
+
font: zod.ZodOptional<zod.ZodEnum<["tscircuit2024"]>>;
|
|
17657
|
+
fontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17658
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
17659
|
+
arrowSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17660
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17661
|
+
from: string | {
|
|
17662
|
+
x: number;
|
|
17663
|
+
y: number;
|
|
17664
|
+
};
|
|
17665
|
+
to: string | {
|
|
17666
|
+
x: number;
|
|
17667
|
+
y: number;
|
|
17668
|
+
};
|
|
17669
|
+
pcbPositionAnchor?: string | undefined;
|
|
17670
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17671
|
+
pcbMarginTop?: number | undefined;
|
|
17672
|
+
pcbMarginRight?: number | undefined;
|
|
17673
|
+
pcbMarginBottom?: number | undefined;
|
|
17674
|
+
pcbMarginLeft?: number | undefined;
|
|
17675
|
+
pcbMarginX?: number | undefined;
|
|
17676
|
+
pcbMarginY?: number | undefined;
|
|
17677
|
+
pcbRelative?: boolean | undefined;
|
|
17678
|
+
relative?: boolean | undefined;
|
|
17679
|
+
color?: string | undefined;
|
|
17680
|
+
text?: string | undefined;
|
|
17681
|
+
font?: "tscircuit2024" | undefined;
|
|
17682
|
+
fontSize?: number | undefined;
|
|
17683
|
+
offset?: number | undefined;
|
|
17684
|
+
arrowSize?: number | undefined;
|
|
17685
|
+
}, {
|
|
17686
|
+
from: string | {
|
|
17687
|
+
x: string | number;
|
|
17688
|
+
y: string | number;
|
|
17689
|
+
};
|
|
17690
|
+
to: string | {
|
|
17691
|
+
x: string | number;
|
|
17692
|
+
y: string | number;
|
|
17693
|
+
};
|
|
17694
|
+
pcbPositionAnchor?: string | undefined;
|
|
17695
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17696
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17697
|
+
} | undefined;
|
|
17698
|
+
pcbMarginTop?: string | number | undefined;
|
|
17699
|
+
pcbMarginRight?: string | number | undefined;
|
|
17700
|
+
pcbMarginBottom?: string | number | undefined;
|
|
17701
|
+
pcbMarginLeft?: string | number | undefined;
|
|
17702
|
+
pcbMarginX?: string | number | undefined;
|
|
17703
|
+
pcbMarginY?: string | number | undefined;
|
|
17704
|
+
pcbRelative?: boolean | undefined;
|
|
17705
|
+
relative?: boolean | undefined;
|
|
17706
|
+
color?: string | undefined;
|
|
17707
|
+
text?: string | undefined;
|
|
17708
|
+
font?: "tscircuit2024" | undefined;
|
|
17709
|
+
fontSize?: string | number | undefined;
|
|
17710
|
+
offset?: string | number | undefined;
|
|
17711
|
+
arrowSize?: string | number | undefined;
|
|
17712
|
+
}>;
|
|
17713
|
+
};
|
|
17714
|
+
private _resolvePoint;
|
|
17715
|
+
doInitialPcbPrimitiveRender(): void;
|
|
17716
|
+
getPcbSize(): {
|
|
17717
|
+
width: number;
|
|
17718
|
+
height: number;
|
|
17719
|
+
};
|
|
17720
|
+
}
|
|
17721
|
+
|
|
17323
17722
|
declare class Footprint extends PrimitiveComponent<typeof footprintProps> {
|
|
17324
17723
|
get config(): {
|
|
17325
17724
|
componentName: string;
|
|
@@ -33556,7 +33955,11 @@ interface TscircuitElements {
|
|
|
33556
33955
|
silkscreencircle: _tscircuit_props.SilkscreenCircleProps;
|
|
33557
33956
|
tracehint: _tscircuit_props.TraceHintProps;
|
|
33558
33957
|
pcbtrace: _tscircuit_props.PcbTraceProps;
|
|
33958
|
+
fabricationnoterect: _tscircuit_props.FabricationNoteRectProps;
|
|
33559
33959
|
pcbnoteline: _tscircuit_props.PcbNoteLineProps;
|
|
33960
|
+
pcbnoterect: _tscircuit_props.PcbNoteRectProps;
|
|
33961
|
+
pcbnotepath: _tscircuit_props.PcbNotePathProps;
|
|
33962
|
+
pcbnotedimension: _tscircuit_props.PcbNoteDimensionProps;
|
|
33560
33963
|
fabricationnotetext: _tscircuit_props.FabricationNoteTextProps;
|
|
33561
33964
|
fabricationnotepath: _tscircuit_props.FabricationNotePathProps;
|
|
33562
33965
|
constraint: _tscircuit_props.ConstraintProps;
|
|
@@ -33588,4 +33991,4 @@ declare module "react/jsx-runtime" {
|
|
|
33588
33991
|
}
|
|
33589
33992
|
}
|
|
33590
33993
|
|
|
33591
|
-
export { AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, CopperPour, Crystal, Cutout, type DebugLogOutputEvent, Diode, FabricationNotePath, FabricationNoteText, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, PcbNoteLine, PcbTrace, 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, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicRect, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, Subcircuit, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
|
33994
|
+
export { AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, CopperPour, Crystal, Cutout, type DebugLogOutputEvent, Diode, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbTrace, 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, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicRect, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, Subcircuit, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __export(components_exports, {
|
|
|
22
22
|
Cutout: () => Cutout,
|
|
23
23
|
Diode: () => Diode,
|
|
24
24
|
FabricationNotePath: () => FabricationNotePath,
|
|
25
|
+
FabricationNoteRect: () => FabricationNoteRect,
|
|
25
26
|
FabricationNoteText: () => FabricationNoteText,
|
|
26
27
|
Footprint: () => Footprint,
|
|
27
28
|
Fuse: () => Fuse,
|
|
@@ -35,7 +36,10 @@ __export(components_exports, {
|
|
|
35
36
|
Net: () => Net,
|
|
36
37
|
NetLabel: () => NetLabel,
|
|
37
38
|
NormalComponent: () => NormalComponent3,
|
|
39
|
+
PcbNoteDimension: () => PcbNoteDimension,
|
|
38
40
|
PcbNoteLine: () => PcbNoteLine,
|
|
41
|
+
PcbNotePath: () => PcbNotePath,
|
|
42
|
+
PcbNoteRect: () => PcbNoteRect,
|
|
39
43
|
PcbTrace: () => PcbTrace,
|
|
40
44
|
PinHeader: () => PinHeader,
|
|
41
45
|
Pinout: () => Pinout,
|
|
@@ -14208,9 +14212,58 @@ var Constraint3 = class extends PrimitiveComponent2 {
|
|
|
14208
14212
|
}
|
|
14209
14213
|
};
|
|
14210
14214
|
|
|
14215
|
+
// lib/components/primitive-components/FabricationNoteRect.ts
|
|
14216
|
+
import { fabricationNoteRectProps } from "@tscircuit/props";
|
|
14217
|
+
import "transformation-matrix";
|
|
14218
|
+
var FabricationNoteRect = class extends PrimitiveComponent2 {
|
|
14219
|
+
fabrication_note_rect_id = null;
|
|
14220
|
+
get config() {
|
|
14221
|
+
return {
|
|
14222
|
+
componentName: "FabricationNoteRect",
|
|
14223
|
+
zodProps: fabricationNoteRectProps
|
|
14224
|
+
};
|
|
14225
|
+
}
|
|
14226
|
+
doInitialPcbPrimitiveRender() {
|
|
14227
|
+
if (this.root?.pcbDisabled) return;
|
|
14228
|
+
const { db } = this.root;
|
|
14229
|
+
const { _parsedProps: props } = this;
|
|
14230
|
+
const { maybeFlipLayer } = this._getPcbPrimitiveFlippedHelpers();
|
|
14231
|
+
const layer = maybeFlipLayer(props.layer ?? "top");
|
|
14232
|
+
if (layer !== "top" && layer !== "bottom") {
|
|
14233
|
+
throw new Error(
|
|
14234
|
+
`Invalid layer "${layer}" for FabricationNoteRect. Must be "top" or "bottom".`
|
|
14235
|
+
);
|
|
14236
|
+
}
|
|
14237
|
+
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id;
|
|
14238
|
+
const subcircuit = this.getSubcircuit();
|
|
14239
|
+
const fabrication_note_rect = db.pcb_fabrication_note_rect.insert({
|
|
14240
|
+
pcb_component_id,
|
|
14241
|
+
layer,
|
|
14242
|
+
color: props.color,
|
|
14243
|
+
center: {
|
|
14244
|
+
x: props.pcbX ?? 0,
|
|
14245
|
+
y: props.pcbY ?? 0
|
|
14246
|
+
},
|
|
14247
|
+
width: props.width,
|
|
14248
|
+
height: props.height,
|
|
14249
|
+
stroke_width: props.strokeWidth ?? 1,
|
|
14250
|
+
is_filled: props.isFilled ?? false,
|
|
14251
|
+
has_stroke: props.hasStroke ?? false,
|
|
14252
|
+
is_stroke_dashed: props.isStrokeDashed ?? false,
|
|
14253
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
14254
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
14255
|
+
});
|
|
14256
|
+
this.fabrication_note_rect_id = fabrication_note_rect.pcb_fabrication_note_rect_id;
|
|
14257
|
+
}
|
|
14258
|
+
getPcbSize() {
|
|
14259
|
+
const { _parsedProps: props } = this;
|
|
14260
|
+
return { width: props.width, height: props.height };
|
|
14261
|
+
}
|
|
14262
|
+
};
|
|
14263
|
+
|
|
14211
14264
|
// lib/components/primitive-components/FabricationNotePath.ts
|
|
14212
14265
|
import { fabricationNotePathProps } from "@tscircuit/props";
|
|
14213
|
-
import { applyToPoint as
|
|
14266
|
+
import { applyToPoint as applyToPoint9 } from "transformation-matrix";
|
|
14214
14267
|
var FabricationNotePath = class extends PrimitiveComponent2 {
|
|
14215
14268
|
fabrication_note_path_id = null;
|
|
14216
14269
|
get config() {
|
|
@@ -14237,7 +14290,7 @@ var FabricationNotePath = class extends PrimitiveComponent2 {
|
|
|
14237
14290
|
layer,
|
|
14238
14291
|
color: props.color,
|
|
14239
14292
|
route: props.route.map((p) => {
|
|
14240
|
-
const transformedPosition =
|
|
14293
|
+
const transformedPosition = applyToPoint9(transform, {
|
|
14241
14294
|
x: p.x,
|
|
14242
14295
|
y: p.y
|
|
14243
14296
|
});
|
|
@@ -14289,7 +14342,7 @@ var FabricationNoteText = class extends PrimitiveComponent2 {
|
|
|
14289
14342
|
|
|
14290
14343
|
// lib/components/primitive-components/PcbNoteLine.ts
|
|
14291
14344
|
import { pcbNoteLineProps } from "@tscircuit/props";
|
|
14292
|
-
import { applyToPoint as
|
|
14345
|
+
import { applyToPoint as applyToPoint10 } from "transformation-matrix";
|
|
14293
14346
|
var PcbNoteLine = class extends PrimitiveComponent2 {
|
|
14294
14347
|
pcb_note_line_id = null;
|
|
14295
14348
|
isPcbPrimitive = true;
|
|
@@ -14306,8 +14359,8 @@ var PcbNoteLine = class extends PrimitiveComponent2 {
|
|
|
14306
14359
|
const subcircuit = this.getSubcircuit();
|
|
14307
14360
|
const group = this.getGroup();
|
|
14308
14361
|
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14309
|
-
const start =
|
|
14310
|
-
const end =
|
|
14362
|
+
const start = applyToPoint10(transform, { x: props.x1, y: props.y1 });
|
|
14363
|
+
const end = applyToPoint10(transform, { x: props.x2, y: props.y2 });
|
|
14311
14364
|
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id ?? void 0;
|
|
14312
14365
|
const pcb_note_line = db.pcb_note_line.insert({
|
|
14313
14366
|
pcb_component_id,
|
|
@@ -14332,6 +14385,166 @@ var PcbNoteLine = class extends PrimitiveComponent2 {
|
|
|
14332
14385
|
}
|
|
14333
14386
|
};
|
|
14334
14387
|
|
|
14388
|
+
// lib/components/primitive-components/PcbNoteRect.ts
|
|
14389
|
+
import { pcbNoteRectProps } from "@tscircuit/props";
|
|
14390
|
+
import { applyToPoint as applyToPoint11 } from "transformation-matrix";
|
|
14391
|
+
var PcbNoteRect = class extends PrimitiveComponent2 {
|
|
14392
|
+
pcb_note_rect_id = null;
|
|
14393
|
+
isPcbPrimitive = true;
|
|
14394
|
+
get config() {
|
|
14395
|
+
return {
|
|
14396
|
+
componentName: "PcbNoteRect",
|
|
14397
|
+
zodProps: pcbNoteRectProps
|
|
14398
|
+
};
|
|
14399
|
+
}
|
|
14400
|
+
doInitialPcbPrimitiveRender() {
|
|
14401
|
+
if (this.root?.pcbDisabled) return;
|
|
14402
|
+
const { db } = this.root;
|
|
14403
|
+
const { _parsedProps: props } = this;
|
|
14404
|
+
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14405
|
+
const center = applyToPoint11(transform, { x: 0, y: 0 });
|
|
14406
|
+
const subcircuit = this.getSubcircuit();
|
|
14407
|
+
const group = this.getGroup();
|
|
14408
|
+
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id ?? void 0;
|
|
14409
|
+
const pcb_note_rect = db.pcb_note_rect.insert({
|
|
14410
|
+
pcb_component_id,
|
|
14411
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
14412
|
+
pcb_group_id: group?.pcb_group_id ?? void 0,
|
|
14413
|
+
center,
|
|
14414
|
+
width: props.width,
|
|
14415
|
+
height: props.height,
|
|
14416
|
+
stroke_width: props.strokeWidth ?? 0.1,
|
|
14417
|
+
is_filled: props.isFilled ?? false,
|
|
14418
|
+
has_stroke: props.hasStroke ?? true,
|
|
14419
|
+
is_stroke_dashed: props.isStrokeDashed ?? false,
|
|
14420
|
+
color: props.color
|
|
14421
|
+
});
|
|
14422
|
+
this.pcb_note_rect_id = pcb_note_rect.pcb_note_rect_id;
|
|
14423
|
+
}
|
|
14424
|
+
getPcbSize() {
|
|
14425
|
+
const { _parsedProps: props } = this;
|
|
14426
|
+
const width = typeof props.width === "string" ? parseFloat(props.width) : props.width;
|
|
14427
|
+
const height = typeof props.height === "string" ? parseFloat(props.height) : props.height;
|
|
14428
|
+
return { width, height };
|
|
14429
|
+
}
|
|
14430
|
+
};
|
|
14431
|
+
|
|
14432
|
+
// lib/components/primitive-components/PcbNotePath.ts
|
|
14433
|
+
import { pcbNotePathProps } from "@tscircuit/props";
|
|
14434
|
+
import { applyToPoint as applyToPoint12 } from "transformation-matrix";
|
|
14435
|
+
var PcbNotePath = class extends PrimitiveComponent2 {
|
|
14436
|
+
pcb_note_path_id = null;
|
|
14437
|
+
isPcbPrimitive = true;
|
|
14438
|
+
get config() {
|
|
14439
|
+
return {
|
|
14440
|
+
componentName: "PcbNotePath",
|
|
14441
|
+
zodProps: pcbNotePathProps
|
|
14442
|
+
};
|
|
14443
|
+
}
|
|
14444
|
+
doInitialPcbPrimitiveRender() {
|
|
14445
|
+
if (this.root?.pcbDisabled) return;
|
|
14446
|
+
const { db } = this.root;
|
|
14447
|
+
const { _parsedProps: props } = this;
|
|
14448
|
+
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14449
|
+
const subcircuit = this.getSubcircuit();
|
|
14450
|
+
const group = this.getGroup();
|
|
14451
|
+
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id ?? void 0;
|
|
14452
|
+
const transformedRoute = props.route.map((point) => {
|
|
14453
|
+
const { x, y, ...rest } = point;
|
|
14454
|
+
const numericX = typeof x === "string" ? parseFloat(x) : x;
|
|
14455
|
+
const numericY = typeof y === "string" ? parseFloat(y) : y;
|
|
14456
|
+
const transformed = applyToPoint12(transform, { x: numericX, y: numericY });
|
|
14457
|
+
return { ...rest, x: transformed.x, y: transformed.y };
|
|
14458
|
+
});
|
|
14459
|
+
const pcb_note_path = db.pcb_note_path.insert({
|
|
14460
|
+
pcb_component_id,
|
|
14461
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
14462
|
+
pcb_group_id: group?.pcb_group_id ?? void 0,
|
|
14463
|
+
route: transformedRoute,
|
|
14464
|
+
stroke_width: props.strokeWidth ?? 0.1,
|
|
14465
|
+
color: props.color
|
|
14466
|
+
});
|
|
14467
|
+
this.pcb_note_path_id = pcb_note_path.pcb_note_path_id;
|
|
14468
|
+
}
|
|
14469
|
+
getPcbSize() {
|
|
14470
|
+
const { _parsedProps: props } = this;
|
|
14471
|
+
if (props.route.length === 0) return { width: 0, height: 0 };
|
|
14472
|
+
const xs = props.route.map(
|
|
14473
|
+
(point) => typeof point.x === "string" ? parseFloat(point.x) : point.x
|
|
14474
|
+
);
|
|
14475
|
+
const ys = props.route.map(
|
|
14476
|
+
(point) => typeof point.y === "string" ? parseFloat(point.y) : point.y
|
|
14477
|
+
);
|
|
14478
|
+
const minX = Math.min(...xs);
|
|
14479
|
+
const maxX = Math.max(...xs);
|
|
14480
|
+
const minY = Math.min(...ys);
|
|
14481
|
+
const maxY = Math.max(...ys);
|
|
14482
|
+
return { width: maxX - minX, height: maxY - minY };
|
|
14483
|
+
}
|
|
14484
|
+
};
|
|
14485
|
+
|
|
14486
|
+
// lib/components/primitive-components/PcbNoteDimension.ts
|
|
14487
|
+
import { pcbNoteDimensionProps } from "@tscircuit/props";
|
|
14488
|
+
import { applyToPoint as applyToPoint13 } from "transformation-matrix";
|
|
14489
|
+
var PcbNoteDimension = class extends PrimitiveComponent2 {
|
|
14490
|
+
pcb_note_dimension_id = null;
|
|
14491
|
+
isPcbPrimitive = true;
|
|
14492
|
+
get config() {
|
|
14493
|
+
return {
|
|
14494
|
+
componentName: "PcbNoteDimension",
|
|
14495
|
+
zodProps: pcbNoteDimensionProps
|
|
14496
|
+
};
|
|
14497
|
+
}
|
|
14498
|
+
_resolvePoint(input, transform) {
|
|
14499
|
+
if (typeof input === "string") {
|
|
14500
|
+
const target = this.getSubcircuit().selectOne(
|
|
14501
|
+
input
|
|
14502
|
+
);
|
|
14503
|
+
if (!target) {
|
|
14504
|
+
this.renderError(`PcbNoteDimension could not find selector "${input}"`);
|
|
14505
|
+
return applyToPoint13(transform, { x: 0, y: 0 });
|
|
14506
|
+
}
|
|
14507
|
+
return target._getGlobalPcbPositionBeforeLayout();
|
|
14508
|
+
}
|
|
14509
|
+
const numericX = typeof input.x === "string" ? parseFloat(input.x) : input.x;
|
|
14510
|
+
const numericY = typeof input.y === "string" ? parseFloat(input.y) : input.y;
|
|
14511
|
+
return applyToPoint13(transform, { x: numericX, y: numericY });
|
|
14512
|
+
}
|
|
14513
|
+
doInitialPcbPrimitiveRender() {
|
|
14514
|
+
if (this.root?.pcbDisabled) return;
|
|
14515
|
+
const { db } = this.root;
|
|
14516
|
+
const { _parsedProps: props } = this;
|
|
14517
|
+
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14518
|
+
const from = this._resolvePoint(props.from, transform);
|
|
14519
|
+
const to = this._resolvePoint(props.to, transform);
|
|
14520
|
+
const subcircuit = this.getSubcircuit();
|
|
14521
|
+
const group = this.getGroup();
|
|
14522
|
+
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id ?? void 0;
|
|
14523
|
+
const pcb_note_dimension = db.pcb_note_dimension.insert({
|
|
14524
|
+
pcb_component_id,
|
|
14525
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
14526
|
+
pcb_group_id: group?.pcb_group_id ?? void 0,
|
|
14527
|
+
from,
|
|
14528
|
+
to,
|
|
14529
|
+
text: props.text,
|
|
14530
|
+
font: props.font ?? "tscircuit2024",
|
|
14531
|
+
font_size: props.fontSize ?? 1,
|
|
14532
|
+
color: props.color,
|
|
14533
|
+
arrow_size: props.arrowSize ?? 1
|
|
14534
|
+
});
|
|
14535
|
+
this.pcb_note_dimension_id = pcb_note_dimension.pcb_note_dimension_id;
|
|
14536
|
+
}
|
|
14537
|
+
getPcbSize() {
|
|
14538
|
+
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14539
|
+
const from = this._resolvePoint(this._parsedProps.from, transform);
|
|
14540
|
+
const to = this._resolvePoint(this._parsedProps.to, transform);
|
|
14541
|
+
return {
|
|
14542
|
+
width: Math.abs(to.x - from.x),
|
|
14543
|
+
height: Math.abs(to.y - from.y)
|
|
14544
|
+
};
|
|
14545
|
+
}
|
|
14546
|
+
};
|
|
14547
|
+
|
|
14335
14548
|
// lib/components/primitive-components/Group/Subcircuit.ts
|
|
14336
14549
|
import "@tscircuit/props";
|
|
14337
14550
|
var Subcircuit = class extends Group6 {
|
|
@@ -14456,7 +14669,7 @@ var BreakoutPoint = class extends PrimitiveComponent2 {
|
|
|
14456
14669
|
// lib/components/primitive-components/NetLabel.ts
|
|
14457
14670
|
import { netLabelProps } from "@tscircuit/props";
|
|
14458
14671
|
import {
|
|
14459
|
-
applyToPoint as
|
|
14672
|
+
applyToPoint as applyToPoint14,
|
|
14460
14673
|
identity as identity5,
|
|
14461
14674
|
translate as translate6
|
|
14462
14675
|
} from "transformation-matrix";
|
|
@@ -14507,7 +14720,7 @@ var NetLabel = class extends PrimitiveComponent2 {
|
|
|
14507
14720
|
const connectedPorts = this._getConnectedPorts();
|
|
14508
14721
|
if (connectedPorts.length > 0) {
|
|
14509
14722
|
const portPos = connectedPorts[0]._getGlobalSchematicPositionBeforeLayout();
|
|
14510
|
-
const parentCenter =
|
|
14723
|
+
const parentCenter = applyToPoint14(
|
|
14511
14724
|
this.parent?.computeSchematicGlobalTransform?.() ?? identity5(),
|
|
14512
14725
|
{ x: 0, y: 0 }
|
|
14513
14726
|
);
|
|
@@ -16314,7 +16527,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
16314
16527
|
var package_default = {
|
|
16315
16528
|
name: "@tscircuit/core",
|
|
16316
16529
|
type: "module",
|
|
16317
|
-
version: "0.0.
|
|
16530
|
+
version: "0.0.781",
|
|
16318
16531
|
types: "dist/index.d.ts",
|
|
16319
16532
|
main: "dist/index.js",
|
|
16320
16533
|
module: "dist/index.js",
|
|
@@ -16837,6 +17050,7 @@ export {
|
|
|
16837
17050
|
Cutout,
|
|
16838
17051
|
Diode,
|
|
16839
17052
|
FabricationNotePath,
|
|
17053
|
+
FabricationNoteRect,
|
|
16840
17054
|
FabricationNoteText,
|
|
16841
17055
|
Footprint,
|
|
16842
17056
|
Fuse,
|
|
@@ -16850,7 +17064,10 @@ export {
|
|
|
16850
17064
|
Net,
|
|
16851
17065
|
NetLabel,
|
|
16852
17066
|
NormalComponent3 as NormalComponent,
|
|
17067
|
+
PcbNoteDimension,
|
|
16853
17068
|
PcbNoteLine,
|
|
17069
|
+
PcbNotePath,
|
|
17070
|
+
PcbNoteRect,
|
|
16854
17071
|
PcbTrace,
|
|
16855
17072
|
PinHeader,
|
|
16856
17073
|
Pinout,
|