First working POC

This commit is contained in:
2026-01-26 22:21:54 +01:00
commit cfddc1edea
255 changed files with 77606 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<script lang="ts">
interface Props {
children: any;
}
let { children }: Props = $props();
/**
* Portal action - moves the DOM node to document.body
* This escapes any overflow clipping boundaries
*/
function portal(node: HTMLElement) {
const container = document.createElement('div');
document.body.appendChild(container);
container.appendChild(node);
return {
destroy() {
if (container.parentNode) {
document.body.removeChild(container);
}
}
};
}
</script>
<div use:portal>
{@render children()}
</div>