@tscircuit/props 0.0.350 → 0.0.351

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.js CHANGED
@@ -496,8 +496,7 @@ var autorouterConfig = z27.object({
496
496
  ]).optional(),
497
497
  local: z27.boolean().optional()
498
498
  });
499
- var autorouterProp = z27.union([
500
- autorouterConfig,
499
+ var autorouterPreset = z27.union([
501
500
  z27.literal("sequential_trace"),
502
501
  z27.literal("subcircuit"),
503
502
  z27.literal("auto"),
@@ -508,6 +507,12 @@ var autorouterProp = z27.union([
508
507
  z27.literal("auto-local"),
509
508
  z27.literal("auto-cloud")
510
509
  ]);
510
+ var autorouterString = z27.string();
511
+ var autorouterProp = z27.union([
512
+ autorouterConfig,
513
+ autorouterPreset,
514
+ autorouterString
515
+ ]);
511
516
  var baseGroupProps = commonLayoutProps.extend({
512
517
  name: z27.string().optional(),
513
518
  children: z27.any().optional(),
@@ -625,6 +630,7 @@ var groupProps = z27.discriminatedUnion("subcircuit", [
625
630
  expectTypesMatch(true);
626
631
  expectTypesMatch(true);
627
632
  expectTypesMatch(true);
633
+ expectTypesMatch(true);
628
634
 
629
635
  // lib/components/board.ts
630
636
  var boardColor = z28.custom((value) => typeof value === "string");
@@ -1912,9 +1918,17 @@ var spiceEngineZod = z94.object({
1912
1918
  "A function that takes a SPICE string and returns a simulation result"
1913
1919
  )
1914
1920
  });
1921
+ var autorouterInstance = z94.object({
1922
+ run: z94.function().args().returns(z94.promise(z94.unknown())).describe("Run the autorouter"),
1923
+ getOutputSimpleRouteJson: z94.function().args().returns(z94.promise(z94.any())).describe("Get the resulting SimpleRouteJson")
1924
+ });
1925
+ var autorouterDefinition = z94.object({
1926
+ createAutorouter: z94.function().args(z94.any(), z94.any().optional()).returns(z94.union([autorouterInstance, z94.promise(autorouterInstance)])).describe("Create an autorouter instance")
1927
+ });
1915
1928
  var platformConfig = z94.object({
1916
1929
  partsEngine: partsEngine.optional(),
1917
1930
  autorouter: autorouterProp.optional(),
1931
+ autorouterMap: z94.record(z94.string(), autorouterDefinition).optional(),
1918
1932
  registryApiUrl: z94.string().optional(),
1919
1933
  cloudAutorouterUrl: z94.string().optional(),
1920
1934
  projectName: z94.string().optional(),
@@ -1960,6 +1974,7 @@ expectTypesMatch(true);
1960
1974
  export {
1961
1975
  analogSimulationProps,
1962
1976
  autorouterConfig,
1977
+ autorouterPreset,
1963
1978
  autorouterProp,
1964
1979
  baseGroupProps,
1965
1980
  base_manual_edit_event,