Skip to content

Commit c3cf29a

Browse files
authored
Merge pull request #141 from element-hq/renovate/vector-im
2 parents b69a0b9 + 04d9efd commit c3cf29a

File tree

14 files changed

+225
-12
lines changed

14 files changed

+225
-12
lines changed

modules/banner/element-web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"test": "echo no tests yet"
1313
},
1414
"devDependencies": {
15+
"@arcmantle/vite-plugin-import-css-sheet": "^1.0.12",
1516
"@element-hq/element-web-module-api": "^1.0.0",
1617
"@types/node": "^22.10.7",
1718
"@types/react": "^19",

modules/banner/element-web/src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Please see LICENSE files in the repository root for full details.
66
*/
77

88
import { ThemeProvider } from "styled-components";
9+
import compound from "@vector-im/compound-web/dist/style.css" with { type: "css" };
910

1011
import type { Module, Api, ModuleFactory } from "@element-hq/element-web-module-api";
1112
import Translations from "./translations.json";
@@ -21,6 +22,8 @@ class BannerModule implements Module {
2122
public constructor(private api: Api) {}
2223

2324
public async load(): Promise<void> {
25+
document.adoptedStyleSheets.push(compound);
26+
2427
this.api.i18n.register(Translations);
2528

2629
try {

modules/banner/element-web/src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Please see LICENSE files in the repository root for full details.
66
*/
77

88
/// <reference types="vite-plugin-svgr/client" />
9+
/// <reference types="@arcmantle/vite-plugin-import-css-sheet/client" />
-323 Bytes
Loading
-1.08 KB
Loading

modules/banner/element-web/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import react from "@vitejs/plugin-react";
1212
import { nodePolyfills } from "vite-plugin-node-polyfills";
1313
import externalGlobals from "rollup-plugin-external-globals";
1414
import svgr from "vite-plugin-svgr";
15+
import { importCSSSheet } from "@arcmantle/vite-plugin-import-css-sheet";
1516

1617
const __dirname = dirname(fileURLToPath(import.meta.url));
1718

@@ -31,6 +32,7 @@ export default defineConfig({
3132
},
3233
},
3334
plugins: [
35+
importCSSSheet(),
3436
react(),
3537
svgr(),
3638
nodePolyfills({

modules/restricted-guests/element-web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"test": "echo no tests yet"
1313
},
1414
"devDependencies": {
15+
"@arcmantle/vite-plugin-import-css-sheet": "^1.0.12",
1516
"@element-hq/element-web-module-api": "^1.0.0",
1617
"@types/node": "^22.10.7",
1718
"@types/react": "^19",

modules/restricted-guests/element-web/src/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
55
Please see LICENSE files in the repository root for full details.
66
*/
77

8+
import compound from "@vector-im/compound-web/dist/style.css" with { type: "css" };
9+
810
import type { Module, Api, ModuleFactory } from "@element-hq/element-web-module-api";
911
import Translations from "./translations.json";
1012
import { ModuleConfig, CONFIG_KEY } from "./config";
@@ -28,6 +30,8 @@ class RestrictedGuestsModule implements Module {
2830
public constructor(private api: Api) {}
2931

3032
public async load(): Promise<void> {
33+
document.adoptedStyleSheets.push(compound);
34+
3135
this.api.i18n.register(Translations);
3236

3337
try {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
Copyright 2025 Element Creations Ltd.
3+
4+
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
5+
Please see LICENSE files in the repository root for full details.
6+
*/
7+
8+
/// <reference types="@arcmantle/vite-plugin-import-css-sheet/client" />
168 Bytes
Loading

0 commit comments

Comments
 (0)