@tscircuit/core 0.0.1355 → 0.0.1357
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 +49 -62
- package/dist/index.js +53 -30
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -478,9 +478,12 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
478
478
|
* Get the explicit trace thickness, supporting 'width' as an alias for 'thickness'
|
|
479
479
|
*/
|
|
480
480
|
_getExplicitTraceThickness(): number | undefined;
|
|
481
|
+
_getSchematicNetLabelText(): string | undefined;
|
|
481
482
|
get config(): {
|
|
482
483
|
zodProps: z.ZodUnion<[z.ZodObject<{
|
|
483
484
|
key: z.ZodOptional<z.ZodString>;
|
|
485
|
+
name: z.ZodOptional<z.ZodString>;
|
|
486
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
484
487
|
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
485
488
|
width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
486
489
|
schematicRouteHints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -654,7 +657,9 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
654
657
|
})[];
|
|
655
658
|
key?: string | undefined;
|
|
656
659
|
thickness?: number | undefined;
|
|
660
|
+
name?: string | undefined;
|
|
657
661
|
highlightColor?: string | undefined;
|
|
662
|
+
displayName?: string | undefined;
|
|
658
663
|
width?: number | undefined;
|
|
659
664
|
maxLength?: number | undefined;
|
|
660
665
|
connectsTo?: string | string[] | undefined;
|
|
@@ -694,7 +699,9 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
694
699
|
})[];
|
|
695
700
|
key?: string | undefined;
|
|
696
701
|
thickness?: string | number | undefined;
|
|
702
|
+
name?: string | undefined;
|
|
697
703
|
highlightColor?: string | undefined;
|
|
704
|
+
displayName?: string | undefined;
|
|
698
705
|
width?: string | number | undefined;
|
|
699
706
|
maxLength?: string | number | undefined;
|
|
700
707
|
connectsTo?: string | string[] | undefined;
|
|
@@ -740,6 +747,8 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
740
747
|
schStroke?: string | undefined;
|
|
741
748
|
}>, z.ZodObject<{
|
|
742
749
|
key: z.ZodOptional<z.ZodString>;
|
|
750
|
+
name: z.ZodOptional<z.ZodString>;
|
|
751
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
743
752
|
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
744
753
|
width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
745
754
|
schematicRouteHints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -921,7 +930,9 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
921
930
|
};
|
|
922
931
|
key?: string | undefined;
|
|
923
932
|
thickness?: number | undefined;
|
|
933
|
+
name?: string | undefined;
|
|
924
934
|
highlightColor?: string | undefined;
|
|
935
|
+
displayName?: string | undefined;
|
|
925
936
|
width?: number | undefined;
|
|
926
937
|
maxLength?: number | undefined;
|
|
927
938
|
connectsTo?: string | string[] | undefined;
|
|
@@ -964,7 +975,9 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
964
975
|
};
|
|
965
976
|
key?: string | undefined;
|
|
966
977
|
thickness?: string | number | undefined;
|
|
978
|
+
name?: string | undefined;
|
|
967
979
|
highlightColor?: string | undefined;
|
|
980
|
+
displayName?: string | undefined;
|
|
968
981
|
width?: string | number | undefined;
|
|
969
982
|
maxLength?: string | number | undefined;
|
|
970
983
|
connectsTo?: string | string[] | undefined;
|
|
@@ -1010,6 +1023,8 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
1010
1023
|
schStroke?: string | undefined;
|
|
1011
1024
|
}>, z.ZodObject<{
|
|
1012
1025
|
key: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1027
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1013
1028
|
thickness: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
1014
1029
|
width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
1015
1030
|
schematicRouteHints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1191,7 +1206,9 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
1191
1206
|
};
|
|
1192
1207
|
key?: string | undefined;
|
|
1193
1208
|
thickness?: number | undefined;
|
|
1209
|
+
name?: string | undefined;
|
|
1194
1210
|
highlightColor?: string | undefined;
|
|
1211
|
+
displayName?: string | undefined;
|
|
1195
1212
|
width?: number | undefined;
|
|
1196
1213
|
maxLength?: number | undefined;
|
|
1197
1214
|
connectsTo?: string | string[] | undefined;
|
|
@@ -1234,7 +1251,9 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
1234
1251
|
};
|
|
1235
1252
|
key?: string | undefined;
|
|
1236
1253
|
thickness?: string | number | undefined;
|
|
1254
|
+
name?: string | undefined;
|
|
1237
1255
|
highlightColor?: string | undefined;
|
|
1256
|
+
displayName?: string | undefined;
|
|
1238
1257
|
width?: string | number | undefined;
|
|
1239
1258
|
maxLength?: string | number | undefined;
|
|
1240
1259
|
connectsTo?: string | string[] | undefined;
|
|
@@ -70018,22 +70037,10 @@ declare class Ammeter extends NormalComponent<typeof ammeterProps, "pos" | "neg"
|
|
|
70018
70037
|
} & {
|
|
70019
70038
|
connections: zod.ZodEffects<zod.ZodRecord<zod.ZodEnum<["pin1", "pin2", "pos", "neg"]>, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>, Partial<Record<"pin1" | "pin2" | "pos" | "neg", string | readonly string[] | string[]>>, Partial<Record<"pin1" | "pin2" | "pos" | "neg", string | readonly string[] | string[]>>>;
|
|
70020
70039
|
color: zod.ZodOptional<zod.ZodString>;
|
|
70021
|
-
|
|
70022
|
-
|
|
70023
|
-
|
|
70024
|
-
|
|
70025
|
-
unitsPerDiv: zod.ZodOptional<zod.ZodNumber>;
|
|
70026
|
-
}, "strip", zod.ZodTypeAny, {
|
|
70027
|
-
center?: number | undefined;
|
|
70028
|
-
label?: string | undefined;
|
|
70029
|
-
offsetDivs?: number | undefined;
|
|
70030
|
-
unitsPerDiv?: number | undefined;
|
|
70031
|
-
}, {
|
|
70032
|
-
center?: number | undefined;
|
|
70033
|
-
label?: string | undefined;
|
|
70034
|
-
offsetDivs?: number | undefined;
|
|
70035
|
-
unitsPerDiv?: number | undefined;
|
|
70036
|
-
}>>;
|
|
70040
|
+
graphDisplayName: zod.ZodOptional<zod.ZodString>;
|
|
70041
|
+
graphCenter: zod.ZodOptional<zod.ZodNumber>;
|
|
70042
|
+
graphOffsetDivs: zod.ZodOptional<zod.ZodNumber>;
|
|
70043
|
+
graphUnitsPerDiv: zod.ZodOptional<zod.ZodNumber>;
|
|
70037
70044
|
}, "strip", zod.ZodTypeAny, {
|
|
70038
70045
|
name: string;
|
|
70039
70046
|
connections: Partial<Record<"pin1" | "pin2" | "pos" | "neg", string | readonly string[] | string[]>>;
|
|
@@ -70613,12 +70620,10 @@ declare class Ammeter extends NormalComponent<typeof ammeterProps, "pos" | "neg"
|
|
|
70613
70620
|
manufacturerPartNumber?: string | undefined;
|
|
70614
70621
|
schSectionName?: string | undefined;
|
|
70615
70622
|
color?: string | undefined;
|
|
70616
|
-
|
|
70617
|
-
|
|
70618
|
-
|
|
70619
|
-
|
|
70620
|
-
unitsPerDiv?: number | undefined;
|
|
70621
|
-
} | undefined;
|
|
70623
|
+
graphDisplayName?: string | undefined;
|
|
70624
|
+
graphCenter?: number | undefined;
|
|
70625
|
+
graphOffsetDivs?: number | undefined;
|
|
70626
|
+
graphUnitsPerDiv?: number | undefined;
|
|
70622
70627
|
}, {
|
|
70623
70628
|
name: string;
|
|
70624
70629
|
connections: Partial<Record<"pin1" | "pin2" | "pos" | "neg", string | readonly string[] | string[]>>;
|
|
@@ -71200,12 +71205,10 @@ declare class Ammeter extends NormalComponent<typeof ammeterProps, "pos" | "neg"
|
|
|
71200
71205
|
manufacturerPartNumber?: string | undefined;
|
|
71201
71206
|
schSectionName?: string | undefined;
|
|
71202
71207
|
color?: string | undefined;
|
|
71203
|
-
|
|
71204
|
-
|
|
71205
|
-
|
|
71206
|
-
|
|
71207
|
-
unitsPerDiv?: number | undefined;
|
|
71208
|
-
} | undefined;
|
|
71208
|
+
graphDisplayName?: string | undefined;
|
|
71209
|
+
graphCenter?: number | undefined;
|
|
71210
|
+
graphOffsetDivs?: number | undefined;
|
|
71211
|
+
graphUnitsPerDiv?: number | undefined;
|
|
71209
71212
|
}>;
|
|
71210
71213
|
sourceFtype: Ftype;
|
|
71211
71214
|
};
|
|
@@ -88589,6 +88592,7 @@ declare const pcbViaProps: z.ZodObject<{
|
|
|
88589
88592
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
88590
88593
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
88591
88594
|
}>>;
|
|
88595
|
+
name: z.ZodOptional<z.ZodString>;
|
|
88592
88596
|
layers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
88593
88597
|
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
88594
88598
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -88598,7 +88602,6 @@ declare const pcbViaProps: z.ZodObject<{
|
|
|
88598
88602
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
88599
88603
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
88600
88604
|
}>, "many">>;
|
|
88601
|
-
name: z.ZodOptional<z.ZodString>;
|
|
88602
88605
|
schX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
88603
88606
|
schY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
88604
88607
|
pcbX: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>]>>;
|
|
@@ -88701,8 +88704,8 @@ declare const pcbViaProps: z.ZodObject<{
|
|
|
88701
88704
|
}, "strip", z.ZodTypeAny, {
|
|
88702
88705
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
88703
88706
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
88704
|
-
layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[] | undefined;
|
|
88705
88707
|
name?: string | undefined;
|
|
88708
|
+
layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[] | undefined;
|
|
88706
88709
|
schX?: number | undefined;
|
|
88707
88710
|
schY?: number | undefined;
|
|
88708
88711
|
pcbX?: string | number | undefined;
|
|
@@ -88761,10 +88764,10 @@ declare const pcbViaProps: z.ZodObject<{
|
|
|
88761
88764
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
88762
88765
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
88763
88766
|
} | undefined;
|
|
88767
|
+
name?: string | undefined;
|
|
88764
88768
|
layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
88765
88769
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
88766
88770
|
})[] | undefined;
|
|
88767
|
-
name?: string | undefined;
|
|
88768
88771
|
schX?: string | number | undefined;
|
|
88769
88772
|
schY?: string | number | undefined;
|
|
88770
88773
|
pcbX?: string | number | undefined;
|
|
@@ -88840,6 +88843,7 @@ declare class PcbVia extends PrimitiveComponent<typeof pcbViaProps> {
|
|
|
88840
88843
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
88841
88844
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
88842
88845
|
}>>;
|
|
88846
|
+
name: z.ZodOptional<z.ZodString>;
|
|
88843
88847
|
layers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
88844
88848
|
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
88845
88849
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -88849,7 +88853,6 @@ declare class PcbVia extends PrimitiveComponent<typeof pcbViaProps> {
|
|
|
88849
88853
|
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
88850
88854
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
88851
88855
|
}>, "many">>;
|
|
88852
|
-
name: z.ZodOptional<z.ZodString>;
|
|
88853
88856
|
schX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
88854
88857
|
schY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
88855
88858
|
pcbX: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>]>>;
|
|
@@ -88952,8 +88955,8 @@ declare class PcbVia extends PrimitiveComponent<typeof pcbViaProps> {
|
|
|
88952
88955
|
}, "strip", z.ZodTypeAny, {
|
|
88953
88956
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
88954
88957
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
88955
|
-
layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[] | undefined;
|
|
88956
88958
|
name?: string | undefined;
|
|
88959
|
+
layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[] | undefined;
|
|
88957
88960
|
schX?: number | undefined;
|
|
88958
88961
|
schY?: number | undefined;
|
|
88959
88962
|
pcbX?: string | number | undefined;
|
|
@@ -89012,10 +89015,10 @@ declare class PcbVia extends PrimitiveComponent<typeof pcbViaProps> {
|
|
|
89012
89015
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
89013
89016
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
89014
89017
|
} | undefined;
|
|
89018
|
+
name?: string | undefined;
|
|
89015
89019
|
layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
89016
89020
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
89017
89021
|
})[] | undefined;
|
|
89018
|
-
name?: string | undefined;
|
|
89019
89022
|
schX?: string | number | undefined;
|
|
89020
89023
|
schY?: string | number | undefined;
|
|
89021
89024
|
pcbX?: string | number | undefined;
|
|
@@ -156239,22 +156242,10 @@ declare class VoltageProbe extends PrimitiveComponent<typeof voltageProbeProps>
|
|
|
156239
156242
|
connectsTo: z.ZodString;
|
|
156240
156243
|
referenceTo: z.ZodOptional<z.ZodString>;
|
|
156241
156244
|
color: z.ZodOptional<z.ZodString>;
|
|
156242
|
-
|
|
156243
|
-
|
|
156244
|
-
|
|
156245
|
-
|
|
156246
|
-
unitsPerDiv: z.ZodOptional<z.ZodNumber>;
|
|
156247
|
-
}, "strip", z.ZodTypeAny, {
|
|
156248
|
-
center?: number | undefined;
|
|
156249
|
-
label?: string | undefined;
|
|
156250
|
-
offsetDivs?: number | undefined;
|
|
156251
|
-
unitsPerDiv?: number | undefined;
|
|
156252
|
-
}, {
|
|
156253
|
-
center?: number | undefined;
|
|
156254
|
-
label?: string | undefined;
|
|
156255
|
-
offsetDivs?: number | undefined;
|
|
156256
|
-
unitsPerDiv?: number | undefined;
|
|
156257
|
-
}>>;
|
|
156245
|
+
graphDisplayName: z.ZodOptional<z.ZodString>;
|
|
156246
|
+
graphCenter: z.ZodOptional<z.ZodNumber>;
|
|
156247
|
+
graphOffsetDivs: z.ZodOptional<z.ZodNumber>;
|
|
156248
|
+
graphUnitsPerDiv: z.ZodOptional<z.ZodNumber>;
|
|
156258
156249
|
}, "strip", z.ZodTypeAny, {
|
|
156259
156250
|
connectsTo: string;
|
|
156260
156251
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
@@ -156835,12 +156826,10 @@ declare class VoltageProbe extends PrimitiveComponent<typeof voltageProbeProps>
|
|
|
156835
156826
|
schSectionName?: string | undefined;
|
|
156836
156827
|
color?: string | undefined;
|
|
156837
156828
|
referenceTo?: string | undefined;
|
|
156838
|
-
|
|
156839
|
-
|
|
156840
|
-
|
|
156841
|
-
|
|
156842
|
-
unitsPerDiv?: number | undefined;
|
|
156843
|
-
} | undefined;
|
|
156829
|
+
graphDisplayName?: string | undefined;
|
|
156830
|
+
graphCenter?: number | undefined;
|
|
156831
|
+
graphOffsetDivs?: number | undefined;
|
|
156832
|
+
graphUnitsPerDiv?: number | undefined;
|
|
156844
156833
|
}, {
|
|
156845
156834
|
connectsTo: string;
|
|
156846
156835
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
@@ -157423,12 +157412,10 @@ declare class VoltageProbe extends PrimitiveComponent<typeof voltageProbeProps>
|
|
|
157423
157412
|
schSectionName?: string | undefined;
|
|
157424
157413
|
color?: string | undefined;
|
|
157425
157414
|
referenceTo?: string | undefined;
|
|
157426
|
-
|
|
157427
|
-
|
|
157428
|
-
|
|
157429
|
-
|
|
157430
|
-
unitsPerDiv?: number | undefined;
|
|
157431
|
-
} | undefined;
|
|
157415
|
+
graphDisplayName?: string | undefined;
|
|
157416
|
+
graphCenter?: number | undefined;
|
|
157417
|
+
graphOffsetDivs?: number | undefined;
|
|
157418
|
+
graphUnitsPerDiv?: number | undefined;
|
|
157432
157419
|
}>;
|
|
157433
157420
|
};
|
|
157434
157421
|
doInitialSimulationRender(): void;
|
package/dist/index.js
CHANGED
|
@@ -3723,6 +3723,7 @@ var Trace_doInitialSchematicTraceRender = (trace) => {
|
|
|
3723
3723
|
if (trace.getCollapsedSchematicBoxAncestor()) return;
|
|
3724
3724
|
const { db } = trace.root;
|
|
3725
3725
|
const { _parsedProps: props, parent } = trace;
|
|
3726
|
+
const schematicNetLabelText = trace._getSchematicNetLabelText();
|
|
3726
3727
|
if (!parent) throw new Error("Trace has no parent");
|
|
3727
3728
|
let allPortsFound;
|
|
3728
3729
|
let connectedPorts;
|
|
@@ -3812,16 +3813,16 @@ var Trace_doInitialSchematicTraceRender = (trace) => {
|
|
|
3812
3813
|
trace.schematic_trace_id = dbTrace2.schematic_trace_id;
|
|
3813
3814
|
return;
|
|
3814
3815
|
}
|
|
3815
|
-
if (
|
|
3816
|
+
if (schematicNetLabelText) {
|
|
3816
3817
|
const side2 = getEnteringEdgeFromDirection(port.facingDirection) ?? "bottom";
|
|
3817
3818
|
db.schematic_net_label.insert({
|
|
3818
|
-
text:
|
|
3819
|
+
text: schematicNetLabelText,
|
|
3819
3820
|
source_net_id: net.source_net_id,
|
|
3820
3821
|
anchor_position: anchorPos,
|
|
3821
3822
|
center: computeSchematicNetLabelCenter({
|
|
3822
3823
|
anchor_position: anchorPos,
|
|
3823
3824
|
anchor_side: side2,
|
|
3824
|
-
text:
|
|
3825
|
+
text: schematicNetLabelText
|
|
3825
3826
|
}),
|
|
3826
3827
|
anchor_side: side2
|
|
3827
3828
|
});
|
|
@@ -3841,7 +3842,7 @@ var Trace_doInitialSchematicTraceRender = (trace) => {
|
|
|
3841
3842
|
});
|
|
3842
3843
|
return;
|
|
3843
3844
|
}
|
|
3844
|
-
if (
|
|
3845
|
+
if (schematicNetLabelText) {
|
|
3845
3846
|
if ("from" in trace.props && "to" in trace.props || "path" in trace.props) {
|
|
3846
3847
|
trace._doInitialSchematicTraceRenderWithDisplayLabel();
|
|
3847
3848
|
return;
|
|
@@ -5077,7 +5078,7 @@ function Trace__doInitialSchematicTraceRenderWithDisplayLabel(trace) {
|
|
|
5077
5078
|
const [firstPort, secondPort] = connectedPorts.map(({ port }) => port);
|
|
5078
5079
|
const isFirstPortSchematicBox = firstPort.parent?.config.shouldRenderAsSchematicBox;
|
|
5079
5080
|
const pinFullName = isFirstPortSchematicBox ? `${firstPort?.parent?.props.name}_${firstPort?.props.name}` : `${secondPort?.parent?.props.name}_${secondPort?.props.name}`;
|
|
5080
|
-
const netLabelText = trace.
|
|
5081
|
+
const netLabelText = trace._getSchematicNetLabelText() ?? pinFullName;
|
|
5081
5082
|
if (existingFromNetLabel && existingFromNetLabel.text !== netLabelText) {
|
|
5082
5083
|
existingFromNetLabel.text = `${netLabelText} / ${existingFromNetLabel.text}`;
|
|
5083
5084
|
}
|
|
@@ -5087,13 +5088,13 @@ function Trace__doInitialSchematicTraceRenderWithDisplayLabel(trace) {
|
|
|
5087
5088
|
if (!existingToNetLabel) {
|
|
5088
5089
|
const toSide = getEnteringEdgeFromDirection(toPort.facingDirection) ?? "bottom";
|
|
5089
5090
|
db.schematic_net_label.insert({
|
|
5090
|
-
text:
|
|
5091
|
+
text: netLabelText,
|
|
5091
5092
|
source_net_id: toPort.source_port_id,
|
|
5092
5093
|
anchor_position: toAnchorPos,
|
|
5093
5094
|
center: computeSchematicNetLabelCenter({
|
|
5094
5095
|
anchor_position: toAnchorPos,
|
|
5095
5096
|
anchor_side: toSide,
|
|
5096
|
-
text:
|
|
5097
|
+
text: netLabelText
|
|
5097
5098
|
}),
|
|
5098
5099
|
anchor_side: toSide
|
|
5099
5100
|
});
|
|
@@ -5101,13 +5102,13 @@ function Trace__doInitialSchematicTraceRenderWithDisplayLabel(trace) {
|
|
|
5101
5102
|
if (!existingFromNetLabel) {
|
|
5102
5103
|
const fromSide = getEnteringEdgeFromDirection(fromPort.facingDirection) ?? "bottom";
|
|
5103
5104
|
db.schematic_net_label.insert({
|
|
5104
|
-
text:
|
|
5105
|
+
text: netLabelText,
|
|
5105
5106
|
source_net_id: fromPort.source_port_id,
|
|
5106
5107
|
anchor_position: fromAnchorPos,
|
|
5107
5108
|
center: computeSchematicNetLabelCenter({
|
|
5108
5109
|
anchor_position: fromAnchorPos,
|
|
5109
5110
|
anchor_side: fromSide,
|
|
5110
|
-
text:
|
|
5111
|
+
text: netLabelText
|
|
5111
5112
|
}),
|
|
5112
5113
|
anchor_side: fromSide
|
|
5113
5114
|
});
|
|
@@ -5225,6 +5226,9 @@ var Trace3 = class extends PrimitiveComponent2 {
|
|
|
5225
5226
|
_getExplicitTraceThickness() {
|
|
5226
5227
|
return this._parsedProps.thickness ?? this._parsedProps.width;
|
|
5227
5228
|
}
|
|
5229
|
+
_getSchematicNetLabelText() {
|
|
5230
|
+
return this._parsedProps.schDisplayLabel ?? this._parsedProps.displayName ?? this._parsedProps.name;
|
|
5231
|
+
}
|
|
5228
5232
|
get config() {
|
|
5229
5233
|
return {
|
|
5230
5234
|
zodProps: traceProps,
|
|
@@ -5377,11 +5381,12 @@ var Trace3 = class extends PrimitiveComponent2 {
|
|
|
5377
5381
|
connected_source_port_ids: ports.map((p) => p.port.source_port_id),
|
|
5378
5382
|
connected_source_net_ids: nets.map((n) => n.source_net_id),
|
|
5379
5383
|
subcircuit_id: this.getSubcircuit()?.subcircuit_id,
|
|
5384
|
+
name: props.name,
|
|
5380
5385
|
max_length: getMaxLengthFromConnectedCapacitors(
|
|
5381
5386
|
ports.map((p) => p.port),
|
|
5382
5387
|
{ db }
|
|
5383
5388
|
) ?? props.maxLength,
|
|
5384
|
-
display_name: displayName,
|
|
5389
|
+
display_name: props.displayName ?? displayName,
|
|
5385
5390
|
min_trace_thickness: this._getExplicitTraceThickness()
|
|
5386
5391
|
});
|
|
5387
5392
|
this.source_trace_id = trace.source_trace_id;
|
|
@@ -19369,7 +19374,8 @@ function createSchematicTraceSolverInputProblem(group) {
|
|
|
19369
19374
|
const pairKey = [a, b].sort().join("::");
|
|
19370
19375
|
if (!connectedPairKeys.has(pairKey)) {
|
|
19371
19376
|
connectedPairKeys.add(pairKey);
|
|
19372
|
-
const
|
|
19377
|
+
const traceLabel = st.name ?? st.display_name;
|
|
19378
|
+
const userNetId = traceLabel ?? st.source_trace_id;
|
|
19373
19379
|
if (st.subcircuit_connectivity_map_key) {
|
|
19374
19380
|
userNetIdToConnKey.set(userNetId, st.subcircuit_connectivity_map_key);
|
|
19375
19381
|
}
|
|
@@ -19383,10 +19389,10 @@ function createSchematicTraceSolverInputProblem(group) {
|
|
|
19383
19389
|
}
|
|
19384
19390
|
const maxMspDist = group._parsedProps.schMaxTraceDistance ?? DEFAULT_MAX_MSP_PAIR_DISTANCE;
|
|
19385
19391
|
let netLabelWidth;
|
|
19386
|
-
if (
|
|
19392
|
+
if (traceLabel && !traceLabel.startsWith(".") && portDistance > maxMspDist) {
|
|
19387
19393
|
netLabelWidth = Number(
|
|
19388
19394
|
getSchematicNetLabelTextWidth({
|
|
19389
|
-
text: String(
|
|
19395
|
+
text: String(traceLabel),
|
|
19390
19396
|
font_size: 0.14
|
|
19391
19397
|
}).toFixed(2)
|
|
19392
19398
|
);
|
|
@@ -20144,7 +20150,7 @@ var getNetNameFromPorts = (ports) => {
|
|
|
20144
20150
|
for (const port of ports) {
|
|
20145
20151
|
const traces = port._getDirectlyConnectedTraces();
|
|
20146
20152
|
for (const trace of traces) {
|
|
20147
|
-
const displayLabel = trace.
|
|
20153
|
+
const displayLabel = trace._getSchematicNetLabelText();
|
|
20148
20154
|
if (displayLabel) {
|
|
20149
20155
|
return { name: displayLabel, wasAssignedDisplayLabel: true };
|
|
20150
20156
|
}
|
|
@@ -24231,7 +24237,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
24231
24237
|
var package_default = {
|
|
24232
24238
|
name: "@tscircuit/core",
|
|
24233
24239
|
type: "module",
|
|
24234
|
-
version: "0.0.
|
|
24240
|
+
version: "0.0.1356",
|
|
24235
24241
|
types: "dist/index.d.ts",
|
|
24236
24242
|
main: "dist/index.js",
|
|
24237
24243
|
module: "dist/index.js",
|
|
@@ -24279,7 +24285,7 @@ var package_default = {
|
|
|
24279
24285
|
"@tscircuit/matchpack": "",
|
|
24280
24286
|
"@tscircuit/math-utils": "^0.0.36",
|
|
24281
24287
|
"@tscircuit/miniflex": "^0.0.4",
|
|
24282
|
-
"@tscircuit/props": "^0.0.
|
|
24288
|
+
"@tscircuit/props": "^0.0.555",
|
|
24283
24289
|
"@tscircuit/ngspice-spice-engine": "^0.0.18",
|
|
24284
24290
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
24285
24291
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -24294,7 +24300,7 @@ var package_default = {
|
|
|
24294
24300
|
"bun-match-svg": "0.0.12",
|
|
24295
24301
|
"calculate-elbow": "^0.0.12",
|
|
24296
24302
|
"chokidar-cli": "^3.0.0",
|
|
24297
|
-
"circuit-json": "^0.0.
|
|
24303
|
+
"circuit-json": "^0.0.439",
|
|
24298
24304
|
"circuit-json-to-bpc": "^0.0.13",
|
|
24299
24305
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
24300
24306
|
"circuit-json-to-gltf": "^0.0.105",
|
|
@@ -26965,7 +26971,7 @@ var Ammeter = class extends NormalComponent3 {
|
|
|
26965
26971
|
}
|
|
26966
26972
|
doInitialSourceRender() {
|
|
26967
26973
|
const { db } = this.root;
|
|
26968
|
-
const { supplierPartNumbers, displayName
|
|
26974
|
+
const { supplierPartNumbers, displayName } = this._parsedProps;
|
|
26969
26975
|
const source_component = db.source_component.insert({
|
|
26970
26976
|
ftype: "simple_ammeter",
|
|
26971
26977
|
name: this.name,
|
|
@@ -26976,7 +26982,13 @@ var Ammeter = class extends NormalComponent3 {
|
|
|
26976
26982
|
}
|
|
26977
26983
|
doInitialSimulationRender() {
|
|
26978
26984
|
const { db } = this.root;
|
|
26979
|
-
const {
|
|
26985
|
+
const {
|
|
26986
|
+
color,
|
|
26987
|
+
graphDisplayName,
|
|
26988
|
+
graphCenter,
|
|
26989
|
+
graphOffsetDivs,
|
|
26990
|
+
graphUnitsPerDiv
|
|
26991
|
+
} = this._parsedProps;
|
|
26980
26992
|
const posPort = this.portMap.pos;
|
|
26981
26993
|
const negPort = this.portMap.neg;
|
|
26982
26994
|
const { simulation_current_probe_id } = db.simulation_current_probe.insert({
|
|
@@ -26988,14 +27000,15 @@ var Ammeter = class extends NormalComponent3 {
|
|
|
26988
27000
|
subcircuit_id: this.getSubcircuit()?.subcircuit_id ?? void 0,
|
|
26989
27001
|
color
|
|
26990
27002
|
});
|
|
26991
|
-
|
|
27003
|
+
const hasGraphDisplayProps = graphDisplayName !== void 0 || graphCenter !== void 0 || graphOffsetDivs !== void 0 || graphUnitsPerDiv !== void 0;
|
|
27004
|
+
if (hasGraphDisplayProps) {
|
|
26992
27005
|
db.simulation_oscilloscope_trace.insert({
|
|
26993
27006
|
simulation_current_probe_id,
|
|
26994
|
-
display_name:
|
|
27007
|
+
display_name: graphDisplayName,
|
|
26995
27008
|
color,
|
|
26996
|
-
display_center_value:
|
|
26997
|
-
display_center_offset_divs:
|
|
26998
|
-
amps_per_div:
|
|
27009
|
+
display_center_value: graphCenter,
|
|
27010
|
+
display_center_offset_divs: graphOffsetDivs,
|
|
27011
|
+
amps_per_div: graphUnitsPerDiv
|
|
26999
27012
|
});
|
|
27000
27013
|
}
|
|
27001
27014
|
}
|
|
@@ -30896,7 +30909,16 @@ var VoltageProbe = class extends PrimitiveComponent2 {
|
|
|
30896
30909
|
}
|
|
30897
30910
|
doInitialSimulationRender() {
|
|
30898
30911
|
const { db } = this.root;
|
|
30899
|
-
const {
|
|
30912
|
+
const {
|
|
30913
|
+
connectsTo,
|
|
30914
|
+
name,
|
|
30915
|
+
referenceTo,
|
|
30916
|
+
color,
|
|
30917
|
+
graphDisplayName,
|
|
30918
|
+
graphCenter,
|
|
30919
|
+
graphOffsetDivs,
|
|
30920
|
+
graphUnitsPerDiv
|
|
30921
|
+
} = this._parsedProps;
|
|
30900
30922
|
const subcircuit = this.getSubcircuit();
|
|
30901
30923
|
if (!subcircuit) {
|
|
30902
30924
|
this.renderError("VoltageProbe must be inside a subcircuit");
|
|
@@ -30973,14 +30995,15 @@ var VoltageProbe = class extends PrimitiveComponent2 {
|
|
|
30973
30995
|
color: this.color
|
|
30974
30996
|
});
|
|
30975
30997
|
this.simulation_voltage_probe_id = simulation_voltage_probe_id;
|
|
30976
|
-
|
|
30998
|
+
const hasGraphDisplayProps = graphDisplayName !== void 0 || graphCenter !== void 0 || graphOffsetDivs !== void 0 || graphUnitsPerDiv !== void 0;
|
|
30999
|
+
if (hasGraphDisplayProps) {
|
|
30977
31000
|
db.simulation_oscilloscope_trace.insert({
|
|
30978
31001
|
simulation_voltage_probe_id,
|
|
30979
|
-
display_name:
|
|
31002
|
+
display_name: graphDisplayName,
|
|
30980
31003
|
color: color ?? void 0,
|
|
30981
|
-
display_center_value:
|
|
30982
|
-
display_center_offset_divs:
|
|
30983
|
-
volts_per_div:
|
|
31004
|
+
display_center_value: graphCenter,
|
|
31005
|
+
display_center_offset_divs: graphOffsetDivs,
|
|
31006
|
+
volts_per_div: graphUnitsPerDiv
|
|
30984
31007
|
});
|
|
30985
31008
|
}
|
|
30986
31009
|
}
|
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.1357",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@tscircuit/matchpack": "",
|
|
50
50
|
"@tscircuit/math-utils": "^0.0.36",
|
|
51
51
|
"@tscircuit/miniflex": "^0.0.4",
|
|
52
|
-
"@tscircuit/props": "^0.0.
|
|
52
|
+
"@tscircuit/props": "^0.0.555",
|
|
53
53
|
"@tscircuit/ngspice-spice-engine": "^0.0.18",
|
|
54
54
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
55
55
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"bun-match-svg": "0.0.12",
|
|
65
65
|
"calculate-elbow": "^0.0.12",
|
|
66
66
|
"chokidar-cli": "^3.0.0",
|
|
67
|
-
"circuit-json": "^0.0.
|
|
67
|
+
"circuit-json": "^0.0.439",
|
|
68
68
|
"circuit-json-to-bpc": "^0.0.13",
|
|
69
69
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
70
70
|
"circuit-json-to-gltf": "^0.0.105",
|