@rimori/client 2.5.28-next.2 → 2.5.28-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,6 +40,10 @@ export interface RimoriInfo {
40
40
  * - 'plugins' for beta and stable release channels
41
41
  */
42
42
  dbSchema: 'plugins' | 'plugins_alpha';
43
+ /**
44
+ * Whether text-to-speech is enabled globally (set in rimori-main navbar).
45
+ */
46
+ ttsEnabled: boolean;
43
47
  }
44
48
  export declare class RimoriCommunicationHandler {
45
49
  private port;
@@ -99,6 +99,7 @@ export class ChunkedAudioPlayer {
99
99
  this.startedPlaying = false;
100
100
  this.shouldMonitorLoudness = false;
101
101
  cancelAnimationFrame(this.handle);
102
+ this.loudnessCallback(0);
102
103
  }
103
104
  cleanup() {
104
105
  // Stop playback first
@@ -23,6 +23,11 @@ export declare class PluginModule {
23
23
  releaseChannel: string;
24
24
  applicationMode: ApplicationMode;
25
25
  theme: Theme;
26
+ /**
27
+ * Whether text-to-speech is globally enabled (set in rimori-main navbar).
28
+ * Updated automatically when the user toggles TTS.
29
+ */
30
+ ttsEnabled: boolean;
26
31
  constructor(supabase: SupabaseClient, communicationHandler: RimoriCommunicationHandler, info: RimoriInfo, ai: AIModule);
27
32
  /**
28
33
  * Fetches settings based on guild configuration.
@@ -14,6 +14,12 @@ import { Translator } from '../../controller/TranslationController';
14
14
  */
15
15
  export class PluginModule {
16
16
  constructor(supabase, communicationHandler, info, ai) {
17
+ var _a;
18
+ /**
19
+ * Whether text-to-speech is globally enabled (set in rimori-main navbar).
20
+ * Updated automatically when the user toggles TTS.
21
+ */
22
+ this.ttsEnabled = true;
17
23
  this.rimoriInfo = info;
18
24
  this.supabase = supabase;
19
25
  this.pluginId = info.pluginId;
@@ -21,7 +27,12 @@ export class PluginModule {
21
27
  this.communicationHandler = communicationHandler;
22
28
  const currentPlugin = info.installedPlugins.find((plugin) => plugin.id === info.pluginId);
23
29
  this.translator = new Translator(info.interfaceLanguage, (currentPlugin === null || currentPlugin === void 0 ? void 0 : currentPlugin.endpoint) || '', ai);
24
- this.communicationHandler.onUpdate((updatedInfo) => (this.rimoriInfo = updatedInfo));
30
+ this.ttsEnabled = (_a = info.ttsEnabled) !== null && _a !== void 0 ? _a : true;
31
+ this.communicationHandler.onUpdate((updatedInfo) => {
32
+ var _a;
33
+ this.rimoriInfo = updatedInfo;
34
+ this.ttsEnabled = (_a = updatedInfo.ttsEnabled) !== null && _a !== void 0 ? _a : true;
35
+ });
25
36
  this.applicationMode = this.communicationHandler.getQueryParam('applicationMode');
26
37
  this.theme = this.communicationHandler.getQueryParam('rm_theme') || 'light';
27
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimori/client",
3
- "version": "2.5.28-next.2",
3
+ "version": "2.5.28-next.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {