@tscircuit/core 0.0.1463 → 0.0.1465
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 +3 -0
- package/dist/index.js +37 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -93836,6 +93836,7 @@ declare class Battery extends NormalComponent<typeof batteryProps, PassivePorts>
|
|
|
93836
93836
|
voltage: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
93837
93837
|
standard: zod.ZodOptional<zod.ZodEnum<["AA", "AAA", "9V", "CR2032", "18650", "C"]>>;
|
|
93838
93838
|
schOrientation: zod.ZodOptional<zod.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
93839
|
+
connections: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"]>, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>;
|
|
93839
93840
|
}, "strip", zod.ZodTypeAny, {
|
|
93840
93841
|
name: string;
|
|
93841
93842
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
@@ -94414,6 +94415,7 @@ declare class Battery extends NormalComponent<typeof batteryProps, PassivePorts>
|
|
|
94414
94415
|
manufacturerPartNumber?: string | undefined;
|
|
94415
94416
|
schSectionName?: string | undefined;
|
|
94416
94417
|
schSheetName?: string | undefined;
|
|
94418
|
+
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
94417
94419
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C" | undefined;
|
|
94418
94420
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
94419
94421
|
capacity?: number | undefined;
|
|
@@ -94998,6 +95000,7 @@ declare class Battery extends NormalComponent<typeof batteryProps, PassivePorts>
|
|
|
94998
95000
|
manufacturerPartNumber?: string | undefined;
|
|
94999
95001
|
schSectionName?: string | undefined;
|
|
95000
95002
|
schSheetName?: string | undefined;
|
|
95003
|
+
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
95001
95004
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C" | undefined;
|
|
95002
95005
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
95003
95006
|
capacity?: string | number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -16907,8 +16907,42 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
16907
16907
|
const connectionsFromNets = [];
|
|
16908
16908
|
const connectionFromNetId = /* @__PURE__ */ new Map();
|
|
16909
16909
|
const handledNetConnectivityKeys = /* @__PURE__ */ new Set();
|
|
16910
|
+
const sourceNetIds = new Set(source_nets.map((net) => net.source_net_id));
|
|
16911
|
+
const currentSubcircuitSourceTraces = db.source_trace.list().filter((trace) => !subcircuit_id || trace.subcircuit_id === subcircuit_id);
|
|
16912
|
+
const exposedBridgeSourceTraceIds = new Set(
|
|
16913
|
+
(subcircuitComponent?.selectAll("trace") ?? []).flatMap((trace) => {
|
|
16914
|
+
const candidate = trace;
|
|
16915
|
+
return candidate._exposesSubcircuitConnection && candidate.source_trace_id ? [candidate.source_trace_id] : [];
|
|
16916
|
+
})
|
|
16917
|
+
);
|
|
16918
|
+
const exposedDescendantSourceNetIds = /* @__PURE__ */ new Set();
|
|
16919
|
+
for (const trace of currentSubcircuitSourceTraces) {
|
|
16920
|
+
if (!exposedBridgeSourceTraceIds.has(trace.source_trace_id)) {
|
|
16921
|
+
continue;
|
|
16922
|
+
}
|
|
16923
|
+
for (const sourceNetId of trace.connected_source_net_ids ?? []) {
|
|
16924
|
+
if (!sourceNetIds.has(sourceNetId)) {
|
|
16925
|
+
exposedDescendantSourceNetIds.add(sourceNetId);
|
|
16926
|
+
}
|
|
16927
|
+
}
|
|
16928
|
+
}
|
|
16929
|
+
const routedDescendantSourceTraceIds = new Set(
|
|
16930
|
+
subcircuit_id ? db.pcb_trace.list().filter(
|
|
16931
|
+
(trace) => trace.subcircuit_id && trace.subcircuit_id !== subcircuit_id && relevantSubcircuitIds?.has(trace.subcircuit_id)
|
|
16932
|
+
).map((trace) => trace.source_trace_id).filter((id) => Boolean(id)) : []
|
|
16933
|
+
);
|
|
16910
16934
|
const sourceTracesEligibleForNetConnections = db.source_trace.list().filter(
|
|
16911
|
-
(
|
|
16935
|
+
(trace) => (
|
|
16936
|
+
// Existing copper must still contribute endpoint connectivity when it
|
|
16937
|
+
// belongs to the scope currently being routed. Descendant copper is
|
|
16938
|
+
// preserved as static geometry only, preventing it from being routed
|
|
16939
|
+
// a second time by its parent.
|
|
16940
|
+
!sourceTraceIdsAlreadyPreservedAsSrjTraces.has(trace.source_trace_id) || subcircuit_id != null && trace.subcircuit_id === subcircuit_id
|
|
16941
|
+
)
|
|
16942
|
+
).filter(
|
|
16943
|
+
(trace) => !subcircuit_id || trace.subcircuit_id === subcircuit_id || (trace.connected_source_net_ids?.some((id) => sourceNetIds.has(id)) ?? false) || (trace.connected_source_net_ids?.some(
|
|
16944
|
+
(id) => exposedDescendantSourceNetIds.has(id)
|
|
16945
|
+
) ?? false) && !routedDescendantSourceTraceIds.has(trace.source_trace_id)
|
|
16912
16946
|
);
|
|
16913
16947
|
const getSourceConnectivityKey = (id) => id ? sharedConnMap.getNetConnectedToId(id) ?? id : null;
|
|
16914
16948
|
for (const net of source_nets) {
|
|
@@ -22865,7 +22899,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
22865
22899
|
var package_default = {
|
|
22866
22900
|
name: "@tscircuit/core",
|
|
22867
22901
|
type: "module",
|
|
22868
|
-
version: "0.0.
|
|
22902
|
+
version: "0.0.1464",
|
|
22869
22903
|
types: "dist/index.d.ts",
|
|
22870
22904
|
main: "dist/index.js",
|
|
22871
22905
|
module: "dist/index.js",
|
|
@@ -22914,7 +22948,7 @@ var package_default = {
|
|
|
22914
22948
|
"@tscircuit/math-utils": "^0.0.36",
|
|
22915
22949
|
"@tscircuit/miniflex": "^0.0.4",
|
|
22916
22950
|
"@tscircuit/ngspice-spice-engine": "^0.0.19",
|
|
22917
|
-
"@tscircuit/props": "^0.0.
|
|
22951
|
+
"@tscircuit/props": "^0.0.584",
|
|
22918
22952
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
22919
22953
|
"@tscircuit/schematic-trace-solver": "^0.0.104",
|
|
22920
22954
|
"@tscircuit/solver-utils": "^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.1465",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@tscircuit/math-utils": "^0.0.36",
|
|
51
51
|
"@tscircuit/miniflex": "^0.0.4",
|
|
52
52
|
"@tscircuit/ngspice-spice-engine": "^0.0.19",
|
|
53
|
-
"@tscircuit/props": "^0.0.
|
|
53
|
+
"@tscircuit/props": "^0.0.584",
|
|
54
54
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
55
55
|
"@tscircuit/schematic-trace-solver": "^0.0.104",
|
|
56
56
|
"@tscircuit/solver-utils": "^0.0.16",
|