@tscircuit/runframe 0.0.147 → 0.0.149

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.
@@ -890,6 +890,7 @@ var CircuitJsonPreview = ({
890
890
  errorMessage,
891
891
  circuitJsonKey = "",
892
892
  circuitJson,
893
+ showRightHeaderContent = true,
893
894
  showCodeTab = false,
894
895
  codeTabContent,
895
896
  showJsonTab = true,
@@ -908,7 +909,8 @@ var CircuitJsonPreview = ({
908
909
  hasCodeChangedSinceLastRun,
909
910
  onEditEvent,
910
911
  editEvents,
911
- defaultActiveTab
912
+ defaultActiveTab,
913
+ autoRotate3dViewerDisabled
912
914
  }) => {
913
915
  useStyles();
914
916
  const [activeTab, setActiveTabState] = useState4(defaultActiveTab ?? "pcb");
@@ -953,7 +955,7 @@ var CircuitJsonPreview = ({
953
955
  "%"
954
956
  ] })
955
957
  ] }),
956
- /* @__PURE__ */ jsxs11(TabsList, { children: [
958
+ showRightHeaderContent && /* @__PURE__ */ jsxs11(TabsList, { children: [
957
959
  showCodeTab && /* @__PURE__ */ jsx15(TabsTrigger, { value: "code", children: "Code" }),
958
960
  /* @__PURE__ */ jsxs11(TabsTrigger, { value: "pcb", className: "rf-whitespace-nowrap", children: [
959
961
  circuitJson && /* @__PURE__ */ jsx15(
@@ -1100,7 +1102,13 @@ var CircuitJsonPreview = ({
1100
1102
  "rf-overflow-auto",
1101
1103
  isFullScreen ? "rf-h-[calc(100vh-96px)]" : "rf-h-[620px]"
1102
1104
  ),
1103
- children: /* @__PURE__ */ jsx15(ErrorBoundary, { FallbackComponent: ErrorFallback, children: circuitJson ? /* @__PURE__ */ jsx15(CadViewer, { soup: circuitJson }) : /* @__PURE__ */ jsx15(PreviewEmptyState_default, { onRunClicked }) })
1105
+ children: /* @__PURE__ */ jsx15(ErrorBoundary, { FallbackComponent: ErrorFallback, children: circuitJson ? /* @__PURE__ */ jsx15(
1106
+ CadViewer,
1107
+ {
1108
+ soup: circuitJson,
1109
+ autoRotateDisabled: autoRotate3dViewerDisabled
1110
+ }
1111
+ ) : /* @__PURE__ */ jsx15(PreviewEmptyState_default, { onRunClicked }) })
1104
1112
  }
1105
1113
  ) }),
1106
1114
  /* @__PURE__ */ jsx15(TabsContent, { value: "bom", children: /* @__PURE__ */ jsx15(
package/dist/preview.d.ts CHANGED
@@ -39,6 +39,11 @@ interface PreviewContentProps {
39
39
  * a title here.
40
40
  */
41
41
  leftHeaderContent?: React.ReactNode;
42
+ /**
43
+ * Default header content, shown on the right side of the header with the PCB,
44
+ * schematic, and CAD tabs.
45
+ */
46
+ showRightHeaderContent?: boolean;
42
47
  isRunningCode?: boolean;
43
48
  isStreaming?: boolean;
44
49
  onToggleFullScreen?: () => void;
@@ -49,7 +54,8 @@ interface PreviewContentProps {
49
54
  onEditEvent?: (editEvent: ManualEditEvent) => void;
50
55
  editEvents?: ManualEditEvent[];
51
56
  onActiveTabChange?: (tab: TabId) => any;
57
+ autoRotate3dViewerDisabled?: boolean;
52
58
  }
53
- declare const CircuitJsonPreview: ({ code, onRunClicked, errorMessage, circuitJsonKey, circuitJson, showCodeTab, codeTabContent, showJsonTab, showRenderLogTab, onActiveTabChange, renderLog, showImportAndFormatButtons, className, headerClassName, leftHeaderContent, readOnly, isStreaming, onToggleFullScreen, isFullScreen, isRunningCode, hasCodeChangedSinceLastRun, onEditEvent, editEvents, defaultActiveTab, }: PreviewContentProps) => react_jsx_runtime.JSX.Element;
59
+ declare const CircuitJsonPreview: ({ code, onRunClicked, errorMessage, circuitJsonKey, circuitJson, showRightHeaderContent, showCodeTab, codeTabContent, showJsonTab, showRenderLogTab, onActiveTabChange, renderLog, showImportAndFormatButtons, className, headerClassName, leftHeaderContent, readOnly, isStreaming, onToggleFullScreen, isFullScreen, isRunningCode, hasCodeChangedSinceLastRun, onEditEvent, editEvents, defaultActiveTab, autoRotate3dViewerDisabled, }: PreviewContentProps) => react_jsx_runtime.JSX.Element;
54
60
 
55
61
  export { CircuitJsonPreview, type PreviewContentProps, type TabId };
package/dist/preview.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CircuitJsonPreview
3
- } from "./chunk-RZZLPP7I.js";
3
+ } from "./chunk-2FW56KI5.js";
4
4
  export {
5
5
  CircuitJsonPreview
6
6
  };
package/dist/runner.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Button,
3
3
  CircuitJsonPreview
4
- } from "./chunk-RZZLPP7I.js";
4
+ } from "./chunk-2FW56KI5.js";
5
5
 
6
6
  // lib/components/RunFrame.tsx
7
7
  import { createCircuitWebWorker } from "@tscircuit/eval-webworker";