Restructuring and refactoring

This commit is contained in:
Mario Zechner 2025-10-03 02:15:37 +02:00
parent 3331701e7e
commit 79dd23b6da
31 changed files with 1088 additions and 1686 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sandboxed Content</title>
<style>
html { height: 100%; }
body { min-height: 100%; margin: 0; }
</style>
</head>
<body>
<script src="sandbox.js"></script>
</body>
</html>

View file

@ -0,0 +1,12 @@
// Minimal sandbox.js - just listens for sandbox-load and writes the content
window.addEventListener("message", (event) => {
if (event.data.type === "sandbox-load") {
// Write the complete HTML (which includes runtime + user code)
document.open();
document.write(event.data.code);
document.close();
}
});
// Signal ready to parent
window.parent.postMessage({ type: "sandbox-ready" }, "*");

View file

@ -0,0 +1,11 @@
<html lang="en" class="h-full">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>pi-ai</title>
<link rel="stylesheet" href="app.css" />
</head>
<body class="h-full w-full m-0 overflow-hidden bg-background">
<script type="module" src="sidepanel.js"></script>
</body>
</html>