@tscircuit/core 0.0.549 → 0.0.550
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 +50 -41
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7725,6 +7725,53 @@ function Group_doInitialPcbLayoutGrid(group) {
|
|
|
7725
7725
|
}
|
|
7726
7726
|
}
|
|
7727
7727
|
|
|
7728
|
+
// lib/utils/autorouting/getPresetAutoroutingConfig.ts
|
|
7729
|
+
function getPresetAutoroutingConfig(autorouterConfig) {
|
|
7730
|
+
const defaults = {
|
|
7731
|
+
serverUrl: "https://registry-api.tscircuit.com",
|
|
7732
|
+
serverMode: "job",
|
|
7733
|
+
serverCacheEnabled: true
|
|
7734
|
+
};
|
|
7735
|
+
if (typeof autorouterConfig === "object" && !autorouterConfig.preset) {
|
|
7736
|
+
return {
|
|
7737
|
+
local: !(autorouterConfig.serverUrl || autorouterConfig.serverMode || autorouterConfig.serverCacheEnabled),
|
|
7738
|
+
...defaults,
|
|
7739
|
+
...autorouterConfig
|
|
7740
|
+
};
|
|
7741
|
+
}
|
|
7742
|
+
const preset = typeof autorouterConfig === "object" ? autorouterConfig.preset : autorouterConfig;
|
|
7743
|
+
switch (preset) {
|
|
7744
|
+
case "auto-local":
|
|
7745
|
+
return {
|
|
7746
|
+
local: true,
|
|
7747
|
+
groupMode: "subcircuit"
|
|
7748
|
+
};
|
|
7749
|
+
case "sequential-trace":
|
|
7750
|
+
return {
|
|
7751
|
+
local: true,
|
|
7752
|
+
groupMode: "sequential-trace"
|
|
7753
|
+
};
|
|
7754
|
+
case "subcircuit":
|
|
7755
|
+
return {
|
|
7756
|
+
local: true,
|
|
7757
|
+
groupMode: "subcircuit"
|
|
7758
|
+
};
|
|
7759
|
+
case "auto-cloud":
|
|
7760
|
+
return {
|
|
7761
|
+
local: false,
|
|
7762
|
+
groupMode: "subcircuit",
|
|
7763
|
+
serverUrl: defaults.serverUrl,
|
|
7764
|
+
serverMode: defaults.serverMode,
|
|
7765
|
+
serverCacheEnabled: true
|
|
7766
|
+
};
|
|
7767
|
+
default:
|
|
7768
|
+
return {
|
|
7769
|
+
local: true,
|
|
7770
|
+
groupMode: "subcircuit"
|
|
7771
|
+
};
|
|
7772
|
+
}
|
|
7773
|
+
}
|
|
7774
|
+
|
|
7728
7775
|
// lib/components/primitive-components/Group/Group.ts
|
|
7729
7776
|
var Group = class extends NormalComponent {
|
|
7730
7777
|
pcb_group_id = null;
|
|
@@ -8327,46 +8374,8 @@ var Group = class extends NormalComponent {
|
|
|
8327
8374
|
};
|
|
8328
8375
|
}
|
|
8329
8376
|
_getAutorouterConfig() {
|
|
8330
|
-
const
|
|
8331
|
-
|
|
8332
|
-
serverMode: "job",
|
|
8333
|
-
serverCacheEnabled: true
|
|
8334
|
-
};
|
|
8335
|
-
const autorouter = this._parsedProps.autorouter || this._parsedProps.autorouter?.preset || this.getInheritedProperty("autorouter");
|
|
8336
|
-
if (typeof autorouter === "object") {
|
|
8337
|
-
return {
|
|
8338
|
-
local: !(autorouter.serverUrl || autorouter.serverMode || autorouter.serverCacheEnabled),
|
|
8339
|
-
...defaults,
|
|
8340
|
-
...autorouter
|
|
8341
|
-
};
|
|
8342
|
-
}
|
|
8343
|
-
if (autorouter === "auto-local")
|
|
8344
|
-
return {
|
|
8345
|
-
local: true,
|
|
8346
|
-
groupMode: "subcircuit"
|
|
8347
|
-
};
|
|
8348
|
-
if (autorouter === "sequential-trace")
|
|
8349
|
-
return {
|
|
8350
|
-
local: true,
|
|
8351
|
-
groupMode: "sequential-trace"
|
|
8352
|
-
};
|
|
8353
|
-
if (autorouter === "subcircuit")
|
|
8354
|
-
return {
|
|
8355
|
-
local: true,
|
|
8356
|
-
groupMode: "subcircuit"
|
|
8357
|
-
};
|
|
8358
|
-
if (autorouter === "auto-cloud")
|
|
8359
|
-
return {
|
|
8360
|
-
local: false,
|
|
8361
|
-
groupMode: "subcircuit",
|
|
8362
|
-
serverUrl: defaults.serverUrl,
|
|
8363
|
-
serverMode: defaults.serverMode,
|
|
8364
|
-
serverCacheEnabled: true
|
|
8365
|
-
};
|
|
8366
|
-
return {
|
|
8367
|
-
local: true,
|
|
8368
|
-
groupMode: "subcircuit"
|
|
8369
|
-
};
|
|
8377
|
+
const autorouter = this._parsedProps.autorouter || this.getInheritedProperty("autorouter");
|
|
8378
|
+
return getPresetAutoroutingConfig(autorouter);
|
|
8370
8379
|
}
|
|
8371
8380
|
/**
|
|
8372
8381
|
* Trace-by-trace autorouting is where each trace routes itself in a well-known
|
|
@@ -10716,7 +10725,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
10716
10725
|
var package_default = {
|
|
10717
10726
|
name: "@tscircuit/core",
|
|
10718
10727
|
type: "module",
|
|
10719
|
-
version: "0.0.
|
|
10728
|
+
version: "0.0.549",
|
|
10720
10729
|
types: "dist/index.d.ts",
|
|
10721
10730
|
main: "dist/index.js",
|
|
10722
10731
|
module: "dist/index.js",
|