@tscircuit/runframe 0.0.994 → 0.0.996

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/preview.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  linkify,
9
9
  useOrderDialog,
10
10
  useOrderDialogCli
11
- } from "./chunk-Z3QYGCIG.js";
11
+ } from "./chunk-X3W75RUU.js";
12
12
  export {
13
13
  BomTable,
14
14
  CadViewer,
package/dist/runner.d.ts CHANGED
@@ -177,13 +177,13 @@ interface ComponentSearchResult {
177
177
  code?: string;
178
178
  owner?: string;
179
179
  }
180
- interface ImportComponentDialogProps {
180
+ interface ImportComponentDialogProps$1 {
181
181
  isOpen: boolean;
182
182
  onClose: () => void;
183
183
  proxyRequestHeaders?: Record<string, string>;
184
184
  onImport?: (component: ComponentSearchResult) => void;
185
185
  }
186
- declare const ImportComponentDialog: ({ isOpen, onClose, proxyRequestHeaders, onImport, }: ImportComponentDialogProps) => react_jsx_runtime.JSX.Element;
186
+ declare const ImportComponentDialog: ({ isOpen, onClose, proxyRequestHeaders, onImport, }: ImportComponentDialogProps$1) => react_jsx_runtime.JSX.Element;
187
187
 
188
188
  /**
189
189
  * JLC API service for fetching component data from the JLC search API
@@ -235,6 +235,68 @@ declare const searchTscircuitComponents: (query: string) => Promise<Package[]>;
235
235
  */
236
236
  declare const mapTscircuitSnippetToSearchResult: (tscircuitSnippet: Package) => ComponentSearchResult;
237
237
 
238
+ type ImportSource = "tscircuit.com" | "jlcpcb" | "kicad";
239
+ interface TscircuitPackageDetails {
240
+ ai_description?: string;
241
+ ai_usage_instructions?: string;
242
+ [key: string]: unknown;
243
+ }
244
+ interface TscircuitPackageSearchResult {
245
+ source: "tscircuit.com";
246
+ package: Package;
247
+ }
248
+ interface JlcpcbComponentSummary {
249
+ lcscId: number;
250
+ manufacturer: string;
251
+ partNumber: string;
252
+ description: string;
253
+ package: string;
254
+ price?: number;
255
+ }
256
+ interface JlcpcbComponentSearchResult {
257
+ source: "jlcpcb";
258
+ component: JlcpcbComponentSummary;
259
+ }
260
+ interface KicadFootprintSummary {
261
+ path: string;
262
+ qualifiedName: string;
263
+ description?: string;
264
+ }
265
+ interface KicadFootprintSearchResult {
266
+ source: "kicad";
267
+ footprint: KicadFootprintSummary;
268
+ }
269
+ type ImportComponentDialogSearchResult = TscircuitPackageSearchResult | JlcpcbComponentSearchResult | KicadFootprintSearchResult;
270
+ interface ImportComponentDialog2Props {
271
+ isOpen: boolean;
272
+ onClose: () => void;
273
+ jlcpcbProxyRequestHeaders?: Record<string, string>;
274
+ onKicadStringSelected?: (payload: KicadStringSelectedPayload) => void | Promise<void>;
275
+ onTscircuitPackageSelected?: (payload: TscircuitPackageSelectedPayload) => void | Promise<void>;
276
+ onJlcpcbComponentTsxLoaded?: (payload: JlcpcbComponentTsxLoadedPayload) => void | Promise<void>;
277
+ }
278
+ type ImportComponentDialogProps = ImportComponentDialog2Props;
279
+ interface KicadStringSelectedPayload {
280
+ result: KicadFootprintSearchResult;
281
+ footprint: string;
282
+ }
283
+ interface TscircuitPackageSelectedPayload {
284
+ result: TscircuitPackageSearchResult;
285
+ fullPackageName: string;
286
+ }
287
+ interface JlcpcbComponentTsxLoadedPayload {
288
+ result: JlcpcbComponentSearchResult;
289
+ tsx: string;
290
+ }
291
+
292
+ declare const ImportComponentDialog2: ({ isOpen, onClose, jlcpcbProxyRequestHeaders, onKicadStringSelected, onTscircuitPackageSelected, onJlcpcbComponentTsxLoaded, }: ImportComponentDialog2Props) => react_jsx_runtime.JSX.Element;
293
+
294
+ type CliImportDialogProps = Omit<ImportComponentDialog2Props, "onKicadStringSelected" | "onTscircuitPackageSelected" | "onJlcpcbComponentTsxLoaded">;
295
+ declare const ImportComponentDialogForCli: {
296
+ (props: CliImportDialogProps): react_jsx_runtime.JSX.Element;
297
+ displayName: string;
298
+ };
299
+
238
300
  interface CircuitJsonFileReference {
239
301
  filePath: string;
240
302
  fileStaticAssetUrl: string;
@@ -258,4 +320,4 @@ declare const CircuitJsonFileSelectorCombobox: ({ files, onFileChange, currentFi
258
320
  onFileChange: (value: string) => void;
259
321
  }) => react_jsx_runtime.JSX.Element;
260
322
 
261
- export { CircuitJsonFileSelectorCombobox, type ComponentSearchResult, ImportComponentDialog, RunFrame, RunFrameForCli, type RunFrameProps, RunFrameStaticBuildViewer, type RunFrameStaticBuildViewerProps, RunFrameWithApi, type RunFrameWithApiProps, TabId, guessEntrypoint, guessManualEditsFilePath, mapJLCComponentToSearchResult, mapTscircuitSnippetToSearchResult, searchJLCComponents, searchTscircuitComponents };
323
+ export { CircuitJsonFileSelectorCombobox, type ComponentSearchResult, ImportComponentDialog, ImportComponentDialog2, type ImportComponentDialog2Props, ImportComponentDialogForCli, type ImportComponentDialogProps, type ImportComponentDialogSearchResult, type ImportSource, type JlcpcbComponentSearchResult, type JlcpcbComponentSummary, type JlcpcbComponentTsxLoadedPayload, type KicadFootprintSearchResult, type KicadFootprintSummary, type KicadStringSelectedPayload, RunFrame, RunFrameForCli, type RunFrameProps, RunFrameStaticBuildViewer, type RunFrameStaticBuildViewerProps, RunFrameWithApi, type RunFrameWithApiProps, TabId, type TscircuitPackageDetails, type TscircuitPackageSearchResult, type TscircuitPackageSelectedPayload, guessEntrypoint, guessManualEditsFilePath, mapJLCComponentToSearchResult, mapTscircuitSnippetToSearchResult, searchJLCComponents, searchTscircuitComponents };