tauri-plugin-decor 1.0.1

Opinionated window decoration controls for Tauri apps.
Documentation
(() => {
	if (document.querySelector("[data-tauri-decor-tb]")) return;

	const tb = document.createElement("div");
	tb.setAttribute("data-tauri-decor-tb", "");
	tb.setAttribute("role", "group");
	tb.setAttribute("aria-label", "Window controls");
	Object.assign(tb.style, {
		top: "0",
		left: "0",
		zIndex: "10000",
		width: "100%",
		height: "32px",
		display: "flex",
		position: "fixed",
		alignItems: "end",
		justifyContent: "end",
		backgroundColor: "transparent"
	});

	const drag = document.createElement("div");
	Object.assign(drag.style, {
		width: "100%",
		height: "100%",
		background: "transparent",
		cursor: "default"
	});
	drag.setAttribute("data-tauri-drag-region", "");
	drag.addEventListener("contextmenu", (e) => {
		e.preventDefault();
	});
	tb.appendChild(drag);

	document.body.prepend(tb);
})();