@tscircuit/core 0.0.785 → 0.0.787
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 +127 -10
- package/dist/index.js +101 -24
- 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, 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, 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, voltageProbeProps, 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, fabricationNoteDimensionProps, 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, voltageProbeProps, 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';
|
|
@@ -17328,6 +17328,122 @@ declare class FabricationNoteText extends PrimitiveComponent<typeof fabricationN
|
|
|
17328
17328
|
doInitialPcbPrimitiveRender(): void;
|
|
17329
17329
|
}
|
|
17330
17330
|
|
|
17331
|
+
declare class FabricationNoteDimension extends PrimitiveComponent<typeof fabricationNoteDimensionProps> {
|
|
17332
|
+
fabrication_note_dimension_id: string | null;
|
|
17333
|
+
isPcbPrimitive: boolean;
|
|
17334
|
+
get config(): {
|
|
17335
|
+
componentName: string;
|
|
17336
|
+
zodProps: zod.ZodObject<Omit<{
|
|
17337
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17338
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17339
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17340
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
17341
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
17342
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
17343
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17344
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17345
|
+
}, {
|
|
17346
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17347
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17348
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17349
|
+
}>>;
|
|
17350
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17351
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17352
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17353
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17354
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17355
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17356
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17357
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17358
|
+
}, "pcbRotation" | "pcbX" | "pcbY"> & {
|
|
17359
|
+
from: zod.ZodUnion<[zod.ZodString, zod.ZodObject<{
|
|
17360
|
+
x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17361
|
+
y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17362
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17363
|
+
x: number;
|
|
17364
|
+
y: number;
|
|
17365
|
+
}, {
|
|
17366
|
+
x: string | number;
|
|
17367
|
+
y: string | number;
|
|
17368
|
+
}>]>;
|
|
17369
|
+
to: zod.ZodUnion<[zod.ZodString, zod.ZodObject<{
|
|
17370
|
+
x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17371
|
+
y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17372
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17373
|
+
x: number;
|
|
17374
|
+
y: number;
|
|
17375
|
+
}, {
|
|
17376
|
+
x: string | number;
|
|
17377
|
+
y: string | number;
|
|
17378
|
+
}>]>;
|
|
17379
|
+
text: zod.ZodOptional<zod.ZodString>;
|
|
17380
|
+
offset: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17381
|
+
font: zod.ZodOptional<zod.ZodEnum<["tscircuit2024"]>>;
|
|
17382
|
+
fontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17383
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
17384
|
+
arrowSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17385
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17386
|
+
from: string | {
|
|
17387
|
+
x: number;
|
|
17388
|
+
y: number;
|
|
17389
|
+
};
|
|
17390
|
+
to: string | {
|
|
17391
|
+
x: number;
|
|
17392
|
+
y: number;
|
|
17393
|
+
};
|
|
17394
|
+
pcbPositionAnchor?: string | undefined;
|
|
17395
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17396
|
+
pcbMarginTop?: number | undefined;
|
|
17397
|
+
pcbMarginRight?: number | undefined;
|
|
17398
|
+
pcbMarginBottom?: number | undefined;
|
|
17399
|
+
pcbMarginLeft?: number | undefined;
|
|
17400
|
+
pcbMarginX?: number | undefined;
|
|
17401
|
+
pcbMarginY?: number | undefined;
|
|
17402
|
+
pcbRelative?: boolean | undefined;
|
|
17403
|
+
relative?: boolean | undefined;
|
|
17404
|
+
color?: string | undefined;
|
|
17405
|
+
text?: string | undefined;
|
|
17406
|
+
font?: "tscircuit2024" | undefined;
|
|
17407
|
+
fontSize?: number | undefined;
|
|
17408
|
+
offset?: number | undefined;
|
|
17409
|
+
arrowSize?: number | undefined;
|
|
17410
|
+
}, {
|
|
17411
|
+
from: string | {
|
|
17412
|
+
x: string | number;
|
|
17413
|
+
y: string | number;
|
|
17414
|
+
};
|
|
17415
|
+
to: string | {
|
|
17416
|
+
x: string | number;
|
|
17417
|
+
y: string | number;
|
|
17418
|
+
};
|
|
17419
|
+
pcbPositionAnchor?: string | undefined;
|
|
17420
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17421
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17422
|
+
} | undefined;
|
|
17423
|
+
pcbMarginTop?: string | number | undefined;
|
|
17424
|
+
pcbMarginRight?: string | number | undefined;
|
|
17425
|
+
pcbMarginBottom?: string | number | undefined;
|
|
17426
|
+
pcbMarginLeft?: string | number | undefined;
|
|
17427
|
+
pcbMarginX?: string | number | undefined;
|
|
17428
|
+
pcbMarginY?: string | number | undefined;
|
|
17429
|
+
pcbRelative?: boolean | undefined;
|
|
17430
|
+
relative?: boolean | undefined;
|
|
17431
|
+
color?: string | undefined;
|
|
17432
|
+
text?: string | undefined;
|
|
17433
|
+
font?: "tscircuit2024" | undefined;
|
|
17434
|
+
fontSize?: string | number | undefined;
|
|
17435
|
+
offset?: string | number | undefined;
|
|
17436
|
+
arrowSize?: string | number | undefined;
|
|
17437
|
+
}>;
|
|
17438
|
+
};
|
|
17439
|
+
private _resolvePoint;
|
|
17440
|
+
doInitialPcbPrimitiveRender(): void;
|
|
17441
|
+
getPcbSize(): {
|
|
17442
|
+
width: number;
|
|
17443
|
+
height: number;
|
|
17444
|
+
};
|
|
17445
|
+
}
|
|
17446
|
+
|
|
17331
17447
|
declare class PcbNoteLine extends PrimitiveComponent<typeof pcbNoteLineProps> {
|
|
17332
17448
|
pcb_note_line_id: string | null;
|
|
17333
17449
|
isPcbPrimitive: boolean;
|
|
@@ -32933,16 +33049,16 @@ declare class SchematicLine extends PrimitiveComponent<typeof schematicLineProps
|
|
|
32933
33049
|
x2: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
32934
33050
|
y2: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
32935
33051
|
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
32936
|
-
color: zod.
|
|
33052
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
32937
33053
|
isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
32938
33054
|
}, "strip", zod.ZodTypeAny, {
|
|
32939
|
-
color: string;
|
|
32940
33055
|
isDashed: boolean;
|
|
32941
33056
|
x1: number;
|
|
32942
33057
|
y1: number;
|
|
32943
33058
|
x2: number;
|
|
32944
33059
|
y2: number;
|
|
32945
33060
|
strokeWidth?: number | undefined;
|
|
33061
|
+
color?: string | undefined;
|
|
32946
33062
|
}, {
|
|
32947
33063
|
x1: string | number;
|
|
32948
33064
|
y1: string | number;
|
|
@@ -32968,20 +33084,20 @@ declare class SchematicRect extends PrimitiveComponent<typeof schematicRectProps
|
|
|
32968
33084
|
height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
32969
33085
|
rotation: zod.ZodDefault<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
32970
33086
|
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
32971
|
-
color: zod.
|
|
33087
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
32972
33088
|
isFilled: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
32973
33089
|
fillColor: zod.ZodOptional<zod.ZodString>;
|
|
32974
33090
|
isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
32975
33091
|
}, "strip", zod.ZodTypeAny, {
|
|
32976
33092
|
width: number;
|
|
32977
33093
|
height: number;
|
|
32978
|
-
color: string;
|
|
32979
33094
|
isFilled: boolean;
|
|
32980
33095
|
isDashed: boolean;
|
|
32981
33096
|
rotation: number;
|
|
32982
33097
|
schX?: number | undefined;
|
|
32983
33098
|
schY?: number | undefined;
|
|
32984
33099
|
strokeWidth?: number | undefined;
|
|
33100
|
+
color?: string | undefined;
|
|
32985
33101
|
fillColor?: string | undefined;
|
|
32986
33102
|
}, {
|
|
32987
33103
|
width: string | number;
|
|
@@ -33020,7 +33136,7 @@ declare class SchematicArc extends PrimitiveComponent<typeof schematicArcProps>
|
|
|
33020
33136
|
endAngleDegrees: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
33021
33137
|
direction: zod.ZodDefault<zod.ZodEnum<["clockwise", "counterclockwise"]>>;
|
|
33022
33138
|
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
33023
|
-
color: zod.
|
|
33139
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
33024
33140
|
isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
33025
33141
|
}, "strip", zod.ZodTypeAny, {
|
|
33026
33142
|
direction: "clockwise" | "counterclockwise";
|
|
@@ -33029,11 +33145,11 @@ declare class SchematicArc extends PrimitiveComponent<typeof schematicArcProps>
|
|
|
33029
33145
|
y: number;
|
|
33030
33146
|
};
|
|
33031
33147
|
radius: number;
|
|
33032
|
-
color: string;
|
|
33033
33148
|
startAngleDegrees: number;
|
|
33034
33149
|
endAngleDegrees: number;
|
|
33035
33150
|
isDashed: boolean;
|
|
33036
33151
|
strokeWidth?: number | undefined;
|
|
33152
|
+
color?: string | undefined;
|
|
33037
33153
|
}, {
|
|
33038
33154
|
center: {
|
|
33039
33155
|
x: string | number;
|
|
@@ -33069,7 +33185,7 @@ declare class SchematicCircle extends PrimitiveComponent<typeof schematicCircleP
|
|
|
33069
33185
|
}>;
|
|
33070
33186
|
radius: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
33071
33187
|
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
33072
|
-
color: zod.
|
|
33188
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
33073
33189
|
isFilled: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
33074
33190
|
fillColor: zod.ZodOptional<zod.ZodString>;
|
|
33075
33191
|
isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
@@ -33079,10 +33195,10 @@ declare class SchematicCircle extends PrimitiveComponent<typeof schematicCircleP
|
|
|
33079
33195
|
y: number;
|
|
33080
33196
|
};
|
|
33081
33197
|
radius: number;
|
|
33082
|
-
color: string;
|
|
33083
33198
|
isFilled: boolean;
|
|
33084
33199
|
isDashed: boolean;
|
|
33085
33200
|
strokeWidth?: number | undefined;
|
|
33201
|
+
color?: string | undefined;
|
|
33086
33202
|
fillColor?: string | undefined;
|
|
33087
33203
|
}, {
|
|
33088
33204
|
center: {
|
|
@@ -34958,6 +35074,7 @@ interface TscircuitElements {
|
|
|
34958
35074
|
pcbnotedimension: _tscircuit_props.PcbNoteDimensionProps;
|
|
34959
35075
|
fabricationnotetext: _tscircuit_props.FabricationNoteTextProps;
|
|
34960
35076
|
fabricationnotepath: _tscircuit_props.FabricationNotePathProps;
|
|
35077
|
+
fabricationnotedimension: _tscircuit_props.FabricationNoteDimensionProps;
|
|
34961
35078
|
constraint: _tscircuit_props.ConstraintProps;
|
|
34962
35079
|
constrainedlayout: _tscircuit_props.ConstrainedLayoutProps;
|
|
34963
35080
|
battery: _tscircuit_props.BatteryProps;
|
|
@@ -34988,4 +35105,4 @@ declare module "react/jsx-runtime" {
|
|
|
34988
35105
|
}
|
|
34989
35106
|
}
|
|
34990
35107
|
|
|
34991
|
-
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, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
|
35108
|
+
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, FabricationNoteDimension, 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, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __export(components_exports, {
|
|
|
21
21
|
Crystal: () => Crystal,
|
|
22
22
|
Cutout: () => Cutout,
|
|
23
23
|
Diode: () => Diode,
|
|
24
|
+
FabricationNoteDimension: () => FabricationNoteDimension,
|
|
24
25
|
FabricationNotePath: () => FabricationNotePath,
|
|
25
26
|
FabricationNoteRect: () => FabricationNoteRect,
|
|
26
27
|
FabricationNoteText: () => FabricationNoteText,
|
|
@@ -14372,9 +14373,84 @@ var FabricationNoteText = class extends PrimitiveComponent2 {
|
|
|
14372
14373
|
}
|
|
14373
14374
|
};
|
|
14374
14375
|
|
|
14376
|
+
// lib/components/primitive-components/FabricationNoteDimension.ts
|
|
14377
|
+
import { fabricationNoteDimensionProps } from "@tscircuit/props";
|
|
14378
|
+
import { applyToPoint as applyToPoint10 } from "transformation-matrix";
|
|
14379
|
+
var FabricationNoteDimension = class extends PrimitiveComponent2 {
|
|
14380
|
+
fabrication_note_dimension_id = null;
|
|
14381
|
+
isPcbPrimitive = true;
|
|
14382
|
+
get config() {
|
|
14383
|
+
return {
|
|
14384
|
+
componentName: "FabricationNoteDimension",
|
|
14385
|
+
zodProps: fabricationNoteDimensionProps
|
|
14386
|
+
};
|
|
14387
|
+
}
|
|
14388
|
+
_resolvePoint(input, transform) {
|
|
14389
|
+
if (typeof input === "string") {
|
|
14390
|
+
const target = this.getSubcircuit().selectOne(
|
|
14391
|
+
input
|
|
14392
|
+
);
|
|
14393
|
+
if (!target) {
|
|
14394
|
+
this.renderError(
|
|
14395
|
+
`FabricationNoteDimension could not find selector "${input}"`
|
|
14396
|
+
);
|
|
14397
|
+
return applyToPoint10(transform, { x: 0, y: 0 });
|
|
14398
|
+
}
|
|
14399
|
+
return target._getGlobalPcbPositionBeforeLayout();
|
|
14400
|
+
}
|
|
14401
|
+
const numericX = typeof input.x === "string" ? parseFloat(input.x) : input.x;
|
|
14402
|
+
const numericY = typeof input.y === "string" ? parseFloat(input.y) : input.y;
|
|
14403
|
+
return applyToPoint10(transform, { x: numericX, y: numericY });
|
|
14404
|
+
}
|
|
14405
|
+
doInitialPcbPrimitiveRender() {
|
|
14406
|
+
if (this.root?.pcbDisabled) return;
|
|
14407
|
+
const { db } = this.root;
|
|
14408
|
+
const { _parsedProps: props } = this;
|
|
14409
|
+
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14410
|
+
const from = this._resolvePoint(props.from, transform);
|
|
14411
|
+
const to = this._resolvePoint(props.to, transform);
|
|
14412
|
+
const subcircuit = this.getSubcircuit();
|
|
14413
|
+
const group = this.getGroup();
|
|
14414
|
+
const { maybeFlipLayer } = this._getPcbPrimitiveFlippedHelpers();
|
|
14415
|
+
const layer = maybeFlipLayer(props.layer ?? "top");
|
|
14416
|
+
if (layer !== "top" && layer !== "bottom") {
|
|
14417
|
+
throw new Error(
|
|
14418
|
+
`Invalid layer "${layer}" for FabricationNoteDimension. Must be "top" or "bottom".`
|
|
14419
|
+
);
|
|
14420
|
+
}
|
|
14421
|
+
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id;
|
|
14422
|
+
const fabrication_note_dimension = db.pcb_fabrication_note_dimension.insert(
|
|
14423
|
+
{
|
|
14424
|
+
pcb_component_id,
|
|
14425
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
14426
|
+
pcb_group_id: group?.pcb_group_id ?? void 0,
|
|
14427
|
+
layer,
|
|
14428
|
+
from,
|
|
14429
|
+
to,
|
|
14430
|
+
text: props.text,
|
|
14431
|
+
offset: props.offset,
|
|
14432
|
+
font: props.font ?? "tscircuit2024",
|
|
14433
|
+
font_size: props.fontSize ?? 1,
|
|
14434
|
+
color: props.color,
|
|
14435
|
+
arrow_size: props.arrowSize ?? 1
|
|
14436
|
+
}
|
|
14437
|
+
);
|
|
14438
|
+
this.fabrication_note_dimension_id = fabrication_note_dimension.pcb_fabrication_note_dimension_id;
|
|
14439
|
+
}
|
|
14440
|
+
getPcbSize() {
|
|
14441
|
+
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14442
|
+
const from = this._resolvePoint(this._parsedProps.from, transform);
|
|
14443
|
+
const to = this._resolvePoint(this._parsedProps.to, transform);
|
|
14444
|
+
return {
|
|
14445
|
+
width: Math.abs(to.x - from.x),
|
|
14446
|
+
height: Math.abs(to.y - from.y)
|
|
14447
|
+
};
|
|
14448
|
+
}
|
|
14449
|
+
};
|
|
14450
|
+
|
|
14375
14451
|
// lib/components/primitive-components/PcbNoteLine.ts
|
|
14376
14452
|
import { pcbNoteLineProps } from "@tscircuit/props";
|
|
14377
|
-
import { applyToPoint as
|
|
14453
|
+
import { applyToPoint as applyToPoint11 } from "transformation-matrix";
|
|
14378
14454
|
var PcbNoteLine = class extends PrimitiveComponent2 {
|
|
14379
14455
|
pcb_note_line_id = null;
|
|
14380
14456
|
isPcbPrimitive = true;
|
|
@@ -14391,8 +14467,8 @@ var PcbNoteLine = class extends PrimitiveComponent2 {
|
|
|
14391
14467
|
const subcircuit = this.getSubcircuit();
|
|
14392
14468
|
const group = this.getGroup();
|
|
14393
14469
|
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14394
|
-
const start =
|
|
14395
|
-
const end =
|
|
14470
|
+
const start = applyToPoint11(transform, { x: props.x1, y: props.y1 });
|
|
14471
|
+
const end = applyToPoint11(transform, { x: props.x2, y: props.y2 });
|
|
14396
14472
|
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id ?? void 0;
|
|
14397
14473
|
const pcb_note_line = db.pcb_note_line.insert({
|
|
14398
14474
|
pcb_component_id,
|
|
@@ -14419,7 +14495,7 @@ var PcbNoteLine = class extends PrimitiveComponent2 {
|
|
|
14419
14495
|
|
|
14420
14496
|
// lib/components/primitive-components/PcbNoteRect.ts
|
|
14421
14497
|
import { pcbNoteRectProps } from "@tscircuit/props";
|
|
14422
|
-
import { applyToPoint as
|
|
14498
|
+
import { applyToPoint as applyToPoint12 } from "transformation-matrix";
|
|
14423
14499
|
var PcbNoteRect = class extends PrimitiveComponent2 {
|
|
14424
14500
|
pcb_note_rect_id = null;
|
|
14425
14501
|
isPcbPrimitive = true;
|
|
@@ -14434,7 +14510,7 @@ var PcbNoteRect = class extends PrimitiveComponent2 {
|
|
|
14434
14510
|
const { db } = this.root;
|
|
14435
14511
|
const { _parsedProps: props } = this;
|
|
14436
14512
|
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
14437
|
-
const center =
|
|
14513
|
+
const center = applyToPoint12(transform, { x: 0, y: 0 });
|
|
14438
14514
|
const subcircuit = this.getSubcircuit();
|
|
14439
14515
|
const group = this.getGroup();
|
|
14440
14516
|
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id ?? void 0;
|
|
@@ -14463,7 +14539,7 @@ var PcbNoteRect = class extends PrimitiveComponent2 {
|
|
|
14463
14539
|
|
|
14464
14540
|
// lib/components/primitive-components/PcbNotePath.ts
|
|
14465
14541
|
import { pcbNotePathProps } from "@tscircuit/props";
|
|
14466
|
-
import { applyToPoint as
|
|
14542
|
+
import { applyToPoint as applyToPoint13 } from "transformation-matrix";
|
|
14467
14543
|
var PcbNotePath = class extends PrimitiveComponent2 {
|
|
14468
14544
|
pcb_note_path_id = null;
|
|
14469
14545
|
isPcbPrimitive = true;
|
|
@@ -14485,7 +14561,7 @@ var PcbNotePath = class extends PrimitiveComponent2 {
|
|
|
14485
14561
|
const { x, y, ...rest } = point;
|
|
14486
14562
|
const numericX = typeof x === "string" ? parseFloat(x) : x;
|
|
14487
14563
|
const numericY = typeof y === "string" ? parseFloat(y) : y;
|
|
14488
|
-
const transformed =
|
|
14564
|
+
const transformed = applyToPoint13(transform, { x: numericX, y: numericY });
|
|
14489
14565
|
return { ...rest, x: transformed.x, y: transformed.y };
|
|
14490
14566
|
});
|
|
14491
14567
|
const pcb_note_path = db.pcb_note_path.insert({
|
|
@@ -14517,7 +14593,7 @@ var PcbNotePath = class extends PrimitiveComponent2 {
|
|
|
14517
14593
|
|
|
14518
14594
|
// lib/components/primitive-components/PcbNoteDimension.ts
|
|
14519
14595
|
import { pcbNoteDimensionProps } from "@tscircuit/props";
|
|
14520
|
-
import { applyToPoint as
|
|
14596
|
+
import { applyToPoint as applyToPoint14 } from "transformation-matrix";
|
|
14521
14597
|
var PcbNoteDimension = class extends PrimitiveComponent2 {
|
|
14522
14598
|
pcb_note_dimension_id = null;
|
|
14523
14599
|
isPcbPrimitive = true;
|
|
@@ -14534,13 +14610,13 @@ var PcbNoteDimension = class extends PrimitiveComponent2 {
|
|
|
14534
14610
|
);
|
|
14535
14611
|
if (!target) {
|
|
14536
14612
|
this.renderError(`PcbNoteDimension could not find selector "${input}"`);
|
|
14537
|
-
return
|
|
14613
|
+
return applyToPoint14(transform, { x: 0, y: 0 });
|
|
14538
14614
|
}
|
|
14539
14615
|
return target._getGlobalPcbPositionBeforeLayout();
|
|
14540
14616
|
}
|
|
14541
14617
|
const numericX = typeof input.x === "string" ? parseFloat(input.x) : input.x;
|
|
14542
14618
|
const numericY = typeof input.y === "string" ? parseFloat(input.y) : input.y;
|
|
14543
|
-
return
|
|
14619
|
+
return applyToPoint14(transform, { x: numericX, y: numericY });
|
|
14544
14620
|
}
|
|
14545
14621
|
doInitialPcbPrimitiveRender() {
|
|
14546
14622
|
if (this.root?.pcbDisabled) return;
|
|
@@ -14701,7 +14777,7 @@ var BreakoutPoint = class extends PrimitiveComponent2 {
|
|
|
14701
14777
|
// lib/components/primitive-components/NetLabel.ts
|
|
14702
14778
|
import { netLabelProps } from "@tscircuit/props";
|
|
14703
14779
|
import {
|
|
14704
|
-
applyToPoint as
|
|
14780
|
+
applyToPoint as applyToPoint15,
|
|
14705
14781
|
identity as identity5,
|
|
14706
14782
|
translate as translate6
|
|
14707
14783
|
} from "transformation-matrix";
|
|
@@ -14752,7 +14828,7 @@ var NetLabel = class extends PrimitiveComponent2 {
|
|
|
14752
14828
|
const connectedPorts = this._getConnectedPorts();
|
|
14753
14829
|
if (connectedPorts.length > 0) {
|
|
14754
14830
|
const portPos = connectedPorts[0]._getGlobalSchematicPositionBeforeLayout();
|
|
14755
|
-
const parentCenter =
|
|
14831
|
+
const parentCenter = applyToPoint15(
|
|
14756
14832
|
this.parent?.computeSchematicGlobalTransform?.() ?? identity5(),
|
|
14757
14833
|
{ x: 0, y: 0 }
|
|
14758
14834
|
);
|
|
@@ -16046,8 +16122,8 @@ var SchematicLine = class extends PrimitiveComponent2 {
|
|
|
16046
16122
|
y1: props.y1 + globalPos.y,
|
|
16047
16123
|
x2: props.x2 + globalPos.x,
|
|
16048
16124
|
y2: props.y2 + globalPos.y,
|
|
16049
|
-
stroke_width: SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
16050
|
-
color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
16125
|
+
stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
16126
|
+
color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
16051
16127
|
is_dashed: false,
|
|
16052
16128
|
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
|
|
16053
16129
|
});
|
|
@@ -16079,8 +16155,8 @@ var SchematicRect = class extends PrimitiveComponent2 {
|
|
|
16079
16155
|
},
|
|
16080
16156
|
width: props.width,
|
|
16081
16157
|
height: props.height,
|
|
16082
|
-
stroke_width: SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
16083
|
-
color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
16158
|
+
stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
16159
|
+
color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
16084
16160
|
is_filled: props.isFilled,
|
|
16085
16161
|
schematic_component_id,
|
|
16086
16162
|
is_dashed: props.isDashed,
|
|
@@ -16118,8 +16194,8 @@ var SchematicArc = class extends PrimitiveComponent2 {
|
|
|
16118
16194
|
start_angle_degrees: props.startAngleDegrees,
|
|
16119
16195
|
end_angle_degrees: props.endAngleDegrees,
|
|
16120
16196
|
direction: props.direction,
|
|
16121
|
-
stroke_width: SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
16122
|
-
color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
16197
|
+
stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
16198
|
+
color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
16123
16199
|
is_dashed: props.isDashed,
|
|
16124
16200
|
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
|
|
16125
16201
|
});
|
|
@@ -16151,8 +16227,8 @@ var SchematicCircle = class extends PrimitiveComponent2 {
|
|
|
16151
16227
|
y: props.center.y + globalPos.y
|
|
16152
16228
|
},
|
|
16153
16229
|
radius: props.radius,
|
|
16154
|
-
stroke_width: SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
16155
|
-
color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
16230
|
+
stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
|
|
16231
|
+
color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
|
|
16156
16232
|
is_filled: props.isFilled,
|
|
16157
16233
|
fill_color: props.fillColor,
|
|
16158
16234
|
is_dashed: props.isDashed,
|
|
@@ -16610,7 +16686,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
16610
16686
|
var package_default = {
|
|
16611
16687
|
name: "@tscircuit/core",
|
|
16612
16688
|
type: "module",
|
|
16613
|
-
version: "0.0.
|
|
16689
|
+
version: "0.0.786",
|
|
16614
16690
|
types: "dist/index.d.ts",
|
|
16615
16691
|
main: "dist/index.js",
|
|
16616
16692
|
module: "dist/index.js",
|
|
@@ -16650,7 +16726,7 @@ var package_default = {
|
|
|
16650
16726
|
"@tscircuit/matchpack": "^0.0.16",
|
|
16651
16727
|
"@tscircuit/math-utils": "^0.0.21",
|
|
16652
16728
|
"@tscircuit/miniflex": "^0.0.4",
|
|
16653
|
-
"@tscircuit/props": "0.0.
|
|
16729
|
+
"@tscircuit/props": "0.0.361",
|
|
16654
16730
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
16655
16731
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
16656
16732
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -16663,12 +16739,12 @@ var package_default = {
|
|
|
16663
16739
|
"bun-match-svg": "0.0.12",
|
|
16664
16740
|
"calculate-elbow": "^0.0.12",
|
|
16665
16741
|
"chokidar-cli": "^3.0.0",
|
|
16666
|
-
"circuit-json": "^0.0.
|
|
16742
|
+
"circuit-json": "^0.0.278",
|
|
16667
16743
|
"circuit-json-to-bpc": "^0.0.13",
|
|
16668
16744
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
16669
16745
|
"circuit-json-to-gltf": "^0.0.7",
|
|
16670
16746
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
16671
|
-
"circuit-to-svg": "^0.0.
|
|
16747
|
+
"circuit-to-svg": "^0.0.238",
|
|
16672
16748
|
"circuit-json-to-spice": "^0.0.14",
|
|
16673
16749
|
concurrently: "^9.1.2",
|
|
16674
16750
|
"connectivity-map": "^1.0.0",
|
|
@@ -17132,6 +17208,7 @@ export {
|
|
|
17132
17208
|
Crystal,
|
|
17133
17209
|
Cutout,
|
|
17134
17210
|
Diode,
|
|
17211
|
+
FabricationNoteDimension,
|
|
17135
17212
|
FabricationNotePath,
|
|
17136
17213
|
FabricationNoteRect,
|
|
17137
17214
|
FabricationNoteText,
|
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.787",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@tscircuit/matchpack": "^0.0.16",
|
|
42
42
|
"@tscircuit/math-utils": "^0.0.21",
|
|
43
43
|
"@tscircuit/miniflex": "^0.0.4",
|
|
44
|
-
"@tscircuit/props": "0.0.
|
|
44
|
+
"@tscircuit/props": "0.0.361",
|
|
45
45
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
46
46
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
47
47
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"bun-match-svg": "0.0.12",
|
|
55
55
|
"calculate-elbow": "^0.0.12",
|
|
56
56
|
"chokidar-cli": "^3.0.0",
|
|
57
|
-
"circuit-json": "^0.0.
|
|
57
|
+
"circuit-json": "^0.0.278",
|
|
58
58
|
"circuit-json-to-bpc": "^0.0.13",
|
|
59
59
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
60
60
|
"circuit-json-to-gltf": "^0.0.7",
|
|
61
61
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
62
|
-
"circuit-to-svg": "^0.0.
|
|
62
|
+
"circuit-to-svg": "^0.0.238",
|
|
63
63
|
"circuit-json-to-spice": "^0.0.14",
|
|
64
64
|
"concurrently": "^9.1.2",
|
|
65
65
|
"connectivity-map": "^1.0.0",
|