Add Iris Studio app

- Add the Electron studio (electron-vite, React, three)
- Ignore node_modules and build output under studio/
This commit is contained in:
piexel committed 2026-11-15 11:17:34 +01:00
1 parent 832070cd69
commit 564dcdcc72
252 files changed
+24496

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { contextBridge, ipcRenderer, type IpcRendererEvent } from 'electron'
import type { StoredShortcuts, StudioHost, ThemeChoice } from '../shared/bridge'
const host: StudioHost = {
listBridges: () => ipcRenderer.invoke('studio:list-bridges'),
initialLink: () => ipcRenderer.invoke('studio:initial-link'),
onLink: (listener) => {
const forward = (_event: IpcRendererEvent, link: string): void => listener(link)
ipcRenderer.on('studio:link', forward)
return () => ipcRenderer.removeListener('studio:link', forward)
},
setTheme: (theme: ThemeChoice) => ipcRenderer.send('studio:set-theme', theme),
copyText: (text: string) => ipcRenderer.send('studio:copy-text', text),
loadShortcuts: () => ipcRenderer.invoke('studio:load-shortcuts'),
saveShortcuts: (shortcuts: StoredShortcuts) => ipcRenderer.send('studio:save-shortcuts', shortcuts),
graphics: () => ipcRenderer.invoke('studio:graphics'),
useDedicatedGpu: (dedicated: boolean) => ipcRenderer.send('studio:use-dedicated-gpu', dedicated)
}
contextBridge.exposeInMainWorld('studio', host)