@tscircuit/core 0.0.778 → 0.0.780

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +170 -87
  2. package/dist/index.js +114 -17
  3. package/package.json +5 -5
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, 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, 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';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactElement, DetailedHTMLProps, SVGProps } from 'react';
7
7
  export { createElement } from 'react';
@@ -1306,7 +1306,6 @@ declare class Board extends Group<typeof boardProps> {
1306
1306
  pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1307
1307
  pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1308
1308
  pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1309
- pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
1310
1309
  pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1311
1310
  pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1312
1311
  pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
@@ -1616,6 +1615,7 @@ declare class Board extends Group<typeof boardProps> {
1616
1615
  pcbPaddingRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1617
1616
  pcbPaddingTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1618
1617
  pcbPaddingBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1618
+ pcbPositionAnchor: zod.ZodOptional<zod.ZodType<_tscircuit_props.AutocompleteString<"top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right">, zod.ZodTypeDef, _tscircuit_props.AutocompleteString<"top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right">>>;
1619
1619
  layoutMode: zod.ZodOptional<zod.ZodEnum<["grid", "flex", "match-adapt", "relative", "none"]>>;
1620
1620
  position: zod.ZodOptional<zod.ZodEnum<["absolute", "relative"]>>;
1621
1621
  gridCols: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
@@ -2003,7 +2003,7 @@ declare class Board extends Group<typeof boardProps> {
2003
2003
  pcbX?: number | undefined;
2004
2004
  pcbY?: number | undefined;
2005
2005
  pcbRotation?: number | undefined;
2006
- pcbPositionAnchor?: string | undefined;
2006
+ pcbPositionAnchor?: _tscircuit_props.AutocompleteString<"top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right"> | undefined;
2007
2007
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
2008
2008
  pcbMarginTop?: number | undefined;
2009
2009
  pcbMarginRight?: number | undefined;
@@ -2189,44 +2189,6 @@ declare class Board extends Group<typeof boardProps> {
2189
2189
  pcbPaddingRight?: number | undefined;
2190
2190
  pcbPaddingTop?: number | undefined;
2191
2191
  pcbPaddingBottom?: number | undefined;
2192
- pcbGrid?: boolean | undefined;
2193
- pcbGridCols?: string | number | undefined;
2194
- pcbGridRows?: string | number | undefined;
2195
- pcbGridTemplateRows?: string | undefined;
2196
- pcbGridTemplateColumns?: string | undefined;
2197
- pcbGridTemplate?: string | undefined;
2198
- pcbGridGap?: string | number | undefined;
2199
- pcbGridRowGap?: string | number | undefined;
2200
- pcbGridColumnGap?: string | number | undefined;
2201
- pcbFlex?: string | boolean | undefined;
2202
- pcbFlexGap?: string | number | undefined;
2203
- pcbFlexDirection?: "row" | "column" | undefined;
2204
- pcbAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
2205
- pcbJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
2206
- pcbFlexRow?: boolean | undefined;
2207
- pcbFlexColumn?: boolean | undefined;
2208
- pcbGap?: string | number | undefined;
2209
- pcbPack?: boolean | undefined;
2210
- pcbPackGap?: string | number | undefined;
2211
- schGrid?: boolean | undefined;
2212
- schGridCols?: string | number | undefined;
2213
- schGridRows?: string | number | undefined;
2214
- schGridTemplateRows?: string | undefined;
2215
- schGridTemplateColumns?: string | undefined;
2216
- schGridTemplate?: string | undefined;
2217
- schGridGap?: string | number | undefined;
2218
- schGridRowGap?: string | number | undefined;
2219
- schGridColumnGap?: string | number | undefined;
2220
- schFlex?: string | boolean | undefined;
2221
- schFlexGap?: string | number | undefined;
2222
- schFlexDirection?: "row" | "column" | undefined;
2223
- schAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
2224
- schJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
2225
- schFlexRow?: boolean | undefined;
2226
- schFlexColumn?: boolean | undefined;
2227
- schGap?: string | number | undefined;
2228
- schPack?: boolean | undefined;
2229
- schMatchAdapt?: boolean | undefined;
2230
2192
  manualEdits?: {
2231
2193
  pcb_placements?: {
2232
2194
  center: {
@@ -2267,6 +2229,44 @@ declare class Board extends Group<typeof boardProps> {
2267
2229
  square?: boolean | undefined;
2268
2230
  emptyArea?: string | undefined;
2269
2231
  filledArea?: string | undefined;
2232
+ pcbGrid?: boolean | undefined;
2233
+ pcbGridCols?: string | number | undefined;
2234
+ pcbGridRows?: string | number | undefined;
2235
+ pcbGridTemplateRows?: string | undefined;
2236
+ pcbGridTemplateColumns?: string | undefined;
2237
+ pcbGridTemplate?: string | undefined;
2238
+ pcbGridGap?: string | number | undefined;
2239
+ pcbGridRowGap?: string | number | undefined;
2240
+ pcbGridColumnGap?: string | number | undefined;
2241
+ pcbFlex?: string | boolean | undefined;
2242
+ pcbFlexGap?: string | number | undefined;
2243
+ pcbFlexDirection?: "row" | "column" | undefined;
2244
+ pcbAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
2245
+ pcbJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
2246
+ pcbFlexRow?: boolean | undefined;
2247
+ pcbFlexColumn?: boolean | undefined;
2248
+ pcbGap?: string | number | undefined;
2249
+ pcbPack?: boolean | undefined;
2250
+ pcbPackGap?: string | number | undefined;
2251
+ schGrid?: boolean | undefined;
2252
+ schGridCols?: string | number | undefined;
2253
+ schGridRows?: string | number | undefined;
2254
+ schGridTemplateRows?: string | undefined;
2255
+ schGridTemplateColumns?: string | undefined;
2256
+ schGridTemplate?: string | undefined;
2257
+ schGridGap?: string | number | undefined;
2258
+ schGridRowGap?: string | number | undefined;
2259
+ schGridColumnGap?: string | number | undefined;
2260
+ schFlex?: string | boolean | undefined;
2261
+ schFlexGap?: string | number | undefined;
2262
+ schFlexDirection?: "row" | "column" | undefined;
2263
+ schAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
2264
+ schJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
2265
+ schFlexRow?: boolean | undefined;
2266
+ schFlexColumn?: boolean | undefined;
2267
+ schGap?: string | number | undefined;
2268
+ schPack?: boolean | undefined;
2269
+ schMatchAdapt?: boolean | undefined;
2270
2270
  outline?: {
2271
2271
  x: number;
2272
2272
  y: number;
@@ -2293,7 +2293,7 @@ declare class Board extends Group<typeof boardProps> {
2293
2293
  pcbX?: string | number | undefined;
2294
2294
  pcbY?: string | number | undefined;
2295
2295
  pcbRotation?: string | number | undefined;
2296
- pcbPositionAnchor?: string | undefined;
2296
+ pcbPositionAnchor?: _tscircuit_props.AutocompleteString<"top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right"> | undefined;
2297
2297
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
2298
2298
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
2299
2299
  } | undefined;
@@ -2481,44 +2481,6 @@ declare class Board extends Group<typeof boardProps> {
2481
2481
  pcbPaddingRight?: string | number | undefined;
2482
2482
  pcbPaddingTop?: string | number | undefined;
2483
2483
  pcbPaddingBottom?: string | number | undefined;
2484
- pcbGrid?: boolean | undefined;
2485
- pcbGridCols?: string | number | undefined;
2486
- pcbGridRows?: string | number | undefined;
2487
- pcbGridTemplateRows?: string | undefined;
2488
- pcbGridTemplateColumns?: string | undefined;
2489
- pcbGridTemplate?: string | undefined;
2490
- pcbGridGap?: string | number | undefined;
2491
- pcbGridRowGap?: string | number | undefined;
2492
- pcbGridColumnGap?: string | number | undefined;
2493
- pcbFlex?: string | boolean | undefined;
2494
- pcbFlexGap?: string | number | undefined;
2495
- pcbFlexDirection?: "row" | "column" | undefined;
2496
- pcbAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
2497
- pcbJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
2498
- pcbFlexRow?: boolean | undefined;
2499
- pcbFlexColumn?: boolean | undefined;
2500
- pcbGap?: string | number | undefined;
2501
- pcbPack?: boolean | undefined;
2502
- pcbPackGap?: string | number | undefined;
2503
- schGrid?: boolean | undefined;
2504
- schGridCols?: string | number | undefined;
2505
- schGridRows?: string | number | undefined;
2506
- schGridTemplateRows?: string | undefined;
2507
- schGridTemplateColumns?: string | undefined;
2508
- schGridTemplate?: string | undefined;
2509
- schGridGap?: string | number | undefined;
2510
- schGridRowGap?: string | number | undefined;
2511
- schGridColumnGap?: string | number | undefined;
2512
- schFlex?: string | boolean | undefined;
2513
- schFlexGap?: string | number | undefined;
2514
- schFlexDirection?: "row" | "column" | undefined;
2515
- schAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
2516
- schJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
2517
- schFlexRow?: boolean | undefined;
2518
- schFlexColumn?: boolean | undefined;
2519
- schGap?: string | number | undefined;
2520
- schPack?: boolean | undefined;
2521
- schMatchAdapt?: boolean | undefined;
2522
2484
  manualEdits?: {
2523
2485
  pcb_placements?: {
2524
2486
  center: {
@@ -2561,6 +2523,44 @@ declare class Board extends Group<typeof boardProps> {
2561
2523
  square?: boolean | undefined;
2562
2524
  emptyArea?: string | undefined;
2563
2525
  filledArea?: string | undefined;
2526
+ pcbGrid?: boolean | undefined;
2527
+ pcbGridCols?: string | number | undefined;
2528
+ pcbGridRows?: string | number | undefined;
2529
+ pcbGridTemplateRows?: string | undefined;
2530
+ pcbGridTemplateColumns?: string | undefined;
2531
+ pcbGridTemplate?: string | undefined;
2532
+ pcbGridGap?: string | number | undefined;
2533
+ pcbGridRowGap?: string | number | undefined;
2534
+ pcbGridColumnGap?: string | number | undefined;
2535
+ pcbFlex?: string | boolean | undefined;
2536
+ pcbFlexGap?: string | number | undefined;
2537
+ pcbFlexDirection?: "row" | "column" | undefined;
2538
+ pcbAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
2539
+ pcbJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
2540
+ pcbFlexRow?: boolean | undefined;
2541
+ pcbFlexColumn?: boolean | undefined;
2542
+ pcbGap?: string | number | undefined;
2543
+ pcbPack?: boolean | undefined;
2544
+ pcbPackGap?: string | number | undefined;
2545
+ schGrid?: boolean | undefined;
2546
+ schGridCols?: string | number | undefined;
2547
+ schGridRows?: string | number | undefined;
2548
+ schGridTemplateRows?: string | undefined;
2549
+ schGridTemplateColumns?: string | undefined;
2550
+ schGridTemplate?: string | undefined;
2551
+ schGridGap?: string | number | undefined;
2552
+ schGridRowGap?: string | number | undefined;
2553
+ schGridColumnGap?: string | number | undefined;
2554
+ schFlex?: string | boolean | undefined;
2555
+ schFlexGap?: string | number | undefined;
2556
+ schFlexDirection?: "row" | "column" | undefined;
2557
+ schAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
2558
+ schJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
2559
+ schFlexRow?: boolean | undefined;
2560
+ schFlexColumn?: boolean | undefined;
2561
+ schGap?: string | number | undefined;
2562
+ schPack?: boolean | undefined;
2563
+ schMatchAdapt?: boolean | undefined;
2564
2564
  outline?: {
2565
2565
  x: string | number;
2566
2566
  y: string | number;
@@ -14601,8 +14601,8 @@ declare const voltageSourceProps: z.ZodObject<{
14601
14601
  pcbX?: number | undefined;
14602
14602
  voltage?: number | undefined;
14603
14603
  frequency?: number | undefined;
14604
- pcbY?: number | undefined;
14605
14604
  pcbPositionAnchor?: string | undefined;
14605
+ pcbY?: number | undefined;
14606
14606
  pcbMarginTop?: number | undefined;
14607
14607
  pcbMarginRight?: number | undefined;
14608
14608
  pcbMarginBottom?: number | undefined;
@@ -14781,8 +14781,8 @@ declare const voltageSourceProps: z.ZodObject<{
14781
14781
  pcbX?: string | number | undefined;
14782
14782
  voltage?: string | number | undefined;
14783
14783
  frequency?: string | number | undefined;
14784
- pcbY?: string | number | undefined;
14785
14784
  pcbPositionAnchor?: string | undefined;
14785
+ pcbY?: string | number | undefined;
14786
14786
  pcbMarginTop?: string | number | undefined;
14787
14787
  pcbMarginRight?: string | number | undefined;
14788
14788
  pcbMarginBottom?: string | number | undefined;
@@ -15602,8 +15602,8 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
15602
15602
  pcbX?: number | undefined;
15603
15603
  voltage?: number | undefined;
15604
15604
  frequency?: number | undefined;
15605
- pcbY?: number | undefined;
15606
15605
  pcbPositionAnchor?: string | undefined;
15606
+ pcbY?: number | undefined;
15607
15607
  pcbMarginTop?: number | undefined;
15608
15608
  pcbMarginRight?: number | undefined;
15609
15609
  pcbMarginBottom?: number | undefined;
@@ -15782,8 +15782,8 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
15782
15782
  pcbX?: string | number | undefined;
15783
15783
  voltage?: string | number | undefined;
15784
15784
  frequency?: string | number | undefined;
15785
- pcbY?: string | number | undefined;
15786
15785
  pcbPositionAnchor?: string | undefined;
15786
+ pcbY?: string | number | undefined;
15787
15787
  pcbMarginTop?: string | number | undefined;
15788
15788
  pcbMarginRight?: string | number | undefined;
15789
15789
  pcbMarginBottom?: string | number | undefined;
@@ -17238,6 +17238,88 @@ declare class FabricationNoteText extends PrimitiveComponent<typeof fabricationN
17238
17238
  doInitialPcbPrimitiveRender(): void;
17239
17239
  }
17240
17240
 
17241
+ declare class PcbNoteLine extends PrimitiveComponent<typeof pcbNoteLineProps> {
17242
+ pcb_note_line_id: string | null;
17243
+ isPcbPrimitive: boolean;
17244
+ get config(): {
17245
+ componentName: string;
17246
+ zodProps: zod.ZodObject<Omit<{
17247
+ pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17248
+ pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17249
+ pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17250
+ pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
17251
+ layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
17252
+ name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
17253
+ }, "strip", zod.ZodTypeAny, {
17254
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
17255
+ }, {
17256
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
17257
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
17258
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
17259
+ }>>;
17260
+ pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17261
+ pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17262
+ pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17263
+ pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17264
+ pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17265
+ pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17266
+ pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
17267
+ relative: zod.ZodOptional<zod.ZodBoolean>;
17268
+ }, "pcbRotation" | "pcbX" | "pcbY"> & {
17269
+ x1: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
17270
+ y1: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
17271
+ x2: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
17272
+ y2: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
17273
+ strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
17274
+ color: zod.ZodOptional<zod.ZodString>;
17275
+ isDashed: zod.ZodOptional<zod.ZodBoolean>;
17276
+ }, "strip", zod.ZodTypeAny, {
17277
+ x1: number;
17278
+ y1: number;
17279
+ x2: number;
17280
+ y2: number;
17281
+ pcbPositionAnchor?: string | undefined;
17282
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
17283
+ pcbMarginTop?: number | undefined;
17284
+ pcbMarginRight?: number | undefined;
17285
+ pcbMarginBottom?: number | undefined;
17286
+ pcbMarginLeft?: number | undefined;
17287
+ pcbMarginX?: number | undefined;
17288
+ pcbMarginY?: number | undefined;
17289
+ pcbRelative?: boolean | undefined;
17290
+ relative?: boolean | undefined;
17291
+ strokeWidth?: number | undefined;
17292
+ color?: string | undefined;
17293
+ isDashed?: boolean | undefined;
17294
+ }, {
17295
+ x1: string | number;
17296
+ y1: string | number;
17297
+ x2: string | number;
17298
+ y2: string | number;
17299
+ pcbPositionAnchor?: string | undefined;
17300
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
17301
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
17302
+ } | undefined;
17303
+ pcbMarginTop?: string | number | undefined;
17304
+ pcbMarginRight?: string | number | undefined;
17305
+ pcbMarginBottom?: string | number | undefined;
17306
+ pcbMarginLeft?: string | number | undefined;
17307
+ pcbMarginX?: string | number | undefined;
17308
+ pcbMarginY?: string | number | undefined;
17309
+ pcbRelative?: boolean | undefined;
17310
+ relative?: boolean | undefined;
17311
+ strokeWidth?: string | number | undefined;
17312
+ color?: string | undefined;
17313
+ isDashed?: boolean | undefined;
17314
+ }>;
17315
+ };
17316
+ doInitialPcbPrimitiveRender(): void;
17317
+ getPcbSize(): {
17318
+ width: number;
17319
+ height: number;
17320
+ };
17321
+ }
17322
+
17241
17323
  declare class Footprint extends PrimitiveComponent<typeof footprintProps> {
17242
17324
  get config(): {
17243
17325
  componentName: string;
@@ -19725,7 +19807,6 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
19725
19807
  toLayer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
19726
19808
  }[] | undefined;
19727
19809
  for?: string | undefined;
19728
- order?: number | undefined;
19729
19810
  offset?: {
19730
19811
  x: number;
19731
19812
  y: number;
@@ -19738,6 +19819,7 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
19738
19819
  via?: boolean | undefined;
19739
19820
  toLayer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
19740
19821
  } | undefined;
19822
+ order?: number | undefined;
19741
19823
  traceWidth?: number | undefined;
19742
19824
  }, {
19743
19825
  offsets?: {
@@ -19757,7 +19839,6 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
19757
19839
  } | undefined;
19758
19840
  }[] | undefined;
19759
19841
  for?: string | undefined;
19760
- order?: number | undefined;
19761
19842
  offset?: {
19762
19843
  x: string | number;
19763
19844
  y: string | number;
@@ -19774,6 +19855,7 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
19774
19855
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
19775
19856
  } | undefined;
19776
19857
  } | undefined;
19858
+ order?: number | undefined;
19777
19859
  traceWidth?: number | undefined;
19778
19860
  }>;
19779
19861
  };
@@ -33474,6 +33556,7 @@ interface TscircuitElements {
33474
33556
  silkscreencircle: _tscircuit_props.SilkscreenCircleProps;
33475
33557
  tracehint: _tscircuit_props.TraceHintProps;
33476
33558
  pcbtrace: _tscircuit_props.PcbTraceProps;
33559
+ pcbnoteline: _tscircuit_props.PcbNoteLineProps;
33477
33560
  fabricationnotetext: _tscircuit_props.FabricationNoteTextProps;
33478
33561
  fabricationnotepath: _tscircuit_props.FabricationNotePathProps;
33479
33562
  constraint: _tscircuit_props.ConstraintProps;
@@ -33505,4 +33588,4 @@ declare module "react/jsx-runtime" {
33505
33588
  }
33506
33589
  }
33507
33590
 
33508
- 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, 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 };
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 };
package/dist/index.js CHANGED
@@ -35,6 +35,7 @@ __export(components_exports, {
35
35
  Net: () => Net,
36
36
  NetLabel: () => NetLabel,
37
37
  NormalComponent: () => NormalComponent3,
38
+ PcbNoteLine: () => PcbNoteLine,
38
39
  PcbTrace: () => PcbTrace,
39
40
  PinHeader: () => PinHeader,
40
41
  Pinout: () => Pinout,
@@ -2611,16 +2612,45 @@ var Hole = class extends PrimitiveComponent2 {
2611
2612
  const { _parsedProps: props } = this;
2612
2613
  const subcircuit = this.getSubcircuit();
2613
2614
  const position = this._getGlobalPcbPositionBeforeLayout();
2614
- const inserted_hole = db.pcb_hole.insert({
2615
- hole_shape: "circle",
2616
- // @ts-ignore
2617
- hole_diameter: props.diameter,
2618
- x: position.x,
2619
- y: position.y,
2620
- subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
2621
- pcb_group_id: subcircuit?.getGroup()?.pcb_group_id ?? void 0
2622
- });
2623
- this.pcb_hole_id = inserted_hole.pcb_hole_id;
2615
+ if (props.shape === "pill") {
2616
+ if (props.pcbRotation && props.pcbRotation !== 0) {
2617
+ const inserted_hole = db.pcb_hole.insert({
2618
+ type: "pcb_hole",
2619
+ hole_shape: "rotated_pill",
2620
+ hole_width: props.width,
2621
+ hole_height: props.height,
2622
+ x: position.x,
2623
+ y: position.y,
2624
+ ccw_rotation: props.pcbRotation,
2625
+ subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
2626
+ pcb_group_id: subcircuit?.getGroup()?.pcb_group_id ?? void 0
2627
+ });
2628
+ this.pcb_hole_id = inserted_hole.pcb_hole_id;
2629
+ } else {
2630
+ const inserted_hole = db.pcb_hole.insert({
2631
+ type: "pcb_hole",
2632
+ hole_shape: "pill",
2633
+ hole_width: props.width,
2634
+ hole_height: props.height,
2635
+ x: position.x,
2636
+ y: position.y,
2637
+ subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
2638
+ pcb_group_id: subcircuit?.getGroup()?.pcb_group_id ?? void 0
2639
+ });
2640
+ this.pcb_hole_id = inserted_hole.pcb_hole_id;
2641
+ }
2642
+ } else {
2643
+ const inserted_hole = db.pcb_hole.insert({
2644
+ hole_shape: "circle",
2645
+ // @ts-ignore
2646
+ hole_diameter: props.diameter,
2647
+ x: position.x,
2648
+ y: position.y,
2649
+ subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
2650
+ pcb_group_id: subcircuit?.getGroup()?.pcb_group_id ?? void 0
2651
+ });
2652
+ this.pcb_hole_id = inserted_hole.pcb_hole_id;
2653
+ }
2624
2654
  }
2625
2655
  _getPcbCircuitJsonBounds() {
2626
2656
  const { db } = this.root;
@@ -3028,6 +3058,27 @@ var createComponentsFromCircuitJson = ({
3028
3058
  diameter: elm.hole_diameter
3029
3059
  })
3030
3060
  );
3061
+ } else if (elm.type === "pcb_hole" && elm.hole_shape === "pill") {
3062
+ components.push(
3063
+ new Hole({
3064
+ pcbX: elm.x,
3065
+ pcbY: elm.y,
3066
+ shape: "pill",
3067
+ width: elm.hole_width,
3068
+ height: elm.hole_height
3069
+ })
3070
+ );
3071
+ } else if (elm.type === "pcb_hole" && elm.hole_shape === "rotated_pill") {
3072
+ components.push(
3073
+ new Hole({
3074
+ pcbX: elm.x,
3075
+ pcbY: elm.y,
3076
+ shape: "pill",
3077
+ width: elm.hole_width,
3078
+ height: elm.hole_height,
3079
+ pcbRotation: elm.ccw_rotation
3080
+ })
3081
+ );
3031
3082
  } else if (elm.type === "pcb_cutout") {
3032
3083
  if (elm.shape === "rect") {
3033
3084
  components.push(
@@ -14236,6 +14287,51 @@ var FabricationNoteText = class extends PrimitiveComponent2 {
14236
14287
  }
14237
14288
  };
14238
14289
 
14290
+ // lib/components/primitive-components/PcbNoteLine.ts
14291
+ import { pcbNoteLineProps } from "@tscircuit/props";
14292
+ import { applyToPoint as applyToPoint9 } from "transformation-matrix";
14293
+ var PcbNoteLine = class extends PrimitiveComponent2 {
14294
+ pcb_note_line_id = null;
14295
+ isPcbPrimitive = true;
14296
+ get config() {
14297
+ return {
14298
+ componentName: "PcbNoteLine",
14299
+ zodProps: pcbNoteLineProps
14300
+ };
14301
+ }
14302
+ doInitialPcbPrimitiveRender() {
14303
+ if (this.root?.pcbDisabled) return;
14304
+ const { db } = this.root;
14305
+ const { _parsedProps: props } = this;
14306
+ const subcircuit = this.getSubcircuit();
14307
+ const group = this.getGroup();
14308
+ const transform = this._computePcbGlobalTransformBeforeLayout();
14309
+ const start = applyToPoint9(transform, { x: props.x1, y: props.y1 });
14310
+ const end = applyToPoint9(transform, { x: props.x2, y: props.y2 });
14311
+ const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id ?? void 0;
14312
+ const pcb_note_line = db.pcb_note_line.insert({
14313
+ pcb_component_id,
14314
+ subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
14315
+ pcb_group_id: group?.pcb_group_id ?? void 0,
14316
+ x1: start.x,
14317
+ y1: start.y,
14318
+ x2: end.x,
14319
+ y2: end.y,
14320
+ stroke_width: props.strokeWidth ?? 0.1,
14321
+ color: props.color,
14322
+ is_dashed: props.isDashed
14323
+ });
14324
+ this.pcb_note_line_id = pcb_note_line.pcb_note_line_id;
14325
+ }
14326
+ getPcbSize() {
14327
+ const { _parsedProps: props } = this;
14328
+ return {
14329
+ width: Math.abs(props.x2 - props.x1),
14330
+ height: Math.abs(props.y2 - props.y1)
14331
+ };
14332
+ }
14333
+ };
14334
+
14239
14335
  // lib/components/primitive-components/Group/Subcircuit.ts
14240
14336
  import "@tscircuit/props";
14241
14337
  var Subcircuit = class extends Group6 {
@@ -14360,7 +14456,7 @@ var BreakoutPoint = class extends PrimitiveComponent2 {
14360
14456
  // lib/components/primitive-components/NetLabel.ts
14361
14457
  import { netLabelProps } from "@tscircuit/props";
14362
14458
  import {
14363
- applyToPoint as applyToPoint9,
14459
+ applyToPoint as applyToPoint10,
14364
14460
  identity as identity5,
14365
14461
  translate as translate6
14366
14462
  } from "transformation-matrix";
@@ -14411,7 +14507,7 @@ var NetLabel = class extends PrimitiveComponent2 {
14411
14507
  const connectedPorts = this._getConnectedPorts();
14412
14508
  if (connectedPorts.length > 0) {
14413
14509
  const portPos = connectedPorts[0]._getGlobalSchematicPositionBeforeLayout();
14414
- const parentCenter = applyToPoint9(
14510
+ const parentCenter = applyToPoint10(
14415
14511
  this.parent?.computeSchematicGlobalTransform?.() ?? identity5(),
14416
14512
  { x: 0, y: 0 }
14417
14513
  );
@@ -16218,7 +16314,7 @@ import { identity as identity6 } from "transformation-matrix";
16218
16314
  var package_default = {
16219
16315
  name: "@tscircuit/core",
16220
16316
  type: "module",
16221
- version: "0.0.777",
16317
+ version: "0.0.779",
16222
16318
  types: "dist/index.d.ts",
16223
16319
  main: "dist/index.js",
16224
16320
  module: "dist/index.js",
@@ -16249,7 +16345,7 @@ var package_default = {
16249
16345
  "@biomejs/biome": "^1.8.3",
16250
16346
  "@tscircuit/capacity-autorouter": "^0.0.131",
16251
16347
  "@tscircuit/checks": "^0.0.85",
16252
- "@tscircuit/circuit-json-util": "^0.0.67",
16348
+ "@tscircuit/circuit-json-util": "^0.0.72",
16253
16349
  "@tscircuit/common": "^0.0.9",
16254
16350
  "@tscircuit/footprinter": "^0.0.236",
16255
16351
  "@tscircuit/import-snippet": "^0.0.4",
@@ -16258,7 +16354,7 @@ var package_default = {
16258
16354
  "@tscircuit/matchpack": "^0.0.16",
16259
16355
  "@tscircuit/math-utils": "^0.0.21",
16260
16356
  "@tscircuit/miniflex": "^0.0.4",
16261
- "@tscircuit/props": "0.0.357",
16357
+ "@tscircuit/props": "0.0.360",
16262
16358
  "@tscircuit/schematic-autolayout": "^0.0.6",
16263
16359
  "@tscircuit/schematic-match-adapt": "^0.0.16",
16264
16360
  "@tscircuit/schematic-trace-solver": "^0.0.41",
@@ -16271,13 +16367,13 @@ var package_default = {
16271
16367
  "bun-match-svg": "0.0.12",
16272
16368
  "calculate-elbow": "^0.0.12",
16273
16369
  "chokidar-cli": "^3.0.0",
16274
- "circuit-json": "^0.0.275",
16370
+ "circuit-json": "^0.0.277",
16275
16371
  "circuit-json-to-bpc": "^0.0.13",
16276
16372
  "circuit-json-to-connectivity-map": "^0.0.22",
16277
16373
  "circuit-json-to-gltf": "^0.0.7",
16278
16374
  "circuit-json-to-simple-3d": "^0.0.9",
16279
16375
  "circuit-json-to-spice": "^0.0.13",
16280
- "circuit-to-svg": "^0.0.230",
16376
+ "circuit-to-svg": "^0.0.235",
16281
16377
  concurrently: "^9.1.2",
16282
16378
  "connectivity-map": "^1.0.0",
16283
16379
  debug: "^4.3.6",
@@ -16754,6 +16850,7 @@ export {
16754
16850
  Net,
16755
16851
  NetLabel,
16756
16852
  NormalComponent3 as NormalComponent,
16853
+ PcbNoteLine,
16757
16854
  PcbTrace,
16758
16855
  PinHeader,
16759
16856
  Pinout,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.778",
4
+ "version": "0.0.780",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "@biomejs/biome": "^1.8.3",
33
33
  "@tscircuit/capacity-autorouter": "^0.0.131",
34
34
  "@tscircuit/checks": "^0.0.85",
35
- "@tscircuit/circuit-json-util": "^0.0.67",
35
+ "@tscircuit/circuit-json-util": "^0.0.72",
36
36
  "@tscircuit/common": "^0.0.9",
37
37
  "@tscircuit/footprinter": "^0.0.236",
38
38
  "@tscircuit/import-snippet": "^0.0.4",
@@ -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.357",
44
+ "@tscircuit/props": "0.0.360",
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,13 +54,13 @@
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.275",
57
+ "circuit-json": "^0.0.277",
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
62
  "circuit-json-to-spice": "^0.0.13",
63
- "circuit-to-svg": "^0.0.230",
63
+ "circuit-to-svg": "^0.0.235",
64
64
  "concurrently": "^9.1.2",
65
65
  "connectivity-map": "^1.0.0",
66
66
  "debug": "^4.3.6",