@tscircuit/props 0.0.452 → 0.0.453
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 +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +45 -43
- package/dist/index.js.map +1 -1
- package/lib/components/schematic-path.ts +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1455,6 +1455,8 @@ export interface SchematicLineProps {
|
|
|
1455
1455
|
export interface SchematicPathProps {
|
|
1456
1456
|
points: Point[];
|
|
1457
1457
|
svgPath?: string;
|
|
1458
|
+
strokeWidth?: Distance;
|
|
1459
|
+
strokeColor?: string;
|
|
1458
1460
|
isFilled?: boolean;
|
|
1459
1461
|
fillColor?: "red" | "blue";
|
|
1460
1462
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -163164,6 +163164,8 @@ declare const schematicPathProps: z.ZodObject<{
|
|
|
163164
163164
|
y: string | number;
|
|
163165
163165
|
}>, "many">;
|
|
163166
163166
|
svgPath: z.ZodOptional<z.ZodString>;
|
|
163167
|
+
strokeWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
163168
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
163167
163169
|
isFilled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
163168
163170
|
fillColor: z.ZodOptional<z.ZodEnum<["red", "blue"]>>;
|
|
163169
163171
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -163172,20 +163174,26 @@ declare const schematicPathProps: z.ZodObject<{
|
|
|
163172
163174
|
y: number;
|
|
163173
163175
|
}[];
|
|
163174
163176
|
isFilled: boolean;
|
|
163177
|
+
strokeWidth?: number | undefined;
|
|
163175
163178
|
fillColor?: "red" | "blue" | undefined;
|
|
163176
163179
|
svgPath?: string | undefined;
|
|
163180
|
+
strokeColor?: string | undefined;
|
|
163177
163181
|
}, {
|
|
163178
163182
|
points: {
|
|
163179
163183
|
x: string | number;
|
|
163180
163184
|
y: string | number;
|
|
163181
163185
|
}[];
|
|
163186
|
+
strokeWidth?: string | number | undefined;
|
|
163182
163187
|
isFilled?: boolean | undefined;
|
|
163183
163188
|
fillColor?: "red" | "blue" | undefined;
|
|
163184
163189
|
svgPath?: string | undefined;
|
|
163190
|
+
strokeColor?: string | undefined;
|
|
163185
163191
|
}>;
|
|
163186
163192
|
interface SchematicPathProps {
|
|
163187
163193
|
points: Point[];
|
|
163188
163194
|
svgPath?: string;
|
|
163195
|
+
strokeWidth?: Distance;
|
|
163196
|
+
strokeColor?: string;
|
|
163189
163197
|
isFilled?: boolean;
|
|
163190
163198
|
fillColor?: "red" | "blue";
|
|
163191
163199
|
}
|
package/dist/index.js
CHANGED
|
@@ -2321,50 +2321,52 @@ var schematicTextProps = z99.object({
|
|
|
2321
2321
|
expectTypesMatch(true);
|
|
2322
2322
|
|
|
2323
2323
|
// lib/components/schematic-path.ts
|
|
2324
|
-
import { point as point8 } from "circuit-json";
|
|
2324
|
+
import { distance as distance33, point as point8 } from "circuit-json";
|
|
2325
2325
|
import { z as z100 } from "zod";
|
|
2326
2326
|
var schematicPathProps = z100.object({
|
|
2327
2327
|
points: z100.array(point8),
|
|
2328
2328
|
svgPath: z100.string().optional(),
|
|
2329
|
+
strokeWidth: distance33.optional(),
|
|
2330
|
+
strokeColor: z100.string().optional(),
|
|
2329
2331
|
isFilled: z100.boolean().optional().default(false),
|
|
2330
2332
|
fillColor: z100.enum(["red", "blue"]).optional()
|
|
2331
2333
|
});
|
|
2332
2334
|
expectTypesMatch(true);
|
|
2333
2335
|
|
|
2334
2336
|
// lib/components/schematic-table.ts
|
|
2335
|
-
import { distance as
|
|
2337
|
+
import { distance as distance34 } from "circuit-json";
|
|
2336
2338
|
import { z as z101 } from "zod";
|
|
2337
2339
|
var schematicTableProps = z101.object({
|
|
2338
|
-
schX:
|
|
2339
|
-
schY:
|
|
2340
|
+
schX: distance34.optional(),
|
|
2341
|
+
schY: distance34.optional(),
|
|
2340
2342
|
children: z101.any().optional(),
|
|
2341
|
-
cellPadding:
|
|
2342
|
-
borderWidth:
|
|
2343
|
+
cellPadding: distance34.optional(),
|
|
2344
|
+
borderWidth: distance34.optional(),
|
|
2343
2345
|
anchor: ninePointAnchor.optional(),
|
|
2344
|
-
fontSize:
|
|
2346
|
+
fontSize: distance34.optional()
|
|
2345
2347
|
});
|
|
2346
2348
|
expectTypesMatch(true);
|
|
2347
2349
|
|
|
2348
2350
|
// lib/components/schematic-row.ts
|
|
2349
|
-
import { distance as
|
|
2351
|
+
import { distance as distance35 } from "circuit-json";
|
|
2350
2352
|
import { z as z102 } from "zod";
|
|
2351
2353
|
var schematicRowProps = z102.object({
|
|
2352
2354
|
children: z102.any().optional(),
|
|
2353
|
-
height:
|
|
2355
|
+
height: distance35.optional()
|
|
2354
2356
|
});
|
|
2355
2357
|
expectTypesMatch(true);
|
|
2356
2358
|
|
|
2357
2359
|
// lib/components/schematic-cell.ts
|
|
2358
|
-
import { distance as
|
|
2360
|
+
import { distance as distance36 } from "circuit-json";
|
|
2359
2361
|
import { z as z103 } from "zod";
|
|
2360
2362
|
var schematicCellProps = z103.object({
|
|
2361
2363
|
children: z103.string().optional(),
|
|
2362
2364
|
horizontalAlign: z103.enum(["left", "center", "right"]).optional(),
|
|
2363
2365
|
verticalAlign: z103.enum(["top", "middle", "bottom"]).optional(),
|
|
2364
|
-
fontSize:
|
|
2366
|
+
fontSize: distance36.optional(),
|
|
2365
2367
|
rowSpan: z103.number().optional(),
|
|
2366
2368
|
colSpan: z103.number().optional(),
|
|
2367
|
-
width:
|
|
2369
|
+
width: distance36.optional(),
|
|
2368
2370
|
text: z103.string().optional()
|
|
2369
2371
|
});
|
|
2370
2372
|
expectTypesMatch(true);
|
|
@@ -2421,7 +2423,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
2421
2423
|
});
|
|
2422
2424
|
|
|
2423
2425
|
// lib/components/silkscreen-line.ts
|
|
2424
|
-
import { distance as
|
|
2426
|
+
import { distance as distance37 } from "circuit-json";
|
|
2425
2427
|
var silkscreenLineProps = pcbLayoutProps.omit({
|
|
2426
2428
|
pcbX: true,
|
|
2427
2429
|
pcbY: true,
|
|
@@ -2429,41 +2431,41 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
2429
2431
|
pcbOffsetY: true,
|
|
2430
2432
|
pcbRotation: true
|
|
2431
2433
|
}).extend({
|
|
2432
|
-
strokeWidth:
|
|
2433
|
-
x1:
|
|
2434
|
-
y1:
|
|
2435
|
-
x2:
|
|
2436
|
-
y2:
|
|
2434
|
+
strokeWidth: distance37,
|
|
2435
|
+
x1: distance37,
|
|
2436
|
+
y1: distance37,
|
|
2437
|
+
x2: distance37,
|
|
2438
|
+
y2: distance37
|
|
2437
2439
|
});
|
|
2438
2440
|
|
|
2439
2441
|
// lib/components/silkscreen-rect.ts
|
|
2440
|
-
import { distance as
|
|
2442
|
+
import { distance as distance38 } from "circuit-json";
|
|
2441
2443
|
import { z as z107 } from "zod";
|
|
2442
2444
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
2443
2445
|
filled: z107.boolean().default(true).optional(),
|
|
2444
2446
|
stroke: z107.enum(["dashed", "solid", "none"]).optional(),
|
|
2445
|
-
strokeWidth:
|
|
2446
|
-
width:
|
|
2447
|
-
height:
|
|
2448
|
-
cornerRadius:
|
|
2447
|
+
strokeWidth: distance38.optional(),
|
|
2448
|
+
width: distance38,
|
|
2449
|
+
height: distance38,
|
|
2450
|
+
cornerRadius: distance38.optional()
|
|
2449
2451
|
});
|
|
2450
2452
|
|
|
2451
2453
|
// lib/components/silkscreen-circle.ts
|
|
2452
|
-
import { distance as
|
|
2454
|
+
import { distance as distance39 } from "circuit-json";
|
|
2453
2455
|
import { z as z108 } from "zod";
|
|
2454
2456
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
2455
2457
|
isFilled: z108.boolean().optional(),
|
|
2456
2458
|
isOutline: z108.boolean().optional(),
|
|
2457
|
-
strokeWidth:
|
|
2458
|
-
radius:
|
|
2459
|
+
strokeWidth: distance39.optional(),
|
|
2460
|
+
radius: distance39
|
|
2459
2461
|
});
|
|
2460
2462
|
|
|
2461
2463
|
// lib/components/trace-hint.ts
|
|
2462
|
-
import { distance as
|
|
2464
|
+
import { distance as distance40, layer_ref as layer_ref10, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
2463
2465
|
import { z as z109 } from "zod";
|
|
2464
2466
|
var routeHintPointProps = z109.object({
|
|
2465
|
-
x:
|
|
2466
|
-
y:
|
|
2467
|
+
x: distance40,
|
|
2468
|
+
y: distance40,
|
|
2467
2469
|
via: z109.boolean().optional(),
|
|
2468
2470
|
toLayer: layer_ref10.optional()
|
|
2469
2471
|
});
|
|
@@ -2500,17 +2502,17 @@ var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
|
2500
2502
|
expectTypesMatch(true);
|
|
2501
2503
|
|
|
2502
2504
|
// lib/components/pcb-note-rect.ts
|
|
2503
|
-
import { distance as
|
|
2505
|
+
import { distance as distance41 } from "circuit-json";
|
|
2504
2506
|
import { z as z112 } from "zod";
|
|
2505
2507
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
2506
|
-
width:
|
|
2507
|
-
height:
|
|
2508
|
-
strokeWidth:
|
|
2508
|
+
width: distance41,
|
|
2509
|
+
height: distance41,
|
|
2510
|
+
strokeWidth: distance41.optional(),
|
|
2509
2511
|
isFilled: z112.boolean().optional(),
|
|
2510
2512
|
hasStroke: z112.boolean().optional(),
|
|
2511
2513
|
isStrokeDashed: z112.boolean().optional(),
|
|
2512
2514
|
color: z112.string().optional(),
|
|
2513
|
-
cornerRadius:
|
|
2515
|
+
cornerRadius: distance41.optional()
|
|
2514
2516
|
});
|
|
2515
2517
|
expectTypesMatch(true);
|
|
2516
2518
|
|
|
@@ -2538,7 +2540,7 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
2538
2540
|
expectTypesMatch(true);
|
|
2539
2541
|
|
|
2540
2542
|
// lib/components/pcb-note-line.ts
|
|
2541
|
-
import { distance as
|
|
2543
|
+
import { distance as distance42 } from "circuit-json";
|
|
2542
2544
|
import { z as z114 } from "zod";
|
|
2543
2545
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
2544
2546
|
pcbLeftEdgeX: true,
|
|
@@ -2551,18 +2553,18 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
2551
2553
|
pcbOffsetY: true,
|
|
2552
2554
|
pcbRotation: true
|
|
2553
2555
|
}).extend({
|
|
2554
|
-
x1:
|
|
2555
|
-
y1:
|
|
2556
|
-
x2:
|
|
2557
|
-
y2:
|
|
2558
|
-
strokeWidth:
|
|
2556
|
+
x1: distance42,
|
|
2557
|
+
y1: distance42,
|
|
2558
|
+
x2: distance42,
|
|
2559
|
+
y2: distance42,
|
|
2560
|
+
strokeWidth: distance42.optional(),
|
|
2559
2561
|
color: z114.string().optional(),
|
|
2560
2562
|
isDashed: z114.boolean().optional()
|
|
2561
2563
|
});
|
|
2562
2564
|
expectTypesMatch(true);
|
|
2563
2565
|
|
|
2564
2566
|
// lib/components/pcb-note-dimension.ts
|
|
2565
|
-
import { distance as
|
|
2567
|
+
import { distance as distance43, length as length12 } from "circuit-json";
|
|
2566
2568
|
import { z as z115 } from "zod";
|
|
2567
2569
|
var dimensionTarget2 = z115.union([z115.string(), point]);
|
|
2568
2570
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
@@ -2579,11 +2581,11 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
2579
2581
|
from: dimensionTarget2,
|
|
2580
2582
|
to: dimensionTarget2,
|
|
2581
2583
|
text: z115.string().optional(),
|
|
2582
|
-
offset:
|
|
2584
|
+
offset: distance43.optional(),
|
|
2583
2585
|
font: z115.enum(["tscircuit2024"]).optional(),
|
|
2584
2586
|
fontSize: length12.optional(),
|
|
2585
2587
|
color: z115.string().optional(),
|
|
2586
|
-
arrowSize:
|
|
2588
|
+
arrowSize: distance43.optional(),
|
|
2587
2589
|
units: z115.enum(["in", "mm"]).optional(),
|
|
2588
2590
|
outerEdgeToEdge: z115.literal(true).optional(),
|
|
2589
2591
|
centerToCenter: z115.literal(true).optional(),
|