@tscircuit/core 0.0.663 → 0.0.664
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 +7 -0
- package/dist/index.js +9 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -7570,6 +7570,7 @@ interface VoltageSourceProps extends CommonComponentProps {
|
|
|
7570
7570
|
peakToPeakVoltage?: number | string;
|
|
7571
7571
|
waveShape?: WaveShape;
|
|
7572
7572
|
phase?: number | string;
|
|
7573
|
+
dutyCycle?: number;
|
|
7573
7574
|
}
|
|
7574
7575
|
declare const voltageSourceProps: z.ZodObject<{
|
|
7575
7576
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -7859,6 +7860,7 @@ declare const voltageSourceProps: z.ZodObject<{
|
|
|
7859
7860
|
peakToPeakVoltage: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
7860
7861
|
waveShape: z.ZodOptional<z.ZodEnum<["sinewave", "square", "triangle", "sawtooth"]>>;
|
|
7861
7862
|
phase: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
7863
|
+
dutyCycle: z.ZodOptional<z.ZodNumber>;
|
|
7862
7864
|
}, "strip", z.ZodTypeAny, {
|
|
7863
7865
|
name: string;
|
|
7864
7866
|
children?: any;
|
|
@@ -7887,6 +7889,7 @@ declare const voltageSourceProps: z.ZodObject<{
|
|
|
7887
7889
|
}> | undefined;
|
|
7888
7890
|
peakToPeakVoltage?: number | undefined;
|
|
7889
7891
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
7892
|
+
dutyCycle?: number | undefined;
|
|
7890
7893
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
7891
7894
|
cadModel?: string | {
|
|
7892
7895
|
stlUrl: string;
|
|
@@ -7973,6 +7976,7 @@ declare const voltageSourceProps: z.ZodObject<{
|
|
|
7973
7976
|
}> | undefined;
|
|
7974
7977
|
peakToPeakVoltage?: string | number | undefined;
|
|
7975
7978
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
7979
|
+
dutyCycle?: number | undefined;
|
|
7976
7980
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
7977
7981
|
cadModel?: string | {
|
|
7978
7982
|
stlUrl: string;
|
|
@@ -8322,6 +8326,7 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
|
|
|
8322
8326
|
peakToPeakVoltage: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
8323
8327
|
waveShape: z.ZodOptional<z.ZodEnum<["sinewave", "square", "triangle", "sawtooth"]>>;
|
|
8324
8328
|
phase: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
8329
|
+
dutyCycle: z.ZodOptional<z.ZodNumber>;
|
|
8325
8330
|
}, "strip", z.ZodTypeAny, {
|
|
8326
8331
|
name: string;
|
|
8327
8332
|
children?: any;
|
|
@@ -8350,6 +8355,7 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
|
|
|
8350
8355
|
}> | undefined;
|
|
8351
8356
|
peakToPeakVoltage?: number | undefined;
|
|
8352
8357
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
8358
|
+
dutyCycle?: number | undefined;
|
|
8353
8359
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
8354
8360
|
cadModel?: string | {
|
|
8355
8361
|
stlUrl: string;
|
|
@@ -8436,6 +8442,7 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
|
|
|
8436
8442
|
}> | undefined;
|
|
8437
8443
|
peakToPeakVoltage?: string | number | undefined;
|
|
8438
8444
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
8445
|
+
dutyCycle?: number | undefined;
|
|
8439
8446
|
supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
8440
8447
|
cadModel?: string | {
|
|
8441
8448
|
stlUrl: string;
|
package/dist/index.js
CHANGED
|
@@ -12059,13 +12059,15 @@ var voltageSourceProps = commonComponentProps.extend({
|
|
|
12059
12059
|
frequency: frequency.optional(),
|
|
12060
12060
|
peakToPeakVoltage: voltage.optional(),
|
|
12061
12061
|
waveShape: z12.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
12062
|
-
phase: rotation2.optional()
|
|
12062
|
+
phase: rotation2.optional(),
|
|
12063
|
+
dutyCycle: z12.number().optional()
|
|
12063
12064
|
});
|
|
12064
12065
|
var VoltageSource = class extends NormalComponent {
|
|
12065
12066
|
get config() {
|
|
12067
|
+
const isSquare = this.props.waveShape === "square";
|
|
12066
12068
|
return {
|
|
12067
12069
|
componentName: "VoltageSource",
|
|
12068
|
-
schematicSymbolName: "ac_voltmeter",
|
|
12070
|
+
schematicSymbolName: isSquare ? "square_wave" : "ac_voltmeter",
|
|
12069
12071
|
zodProps: voltageSourceProps,
|
|
12070
12072
|
sourceFtype: "simple_voltage_source"
|
|
12071
12073
|
};
|
|
@@ -12100,6 +12102,7 @@ var VoltageSource = class extends NormalComponent {
|
|
|
12100
12102
|
peak_to_peak_voltage: props.peakToPeakVoltage,
|
|
12101
12103
|
wave_shape: props.waveShape,
|
|
12102
12104
|
phase: props.phase,
|
|
12105
|
+
duty_cycle: props.dutyCycle,
|
|
12103
12106
|
supplier_part_numbers: props.supplierPartNumbers,
|
|
12104
12107
|
are_pins_interchangeable: true
|
|
12105
12108
|
});
|
|
@@ -12119,7 +12122,8 @@ var VoltageSource = class extends NormalComponent {
|
|
|
12119
12122
|
frequency: props.frequency,
|
|
12120
12123
|
peak_to_peak_voltage: props.peakToPeakVoltage,
|
|
12121
12124
|
wave_shape: props.waveShape,
|
|
12122
|
-
phase: props.phase
|
|
12125
|
+
phase: props.phase,
|
|
12126
|
+
duty_cycle: props.dutyCycle
|
|
12123
12127
|
});
|
|
12124
12128
|
}
|
|
12125
12129
|
terminal1 = this.portMap.terminal1;
|
|
@@ -13826,7 +13830,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
13826
13830
|
var package_default = {
|
|
13827
13831
|
name: "@tscircuit/core",
|
|
13828
13832
|
type: "module",
|
|
13829
|
-
version: "0.0.
|
|
13833
|
+
version: "0.0.663",
|
|
13830
13834
|
types: "dist/index.d.ts",
|
|
13831
13835
|
main: "dist/index.js",
|
|
13832
13836
|
module: "dist/index.js",
|
|
@@ -13895,7 +13899,7 @@ var package_default = {
|
|
|
13895
13899
|
"pkg-pr-new": "^0.0.37",
|
|
13896
13900
|
react: "^19.1.0",
|
|
13897
13901
|
"react-dom": "^19.1.0",
|
|
13898
|
-
"schematic-symbols": "^0.0.
|
|
13902
|
+
"schematic-symbols": "^0.0.195",
|
|
13899
13903
|
"ts-expect": "^1.3.0",
|
|
13900
13904
|
tsup: "^8.2.4"
|
|
13901
13905
|
},
|
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.664",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"pkg-pr-new": "^0.0.37",
|
|
71
71
|
"react": "^19.1.0",
|
|
72
72
|
"react-dom": "^19.1.0",
|
|
73
|
-
"schematic-symbols": "^0.0.
|
|
73
|
+
"schematic-symbols": "^0.0.195",
|
|
74
74
|
"ts-expect": "^1.3.0",
|
|
75
75
|
"tsup": "^8.2.4"
|
|
76
76
|
},
|