@tscircuit/core 0.0.1976 → 0.0.1978
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 +90 -2
- package/dist/index.js +28 -20
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -662,6 +662,7 @@ interface TraceI extends PrimitiveComponent<typeof traceProps> {
|
|
|
662
662
|
declare class Trace extends PrimitiveComponent<typeof traceProps> implements TraceI {
|
|
663
663
|
source_trace_id: string | null;
|
|
664
664
|
pcb_trace_id: string | null;
|
|
665
|
+
isAntennaTrace: boolean;
|
|
665
666
|
schematic_trace_id: string | null;
|
|
666
667
|
_inflatedPcbTraces?: PcbTrace$1[];
|
|
667
668
|
_inflatedPcbVias?: PcbVia$1[];
|
|
@@ -107679,11 +107680,14 @@ declare class DifferentialPair extends PrimitiveComponent<typeof differentialPai
|
|
|
107679
107680
|
}
|
|
107680
107681
|
|
|
107681
107682
|
declare const pcbTraceProps: z.ZodObject<{
|
|
107682
|
-
route: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
107683
|
+
route: z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
107683
107684
|
route_type: z.ZodLiteral<"wire">;
|
|
107684
107685
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
107685
107686
|
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
107686
107687
|
width: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
107688
|
+
start_width: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
107689
|
+
end_width: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
107690
|
+
width_interpolation_mode: z.ZodOptional<z.ZodEnum<["linear", "quadratic"]>>;
|
|
107687
107691
|
copper_pour_id: z.ZodOptional<z.ZodString>;
|
|
107688
107692
|
is_inside_copper_pour: z.ZodOptional<z.ZodBoolean>;
|
|
107689
107693
|
start_pcb_port_id: z.ZodOptional<z.ZodString>;
|
|
@@ -107703,6 +107707,9 @@ declare const pcbTraceProps: z.ZodObject<{
|
|
|
107703
107707
|
width: number;
|
|
107704
107708
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
107705
107709
|
route_type: "wire";
|
|
107710
|
+
start_width?: number | undefined;
|
|
107711
|
+
end_width?: number | undefined;
|
|
107712
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
107706
107713
|
copper_pour_id?: string | undefined;
|
|
107707
107714
|
is_inside_copper_pour?: boolean | undefined;
|
|
107708
107715
|
start_pcb_port_id?: string | undefined;
|
|
@@ -107715,6 +107722,37 @@ declare const pcbTraceProps: z.ZodObject<{
|
|
|
107715
107722
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
107716
107723
|
};
|
|
107717
107724
|
route_type: "wire";
|
|
107725
|
+
start_width?: string | number | undefined;
|
|
107726
|
+
end_width?: string | number | undefined;
|
|
107727
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
107728
|
+
copper_pour_id?: string | undefined;
|
|
107729
|
+
is_inside_copper_pour?: boolean | undefined;
|
|
107730
|
+
start_pcb_port_id?: string | undefined;
|
|
107731
|
+
end_pcb_port_id?: string | undefined;
|
|
107732
|
+
}>, {
|
|
107733
|
+
x: number;
|
|
107734
|
+
y: number;
|
|
107735
|
+
width: number;
|
|
107736
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
107737
|
+
route_type: "wire";
|
|
107738
|
+
start_width?: number | undefined;
|
|
107739
|
+
end_width?: number | undefined;
|
|
107740
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
107741
|
+
copper_pour_id?: string | undefined;
|
|
107742
|
+
is_inside_copper_pour?: boolean | undefined;
|
|
107743
|
+
start_pcb_port_id?: string | undefined;
|
|
107744
|
+
end_pcb_port_id?: string | undefined;
|
|
107745
|
+
}, {
|
|
107746
|
+
x: string | number;
|
|
107747
|
+
y: string | number;
|
|
107748
|
+
width: string | number;
|
|
107749
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
|
|
107750
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
107751
|
+
};
|
|
107752
|
+
route_type: "wire";
|
|
107753
|
+
start_width?: string | number | undefined;
|
|
107754
|
+
end_width?: string | number | undefined;
|
|
107755
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
107718
107756
|
copper_pour_id?: string | undefined;
|
|
107719
107757
|
is_inside_copper_pour?: boolean | undefined;
|
|
107720
107758
|
start_pcb_port_id?: string | undefined;
|
|
@@ -107861,6 +107899,9 @@ declare const pcbTraceProps: z.ZodObject<{
|
|
|
107861
107899
|
width: number;
|
|
107862
107900
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
107863
107901
|
route_type: "wire";
|
|
107902
|
+
start_width?: number | undefined;
|
|
107903
|
+
end_width?: number | undefined;
|
|
107904
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
107864
107905
|
copper_pour_id?: string | undefined;
|
|
107865
107906
|
is_inside_copper_pour?: boolean | undefined;
|
|
107866
107907
|
start_pcb_port_id?: string | undefined;
|
|
@@ -107903,6 +107944,9 @@ declare const pcbTraceProps: z.ZodObject<{
|
|
|
107903
107944
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
107904
107945
|
};
|
|
107905
107946
|
route_type: "wire";
|
|
107947
|
+
start_width?: string | number | undefined;
|
|
107948
|
+
end_width?: string | number | undefined;
|
|
107949
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
107906
107950
|
copper_pour_id?: string | undefined;
|
|
107907
107951
|
is_inside_copper_pour?: boolean | undefined;
|
|
107908
107952
|
start_pcb_port_id?: string | undefined;
|
|
@@ -107947,15 +107991,19 @@ declare const pcbTraceProps: z.ZodObject<{
|
|
|
107947
107991
|
}>;
|
|
107948
107992
|
declare class PcbTrace extends PrimitiveComponent<typeof pcbTraceProps> {
|
|
107949
107993
|
pcb_trace_id: string | null;
|
|
107994
|
+
isAntennaTrace: boolean;
|
|
107950
107995
|
isPcbPrimitive: boolean;
|
|
107951
107996
|
get config(): {
|
|
107952
107997
|
componentName: string;
|
|
107953
107998
|
zodProps: z.ZodObject<{
|
|
107954
|
-
route: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
107999
|
+
route: z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
107955
108000
|
route_type: z.ZodLiteral<"wire">;
|
|
107956
108001
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
107957
108002
|
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
107958
108003
|
width: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
108004
|
+
start_width: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
108005
|
+
end_width: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
108006
|
+
width_interpolation_mode: z.ZodOptional<z.ZodEnum<["linear", "quadratic"]>>;
|
|
107959
108007
|
copper_pour_id: z.ZodOptional<z.ZodString>;
|
|
107960
108008
|
is_inside_copper_pour: z.ZodOptional<z.ZodBoolean>;
|
|
107961
108009
|
start_pcb_port_id: z.ZodOptional<z.ZodString>;
|
|
@@ -107975,6 +108023,37 @@ declare class PcbTrace extends PrimitiveComponent<typeof pcbTraceProps> {
|
|
|
107975
108023
|
width: number;
|
|
107976
108024
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
107977
108025
|
route_type: "wire";
|
|
108026
|
+
start_width?: number | undefined;
|
|
108027
|
+
end_width?: number | undefined;
|
|
108028
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
108029
|
+
copper_pour_id?: string | undefined;
|
|
108030
|
+
is_inside_copper_pour?: boolean | undefined;
|
|
108031
|
+
start_pcb_port_id?: string | undefined;
|
|
108032
|
+
end_pcb_port_id?: string | undefined;
|
|
108033
|
+
}, {
|
|
108034
|
+
x: string | number;
|
|
108035
|
+
y: string | number;
|
|
108036
|
+
width: string | number;
|
|
108037
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
|
|
108038
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
108039
|
+
};
|
|
108040
|
+
route_type: "wire";
|
|
108041
|
+
start_width?: string | number | undefined;
|
|
108042
|
+
end_width?: string | number | undefined;
|
|
108043
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
108044
|
+
copper_pour_id?: string | undefined;
|
|
108045
|
+
is_inside_copper_pour?: boolean | undefined;
|
|
108046
|
+
start_pcb_port_id?: string | undefined;
|
|
108047
|
+
end_pcb_port_id?: string | undefined;
|
|
108048
|
+
}>, {
|
|
108049
|
+
x: number;
|
|
108050
|
+
y: number;
|
|
108051
|
+
width: number;
|
|
108052
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
108053
|
+
route_type: "wire";
|
|
108054
|
+
start_width?: number | undefined;
|
|
108055
|
+
end_width?: number | undefined;
|
|
108056
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
107978
108057
|
copper_pour_id?: string | undefined;
|
|
107979
108058
|
is_inside_copper_pour?: boolean | undefined;
|
|
107980
108059
|
start_pcb_port_id?: string | undefined;
|
|
@@ -107987,6 +108066,9 @@ declare class PcbTrace extends PrimitiveComponent<typeof pcbTraceProps> {
|
|
|
107987
108066
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
107988
108067
|
};
|
|
107989
108068
|
route_type: "wire";
|
|
108069
|
+
start_width?: string | number | undefined;
|
|
108070
|
+
end_width?: string | number | undefined;
|
|
108071
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
107990
108072
|
copper_pour_id?: string | undefined;
|
|
107991
108073
|
is_inside_copper_pour?: boolean | undefined;
|
|
107992
108074
|
start_pcb_port_id?: string | undefined;
|
|
@@ -108133,6 +108215,9 @@ declare class PcbTrace extends PrimitiveComponent<typeof pcbTraceProps> {
|
|
|
108133
108215
|
width: number;
|
|
108134
108216
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
108135
108217
|
route_type: "wire";
|
|
108218
|
+
start_width?: number | undefined;
|
|
108219
|
+
end_width?: number | undefined;
|
|
108220
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
108136
108221
|
copper_pour_id?: string | undefined;
|
|
108137
108222
|
is_inside_copper_pour?: boolean | undefined;
|
|
108138
108223
|
start_pcb_port_id?: string | undefined;
|
|
@@ -108175,6 +108260,9 @@ declare class PcbTrace extends PrimitiveComponent<typeof pcbTraceProps> {
|
|
|
108175
108260
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
108176
108261
|
};
|
|
108177
108262
|
route_type: "wire";
|
|
108263
|
+
start_width?: string | number | undefined;
|
|
108264
|
+
end_width?: string | number | undefined;
|
|
108265
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
108178
108266
|
copper_pour_id?: string | undefined;
|
|
108179
108267
|
is_inside_copper_pour?: boolean | undefined;
|
|
108180
108268
|
start_pcb_port_id?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -6031,6 +6031,7 @@ function Trace_doInitialPcbManualTraceRender(trace) {
|
|
|
6031
6031
|
const traceLength2 = getTraceLength(route);
|
|
6032
6032
|
const pcb_trace = db.pcb_trace.insert({
|
|
6033
6033
|
route,
|
|
6034
|
+
is_antenna_trace: trace.isAntennaTrace,
|
|
6034
6035
|
source_trace_id: trace.source_trace_id,
|
|
6035
6036
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
6036
6037
|
pcb_group_id: trace.getGroup()?.pcb_group_id ?? void 0,
|
|
@@ -7593,6 +7594,8 @@ function getNetsConnectedThroughViaPorts(connectedTracePorts) {
|
|
|
7593
7594
|
var Trace = class extends PrimitiveComponent2 {
|
|
7594
7595
|
source_trace_id = null;
|
|
7595
7596
|
pcb_trace_id = null;
|
|
7597
|
+
// Marks radiating copper created by Antenna, never its feed connection.
|
|
7598
|
+
isAntennaTrace = false;
|
|
7596
7599
|
schematic_trace_id = null;
|
|
7597
7600
|
_inflatedPcbTraces;
|
|
7598
7601
|
_inflatedPcbVias;
|
|
@@ -9616,6 +9619,8 @@ var pcbTraceProps = z7.object({
|
|
|
9616
9619
|
});
|
|
9617
9620
|
var PcbTrace = class extends PrimitiveComponent2 {
|
|
9618
9621
|
pcb_trace_id = null;
|
|
9622
|
+
// Marks radiating copper created by Antenna, never its feed connection.
|
|
9623
|
+
isAntennaTrace = false;
|
|
9619
9624
|
isPcbPrimitive = true;
|
|
9620
9625
|
get config() {
|
|
9621
9626
|
return {
|
|
@@ -9665,6 +9670,7 @@ var PcbTrace = class extends PrimitiveComponent2 {
|
|
|
9665
9670
|
pcb_component_id: container.pcb_component_id,
|
|
9666
9671
|
source_trace_id: props.source_trace_id,
|
|
9667
9672
|
route: transformedRoute,
|
|
9673
|
+
is_antenna_trace: this.isAntennaTrace,
|
|
9668
9674
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
9669
9675
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
9670
9676
|
});
|
|
@@ -15153,6 +15159,8 @@ function NormalComponent_doInitialSilkscreenOverlapAdjustment(component) {
|
|
|
15153
15159
|
|
|
15154
15160
|
// lib/components/base-components/NormalComponent/NormalComponent_doInitialSourceDesignRuleChecks.ts
|
|
15155
15161
|
var NormalComponent_doInitialSourceDesignRuleChecks = (component) => {
|
|
15162
|
+
const drcChecksDisabled = component.root?.platform?.drcChecksDisabled ?? component.getInheritedProperty("drcChecksDisabled");
|
|
15163
|
+
if (drcChecksDisabled) return;
|
|
15156
15164
|
const { db } = component.root;
|
|
15157
15165
|
if (!component.source_component_id) return;
|
|
15158
15166
|
const ports = component.selectAll("port");
|
|
@@ -64019,7 +64027,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
64019
64027
|
var package_default = {
|
|
64020
64028
|
name: "@tscircuit/core",
|
|
64021
64029
|
type: "module",
|
|
64022
|
-
version: "0.0.
|
|
64030
|
+
version: "0.0.1977",
|
|
64023
64031
|
types: "dist/index.d.ts",
|
|
64024
64032
|
main: "dist/index.js",
|
|
64025
64033
|
module: "dist/index.js",
|
|
@@ -64090,7 +64098,7 @@ var package_default = {
|
|
|
64090
64098
|
"bun-match-svg": "0.0.12",
|
|
64091
64099
|
"calculate-elbow": "^0.0.12",
|
|
64092
64100
|
"chokidar-cli": "^3.0.0",
|
|
64093
|
-
"circuit-json": "^0.0.
|
|
64101
|
+
"circuit-json": "^0.0.504",
|
|
64094
64102
|
"circuit-json-to-bpc": "^0.0.13",
|
|
64095
64103
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
64096
64104
|
"circuit-json-to-gltf": "^0.0.133",
|
|
@@ -64154,7 +64162,7 @@ var package_default = {
|
|
|
64154
64162
|
overrides: {
|
|
64155
64163
|
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
64156
64164
|
"@tscircuit/props": "^0.0.666",
|
|
64157
|
-
"circuit-json": "^0.0.
|
|
64165
|
+
"circuit-json": "^0.0.504"
|
|
64158
64166
|
}
|
|
64159
64167
|
};
|
|
64160
64168
|
|
|
@@ -71365,16 +71373,16 @@ var Antenna = class extends NormalComponent {
|
|
|
71365
71373
|
})
|
|
71366
71374
|
);
|
|
71367
71375
|
}
|
|
71368
|
-
|
|
71369
|
-
|
|
71370
|
-
|
|
71371
|
-
|
|
71372
|
-
|
|
71373
|
-
|
|
71374
|
-
|
|
71375
|
-
|
|
71376
|
-
|
|
71377
|
-
);
|
|
71376
|
+
const antennaTrace = new PcbTrace({
|
|
71377
|
+
route: geometry.route.map((point6) => ({
|
|
71378
|
+
route_type: "wire",
|
|
71379
|
+
...point6,
|
|
71380
|
+
width: geometry.traceWidth,
|
|
71381
|
+
layer: "top"
|
|
71382
|
+
}))
|
|
71383
|
+
});
|
|
71384
|
+
antennaTrace.isAntennaTrace = true;
|
|
71385
|
+
generatedFootprint.add(antennaTrace);
|
|
71378
71386
|
if (geometry.secondaryPort && !geometry.groundViaPoint && !hasFootprint) {
|
|
71379
71387
|
generatedFootprint.add(
|
|
71380
71388
|
new SmtPad({
|
|
@@ -71409,13 +71417,13 @@ var Antenna = class extends NormalComponent {
|
|
|
71409
71417
|
super.doInitialCreateTracesFromProps();
|
|
71410
71418
|
const { pcbPath } = this._parsedProps;
|
|
71411
71419
|
if (!pcbPath) return;
|
|
71412
|
-
|
|
71413
|
-
|
|
71414
|
-
|
|
71415
|
-
|
|
71416
|
-
|
|
71417
|
-
|
|
71418
|
-
);
|
|
71420
|
+
const antennaTrace = new Trace({
|
|
71421
|
+
name: `${this.name}_pcb_path`,
|
|
71422
|
+
path: [`${this.getSubcircuitSelector()} > port.pin1`],
|
|
71423
|
+
pcbPath
|
|
71424
|
+
});
|
|
71425
|
+
antennaTrace.isAntennaTrace = true;
|
|
71426
|
+
this.add(antennaTrace);
|
|
71419
71427
|
}
|
|
71420
71428
|
};
|
|
71421
71429
|
|
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.1978",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"bun-match-svg": "0.0.12",
|
|
73
73
|
"calculate-elbow": "^0.0.12",
|
|
74
74
|
"chokidar-cli": "^3.0.0",
|
|
75
|
-
"circuit-json": "^0.0.
|
|
75
|
+
"circuit-json": "^0.0.504",
|
|
76
76
|
"circuit-json-to-bpc": "^0.0.13",
|
|
77
77
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
78
78
|
"circuit-json-to-gltf": "^0.0.133",
|
|
@@ -136,6 +136,6 @@
|
|
|
136
136
|
"overrides": {
|
|
137
137
|
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
138
138
|
"@tscircuit/props": "^0.0.666",
|
|
139
|
-
"circuit-json": "^0.0.
|
|
139
|
+
"circuit-json": "^0.0.504"
|
|
140
140
|
}
|
|
141
141
|
}
|