@tscircuit/core 0.0.588 → 0.0.589
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.js +23 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4100,7 +4100,7 @@ var getMaxLengthFromConnectedCapacitors = (ports, { db }) => {
|
|
|
4100
4100
|
return sourceComponent.max_decoupling_trace_length;
|
|
4101
4101
|
}
|
|
4102
4102
|
return null;
|
|
4103
|
-
}).filter((
|
|
4103
|
+
}).filter((length4) => length4 !== null);
|
|
4104
4104
|
if (capacitorMaxLengths.length === 0) return void 0;
|
|
4105
4105
|
return Math.min(...capacitorMaxLengths);
|
|
4106
4106
|
};
|
|
@@ -7801,6 +7801,7 @@ function Group_doInitialSourceAddConnectivityMapKey(group) {
|
|
|
7801
7801
|
}
|
|
7802
7802
|
|
|
7803
7803
|
// lib/components/primitive-components/Group/Group_doInitialSchematicLayoutGrid.ts
|
|
7804
|
+
import { length } from "circuit-json";
|
|
7804
7805
|
function Group_doInitialSchematicLayoutGrid(group) {
|
|
7805
7806
|
const { db } = group.root;
|
|
7806
7807
|
const props = group._parsedProps;
|
|
@@ -7850,9 +7851,15 @@ function Group_doInitialSchematicLayoutGrid(group) {
|
|
|
7850
7851
|
if (typeof gridGapOption === "number") {
|
|
7851
7852
|
gridGapX = gridGapOption;
|
|
7852
7853
|
gridGapY = gridGapOption;
|
|
7854
|
+
} else if (typeof gridGapOption === "string") {
|
|
7855
|
+
const parsed = length.parse(gridGapOption);
|
|
7856
|
+
gridGapX = parsed;
|
|
7857
|
+
gridGapY = parsed;
|
|
7853
7858
|
} else if (typeof gridGapOption === "object" && gridGapOption !== null) {
|
|
7854
|
-
|
|
7855
|
-
|
|
7859
|
+
const xRaw = gridGapOption.x;
|
|
7860
|
+
const yRaw = gridGapOption.y;
|
|
7861
|
+
gridGapX = typeof xRaw === "number" ? xRaw : length.parse(xRaw ?? "0mm");
|
|
7862
|
+
gridGapY = typeof yRaw === "number" ? yRaw : length.parse(yRaw ?? "0mm");
|
|
7856
7863
|
} else {
|
|
7857
7864
|
gridGapX = 1;
|
|
7858
7865
|
gridGapY = 1;
|
|
@@ -7920,6 +7927,7 @@ import {
|
|
|
7920
7927
|
transformPCBElements,
|
|
7921
7928
|
getPrimaryId
|
|
7922
7929
|
} from "@tscircuit/circuit-json-util";
|
|
7930
|
+
import { length as length2 } from "circuit-json";
|
|
7923
7931
|
function Group_doInitialPcbLayoutGrid(group) {
|
|
7924
7932
|
const { db } = group.root;
|
|
7925
7933
|
const props = group._parsedProps;
|
|
@@ -7968,9 +7976,15 @@ function Group_doInitialPcbLayoutGrid(group) {
|
|
|
7968
7976
|
if (typeof gridGapOption === "number") {
|
|
7969
7977
|
gridGapX = gridGapOption;
|
|
7970
7978
|
gridGapY = gridGapOption;
|
|
7979
|
+
} else if (typeof gridGapOption === "string") {
|
|
7980
|
+
const parsed = length2.parse(gridGapOption);
|
|
7981
|
+
gridGapX = parsed;
|
|
7982
|
+
gridGapY = parsed;
|
|
7971
7983
|
} else if (typeof gridGapOption === "object" && gridGapOption !== null) {
|
|
7972
|
-
|
|
7973
|
-
|
|
7984
|
+
const xRaw = gridGapOption.x;
|
|
7985
|
+
const yRaw = gridGapOption.y;
|
|
7986
|
+
gridGapX = typeof xRaw === "number" ? xRaw : length2.parse(xRaw ?? "0mm");
|
|
7987
|
+
gridGapY = typeof yRaw === "number" ? yRaw : length2.parse(yRaw ?? "0mm");
|
|
7974
7988
|
} else {
|
|
7975
7989
|
gridGapX = 1;
|
|
7976
7990
|
gridGapY = 1;
|
|
@@ -8080,7 +8094,7 @@ import {
|
|
|
8080
8094
|
convertPackOutputToPackInput,
|
|
8081
8095
|
getGraphicsFromPackOutput
|
|
8082
8096
|
} from "calculate-packing";
|
|
8083
|
-
import { length } from "circuit-json";
|
|
8097
|
+
import { length as length3 } from "circuit-json";
|
|
8084
8098
|
import { transformPCBElements as transformPCBElements2 } from "@tscircuit/circuit-json-util";
|
|
8085
8099
|
import { translate as translate6, rotate as rotate2, compose as compose4 } from "transformation-matrix";
|
|
8086
8100
|
import Debug6 from "debug";
|
|
@@ -8092,7 +8106,7 @@ var Group_doInitialPcbLayoutPack = (group) => {
|
|
|
8092
8106
|
const subtreeCircuitJson = buildSubtree2(db.toArray(), {
|
|
8093
8107
|
source_group_id: group.source_group_id
|
|
8094
8108
|
});
|
|
8095
|
-
const gapMm =
|
|
8109
|
+
const gapMm = length3.parse(gap ?? "0mm");
|
|
8096
8110
|
const packInput = {
|
|
8097
8111
|
...convertPackOutputToPackInput(
|
|
8098
8112
|
convertCircuitJsonToPackOutput(subtreeCircuitJson)
|
|
@@ -11181,7 +11195,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
11181
11195
|
var package_default = {
|
|
11182
11196
|
name: "@tscircuit/core",
|
|
11183
11197
|
type: "module",
|
|
11184
|
-
version: "0.0.
|
|
11198
|
+
version: "0.0.588",
|
|
11185
11199
|
types: "dist/index.d.ts",
|
|
11186
11200
|
main: "dist/index.js",
|
|
11187
11201
|
module: "dist/index.js",
|
|
@@ -11207,7 +11221,7 @@ var package_default = {
|
|
|
11207
11221
|
"@tscircuit/capacity-autorouter": "^0.0.100",
|
|
11208
11222
|
"@tscircuit/checks": "^0.0.56",
|
|
11209
11223
|
"@tscircuit/circuit-json-flex": "^0.0.1",
|
|
11210
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
11224
|
+
"@tscircuit/circuit-json-util": "^0.0.57",
|
|
11211
11225
|
"@tscircuit/footprinter": "^0.0.204",
|
|
11212
11226
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
11213
11227
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
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.589",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@tscircuit/capacity-autorouter": "^0.0.100",
|
|
28
28
|
"@tscircuit/checks": "^0.0.56",
|
|
29
29
|
"@tscircuit/circuit-json-flex": "^0.0.1",
|
|
30
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
30
|
+
"@tscircuit/circuit-json-util": "^0.0.57",
|
|
31
31
|
"@tscircuit/footprinter": "^0.0.204",
|
|
32
32
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
33
33
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|