@tscircuit/runframe 0.0.449 → 0.0.451

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.
@@ -329,7 +329,7 @@ var AutoroutingLogOptions = ({
329
329
  onClick: (e) => {
330
330
  e.stopPropagation();
331
331
  if (onReportAutoroutingLog) {
332
- onReportAutoroutingLog(key, simpleRouteJson);
332
+ onReportAutoroutingLog(key, { simpleRouteJson });
333
333
  }
334
334
  },
335
335
  children: [
@@ -1094,7 +1094,7 @@ var RenderLogViewer = ({
1094
1094
  };
1095
1095
 
1096
1096
  // package.json
1097
- var version = "0.0.448";
1097
+ var version = "0.0.450";
1098
1098
 
1099
1099
  // lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
1100
1100
  import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -2127,6 +2127,7 @@ export {
2127
2127
  API_BASE,
2128
2128
  useRunFrameStore,
2129
2129
  toast,
2130
+ registryKy,
2130
2131
  useOrderDialogCli,
2131
2132
  useOrderDialog,
2132
2133
  CadViewer2 as CadViewer,
package/dist/preview.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  linkify,
9
9
  useOrderDialog,
10
10
  useOrderDialogCli
11
- } from "./chunk-QMYTIAZ7.js";
11
+ } from "./chunk-5BJTVOOU.js";
12
12
  export {
13
13
  BomTable,
14
14
  CadViewer,
package/dist/runner.js CHANGED
@@ -22,11 +22,12 @@ import {
22
22
  cn,
23
23
  debug_default,
24
24
  linkify,
25
+ registryKy,
25
26
  toast,
26
27
  useOrderDialog,
27
28
  useOrderDialogCli,
28
29
  useRunFrameStore
29
- } from "./chunk-QMYTIAZ7.js";
30
+ } from "./chunk-5BJTVOOU.js";
30
31
 
31
32
  // lib/components/RunFrame/RunFrame.tsx
32
33
  import { createCircuitWebWorker } from "@tscircuit/eval/worker";
@@ -340,6 +341,26 @@ var RunFrame = (props) => {
340
341
  }, 100);
341
342
  }
342
343
  };
344
+ const handleReportAutoroutingLog = async (name, data) => {
345
+ await registryKy.post("autorouting/bug_reports/create", {
346
+ json: {
347
+ title: name,
348
+ simple_route_json: data.simpleRouteJson
349
+ }
350
+ }).json().then(({ autorouting_bug_report }) => {
351
+ window.open(
352
+ `https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${autorouting_bug_report.autorouting_bug_report_id}`,
353
+ "_blank"
354
+ );
355
+ }).catch((error2) => {
356
+ console.error("Failed to report autorouting bug", error2);
357
+ if (error2.message.includes("401")) {
358
+ alert("You must be logged in to report autorouting bugs");
359
+ } else {
360
+ alert(`Failed to report autorouting bug: ${error2.message}`);
361
+ }
362
+ });
363
+ };
343
364
  return /* @__PURE__ */ jsx(
344
365
  CircuitJsonPreview,
345
366
  {
@@ -347,7 +368,7 @@ var RunFrame = (props) => {
347
368
  showToggleFullScreen: props.showToggleFullScreen,
348
369
  autoroutingGraphics,
349
370
  autoroutingLog,
350
- onReportAutoroutingLog: props.onReportAutoroutingLog,
371
+ onReportAutoroutingLog: props.onReportAutoroutingLog || handleReportAutoroutingLog,
351
372
  leftHeaderContent: /* @__PURE__ */ jsxs(Fragment, { children: [
352
373
  props.showRunButton && /* @__PURE__ */ jsxs("div", { className: "rf-relative rf-inline-flex", children: [
353
374
  /* @__PURE__ */ jsxs(