Skip to content

Bump module API to 1.14.0#33685

Merged
Half-Shot merged 1 commit into
developfrom
hs/module-api-1.14.0
Jun 2, 2026
Merged

Bump module API to 1.14.0#33685
Half-Shot merged 1 commit into
developfrom
hs/module-api-1.14.0

Conversation

@Half-Shot
Copy link
Copy Markdown
Member

The API delta is:

@@ -11,6 +11,7 @@
 import { ReactNode } from 'react';
 import { Root } from 'react-dom/client';
 import { RuntimeModule } from '@matrix-org/react-sdk-module-api';
+import { SVGAttributes } from 'react';
 
 // @public
 export interface AccountAuthApiExtension {
@@ -47,6 +48,8 @@
     // @alpha
     readonly builtins: BuiltinsApi;
     readonly client: ClientApi;
+    // @alpha
+    readonly composer: ComposerApi;
     readonly config: ConfigApi;
     createRoot(element: Element): Root;
     // @alpha
@@ -97,6 +100,31 @@
     shouldShowComponent?(component: "UIComponent.sendInvites" | "UIComponent.roomCreation" | "UIComponent.spaceCreation" | "UIComponent.exploreRooms" | "UIComponent.addIntegrations" | "UIComponent.filterContainer" | "UIComponent.roomOptionsMenu"): boolean;
 }
 
+// @alpha
+export interface ComposerApi {
+    addFileUploadOption(option: ComposerApiFileUploadOption): void;
+    insertPlaintextIntoComposer(plaintext: string, view: ComposerApiTarget): void;
+    openFileUploadConfirmation(files: File[], view: ComposerApiTarget): void;
+}
+
+// @alpha
+export type ComposerApiFileUploadOption = {
+    type: string;
+    label: string;
+    icon?: ComponentType<SVGAttributes<SVGElement>>;
+    onSelected: (roomId?: string, view?: ComposerApiTarget, relation?: {
+        inReplyToEventId?: string;
+        relType?: string;
+    }) => Promise<void> | void;
+};
+
+// @alpha
+export type ComposerApiTarget = {
+    view: "room";
+} | {
+    view: "thread";
+};
+
 // @public
 export interface Config {
     // (undocumented)
@@ -221,7 +249,7 @@
     humanizeTime(this: void, timeMillis: number): string;
     get language(): string;
     register(this: void, translations: Partial<Translations>): void;
-    translate(this: void, key: keyof Translations, variables?: Variables): string;
+    translate(this: void, key: keyof Translations, variables?: StringVariables): string;
     translate(this: void, key: keyof Translations, variables: Variables | undefined, tags: Tags): ReactNode;
 }
 
@@ -392,6 +420,14 @@
 }
 
 // @public
+export interface RichVariables {
+    // (undocumented)
+    [key: string]: SubstitutionValue;
+    // (undocumented)
+    count?: number;
+}
+
+// @public
 export interface Room {
     getLastActiveTimestamp: () => number;
     id: string;
@@ -438,6 +474,14 @@
 // @public
 export interface StoresApi {
     roomListStore: RoomListStoreApi;
+}
+
+// @public
+export interface StringVariables {
+    // (undocumented)
+    [key: string]: number | string | null | undefined;
+    // (undocumented)
+    count?: number;
 }
 
 // @public
@@ -474,10 +518,7 @@
 export function useWatchable<T>(watchable: Watchable<T>): T;
 
 // @public
-export type Variables = {
-    count?: number;
-    [key: string]: SubstitutionValue;
-};
+export type Variables = StringVariables | RichVariables;
 
 // @public
 export class Watchable<T> {
@@ -544,4 +585,3 @@
 // (No @packageDocumentation comment for this package)
 

@Half-Shot Half-Shot requested a review from a team as a code owner June 1, 2026 11:11
@Half-Shot Half-Shot requested a review from florianduros June 1, 2026 11:11
@Half-Shot Half-Shot added the T-Feature Request to add a new feature which does not exist right now label Jun 1, 2026
@Half-Shot Half-Shot added T-Enhancement and removed T-Feature Request to add a new feature which does not exist right now labels Jun 1, 2026
@Half-Shot Half-Shot added this pull request to the merge queue Jun 2, 2026
Merged via the queue into develop with commit 31b085a Jun 2, 2026
62 of 68 checks passed
@Half-Shot Half-Shot deleted the hs/module-api-1.14.0 branch June 2, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants