@tscircuit/core 0.0.932 → 0.0.934
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 +47 -0
- package/dist/index.js +12 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { Matrix } from 'transformation-matrix';
|
|
|
12
12
|
import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
|
|
13
13
|
import { PackSolver2 } from 'calculate-packing';
|
|
14
14
|
import { AutoroutingPipelineSolver, AssignableViaAutoroutingPipelineSolver } from '@tscircuit/capacity-autorouter';
|
|
15
|
+
import { CopperPourPipelineSolver } from '@tscircuit/copper-pour-solver';
|
|
15
16
|
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
16
17
|
import { GraphicsObject } from 'graphics-debug';
|
|
17
18
|
|
|
@@ -127,6 +128,7 @@ declare const SOLVERS: {
|
|
|
127
128
|
PackSolver2: typeof PackSolver2;
|
|
128
129
|
AutoroutingPipelineSolver: typeof AutoroutingPipelineSolver;
|
|
129
130
|
AssignableViaAutoroutingPipelineSolver: typeof AssignableViaAutoroutingPipelineSolver;
|
|
131
|
+
CopperPourPipelineSolver: typeof CopperPourPipelineSolver;
|
|
130
132
|
};
|
|
131
133
|
type SolverName = keyof typeof SOLVERS;
|
|
132
134
|
|
|
@@ -707,11 +709,22 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
707
709
|
x: string | number;
|
|
708
710
|
y: string | number;
|
|
709
711
|
}>, z.ZodString]>, "many">>;
|
|
712
|
+
pcbPaths: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
713
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
714
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
715
|
+
}, "strip", z.ZodTypeAny, {
|
|
716
|
+
x: number;
|
|
717
|
+
y: number;
|
|
718
|
+
}, {
|
|
719
|
+
x: string | number;
|
|
720
|
+
y: string | number;
|
|
721
|
+
}>, z.ZodString]>, "many">, "many">>;
|
|
710
722
|
pcbStraightLine: z.ZodOptional<z.ZodBoolean>;
|
|
711
723
|
schDisplayLabel: z.ZodOptional<z.ZodString>;
|
|
712
724
|
schStroke: z.ZodOptional<z.ZodString>;
|
|
713
725
|
highlightColor: z.ZodOptional<z.ZodString>;
|
|
714
726
|
maxLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
727
|
+
connectsTo: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
715
728
|
} & {
|
|
716
729
|
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<{
|
|
717
730
|
getPortSelector: () => string;
|
|
@@ -727,6 +740,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
727
740
|
width?: number | undefined;
|
|
728
741
|
thickness?: number | undefined;
|
|
729
742
|
maxLength?: number | undefined;
|
|
743
|
+
connectsTo?: string | string[] | undefined;
|
|
730
744
|
schematicRouteHints?: {
|
|
731
745
|
x: number;
|
|
732
746
|
y: number;
|
|
@@ -743,6 +757,10 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
743
757
|
x: number;
|
|
744
758
|
y: number;
|
|
745
759
|
})[] | undefined;
|
|
760
|
+
pcbPaths?: (string | {
|
|
761
|
+
x: number;
|
|
762
|
+
y: number;
|
|
763
|
+
})[][] | undefined;
|
|
746
764
|
pcbStraightLine?: boolean | undefined;
|
|
747
765
|
schDisplayLabel?: string | undefined;
|
|
748
766
|
schStroke?: string | undefined;
|
|
@@ -755,6 +773,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
755
773
|
width?: string | number | undefined;
|
|
756
774
|
thickness?: string | number | undefined;
|
|
757
775
|
maxLength?: string | number | undefined;
|
|
776
|
+
connectsTo?: string | string[] | undefined;
|
|
758
777
|
schematicRouteHints?: {
|
|
759
778
|
x: string | number;
|
|
760
779
|
y: string | number;
|
|
@@ -773,6 +792,10 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
773
792
|
x: string | number;
|
|
774
793
|
y: string | number;
|
|
775
794
|
})[] | undefined;
|
|
795
|
+
pcbPaths?: (string | {
|
|
796
|
+
x: string | number;
|
|
797
|
+
y: string | number;
|
|
798
|
+
})[][] | undefined;
|
|
776
799
|
pcbStraightLine?: boolean | undefined;
|
|
777
800
|
schDisplayLabel?: string | undefined;
|
|
778
801
|
schStroke?: string | undefined;
|
|
@@ -830,11 +853,22 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
830
853
|
x: string | number;
|
|
831
854
|
y: string | number;
|
|
832
855
|
}>, z.ZodString]>, "many">>;
|
|
856
|
+
pcbPaths: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
857
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
858
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
859
|
+
}, "strip", z.ZodTypeAny, {
|
|
860
|
+
x: number;
|
|
861
|
+
y: number;
|
|
862
|
+
}, {
|
|
863
|
+
x: string | number;
|
|
864
|
+
y: string | number;
|
|
865
|
+
}>, z.ZodString]>, "many">, "many">>;
|
|
833
866
|
pcbStraightLine: z.ZodOptional<z.ZodBoolean>;
|
|
834
867
|
schDisplayLabel: z.ZodOptional<z.ZodString>;
|
|
835
868
|
schStroke: z.ZodOptional<z.ZodString>;
|
|
836
869
|
highlightColor: z.ZodOptional<z.ZodString>;
|
|
837
870
|
maxLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
871
|
+
connectsTo: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
838
872
|
} & {
|
|
839
873
|
from: z.ZodUnion<[z.ZodString, z.ZodType<{
|
|
840
874
|
getPortSelector: () => string;
|
|
@@ -858,6 +892,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
858
892
|
width?: number | undefined;
|
|
859
893
|
thickness?: number | undefined;
|
|
860
894
|
maxLength?: number | undefined;
|
|
895
|
+
connectsTo?: string | string[] | undefined;
|
|
861
896
|
schematicRouteHints?: {
|
|
862
897
|
x: number;
|
|
863
898
|
y: number;
|
|
@@ -874,6 +909,10 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
874
909
|
x: number;
|
|
875
910
|
y: number;
|
|
876
911
|
})[] | undefined;
|
|
912
|
+
pcbPaths?: (string | {
|
|
913
|
+
x: number;
|
|
914
|
+
y: number;
|
|
915
|
+
})[][] | undefined;
|
|
877
916
|
pcbStraightLine?: boolean | undefined;
|
|
878
917
|
schDisplayLabel?: string | undefined;
|
|
879
918
|
schStroke?: string | undefined;
|
|
@@ -889,6 +928,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
889
928
|
width?: string | number | undefined;
|
|
890
929
|
thickness?: string | number | undefined;
|
|
891
930
|
maxLength?: string | number | undefined;
|
|
931
|
+
connectsTo?: string | string[] | undefined;
|
|
892
932
|
schematicRouteHints?: {
|
|
893
933
|
x: string | number;
|
|
894
934
|
y: string | number;
|
|
@@ -907,6 +947,10 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
907
947
|
x: string | number;
|
|
908
948
|
y: string | number;
|
|
909
949
|
})[] | undefined;
|
|
950
|
+
pcbPaths?: (string | {
|
|
951
|
+
x: string | number;
|
|
952
|
+
y: string | number;
|
|
953
|
+
})[][] | undefined;
|
|
910
954
|
pcbStraightLine?: boolean | undefined;
|
|
911
955
|
schDisplayLabel?: string | undefined;
|
|
912
956
|
schStroke?: string | undefined;
|
|
@@ -13535,6 +13579,7 @@ declare class Interconnect extends NormalComponent<typeof interconnectProps> {
|
|
|
13535
13579
|
}>>>;
|
|
13536
13580
|
} & {
|
|
13537
13581
|
standard: zod.ZodOptional<zod.ZodEnum<["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]>>;
|
|
13582
|
+
internallyConnectedPins: zod.ZodOptional<zod.ZodArray<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">, "many">>;
|
|
13538
13583
|
}, "strip", zod.ZodTypeAny, {
|
|
13539
13584
|
name: string;
|
|
13540
13585
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
@@ -13737,6 +13782,7 @@ declare class Interconnect extends NormalComponent<typeof interconnectProps> {
|
|
|
13737
13782
|
doNotPlace?: boolean | undefined;
|
|
13738
13783
|
obstructsWithinBounds?: boolean | undefined;
|
|
13739
13784
|
showAsTranslucentModel?: boolean | undefined;
|
|
13785
|
+
internallyConnectedPins?: (string | number)[][] | undefined;
|
|
13740
13786
|
standard?: "0603" | "0805" | "1206" | "TSC0001_36P_XALT_2025_11" | undefined;
|
|
13741
13787
|
}, {
|
|
13742
13788
|
name: string;
|
|
@@ -13942,6 +13988,7 @@ declare class Interconnect extends NormalComponent<typeof interconnectProps> {
|
|
|
13942
13988
|
doNotPlace?: boolean | undefined;
|
|
13943
13989
|
obstructsWithinBounds?: boolean | undefined;
|
|
13944
13990
|
showAsTranslucentModel?: boolean | undefined;
|
|
13991
|
+
internallyConnectedPins?: (string | number)[][] | undefined;
|
|
13945
13992
|
standard?: "0603" | "0805" | "1206" | "TSC0001_36P_XALT_2025_11" | undefined;
|
|
13946
13993
|
}>;
|
|
13947
13994
|
shouldRenderAsSchematicBox: boolean;
|
package/dist/index.js
CHANGED
|
@@ -9563,10 +9563,12 @@ import {
|
|
|
9563
9563
|
AutoroutingPipelineSolver,
|
|
9564
9564
|
AssignableViaAutoroutingPipelineSolver
|
|
9565
9565
|
} from "@tscircuit/capacity-autorouter";
|
|
9566
|
+
import { CopperPourPipelineSolver } from "@tscircuit/copper-pour-solver";
|
|
9566
9567
|
var SOLVERS = {
|
|
9567
9568
|
PackSolver2,
|
|
9568
9569
|
AutoroutingPipelineSolver,
|
|
9569
|
-
AssignableViaAutoroutingPipelineSolver
|
|
9570
|
+
AssignableViaAutoroutingPipelineSolver,
|
|
9571
|
+
CopperPourPipelineSolver
|
|
9570
9572
|
};
|
|
9571
9573
|
|
|
9572
9574
|
// lib/utils/autorouting/CapacityMeshAutorouter.ts
|
|
@@ -18188,7 +18190,7 @@ var Via = class extends PrimitiveComponent2 {
|
|
|
18188
18190
|
// lib/components/primitive-components/CopperPour/CopperPour.ts
|
|
18189
18191
|
import { copperPourProps } from "@tscircuit/props";
|
|
18190
18192
|
import {
|
|
18191
|
-
CopperPourPipelineSolver,
|
|
18193
|
+
CopperPourPipelineSolver as CopperPourPipelineSolver2,
|
|
18192
18194
|
convertCircuitJsonToInputProblem
|
|
18193
18195
|
} from "@tscircuit/copper-pour-solver";
|
|
18194
18196
|
var CopperPour = class extends PrimitiveComponent2 {
|
|
@@ -18229,7 +18231,12 @@ var CopperPour = class extends PrimitiveComponent2 {
|
|
|
18229
18231
|
board_edge_margin: props.boardEdgeMargin ?? clearance,
|
|
18230
18232
|
cutout_margin: props.cutoutMargin ?? clearance
|
|
18231
18233
|
});
|
|
18232
|
-
const solver = new
|
|
18234
|
+
const solver = new CopperPourPipelineSolver2(inputProblem);
|
|
18235
|
+
this.root.emit("solver:started", {
|
|
18236
|
+
solverName: "CopperPourPipelineSolver",
|
|
18237
|
+
solverParams: inputProblem,
|
|
18238
|
+
componentName: this.props.name
|
|
18239
|
+
});
|
|
18233
18240
|
const { brep_shapes } = solver.getOutput();
|
|
18234
18241
|
const coveredWithSolderMask = props.coveredWithSolderMask ?? false;
|
|
18235
18242
|
for (const brep_shape of brep_shapes) {
|
|
@@ -19660,7 +19667,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19660
19667
|
var package_default = {
|
|
19661
19668
|
name: "@tscircuit/core",
|
|
19662
19669
|
type: "module",
|
|
19663
|
-
version: "0.0.
|
|
19670
|
+
version: "0.0.933",
|
|
19664
19671
|
types: "dist/index.d.ts",
|
|
19665
19672
|
main: "dist/index.js",
|
|
19666
19673
|
module: "dist/index.js",
|
|
@@ -19704,7 +19711,7 @@ var package_default = {
|
|
|
19704
19711
|
"@tscircuit/math-utils": "^0.0.29",
|
|
19705
19712
|
"@tscircuit/miniflex": "^0.0.4",
|
|
19706
19713
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
19707
|
-
"@tscircuit/props": "^0.0.
|
|
19714
|
+
"@tscircuit/props": "^0.0.432",
|
|
19708
19715
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
19709
19716
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
19710
19717
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
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.934",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@tscircuit/math-utils": "^0.0.29",
|
|
46
46
|
"@tscircuit/miniflex": "^0.0.4",
|
|
47
47
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
48
|
-
"@tscircuit/props": "^0.0.
|
|
48
|
+
"@tscircuit/props": "^0.0.432",
|
|
49
49
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
50
50
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
51
51
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|