@tscircuit/runframe 0.0.1179 → 0.0.1181
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/{chunk-D56OMSWO.js → chunk-K3WT5OVD.js} +22 -19
- package/dist/preview.js +1 -1
- package/dist/runner.js +1 -1
- package/dist/standalone-preview.min.js +3 -3
- package/dist/standalone.min.js +111 -111
- package/package.json +2 -2
|
@@ -1454,7 +1454,7 @@ var useErrorTelemetry = ({
|
|
|
1454
1454
|
};
|
|
1455
1455
|
|
|
1456
1456
|
// package.json
|
|
1457
|
-
var version = "0.0.
|
|
1457
|
+
var version = "0.0.1180";
|
|
1458
1458
|
var package_default = {
|
|
1459
1459
|
name: "@tscircuit/runframe",
|
|
1460
1460
|
main: "dist/preview.js",
|
|
@@ -1505,7 +1505,7 @@ var package_default = {
|
|
|
1505
1505
|
"@tscircuit/assembly-viewer": "^0.0.5",
|
|
1506
1506
|
"@tscircuit/checks": "^0.0.78",
|
|
1507
1507
|
"@tscircuit/create-snippet-url": "^0.0.9",
|
|
1508
|
-
"@tscircuit/eval": "^0.0.
|
|
1508
|
+
"@tscircuit/eval": "^0.0.444",
|
|
1509
1509
|
"@tscircuit/fake-snippets": "^0.0.122",
|
|
1510
1510
|
"@tscircuit/file-server": "^0.0.32",
|
|
1511
1511
|
"@tscircuit/footprinter": "^0.0.236",
|
|
@@ -4050,6 +4050,7 @@ import {
|
|
|
4050
4050
|
useCallback as useCallback8,
|
|
4051
4051
|
useEffect as useEffect12,
|
|
4052
4052
|
useMemo as useMemo7,
|
|
4053
|
+
useRef as useRef3,
|
|
4053
4054
|
useState as useState18
|
|
4054
4055
|
} from "react";
|
|
4055
4056
|
import { Fragment as Fragment7, jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
@@ -4077,7 +4078,7 @@ var useBugReportDialog = () => {
|
|
|
4077
4078
|
const [isOpen, setIsOpen] = useState18(false);
|
|
4078
4079
|
const [isSubmitting, setIsSubmitting] = useState18(false);
|
|
4079
4080
|
const [errorMessage, setErrorMessage] = useState18(null);
|
|
4080
|
-
const
|
|
4081
|
+
const textareaRef = useRef3(null);
|
|
4081
4082
|
const [successState, setSuccessState] = useState18(null);
|
|
4082
4083
|
const [bugReportFileCount, setBugReportFileCount] = useState18(0);
|
|
4083
4084
|
const isSessionLoggedIn = useMemo7(() => {
|
|
@@ -4086,12 +4087,12 @@ var useBugReportDialog = () => {
|
|
|
4086
4087
|
return document.cookie.split(";").some((cookie) => cookie.trim().startsWith("session="));
|
|
4087
4088
|
}, [isOpen]);
|
|
4088
4089
|
useEffect12(() => {
|
|
4089
|
-
if (isOpen && !successState) {
|
|
4090
|
+
if (isOpen && !successState && textareaRef.current) {
|
|
4090
4091
|
const globalError = typeof window !== "undefined" ? window.__TSCIRCUIT_LAST_EXECUTION_ERROR : void 0;
|
|
4091
4092
|
if (globalError) {
|
|
4092
|
-
|
|
4093
|
+
textareaRef.current.value = `I'm getting this execution error:
|
|
4093
4094
|
|
|
4094
|
-
${globalError}
|
|
4095
|
+
${globalError}`;
|
|
4095
4096
|
}
|
|
4096
4097
|
}
|
|
4097
4098
|
}, [isOpen, successState]);
|
|
@@ -4108,7 +4109,9 @@ ${globalError}`);
|
|
|
4108
4109
|
const openBugReportDialog = useCallback8(() => {
|
|
4109
4110
|
setErrorMessage(null);
|
|
4110
4111
|
setSuccessState(null);
|
|
4111
|
-
|
|
4112
|
+
if (textareaRef.current) {
|
|
4113
|
+
textareaRef.current.value = "";
|
|
4114
|
+
}
|
|
4112
4115
|
setIsOpen(true);
|
|
4113
4116
|
}, []);
|
|
4114
4117
|
const closeBugReportDialog = useCallback8(() => {
|
|
@@ -4118,6 +4121,7 @@ ${globalError}`);
|
|
|
4118
4121
|
setIsSubmitting(true);
|
|
4119
4122
|
setErrorMessage(null);
|
|
4120
4123
|
const registryKy2 = getRegistryKy();
|
|
4124
|
+
const userText = textareaRef.current?.value || "";
|
|
4121
4125
|
try {
|
|
4122
4126
|
const filesFromServer = await getFilesFromServer();
|
|
4123
4127
|
if (filesFromServer.size === 0) {
|
|
@@ -4174,8 +4178,8 @@ ${globalError}`);
|
|
|
4174
4178
|
} finally {
|
|
4175
4179
|
setIsSubmitting(false);
|
|
4176
4180
|
}
|
|
4177
|
-
}, [
|
|
4178
|
-
const BugReportDialog =
|
|
4181
|
+
}, []);
|
|
4182
|
+
const BugReportDialog = useMemo7(() => {
|
|
4179
4183
|
return /* @__PURE__ */ jsx34(
|
|
4180
4184
|
AlertDialog,
|
|
4181
4185
|
{
|
|
@@ -4239,11 +4243,10 @@ ${globalError}`);
|
|
|
4239
4243
|
/* @__PURE__ */ jsx34(
|
|
4240
4244
|
"textarea",
|
|
4241
4245
|
{
|
|
4246
|
+
ref: textareaRef,
|
|
4242
4247
|
id: "bug-description",
|
|
4243
4248
|
className: "rf-w-full rf-min-h-[100px] rf-px-3 rf-py-2 rf-text-sm rf-border rf-border-gray-300 rf-rounded-md focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-blue-500",
|
|
4244
4249
|
placeholder: "Describe the issue you're experiencing...",
|
|
4245
|
-
value: userText,
|
|
4246
|
-
onChange: (e) => setUserText(e.target.value),
|
|
4247
4250
|
disabled: isSubmitting
|
|
4248
4251
|
}
|
|
4249
4252
|
)
|
|
@@ -4307,18 +4310,18 @@ ${globalError}`);
|
|
|
4307
4310
|
)
|
|
4308
4311
|
] }) })
|
|
4309
4312
|
] })
|
|
4310
|
-
}
|
|
4313
|
+
},
|
|
4314
|
+
"bug-report-dialog"
|
|
4311
4315
|
);
|
|
4312
4316
|
}, [
|
|
4313
|
-
bugReportFileCount,
|
|
4314
|
-
closeBugReportDialog,
|
|
4315
|
-
errorMessage,
|
|
4316
|
-
handleConfirmBugReport,
|
|
4317
4317
|
isOpen,
|
|
4318
|
-
isSessionLoggedIn,
|
|
4319
4318
|
isSubmitting,
|
|
4319
|
+
closeBugReportDialog,
|
|
4320
|
+
errorMessage,
|
|
4320
4321
|
successState,
|
|
4321
|
-
|
|
4322
|
+
bugReportFileCount,
|
|
4323
|
+
isSessionLoggedIn,
|
|
4324
|
+
handleConfirmBugReport
|
|
4322
4325
|
]);
|
|
4323
4326
|
return {
|
|
4324
4327
|
BugReportDialog,
|
|
@@ -4588,7 +4591,7 @@ var FileMenuLeftHeader = (props) => {
|
|
|
4588
4591
|
}
|
|
4589
4592
|
)
|
|
4590
4593
|
] }),
|
|
4591
|
-
|
|
4594
|
+
BugReportDialog,
|
|
4592
4595
|
/* @__PURE__ */ jsx35(
|
|
4593
4596
|
ImportComponentDialogForCli,
|
|
4594
4597
|
{
|
package/dist/preview.js
CHANGED
package/dist/runner.js
CHANGED