Update the browser, editor, settings, and installer

This commit is contained in:
Knotty Wyvern
2026-10-12 14:46:21 -07:00
parent 909894b9c8
commit f6eaa52949
163 changed files with 146260 additions and 534 deletions
+1 -3
View File
@@ -1,5 +1,3 @@
import { isImagePath } from "../workspace/media";
type Point = { x: number; y: number };
const targets = new Map<HTMLElement, (path: string, point: Point) => void>();
let highlighted: HTMLElement | undefined;
@@ -8,7 +6,7 @@ export function registerImageDropTarget(element: HTMLElement, drop: (path: strin
return () => { targets.delete(element); element.classList.remove("image-drop-target"); };
}
function targetAt(path: string, point: Point) {
if (!isImagePath(path)) return;
if (!path || path.endsWith("/")) return;
const hit = document.elementFromPoint(point.x, point.y);
return [...targets].find(([element]) => element.isConnected && hit && element.contains(hit));
}