Add Notification Center and Game Optimizer themes

Extend Luma-style dark theme to two more Enact web overlays:
- com.webos.app.notificationcenter: dark pills, transparent
  compositor, notification-specific components
- com.webos.app.gameoptimizer: same plus GameItem, GameButton,
  GameSwitch, GamePanel custom components

Rename build.js → build.cjs (ESM compat) and update to build
all three themes from a single script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kaloyan DanchevandClaude Opus 4.6 committed 2026-10-24 12:07:09 +03:00
1 parent 14db4f6e71
commit 98dd75ab0e
4 files changed
+560 -29

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
const fs = require('fs');
const path = require('path');
const APPS = [
'com.palm.app.settings',
'com.webos.app.notificationcenter',
'com.webos.app.gameoptimizer',
];
const outDir = path.join(__dirname, 'dist');
fs.mkdirSync(outDir, { recursive: true });
for (const app of APPS) {
const srcPath = path.join(__dirname, app + '.js');
if (!fs.existsSync(srcPath)) {
console.log('SKIP:', app, '(source not found)');
continue;
}
const code = fs.readFileSync(srcPath, 'utf8');
let minified = code
.replace(/\/\/[^\n]*/g, '')
.replace(/\/\*[\s\S]*?\*\//g, '')
.replace(/\n\s*\n/g, '\n')
.replace(/^\s+/gm, '')
.replace(/\n/g, '')
.replace(/ +/g, ' ');
console.log(app + ':');
console.log(' Original:', code.length, 'bytes');
console.log(' Minified:', minified.length, 'bytes');
const minPath = path.join(outDir, app + '.min.js');
fs.writeFileSync(minPath, minified);
const b64 = Buffer.from(minified).toString('base64');
const b64Path = path.join(outDir, app + '.b64');
fs.writeFileSync(b64Path, b64);
console.log(' Base64: ', b64.length, 'bytes');
}