feat: multi-material overlays, presentation guides, and release prebuilds

Align control/presentation with presentation screen rect and darkness z-order; sync window titles and session window cleanup. Pack Win/Mac/Linux with npmRebuild disabled and release-native-prep for classic-level and sharp.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-08-03 11:28:18 +08:00
parent 61446dacfc
commit 2979d06f1c
41 changed files with 1060 additions and 252 deletions
+8 -47
View File
@@ -2,43 +2,18 @@
* Перед `electron-builder --mac`: npm ставит sharp только под CPU хоста.
* В release идут x64 и arm64 — в .app должны быть оба набора @img/sharp-darwin-*.
*/
import { execFileSync } from 'node:child_process';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const MAC_SHARP_IMG_PACKAGES = [
'@img/sharp-darwin-arm64',
'@img/sharp-libvips-darwin-arm64',
'@img/sharp-darwin-x64',
'@img/sharp-libvips-darwin-x64',
];
import {
ensureReleaseNativeDeps,
MAC_SHARP_IMG_PACKAGES,
sharpImgPackagesToInstall,
} from './release-native-prep.mjs';
/**
* @param {string} root
* @returns {string[]} entries like `@img/sharp-darwin-x64@0.34.5` missing under node_modules
*/
/** @deprecated use sharpImgPackagesToInstall(root, MAC_SHARP_IMG_PACKAGES) */
export function macSharpImgPackagesToInstall(root) {
const sharpPkgPath = path.join(root, 'node_modules', 'sharp', 'package.json');
if (!fs.existsSync(sharpPkgPath)) {
throw new Error('[release-mac-prep] sharp is not installed — run npm ci first');
}
const sharpPkg = JSON.parse(fs.readFileSync(sharpPkgPath, 'utf8'));
const versions = sharpPkg.optionalDependencies ?? {};
const missing = [];
for (const name of MAC_SHARP_IMG_PACKAGES) {
const version = versions[name];
if (!version) {
throw new Error(`[release-mac-prep] sharp optionalDependency missing: ${name}`);
}
if (!fs.existsSync(path.join(root, 'node_modules', name))) {
missing.push(`${name}@${version}`);
}
}
return missing;
return sharpImgPackagesToInstall(root, MAC_SHARP_IMG_PACKAGES);
}
/**
@@ -46,21 +21,7 @@ export function macSharpImgPackagesToInstall(root) {
* @param {{ runInstall?: boolean }} [opts]
*/
export function ensureMacSharpBinaries(root, opts = {}) {
const { runInstall = true } = opts;
const toInstall = macSharpImgPackagesToInstall(root);
if (toInstall.length === 0) {
console.log('[release-mac-prep] all macOS sharp binaries present');
return;
}
console.log('[release-mac-prep] installing', toInstall.join(', '));
if (!runInstall) return;
execFileSync('npm', ['install', '--no-save', '--force', ...toInstall], {
cwd: root,
stdio: 'inherit',
});
ensureReleaseNativeDeps(root, 'mac', opts);
}
const isMain = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);