@tscircuit/3d-viewer 0.0.230 → 0.0.232

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +24 -14
  2. package/dist/index.js +1198 -130
  3. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -1,21 +1,12 @@
1
- import { AnyCircuitElement } from 'circuit-json';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { AnyCircuitElement, PcbBoard } from 'circuit-json';
2
3
  import * as React from 'react';
3
4
  import * as THREE from 'three';
4
5
  import { GLTFExporterOptions } from 'three-stdlib';
6
+ import { ManifoldToplevel } from 'manifold-3d/manifold.d.ts';
5
7
  import { JSDOM } from 'jsdom';
6
8
 
7
- interface Props {
8
- /**
9
- * @deprecated Use circuitJson instead.
10
- */
11
- soup?: AnyCircuitElement[];
12
- circuitJson?: AnyCircuitElement[];
13
- autoRotateDisabled?: boolean;
14
- clickToInteractEnabled?: boolean;
15
- }
16
- declare const CadViewer: React.ForwardRefExoticComponent<Props & {
17
- children?: React.ReactNode | undefined;
18
- } & React.RefAttributes<THREE.Object3D<THREE.Object3DEventMap>>>;
9
+ declare const CadViewer: (props: any) => react_jsx_runtime.JSX.Element;
19
10
 
20
11
  interface CircuitToSvgOptions {
21
12
  width?: number;
@@ -52,6 +43,25 @@ declare function useExportGltfUrl(options?: Options): [
52
43
  error: ErrorEvent | undefined
53
44
  ];
54
45
 
46
+ interface UseManifoldBoardBuilderResult {
47
+ boardThreeGeom: THREE.BufferGeometry | null;
48
+ boardColor: THREE.Color;
49
+ otherComponentGeoms: Array<{
50
+ key: string;
51
+ geometry: THREE.BufferGeometry;
52
+ color: THREE.Color;
53
+ }>;
54
+ topTraceTexture: THREE.CanvasTexture | null;
55
+ bottomTraceTexture: THREE.CanvasTexture | null;
56
+ topSilkscreenTexture: THREE.CanvasTexture | null;
57
+ bottomSilkscreenTexture: THREE.CanvasTexture | null;
58
+ pcbThickness: number | null;
59
+ error: string | null;
60
+ isLoading: boolean;
61
+ boardData: PcbBoard | null;
62
+ }
63
+ declare const useManifoldBoardBuilder: (manifoldJSModule: ManifoldToplevel | null, circuitJson: AnyCircuitElement[] | undefined) => UseManifoldBoardBuilderResult;
64
+
55
65
  declare function applyJsdomShim(jsdom: JSDOM): void;
56
66
 
57
- export { CadViewer, applyJsdomShim, convertCircuitJsonTo3dSvg, useExportGltfUrl, useSaveGltfAs };
67
+ export { CadViewer, applyJsdomShim, convertCircuitJsonTo3dSvg, useExportGltfUrl, useManifoldBoardBuilder, useSaveGltfAs };