@tscircuit/runframe 0.0.724 → 0.0.726
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.
|
@@ -19,12 +19,8 @@ if (!window.location.hostname.includes("localhost") && !window.location.hostname
|
|
|
19
19
|
|
|
20
20
|
// lib/utils/bytesToBase64.ts
|
|
21
21
|
function bytesToBase64(bytes) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
for (let i = 0; i < len; i++) {
|
|
25
|
-
binary += String.fromCharCode(bytes[i]);
|
|
26
|
-
}
|
|
27
|
-
return btoa(binary);
|
|
22
|
+
const binString = String.fromCodePoint(...bytes);
|
|
23
|
+
return btoa(binString);
|
|
28
24
|
}
|
|
29
25
|
|
|
30
26
|
// lib/utils/encodeFsMapToUrlHash.ts
|
|
@@ -384,10 +380,10 @@ import { useState, useMemo } from "react";
|
|
|
384
380
|
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
385
381
|
var ErrorTabContent = ({
|
|
386
382
|
code,
|
|
383
|
+
fsMap,
|
|
387
384
|
autoroutingLog,
|
|
388
385
|
circuitJsonErrors,
|
|
389
386
|
circuitJsonWarnings,
|
|
390
|
-
fsMap,
|
|
391
387
|
onReportAutoroutingLog,
|
|
392
388
|
errorMessage,
|
|
393
389
|
errorStack,
|
|
@@ -598,7 +594,9 @@ ${currentError.stack}`;
|
|
|
598
594
|
className: "rf-p-1",
|
|
599
595
|
onClick: () => {
|
|
600
596
|
const title = `Error ${currentError.type}`.replace(/[^a-zA-Z0-9 ]/g, " ").replace(/\s+/g, " ").slice(0, 100);
|
|
601
|
-
const url = fsMap ? encodeFsMapToUrlHash(
|
|
597
|
+
const url = fsMap ? encodeFsMapToUrlHash(
|
|
598
|
+
fsMap instanceof Map ? Object.fromEntries(fsMap.entries()) : fsMap
|
|
599
|
+
) : createSnippetUrl(code ?? "");
|
|
602
600
|
let errorDetails = `${currentError.type}: ${currentError.message}`;
|
|
603
601
|
if (evalVersion) errorDetails += `
|
|
604
602
|
@tscircuit/eval@${evalVersion}`;
|
|
@@ -1284,7 +1282,7 @@ var useErrorTelemetry = ({
|
|
|
1284
1282
|
};
|
|
1285
1283
|
|
|
1286
1284
|
// package.json
|
|
1287
|
-
var version = "0.0.
|
|
1285
|
+
var version = "0.0.725";
|
|
1288
1286
|
|
|
1289
1287
|
// lib/components/RunFrame/runner-store/use-runner-store.ts
|
|
1290
1288
|
import { create } from "zustand";
|
|
@@ -1572,7 +1570,9 @@ var CircuitJsonPreview = ({
|
|
|
1572
1570
|
),
|
|
1573
1571
|
onEditEventsChanged: (editEvents2) => {
|
|
1574
1572
|
if (onEditEvent) {
|
|
1575
|
-
|
|
1573
|
+
for (const e of editEvents2) {
|
|
1574
|
+
onEditEvent(e);
|
|
1575
|
+
}
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
package/dist/preview.d.ts
CHANGED
|
@@ -31,11 +31,11 @@ type TabId = "code" | "pcb" | "schematic" | "assembly" | "cad" | "bom" | "circui
|
|
|
31
31
|
interface PreviewContentProps {
|
|
32
32
|
defaultToFullScreen?: boolean;
|
|
33
33
|
code?: string;
|
|
34
|
+
fsMap?: Map<string, string> | Record<string, string>;
|
|
34
35
|
readOnly?: boolean;
|
|
35
36
|
onRunClicked?: () => void;
|
|
36
37
|
tsxRunTriggerCount?: number;
|
|
37
38
|
errorMessage?: string | null;
|
|
38
|
-
fsMap?: Map<string, string>;
|
|
39
39
|
errorStack?: string | null;
|
|
40
40
|
autoroutingGraphics?: any;
|
|
41
41
|
circuitJson: CircuitJson | null;
|
package/dist/preview.js
CHANGED
package/dist/runner.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
useOrderDialogCli,
|
|
38
38
|
useRunFrameStore,
|
|
39
39
|
useRunnerStore
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-CDGN6AQ3.js";
|
|
41
41
|
|
|
42
42
|
// lib/components/RunFrame/RunFrame.tsx
|
|
43
43
|
import { createCircuitWebWorker } from "@tscircuit/eval/worker";
|
|
@@ -1745,7 +1745,10 @@ var exportFabricationFiles = async ({
|
|
|
1745
1745
|
projectName
|
|
1746
1746
|
}) => {
|
|
1747
1747
|
const zip = new JSZip();
|
|
1748
|
-
const
|
|
1748
|
+
const filteredCircuitJson = circuitJson.filter(
|
|
1749
|
+
(element) => !("error_type" in element) && !("warning_type" in element)
|
|
1750
|
+
);
|
|
1751
|
+
const gerberLayerCmds = convertSoupToGerberCommands(filteredCircuitJson, {
|
|
1749
1752
|
flip_y_axis: false
|
|
1750
1753
|
});
|
|
1751
1754
|
const gerberFileContents = stringifyGerberCommandLayers(gerberLayerCmds);
|
|
@@ -1753,7 +1756,7 @@ var exportFabricationFiles = async ({
|
|
|
1753
1756
|
zip.file(`gerber/${fileName}.gbr`, fileContents);
|
|
1754
1757
|
}
|
|
1755
1758
|
const drillCmds = convertSoupToExcellonDrillCommands({
|
|
1756
|
-
circuitJson,
|
|
1759
|
+
circuitJson: filteredCircuitJson,
|
|
1757
1760
|
is_plated: true,
|
|
1758
1761
|
flip_y_axis: false
|
|
1759
1762
|
});
|