@tscircuit/props 0.0.372 → 0.0.373

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/README.md CHANGED
@@ -188,6 +188,7 @@ export interface AnalogSimulationProps {
188
188
  simulationType?: "spice_transient_analysis";
189
189
  duration?: number | string;
190
190
  timePerStep?: number | string;
191
+ spiceEngine?: AutocompleteString<"spicey" | "ngspice">;
191
192
  }
192
193
  ```
193
194
 
@@ -1561,6 +1562,8 @@ export interface PlatformConfig {
1561
1562
  includeBoardFiles?: string[];
1562
1563
  snapshotsDir?: string;
1563
1564
 
1565
+ defaultSpiceEngine?: AutocompleteString<"spicey" | "ngspice">;
1566
+
1564
1567
  pcbDisabled?: boolean;
1565
1568
  schematicDisabled?: boolean;
1566
1569
  partsEngineDisabled?: boolean;
@@ -1601,6 +1604,7 @@ export interface ProjectConfig
1601
1604
  | "printBoardInformationToSilkscreen"
1602
1605
  | "includeBoardFiles"
1603
1606
  | "snapshotsDir"
1607
+ | "defaultSpiceEngine"
1604
1608
  > {}
1605
1609
  ```
1606
1610
 
package/dist/index.d.ts CHANGED
@@ -38941,19 +38941,23 @@ interface AnalogSimulationProps {
38941
38941
  simulationType?: "spice_transient_analysis";
38942
38942
  duration?: number | string;
38943
38943
  timePerStep?: number | string;
38944
+ spiceEngine?: AutocompleteString<"spicey" | "ngspice">;
38944
38945
  }
38945
38946
  declare const analogSimulationProps: z.ZodObject<{
38946
38947
  simulationType: z.ZodDefault<z.ZodLiteral<"spice_transient_analysis">>;
38947
38948
  duration: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
38948
38949
  timePerStep: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
38950
+ spiceEngine: z.ZodOptional<z.ZodType<AutocompleteString<"spicey" | "ngspice">, z.ZodTypeDef, AutocompleteString<"spicey" | "ngspice">>>;
38949
38951
  }, "strip", z.ZodTypeAny, {
38950
38952
  simulationType: "spice_transient_analysis";
38951
38953
  duration?: number | undefined;
38952
38954
  timePerStep?: number | undefined;
38955
+ spiceEngine?: AutocompleteString<"spicey" | "ngspice"> | undefined;
38953
38956
  }, {
38954
38957
  duration?: string | number | undefined;
38955
38958
  simulationType?: "spice_transient_analysis" | undefined;
38956
38959
  timePerStep?: string | number | undefined;
38960
+ spiceEngine?: AutocompleteString<"spicey" | "ngspice"> | undefined;
38957
38961
  }>;
38958
38962
 
38959
38963
  declare const transistorPinsLabels: readonly ["pin1", "pin2", "pin3", "emitter", "collector", "base", "gate", "source", "drain"];
@@ -53663,6 +53667,7 @@ interface PlatformConfig {
53663
53667
  printBoardInformationToSilkscreen?: boolean;
53664
53668
  includeBoardFiles?: string[];
53665
53669
  snapshotsDir?: string;
53670
+ defaultSpiceEngine?: AutocompleteString<"spicey" | "ngspice">;
53666
53671
  pcbDisabled?: boolean;
53667
53672
  schematicDisabled?: boolean;
53668
53673
  partsEngineDisabled?: boolean;
@@ -53672,7 +53677,7 @@ interface PlatformConfig {
53672
53677
  }
53673
53678
  declare const platformConfig: z.ZodType<PlatformConfig>;
53674
53679
 
53675
- interface ProjectConfig extends Pick<PlatformConfig, "projectName" | "projectBaseUrl" | "version" | "url" | "printBoardInformationToSilkscreen" | "includeBoardFiles" | "snapshotsDir"> {
53680
+ interface ProjectConfig extends Pick<PlatformConfig, "projectName" | "projectBaseUrl" | "version" | "url" | "printBoardInformationToSilkscreen" | "includeBoardFiles" | "snapshotsDir" | "defaultSpiceEngine"> {
53676
53681
  }
53677
53682
  declare const projectConfig: z.ZodType<ProjectConfig>;
53678
53683
 
package/dist/index.js CHANGED
@@ -1325,10 +1325,14 @@ expectTypesMatch(true);
1325
1325
  // lib/components/analogsimulation.ts
1326
1326
  import { ms } from "circuit-json";
1327
1327
  import { z as z59 } from "zod";
1328
+ var spiceEngine = z59.custom(
1329
+ (value) => typeof value === "string"
1330
+ );
1328
1331
  var analogSimulationProps = z59.object({
1329
1332
  simulationType: z59.literal("spice_transient_analysis").default("spice_transient_analysis"),
1330
1333
  duration: ms.optional(),
1331
- timePerStep: ms.optional()
1334
+ timePerStep: ms.optional(),
1335
+ spiceEngine: spiceEngine.optional()
1332
1336
  });
1333
1337
  expectTypesMatch(
1334
1338
  true
@@ -2139,6 +2143,9 @@ var spiceEngineZod = z104.object({
2139
2143
  "A function that takes a SPICE string and returns a simulation result"
2140
2144
  )
2141
2145
  });
2146
+ var defaultSpiceEngine = z104.custom(
2147
+ (value) => typeof value === "string"
2148
+ );
2142
2149
  var autorouterInstance = z104.object({
2143
2150
  run: z104.function().args().returns(z104.promise(z104.unknown())).describe("Run the autorouter"),
2144
2151
  getOutputSimpleRouteJson: z104.function().args().returns(z104.promise(z104.any())).describe("Get the resulting SimpleRouteJson")
@@ -2163,6 +2170,7 @@ var platformConfig = z104.object({
2163
2170
  snapshotsDir: z104.string().describe(
2164
2171
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
2165
2172
  ).optional(),
2173
+ defaultSpiceEngine: defaultSpiceEngine.optional(),
2166
2174
  localCacheEngine: z104.any().optional(),
2167
2175
  pcbDisabled: z104.boolean().optional(),
2168
2176
  schematicDisabled: z104.boolean().optional(),
@@ -2192,7 +2200,8 @@ var projectConfig = platformConfigObject.pick({
2192
2200
  url: true,
2193
2201
  printBoardInformationToSilkscreen: true,
2194
2202
  includeBoardFiles: true,
2195
- snapshotsDir: true
2203
+ snapshotsDir: true,
2204
+ defaultSpiceEngine: true
2196
2205
  });
2197
2206
  expectTypesMatch(true);
2198
2207
  export {