@tscircuit/props 0.0.463 → 0.0.465

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
@@ -1898,6 +1898,7 @@ export interface PlatformConfig {
1898
1898
 
1899
1899
  resolveProjectStaticFileImportUrl?: (path: string) => Promise<string>;
1900
1900
  nodeModulesResolver?: (modulePath: string) => Promise<string | null>;
1901
+ platformFetch?: typeof fetch;
1901
1902
  }
1902
1903
  ```
1903
1904
 
package/dist/index.d.ts CHANGED
@@ -16287,6 +16287,7 @@ interface SubcircuitGroupProps extends BaseGroupProps {
16287
16287
  /** Maximum length a trace can span on the schematic */
16288
16288
  schMaxTraceDistance?: Distance;
16289
16289
  partsEngine?: PartsEngine;
16290
+ _subcircuitCachingEnabled?: boolean;
16290
16291
  /** When autosizing, the board will be made square */
16291
16292
  square?: boolean;
16292
16293
  /** Desired empty area of the board e.g. "22mm^2" or "20%" */
@@ -18107,6 +18108,7 @@ declare const subcircuitGroupProps: z.ZodObject<{
18107
18108
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
18108
18109
  nominalTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
18109
18110
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
18111
+ _subcircuitCachingEnabled: z.ZodOptional<z.ZodBoolean>;
18110
18112
  pcbRouteCache: z.ZodOptional<z.ZodType<PcbRouteCache, z.ZodTypeDef, PcbRouteCache>>;
18111
18113
  autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
18112
18114
  autorouterEffortLevel: z.ZodOptional<z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>>;
@@ -18419,6 +18421,7 @@ declare const subcircuitGroupProps: z.ZodObject<{
18419
18421
  schTraceAutoLabelEnabled?: boolean | undefined;
18420
18422
  schMaxTraceDistance?: number | undefined;
18421
18423
  partsEngine?: PartsEngine | undefined;
18424
+ _subcircuitCachingEnabled?: boolean | undefined;
18422
18425
  pcbRouteCache?: PcbRouteCache | undefined;
18423
18426
  autorouter?: AutorouterProp | undefined;
18424
18427
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -18727,6 +18730,7 @@ declare const subcircuitGroupProps: z.ZodObject<{
18727
18730
  schTraceAutoLabelEnabled?: boolean | undefined;
18728
18731
  schMaxTraceDistance?: string | number | undefined;
18729
18732
  partsEngine?: PartsEngine | undefined;
18733
+ _subcircuitCachingEnabled?: boolean | undefined;
18730
18734
  pcbRouteCache?: PcbRouteCache | undefined;
18731
18735
  autorouter?: AutorouterProp | undefined;
18732
18736
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -19471,6 +19475,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<{
19471
19475
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
19472
19476
  nominalTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
19473
19477
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
19478
+ _subcircuitCachingEnabled: z.ZodOptional<z.ZodBoolean>;
19474
19479
  pcbRouteCache: z.ZodOptional<z.ZodType<PcbRouteCache, z.ZodTypeDef, PcbRouteCache>>;
19475
19480
  autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
19476
19481
  autorouterEffortLevel: z.ZodOptional<z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>>;
@@ -19786,6 +19791,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<{
19786
19791
  schTraceAutoLabelEnabled?: boolean | undefined;
19787
19792
  schMaxTraceDistance?: number | undefined;
19788
19793
  partsEngine?: PartsEngine | undefined;
19794
+ _subcircuitCachingEnabled?: boolean | undefined;
19789
19795
  pcbRouteCache?: PcbRouteCache | undefined;
19790
19796
  autorouter?: AutorouterProp | undefined;
19791
19797
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -20095,6 +20101,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<{
20095
20101
  schTraceAutoLabelEnabled?: boolean | undefined;
20096
20102
  schMaxTraceDistance?: string | number | undefined;
20097
20103
  partsEngine?: PartsEngine | undefined;
20104
+ _subcircuitCachingEnabled?: boolean | undefined;
20098
20105
  pcbRouteCache?: PcbRouteCache | undefined;
20099
20106
  autorouter?: AutorouterProp | undefined;
20100
20107
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -21913,6 +21920,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<{
21913
21920
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
21914
21921
  nominalTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
21915
21922
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
21923
+ _subcircuitCachingEnabled: z.ZodOptional<z.ZodBoolean>;
21916
21924
  pcbRouteCache: z.ZodOptional<z.ZodType<PcbRouteCache, z.ZodTypeDef, PcbRouteCache>>;
21917
21925
  autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
21918
21926
  autorouterEffortLevel: z.ZodOptional<z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>>;
@@ -22228,6 +22236,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<{
22228
22236
  schTraceAutoLabelEnabled?: boolean | undefined;
22229
22237
  schMaxTraceDistance?: number | undefined;
22230
22238
  partsEngine?: PartsEngine | undefined;
22239
+ _subcircuitCachingEnabled?: boolean | undefined;
22231
22240
  pcbRouteCache?: PcbRouteCache | undefined;
22232
22241
  autorouter?: AutorouterProp | undefined;
22233
22242
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -22537,6 +22546,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<{
22537
22546
  schTraceAutoLabelEnabled?: boolean | undefined;
22538
22547
  schMaxTraceDistance?: string | number | undefined;
22539
22548
  partsEngine?: PartsEngine | undefined;
22549
+ _subcircuitCachingEnabled?: boolean | undefined;
22540
22550
  pcbRouteCache?: PcbRouteCache | undefined;
22541
22551
  autorouter?: AutorouterProp | undefined;
22542
22552
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -23312,6 +23322,7 @@ declare const boardProps: z.ZodObject<Omit<{
23312
23322
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
23313
23323
  nominalTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
23314
23324
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
23325
+ _subcircuitCachingEnabled: z.ZodOptional<z.ZodBoolean>;
23315
23326
  pcbRouteCache: z.ZodOptional<z.ZodType<PcbRouteCache, z.ZodTypeDef, PcbRouteCache>>;
23316
23327
  autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
23317
23328
  autorouterEffortLevel: z.ZodOptional<z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>>;
@@ -23653,6 +23664,7 @@ declare const boardProps: z.ZodObject<Omit<{
23653
23664
  schTraceAutoLabelEnabled?: boolean | undefined;
23654
23665
  schMaxTraceDistance?: number | undefined;
23655
23666
  partsEngine?: PartsEngine | undefined;
23667
+ _subcircuitCachingEnabled?: boolean | undefined;
23656
23668
  pcbRouteCache?: PcbRouteCache | undefined;
23657
23669
  autorouter?: AutorouterProp | undefined;
23658
23670
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -23977,6 +23989,7 @@ declare const boardProps: z.ZodObject<Omit<{
23977
23989
  schTraceAutoLabelEnabled?: boolean | undefined;
23978
23990
  schMaxTraceDistance?: string | number | undefined;
23979
23991
  partsEngine?: PartsEngine | undefined;
23992
+ _subcircuitCachingEnabled?: boolean | undefined;
23980
23993
  pcbRouteCache?: PcbRouteCache | undefined;
23981
23994
  autorouter?: AutorouterProp | undefined;
23982
23995
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -27019,6 +27032,7 @@ declare const breakoutProps: z.ZodObject<{
27019
27032
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
27020
27033
  nominalTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
27021
27034
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
27035
+ _subcircuitCachingEnabled: z.ZodOptional<z.ZodBoolean>;
27022
27036
  pcbRouteCache: z.ZodOptional<z.ZodType<PcbRouteCache, z.ZodTypeDef, PcbRouteCache>>;
27023
27037
  autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
27024
27038
  autorouterEffortLevel: z.ZodOptional<z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>>;
@@ -27337,6 +27351,7 @@ declare const breakoutProps: z.ZodObject<{
27337
27351
  schTraceAutoLabelEnabled?: boolean | undefined;
27338
27352
  schMaxTraceDistance?: number | undefined;
27339
27353
  partsEngine?: PartsEngine | undefined;
27354
+ _subcircuitCachingEnabled?: boolean | undefined;
27340
27355
  pcbRouteCache?: PcbRouteCache | undefined;
27341
27356
  autorouter?: AutorouterProp | undefined;
27342
27357
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -27645,6 +27660,7 @@ declare const breakoutProps: z.ZodObject<{
27645
27660
  schTraceAutoLabelEnabled?: boolean | undefined;
27646
27661
  schMaxTraceDistance?: string | number | undefined;
27647
27662
  partsEngine?: PartsEngine | undefined;
27663
+ _subcircuitCachingEnabled?: boolean | undefined;
27648
27664
  pcbRouteCache?: PcbRouteCache | undefined;
27649
27665
  autorouter?: AutorouterProp | undefined;
27650
27666
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -81430,6 +81446,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
81430
81446
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
81431
81447
  nominalTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
81432
81448
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
81449
+ _subcircuitCachingEnabled: z.ZodOptional<z.ZodBoolean>;
81433
81450
  pcbRouteCache: z.ZodOptional<z.ZodType<PcbRouteCache, z.ZodTypeDef, PcbRouteCache>>;
81434
81451
  autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
81435
81452
  autorouterEffortLevel: z.ZodOptional<z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>>;
@@ -81786,6 +81803,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
81786
81803
  schTraceAutoLabelEnabled?: boolean | undefined;
81787
81804
  schMaxTraceDistance?: number | undefined;
81788
81805
  partsEngine?: PartsEngine | undefined;
81806
+ _subcircuitCachingEnabled?: boolean | undefined;
81789
81807
  pcbRouteCache?: PcbRouteCache | undefined;
81790
81808
  autorouter?: AutorouterProp | undefined;
81791
81809
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -82120,6 +82138,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
82120
82138
  schTraceAutoLabelEnabled?: boolean | undefined;
82121
82139
  schMaxTraceDistance?: string | number | undefined;
82122
82140
  partsEngine?: PartsEngine | undefined;
82141
+ _subcircuitCachingEnabled?: boolean | undefined;
82123
82142
  pcbRouteCache?: PcbRouteCache | undefined;
82124
82143
  autorouter?: AutorouterProp | undefined;
82125
82144
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -99567,6 +99586,7 @@ declare const mountedboardProps: z.ZodObject<{
99567
99586
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
99568
99587
  nominalTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
99569
99588
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
99589
+ _subcircuitCachingEnabled: z.ZodOptional<z.ZodBoolean>;
99570
99590
  pcbRouteCache: z.ZodOptional<z.ZodType<PcbRouteCache, z.ZodTypeDef, PcbRouteCache>>;
99571
99591
  autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
99572
99592
  autorouterEffortLevel: z.ZodOptional<z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>>;
@@ -99882,6 +99902,7 @@ declare const mountedboardProps: z.ZodObject<{
99882
99902
  schTraceAutoLabelEnabled?: boolean | undefined;
99883
99903
  schMaxTraceDistance?: number | undefined;
99884
99904
  partsEngine?: PartsEngine | undefined;
99905
+ _subcircuitCachingEnabled?: boolean | undefined;
99885
99906
  pcbRouteCache?: PcbRouteCache | undefined;
99886
99907
  autorouter?: AutorouterProp | undefined;
99887
99908
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -100192,6 +100213,7 @@ declare const mountedboardProps: z.ZodObject<{
100192
100213
  schTraceAutoLabelEnabled?: boolean | undefined;
100193
100214
  schMaxTraceDistance?: string | number | undefined;
100194
100215
  partsEngine?: PartsEngine | undefined;
100216
+ _subcircuitCachingEnabled?: boolean | undefined;
100195
100217
  pcbRouteCache?: PcbRouteCache | undefined;
100196
100218
  autorouter?: AutorouterProp | undefined;
100197
100219
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -109930,6 +109952,7 @@ declare const subcircuitProps: z.ZodObject<{
109930
109952
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
109931
109953
  nominalTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
109932
109954
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
109955
+ _subcircuitCachingEnabled: z.ZodOptional<z.ZodBoolean>;
109933
109956
  pcbRouteCache: z.ZodOptional<z.ZodType<PcbRouteCache, z.ZodTypeDef, PcbRouteCache>>;
109934
109957
  autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
109935
109958
  autorouterEffortLevel: z.ZodOptional<z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>>;
@@ -110242,6 +110265,7 @@ declare const subcircuitProps: z.ZodObject<{
110242
110265
  schTraceAutoLabelEnabled?: boolean | undefined;
110243
110266
  schMaxTraceDistance?: number | undefined;
110244
110267
  partsEngine?: PartsEngine | undefined;
110268
+ _subcircuitCachingEnabled?: boolean | undefined;
110245
110269
  pcbRouteCache?: PcbRouteCache | undefined;
110246
110270
  autorouter?: AutorouterProp | undefined;
110247
110271
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -110550,6 +110574,7 @@ declare const subcircuitProps: z.ZodObject<{
110550
110574
  schTraceAutoLabelEnabled?: boolean | undefined;
110551
110575
  schMaxTraceDistance?: string | number | undefined;
110552
110576
  partsEngine?: PartsEngine | undefined;
110577
+ _subcircuitCachingEnabled?: boolean | undefined;
110553
110578
  pcbRouteCache?: PcbRouteCache | undefined;
110554
110579
  autorouter?: AutorouterProp | undefined;
110555
110580
  autorouterEffortLevel?: "2x" | "1x" | "5x" | "10x" | "100x" | undefined;
@@ -168087,6 +168112,7 @@ interface PlatformConfig {
168087
168112
  footprintFileParserMap?: Record<string, FootprintFileParserEntry>;
168088
168113
  resolveProjectStaticFileImportUrl?: (path: string) => Promise<string>;
168089
168114
  nodeModulesResolver?: (modulePath: string) => Promise<string | null>;
168115
+ platformFetch?: typeof fetch;
168090
168116
  }
168091
168117
  declare const platformConfig: z.ZodType<PlatformConfig>;
168092
168118
 
package/dist/index.js CHANGED
@@ -896,6 +896,7 @@ var subcircuitGroupProps = baseGroupProps.extend({
896
896
  minTraceWidth: length2.optional(),
897
897
  nominalTraceWidth: length2.optional(),
898
898
  partsEngine: partsEngine.optional(),
899
+ _subcircuitCachingEnabled: z33.boolean().optional(),
899
900
  pcbRouteCache: z33.custom((v) => true).optional(),
900
901
  autorouter: autorouterProp.optional(),
901
902
  autorouterEffortLevel: autorouterEffortLevel.optional(),
@@ -2735,6 +2736,7 @@ var autorouterInstance = z120.object({
2735
2736
  var autorouterDefinition = z120.object({
2736
2737
  createAutorouter: z120.function().args(z120.any(), z120.any().optional()).returns(z120.union([autorouterInstance, z120.promise(autorouterInstance)])).describe("Create an autorouter instance")
2737
2738
  });
2739
+ var platformFetch = z120.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
2738
2740
  var platformConfig = z120.object({
2739
2741
  partsEngine: partsEngine.optional(),
2740
2742
  autorouter: autorouterProp.optional(),
@@ -2771,7 +2773,8 @@ var platformConfig = z120.object({
2771
2773
  footprintFileParserMap: z120.record(z120.string(), footprintFileParserEntry).optional(),
2772
2774
  resolveProjectStaticFileImportUrl: z120.function().args(z120.string()).returns(z120.promise(z120.string())).describe(
2773
2775
  "A function that returns a string URL for static files for the project"
2774
- ).optional()
2776
+ ).optional(),
2777
+ platformFetch: platformFetch.optional()
2775
2778
  });
2776
2779
  expectTypesMatch(true);
2777
2780