@tscircuit/core 0.0.885 → 0.0.887
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 +9 -1
- package/dist/index.js +35 -5
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -4491,6 +4491,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, Polarized
|
|
|
4491
4491
|
bypassTo: zod.ZodOptional<zod.ZodString>;
|
|
4492
4492
|
maxDecouplingTraceLength: zod.ZodOptional<zod.ZodNumber>;
|
|
4493
4493
|
schOrientation: zod.ZodOptional<zod.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
4494
|
+
schSize: zod.ZodOptional<zod.ZodUnion<[zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodEnum<["xs", "sm", "default", "md"]>]>>;
|
|
4494
4495
|
connections: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["pin1", "pin2", "pos", "neg", "anode", "cathode"]>, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>;
|
|
4495
4496
|
}, "strip", zod.ZodTypeAny, {
|
|
4496
4497
|
name: string;
|
|
@@ -4691,6 +4692,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, Polarized
|
|
|
4691
4692
|
showAsTranslucentModel?: boolean | undefined;
|
|
4692
4693
|
connections?: Partial<Record<"pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
4693
4694
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
4695
|
+
schSize?: number | "xs" | "sm" | "default" | "md" | undefined;
|
|
4694
4696
|
maxVoltageRating?: number | undefined;
|
|
4695
4697
|
decouplingFor?: string | undefined;
|
|
4696
4698
|
decouplingTo?: string | undefined;
|
|
@@ -4897,6 +4899,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, Polarized
|
|
|
4897
4899
|
connections?: Partial<Record<"pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
4898
4900
|
schShowRatings?: boolean | undefined;
|
|
4899
4901
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
4902
|
+
schSize?: string | number | undefined;
|
|
4900
4903
|
maxVoltageRating?: string | number | undefined;
|
|
4901
4904
|
polarized?: boolean | undefined;
|
|
4902
4905
|
decouplingFor?: string | undefined;
|
|
@@ -17982,6 +17985,7 @@ declare class Resistor extends NormalComponent<typeof resistorProps, PassivePort
|
|
|
17982
17985
|
pulldownFor: zod.ZodOptional<zod.ZodString>;
|
|
17983
17986
|
pulldownTo: zod.ZodOptional<zod.ZodString>;
|
|
17984
17987
|
schOrientation: zod.ZodOptional<zod.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
17988
|
+
schSize: zod.ZodOptional<zod.ZodUnion<[zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodEnum<["xs", "sm", "default", "md"]>]>>;
|
|
17985
17989
|
connections: zod.ZodOptional<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">]>>>;
|
|
17986
17990
|
}, "strip", zod.ZodTypeAny, {
|
|
17987
17991
|
name: string;
|
|
@@ -18184,6 +18188,7 @@ declare class Resistor extends NormalComponent<typeof resistorProps, PassivePort
|
|
|
18184
18188
|
pullupTo?: string | undefined;
|
|
18185
18189
|
pulldownFor?: string | undefined;
|
|
18186
18190
|
pulldownTo?: string | undefined;
|
|
18191
|
+
schSize?: number | "xs" | "sm" | "default" | "md" | undefined;
|
|
18187
18192
|
}, {
|
|
18188
18193
|
name: string;
|
|
18189
18194
|
resistance: string | number;
|
|
@@ -18387,6 +18392,7 @@ declare class Resistor extends NormalComponent<typeof resistorProps, PassivePort
|
|
|
18387
18392
|
pullupTo?: string | undefined;
|
|
18388
18393
|
pulldownFor?: string | undefined;
|
|
18389
18394
|
pulldownTo?: string | undefined;
|
|
18395
|
+
schSize?: string | number | undefined;
|
|
18390
18396
|
}>;
|
|
18391
18397
|
sourceFtype: Ftype;
|
|
18392
18398
|
};
|
|
@@ -40764,7 +40770,9 @@ interface TscircuitElements {
|
|
|
40764
40770
|
custom: any;
|
|
40765
40771
|
component: _tscircuit_props.ComponentProps;
|
|
40766
40772
|
crystal: _tscircuit_props.CrystalProps;
|
|
40767
|
-
footprint:
|
|
40773
|
+
footprint: _tscircuit_props.FootprintProps & {
|
|
40774
|
+
name?: string;
|
|
40775
|
+
};
|
|
40768
40776
|
silkscreentext: _tscircuit_props.SilkscreenTextProps;
|
|
40769
40777
|
cutout: _tscircuit_props.CutoutProps;
|
|
40770
40778
|
silkscreenpath: _tscircuit_props.SilkscreenPathProps;
|
package/dist/index.js
CHANGED
|
@@ -18689,7 +18689,7 @@ var VoltageProbe = class extends PrimitiveComponent2 {
|
|
|
18689
18689
|
}
|
|
18690
18690
|
doInitialSimulationRender() {
|
|
18691
18691
|
const { db } = this.root;
|
|
18692
|
-
const { connectsTo, name } = this._parsedProps;
|
|
18692
|
+
const { connectsTo, name, referenceTo, color } = this._parsedProps;
|
|
18693
18693
|
const subcircuit = this.getSubcircuit();
|
|
18694
18694
|
if (!subcircuit) {
|
|
18695
18695
|
this.renderError("VoltageProbe must be inside a subcircuit");
|
|
@@ -18722,7 +18722,35 @@ var VoltageProbe = class extends PrimitiveComponent2 {
|
|
|
18722
18722
|
this.renderError(`Could not identify connected source for VoltageProbe`);
|
|
18723
18723
|
return;
|
|
18724
18724
|
}
|
|
18725
|
-
|
|
18725
|
+
let referencePort = null;
|
|
18726
|
+
let referenceNet = null;
|
|
18727
|
+
if (referenceTo) {
|
|
18728
|
+
const referenceTargets = Array.isArray(referenceTo) ? referenceTo : [referenceTo];
|
|
18729
|
+
if (referenceTargets.length !== 1) {
|
|
18730
|
+
this.renderError("VoltageProbe must reference exactly one port or net");
|
|
18731
|
+
return;
|
|
18732
|
+
}
|
|
18733
|
+
const referenceSelector = referenceTargets[0];
|
|
18734
|
+
referencePort = subcircuit.selectOne(referenceSelector, {
|
|
18735
|
+
type: "port"
|
|
18736
|
+
});
|
|
18737
|
+
referenceNet = !referencePort ? subcircuit.selectOne(referenceSelector, {
|
|
18738
|
+
type: "net"
|
|
18739
|
+
}) : null;
|
|
18740
|
+
if (referenceNet && referenceNet.componentName !== "Net") {
|
|
18741
|
+
this.renderError(
|
|
18742
|
+
`VoltageProbe reference target "${referenceSelector}" resolved to a non-net component "${referenceNet.componentName}".`
|
|
18743
|
+
);
|
|
18744
|
+
return;
|
|
18745
|
+
}
|
|
18746
|
+
if (!referencePort && !referenceNet) {
|
|
18747
|
+
this.renderError(
|
|
18748
|
+
`VoltageProbe could not find reference target "${referenceSelector}"`
|
|
18749
|
+
);
|
|
18750
|
+
return;
|
|
18751
|
+
}
|
|
18752
|
+
}
|
|
18753
|
+
this.color = color ?? getSimulationColorForId(connectedId);
|
|
18726
18754
|
let finalName = name;
|
|
18727
18755
|
if (!finalName) {
|
|
18728
18756
|
finalName = targets[0].split(" > ").map((s) => s.replace(/^\./, "")).join(".");
|
|
@@ -18732,6 +18760,8 @@ var VoltageProbe = class extends PrimitiveComponent2 {
|
|
|
18732
18760
|
name: finalName,
|
|
18733
18761
|
signal_input_source_port_id: port?.source_port_id ?? void 0,
|
|
18734
18762
|
signal_input_source_net_id: net?.source_net_id ?? void 0,
|
|
18763
|
+
reference_input_source_port_id: referencePort?.source_port_id ?? void 0,
|
|
18764
|
+
reference_input_source_net_id: referenceNet?.source_net_id ?? void 0,
|
|
18735
18765
|
subcircuit_id: subcircuit.subcircuit_id || void 0,
|
|
18736
18766
|
color: this.color
|
|
18737
18767
|
});
|
|
@@ -18790,7 +18820,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
18790
18820
|
var package_default = {
|
|
18791
18821
|
name: "@tscircuit/core",
|
|
18792
18822
|
type: "module",
|
|
18793
|
-
version: "0.0.
|
|
18823
|
+
version: "0.0.886",
|
|
18794
18824
|
types: "dist/index.d.ts",
|
|
18795
18825
|
main: "dist/index.js",
|
|
18796
18826
|
module: "dist/index.js",
|
|
@@ -18834,7 +18864,7 @@ var package_default = {
|
|
|
18834
18864
|
"@tscircuit/math-utils": "^0.0.29",
|
|
18835
18865
|
"@tscircuit/miniflex": "^0.0.4",
|
|
18836
18866
|
"@tscircuit/ngspice-spice-engine": "^0.0.4",
|
|
18837
|
-
"@tscircuit/props": "^0.0.
|
|
18867
|
+
"@tscircuit/props": "^0.0.419",
|
|
18838
18868
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
18839
18869
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
18840
18870
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
@@ -18853,7 +18883,7 @@ var package_default = {
|
|
|
18853
18883
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
18854
18884
|
"circuit-json-to-gltf": "^0.0.31",
|
|
18855
18885
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
18856
|
-
"circuit-json-to-spice": "^0.0.
|
|
18886
|
+
"circuit-json-to-spice": "^0.0.26",
|
|
18857
18887
|
"circuit-to-svg": "^0.0.280",
|
|
18858
18888
|
concurrently: "^9.1.2",
|
|
18859
18889
|
"connectivity-map": "^1.0.0",
|
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.887",
|
|
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.4",
|
|
48
|
-
"@tscircuit/props": "^0.0.
|
|
48
|
+
"@tscircuit/props": "^0.0.419",
|
|
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",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
65
65
|
"circuit-json-to-gltf": "^0.0.31",
|
|
66
66
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
67
|
-
"circuit-json-to-spice": "^0.0.
|
|
67
|
+
"circuit-json-to-spice": "^0.0.26",
|
|
68
68
|
"circuit-to-svg": "^0.0.280",
|
|
69
69
|
"concurrently": "^9.1.2",
|
|
70
70
|
"connectivity-map": "^1.0.0",
|