From 736bdffb075029653dbc048a4116756ff7f2e045 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Sat, 15 Nov 2025 23:36:56 +0800 Subject: [PATCH] chore: use @moeru/eventa --- apps/stage-tamagotchi/package.json | 2 +- .../src/main/services/airi/widgets/index.ts | 4 +- .../src/main/services/electron/screen.ts | 4 +- .../services/electron/system-preferences.ts | 4 +- .../src/main/services/electron/window.ts | 4 +- .../src/main/windows/caption/index.ts | 4 +- .../src/main/windows/main/index.ts | 4 +- .../main/windows/main/rpc/index.electron.ts | 4 +- .../windows/settings/rpc/index.electron.ts | 4 +- .../src/main/windows/widgets/index.ts | 2 +- .../windows/widgets/rpc/index.electron.ts | 2 +- apps/stage-tamagotchi/src/renderer/App.vue | 2 +- .../StageIslands/ControlsIsland/index.vue | 2 +- .../use-electorn-all-displays/index.ts | 2 +- .../use-electron-eventa-context/index.ts | 6 +-- .../use-electron-mouse/index.ts | 2 +- .../use-electron-window-bounds/index.ts | 2 +- .../src/renderer/pages/caption.vue | 2 +- .../src/shared/electron/screen.ts | 2 +- .../src/shared/electron/system-preferences.ts | 2 +- .../src/shared/electron/window.ts | 2 +- apps/stage-tamagotchi/src/shared/eventa.ts | 2 +- apps/stage-web/package.json | 2 +- packages/stage-pages/package.json | 2 +- packages/stage-ui/package.json | 2 +- pnpm-lock.yaml | 48 ++++++++++++++----- 26 files changed, 71 insertions(+), 47 deletions(-) diff --git a/apps/stage-tamagotchi/package.json b/apps/stage-tamagotchi/package.json index 49b2dbce..5ca26230 100644 --- a/apps/stage-tamagotchi/package.json +++ b/apps/stage-tamagotchi/package.json @@ -36,6 +36,7 @@ "@formkit/auto-animate": "^0.9.0", "@guiiai/logg": "catalog:", "@huggingface/transformers": "^3.7.6", + "@moeru/eventa": "^0.3.0", "@moeru/std": "catalog:", "@proj-airi/audio": "workspace:^", "@proj-airi/ccc": "workspace:^", @@ -53,7 +54,6 @@ "@tresjs/cientos": "^5.1.0", "@tresjs/core": "^5.1.0", "@types/audioworklet": "^0.0.89", - "@unbird/eventa": "^0.2.3", "@vueuse/core": "^14.0.0", "@vueuse/shared": "^14.0.0", "@xsai-ext/providers-cloud": "catalog:", diff --git a/apps/stage-tamagotchi/src/main/services/airi/widgets/index.ts b/apps/stage-tamagotchi/src/main/services/airi/widgets/index.ts index c0d5d144..eca23a6f 100644 --- a/apps/stage-tamagotchi/src/main/services/airi/widgets/index.ts +++ b/apps/stage-tamagotchi/src/main/services/airi/widgets/index.ts @@ -1,9 +1,9 @@ -import type { createContext } from '@unbird/eventa/adapters/electron/main' +import type { createContext } from '@moeru/eventa/adapters/electron/main' import type { BrowserWindow, IpcMainEvent } from 'electron' import type { WidgetsWindowManager } from '../../../windows/widgets' -import { defineInvokeHandlers } from '@unbird/eventa' +import { defineInvokeHandlers } from '@moeru/eventa' import { widgetsAdd, widgetsClear, widgetsFetch, widgetsOpenWindow, widgetsPrepareWindow, widgetsRemove, widgetsUpdate } from '../../../../shared/eventa' diff --git a/apps/stage-tamagotchi/src/main/services/electron/screen.ts b/apps/stage-tamagotchi/src/main/services/electron/screen.ts index 47f7cdb8..42b99fd5 100644 --- a/apps/stage-tamagotchi/src/main/services/electron/screen.ts +++ b/apps/stage-tamagotchi/src/main/services/electron/screen.ts @@ -1,7 +1,7 @@ -import type { createContext } from '@unbird/eventa/adapters/electron/main' +import type { createContext } from '@moeru/eventa/adapters/electron/main' import type { BrowserWindow } from 'electron' -import { defineInvokeHandler } from '@unbird/eventa' +import { defineInvokeHandler } from '@moeru/eventa' import { screen } from 'electron' import { cursorScreenPoint, startLoopGetCursorScreenPoint } from '../../../shared/electron/screen' diff --git a/apps/stage-tamagotchi/src/main/services/electron/system-preferences.ts b/apps/stage-tamagotchi/src/main/services/electron/system-preferences.ts index 7b2af49b..9b58652b 100644 --- a/apps/stage-tamagotchi/src/main/services/electron/system-preferences.ts +++ b/apps/stage-tamagotchi/src/main/services/electron/system-preferences.ts @@ -1,7 +1,7 @@ -import type { createContext } from '@unbird/eventa/adapters/electron/main' +import type { createContext } from '@moeru/eventa/adapters/electron/main' import type { BrowserWindow } from 'electron' -import { defineInvokeHandler } from '@unbird/eventa' +import { defineInvokeHandler } from '@moeru/eventa' import { systemPreferences } from 'electron' import { electron } from '../../../shared/eventa' diff --git a/apps/stage-tamagotchi/src/main/services/electron/window.ts b/apps/stage-tamagotchi/src/main/services/electron/window.ts index c85b7290..6182877a 100644 --- a/apps/stage-tamagotchi/src/main/services/electron/window.ts +++ b/apps/stage-tamagotchi/src/main/services/electron/window.ts @@ -1,7 +1,7 @@ -import type { createContext } from '@unbird/eventa/adapters/electron/main' +import type { createContext } from '@moeru/eventa/adapters/electron/main' import type { BrowserWindow } from 'electron' -import { defineInvokeHandler } from '@unbird/eventa' +import { defineInvokeHandler } from '@moeru/eventa' import { bounds, startLoopGetBounds } from '../../../shared/electron/window' import { electron } from '../../../shared/eventa' diff --git a/apps/stage-tamagotchi/src/main/windows/caption/index.ts b/apps/stage-tamagotchi/src/main/windows/caption/index.ts index a9024ee5..b2ed2667 100644 --- a/apps/stage-tamagotchi/src/main/windows/caption/index.ts +++ b/apps/stage-tamagotchi/src/main/windows/caption/index.ts @@ -3,8 +3,8 @@ import type { BrowserWindow, BrowserWindowConstructorOptions, Rectangle } from ' import { createHash } from 'node:crypto' import { join, resolve } from 'node:path' -import { defineInvokeHandler } from '@unbird/eventa' -import { createContext } from '@unbird/eventa/adapters/electron/main' +import { defineInvokeHandler } from '@moeru/eventa' +import { createContext } from '@moeru/eventa/adapters/electron/main' import { animate, utils } from 'animejs' import { BrowserWindow as ElectronBrowserWindow, ipcMain, screen, shell } from 'electron' import { debounce, throttle } from 'es-toolkit' diff --git a/apps/stage-tamagotchi/src/main/windows/main/index.ts b/apps/stage-tamagotchi/src/main/windows/main/index.ts index d39979e0..a8903c38 100644 --- a/apps/stage-tamagotchi/src/main/windows/main/index.ts +++ b/apps/stage-tamagotchi/src/main/windows/main/index.ts @@ -9,8 +9,8 @@ import { fileURLToPath } from 'node:url' import clickDragPlugin from 'electron-click-drag-plugin' import { is } from '@electron-toolkit/utils' -import { defineInvokeHandler } from '@unbird/eventa' -import { createContext } from '@unbird/eventa/adapters/electron/main' +import { defineInvokeHandler } from '@moeru/eventa' +import { createContext } from '@moeru/eventa/adapters/electron/main' import { defu } from 'defu' import { BrowserWindow, ipcMain, shell } from 'electron' import { isLinux, isMacOS } from 'std-env' diff --git a/apps/stage-tamagotchi/src/main/windows/main/rpc/index.electron.ts b/apps/stage-tamagotchi/src/main/windows/main/rpc/index.electron.ts index b5e2379f..5d23d5b9 100644 --- a/apps/stage-tamagotchi/src/main/windows/main/rpc/index.electron.ts +++ b/apps/stage-tamagotchi/src/main/windows/main/rpc/index.electron.ts @@ -2,8 +2,8 @@ import type { BrowserWindow } from 'electron' import type { WidgetsWindowManager } from '../../widgets' -import { defineInvokeHandler } from '@unbird/eventa' -import { createContext } from '@unbird/eventa/adapters/electron/main' +import { defineInvokeHandler } from '@moeru/eventa' +import { createContext } from '@moeru/eventa/adapters/electron/main' import { ipcMain } from 'electron' import { electronOpenChat, electronOpenMainDevtools, electronOpenSettings } from '../../../../shared/eventa' diff --git a/apps/stage-tamagotchi/src/main/windows/settings/rpc/index.electron.ts b/apps/stage-tamagotchi/src/main/windows/settings/rpc/index.electron.ts index 1cd38720..ff20d513 100644 --- a/apps/stage-tamagotchi/src/main/windows/settings/rpc/index.electron.ts +++ b/apps/stage-tamagotchi/src/main/windows/settings/rpc/index.electron.ts @@ -2,8 +2,8 @@ import type { BrowserWindow } from 'electron' import type { WidgetsWindowManager } from '../../widgets' -import { defineInvokeHandler } from '@unbird/eventa' -import { createContext } from '@unbird/eventa/adapters/electron/main' +import { defineInvokeHandler } from '@moeru/eventa' +import { createContext } from '@moeru/eventa/adapters/electron/main' import { ipcMain } from 'electron' import { electronOpenSettingsDevtools } from '../../../../shared/eventa' diff --git a/apps/stage-tamagotchi/src/main/windows/widgets/index.ts b/apps/stage-tamagotchi/src/main/windows/widgets/index.ts index 0a60a0fd..1633942c 100644 --- a/apps/stage-tamagotchi/src/main/windows/widgets/index.ts +++ b/apps/stage-tamagotchi/src/main/windows/widgets/index.ts @@ -4,7 +4,7 @@ import type { WidgetsAddPayload, WidgetSnapshot } from '../../../shared/eventa' import { join, resolve } from 'node:path' -import { createContext } from '@unbird/eventa/adapters/electron/main' +import { createContext } from '@moeru/eventa/adapters/electron/main' import { BrowserWindow as ElectronBrowserWindow, ipcMain, screen, shell } from 'electron' import { isMacOS } from 'std-env' diff --git a/apps/stage-tamagotchi/src/main/windows/widgets/rpc/index.electron.ts b/apps/stage-tamagotchi/src/main/windows/widgets/rpc/index.electron.ts index 49a35924..3c501286 100644 --- a/apps/stage-tamagotchi/src/main/windows/widgets/rpc/index.electron.ts +++ b/apps/stage-tamagotchi/src/main/windows/widgets/rpc/index.electron.ts @@ -2,7 +2,7 @@ import type { BrowserWindow } from 'electron' import type { WidgetsWindowManager } from '../../widgets' -import { createContext } from '@unbird/eventa/adapters/electron/main' +import { createContext } from '@moeru/eventa/adapters/electron/main' import { ipcMain } from 'electron' import { createWidgetsService } from '../../../services/airi/widgets' diff --git a/apps/stage-tamagotchi/src/renderer/App.vue b/apps/stage-tamagotchi/src/renderer/App.vue index de7b91ca..1e13e929 100644 --- a/apps/stage-tamagotchi/src/renderer/App.vue +++ b/apps/stage-tamagotchi/src/renderer/App.vue @@ -2,7 +2,7 @@ import { useDisplayModelsStore } from '@proj-airi/stage-ui/stores/display-models' import { useOnboardingStore } from '@proj-airi/stage-ui/stores/onboarding' import { useSettings } from '@proj-airi/stage-ui/stores/settings' -import { defineInvoke, defineInvokeHandler } from '@unbird/eventa' +import { defineInvoke, defineInvokeHandler } from '@moeru/eventa' import { storeToRefs } from 'pinia' import { onMounted, watch } from 'vue' import { useI18n } from 'vue-i18n' diff --git a/apps/stage-tamagotchi/src/renderer/components/StageIslands/ControlsIsland/index.vue b/apps/stage-tamagotchi/src/renderer/components/StageIslands/ControlsIsland/index.vue index a771e502..ce647f5d 100644 --- a/apps/stage-tamagotchi/src/renderer/components/StageIslands/ControlsIsland/index.vue +++ b/apps/stage-tamagotchi/src/renderer/components/StageIslands/ControlsIsland/index.vue @@ -1,6 +1,6 @@