@tscircuit/core 0.0.315 → 0.0.317
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 +6 -0
- package/dist/index.js +6 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1640,6 +1640,8 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
|
|
|
1640
1640
|
symbolName: zod.ZodOptional<zod.ZodString>;
|
|
1641
1641
|
}>, {
|
|
1642
1642
|
capacitance: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
1643
|
+
maxVoltageRating: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1644
|
+
schShowRatings: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
1643
1645
|
polarized: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
1644
1646
|
decouplingFor: zod.ZodOptional<zod.ZodString>;
|
|
1645
1647
|
decouplingTo: zod.ZodOptional<zod.ZodString>;
|
|
@@ -1649,6 +1651,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
|
|
|
1649
1651
|
}>, "strip", zod.ZodTypeAny, {
|
|
1650
1652
|
name: string;
|
|
1651
1653
|
capacitance: number;
|
|
1654
|
+
schShowRatings: boolean;
|
|
1652
1655
|
polarized: boolean;
|
|
1653
1656
|
pcbX?: number | undefined;
|
|
1654
1657
|
pcbY?: number | undefined;
|
|
@@ -1715,6 +1718,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
|
|
|
1715
1718
|
} | undefined;
|
|
1716
1719
|
children?: any;
|
|
1717
1720
|
symbolName?: string | undefined;
|
|
1721
|
+
maxVoltageRating?: number | undefined;
|
|
1718
1722
|
decouplingFor?: string | undefined;
|
|
1719
1723
|
decouplingTo?: string | undefined;
|
|
1720
1724
|
bypassFor?: string | undefined;
|
|
@@ -1790,6 +1794,8 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
|
|
|
1790
1794
|
} | undefined;
|
|
1791
1795
|
children?: any;
|
|
1792
1796
|
symbolName?: string | undefined;
|
|
1797
|
+
maxVoltageRating?: string | number | undefined;
|
|
1798
|
+
schShowRatings?: boolean | undefined;
|
|
1793
1799
|
polarized?: boolean | undefined;
|
|
1794
1800
|
decouplingFor?: string | undefined;
|
|
1795
1801
|
decouplingTo?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -5581,7 +5581,11 @@ var Capacitor = class extends NormalComponent {
|
|
|
5581
5581
|
});
|
|
5582
5582
|
}
|
|
5583
5583
|
_getSchematicSymbolDisplayValue() {
|
|
5584
|
-
|
|
5584
|
+
const capacitanceDisplay = `${formatSiUnit(this._parsedProps.capacitance)}F`;
|
|
5585
|
+
if (this._parsedProps.schShowRatings && this._parsedProps.maxVoltageRating) {
|
|
5586
|
+
return `${capacitanceDisplay}/${formatSiUnit(this._parsedProps.maxVoltageRating)}V`;
|
|
5587
|
+
}
|
|
5588
|
+
return capacitanceDisplay;
|
|
5585
5589
|
}
|
|
5586
5590
|
doInitialCreateNetsFromProps() {
|
|
5587
5591
|
this._createNetsFromProps([
|
|
@@ -5615,6 +5619,7 @@ var Capacitor = class extends NormalComponent {
|
|
|
5615
5619
|
manufacturer_part_number: props.manufacturerPartNumber ?? props.mfn,
|
|
5616
5620
|
supplier_part_numbers: props.supplierPartNumbers,
|
|
5617
5621
|
capacitance: props.capacitance,
|
|
5622
|
+
max_voltage_rating: props.maxVoltageRating,
|
|
5618
5623
|
max_decoupling_trace_length: props.maxDecouplingTraceLength,
|
|
5619
5624
|
display_capacitance: this._getSchematicSymbolDisplayValue()
|
|
5620
5625
|
});
|
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.317",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@lume/kiwi": "^0.4.3",
|
|
54
|
-
"@tscircuit/footprinter": "^0.0.
|
|
54
|
+
"@tscircuit/footprinter": "^0.0.124",
|
|
55
55
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
56
56
|
"@tscircuit/math-utils": "^0.0.9",
|
|
57
|
-
"@tscircuit/props": "^0.0.
|
|
57
|
+
"@tscircuit/props": "^0.0.152",
|
|
58
58
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
59
59
|
"@tscircuit/soup-util": "^0.0.41",
|
|
60
|
-
"circuit-json": "^0.0.
|
|
60
|
+
"circuit-json": "^0.0.139",
|
|
61
61
|
"circuit-json-to-connectivity-map": "^0.0.17",
|
|
62
62
|
"format-si-unit": "^0.0.3",
|
|
63
63
|
"nanoid": "^5.0.7",
|