@tscircuit/runframe 0.0.455 → 0.0.457

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.
@@ -1094,9 +1094,10 @@ var RenderLogViewer = ({
1094
1094
  };
1095
1095
 
1096
1096
  // package.json
1097
- var version = "0.0.454";
1097
+ var version = "0.0.456";
1098
1098
 
1099
1099
  // lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
1100
+ import "three";
1100
1101
  import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
1101
1102
  var dropdownMenuItems = [
1102
1103
  "assembly",
@@ -1167,6 +1168,9 @@ var CircuitJsonPreview = ({
1167
1168
  setActiveTab(defaultActiveTab ?? "pcb");
1168
1169
  }
1169
1170
  }, [circuitJson]);
1171
+ const setCadViewerRef = useCallback((value) => {
1172
+ window.TSCIRCUIT_3D_OBJECT_REF = value === null ? void 0 : value;
1173
+ }, []);
1170
1174
  return /* @__PURE__ */ jsx16(
1171
1175
  "div",
1172
1176
  {
@@ -1393,7 +1397,8 @@ var CircuitJsonPreview = ({
1393
1397
  children: /* @__PURE__ */ jsx16(ErrorBoundary, { FallbackComponent: ErrorFallback, children: circuitJson ? /* @__PURE__ */ jsx16(
1394
1398
  CadViewer,
1395
1399
  {
1396
- soup: circuitJson,
1400
+ ref: setCadViewerRef,
1401
+ circuitJson,
1397
1402
  autoRotateDisabled: autoRotate3dViewerDisabled
1398
1403
  }
1399
1404
  ) : /* @__PURE__ */ jsx16(PreviewEmptyState_default, { onRunClicked }) })
package/dist/preview.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ManualEditEvent } from '@tscircuit/props';
3
3
  import { CircuitJson, AnyCircuitElement } from 'circuit-json';
4
+ import { Object3D } from 'three';
4
5
  import * as react from 'react';
5
6
  import { ComponentProps, FC } from 'react';
6
7
  import { PCBViewer } from '@tscircuit/pcb-viewer';
@@ -75,6 +76,12 @@ interface PreviewContentProps {
75
76
  }) => void;
76
77
  }
77
78
 
79
+ declare global {
80
+ interface Window {
81
+ TSCIRCUIT_3D_OBJECT_REF: Object3D | undefined;
82
+ }
83
+ }
84
+
78
85
  declare const CircuitJsonPreview: ({ code, onRunClicked, errorMessage, circuitJson, autoroutingGraphics, showRightHeaderContent, showCodeTab, codeTabContent, showJsonTab, showRenderLogTab, onActiveTabChange, renderLog, showImportAndFormatButtons, className, headerClassName, leftHeaderContent, readOnly, isStreaming, autoroutingLog, onReportAutoroutingLog, isRunningCode, hasCodeChangedSinceLastRun, onEditEvent, editEvents, defaultActiveTab, autoRotate3dViewerDisabled, showSchematicDebugGrid, showToggleFullScreen, defaultToFullScreen, }: PreviewContentProps) => react_jsx_runtime.JSX.Element;
79
86
 
80
87
  interface BomTableProps {
package/dist/preview.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  linkify,
9
9
  useOrderDialog,
10
10
  useOrderDialogCli
11
- } from "./chunk-6QBV4H6L.js";
11
+ } from "./chunk-BEV6T2RN.js";
12
12
  export {
13
13
  BomTable,
14
14
  CadViewer,
package/dist/runner.d.ts CHANGED
@@ -6,6 +6,7 @@ export { SchematicViewer } from '@tscircuit/schematic-viewer';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { ManualEditEvent } from '@tscircuit/props';
8
8
  import 'circuit-json';
9
+ import 'three';
9
10
  import 'react';
10
11
 
11
12
  interface RunFrameProps {
package/dist/runner.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  useOrderDialog,
28
28
  useOrderDialogCli,
29
29
  useRunFrameStore
30
- } from "./chunk-6QBV4H6L.js";
30
+ } from "./chunk-BEV6T2RN.js";
31
31
 
32
32
  // lib/components/RunFrame/RunFrame.tsx
33
33
  import { createCircuitWebWorker } from "@tscircuit/eval/worker";