@tscircuit/props 0.0.436 → 0.0.438

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/README.md CHANGED
@@ -39,6 +39,7 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
39
39
  | `<courtyardoutline />` | [`CourtyardOutlineProps`](#courtyardoutlineprops-courtyardoutline) |
40
40
  | `<courtyardrect />` | [`CourtyardRectProps`](#courtyardrectprops-courtyardrect) |
41
41
  | `<crystal />` | [`CrystalProps`](#crystalprops-crystal) |
42
+ | `<currentsource />` | [`CurrentSourceProps`](#currentsourceprops-currentsource) |
42
43
  | `<cutout />` | [`RectCutoutProps`](#rectcutoutprops-cutout) |
43
44
  | `<diode />` | [`DiodeProps`](#diodeprops-diode) |
44
45
  | `<fabricationnotedimension />` | [`FabricationNoteDimensionProps`](#fabricationnotedimensionprops-fabricationnotedimension) |
@@ -496,6 +497,24 @@ export interface CrystalProps<
496
497
 
497
498
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/crystal.ts)
498
499
 
500
+ ### CurrentSourceProps `<currentsource />`
501
+
502
+ ```ts
503
+ export interface CurrentSourceProps<
504
+ PinLabel extends string = string,
505
+ > extends CommonComponentProps<PinLabel> {
506
+ current?: number | string;
507
+ frequency?: number | string;
508
+ peakToPeakCurrent?: number | string;
509
+ waveShape?: WaveShape;
510
+ phase?: number | string;
511
+ dutyCycle?: number | string;
512
+ connections?: Connections<CurrentSourcePinLabels>;
513
+ }
514
+ ```
515
+
516
+ [Source](https://github.com/tscircuit/props/blob/main/lib/components/currentsource.ts)
517
+
499
518
  ### RectCutoutProps `<cutout />`
500
519
 
501
520
  ```ts
@@ -1326,7 +1345,16 @@ export interface ResonatorProps extends CommonComponentProps {
1326
1345
  ### SchematicArcProps `<schematicarc />`
1327
1346
 
1328
1347
  ```ts
1329
- export type SchematicArcProps = z.input<typeof schematicArcProps>;
1348
+ export interface SchematicArcProps {
1349
+ center: Point;
1350
+ radius: Distance;
1351
+ startAngleDegrees: number | string;
1352
+ endAngleDegrees: number | string;
1353
+ direction?: "clockwise" | "counterclockwise";
1354
+ strokeWidth?: Distance;
1355
+ color?: string;
1356
+ isDashed?: boolean;
1357
+ }
1330
1358
  ```
1331
1359
 
1332
1360
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-arc.ts)
@@ -1334,7 +1362,24 @@ export type SchematicArcProps = z.input<typeof schematicArcProps>;
1334
1362
  ### SchematicBoxProps `<schematicbox />`
1335
1363
 
1336
1364
  ```ts
1337
- export type SchematicBoxProps = z.input<typeof schematicBoxProps>;
1365
+ export interface SchematicBoxProps {
1366
+ schX?: Distance;
1367
+ schY?: Distance;
1368
+ width?: Distance;
1369
+ height?: Distance;
1370
+ overlay?: string[];
1371
+ padding?: Distance;
1372
+ paddingLeft?: Distance;
1373
+ paddingRight?: Distance;
1374
+ paddingTop?: Distance;
1375
+ paddingBottom?: Distance;
1376
+ title?: string;
1377
+ titleAlignment?: z.infer<typeof ninePointAnchor>;
1378
+ titleColor?: string;
1379
+ titleFontSize?: Distance;
1380
+ titleInside?: boolean;
1381
+ strokeStyle?: "solid" | "dashed";
1382
+ }
1338
1383
  ```
1339
1384
 
1340
1385
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-box.ts)
@@ -1359,7 +1404,15 @@ export interface SchematicCellProps {
1359
1404
  ### SchematicCircleProps `<schematiccircle />`
1360
1405
 
1361
1406
  ```ts
1362
- export type SchematicCircleProps = z.input<typeof schematicCircleProps>;
1407
+ export interface SchematicCircleProps {
1408
+ center: Point;
1409
+ radius: Distance;
1410
+ strokeWidth?: Distance;
1411
+ color?: string;
1412
+ isFilled?: boolean;
1413
+ fillColor?: string;
1414
+ isDashed?: boolean;
1415
+ }
1363
1416
  ```
1364
1417
 
1365
1418
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-circle.ts)
@@ -1367,7 +1420,15 @@ export type SchematicCircleProps = z.input<typeof schematicCircleProps>;
1367
1420
  ### SchematicLineProps `<schematicline />`
1368
1421
 
1369
1422
  ```ts
1370
- export type SchematicLineProps = z.input<typeof schematicLineProps>;
1423
+ export interface SchematicLineProps {
1424
+ x1: Distance;
1425
+ y1: Distance;
1426
+ x2: Distance;
1427
+ y2: Distance;
1428
+ strokeWidth?: Distance;
1429
+ color?: string;
1430
+ isDashed?: boolean;
1431
+ }
1371
1432
  ```
1372
1433
 
1373
1434
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-line.ts)
@@ -1375,7 +1436,11 @@ export type SchematicLineProps = z.input<typeof schematicLineProps>;
1375
1436
  ### SchematicPathProps `<schematicpath />`
1376
1437
 
1377
1438
  ```ts
1378
- export type SchematicPathProps = z.input<typeof schematicPathProps>;
1439
+ export interface SchematicPathProps {
1440
+ points: Point[];
1441
+ isFilled?: boolean;
1442
+ fillColor?: "red" | "blue";
1443
+ }
1379
1444
  ```
1380
1445
 
1381
1446
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-path.ts)
@@ -1383,7 +1448,19 @@ export type SchematicPathProps = z.input<typeof schematicPathProps>;
1383
1448
  ### SchematicRectProps `<schematicrect />`
1384
1449
 
1385
1450
  ```ts
1386
- export type SchematicRectProps = z.input<typeof schematicRectProps>;
1451
+ export interface SchematicRectProps {
1452
+ schX?: Distance;
1453
+ schY?: Distance;
1454
+ width: Distance;
1455
+ height: Distance;
1456
+ rotation?: number | string;
1457
+ strokeWidth?: Distance;
1458
+ color?: string;
1459
+ isFilled?: boolean;
1460
+ fillColor?: string;
1461
+ isDashed?: boolean;
1462
+ cornerRadius?: Distance;
1463
+ }
1387
1464
  ```
1388
1465
 
1389
1466
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-rect.ts)
@@ -1418,7 +1495,15 @@ export interface SchematicTableProps {
1418
1495
  ### SchematicTextProps `<schematictext />`
1419
1496
 
1420
1497
  ```ts
1421
- export type SchematicTextProps = z.input<typeof schematicTextProps>;
1498
+ export interface SchematicTextProps {
1499
+ schX?: Distance;
1500
+ schY?: Distance;
1501
+ text: string;
1502
+ fontSize?: number;
1503
+ anchor?: z.infer<typeof fivePointAnchor> | z.infer<typeof ninePointAnchor>;
1504
+ color?: string;
1505
+ schRotation?: number | string;
1506
+ }
1422
1507
  ```
1423
1508
 
1424
1509
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-text.ts)