@tscircuit/core 0.0.541 → 0.0.543
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 +5 -0
- package/dist/index.js +22 -14
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1548,6 +1548,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1548
1548
|
traceClearance: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1549
1549
|
groupMode: zod.ZodOptional<zod.ZodEnum<["sequential-trace", "subcircuit"]>>;
|
|
1550
1550
|
algorithmFn: zod.ZodOptional<zod.ZodType<(simpleRouteJson: any) => Promise<any>, zod.ZodTypeDef, (simpleRouteJson: any) => Promise<any>>>;
|
|
1551
|
+
preset: zod.ZodOptional<zod.ZodEnum<["sequential-trace", "subcircuit", "auto", "auto-local", "auto-cloud"]>>;
|
|
1551
1552
|
local: zod.ZodOptional<zod.ZodBoolean>;
|
|
1552
1553
|
}, "strip", zod.ZodTypeAny, {
|
|
1553
1554
|
serverUrl?: string | undefined;
|
|
@@ -1558,6 +1559,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1558
1559
|
traceClearance?: number | undefined;
|
|
1559
1560
|
groupMode?: "sequential-trace" | "subcircuit" | undefined;
|
|
1560
1561
|
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1562
|
+
preset?: "sequential-trace" | "subcircuit" | "auto" | "auto-local" | "auto-cloud" | undefined;
|
|
1561
1563
|
local?: boolean | undefined;
|
|
1562
1564
|
}, {
|
|
1563
1565
|
serverUrl?: string | undefined;
|
|
@@ -1568,6 +1570,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1568
1570
|
traceClearance?: string | number | undefined;
|
|
1569
1571
|
groupMode?: "sequential-trace" | "subcircuit" | undefined;
|
|
1570
1572
|
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1573
|
+
preset?: "sequential-trace" | "subcircuit" | "auto" | "auto-local" | "auto-cloud" | undefined;
|
|
1571
1574
|
local?: boolean | undefined;
|
|
1572
1575
|
}>, zod.ZodLiteral<"sequential-trace">, zod.ZodLiteral<"subcircuit">, zod.ZodLiteral<"auto">, zod.ZodLiteral<"auto-local">, zod.ZodLiteral<"auto-cloud">]>>;
|
|
1573
1576
|
} & {
|
|
@@ -1746,6 +1749,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1746
1749
|
traceClearance?: number | undefined;
|
|
1747
1750
|
groupMode?: "sequential-trace" | "subcircuit" | undefined;
|
|
1748
1751
|
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1752
|
+
preset?: "sequential-trace" | "subcircuit" | "auto" | "auto-local" | "auto-cloud" | undefined;
|
|
1749
1753
|
local?: boolean | undefined;
|
|
1750
1754
|
} | undefined;
|
|
1751
1755
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
@@ -1920,6 +1924,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1920
1924
|
traceClearance?: string | number | undefined;
|
|
1921
1925
|
groupMode?: "sequential-trace" | "subcircuit" | undefined;
|
|
1922
1926
|
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1927
|
+
preset?: "sequential-trace" | "subcircuit" | "auto" | "auto-local" | "auto-cloud" | undefined;
|
|
1923
1928
|
local?: boolean | undefined;
|
|
1924
1929
|
} | undefined;
|
|
1925
1930
|
schAutoLayoutEnabled?: boolean | undefined;
|
package/dist/index.js
CHANGED
|
@@ -7330,10 +7330,15 @@ function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
|
7330
7330
|
centerPinColors: ["netlabel_center", "component_center"],
|
|
7331
7331
|
corpus
|
|
7332
7332
|
});
|
|
7333
|
+
const groupOffset = group._getGlobalSchematicPositionBeforeLayout();
|
|
7333
7334
|
for (const box of laidOutBpcGraph.boxes) {
|
|
7334
7335
|
if (!box.center) continue;
|
|
7335
7336
|
const schematic_component2 = db.schematic_component.get(box.boxId);
|
|
7336
7337
|
if (schematic_component2) {
|
|
7338
|
+
const newCenter = {
|
|
7339
|
+
x: box.center.x + groupOffset.x,
|
|
7340
|
+
y: box.center.y + groupOffset.y
|
|
7341
|
+
};
|
|
7337
7342
|
const ports = db.schematic_port.list({
|
|
7338
7343
|
schematic_component_id: schematic_component2.schematic_component_id
|
|
7339
7344
|
});
|
|
@@ -7341,8 +7346,8 @@ function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
|
7341
7346
|
schematic_component_id: schematic_component2.schematic_component_id
|
|
7342
7347
|
});
|
|
7343
7348
|
const positionDelta = {
|
|
7344
|
-
x:
|
|
7345
|
-
y:
|
|
7349
|
+
x: newCenter.x - schematic_component2.center.x,
|
|
7350
|
+
y: newCenter.y - schematic_component2.center.y
|
|
7346
7351
|
};
|
|
7347
7352
|
for (const port of ports) {
|
|
7348
7353
|
port.center.x += positionDelta.x;
|
|
@@ -7352,8 +7357,7 @@ function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
|
7352
7357
|
text.position.x += positionDelta.x;
|
|
7353
7358
|
text.position.y += positionDelta.y;
|
|
7354
7359
|
}
|
|
7355
|
-
schematic_component2.center
|
|
7356
|
-
schematic_component2.center.y += positionDelta.y;
|
|
7360
|
+
schematic_component2.center = newCenter;
|
|
7357
7361
|
continue;
|
|
7358
7362
|
}
|
|
7359
7363
|
const schematic_net_label = db.schematic_net_label.get(box.boxId);
|
|
@@ -7364,10 +7368,14 @@ function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
|
7364
7368
|
if (!pin) {
|
|
7365
7369
|
throw new Error(`No pin found for net label: ${box.boxId}`);
|
|
7366
7370
|
}
|
|
7367
|
-
|
|
7371
|
+
const finalCenter = {
|
|
7372
|
+
x: box.center.x + groupOffset.x,
|
|
7373
|
+
y: box.center.y + groupOffset.y
|
|
7374
|
+
};
|
|
7375
|
+
schematic_net_label.center = finalCenter;
|
|
7368
7376
|
schematic_net_label.anchor_position = {
|
|
7369
|
-
x:
|
|
7370
|
-
y:
|
|
7377
|
+
x: finalCenter.x + pin.offset.x,
|
|
7378
|
+
y: finalCenter.y + pin.offset.y
|
|
7371
7379
|
};
|
|
7372
7380
|
continue;
|
|
7373
7381
|
}
|
|
@@ -7386,12 +7394,12 @@ function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
|
7386
7394
|
text: source_net.name,
|
|
7387
7395
|
// no text; just a placeholder box for Match-Adapt
|
|
7388
7396
|
anchor_position: {
|
|
7389
|
-
x: box.center.x + center.offset.x,
|
|
7390
|
-
y: box.center.y + center.offset.y
|
|
7397
|
+
x: box.center.x + groupOffset.x + center.offset.x,
|
|
7398
|
+
y: box.center.y + groupOffset.y + center.offset.y
|
|
7391
7399
|
},
|
|
7392
7400
|
center: {
|
|
7393
|
-
x: box.center.x + center.offset.x,
|
|
7394
|
-
y: box.center.y + center.offset.y
|
|
7401
|
+
x: box.center.x + groupOffset.x + center.offset.x,
|
|
7402
|
+
y: box.center.y + groupOffset.y + center.offset.y
|
|
7395
7403
|
},
|
|
7396
7404
|
anchor_side: anchorSide,
|
|
7397
7405
|
symbol_name: symbolName,
|
|
@@ -8309,7 +8317,7 @@ var Group = class extends NormalComponent {
|
|
|
8309
8317
|
serverMode: "job",
|
|
8310
8318
|
serverCacheEnabled: true
|
|
8311
8319
|
};
|
|
8312
|
-
const autorouter = this._parsedProps.autorouter
|
|
8320
|
+
const autorouter = this._parsedProps.autorouter || this._parsedProps.autorouter?.preset || this.getInheritedProperty("autorouter");
|
|
8313
8321
|
if (typeof autorouter === "object") {
|
|
8314
8322
|
return {
|
|
8315
8323
|
local: !(autorouter.serverUrl || autorouter.serverMode || autorouter.serverCacheEnabled),
|
|
@@ -10670,7 +10678,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
10670
10678
|
var package_default = {
|
|
10671
10679
|
name: "@tscircuit/core",
|
|
10672
10680
|
type: "module",
|
|
10673
|
-
version: "0.0.
|
|
10681
|
+
version: "0.0.542",
|
|
10674
10682
|
types: "dist/index.d.ts",
|
|
10675
10683
|
main: "dist/index.js",
|
|
10676
10684
|
module: "dist/index.js",
|
|
@@ -10702,7 +10710,7 @@ var package_default = {
|
|
|
10702
10710
|
"@tscircuit/layout": "^0.0.28",
|
|
10703
10711
|
"@tscircuit/log-soup": "^1.0.2",
|
|
10704
10712
|
"@tscircuit/math-utils": "^0.0.18",
|
|
10705
|
-
"@tscircuit/props": "^0.0.
|
|
10713
|
+
"@tscircuit/props": "^0.0.251",
|
|
10706
10714
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
10707
10715
|
"@tscircuit/schematic-corpus": "^0.0.33",
|
|
10708
10716
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
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.543",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@tscircuit/layout": "^0.0.28",
|
|
34
34
|
"@tscircuit/log-soup": "^1.0.2",
|
|
35
35
|
"@tscircuit/math-utils": "^0.0.18",
|
|
36
|
-
"@tscircuit/props": "^0.0.
|
|
36
|
+
"@tscircuit/props": "^0.0.251",
|
|
37
37
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
38
38
|
"@tscircuit/schematic-corpus": "^0.0.33",
|
|
39
39
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|