@tscircuit/core 0.0.1325 → 0.0.1327
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 +80 -6
- package/dist/index.js +31 -15
- package/package.json +8 -9
package/dist/index.d.ts
CHANGED
|
@@ -60892,6 +60892,11 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
|
|
|
60892
60892
|
waveShape: zod.ZodOptional<zod.ZodEnum<["sinewave", "square", "triangle", "sawtooth"]>>;
|
|
60893
60893
|
phase: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
60894
60894
|
dutyCycle: zod.ZodOptional<zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>>;
|
|
60895
|
+
pulseDelay: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
60896
|
+
riseTime: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
60897
|
+
fallTime: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
60898
|
+
pulseWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
60899
|
+
period: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
60895
60900
|
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">]>>>;
|
|
60896
60901
|
}, "strip", zod.ZodTypeAny, {
|
|
60897
60902
|
name: string;
|
|
@@ -61477,6 +61482,11 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
|
|
|
61477
61482
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
61478
61483
|
phase?: number | undefined;
|
|
61479
61484
|
dutyCycle?: number | undefined;
|
|
61485
|
+
pulseDelay?: number | undefined;
|
|
61486
|
+
riseTime?: number | undefined;
|
|
61487
|
+
fallTime?: number | undefined;
|
|
61488
|
+
pulseWidth?: number | undefined;
|
|
61489
|
+
period?: number | undefined;
|
|
61480
61490
|
}, {
|
|
61481
61491
|
name: string;
|
|
61482
61492
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
@@ -62063,6 +62073,11 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
|
|
|
62063
62073
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
62064
62074
|
phase?: string | number | undefined;
|
|
62065
62075
|
dutyCycle?: string | number | undefined;
|
|
62076
|
+
pulseDelay?: string | number | undefined;
|
|
62077
|
+
riseTime?: string | number | undefined;
|
|
62078
|
+
fallTime?: string | number | undefined;
|
|
62079
|
+
pulseWidth?: string | number | undefined;
|
|
62080
|
+
period?: string | number | undefined;
|
|
62066
62081
|
}>;
|
|
62067
62082
|
sourceFtype: Ftype;
|
|
62068
62083
|
};
|
|
@@ -148082,21 +148097,52 @@ declare class SymbolComponent extends PrimitiveComponent<typeof symbolProps> imp
|
|
|
148082
148097
|
declare class AnalogSimulation extends PrimitiveComponent<typeof analogSimulationProps> {
|
|
148083
148098
|
get config(): {
|
|
148084
148099
|
componentName: string;
|
|
148085
|
-
zodProps:
|
|
148086
|
-
simulationType:
|
|
148087
|
-
duration:
|
|
148088
|
-
|
|
148089
|
-
|
|
148090
|
-
|
|
148100
|
+
zodProps: zod.ZodObject<{
|
|
148101
|
+
simulationType: zod.ZodDefault<zod.ZodLiteral<"spice_transient_analysis">>;
|
|
148102
|
+
duration: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
148103
|
+
startTime: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
148104
|
+
timePerStep: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
148105
|
+
spiceEngine: zod.ZodOptional<zod.ZodType<_tscircuit_props.AutocompleteString<"spicey" | "ngspice">, zod.ZodTypeDef, _tscircuit_props.AutocompleteString<"spicey" | "ngspice">>>;
|
|
148106
|
+
spiceOptions: zod.ZodOptional<zod.ZodObject<{
|
|
148107
|
+
method: zod.ZodOptional<zod.ZodEnum<["trap", "gear"]>>;
|
|
148108
|
+
reltol: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
148109
|
+
abstol: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
148110
|
+
vntol: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
148111
|
+
}, "strip", zod.ZodTypeAny, {
|
|
148112
|
+
method?: "trap" | "gear" | undefined;
|
|
148113
|
+
reltol?: string | number | undefined;
|
|
148114
|
+
abstol?: string | number | undefined;
|
|
148115
|
+
vntol?: string | number | undefined;
|
|
148116
|
+
}, {
|
|
148117
|
+
method?: "trap" | "gear" | undefined;
|
|
148118
|
+
reltol?: string | number | undefined;
|
|
148119
|
+
abstol?: string | number | undefined;
|
|
148120
|
+
vntol?: string | number | undefined;
|
|
148121
|
+
}>>;
|
|
148122
|
+
}, "strip", zod.ZodTypeAny, {
|
|
148091
148123
|
simulationType: "spice_transient_analysis";
|
|
148092
148124
|
duration?: number | undefined;
|
|
148125
|
+
startTime?: number | undefined;
|
|
148093
148126
|
timePerStep?: number | undefined;
|
|
148094
148127
|
spiceEngine?: _tscircuit_props.AutocompleteString<"spicey" | "ngspice"> | undefined;
|
|
148128
|
+
spiceOptions?: {
|
|
148129
|
+
method?: "trap" | "gear" | undefined;
|
|
148130
|
+
reltol?: string | number | undefined;
|
|
148131
|
+
abstol?: string | number | undefined;
|
|
148132
|
+
vntol?: string | number | undefined;
|
|
148133
|
+
} | undefined;
|
|
148095
148134
|
}, {
|
|
148096
148135
|
duration?: string | number | undefined;
|
|
148097
148136
|
simulationType?: "spice_transient_analysis" | undefined;
|
|
148137
|
+
startTime?: string | number | undefined;
|
|
148098
148138
|
timePerStep?: string | number | undefined;
|
|
148099
148139
|
spiceEngine?: _tscircuit_props.AutocompleteString<"spicey" | "ngspice"> | undefined;
|
|
148140
|
+
spiceOptions?: {
|
|
148141
|
+
method?: "trap" | "gear" | undefined;
|
|
148142
|
+
reltol?: string | number | undefined;
|
|
148143
|
+
abstol?: string | number | undefined;
|
|
148144
|
+
vntol?: string | number | undefined;
|
|
148145
|
+
} | undefined;
|
|
148100
148146
|
}>;
|
|
148101
148147
|
};
|
|
148102
148148
|
doInitialSimulationRender(): void;
|
|
@@ -151472,6 +151518,22 @@ declare class VoltageProbe extends PrimitiveComponent<typeof voltageProbeProps>
|
|
|
151472
151518
|
connectsTo: z.ZodString;
|
|
151473
151519
|
referenceTo: z.ZodOptional<z.ZodString>;
|
|
151474
151520
|
color: z.ZodOptional<z.ZodString>;
|
|
151521
|
+
display: z.ZodOptional<z.ZodObject<{
|
|
151522
|
+
label: z.ZodOptional<z.ZodString>;
|
|
151523
|
+
center: z.ZodOptional<z.ZodNumber>;
|
|
151524
|
+
offsetDivs: z.ZodOptional<z.ZodNumber>;
|
|
151525
|
+
unitsPerDiv: z.ZodOptional<z.ZodNumber>;
|
|
151526
|
+
}, "strip", z.ZodTypeAny, {
|
|
151527
|
+
center?: number | undefined;
|
|
151528
|
+
label?: string | undefined;
|
|
151529
|
+
offsetDivs?: number | undefined;
|
|
151530
|
+
unitsPerDiv?: number | undefined;
|
|
151531
|
+
}, {
|
|
151532
|
+
center?: number | undefined;
|
|
151533
|
+
label?: string | undefined;
|
|
151534
|
+
offsetDivs?: number | undefined;
|
|
151535
|
+
unitsPerDiv?: number | undefined;
|
|
151536
|
+
}>>;
|
|
151475
151537
|
}, "strip", z.ZodTypeAny, {
|
|
151476
151538
|
connectsTo: string;
|
|
151477
151539
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
@@ -152052,6 +152114,12 @@ declare class VoltageProbe extends PrimitiveComponent<typeof voltageProbeProps>
|
|
|
152052
152114
|
schSectionName?: string | undefined;
|
|
152053
152115
|
color?: string | undefined;
|
|
152054
152116
|
referenceTo?: string | undefined;
|
|
152117
|
+
display?: {
|
|
152118
|
+
center?: number | undefined;
|
|
152119
|
+
label?: string | undefined;
|
|
152120
|
+
offsetDivs?: number | undefined;
|
|
152121
|
+
unitsPerDiv?: number | undefined;
|
|
152122
|
+
} | undefined;
|
|
152055
152123
|
}, {
|
|
152056
152124
|
connectsTo: string;
|
|
152057
152125
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
@@ -152634,6 +152702,12 @@ declare class VoltageProbe extends PrimitiveComponent<typeof voltageProbeProps>
|
|
|
152634
152702
|
schSectionName?: string | undefined;
|
|
152635
152703
|
color?: string | undefined;
|
|
152636
152704
|
referenceTo?: string | undefined;
|
|
152705
|
+
display?: {
|
|
152706
|
+
center?: number | undefined;
|
|
152707
|
+
label?: string | undefined;
|
|
152708
|
+
offsetDivs?: number | undefined;
|
|
152709
|
+
unitsPerDiv?: number | undefined;
|
|
152710
|
+
} | undefined;
|
|
152637
152711
|
}>;
|
|
152638
152712
|
};
|
|
152639
152713
|
doInitialSimulationRender(): void;
|
package/dist/index.js
CHANGED
|
@@ -23566,7 +23566,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
23566
23566
|
var package_default = {
|
|
23567
23567
|
name: "@tscircuit/core",
|
|
23568
23568
|
type: "module",
|
|
23569
|
-
version: "0.0.
|
|
23569
|
+
version: "0.0.1326",
|
|
23570
23570
|
types: "dist/index.d.ts",
|
|
23571
23571
|
main: "dist/index.js",
|
|
23572
23572
|
module: "dist/index.js",
|
|
@@ -23613,11 +23613,11 @@ var package_default = {
|
|
|
23613
23613
|
"@tscircuit/matchpack": "",
|
|
23614
23614
|
"@tscircuit/math-utils": "^0.0.36",
|
|
23615
23615
|
"@tscircuit/miniflex": "^0.0.4",
|
|
23616
|
-
"@tscircuit/props": "^0.0.
|
|
23617
|
-
"@tscircuit/ngspice-spice-engine": "^0.0.
|
|
23616
|
+
"@tscircuit/props": "^0.0.549",
|
|
23617
|
+
"@tscircuit/ngspice-spice-engine": "^0.0.15",
|
|
23618
23618
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
23619
23619
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
23620
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
23620
|
+
"@tscircuit/schematic-trace-solver": "^0.0.69",
|
|
23621
23621
|
"@tscircuit/soup-util": "^0.0.41",
|
|
23622
23622
|
"@types/bun": "^1.2.16",
|
|
23623
23623
|
"@types/debug": "^4.1.12",
|
|
@@ -23628,17 +23628,16 @@ var package_default = {
|
|
|
23628
23628
|
"bun-match-svg": "0.0.12",
|
|
23629
23629
|
"calculate-elbow": "^0.0.12",
|
|
23630
23630
|
"chokidar-cli": "^3.0.0",
|
|
23631
|
-
"circuit-json": "^0.0.
|
|
23631
|
+
"circuit-json": "^0.0.435",
|
|
23632
23632
|
"circuit-json-to-bpc": "^0.0.13",
|
|
23633
23633
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
23634
23634
|
"circuit-json-to-gltf": "^0.0.102",
|
|
23635
23635
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
23636
|
-
"circuit-json-to-spice": "^0.0.
|
|
23637
|
-
"circuit-to-svg": "^0.0.
|
|
23636
|
+
"circuit-json-to-spice": "^0.0.38",
|
|
23637
|
+
"circuit-to-svg": "^0.0.356",
|
|
23638
23638
|
concurrently: "^9.1.2",
|
|
23639
23639
|
"connectivity-map": "^1.0.0",
|
|
23640
23640
|
debug: "^4.3.6",
|
|
23641
|
-
"eecircuit-engine": "^1.5.6",
|
|
23642
23641
|
flatbush: "^4.5.0",
|
|
23643
23642
|
"graphics-debug": "^0.0.95",
|
|
23644
23643
|
howfat: "^0.3.8",
|
|
@@ -23681,7 +23680,7 @@ var package_default = {
|
|
|
23681
23680
|
"calculate-cell-boundaries": "^0.0.13",
|
|
23682
23681
|
"calculate-packing": "0.0.73",
|
|
23683
23682
|
"css-select": "5.1.0",
|
|
23684
|
-
"format-si-unit": "^0.0.
|
|
23683
|
+
"format-si-unit": "^0.0.7",
|
|
23685
23684
|
nanoid: "^5.0.7",
|
|
23686
23685
|
"performance-now": "^2.1.0",
|
|
23687
23686
|
"react-reconciler": "^0.32.0",
|
|
@@ -26164,6 +26163,11 @@ var VoltageSource = class extends NormalComponent3 {
|
|
|
26164
26163
|
wave_shape: props.waveShape,
|
|
26165
26164
|
phase: props.phase,
|
|
26166
26165
|
duty_cycle: props.dutyCycle,
|
|
26166
|
+
pulse_delay: props.pulseDelay,
|
|
26167
|
+
rise_time: props.riseTime,
|
|
26168
|
+
fall_time: props.fallTime,
|
|
26169
|
+
pulse_width: props.pulseWidth,
|
|
26170
|
+
period: props.period,
|
|
26167
26171
|
supplier_part_numbers: props.supplierPartNumbers,
|
|
26168
26172
|
are_pins_interchangeable: true,
|
|
26169
26173
|
display_name: props.displayName
|
|
@@ -26185,7 +26189,12 @@ var VoltageSource = class extends NormalComponent3 {
|
|
|
26185
26189
|
peak_to_peak_voltage: props.peakToPeakVoltage,
|
|
26186
26190
|
wave_shape: props.waveShape,
|
|
26187
26191
|
phase: props.phase,
|
|
26188
|
-
duty_cycle: props.dutyCycle
|
|
26192
|
+
duty_cycle: props.dutyCycle,
|
|
26193
|
+
pulse_delay: props.pulseDelay,
|
|
26194
|
+
rise_time: props.riseTime,
|
|
26195
|
+
fall_time: props.fallTime,
|
|
26196
|
+
pulse_width: props.pulseWidth,
|
|
26197
|
+
period: props.period
|
|
26189
26198
|
});
|
|
26190
26199
|
}
|
|
26191
26200
|
terminal1 = this.portMap.terminal1;
|
|
@@ -29882,7 +29891,6 @@ var SchematicCell = class extends PrimitiveComponent2 {
|
|
|
29882
29891
|
import {
|
|
29883
29892
|
analogSimulationProps
|
|
29884
29893
|
} from "@tscircuit/props";
|
|
29885
|
-
import "zod";
|
|
29886
29894
|
var AnalogSimulation = class extends PrimitiveComponent2 {
|
|
29887
29895
|
get config() {
|
|
29888
29896
|
return {
|
|
@@ -29892,14 +29900,16 @@ var AnalogSimulation = class extends PrimitiveComponent2 {
|
|
|
29892
29900
|
}
|
|
29893
29901
|
doInitialSimulationRender() {
|
|
29894
29902
|
const { db } = this.root;
|
|
29895
|
-
const { duration, timePerStep } = this._parsedProps;
|
|
29903
|
+
const { duration, startTime, timePerStep, spiceOptions } = this._parsedProps;
|
|
29896
29904
|
const durationMs = duration || 10;
|
|
29897
29905
|
const timePerStepMs = timePerStep || 0.01;
|
|
29898
29906
|
db.simulation_experiment.insert({
|
|
29899
29907
|
name: "spice_transient_analysis",
|
|
29900
29908
|
experiment_type: "spice_transient_analysis",
|
|
29901
29909
|
end_time_ms: durationMs,
|
|
29902
|
-
|
|
29910
|
+
start_time_ms: startTime,
|
|
29911
|
+
time_per_step: timePerStepMs,
|
|
29912
|
+
spice_options: spiceOptions
|
|
29903
29913
|
});
|
|
29904
29914
|
}
|
|
29905
29915
|
};
|
|
@@ -30041,7 +30051,7 @@ var VoltageProbe = class extends PrimitiveComponent2 {
|
|
|
30041
30051
|
}
|
|
30042
30052
|
doInitialSimulationRender() {
|
|
30043
30053
|
const { db } = this.root;
|
|
30044
|
-
const { connectsTo, name, referenceTo, color } = this._parsedProps;
|
|
30054
|
+
const { connectsTo, name, referenceTo, color, display } = this._parsedProps;
|
|
30045
30055
|
const subcircuit = this.getSubcircuit();
|
|
30046
30056
|
if (!subcircuit) {
|
|
30047
30057
|
this.renderError("VoltageProbe must be inside a subcircuit");
|
|
@@ -30115,7 +30125,13 @@ var VoltageProbe = class extends PrimitiveComponent2 {
|
|
|
30115
30125
|
reference_input_source_port_id: referencePort?.source_port_id ?? void 0,
|
|
30116
30126
|
reference_input_source_net_id: referenceNet?.source_net_id ?? void 0,
|
|
30117
30127
|
subcircuit_id: subcircuit.subcircuit_id || void 0,
|
|
30118
|
-
color: this.color
|
|
30128
|
+
color: this.color,
|
|
30129
|
+
display_options: display ? {
|
|
30130
|
+
label: display.label,
|
|
30131
|
+
center: display.center,
|
|
30132
|
+
offset_divs: display.offsetDivs,
|
|
30133
|
+
units_per_div: display.unitsPerDiv
|
|
30134
|
+
} : void 0
|
|
30119
30135
|
});
|
|
30120
30136
|
this.simulation_voltage_probe_id = simulation_voltage_probe_id;
|
|
30121
30137
|
}
|
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.1327",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"@tscircuit/matchpack": "",
|
|
49
49
|
"@tscircuit/math-utils": "^0.0.36",
|
|
50
50
|
"@tscircuit/miniflex": "^0.0.4",
|
|
51
|
-
"@tscircuit/props": "^0.0.
|
|
52
|
-
"@tscircuit/ngspice-spice-engine": "^0.0.
|
|
51
|
+
"@tscircuit/props": "^0.0.549",
|
|
52
|
+
"@tscircuit/ngspice-spice-engine": "^0.0.15",
|
|
53
53
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
54
54
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
55
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
55
|
+
"@tscircuit/schematic-trace-solver": "^0.0.69",
|
|
56
56
|
"@tscircuit/soup-util": "^0.0.41",
|
|
57
57
|
"@types/bun": "^1.2.16",
|
|
58
58
|
"@types/debug": "^4.1.12",
|
|
@@ -63,17 +63,16 @@
|
|
|
63
63
|
"bun-match-svg": "0.0.12",
|
|
64
64
|
"calculate-elbow": "^0.0.12",
|
|
65
65
|
"chokidar-cli": "^3.0.0",
|
|
66
|
-
"circuit-json": "^0.0.
|
|
66
|
+
"circuit-json": "^0.0.435",
|
|
67
67
|
"circuit-json-to-bpc": "^0.0.13",
|
|
68
68
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
69
69
|
"circuit-json-to-gltf": "^0.0.102",
|
|
70
70
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
71
|
-
"circuit-json-to-spice": "^0.0.
|
|
72
|
-
"circuit-to-svg": "^0.0.
|
|
71
|
+
"circuit-json-to-spice": "^0.0.38",
|
|
72
|
+
"circuit-to-svg": "^0.0.356",
|
|
73
73
|
"concurrently": "^9.1.2",
|
|
74
74
|
"connectivity-map": "^1.0.0",
|
|
75
75
|
"debug": "^4.3.6",
|
|
76
|
-
"eecircuit-engine": "^1.5.6",
|
|
77
76
|
"flatbush": "^4.5.0",
|
|
78
77
|
"graphics-debug": "^0.0.95",
|
|
79
78
|
"howfat": "^0.3.8",
|
|
@@ -116,7 +115,7 @@
|
|
|
116
115
|
"calculate-cell-boundaries": "^0.0.13",
|
|
117
116
|
"calculate-packing": "0.0.73",
|
|
118
117
|
"css-select": "5.1.0",
|
|
119
|
-
"format-si-unit": "^0.0.
|
|
118
|
+
"format-si-unit": "^0.0.7",
|
|
120
119
|
"nanoid": "^5.0.7",
|
|
121
120
|
"performance-now": "^2.1.0",
|
|
122
121
|
"react-reconciler": "^0.32.0",
|