mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-09 06:06:19 +02:00
* Add `react-resizable-panels` library * Implement a custom SeparatorView * Add a `LeftResizablePanelView` * Add a custom `GroupView` * Export everything from shared-components * Make it possible to track width/collapse state through settings * Add a view model to drive the views * Render views without disrupting the old room list * Fix lint error * Disable user interaction on collapsed panel * Prevent widgets fron hijacking pointer events * Expand to full width on separator click * Separator should be shown when focused via keyboard * Update tests * Use data-attribute for hover * Write stories for SeperatorView * Write vite tests for SeparatorView * Write tests for LeftResizablePanelView * More tests * Fix lint errors * Fix flakey border on the roomlst * Fix storybook axe violation * Update snapshots * Fix playwright tests * Fix sonarcloud issues * Use translated string * Add better js-doc comments * Rename `ResizerSnapshot` to `ResizerViewSnapshot` * Externalize react-resizable-panels * Link figma designs to stories * Write playwright tests * Update screenshots * Fix lint errors * Update more screenshots * Update more screenshots * Fix flaky toast test * Update apps/web/playwright/e2e/crypto/toasts.spec.ts Co-authored-by: Andy Balaam <andy.balaam@matrix.org> * Fix indentation --------- Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
60 lines
1.9 KiB
TypeScript
60 lines
1.9 KiB
TypeScript
/*
|
|
* Copyright 2025 New Vector Ltd.
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
|
* Please see LICENSE files in the repository root for full details.
|
|
*
|
|
*/
|
|
|
|
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { defineConfig, esmExternalRequirePlugin } from "vite";
|
|
import dts from "vite-plugin-dts";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, "src/index.ts"),
|
|
name: "Element Web Shared Components",
|
|
// the proper extensions will be added
|
|
fileName: "element-web-shared-components",
|
|
},
|
|
outDir: "dist",
|
|
rolldownOptions: {
|
|
// make sure to externalize deps that shouldn't be bundled
|
|
// into your library
|
|
external: [
|
|
"@vector-im/compound-design-tokens",
|
|
"@vector-im/compound-web",
|
|
"react-virtuoso",
|
|
"react-resizable-panels",
|
|
],
|
|
plugins: [
|
|
esmExternalRequirePlugin({
|
|
external: ["react", "react-dom"],
|
|
}),
|
|
],
|
|
output: {
|
|
// Provide global variables to use in the UMD build
|
|
// for externalized deps
|
|
globals: {
|
|
"react": "react",
|
|
"@vector-im/compound-design-tokens": "compoundDesignTokens",
|
|
"@vector-im/compound-web": "compoundWeb",
|
|
"react-virtuoso": "reactVirtuoso",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [
|
|
dts({
|
|
rollupTypes: true,
|
|
include: ["src/**/*.{ts,tsx}"],
|
|
exclude: ["src/**/*.test.{ts,tsx}"],
|
|
copyDtsFiles: true,
|
|
}),
|
|
],
|
|
});
|