@tscircuit/core 0.0.733 → 0.0.735
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 +160 -45
- package/dist/index.js +72 -12
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1720,18 +1720,18 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1720
1720
|
y: string | number;
|
|
1721
1721
|
}>;
|
|
1722
1722
|
}, "strip", zod.ZodTypeAny, {
|
|
1723
|
-
selector: string;
|
|
1724
|
-
relative_to: string;
|
|
1725
1723
|
center: {
|
|
1726
1724
|
x: number;
|
|
1727
1725
|
y: number;
|
|
1728
1726
|
};
|
|
1729
|
-
}, {
|
|
1730
1727
|
selector: string;
|
|
1728
|
+
relative_to: string;
|
|
1729
|
+
}, {
|
|
1731
1730
|
center: {
|
|
1732
1731
|
x: string | number;
|
|
1733
1732
|
y: string | number;
|
|
1734
1733
|
};
|
|
1734
|
+
selector: string;
|
|
1735
1735
|
relative_to?: string | undefined;
|
|
1736
1736
|
}>, "many">>;
|
|
1737
1737
|
manual_trace_hints: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
@@ -1800,28 +1800,28 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1800
1800
|
y: string | number;
|
|
1801
1801
|
}>;
|
|
1802
1802
|
}, "strip", zod.ZodTypeAny, {
|
|
1803
|
-
selector: string;
|
|
1804
|
-
relative_to: string;
|
|
1805
1803
|
center: {
|
|
1806
1804
|
x: number;
|
|
1807
1805
|
y: number;
|
|
1808
1806
|
};
|
|
1809
|
-
}, {
|
|
1810
1807
|
selector: string;
|
|
1808
|
+
relative_to: string;
|
|
1809
|
+
}, {
|
|
1811
1810
|
center: {
|
|
1812
1811
|
x: string | number;
|
|
1813
1812
|
y: string | number;
|
|
1814
1813
|
};
|
|
1814
|
+
selector: string;
|
|
1815
1815
|
relative_to?: string | undefined;
|
|
1816
1816
|
}>, "many">>;
|
|
1817
1817
|
}, "strip", zod.ZodTypeAny, {
|
|
1818
1818
|
pcb_placements?: {
|
|
1819
|
-
selector: string;
|
|
1820
|
-
relative_to: string;
|
|
1821
1819
|
center: {
|
|
1822
1820
|
x: number;
|
|
1823
1821
|
y: number;
|
|
1824
1822
|
};
|
|
1823
|
+
selector: string;
|
|
1824
|
+
relative_to: string;
|
|
1825
1825
|
}[] | undefined;
|
|
1826
1826
|
manual_trace_hints?: {
|
|
1827
1827
|
pcb_port_selector: string;
|
|
@@ -1834,20 +1834,20 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1834
1834
|
}[];
|
|
1835
1835
|
}[] | undefined;
|
|
1836
1836
|
schematic_placements?: {
|
|
1837
|
-
selector: string;
|
|
1838
|
-
relative_to: string;
|
|
1839
1837
|
center: {
|
|
1840
1838
|
x: number;
|
|
1841
1839
|
y: number;
|
|
1842
1840
|
};
|
|
1841
|
+
selector: string;
|
|
1842
|
+
relative_to: string;
|
|
1843
1843
|
}[] | undefined;
|
|
1844
1844
|
}, {
|
|
1845
1845
|
pcb_placements?: {
|
|
1846
|
-
selector: string;
|
|
1847
1846
|
center: {
|
|
1848
1847
|
x: string | number;
|
|
1849
1848
|
y: string | number;
|
|
1850
1849
|
};
|
|
1850
|
+
selector: string;
|
|
1851
1851
|
relative_to?: string | undefined;
|
|
1852
1852
|
}[] | undefined;
|
|
1853
1853
|
manual_trace_hints?: {
|
|
@@ -1863,11 +1863,11 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1863
1863
|
}[];
|
|
1864
1864
|
}[] | undefined;
|
|
1865
1865
|
schematic_placements?: {
|
|
1866
|
-
selector: string;
|
|
1867
1866
|
center: {
|
|
1868
1867
|
x: string | number;
|
|
1869
1868
|
y: string | number;
|
|
1870
1869
|
};
|
|
1870
|
+
selector: string;
|
|
1871
1871
|
relative_to?: string | undefined;
|
|
1872
1872
|
}[] | undefined;
|
|
1873
1873
|
}>>;
|
|
@@ -1934,6 +1934,17 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1934
1934
|
material: zod.ZodDefault<zod.ZodEnum<["fr4", "fr1"]>>;
|
|
1935
1935
|
layers: zod.ZodDefault<zod.ZodUnion<[zod.ZodLiteral<2>, zod.ZodLiteral<4>]>>;
|
|
1936
1936
|
borderRadius: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1937
|
+
boardAnchorPosition: zod.ZodOptional<zod.ZodObject<{
|
|
1938
|
+
x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
1939
|
+
y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
1940
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1941
|
+
x: number;
|
|
1942
|
+
y: number;
|
|
1943
|
+
}, {
|
|
1944
|
+
x: string | number;
|
|
1945
|
+
y: string | number;
|
|
1946
|
+
}>>;
|
|
1947
|
+
boardAnchorAlignment: zod.ZodOptional<zod.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
|
|
1937
1948
|
}, "strip", zod.ZodTypeAny, {
|
|
1938
1949
|
material: "fr4" | "fr1";
|
|
1939
1950
|
layers: 2 | 4;
|
|
@@ -2158,12 +2169,12 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2158
2169
|
schMatchAdapt?: boolean | undefined;
|
|
2159
2170
|
manualEdits?: {
|
|
2160
2171
|
pcb_placements?: {
|
|
2161
|
-
selector: string;
|
|
2162
|
-
relative_to: string;
|
|
2163
2172
|
center: {
|
|
2164
2173
|
x: number;
|
|
2165
2174
|
y: number;
|
|
2166
2175
|
};
|
|
2176
|
+
selector: string;
|
|
2177
|
+
relative_to: string;
|
|
2167
2178
|
}[] | undefined;
|
|
2168
2179
|
manual_trace_hints?: {
|
|
2169
2180
|
pcb_port_selector: string;
|
|
@@ -2176,12 +2187,12 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2176
2187
|
}[];
|
|
2177
2188
|
}[] | undefined;
|
|
2178
2189
|
schematic_placements?: {
|
|
2179
|
-
selector: string;
|
|
2180
|
-
relative_to: string;
|
|
2181
2190
|
center: {
|
|
2182
2191
|
x: number;
|
|
2183
2192
|
y: number;
|
|
2184
2193
|
};
|
|
2194
|
+
selector: string;
|
|
2195
|
+
relative_to: string;
|
|
2185
2196
|
}[] | undefined;
|
|
2186
2197
|
} | undefined;
|
|
2187
2198
|
routingDisabled?: boolean | undefined;
|
|
@@ -2214,6 +2225,11 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2214
2225
|
outlineOffsetX?: number | undefined;
|
|
2215
2226
|
outlineOffsetY?: number | undefined;
|
|
2216
2227
|
borderRadius?: number | undefined;
|
|
2228
|
+
boardAnchorPosition?: {
|
|
2229
|
+
x: number;
|
|
2230
|
+
y: number;
|
|
2231
|
+
} | undefined;
|
|
2232
|
+
boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
2217
2233
|
}, {
|
|
2218
2234
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
2219
2235
|
key?: any;
|
|
@@ -2438,11 +2454,11 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2438
2454
|
schMatchAdapt?: boolean | undefined;
|
|
2439
2455
|
manualEdits?: {
|
|
2440
2456
|
pcb_placements?: {
|
|
2441
|
-
selector: string;
|
|
2442
2457
|
center: {
|
|
2443
2458
|
x: string | number;
|
|
2444
2459
|
y: string | number;
|
|
2445
2460
|
};
|
|
2461
|
+
selector: string;
|
|
2446
2462
|
relative_to?: string | undefined;
|
|
2447
2463
|
}[] | undefined;
|
|
2448
2464
|
manual_trace_hints?: {
|
|
@@ -2458,11 +2474,11 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2458
2474
|
}[];
|
|
2459
2475
|
}[] | undefined;
|
|
2460
2476
|
schematic_placements?: {
|
|
2461
|
-
selector: string;
|
|
2462
2477
|
center: {
|
|
2463
2478
|
x: string | number;
|
|
2464
2479
|
y: string | number;
|
|
2465
2480
|
};
|
|
2481
|
+
selector: string;
|
|
2466
2482
|
relative_to?: string | undefined;
|
|
2467
2483
|
}[] | undefined;
|
|
2468
2484
|
} | undefined;
|
|
@@ -2498,6 +2514,11 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2498
2514
|
material?: "fr4" | "fr1" | undefined;
|
|
2499
2515
|
layers?: 2 | 4 | undefined;
|
|
2500
2516
|
borderRadius?: string | number | undefined;
|
|
2517
|
+
boardAnchorPosition?: {
|
|
2518
|
+
x: string | number;
|
|
2519
|
+
y: string | number;
|
|
2520
|
+
} | undefined;
|
|
2521
|
+
boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
2501
2522
|
}>;
|
|
2502
2523
|
};
|
|
2503
2524
|
get boardThickness(): number;
|
|
@@ -17004,7 +17025,7 @@ declare class FabricationNoteText extends PrimitiveComponent<typeof fabricationN
|
|
|
17004
17025
|
color: zod.ZodOptional<zod.ZodString>;
|
|
17005
17026
|
}, "strip", zod.ZodTypeAny, {
|
|
17006
17027
|
text: string;
|
|
17007
|
-
anchorAlignment: "
|
|
17028
|
+
anchorAlignment: "top_left" | "top_right" | "center" | "bottom_left" | "bottom_right";
|
|
17008
17029
|
pcbX?: number | undefined;
|
|
17009
17030
|
pcbY?: number | undefined;
|
|
17010
17031
|
pcbRotation?: number | undefined;
|
|
@@ -17039,7 +17060,7 @@ declare class FabricationNoteText extends PrimitiveComponent<typeof fabricationN
|
|
|
17039
17060
|
pcbRelative?: boolean | undefined;
|
|
17040
17061
|
relative?: boolean | undefined;
|
|
17041
17062
|
color?: string | undefined;
|
|
17042
|
-
anchorAlignment?: "
|
|
17063
|
+
anchorAlignment?: "top_left" | "top_right" | "center" | "bottom_left" | "bottom_right" | undefined;
|
|
17043
17064
|
font?: "tscircuit2024" | undefined;
|
|
17044
17065
|
fontSize?: string | number | undefined;
|
|
17045
17066
|
}>;
|
|
@@ -17176,7 +17197,7 @@ declare class Hole extends PrimitiveComponent<typeof holeProps> {
|
|
|
17176
17197
|
isPcbPrimitive: boolean;
|
|
17177
17198
|
get config(): {
|
|
17178
17199
|
componentName: string;
|
|
17179
|
-
zodProps: zod.ZodEffects<zod.ZodObject<
|
|
17200
|
+
zodProps: zod.ZodUnion<[zod.ZodEffects<zod.ZodObject<{
|
|
17180
17201
|
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17181
17202
|
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17182
17203
|
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -17198,13 +17219,15 @@ declare class Hole extends PrimitiveComponent<typeof holeProps> {
|
|
|
17198
17219
|
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17199
17220
|
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17200
17221
|
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17201
|
-
}
|
|
17222
|
+
} & {
|
|
17202
17223
|
name: zod.ZodOptional<zod.ZodString>;
|
|
17224
|
+
shape: zod.ZodOptional<zod.ZodLiteral<"circle">>;
|
|
17203
17225
|
diameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17204
17226
|
radius: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17205
17227
|
}, "strip", zod.ZodTypeAny, {
|
|
17206
17228
|
pcbX?: number | undefined;
|
|
17207
17229
|
pcbY?: number | undefined;
|
|
17230
|
+
pcbRotation?: number | undefined;
|
|
17208
17231
|
pcbPositionAnchor?: string | undefined;
|
|
17209
17232
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17210
17233
|
pcbMarginTop?: number | undefined;
|
|
@@ -17216,11 +17239,13 @@ declare class Hole extends PrimitiveComponent<typeof holeProps> {
|
|
|
17216
17239
|
pcbRelative?: boolean | undefined;
|
|
17217
17240
|
relative?: boolean | undefined;
|
|
17218
17241
|
name?: string | undefined;
|
|
17242
|
+
shape?: "circle" | undefined;
|
|
17219
17243
|
radius?: number | undefined;
|
|
17220
17244
|
diameter?: number | undefined;
|
|
17221
17245
|
}, {
|
|
17222
17246
|
pcbX?: string | number | undefined;
|
|
17223
17247
|
pcbY?: string | number | undefined;
|
|
17248
|
+
pcbRotation?: string | number | undefined;
|
|
17224
17249
|
pcbPositionAnchor?: string | undefined;
|
|
17225
17250
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17226
17251
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
@@ -17234,6 +17259,7 @@ declare class Hole extends PrimitiveComponent<typeof holeProps> {
|
|
|
17234
17259
|
pcbRelative?: boolean | undefined;
|
|
17235
17260
|
relative?: boolean | undefined;
|
|
17236
17261
|
name?: string | undefined;
|
|
17262
|
+
shape?: "circle" | undefined;
|
|
17237
17263
|
radius?: string | number | undefined;
|
|
17238
17264
|
diameter?: string | number | undefined;
|
|
17239
17265
|
}>, {
|
|
@@ -17241,6 +17267,7 @@ declare class Hole extends PrimitiveComponent<typeof holeProps> {
|
|
|
17241
17267
|
radius: number;
|
|
17242
17268
|
pcbX?: number | undefined;
|
|
17243
17269
|
pcbY?: number | undefined;
|
|
17270
|
+
pcbRotation?: number | undefined;
|
|
17244
17271
|
pcbPositionAnchor?: string | undefined;
|
|
17245
17272
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17246
17273
|
pcbMarginTop?: number | undefined;
|
|
@@ -17252,9 +17279,11 @@ declare class Hole extends PrimitiveComponent<typeof holeProps> {
|
|
|
17252
17279
|
pcbRelative?: boolean | undefined;
|
|
17253
17280
|
relative?: boolean | undefined;
|
|
17254
17281
|
name?: string | undefined;
|
|
17282
|
+
shape?: "circle" | undefined;
|
|
17255
17283
|
}, {
|
|
17256
17284
|
pcbX?: string | number | undefined;
|
|
17257
17285
|
pcbY?: string | number | undefined;
|
|
17286
|
+
pcbRotation?: string | number | undefined;
|
|
17258
17287
|
pcbPositionAnchor?: string | undefined;
|
|
17259
17288
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17260
17289
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
@@ -17268,9 +17297,75 @@ declare class Hole extends PrimitiveComponent<typeof holeProps> {
|
|
|
17268
17297
|
pcbRelative?: boolean | undefined;
|
|
17269
17298
|
relative?: boolean | undefined;
|
|
17270
17299
|
name?: string | undefined;
|
|
17300
|
+
shape?: "circle" | undefined;
|
|
17271
17301
|
radius?: string | number | undefined;
|
|
17272
17302
|
diameter?: string | number | undefined;
|
|
17273
|
-
}
|
|
17303
|
+
}>, zod.ZodObject<{
|
|
17304
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17305
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17306
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17307
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
17308
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
17309
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
17310
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17311
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17312
|
+
}, {
|
|
17313
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17314
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17315
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17316
|
+
}>>;
|
|
17317
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17318
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17319
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17320
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17321
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17322
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17323
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17324
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
17325
|
+
} & {
|
|
17326
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
17327
|
+
shape: zod.ZodLiteral<"pill">;
|
|
17328
|
+
width: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17329
|
+
height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17330
|
+
}, "strip", zod.ZodTypeAny, {
|
|
17331
|
+
shape: "pill";
|
|
17332
|
+
width: number;
|
|
17333
|
+
height: number;
|
|
17334
|
+
pcbX?: number | undefined;
|
|
17335
|
+
pcbY?: number | undefined;
|
|
17336
|
+
pcbRotation?: number | undefined;
|
|
17337
|
+
pcbPositionAnchor?: string | undefined;
|
|
17338
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
17339
|
+
pcbMarginTop?: number | undefined;
|
|
17340
|
+
pcbMarginRight?: number | undefined;
|
|
17341
|
+
pcbMarginBottom?: number | undefined;
|
|
17342
|
+
pcbMarginLeft?: number | undefined;
|
|
17343
|
+
pcbMarginX?: number | undefined;
|
|
17344
|
+
pcbMarginY?: number | undefined;
|
|
17345
|
+
pcbRelative?: boolean | undefined;
|
|
17346
|
+
relative?: boolean | undefined;
|
|
17347
|
+
name?: string | undefined;
|
|
17348
|
+
}, {
|
|
17349
|
+
shape: "pill";
|
|
17350
|
+
width: string | number;
|
|
17351
|
+
height: string | number;
|
|
17352
|
+
pcbX?: string | number | undefined;
|
|
17353
|
+
pcbY?: string | number | undefined;
|
|
17354
|
+
pcbRotation?: string | number | undefined;
|
|
17355
|
+
pcbPositionAnchor?: string | undefined;
|
|
17356
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
17357
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
17358
|
+
} | undefined;
|
|
17359
|
+
pcbMarginTop?: string | number | undefined;
|
|
17360
|
+
pcbMarginRight?: string | number | undefined;
|
|
17361
|
+
pcbMarginBottom?: string | number | undefined;
|
|
17362
|
+
pcbMarginLeft?: string | number | undefined;
|
|
17363
|
+
pcbMarginX?: string | number | undefined;
|
|
17364
|
+
pcbMarginY?: string | number | undefined;
|
|
17365
|
+
pcbRelative?: boolean | undefined;
|
|
17366
|
+
relative?: boolean | undefined;
|
|
17367
|
+
name?: string | undefined;
|
|
17368
|
+
}>]>;
|
|
17274
17369
|
};
|
|
17275
17370
|
getPcbSize(): {
|
|
17276
17371
|
width: number;
|
|
@@ -17777,6 +17872,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17777
17872
|
innerWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17778
17873
|
innerHeight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17779
17874
|
portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
|
|
17875
|
+
holeOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17876
|
+
holeOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17780
17877
|
}, "strip", zod.ZodTypeAny, {
|
|
17781
17878
|
shape: "pill";
|
|
17782
17879
|
outerWidth: number;
|
|
@@ -17801,6 +17898,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17801
17898
|
innerWidth?: number | undefined;
|
|
17802
17899
|
innerHeight?: number | undefined;
|
|
17803
17900
|
rectPad?: boolean | undefined;
|
|
17901
|
+
holeOffsetX?: number | undefined;
|
|
17902
|
+
holeOffsetY?: number | undefined;
|
|
17804
17903
|
}, {
|
|
17805
17904
|
shape: "pill";
|
|
17806
17905
|
outerWidth: string | number;
|
|
@@ -17825,6 +17924,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17825
17924
|
innerWidth?: string | number | undefined;
|
|
17826
17925
|
innerHeight?: string | number | undefined;
|
|
17827
17926
|
rectPad?: boolean | undefined;
|
|
17927
|
+
holeOffsetX?: string | number | undefined;
|
|
17928
|
+
holeOffsetY?: string | number | undefined;
|
|
17828
17929
|
}>, zod.ZodObject<Omit<{
|
|
17829
17930
|
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17830
17931
|
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -17858,8 +17959,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17858
17959
|
holeShape: zod.ZodOptional<zod.ZodLiteral<"circle">>;
|
|
17859
17960
|
padShape: zod.ZodOptional<zod.ZodLiteral<"rect">>;
|
|
17860
17961
|
portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
|
|
17861
|
-
|
|
17862
|
-
|
|
17962
|
+
holeOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17963
|
+
holeOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17863
17964
|
}, "strip", zod.ZodTypeAny, {
|
|
17864
17965
|
shape: "circular_hole_with_rect_pad";
|
|
17865
17966
|
holeDiameter: number;
|
|
@@ -17879,11 +17980,11 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17879
17980
|
name?: string | undefined;
|
|
17880
17981
|
connectsTo?: string | string[] | undefined;
|
|
17881
17982
|
portHints?: (string | number)[] | undefined;
|
|
17983
|
+
holeOffsetX?: number | undefined;
|
|
17984
|
+
holeOffsetY?: number | undefined;
|
|
17882
17985
|
rectBorderRadius?: number | undefined;
|
|
17883
17986
|
holeShape?: "circle" | undefined;
|
|
17884
17987
|
padShape?: "rect" | undefined;
|
|
17885
|
-
pcbHoleOffsetX?: number | undefined;
|
|
17886
|
-
pcbHoleOffsetY?: number | undefined;
|
|
17887
17988
|
}, {
|
|
17888
17989
|
shape: "circular_hole_with_rect_pad";
|
|
17889
17990
|
holeDiameter: string | number;
|
|
@@ -17903,11 +18004,11 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17903
18004
|
name?: string | undefined;
|
|
17904
18005
|
connectsTo?: string | string[] | undefined;
|
|
17905
18006
|
portHints?: (string | number)[] | undefined;
|
|
18007
|
+
holeOffsetX?: string | number | undefined;
|
|
18008
|
+
holeOffsetY?: string | number | undefined;
|
|
17906
18009
|
rectBorderRadius?: string | number | undefined;
|
|
17907
18010
|
holeShape?: "circle" | undefined;
|
|
17908
18011
|
padShape?: "rect" | undefined;
|
|
17909
|
-
pcbHoleOffsetX?: string | number | undefined;
|
|
17910
|
-
pcbHoleOffsetY?: string | number | undefined;
|
|
17911
18012
|
}>, zod.ZodObject<Omit<{
|
|
17912
18013
|
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17913
18014
|
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -17941,6 +18042,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17941
18042
|
rectPadWidth: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17942
18043
|
rectPadHeight: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
17943
18044
|
portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
|
|
18045
|
+
holeOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
18046
|
+
holeOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
17944
18047
|
}, "strip", zod.ZodTypeAny, {
|
|
17945
18048
|
shape: "pill_hole_with_rect_pad";
|
|
17946
18049
|
holeWidth: number;
|
|
@@ -17963,6 +18066,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17963
18066
|
name?: string | undefined;
|
|
17964
18067
|
connectsTo?: string | string[] | undefined;
|
|
17965
18068
|
portHints?: (string | number)[] | undefined;
|
|
18069
|
+
holeOffsetX?: number | undefined;
|
|
18070
|
+
holeOffsetY?: number | undefined;
|
|
17966
18071
|
}, {
|
|
17967
18072
|
shape: "pill_hole_with_rect_pad";
|
|
17968
18073
|
holeWidth: string | number;
|
|
@@ -17985,6 +18090,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
17985
18090
|
name?: string | undefined;
|
|
17986
18091
|
connectsTo?: string | string[] | undefined;
|
|
17987
18092
|
portHints?: (string | number)[] | undefined;
|
|
18093
|
+
holeOffsetX?: string | number | undefined;
|
|
18094
|
+
holeOffsetY?: string | number | undefined;
|
|
17988
18095
|
}>]>, {
|
|
17989
18096
|
shape: "circle";
|
|
17990
18097
|
holeDiameter: number;
|
|
@@ -18050,6 +18157,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
18050
18157
|
innerWidth?: number | undefined;
|
|
18051
18158
|
innerHeight?: number | undefined;
|
|
18052
18159
|
rectPad?: boolean | undefined;
|
|
18160
|
+
holeOffsetX?: number | undefined;
|
|
18161
|
+
holeOffsetY?: number | undefined;
|
|
18053
18162
|
} | {
|
|
18054
18163
|
shape: "circular_hole_with_rect_pad";
|
|
18055
18164
|
holeDiameter: number;
|
|
@@ -18069,11 +18178,11 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
18069
18178
|
name?: string | undefined;
|
|
18070
18179
|
connectsTo?: string | string[] | undefined;
|
|
18071
18180
|
portHints?: (string | number)[] | undefined;
|
|
18181
|
+
holeOffsetX?: number | undefined;
|
|
18182
|
+
holeOffsetY?: number | undefined;
|
|
18072
18183
|
rectBorderRadius?: number | undefined;
|
|
18073
18184
|
holeShape?: "circle" | undefined;
|
|
18074
18185
|
padShape?: "rect" | undefined;
|
|
18075
|
-
pcbHoleOffsetX?: number | undefined;
|
|
18076
|
-
pcbHoleOffsetY?: number | undefined;
|
|
18077
18186
|
} | {
|
|
18078
18187
|
shape: "pill_hole_with_rect_pad";
|
|
18079
18188
|
holeWidth: number;
|
|
@@ -18096,6 +18205,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
18096
18205
|
name?: string | undefined;
|
|
18097
18206
|
connectsTo?: string | string[] | undefined;
|
|
18098
18207
|
portHints?: (string | number)[] | undefined;
|
|
18208
|
+
holeOffsetX?: number | undefined;
|
|
18209
|
+
holeOffsetY?: number | undefined;
|
|
18099
18210
|
}, {
|
|
18100
18211
|
shape: "circle";
|
|
18101
18212
|
holeDiameter: string | number;
|
|
@@ -18161,6 +18272,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
18161
18272
|
innerWidth?: string | number | undefined;
|
|
18162
18273
|
innerHeight?: string | number | undefined;
|
|
18163
18274
|
rectPad?: boolean | undefined;
|
|
18275
|
+
holeOffsetX?: string | number | undefined;
|
|
18276
|
+
holeOffsetY?: string | number | undefined;
|
|
18164
18277
|
} | {
|
|
18165
18278
|
shape: "circular_hole_with_rect_pad";
|
|
18166
18279
|
holeDiameter: string | number;
|
|
@@ -18180,11 +18293,11 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
18180
18293
|
name?: string | undefined;
|
|
18181
18294
|
connectsTo?: string | string[] | undefined;
|
|
18182
18295
|
portHints?: (string | number)[] | undefined;
|
|
18296
|
+
holeOffsetX?: string | number | undefined;
|
|
18297
|
+
holeOffsetY?: string | number | undefined;
|
|
18183
18298
|
rectBorderRadius?: string | number | undefined;
|
|
18184
18299
|
holeShape?: "circle" | undefined;
|
|
18185
18300
|
padShape?: "rect" | undefined;
|
|
18186
|
-
pcbHoleOffsetX?: string | number | undefined;
|
|
18187
|
-
pcbHoleOffsetY?: string | number | undefined;
|
|
18188
18301
|
} | {
|
|
18189
18302
|
shape: "pill_hole_with_rect_pad";
|
|
18190
18303
|
holeWidth: string | number;
|
|
@@ -18207,6 +18320,8 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
18207
18320
|
name?: string | undefined;
|
|
18208
18321
|
connectsTo?: string | string[] | undefined;
|
|
18209
18322
|
portHints?: (string | number)[] | undefined;
|
|
18323
|
+
holeOffsetX?: string | number | undefined;
|
|
18324
|
+
holeOffsetY?: string | number | undefined;
|
|
18210
18325
|
}>;
|
|
18211
18326
|
};
|
|
18212
18327
|
getAvailablePcbLayers(): string[];
|
|
@@ -18555,7 +18670,7 @@ declare class SilkscreenText extends PrimitiveComponent<typeof silkscreenTextPro
|
|
|
18555
18670
|
}>, "many">>;
|
|
18556
18671
|
}, "strip", zod.ZodTypeAny, {
|
|
18557
18672
|
text: string;
|
|
18558
|
-
anchorAlignment: "
|
|
18673
|
+
anchorAlignment: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right";
|
|
18559
18674
|
pcbX?: number | undefined;
|
|
18560
18675
|
pcbY?: number | undefined;
|
|
18561
18676
|
pcbRotation?: number | undefined;
|
|
@@ -18598,7 +18713,7 @@ declare class SilkscreenText extends PrimitiveComponent<typeof silkscreenTextPro
|
|
|
18598
18713
|
layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
18599
18714
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
18600
18715
|
})[] | undefined;
|
|
18601
|
-
anchorAlignment?: "
|
|
18716
|
+
anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
18602
18717
|
font?: "tscircuit2024" | undefined;
|
|
18603
18718
|
fontSize?: string | number | undefined;
|
|
18604
18719
|
isKnockout?: boolean | undefined;
|
|
@@ -32030,7 +32145,7 @@ declare class SchematicText extends PrimitiveComponent<typeof schematicTextProps
|
|
|
32030
32145
|
color: zod.ZodDefault<zod.ZodString>;
|
|
32031
32146
|
schRotation: zod.ZodDefault<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
32032
32147
|
}, "strip", zod.ZodTypeAny, {
|
|
32033
|
-
anchor: "left" | "right" | "top" | "bottom" | "
|
|
32148
|
+
anchor: "left" | "right" | "top" | "bottom" | "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right";
|
|
32034
32149
|
schRotation: number;
|
|
32035
32150
|
color: string;
|
|
32036
32151
|
text: string;
|
|
@@ -32039,7 +32154,7 @@ declare class SchematicText extends PrimitiveComponent<typeof schematicTextProps
|
|
|
32039
32154
|
schY?: number | undefined;
|
|
32040
32155
|
}, {
|
|
32041
32156
|
text: string;
|
|
32042
|
-
anchor?: "left" | "right" | "top" | "bottom" | "
|
|
32157
|
+
anchor?: "left" | "right" | "top" | "bottom" | "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32043
32158
|
schX?: string | number | undefined;
|
|
32044
32159
|
schY?: string | number | undefined;
|
|
32045
32160
|
schRotation?: string | number | undefined;
|
|
@@ -32072,7 +32187,7 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32072
32187
|
titleInside: zod.ZodDefault<zod.ZodBoolean>;
|
|
32073
32188
|
strokeStyle: zod.ZodDefault<zod.ZodEnum<["solid", "dashed"]>>;
|
|
32074
32189
|
}, "strip", zod.ZodTypeAny, {
|
|
32075
|
-
titleAlignment: "
|
|
32190
|
+
titleAlignment: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right";
|
|
32076
32191
|
titleInside: boolean;
|
|
32077
32192
|
strokeStyle: "dashed" | "solid";
|
|
32078
32193
|
schX?: number | undefined;
|
|
@@ -32100,13 +32215,13 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32100
32215
|
height?: string | number | undefined;
|
|
32101
32216
|
overlay?: string[] | undefined;
|
|
32102
32217
|
title?: string | undefined;
|
|
32103
|
-
titleAlignment?: "
|
|
32218
|
+
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32104
32219
|
titleColor?: string | undefined;
|
|
32105
32220
|
titleFontSize?: string | number | undefined;
|
|
32106
32221
|
titleInside?: boolean | undefined;
|
|
32107
32222
|
strokeStyle?: "dashed" | "solid" | undefined;
|
|
32108
32223
|
}>, {
|
|
32109
|
-
titleAlignment: "
|
|
32224
|
+
titleAlignment: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right";
|
|
32110
32225
|
titleInside: boolean;
|
|
32111
32226
|
strokeStyle: "dashed" | "solid";
|
|
32112
32227
|
schX?: number | undefined;
|
|
@@ -32134,13 +32249,13 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32134
32249
|
height?: string | number | undefined;
|
|
32135
32250
|
overlay?: string[] | undefined;
|
|
32136
32251
|
title?: string | undefined;
|
|
32137
|
-
titleAlignment?: "
|
|
32252
|
+
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32138
32253
|
titleColor?: string | undefined;
|
|
32139
32254
|
titleFontSize?: string | number | undefined;
|
|
32140
32255
|
titleInside?: boolean | undefined;
|
|
32141
32256
|
strokeStyle?: "dashed" | "solid" | undefined;
|
|
32142
32257
|
}>, {
|
|
32143
|
-
titleAlignment: "
|
|
32258
|
+
titleAlignment: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right";
|
|
32144
32259
|
titleInside: boolean;
|
|
32145
32260
|
strokeStyle: "dashed" | "solid";
|
|
32146
32261
|
schX?: number | undefined;
|
|
@@ -32168,7 +32283,7 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32168
32283
|
height?: string | number | undefined;
|
|
32169
32284
|
overlay?: string[] | undefined;
|
|
32170
32285
|
title?: string | undefined;
|
|
32171
|
-
titleAlignment?: "
|
|
32286
|
+
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32172
32287
|
titleColor?: string | undefined;
|
|
32173
32288
|
titleFontSize?: string | number | undefined;
|
|
32174
32289
|
titleInside?: boolean | undefined;
|
|
@@ -32193,7 +32308,7 @@ declare class SchematicTable extends PrimitiveComponent<typeof schematicTablePro
|
|
|
32193
32308
|
anchor: zod.ZodOptional<zod.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
|
|
32194
32309
|
fontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
32195
32310
|
}, "strip", zod.ZodTypeAny, {
|
|
32196
|
-
anchor?: "
|
|
32311
|
+
anchor?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32197
32312
|
schX?: number | undefined;
|
|
32198
32313
|
schY?: number | undefined;
|
|
32199
32314
|
children?: any;
|
|
@@ -32201,7 +32316,7 @@ declare class SchematicTable extends PrimitiveComponent<typeof schematicTablePro
|
|
|
32201
32316
|
cellPadding?: number | undefined;
|
|
32202
32317
|
borderWidth?: number | undefined;
|
|
32203
32318
|
}, {
|
|
32204
|
-
anchor?: "
|
|
32319
|
+
anchor?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32205
32320
|
schX?: string | number | undefined;
|
|
32206
32321
|
schY?: string | number | undefined;
|
|
32207
32322
|
children?: any;
|
package/dist/index.js
CHANGED
|
@@ -2386,7 +2386,9 @@ var PlatedHole = class extends PrimitiveComponent2 {
|
|
|
2386
2386
|
hole_ccw_rotation: props.pcbRotation ?? 0,
|
|
2387
2387
|
rect_ccw_rotation: props.pcbRotation ?? 0,
|
|
2388
2388
|
rect_pad_width: props.outerWidth,
|
|
2389
|
-
rect_pad_height: props.outerHeight
|
|
2389
|
+
rect_pad_height: props.outerHeight,
|
|
2390
|
+
hole_offset_x: props.holeOffsetX,
|
|
2391
|
+
hole_offset_y: props.holeOffsetY
|
|
2390
2392
|
});
|
|
2391
2393
|
this.pcb_plated_hole_id = pcb_plated_hole.pcb_plated_hole_id;
|
|
2392
2394
|
} else if (props.shape === "pill" || props.shape === "oval") {
|
|
@@ -2444,8 +2446,8 @@ var PlatedHole = class extends PrimitiveComponent2 {
|
|
|
2444
2446
|
layers: ["top", "bottom"],
|
|
2445
2447
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
2446
2448
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0,
|
|
2447
|
-
hole_offset_x: props.
|
|
2448
|
-
hole_offset_y: props.
|
|
2449
|
+
hole_offset_x: props.holeOffsetX,
|
|
2450
|
+
hole_offset_y: props.holeOffsetY,
|
|
2449
2451
|
rect_border_radius: props.rectBorderRadius ?? 0
|
|
2450
2452
|
});
|
|
2451
2453
|
this.pcb_plated_hole_id = pcb_plated_hole.pcb_plated_hole_id;
|
|
@@ -2457,6 +2459,8 @@ var PlatedHole = class extends PrimitiveComponent2 {
|
|
|
2457
2459
|
hole_height: props.holeHeight,
|
|
2458
2460
|
rect_pad_width: props.rectPadWidth,
|
|
2459
2461
|
rect_pad_height: props.rectPadHeight,
|
|
2462
|
+
hole_offset_x: props.holeOffsetX,
|
|
2463
|
+
hole_offset_y: props.holeOffsetY,
|
|
2460
2464
|
shape: "pill_hole_with_rect_pad",
|
|
2461
2465
|
port_hints: this.getNameAndAliases(),
|
|
2462
2466
|
x: position.x,
|
|
@@ -2546,7 +2550,11 @@ var Hole = class extends PrimitiveComponent2 {
|
|
|
2546
2550
|
}
|
|
2547
2551
|
getPcbSize() {
|
|
2548
2552
|
const { _parsedProps: props } = this;
|
|
2549
|
-
|
|
2553
|
+
const isPill = props.shape === "pill";
|
|
2554
|
+
return {
|
|
2555
|
+
width: isPill ? props.width : props.diameter,
|
|
2556
|
+
height: isPill ? props.height : props.diameter
|
|
2557
|
+
};
|
|
2550
2558
|
}
|
|
2551
2559
|
doInitialPcbPrimitiveRender() {
|
|
2552
2560
|
if (this.root?.pcbDisabled) return;
|
|
@@ -2892,9 +2900,9 @@ var createComponentsFromCircuitJson = ({
|
|
|
2892
2900
|
rectPadHeight: elm.rect_pad_height,
|
|
2893
2901
|
rectPadWidth: elm.rect_pad_width,
|
|
2894
2902
|
portHints: elm.port_hints,
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2903
|
+
rectBorderRadius: elm.rect_border_radius,
|
|
2904
|
+
holeOffsetX: elm.hole_offset_x,
|
|
2905
|
+
holeOffsetY: elm.hole_offset_y
|
|
2898
2906
|
})
|
|
2899
2907
|
);
|
|
2900
2908
|
} else if (elm.shape === "pill" || elm.shape === "oval") {
|
|
@@ -2910,6 +2918,23 @@ var createComponentsFromCircuitJson = ({
|
|
|
2910
2918
|
portHints: elm.port_hints
|
|
2911
2919
|
})
|
|
2912
2920
|
);
|
|
2921
|
+
} else if (elm.shape === "pill_hole_with_rect_pad") {
|
|
2922
|
+
components.push(
|
|
2923
|
+
new PlatedHole({
|
|
2924
|
+
pcbX: elm.x,
|
|
2925
|
+
pcbY: elm.y,
|
|
2926
|
+
shape: "pill_hole_with_rect_pad",
|
|
2927
|
+
holeShape: "pill",
|
|
2928
|
+
padShape: "rect",
|
|
2929
|
+
holeWidth: elm.hole_width,
|
|
2930
|
+
holeHeight: elm.hole_height,
|
|
2931
|
+
rectPadWidth: elm.rect_pad_width,
|
|
2932
|
+
rectPadHeight: elm.rect_pad_height,
|
|
2933
|
+
portHints: elm.port_hints,
|
|
2934
|
+
holeOffsetX: elm.hole_offset_x,
|
|
2935
|
+
holeOffsetY: elm.hole_offset_y
|
|
2936
|
+
})
|
|
2937
|
+
);
|
|
2913
2938
|
}
|
|
2914
2939
|
} else if (elm.type === "pcb_keepout" && elm.shape === "circle") {
|
|
2915
2940
|
components.push(
|
|
@@ -6779,7 +6804,10 @@ var parseLibraryFootprintRef = (s) => {
|
|
|
6779
6804
|
};
|
|
6780
6805
|
|
|
6781
6806
|
// lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbFootprintStringRender.ts
|
|
6782
|
-
import {
|
|
6807
|
+
import {
|
|
6808
|
+
circuit_json_footprint_load_error,
|
|
6809
|
+
external_footprint_load_error
|
|
6810
|
+
} from "circuit-json";
|
|
6783
6811
|
function NormalComponent_doInitialPcbFootprintStringRender(component, queueAsyncEffect) {
|
|
6784
6812
|
let { footprint } = component.props;
|
|
6785
6813
|
footprint ??= component._getImpliedFootprintString?.();
|
|
@@ -6895,6 +6923,38 @@ function NormalComponent_doInitialPcbFootprintStringRender(component, queueAsync
|
|
|
6895
6923
|
if (!isReactElement(footprint) && footprint.componentName === "Footprint") {
|
|
6896
6924
|
component.add(footprint);
|
|
6897
6925
|
}
|
|
6926
|
+
if (Array.isArray(footprint) && !isReactElement(footprint) && footprint.length > 0) {
|
|
6927
|
+
try {
|
|
6928
|
+
const fpComponents = createComponentsFromCircuitJson(
|
|
6929
|
+
{
|
|
6930
|
+
componentName: component.name,
|
|
6931
|
+
componentRotation: pcbRotation,
|
|
6932
|
+
footprint: "",
|
|
6933
|
+
pinLabels,
|
|
6934
|
+
pcbPinLabels
|
|
6935
|
+
},
|
|
6936
|
+
footprint
|
|
6937
|
+
);
|
|
6938
|
+
component.addAll(fpComponents);
|
|
6939
|
+
} catch (err) {
|
|
6940
|
+
const db = component.root?.db;
|
|
6941
|
+
if (db && component.source_component_id && component.pcb_component_id) {
|
|
6942
|
+
const subcircuit = component.getSubcircuit();
|
|
6943
|
+
const errorMsg = `${component.getString()} failed to load json footprint: ` + (err instanceof Error ? err.message : String(err));
|
|
6944
|
+
const errorObj = circuit_json_footprint_load_error.parse({
|
|
6945
|
+
type: "circuit_json_footprint_load_error",
|
|
6946
|
+
message: errorMsg,
|
|
6947
|
+
pcb_component_id: component.pcb_component_id,
|
|
6948
|
+
source_component_id: component.source_component_id,
|
|
6949
|
+
subcircuit_id: subcircuit.subcircuit_id ?? void 0,
|
|
6950
|
+
pcb_group_id: component.getGroup()?.pcb_group_id ?? void 0
|
|
6951
|
+
});
|
|
6952
|
+
db.circuit_json_footprint_load_error.insert(errorObj);
|
|
6953
|
+
}
|
|
6954
|
+
throw err;
|
|
6955
|
+
}
|
|
6956
|
+
return;
|
|
6957
|
+
}
|
|
6898
6958
|
}
|
|
6899
6959
|
|
|
6900
6960
|
// lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbComponentAnchorAlignment.ts
|
|
@@ -15300,7 +15360,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
15300
15360
|
var package_default = {
|
|
15301
15361
|
name: "@tscircuit/core",
|
|
15302
15362
|
type: "module",
|
|
15303
|
-
version: "0.0.
|
|
15363
|
+
version: "0.0.734",
|
|
15304
15364
|
types: "dist/index.d.ts",
|
|
15305
15365
|
main: "dist/index.js",
|
|
15306
15366
|
module: "dist/index.js",
|
|
@@ -15339,7 +15399,7 @@ var package_default = {
|
|
|
15339
15399
|
"@tscircuit/matchpack": "^0.0.16",
|
|
15340
15400
|
"@tscircuit/math-utils": "^0.0.21",
|
|
15341
15401
|
"@tscircuit/miniflex": "^0.0.4",
|
|
15342
|
-
"@tscircuit/props": "0.0.
|
|
15402
|
+
"@tscircuit/props": "0.0.334",
|
|
15343
15403
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
15344
15404
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
15345
15405
|
"@tscircuit/schematic-trace-solver": "^0.0.37",
|
|
@@ -15353,11 +15413,11 @@ var package_default = {
|
|
|
15353
15413
|
"bun-match-svg": "0.0.12",
|
|
15354
15414
|
"calculate-elbow": "^0.0.12",
|
|
15355
15415
|
"chokidar-cli": "^3.0.0",
|
|
15356
|
-
"circuit-json": "^0.0.
|
|
15416
|
+
"circuit-json": "^0.0.260",
|
|
15357
15417
|
"circuit-json-to-bpc": "^0.0.13",
|
|
15358
15418
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
15359
15419
|
"circuit-json-to-simple-3d": "^0.0.8",
|
|
15360
|
-
"circuit-to-svg": "^0.0.
|
|
15420
|
+
"circuit-to-svg": "^0.0.194",
|
|
15361
15421
|
concurrently: "^9.1.2",
|
|
15362
15422
|
"connectivity-map": "^1.0.0",
|
|
15363
15423
|
debug: "^4.3.6",
|
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.735",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@tscircuit/matchpack": "^0.0.16",
|
|
41
41
|
"@tscircuit/math-utils": "^0.0.21",
|
|
42
42
|
"@tscircuit/miniflex": "^0.0.4",
|
|
43
|
-
"@tscircuit/props": "0.0.
|
|
43
|
+
"@tscircuit/props": "0.0.334",
|
|
44
44
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
45
45
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
46
46
|
"@tscircuit/schematic-trace-solver": "^0.0.37",
|
|
@@ -54,11 +54,11 @@
|
|
|
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.260",
|
|
58
58
|
"circuit-json-to-bpc": "^0.0.13",
|
|
59
59
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
60
60
|
"circuit-json-to-simple-3d": "^0.0.8",
|
|
61
|
-
"circuit-to-svg": "^0.0.
|
|
61
|
+
"circuit-to-svg": "^0.0.194",
|
|
62
62
|
"concurrently": "^9.1.2",
|
|
63
63
|
"connectivity-map": "^1.0.0",
|
|
64
64
|
"debug": "^4.3.6",
|