tauri-plugin-decor 1.0.1

Opinionated window decoration controls for Tauri apps.
Documentation
// Linux: themed caption buttons (GNOME icons + CSS). Loaded after controls.js; @win-* placeholders
// may be replaced from Rust (icon paths + button order).

const ICONS = {
	minimize: '<svg viewBox="0 0 16 16"><path d="M3 8h10v1H3z"/></svg>',
	maximize: '<svg viewBox="0 0 16 16"><path d="M3 3h10v10H3zm1 1v8h8V4z"/></svg>',
	close: '<svg viewBox="0 0 16 16"><path d="M3.46 3.46l9.08 9.08-.7.7-9.08-9.08zM12.54 3.46l-9.08 9.08.7.7 9.08-9.08z"/></svg>',
	restore: '<svg viewBox="0 0 16 16"><path d="M5 1h8v8h-2v2H3V3h2zm1 2v6h6V3zm-2 4V5H4v6h6v-1H5z"/></svg>'
};

const icon = (key, val) => (val.startsWith("@win-") ? ICONS[key] || val : val);

createControls({
	controls: ["minimize", "maximize", "close"],
	cssHover: true,
	containerStyle: {
		width: "fit-content",
		display: "flex",
		paddingRight: "0.5em",
		gap: "0.8125em"
	},
	icons: {
		minimize: icon("minimize", `@win-minimize`),
		maximize: icon("maximize", `@win-maximize`),
		close: icon("close", `@win-close`)
	},
	restoreIcon: icon("restore", `@win-restore`),
	css: `
		.decor-tb-btn {
			color: white;
			cursor: default;
			border: none;
			padding: 0px;
			width: 1.5em;
			height: 1.5em;
			outline: none;
			display: flex;
			box-shadow: none;
			align-items: center;
			justify-content: center;
			transition: background 0.1s;
			border-radius: 50%;
			background-color: var(--decor-tb-btn-bg, rgba(255, 255, 255, 0.2));
		}
		.decor-tb-btn:hover {
			background-color: var(--decor-tb-btn-hover-bg, rgba(255, 255, 255, 0.4));
		}
		.decor-tb-btn svg {
			width: 16px;
			height: 16px;
		}
		.decor-tb-btn svg path {
			fill: var(--decor-tb-btn-fg, #ffffff);
		}
	`
});