Compare commits

..

7 Commits

3 changed files with 1 additions and 18 deletions
-6
View File
@@ -6,12 +6,6 @@
:80 {
encode zstd gzip
header {
X-Frame-Options "DENY"
X-Content-Type-Options "nosniff"
Referrer-Policy "strict-origin-when-cross-origin"
}
handle /mcp {
reverse_proxy 127.0.0.1:3001
}
+1 -2
View File
@@ -28,8 +28,7 @@ function sceneFromEditor(
files: BinaryFiles,
): ScenePayload {
return {
// Excalidraw passes immutable arrays, avoid copying it on every onChange event
elements: elements as unknown[],
elements: [...elements],
appState: appState as unknown as Record<string, unknown>,
files: files as unknown as Record<string, unknown>,
};
-10
View File
@@ -33,20 +33,10 @@ export function useThemeTokenSync(
return;
}
// Read all tokens first to avoid layout thrashing
const computedStyles = window.getComputedStyle(excalidrawRoot);
const updates: Array<[string, string]> = [];
for (const [sourceToken, targetToken] of EXCALIDRAW_THEME_TOKEN_MAP) {
const value = computedStyles.getPropertyValue(sourceToken).trim();
if (value) {
updates.push([targetToken, value]);
}
}
// Write in a separate pass, skipping unchanged values
for (const [targetToken, value] of updates) {
if (appShell.style.getPropertyValue(targetToken) !== value) {
appShell.style.setProperty(targetToken, value);
}
}