,
+// never
+// > {
+// static defaultProps = {
+// enabled: false,
+// };
+// node: React.ReactNode;
+
+// constructor(props: IFullScreenProps) {
+// super(props);
+// }
+
+// componentDidMount() {
+// fscreen.addEventListener('fullscreenchange', this.detectFullScreen, {});
+// }
+
+// componentWillUnmount() {
+// fscreen.removeEventListener('fullscreenchange', this.detectFullScreen, {});
+// }
+
+// componentDidUpdate() {
+// this.handleProps(this.props);
+// }
+
+// handleProps(props: IFullScreenProps) {
+// const enabled = fscreen.fullscreenElement;
+// if (enabled && !props.enabled) {
+// this.leaveFullScreen();
+// } else if (!enabled && props.enabled) {
+// this.enterFullScreen();
+// }
+// }
+
+// detectFullScreen = () => {
+// if (this.props.onChange) {
+// this.props.onChange(!!fscreen.fullscreenElement);
+// }
+// if (this.props.onOpen && !!fscreen.fullscreenElement) {
+// this.props.onOpen();
+// }
+// if (this.props.onClose && !fscreen.fullscreenElement) {
+// this.props.onClose();
+// }
+// };
+
+// enterFullScreen = () => {
+// fscreen.requestFullscreen(this.node);
+// };
+
+// leaveFullScreen = () => {
+// fscreen.exitFullscreen();
+// };
+
+// render() {
+// return (
+// (this.node = node)}
+// style={{ height: '100%', width: '100%' }}
+// >
+// {this.props.children}
+//
+// );
+// }
+// }
+
+export function Fullscreen({
+ children,
+ isEnabled,
+}: {
+ children: React.ReactNode;
+ isEnabled?: boolean;
+}) {
+ const node = useRef(null);
+
+ useEffect(() => {
+ if (node.current) {
+ if (isEnabled) {
+ node.current.requestFullscreen();
+ } else if (document.fullscreenElement) {
+ document?.exitFullscreen();
+ }
+ }
+ }, [node, isEnabled]);
+
+ // useEffect(() => {
+ // document?.addEventListener('fullscreenchange', detectFullScreen);
+ // return () => {
+ // document?.removeEventListener('fullscreenchange', detectFullScreen);
+ // };
+ // }, []);
+
+ return (
+
+ {children}
+
+ );
+}
diff --git a/src/modules/player/rightPanel/SideContent.tsx b/src/modules/player/rightPanel/SideContent.tsx
index e87a7be31..f45fb0941 100644
--- a/src/modules/player/rightPanel/SideContent.tsx
+++ b/src/modules/player/rightPanel/SideContent.tsx
@@ -1,5 +1,4 @@
import type { JSX } from 'react';
-import Fullscreen from 'react-fullscreen-crossbrowser';
import { useTranslation } from 'react-i18next';
import { IconButton, Stack, Tooltip, styled } from '@mui/material';
@@ -24,6 +23,7 @@ import { FLOATING_BUTTON_Z_INDEX } from '~player/config/constants';
import { useLayoutContext } from '~player/contexts/LayoutContext';
import { ItemContentWrapper } from '~player/item/Item';
+import { Fullscreen } from './Fullscreen';
import SideDrawer from './SideDrawer';
const StyledMain = styled('div', {
@@ -163,10 +163,7 @@ const SideContent = ({ content, item }: Props): JSX.Element | null => {
};
return (
- setIsFullscreen(isFullscreenEnabled)}
- >
+
{displayChatbox()}
{displayPinnedItems()}
diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts
index 7718193a9..c9d0500eb 100644
--- a/src/routeTree.gen.ts
+++ b/src/routeTree.gen.ts
@@ -291,6 +291,7 @@ const BuilderItemsItemIdItemPagePublishRoute =
} as any)
export interface FileRoutesByFullPath {
+ '/': typeof LandingIndexRoute
'/analytics': typeof AnalyticsRouteWithChildren
'/auth': typeof AuthRouteWithChildren
'/signin': typeof SigninRoute
@@ -309,10 +310,9 @@ export interface FileRoutesByFullPath {
'/auth/success': typeof AuthSuccessRoute
'/builder/map': typeof BuilderMapRoute
'/email/change': typeof EmailChangeRoute
- '/': typeof LandingIndexRoute
'/analytics/': typeof AnalyticsIndexRoute
- '/builder': typeof BuilderIndexRoute
- '/player': typeof PlayerIndexRoute
+ '/builder/': typeof BuilderIndexRoute
+ '/player/': typeof PlayerIndexRoute
'/home': typeof MemberOnlyHomeLayoutHomeRoute
'/published': typeof MemberOnlyHomeLayoutPublishedRoute
'/recycled': typeof MemberOnlyHomeLayoutRecycledRoute
@@ -322,7 +322,7 @@ export interface FileRoutesByFullPath {
'/analytics/items/$itemId': typeof AnalyticsItemsItemIdRouteWithChildren
'/builder/items/$itemId': typeof BuilderItemsItemIdItemPageRouteWithChildren
'/player/$rootId/$itemId': typeof PlayerRootIdItemIdRouteWithChildren
- '/player/$rootId': typeof PlayerRootIdIndexRoute
+ '/player/$rootId/': typeof PlayerRootIdIndexRoute
'/analytics/items/$itemId/apps': typeof AnalyticsItemsItemIdAppsRoute
'/analytics/items/$itemId/export': typeof AnalyticsItemsItemIdExportRoute
'/player/$rootId/$itemId/autoLogin': typeof PlayerRootIdItemIdAutoLoginRoute
@@ -334,6 +334,7 @@ export interface FileRoutesByFullPath {
'/builder/items/$itemId/share': typeof BuilderItemsItemIdItemPageShareRoute
}
export interface FileRoutesByTo {
+ '/': typeof LandingIndexRoute
'/auth': typeof AuthRouteWithChildren
'/signin': typeof SigninRoute
'/about-us': typeof LandingAboutUsRoute
@@ -351,7 +352,6 @@ export interface FileRoutesByTo {
'/auth/success': typeof AuthSuccessRoute
'/builder/map': typeof BuilderMapRoute
'/email/change': typeof EmailChangeRoute
- '/': typeof LandingIndexRoute
'/analytics': typeof AnalyticsIndexRoute
'/builder': typeof BuilderIndexRoute
'/player': typeof PlayerIndexRoute
@@ -423,6 +423,7 @@ export interface FileRoutesById {
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths:
+ | '/'
| '/analytics'
| '/auth'
| '/signin'
@@ -441,10 +442,9 @@ export interface FileRouteTypes {
| '/auth/success'
| '/builder/map'
| '/email/change'
- | '/'
| '/analytics/'
- | '/builder'
- | '/player'
+ | '/builder/'
+ | '/player/'
| '/home'
| '/published'
| '/recycled'
@@ -454,7 +454,7 @@ export interface FileRouteTypes {
| '/analytics/items/$itemId'
| '/builder/items/$itemId'
| '/player/$rootId/$itemId'
- | '/player/$rootId'
+ | '/player/$rootId/'
| '/analytics/items/$itemId/apps'
| '/analytics/items/$itemId/export'
| '/player/$rootId/$itemId/autoLogin'
@@ -466,6 +466,7 @@ export interface FileRouteTypes {
| '/builder/items/$itemId/share'
fileRoutesByTo: FileRoutesByTo
to:
+ | '/'
| '/auth'
| '/signin'
| '/about-us'
@@ -483,7 +484,6 @@ export interface FileRouteTypes {
| '/auth/success'
| '/builder/map'
| '/email/change'
- | '/'
| '/analytics'
| '/builder'
| '/player'
@@ -593,28 +593,28 @@ declare module '@tanstack/react-router' {
'/_memberOnly': {
id: '/_memberOnly'
path: ''
- fullPath: ''
+ fullPath: '/'
preLoaderRoute: typeof MemberOnlyRouteImport
parentRoute: typeof rootRouteImport
}
'/_landing': {
id: '/_landing'
path: ''
- fullPath: ''
+ fullPath: '/'
preLoaderRoute: typeof LandingRouteImport
parentRoute: typeof rootRouteImport
}
'/player/': {
id: '/player/'
path: '/player'
- fullPath: '/player'
+ fullPath: '/player/'
preLoaderRoute: typeof PlayerIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/builder/': {
id: '/builder/'
path: '/builder'
- fullPath: '/builder'
+ fullPath: '/builder/'
preLoaderRoute: typeof BuilderIndexRouteImport
parentRoute: typeof rootRouteImport
}
@@ -691,7 +691,7 @@ declare module '@tanstack/react-router' {
'/_memberOnly/_homeLayout': {
id: '/_memberOnly/_homeLayout'
path: ''
- fullPath: ''
+ fullPath: '/'
preLoaderRoute: typeof MemberOnlyHomeLayoutRouteImport
parentRoute: typeof MemberOnlyRoute
}
@@ -747,7 +747,7 @@ declare module '@tanstack/react-router' {
'/player/$rootId/': {
id: '/player/$rootId/'
path: '/player/$rootId'
- fullPath: '/player/$rootId'
+ fullPath: '/player/$rootId/'
preLoaderRoute: typeof PlayerRootIdIndexRouteImport
parentRoute: typeof rootRouteImport
}
diff --git a/src/ui/Select/Select.stories.tsx b/src/ui/Select/Select.stories.tsx
index 100d90662..7afd1d69b 100644
--- a/src/ui/Select/Select.stories.tsx
+++ b/src/ui/Select/Select.stories.tsx
@@ -73,7 +73,7 @@ export const Simple: Story = {
export const Secondary: Story = {
args: {
color: 'secondary',
- defaultValue: undefined,
+ defaultValue: '',
displayEmpty: true,
values: VALUES,
},
diff --git a/src/ui/Select/Select.tsx b/src/ui/Select/Select.tsx
index 808f7ced0..7d6cb0dc3 100644
--- a/src/ui/Select/Select.tsx
+++ b/src/ui/Select/Select.tsx
@@ -69,7 +69,7 @@ const Select = ({
color={color}
variant={variant}
id={id}
- value={value}
+ value={value ?? ''}
sx={sx}
inputProps={{ name }}
>
diff --git a/tsconfig.json b/tsconfig.json
index 8f1b7fd70..869d5c387 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -2,17 +2,27 @@
"files": [],
"references": [
{
- "path": "./tsconfig.app.json"
+ "path": "./tsconfig.app.json",
},
{
- "path": "./tsconfig.node.json"
+ "path": "./tsconfig.node.json",
},
{
- "path": "./cypress/tsconfig.json"
- }
+ "path": "./cypress/tsconfig.json",
+ },
],
"compilerOptions": {
// this is needed for cypress to compile to ESM ... Should be removed when not using cypress anymore
- "module": "ESNext"
- }
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "paths": {
+ "~account/*": ["./src/modules/account/*"],
+ "~analytics/*": ["./src/modules/analytics/*"],
+ "~auth/*": ["./src/modules/auth/*"],
+ "~builder/*": ["./src/modules/builder/*"],
+ "~landing/*": ["./src/modules/landing/*"],
+ "~player/*": ["./src/modules/player/*"],
+ "@/*": ["./src/*"],
+ },
+ },
}
diff --git a/vite.config.ts b/vite.config.ts
index f1f03b38d..0145e118b 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -4,7 +4,6 @@ import react from '@vitejs/plugin-react';
import { type UserConfig, defineConfig, loadEnv } from 'vite';
import checker from 'vite-plugin-checker';
import { viteStaticCopy } from 'vite-plugin-static-copy';
-import tsConfigPaths from 'vite-tsconfig-paths';
import { umamiPlugin } from './umami.plugin';
@@ -55,12 +54,13 @@ const config = ({ mode }: { mode: string }): UserConfig => {
// forces to use the specified port
strictPort: true,
},
+ resolve: {
+ tsconfigPaths: true,
+ },
plugins: [
tanstackRouter({ target: 'react', autoCodeSplitting: true }),
- tsConfigPaths({
- projects: ['./tsconfig.json'],
- }),
+
// the checker plugin is disabled when running the tests
mode !== 'test'
? checker({
diff --git a/vitest.config.ts b/vitest.config.ts
index bb1b8e6cc..63c334391 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -1,4 +1,5 @@
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
+import { playwright } from '@vitest/browser-playwright';
import { configDefaults, defineConfig } from 'vitest/config';
const queryClientInclude = 'src/query/**/*.test.ts';
@@ -59,7 +60,7 @@ export default defineConfig({
enabled: true,
headless: true,
instances: [{ browser: 'chromium' }],
- provider: 'playwright',
+ provider: playwright(),
},
setupFiles: ['.storybook/vitest.setup.ts'],
},