@tscircuit/eval 0.0.605 → 0.0.607
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/blob-url.js +1 -1
- package/dist/eval/index.d.ts +42 -0
- package/dist/eval/index.js +105 -36
- package/dist/lib/index.d.ts +89 -3
- package/dist/lib/index.js +106 -36
- package/dist/platform-config/getPlatformConfig.d.ts +19 -2
- package/dist/platform-config/getPlatformConfig.js +72 -3
- package/dist/webworker/entrypoint.js +12 -12
- package/package.json +4 -4
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyCircuitElement } from 'circuit-json';
|
|
2
2
|
import { RootCircuitEventName as RootCircuitEventName$1, RootCircuit } from '@tscircuit/core';
|
|
3
|
-
import { PlatformConfig } from '@tscircuit/props';
|
|
3
|
+
import { PlatformConfig, PartsEngine } from '@tscircuit/props';
|
|
4
4
|
|
|
5
5
|
type RootCircuitEventName = RootCircuitEventName$1 | "debug:logOutput";
|
|
6
6
|
interface CircuitRunnerConfiguration {
|
|
@@ -300,6 +300,25 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
300
300
|
display_name?: string | undefined;
|
|
301
301
|
are_pins_interchangeable?: boolean | undefined;
|
|
302
302
|
internally_connected_source_port_ids?: string[][] | undefined;
|
|
303
|
+
} | {
|
|
304
|
+
type: "source_component";
|
|
305
|
+
name: string;
|
|
306
|
+
source_component_id: string;
|
|
307
|
+
wave_shape: "square" | "triangle" | "sawtooth" | "sine" | "dc";
|
|
308
|
+
current: number;
|
|
309
|
+
ftype: "simple_current_source";
|
|
310
|
+
subcircuit_id?: string | undefined;
|
|
311
|
+
source_group_id?: string | undefined;
|
|
312
|
+
frequency?: number | undefined;
|
|
313
|
+
phase?: number | undefined;
|
|
314
|
+
duty_cycle?: number | undefined;
|
|
315
|
+
peak_to_peak_current?: number | undefined;
|
|
316
|
+
manufacturer_part_number?: string | undefined;
|
|
317
|
+
supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
318
|
+
display_value?: string | undefined;
|
|
319
|
+
display_name?: string | undefined;
|
|
320
|
+
are_pins_interchangeable?: boolean | undefined;
|
|
321
|
+
internally_connected_source_port_ids?: string[][] | undefined;
|
|
303
322
|
} | {
|
|
304
323
|
type: "source_component";
|
|
305
324
|
name: string;
|
|
@@ -371,6 +390,7 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
371
390
|
are_pins_interchangeable?: boolean | undefined;
|
|
372
391
|
internally_connected_source_port_ids?: string[][] | undefined;
|
|
373
392
|
load_capacitance?: number | undefined;
|
|
393
|
+
pin_variant?: "two_pin" | "four_pin" | undefined;
|
|
374
394
|
} | {
|
|
375
395
|
type: "source_component";
|
|
376
396
|
name: string;
|
|
@@ -2304,6 +2324,7 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
2304
2324
|
is_connected?: boolean | undefined;
|
|
2305
2325
|
has_input_arrow?: boolean | undefined;
|
|
2306
2326
|
has_output_arrow?: boolean | undefined;
|
|
2327
|
+
is_drawn_with_inversion_circle?: boolean | undefined;
|
|
2307
2328
|
} | {
|
|
2308
2329
|
type: "schematic_trace";
|
|
2309
2330
|
schematic_trace_id: string;
|
|
@@ -2764,6 +2785,25 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
2764
2785
|
display_name?: string | undefined;
|
|
2765
2786
|
are_pins_interchangeable?: boolean | undefined;
|
|
2766
2787
|
internally_connected_source_port_ids?: string[][] | undefined;
|
|
2788
|
+
} | {
|
|
2789
|
+
type: "source_component";
|
|
2790
|
+
name: string;
|
|
2791
|
+
source_component_id: string;
|
|
2792
|
+
wave_shape: "square" | "triangle" | "sawtooth" | "sine" | "dc";
|
|
2793
|
+
current: number;
|
|
2794
|
+
ftype: "simple_current_source";
|
|
2795
|
+
subcircuit_id?: string | undefined;
|
|
2796
|
+
source_group_id?: string | undefined;
|
|
2797
|
+
frequency?: number | undefined;
|
|
2798
|
+
phase?: number | undefined;
|
|
2799
|
+
duty_cycle?: number | undefined;
|
|
2800
|
+
peak_to_peak_current?: number | undefined;
|
|
2801
|
+
manufacturer_part_number?: string | undefined;
|
|
2802
|
+
supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2803
|
+
display_value?: string | undefined;
|
|
2804
|
+
display_name?: string | undefined;
|
|
2805
|
+
are_pins_interchangeable?: boolean | undefined;
|
|
2806
|
+
internally_connected_source_port_ids?: string[][] | undefined;
|
|
2767
2807
|
} | {
|
|
2768
2808
|
type: "source_component";
|
|
2769
2809
|
name: string;
|
|
@@ -2835,6 +2875,7 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
2835
2875
|
are_pins_interchangeable?: boolean | undefined;
|
|
2836
2876
|
internally_connected_source_port_ids?: string[][] | undefined;
|
|
2837
2877
|
load_capacitance?: number | undefined;
|
|
2878
|
+
pin_variant?: "two_pin" | "four_pin" | undefined;
|
|
2838
2879
|
} | {
|
|
2839
2880
|
type: "source_component";
|
|
2840
2881
|
name: string;
|
|
@@ -4768,6 +4809,7 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
4768
4809
|
is_connected?: boolean | undefined;
|
|
4769
4810
|
has_input_arrow?: boolean | undefined;
|
|
4770
4811
|
has_output_arrow?: boolean | undefined;
|
|
4812
|
+
is_drawn_with_inversion_circle?: boolean | undefined;
|
|
4771
4813
|
} | {
|
|
4772
4814
|
type: "schematic_trace";
|
|
4773
4815
|
schematic_trace_id: string;
|
|
@@ -5098,6 +5140,50 @@ declare const createCircuitWebWorker: (configuration: Partial<WebWorkerConfigura
|
|
|
5098
5140
|
|
|
5099
5141
|
declare const getPossibleEntrypointComponentPaths: (fsMap: Record<string, string>) => string[];
|
|
5100
5142
|
|
|
5101
|
-
|
|
5143
|
+
/**
|
|
5144
|
+
* Interface for a filesystem cache engine that can persist cache to disk.
|
|
5145
|
+
* When running locally via CLI, this can be implemented to save to .tscircuit/
|
|
5146
|
+
*/
|
|
5147
|
+
interface FilesystemCacheEngine {
|
|
5148
|
+
get: (key: string) => Promise<string | null> | string | null;
|
|
5149
|
+
set: (key: string, value: string) => Promise<void> | void;
|
|
5150
|
+
}
|
|
5151
|
+
interface PartsEngineCacheKey {
|
|
5152
|
+
type: string;
|
|
5153
|
+
ftype: string;
|
|
5154
|
+
resistance?: number;
|
|
5155
|
+
capacitance?: number;
|
|
5156
|
+
inductance?: number;
|
|
5157
|
+
frequency?: number;
|
|
5158
|
+
load_capacitance?: number;
|
|
5159
|
+
voltage?: number;
|
|
5160
|
+
max_resistance?: number;
|
|
5161
|
+
pin_count?: number;
|
|
5162
|
+
gender?: string;
|
|
5163
|
+
transistor_type?: string;
|
|
5164
|
+
mosfet_mode?: string;
|
|
5165
|
+
channel_type?: string;
|
|
5166
|
+
}
|
|
5167
|
+
/**
|
|
5168
|
+
* Wraps a PartsEngine with filesystem caching support.
|
|
5169
|
+
* When a cache engine is provided, it will:
|
|
5170
|
+
* 1. Check the cache first before calling findPart
|
|
5171
|
+
* 2. Store results in the cache after fetching
|
|
5172
|
+
*
|
|
5173
|
+
* @param baseEngine - The underlying parts engine to wrap
|
|
5174
|
+
* @param cacheEngine - Optional filesystem cache engine for persistence
|
|
5175
|
+
* @returns A wrapped PartsEngine with caching support
|
|
5176
|
+
*/
|
|
5177
|
+
declare function partsEngineWithFilesystemCache(baseEngine: PartsEngine, cacheEngine?: FilesystemCacheEngine): PartsEngine;
|
|
5178
|
+
|
|
5179
|
+
interface GetPlatformConfigOptions {
|
|
5180
|
+
/**
|
|
5181
|
+
* Optional filesystem cache engine for persisting parts engine requests.
|
|
5182
|
+
* When provided, parts engine responses will be cached to the filesystem.
|
|
5183
|
+
* The CLI can provide this to cache to .tscircuit/cache/
|
|
5184
|
+
*/
|
|
5185
|
+
filesystemCache?: FilesystemCacheEngine;
|
|
5186
|
+
}
|
|
5187
|
+
declare const getPlatformConfig: (options?: GetPlatformConfigOptions) => PlatformConfig;
|
|
5102
5188
|
|
|
5103
|
-
export { CircuitRunner, type CircuitWebWorker, STATIC_ASSET_EXTENSIONS, type WebWorkerConfiguration, createCircuitWebWorker, getImportsFromCode, getPlatformConfig, getPossibleEntrypointComponentPaths, isStaticAssetPath, runTscircuitCode, runTscircuitModule };
|
|
5189
|
+
export { CircuitRunner, type CircuitWebWorker, type FilesystemCacheEngine, type GetPlatformConfigOptions, type PartsEngineCacheKey, STATIC_ASSET_EXTENSIONS, type WebWorkerConfiguration, createCircuitWebWorker, getImportsFromCode, getPlatformConfig, getPossibleEntrypointComponentPaths, isStaticAssetPath, partsEngineWithFilesystemCache, runTscircuitCode, runTscircuitModule };
|