@tscircuit/core 0.0.301 → 0.0.302
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 +15 -7
- package/dist/index.js +15 -6
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -473,7 +473,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
473
473
|
} | undefined;
|
|
474
474
|
}>, "many">>;
|
|
475
475
|
schDisplayLabel: z.ZodOptional<z.ZodString>;
|
|
476
|
-
maxLength: z.ZodOptional<z.ZodNumber
|
|
476
|
+
maxLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
477
477
|
}, {
|
|
478
478
|
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<{
|
|
479
479
|
getPortSelector: () => string;
|
|
@@ -519,7 +519,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
519
519
|
} | undefined;
|
|
520
520
|
}[] | undefined;
|
|
521
521
|
schDisplayLabel?: string | undefined;
|
|
522
|
-
maxLength?: number | undefined;
|
|
522
|
+
maxLength?: string | number | undefined;
|
|
523
523
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
524
524
|
key: z.ZodOptional<z.ZodString>;
|
|
525
525
|
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -563,7 +563,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
563
563
|
} | undefined;
|
|
564
564
|
}>, "many">>;
|
|
565
565
|
schDisplayLabel: z.ZodOptional<z.ZodString>;
|
|
566
|
-
maxLength: z.ZodOptional<z.ZodNumber
|
|
566
|
+
maxLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
567
567
|
}, {
|
|
568
568
|
from: z.ZodUnion<[z.ZodString, z.ZodType<{
|
|
569
569
|
getPortSelector: () => string;
|
|
@@ -620,7 +620,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
620
620
|
} | undefined;
|
|
621
621
|
}[] | undefined;
|
|
622
622
|
schDisplayLabel?: string | undefined;
|
|
623
|
-
maxLength?: number | undefined;
|
|
623
|
+
maxLength?: string | number | undefined;
|
|
624
624
|
}>]>;
|
|
625
625
|
componentName: string;
|
|
626
626
|
};
|
|
@@ -1188,16 +1188,19 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1188
1188
|
serverUrl: z.ZodOptional<z.ZodString>;
|
|
1189
1189
|
inputFormat: z.ZodOptional<z.ZodEnum<["simplified", "circuit-json"]>>;
|
|
1190
1190
|
serverMode: z.ZodOptional<z.ZodEnum<["job", "solve-endpoint"]>>;
|
|
1191
|
+
serverCacheEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
1191
1192
|
cache: z.ZodOptional<z.ZodType<_tscircuit_props.PcbRouteCache, z.ZodTypeDef, _tscircuit_props.PcbRouteCache>>;
|
|
1192
1193
|
}, "strip", z.ZodTypeAny, {
|
|
1193
1194
|
serverUrl?: string | undefined;
|
|
1194
1195
|
inputFormat?: "simplified" | "circuit-json" | undefined;
|
|
1195
1196
|
serverMode?: "job" | "solve-endpoint" | undefined;
|
|
1197
|
+
serverCacheEnabled?: boolean | undefined;
|
|
1196
1198
|
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1197
1199
|
}, {
|
|
1198
1200
|
serverUrl?: string | undefined;
|
|
1199
1201
|
inputFormat?: "simplified" | "circuit-json" | undefined;
|
|
1200
1202
|
serverMode?: "job" | "solve-endpoint" | undefined;
|
|
1203
|
+
serverCacheEnabled?: boolean | undefined;
|
|
1201
1204
|
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1202
1205
|
}>, z.ZodLiteral<"sequential-trace">, z.ZodLiteral<"subcircuit">, z.ZodLiteral<"auto">, z.ZodLiteral<"auto-local">, z.ZodLiteral<"auto-cloud">]>>;
|
|
1203
1206
|
}>, {
|
|
@@ -1264,6 +1267,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1264
1267
|
serverUrl?: string | undefined;
|
|
1265
1268
|
inputFormat?: "simplified" | "circuit-json" | undefined;
|
|
1266
1269
|
serverMode?: "job" | "solve-endpoint" | undefined;
|
|
1270
|
+
serverCacheEnabled?: boolean | undefined;
|
|
1267
1271
|
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1268
1272
|
} | undefined;
|
|
1269
1273
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
@@ -1330,6 +1334,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1330
1334
|
serverUrl?: string | undefined;
|
|
1331
1335
|
inputFormat?: "simplified" | "circuit-json" | undefined;
|
|
1332
1336
|
serverMode?: "job" | "solve-endpoint" | undefined;
|
|
1337
|
+
serverCacheEnabled?: boolean | undefined;
|
|
1333
1338
|
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1334
1339
|
} | undefined;
|
|
1335
1340
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
@@ -6828,6 +6833,7 @@ declare class PinHeader extends NormalComponent<typeof pinHeaderProps> {
|
|
|
6828
6833
|
}>, {
|
|
6829
6834
|
pinCount: zod.ZodNumber;
|
|
6830
6835
|
pitch: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
6836
|
+
schFacingDirection: zod.ZodOptional<zod.ZodEnum<["up", "down", "left", "right"]>>;
|
|
6831
6837
|
gender: zod.ZodDefault<zod.ZodOptional<zod.ZodEnum<["male", "female"]>>>;
|
|
6832
6838
|
showSilkscreenPinLabels: zod.ZodOptional<zod.ZodBoolean>;
|
|
6833
6839
|
doubleRow: zod.ZodOptional<zod.ZodBoolean>;
|
|
@@ -6907,6 +6913,7 @@ declare class PinHeader extends NormalComponent<typeof pinHeaderProps> {
|
|
|
6907
6913
|
pinLabels?: string[] | undefined;
|
|
6908
6914
|
holeDiameter?: number | undefined;
|
|
6909
6915
|
pitch?: number | undefined;
|
|
6916
|
+
schFacingDirection?: "up" | "down" | "left" | "right" | undefined;
|
|
6910
6917
|
showSilkscreenPinLabels?: boolean | undefined;
|
|
6911
6918
|
doubleRow?: boolean | undefined;
|
|
6912
6919
|
platedDiameter?: number | undefined;
|
|
@@ -6984,6 +6991,7 @@ declare class PinHeader extends NormalComponent<typeof pinHeaderProps> {
|
|
|
6984
6991
|
pinLabels?: string[] | undefined;
|
|
6985
6992
|
holeDiameter?: string | number | undefined;
|
|
6986
6993
|
pitch?: string | number | undefined;
|
|
6994
|
+
schFacingDirection?: "up" | "down" | "left" | "right" | undefined;
|
|
6987
6995
|
gender?: "male" | "female" | undefined;
|
|
6988
6996
|
showSilkscreenPinLabels?: boolean | undefined;
|
|
6989
6997
|
doubleRow?: boolean | undefined;
|
|
@@ -9308,10 +9316,10 @@ declare class Transistor extends NormalComponent<typeof transistorProps> {
|
|
|
9308
9316
|
children: zod.ZodOptional<zod.ZodAny>;
|
|
9309
9317
|
symbolName: zod.ZodOptional<zod.ZodString>;
|
|
9310
9318
|
}>, {
|
|
9311
|
-
|
|
9319
|
+
type: zod.ZodEnum<["npn", "pnp", "bjt", "jfet", "mosfet"]>;
|
|
9312
9320
|
}>, "strip", zod.ZodTypeAny, {
|
|
9321
|
+
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet";
|
|
9313
9322
|
name: string;
|
|
9314
|
-
transistorType: "npn" | "pnp";
|
|
9315
9323
|
pcbX?: number | undefined;
|
|
9316
9324
|
pcbY?: number | undefined;
|
|
9317
9325
|
pcbRotation?: number | undefined;
|
|
@@ -9378,8 +9386,8 @@ declare class Transistor extends NormalComponent<typeof transistorProps> {
|
|
|
9378
9386
|
children?: any;
|
|
9379
9387
|
symbolName?: string | undefined;
|
|
9380
9388
|
}, {
|
|
9389
|
+
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet";
|
|
9381
9390
|
name: string;
|
|
9382
|
-
transistorType: "npn" | "pnp";
|
|
9383
9391
|
pcbX?: string | number | undefined;
|
|
9384
9392
|
pcbY?: string | number | undefined;
|
|
9385
9393
|
pcbRotation?: string | number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -3564,7 +3564,9 @@ import { boardProps } from "@tscircuit/props";
|
|
|
3564
3564
|
import { identity as identity3 } from "transformation-matrix";
|
|
3565
3565
|
|
|
3566
3566
|
// lib/components/primitive-components/Group/Group.ts
|
|
3567
|
-
import {
|
|
3567
|
+
import {
|
|
3568
|
+
groupProps
|
|
3569
|
+
} from "@tscircuit/props";
|
|
3568
3570
|
import * as SAL from "@tscircuit/schematic-autolayout";
|
|
3569
3571
|
import "circuit-json";
|
|
3570
3572
|
import { ConnectivityMap } from "circuit-json-to-connectivity-map";
|
|
@@ -3812,8 +3814,14 @@ var Group = class extends NormalComponent {
|
|
|
3812
3814
|
async _runEffectMakeHttpAutoroutingRequest() {
|
|
3813
3815
|
const debug4 = Debug5("tscircuit:core:_runEffectMakeHttpAutoroutingRequest");
|
|
3814
3816
|
const props = this._parsedProps;
|
|
3815
|
-
const
|
|
3816
|
-
|
|
3817
|
+
const autoroutingOptions = {
|
|
3818
|
+
serverUrl: "https://registry-api.tscircuit.com",
|
|
3819
|
+
serverMode: "job",
|
|
3820
|
+
serverCacheEnabled: props.autorouter?.serverCachingEnabled ?? false,
|
|
3821
|
+
...typeof props.autorouter === "object" ? props.autorouter : {}
|
|
3822
|
+
};
|
|
3823
|
+
const serverUrl = autoroutingOptions.serverUrl;
|
|
3824
|
+
const serverMode = autoroutingOptions.serverMode;
|
|
3817
3825
|
const fetchWithDebug = (url, options) => {
|
|
3818
3826
|
debug4("fetching", url);
|
|
3819
3827
|
return fetch(url, options);
|
|
@@ -3864,7 +3872,8 @@ var Group = class extends NormalComponent {
|
|
|
3864
3872
|
provider: "freerouting",
|
|
3865
3873
|
autostart: true,
|
|
3866
3874
|
display_name: this.root?.name,
|
|
3867
|
-
subcircuit_id: this.subcircuit_id
|
|
3875
|
+
subcircuit_id: this.subcircuit_id,
|
|
3876
|
+
server_cache_enabled: autoroutingOptions.serverCacheEnabled
|
|
3868
3877
|
}),
|
|
3869
3878
|
headers: { "Content-Type": "application/json" }
|
|
3870
3879
|
}
|
|
@@ -6484,7 +6493,7 @@ var Crystal = class extends NormalComponent {
|
|
|
6484
6493
|
import { transistorProps } from "@tscircuit/props";
|
|
6485
6494
|
var Transistor = class extends NormalComponent {
|
|
6486
6495
|
get config() {
|
|
6487
|
-
const baseSymbolName = this.props.
|
|
6496
|
+
const baseSymbolName = this.props.type === "npn" ? "npn_bipolar_transistor" : "pnp_bipolar_transistor";
|
|
6488
6497
|
return {
|
|
6489
6498
|
componentName: "Transistor",
|
|
6490
6499
|
schematicSymbolName: baseSymbolName,
|
|
@@ -6498,7 +6507,7 @@ var Transistor = class extends NormalComponent {
|
|
|
6498
6507
|
const source_component = db.source_component.insert({
|
|
6499
6508
|
ftype: "simple_transistor",
|
|
6500
6509
|
name: props.name,
|
|
6501
|
-
transistor_type: props.
|
|
6510
|
+
transistor_type: props.type
|
|
6502
6511
|
});
|
|
6503
6512
|
this.source_component_id = source_component.source_component_id;
|
|
6504
6513
|
}
|
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.302",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@tscircuit/footprinter": "^0.0.97",
|
|
55
55
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
56
56
|
"@tscircuit/math-utils": "^0.0.9",
|
|
57
|
-
"@tscircuit/props": "^0.0.
|
|
57
|
+
"@tscircuit/props": "^0.0.142",
|
|
58
58
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
59
59
|
"@tscircuit/soup-util": "^0.0.41",
|
|
60
60
|
"circuit-json": "^0.0.135",
|