@tscircuit/core 0.0.685 → 0.0.687
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 +6 -0
- package/dist/index.js +25 -8
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1787,6 +1787,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1787
1787
|
} & {
|
|
1788
1788
|
material: zod.ZodDefault<zod.ZodEnum<["fr4", "fr1"]>>;
|
|
1789
1789
|
layers: zod.ZodDefault<zod.ZodUnion<[zod.ZodLiteral<2>, zod.ZodLiteral<4>]>>;
|
|
1790
|
+
borderRadius: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1790
1791
|
}, "strip", zod.ZodTypeAny, {
|
|
1791
1792
|
material: "fr4" | "fr1";
|
|
1792
1793
|
layers: 2 | 4;
|
|
@@ -2023,6 +2024,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2023
2024
|
}[] | undefined;
|
|
2024
2025
|
outlineOffsetX?: number | undefined;
|
|
2025
2026
|
outlineOffsetY?: number | undefined;
|
|
2027
|
+
borderRadius?: number | undefined;
|
|
2026
2028
|
}, {
|
|
2027
2029
|
pcbX?: string | number | undefined;
|
|
2028
2030
|
pcbY?: string | number | undefined;
|
|
@@ -2263,6 +2265,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2263
2265
|
outlineOffsetY?: string | number | undefined;
|
|
2264
2266
|
material?: "fr4" | "fr1" | undefined;
|
|
2265
2267
|
layers?: 2 | 4 | undefined;
|
|
2268
|
+
borderRadius?: string | number | undefined;
|
|
2266
2269
|
}>;
|
|
2267
2270
|
};
|
|
2268
2271
|
get boardThickness(): number;
|
|
@@ -14143,6 +14146,7 @@ declare class Inductor extends NormalComponent<typeof inductorProps, PassivePort
|
|
|
14143
14146
|
inductance: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
14144
14147
|
maxCurrentRating: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
|
|
14145
14148
|
schOrientation: zod.ZodOptional<zod.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
14149
|
+
connections: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["pin1", "left", "pin2", "right"]>, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>;
|
|
14146
14150
|
}, "strip", zod.ZodTypeAny, {
|
|
14147
14151
|
name: string;
|
|
14148
14152
|
inductance: number;
|
|
@@ -14224,6 +14228,7 @@ declare class Inductor extends NormalComponent<typeof inductorProps, PassivePort
|
|
|
14224
14228
|
children?: any;
|
|
14225
14229
|
symbolName?: string | undefined;
|
|
14226
14230
|
doNotPlace?: boolean | undefined;
|
|
14231
|
+
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2", string | readonly string[] | string[]>> | undefined;
|
|
14227
14232
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
14228
14233
|
maxCurrentRating?: string | number | undefined;
|
|
14229
14234
|
}, {
|
|
@@ -14309,6 +14314,7 @@ declare class Inductor extends NormalComponent<typeof inductorProps, PassivePort
|
|
|
14309
14314
|
children?: any;
|
|
14310
14315
|
symbolName?: string | undefined;
|
|
14311
14316
|
doNotPlace?: boolean | undefined;
|
|
14317
|
+
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2", string | readonly string[] | string[]>> | undefined;
|
|
14312
14318
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
14313
14319
|
maxCurrentRating?: string | number | undefined;
|
|
14314
14320
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -1548,9 +1548,15 @@ var Net = class extends PrimitiveComponent2 {
|
|
|
1548
1548
|
doInitialSourceRender() {
|
|
1549
1549
|
const { db } = this.root;
|
|
1550
1550
|
const { _parsedProps: props } = this;
|
|
1551
|
+
const isGround = props.name.startsWith("GND");
|
|
1552
|
+
const isPositiveVoltageSource = props.name.startsWith("V");
|
|
1551
1553
|
const net = db.source_net.insert({
|
|
1552
1554
|
name: props.name,
|
|
1553
|
-
member_source_group_ids: []
|
|
1555
|
+
member_source_group_ids: [],
|
|
1556
|
+
is_ground: isGround,
|
|
1557
|
+
is_power: isPositiveVoltageSource,
|
|
1558
|
+
// @ts-ignore
|
|
1559
|
+
is_positive_voltage_source: isPositiveVoltageSource
|
|
1554
1560
|
});
|
|
1555
1561
|
this.source_net_id = net.source_net_id;
|
|
1556
1562
|
}
|
|
@@ -8321,6 +8327,7 @@ function convertTreeToInputProblem(tree, db, group) {
|
|
|
8321
8327
|
pinStrongConnMap: {},
|
|
8322
8328
|
netConnMap: {},
|
|
8323
8329
|
chipGap: 0.6,
|
|
8330
|
+
decouplingCapsGap: 0.4,
|
|
8324
8331
|
partitionGap: 1.2
|
|
8325
8332
|
};
|
|
8326
8333
|
debug5(
|
|
@@ -8397,7 +8404,10 @@ function convertTreeToInputProblem(tree, db, group) {
|
|
|
8397
8404
|
`[${group.name}] Group ${groupId} has ${groupComponents.length} components:`,
|
|
8398
8405
|
groupComponents.map((c) => c.source_component_id)
|
|
8399
8406
|
);
|
|
8400
|
-
let minX = Infinity
|
|
8407
|
+
let minX = Infinity;
|
|
8408
|
+
let maxX = -Infinity;
|
|
8409
|
+
let minY = Infinity;
|
|
8410
|
+
let maxY = -Infinity;
|
|
8401
8411
|
let hasValidBounds = false;
|
|
8402
8412
|
for (const comp of groupComponents) {
|
|
8403
8413
|
if (comp.center && comp.size) {
|
|
@@ -8590,8 +8600,15 @@ function convertTreeToInputProblem(tree, db, group) {
|
|
|
8590
8600
|
}
|
|
8591
8601
|
}
|
|
8592
8602
|
if (hasNetConnections) {
|
|
8603
|
+
const source_net = db.source_net.getWhere({
|
|
8604
|
+
subcircuit_connectivity_map_key: connectivityKey
|
|
8605
|
+
});
|
|
8606
|
+
const isGround = source_net?.is_ground ?? false;
|
|
8607
|
+
const isPositiveVoltageSource = source_net?.is_power ?? false;
|
|
8593
8608
|
problem.netMap[connectivityKey] = {
|
|
8594
|
-
netId: connectivityKey
|
|
8609
|
+
netId: connectivityKey,
|
|
8610
|
+
isGround,
|
|
8611
|
+
isPositiveVoltageSource
|
|
8595
8612
|
};
|
|
8596
8613
|
for (const pinId of pins) {
|
|
8597
8614
|
problem.netConnMap[`${pinId}-${connectivityKey}`] = true;
|
|
@@ -9953,7 +9970,7 @@ function createSchematicTraceSolverInputProblem(group) {
|
|
|
9953
9970
|
directConnections,
|
|
9954
9971
|
netConnections,
|
|
9955
9972
|
availableNetLabelOrientations,
|
|
9956
|
-
maxMspPairDistance: group._parsedProps.schMaxTraceDistance ??
|
|
9973
|
+
maxMspPairDistance: group._parsedProps.schMaxTraceDistance ?? 2.4
|
|
9957
9974
|
};
|
|
9958
9975
|
return {
|
|
9959
9976
|
inputProblem,
|
|
@@ -14056,7 +14073,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
14056
14073
|
var package_default = {
|
|
14057
14074
|
name: "@tscircuit/core",
|
|
14058
14075
|
type: "module",
|
|
14059
|
-
version: "0.0.
|
|
14076
|
+
version: "0.0.686",
|
|
14060
14077
|
types: "dist/index.d.ts",
|
|
14061
14078
|
main: "dist/index.js",
|
|
14062
14079
|
module: "dist/index.js",
|
|
@@ -14092,10 +14109,10 @@ var package_default = {
|
|
|
14092
14109
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
14093
14110
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
14094
14111
|
"@tscircuit/log-soup": "^1.0.2",
|
|
14095
|
-
"@tscircuit/matchpack": "^0.0.
|
|
14112
|
+
"@tscircuit/matchpack": "^0.0.16",
|
|
14096
14113
|
"@tscircuit/math-utils": "^0.0.18",
|
|
14097
14114
|
"@tscircuit/miniflex": "^0.0.4",
|
|
14098
|
-
"@tscircuit/props": "0.0.
|
|
14115
|
+
"@tscircuit/props": "0.0.296",
|
|
14099
14116
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
14100
14117
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
14101
14118
|
"@tscircuit/schematic-trace-solver": "^0.0.25",
|
|
@@ -14109,7 +14126,7 @@ var package_default = {
|
|
|
14109
14126
|
"bun-match-svg": "0.0.12",
|
|
14110
14127
|
"calculate-elbow": "^0.0.9",
|
|
14111
14128
|
"chokidar-cli": "^3.0.0",
|
|
14112
|
-
"circuit-json": "^0.0.
|
|
14129
|
+
"circuit-json": "^0.0.241",
|
|
14113
14130
|
"circuit-json-to-bpc": "^0.0.13",
|
|
14114
14131
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
14115
14132
|
"circuit-json-to-simple-3d": "^0.0.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.687",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
38
38
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
39
39
|
"@tscircuit/log-soup": "^1.0.2",
|
|
40
|
-
"@tscircuit/matchpack": "^0.0.
|
|
40
|
+
"@tscircuit/matchpack": "^0.0.16",
|
|
41
41
|
"@tscircuit/math-utils": "^0.0.18",
|
|
42
42
|
"@tscircuit/miniflex": "^0.0.4",
|
|
43
|
-
"@tscircuit/props": "0.0.
|
|
43
|
+
"@tscircuit/props": "0.0.296",
|
|
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.25",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"bun-match-svg": "0.0.12",
|
|
55
55
|
"calculate-elbow": "^0.0.9",
|
|
56
56
|
"chokidar-cli": "^3.0.0",
|
|
57
|
-
"circuit-json": "^0.0.
|
|
57
|
+
"circuit-json": "^0.0.241",
|
|
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.6",
|