First push
This commit is contained in:
seclusionenthusiast committed 2026-03-03 14:52:19 +09:00
commit c4a020c191
146 files changed
+40796

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<defs>
<linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#3B82F6"/>
<stop offset="100%" stop-color="#1D4ED8"/>
</linearGradient>
</defs>
<!-- Full-bleed background (maskable safe zone = center 80%) -->
<rect width="512" height="512" fill="url(#g)"/>
<!-- Music2 icon from Lucide, original 24×24, scaled ×15, centered in 512×512 -->
<!-- Content bounding box: ~3..21 in x, ~3..21 in y → 18×18 units → 270×270 px -->
<!-- Translate so content center (12,12 orig) maps to (256,256) -->
<!-- translateX = 256 - 12×15 = 76 translateY = 256 - 12×15 = 76 -->
<g transform="translate(76,76) scale(15)"
stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none">
<path d="M9 18V5l12-2v13"/>
<circle cx="6" cy="18" r="3"/>
<circle cx="18" cy="16" r="3"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 961 B

+18
View File
@@ -0,0 +1,18 @@
{
"name": "StemEngine",
"short_name": "StemEngine",
"description": "Audio processing toolkit — stem separation, lyrics sync, MIDI transcription",
"start_url": "/",
"display": "standalone",
"orientation": "any",
"background_color": "#030712",
"theme_color": "#3B82F6",
"icons": [
{
"src": "/icon.svg",
"sizes": "any",
"type": "image/svg+xml",
"purpose": "any maskable"
}
]
}
+59
View File
@@ -0,0 +1,59 @@
// StemEngine Service Worker
// Minimal implementation for PWA installability.
// API responses are intentionally NOT cached (all data is dynamic/local).
// The app shell (HTML/JS/CSS) is cached so the UI loads instantly on repeat visits.
const CACHE = 'stemengine-v1'
// Assets to pre-cache on install
const SHELL = ['/']
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE).then((cache) => cache.addAll(SHELL))
)
// Activate immediately — don't wait for old tabs to close
self.skipWaiting()
})
self.addEventListener('activate', (event) => {
// Delete old caches from previous versions
event.waitUntil(
caches.keys().then((keys) =>
Promise.all(keys.filter((k) => k !== CACHE).map((k) => caches.delete(k)))
).then(() => self.clients.claim())
)
})
self.addEventListener('fetch', (event) => {
const { request } = event
const url = new URL(request.url)
// Let API calls and non-GET requests go straight to the network
if (request.method !== 'GET' || url.pathname.startsWith('/api/')) {
event.respondWith(fetch(request))
return
}
// For navigation requests: network-first, fall back to cached shell
if (request.mode === 'navigate') {
event.respondWith(
fetch(request).catch(() => caches.match('/'))
)
return
}
// For static assets: cache-first
event.respondWith(
caches.match(request).then((cached) => {
if (cached) return cached
return fetch(request).then((response) => {
if (response.ok) {
const clone = response.clone()
caches.open(CACHE).then((cache) => cache.put(request, clone))
}
return response
})
})
)
})