@tscircuit/core 0.0.446 → 0.0.448
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 +2 -1
- package/dist/index.js +23 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import * as _tscircuit_layout from '@tscircuit/layout';
|
|
|
12
12
|
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
13
13
|
import { GraphicsObject } from 'graphics-debug';
|
|
14
14
|
|
|
15
|
-
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "CreateTraceHintsFromProps", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicLayout", "SchematicTraceRender", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbLayout", "PcbComponentSizeCalculation", "PcbBoardAutoSize", "PcbTraceHintRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbDesignRuleChecks", "CadModelRender", "PartsEngineRender"];
|
|
15
|
+
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "CreateTraceHintsFromProps", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbLayout", "PcbComponentSizeCalculation", "PcbBoardAutoSize", "PcbTraceHintRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbDesignRuleChecks", "CadModelRender", "PartsEngineRender"];
|
|
16
16
|
type RenderPhase = (typeof orderedRenderPhases)[number];
|
|
17
17
|
type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
|
|
18
18
|
type RenderPhaseStates = Record<RenderPhase, {
|
|
@@ -1080,6 +1080,7 @@ declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
|
|
|
1080
1080
|
*/
|
|
1081
1081
|
_shouldUseTraceByTraceRouting(): boolean;
|
|
1082
1082
|
doInitialPcbDesignRuleChecks(): void;
|
|
1083
|
+
doInitialSchematicReplaceNetLabelsWithSymbols(): void;
|
|
1083
1084
|
}
|
|
1084
1085
|
|
|
1085
1086
|
declare class Board extends Group<typeof boardProps> {
|
package/dist/index.js
CHANGED
|
@@ -93,6 +93,7 @@ var orderedRenderPhases = [
|
|
|
93
93
|
"SchematicPrimitiveRender",
|
|
94
94
|
"SchematicLayout",
|
|
95
95
|
"SchematicTraceRender",
|
|
96
|
+
"SchematicReplaceNetLabelsWithSymbols",
|
|
96
97
|
"PcbComponentRender",
|
|
97
98
|
"PcbPrimitiveRender",
|
|
98
99
|
"PcbFootprintLayout",
|
|
@@ -7617,6 +7618,25 @@ var Group = class extends NormalComponent {
|
|
|
7617
7618
|
}
|
|
7618
7619
|
}
|
|
7619
7620
|
}
|
|
7621
|
+
doInitialSchematicReplaceNetLabelsWithSymbols() {
|
|
7622
|
+
if (this.root?.schematicDisabled) return;
|
|
7623
|
+
const { db } = this.root;
|
|
7624
|
+
for (const nl of db.schematic_net_label.list()) {
|
|
7625
|
+
const net = db.source_net.get(nl.source_net_id);
|
|
7626
|
+
const text = nl.text || net?.name || "";
|
|
7627
|
+
if (nl.anchor_side === "top" && /^gnd/i.test(text)) {
|
|
7628
|
+
db.schematic_net_label.update(nl.schematic_net_label_id, {
|
|
7629
|
+
symbol_name: "ground_down"
|
|
7630
|
+
});
|
|
7631
|
+
continue;
|
|
7632
|
+
}
|
|
7633
|
+
if (nl.anchor_side === "bottom" && /^v/i.test(text)) {
|
|
7634
|
+
db.schematic_net_label.update(nl.schematic_net_label_id, {
|
|
7635
|
+
symbol_name: "vcc_up"
|
|
7636
|
+
});
|
|
7637
|
+
}
|
|
7638
|
+
}
|
|
7639
|
+
}
|
|
7620
7640
|
};
|
|
7621
7641
|
|
|
7622
7642
|
// lib/components/normal-components/Board.ts
|
|
@@ -9296,7 +9316,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
9296
9316
|
var package_default = {
|
|
9297
9317
|
name: "@tscircuit/core",
|
|
9298
9318
|
type: "module",
|
|
9299
|
-
version: "0.0.
|
|
9319
|
+
version: "0.0.447",
|
|
9300
9320
|
types: "dist/index.d.ts",
|
|
9301
9321
|
main: "dist/index.js",
|
|
9302
9322
|
module: "dist/index.js",
|
|
@@ -9342,7 +9362,7 @@ var package_default = {
|
|
|
9342
9362
|
"circuit-json": "^0.0.194",
|
|
9343
9363
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
9344
9364
|
"circuit-json-to-simple-3d": "^0.0.2",
|
|
9345
|
-
"circuit-to-svg": "^0.0.
|
|
9365
|
+
"circuit-to-svg": "^0.0.151",
|
|
9346
9366
|
concurrently: "^9.1.2",
|
|
9347
9367
|
debug: "^4.3.6",
|
|
9348
9368
|
"graphics-debug": "^0.0.4",
|
|
@@ -9352,7 +9372,7 @@ var package_default = {
|
|
|
9352
9372
|
"pkg-pr-new": "^0.0.37",
|
|
9353
9373
|
react: "^19.0.0",
|
|
9354
9374
|
"react-dom": "^19.0.0",
|
|
9355
|
-
"schematic-symbols": "^0.0.
|
|
9375
|
+
"schematic-symbols": "^0.0.153",
|
|
9356
9376
|
"ts-expect": "^1.3.0",
|
|
9357
9377
|
tsup: "^8.2.4"
|
|
9358
9378
|
},
|
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.448",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"circuit-json": "^0.0.194",
|
|
48
48
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
49
49
|
"circuit-json-to-simple-3d": "^0.0.2",
|
|
50
|
-
"circuit-to-svg": "^0.0.
|
|
50
|
+
"circuit-to-svg": "^0.0.151",
|
|
51
51
|
"concurrently": "^9.1.2",
|
|
52
52
|
"debug": "^4.3.6",
|
|
53
53
|
"graphics-debug": "^0.0.4",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"pkg-pr-new": "^0.0.37",
|
|
58
58
|
"react": "^19.0.0",
|
|
59
59
|
"react-dom": "^19.0.0",
|
|
60
|
-
"schematic-symbols": "^0.0.
|
|
60
|
+
"schematic-symbols": "^0.0.153",
|
|
61
61
|
"ts-expect": "^1.3.0",
|
|
62
62
|
"tsup": "^8.2.4"
|
|
63
63
|
},
|