@tscircuit/core 0.0.768 → 0.0.770
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 +26 -75
- package/dist/index.js +29 -18
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1926,40 +1926,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1926
1926
|
minTraceWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1927
1927
|
partsEngine: zod.ZodOptional<zod.ZodType<_tscircuit_props.PartsEngine, zod.ZodTypeDef, _tscircuit_props.PartsEngine>>;
|
|
1928
1928
|
pcbRouteCache: zod.ZodOptional<zod.ZodType<_tscircuit_props.PcbRouteCache, zod.ZodTypeDef, _tscircuit_props.PcbRouteCache>>;
|
|
1929
|
-
autorouter: zod.ZodOptional<zod.
|
|
1930
|
-
serverUrl: zod.ZodOptional<zod.ZodString>;
|
|
1931
|
-
inputFormat: zod.ZodOptional<zod.ZodEnum<["simplified", "circuit-json"]>>;
|
|
1932
|
-
serverMode: zod.ZodOptional<zod.ZodEnum<["job", "solve-endpoint"]>>;
|
|
1933
|
-
serverCacheEnabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
1934
|
-
cache: zod.ZodOptional<zod.ZodType<_tscircuit_props.PcbRouteCache, zod.ZodTypeDef, _tscircuit_props.PcbRouteCache>>;
|
|
1935
|
-
traceClearance: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1936
|
-
groupMode: zod.ZodOptional<zod.ZodEnum<["sequential_trace", "subcircuit", "sequential-trace"]>>;
|
|
1937
|
-
algorithmFn: zod.ZodOptional<zod.ZodType<(simpleRouteJson: any) => Promise<any>, zod.ZodTypeDef, (simpleRouteJson: any) => Promise<any>>>;
|
|
1938
|
-
preset: zod.ZodOptional<zod.ZodEnum<["sequential_trace", "subcircuit", "auto", "auto_local", "auto_cloud", "freerouting", "sequential-trace", "auto-local", "auto-cloud"]>>;
|
|
1939
|
-
local: zod.ZodOptional<zod.ZodBoolean>;
|
|
1940
|
-
}, "strip", zod.ZodTypeAny, {
|
|
1941
|
-
serverUrl?: string | undefined;
|
|
1942
|
-
inputFormat?: "simplified" | "circuit-json" | undefined;
|
|
1943
|
-
serverMode?: "job" | "solve-endpoint" | undefined;
|
|
1944
|
-
serverCacheEnabled?: boolean | undefined;
|
|
1945
|
-
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1946
|
-
traceClearance?: number | undefined;
|
|
1947
|
-
groupMode?: "sequential_trace" | "subcircuit" | "sequential-trace" | undefined;
|
|
1948
|
-
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1949
|
-
preset?: "sequential_trace" | "subcircuit" | "sequential-trace" | "auto" | "auto_local" | "auto_cloud" | "freerouting" | "auto-local" | "auto-cloud" | undefined;
|
|
1950
|
-
local?: boolean | undefined;
|
|
1951
|
-
}, {
|
|
1952
|
-
serverUrl?: string | undefined;
|
|
1953
|
-
inputFormat?: "simplified" | "circuit-json" | undefined;
|
|
1954
|
-
serverMode?: "job" | "solve-endpoint" | undefined;
|
|
1955
|
-
serverCacheEnabled?: boolean | undefined;
|
|
1956
|
-
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
1957
|
-
traceClearance?: string | number | undefined;
|
|
1958
|
-
groupMode?: "sequential_trace" | "subcircuit" | "sequential-trace" | undefined;
|
|
1959
|
-
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
1960
|
-
preset?: "sequential_trace" | "subcircuit" | "sequential-trace" | "auto" | "auto_local" | "auto_cloud" | "freerouting" | "auto-local" | "auto-cloud" | undefined;
|
|
1961
|
-
local?: boolean | undefined;
|
|
1962
|
-
}>, zod.ZodLiteral<"sequential_trace">, zod.ZodLiteral<"subcircuit">, zod.ZodLiteral<"auto">, zod.ZodLiteral<"auto_local">, zod.ZodLiteral<"auto_cloud">, zod.ZodLiteral<"freerouting">, zod.ZodLiteral<"sequential-trace">, zod.ZodLiteral<"auto-local">, zod.ZodLiteral<"auto-cloud">]>>;
|
|
1929
|
+
autorouter: zod.ZodOptional<zod.ZodType<_tscircuit_props.AutorouterProp, zod.ZodTypeDef, _tscircuit_props.AutorouterProp>>;
|
|
1963
1930
|
square: zod.ZodOptional<zod.ZodBoolean>;
|
|
1964
1931
|
emptyArea: zod.ZodOptional<zod.ZodString>;
|
|
1965
1932
|
filledArea: zod.ZodOptional<zod.ZodString>;
|
|
@@ -2263,18 +2230,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2263
2230
|
defaultTraceWidth?: number | undefined;
|
|
2264
2231
|
minTraceWidth?: number | undefined;
|
|
2265
2232
|
pcbRouteCache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
2266
|
-
autorouter?:
|
|
2267
|
-
serverUrl?: string | undefined;
|
|
2268
|
-
inputFormat?: "simplified" | "circuit-json" | undefined;
|
|
2269
|
-
serverMode?: "job" | "solve-endpoint" | undefined;
|
|
2270
|
-
serverCacheEnabled?: boolean | undefined;
|
|
2271
|
-
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
2272
|
-
traceClearance?: number | undefined;
|
|
2273
|
-
groupMode?: "sequential_trace" | "subcircuit" | "sequential-trace" | undefined;
|
|
2274
|
-
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
2275
|
-
preset?: "sequential_trace" | "subcircuit" | "sequential-trace" | "auto" | "auto_local" | "auto_cloud" | "freerouting" | "auto-local" | "auto-cloud" | undefined;
|
|
2276
|
-
local?: boolean | undefined;
|
|
2277
|
-
} | undefined;
|
|
2233
|
+
autorouter?: _tscircuit_props.AutorouterProp | undefined;
|
|
2278
2234
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
2279
2235
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
2280
2236
|
schMaxTraceDistance?: number | undefined;
|
|
@@ -2567,18 +2523,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2567
2523
|
defaultTraceWidth?: string | number | undefined;
|
|
2568
2524
|
minTraceWidth?: string | number | undefined;
|
|
2569
2525
|
pcbRouteCache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
2570
|
-
autorouter?:
|
|
2571
|
-
serverUrl?: string | undefined;
|
|
2572
|
-
inputFormat?: "simplified" | "circuit-json" | undefined;
|
|
2573
|
-
serverMode?: "job" | "solve-endpoint" | undefined;
|
|
2574
|
-
serverCacheEnabled?: boolean | undefined;
|
|
2575
|
-
cache?: _tscircuit_props.PcbRouteCache | undefined;
|
|
2576
|
-
traceClearance?: string | number | undefined;
|
|
2577
|
-
groupMode?: "sequential_trace" | "subcircuit" | "sequential-trace" | undefined;
|
|
2578
|
-
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
2579
|
-
preset?: "sequential_trace" | "subcircuit" | "sequential-trace" | "auto" | "auto_local" | "auto_cloud" | "freerouting" | "auto-local" | "auto-cloud" | undefined;
|
|
2580
|
-
local?: boolean | undefined;
|
|
2581
|
-
} | undefined;
|
|
2526
|
+
autorouter?: _tscircuit_props.AutorouterProp | undefined;
|
|
2582
2527
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
2583
2528
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
2584
2529
|
schMaxTraceDistance?: string | number | undefined;
|
|
@@ -3279,8 +3224,8 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, Polarized
|
|
|
3279
3224
|
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">]>>>;
|
|
3280
3225
|
}, "strip", zod.ZodTypeAny, {
|
|
3281
3226
|
name: string;
|
|
3282
|
-
capacitance: number;
|
|
3283
3227
|
schShowRatings: boolean;
|
|
3228
|
+
capacitance: number;
|
|
3284
3229
|
polarized: boolean;
|
|
3285
3230
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
3286
3231
|
key?: any;
|
|
@@ -12767,9 +12712,9 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
|
|
|
12767
12712
|
doNotPlace?: boolean | undefined;
|
|
12768
12713
|
obstructsWithinBounds?: boolean | undefined;
|
|
12769
12714
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
12715
|
+
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
12770
12716
|
color?: string | undefined;
|
|
12771
12717
|
wavelength?: string | undefined;
|
|
12772
|
-
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
12773
12718
|
schDisplayValue?: string | undefined;
|
|
12774
12719
|
laser?: boolean | undefined;
|
|
12775
12720
|
}, {
|
|
@@ -12947,9 +12892,9 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
|
|
|
12947
12892
|
doNotPlace?: boolean | undefined;
|
|
12948
12893
|
obstructsWithinBounds?: boolean | undefined;
|
|
12949
12894
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
12895
|
+
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
12950
12896
|
color?: string | undefined;
|
|
12951
12897
|
wavelength?: string | undefined;
|
|
12952
|
-
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
12953
12898
|
schDisplayValue?: string | undefined;
|
|
12954
12899
|
laser?: boolean | undefined;
|
|
12955
12900
|
}>;
|
|
@@ -21038,10 +20983,10 @@ declare class Battery extends NormalComponent<typeof batteryProps, PassivePorts>
|
|
|
21038
20983
|
symbolName?: string | undefined;
|
|
21039
20984
|
doNotPlace?: boolean | undefined;
|
|
21040
20985
|
obstructsWithinBounds?: boolean | undefined;
|
|
21041
|
-
voltage?: number | undefined;
|
|
21042
|
-
capacity?: number | undefined;
|
|
21043
20986
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C" | undefined;
|
|
21044
20987
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
20988
|
+
capacity?: number | undefined;
|
|
20989
|
+
voltage?: number | undefined;
|
|
21045
20990
|
}, {
|
|
21046
20991
|
name: string;
|
|
21047
20992
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
@@ -21216,10 +21161,10 @@ declare class Battery extends NormalComponent<typeof batteryProps, PassivePorts>
|
|
|
21216
21161
|
symbolName?: string | undefined;
|
|
21217
21162
|
doNotPlace?: boolean | undefined;
|
|
21218
21163
|
obstructsWithinBounds?: boolean | undefined;
|
|
21219
|
-
voltage?: string | number | undefined;
|
|
21220
|
-
capacity?: string | number | undefined;
|
|
21221
21164
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C" | undefined;
|
|
21222
21165
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
21166
|
+
capacity?: string | number | undefined;
|
|
21167
|
+
voltage?: string | number | undefined;
|
|
21223
21168
|
}>;
|
|
21224
21169
|
sourceFtype: Ftype;
|
|
21225
21170
|
};
|
|
@@ -22010,8 +21955,8 @@ declare class PinHeader extends NormalComponent<typeof pinHeaderProps> {
|
|
|
22010
21955
|
schHeight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
22011
21956
|
}, "strip", zod.ZodTypeAny, {
|
|
22012
21957
|
name: string;
|
|
22013
|
-
gender: "male" | "female" | "unpopulated";
|
|
22014
21958
|
pinCount: number;
|
|
21959
|
+
gender: "male" | "female" | "unpopulated";
|
|
22015
21960
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
22016
21961
|
key?: any;
|
|
22017
21962
|
pcbX?: number | undefined;
|
|
@@ -22448,12 +22393,12 @@ declare class PinHeader extends NormalComponent<typeof pinHeaderProps> {
|
|
|
22448
22393
|
}> | undefined;
|
|
22449
22394
|
schWidth?: string | number | undefined;
|
|
22450
22395
|
schHeight?: string | number | undefined;
|
|
22451
|
-
gender?: "male" | "female" | "unpopulated" | undefined;
|
|
22452
22396
|
pinLabels?: string[] | Record<string, string> | undefined;
|
|
22453
22397
|
pcbPinLabels?: Record<string, string> | undefined;
|
|
22454
22398
|
holeDiameter?: string | number | undefined;
|
|
22455
22399
|
pitch?: string | number | undefined;
|
|
22456
22400
|
schFacingDirection?: "up" | "down" | "left" | "right" | undefined;
|
|
22401
|
+
gender?: "male" | "female" | "unpopulated" | undefined;
|
|
22457
22402
|
showSilkscreenPinLabels?: boolean | undefined;
|
|
22458
22403
|
doubleRow?: boolean | undefined;
|
|
22459
22404
|
rightAngle?: boolean | undefined;
|
|
@@ -32560,8 +32505,8 @@ declare class SchematicArc extends PrimitiveComponent<typeof schematicArcProps>
|
|
|
32560
32505
|
x: number;
|
|
32561
32506
|
y: number;
|
|
32562
32507
|
};
|
|
32563
|
-
color: string;
|
|
32564
32508
|
radius: number;
|
|
32509
|
+
color: string;
|
|
32565
32510
|
startAngleDegrees: number;
|
|
32566
32511
|
endAngleDegrees: number;
|
|
32567
32512
|
isDashed: boolean;
|
|
@@ -32610,8 +32555,8 @@ declare class SchematicCircle extends PrimitiveComponent<typeof schematicCircleP
|
|
|
32610
32555
|
x: number;
|
|
32611
32556
|
y: number;
|
|
32612
32557
|
};
|
|
32613
|
-
color: string;
|
|
32614
32558
|
radius: number;
|
|
32559
|
+
color: string;
|
|
32615
32560
|
isDashed: boolean;
|
|
32616
32561
|
isFilled: boolean;
|
|
32617
32562
|
strokeWidth?: number | undefined;
|
|
@@ -32866,15 +32811,21 @@ declare class SymbolComponent extends PrimitiveComponent<typeof symbolProps> {
|
|
|
32866
32811
|
declare class AnalogSimulation extends PrimitiveComponent<typeof analogSimulationProps> {
|
|
32867
32812
|
get config(): {
|
|
32868
32813
|
componentName: string;
|
|
32869
|
-
zodProps:
|
|
32870
|
-
simulationType:
|
|
32871
|
-
|
|
32814
|
+
zodProps: z.ZodObject<{
|
|
32815
|
+
simulationType: z.ZodDefault<z.ZodLiteral<"spice_transient_analysis">>;
|
|
32816
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
32817
|
+
timePerStep: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
32818
|
+
}, "strip", z.ZodTypeAny, {
|
|
32872
32819
|
simulationType: "spice_transient_analysis";
|
|
32820
|
+
duration?: number | undefined;
|
|
32821
|
+
timePerStep?: number | undefined;
|
|
32873
32822
|
}, {
|
|
32823
|
+
duration?: string | number | undefined;
|
|
32874
32824
|
simulationType?: "spice_transient_analysis" | undefined;
|
|
32825
|
+
timePerStep?: string | number | undefined;
|
|
32875
32826
|
}>;
|
|
32876
32827
|
};
|
|
32877
|
-
|
|
32828
|
+
doInitialSimulationRender(): void;
|
|
32878
32829
|
}
|
|
32879
32830
|
|
|
32880
32831
|
declare const useRenderedCircuit: (reactElements: react__default.ReactElement) => {
|
|
@@ -33075,9 +33026,9 @@ declare const useLed: <PropsFromHook extends Omit<{
|
|
|
33075
33026
|
doNotPlace?: boolean | undefined;
|
|
33076
33027
|
obstructsWithinBounds?: boolean | undefined;
|
|
33077
33028
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
33029
|
+
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
33078
33030
|
color?: string | undefined;
|
|
33079
33031
|
wavelength?: string | undefined;
|
|
33080
|
-
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
33081
33032
|
schDisplayValue?: string | undefined;
|
|
33082
33033
|
laser?: boolean | undefined;
|
|
33083
33034
|
}, "name"> | undefined = undefined>(name: string, props?: PropsFromHook | undefined) => ComponentWithPins<{
|
|
@@ -33255,9 +33206,9 @@ declare const useLed: <PropsFromHook extends Omit<{
|
|
|
33255
33206
|
doNotPlace?: boolean | undefined;
|
|
33256
33207
|
obstructsWithinBounds?: boolean | undefined;
|
|
33257
33208
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
33209
|
+
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
33258
33210
|
color?: string | undefined;
|
|
33259
33211
|
wavelength?: string | undefined;
|
|
33260
|
-
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
33261
33212
|
schDisplayValue?: string | undefined;
|
|
33262
33213
|
laser?: boolean | undefined;
|
|
33263
33214
|
}, "left" | "right" | "pin1" | "pin2" | "anode" | "cathode" | "pos" | "neg", PropsFromHook>;
|
package/dist/index.js
CHANGED
|
@@ -11945,24 +11945,14 @@ var getSpiceyEngine = () => {
|
|
|
11945
11945
|
return {
|
|
11946
11946
|
async simulate(spiceString) {
|
|
11947
11947
|
const simulation_experiment_id = "spice-experiment-1";
|
|
11948
|
-
|
|
11949
|
-
if (!spiceNetlist.includes(".tran")) {
|
|
11950
|
-
spiceNetlist = spiceNetlist.replace(/\.END/i, ".tran 1us 10ms\n.END");
|
|
11951
|
-
}
|
|
11952
|
-
const { circuit: parsedCircuit, tran } = simulate(spiceNetlist);
|
|
11948
|
+
const { circuit: parsedCircuit, tran } = simulate(spiceString);
|
|
11953
11949
|
const voltageGraphs = spiceyTranToVGraphs(
|
|
11954
11950
|
tran,
|
|
11955
11951
|
parsedCircuit,
|
|
11956
11952
|
simulation_experiment_id
|
|
11957
11953
|
);
|
|
11958
11954
|
return {
|
|
11959
|
-
simulationResultCircuitJson:
|
|
11960
|
-
{
|
|
11961
|
-
type: "simulation_experiment",
|
|
11962
|
-
simulation_experiment_id
|
|
11963
|
-
},
|
|
11964
|
-
...voltageGraphs
|
|
11965
|
-
]
|
|
11955
|
+
simulationResultCircuitJson: voltageGraphs
|
|
11966
11956
|
};
|
|
11967
11957
|
}
|
|
11968
11958
|
};
|
|
@@ -12000,7 +11990,15 @@ ${spiceString}`);
|
|
|
12000
11990
|
debug10(
|
|
12001
11991
|
`Simulation completed, received ${result.simulationResultCircuitJson.length} elements`
|
|
12002
11992
|
);
|
|
11993
|
+
const simulationExperiment = root.db.simulation_experiment.list()[0];
|
|
11994
|
+
if (!simulationExperiment) {
|
|
11995
|
+
debug10("No simulation experiment found, skipping result insertion");
|
|
11996
|
+
return;
|
|
11997
|
+
}
|
|
12003
11998
|
for (const element of result.simulationResultCircuitJson) {
|
|
11999
|
+
if (element.type === "simulation_transient_voltage_graph") {
|
|
12000
|
+
element.simulation_experiment_id = simulationExperiment.simulation_experiment_id;
|
|
12001
|
+
}
|
|
12004
12002
|
const elementType = element.type;
|
|
12005
12003
|
if (elementType && root.db[elementType]) {
|
|
12006
12004
|
;
|
|
@@ -16042,7 +16040,10 @@ var SymbolComponent = class extends PrimitiveComponent2 {
|
|
|
16042
16040
|
};
|
|
16043
16041
|
|
|
16044
16042
|
// lib/components/primitive-components/AnalogSimulation.ts
|
|
16045
|
-
import {
|
|
16043
|
+
import {
|
|
16044
|
+
analogSimulationProps
|
|
16045
|
+
} from "@tscircuit/props";
|
|
16046
|
+
import "zod";
|
|
16046
16047
|
var AnalogSimulation = class extends PrimitiveComponent2 {
|
|
16047
16048
|
get config() {
|
|
16048
16049
|
return {
|
|
@@ -16050,7 +16051,17 @@ var AnalogSimulation = class extends PrimitiveComponent2 {
|
|
|
16050
16051
|
zodProps: analogSimulationProps
|
|
16051
16052
|
};
|
|
16052
16053
|
}
|
|
16053
|
-
|
|
16054
|
+
doInitialSimulationRender() {
|
|
16055
|
+
const { db } = this.root;
|
|
16056
|
+
const { duration, timePerStep } = this._parsedProps;
|
|
16057
|
+
const durationMs = duration || 10;
|
|
16058
|
+
const timePerStepMs = timePerStep || 0.01;
|
|
16059
|
+
db.simulation_experiment.insert({
|
|
16060
|
+
name: "spice_transient_analysis",
|
|
16061
|
+
experiment_type: "spice_transient_analysis",
|
|
16062
|
+
end_time_ms: durationMs,
|
|
16063
|
+
time_per_step: timePerStepMs
|
|
16064
|
+
});
|
|
16054
16065
|
}
|
|
16055
16066
|
};
|
|
16056
16067
|
|
|
@@ -16063,7 +16074,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
16063
16074
|
var package_default = {
|
|
16064
16075
|
name: "@tscircuit/core",
|
|
16065
16076
|
type: "module",
|
|
16066
|
-
version: "0.0.
|
|
16077
|
+
version: "0.0.769",
|
|
16067
16078
|
types: "dist/index.d.ts",
|
|
16068
16079
|
main: "dist/index.js",
|
|
16069
16080
|
module: "dist/index.js",
|
|
@@ -16103,10 +16114,10 @@ var package_default = {
|
|
|
16103
16114
|
"@tscircuit/matchpack": "^0.0.16",
|
|
16104
16115
|
"@tscircuit/math-utils": "^0.0.21",
|
|
16105
16116
|
"@tscircuit/miniflex": "^0.0.4",
|
|
16106
|
-
"@tscircuit/props": "0.0.
|
|
16117
|
+
"@tscircuit/props": "0.0.352",
|
|
16107
16118
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
16108
16119
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
16109
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
16120
|
+
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
16110
16121
|
"@types/bun": "^1.2.16",
|
|
16111
16122
|
"@types/debug": "^4.1.12",
|
|
16112
16123
|
"@types/react": "^19.1.8",
|
|
@@ -16121,7 +16132,7 @@ var package_default = {
|
|
|
16121
16132
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
16122
16133
|
"circuit-json-to-gltf": "^0.0.7",
|
|
16123
16134
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
16124
|
-
"circuit-json-to-spice": "^0.0.
|
|
16135
|
+
"circuit-json-to-spice": "^0.0.13",
|
|
16125
16136
|
"circuit-to-svg": "^0.0.221",
|
|
16126
16137
|
concurrently: "^9.1.2",
|
|
16127
16138
|
"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.770",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@tscircuit/matchpack": "^0.0.16",
|
|
42
42
|
"@tscircuit/math-utils": "^0.0.21",
|
|
43
43
|
"@tscircuit/miniflex": "^0.0.4",
|
|
44
|
-
"@tscircuit/props": "0.0.
|
|
44
|
+
"@tscircuit/props": "0.0.352",
|
|
45
45
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
46
46
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
47
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
47
|
+
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
48
48
|
"@types/bun": "^1.2.16",
|
|
49
49
|
"@types/debug": "^4.1.12",
|
|
50
50
|
"@types/react": "^19.1.8",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
60
60
|
"circuit-json-to-gltf": "^0.0.7",
|
|
61
61
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
62
|
-
"circuit-json-to-spice": "^0.0.
|
|
62
|
+
"circuit-json-to-spice": "^0.0.13",
|
|
63
63
|
"circuit-to-svg": "^0.0.221",
|
|
64
64
|
"concurrently": "^9.1.2",
|
|
65
65
|
"connectivity-map": "^1.0.0",
|