Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

feat: Dashboard redesign (#4757)

Oleg Isonen70a57ff87232
diff --git a/apps/builder/app/builder/features/help/help-center.tsx b/apps/builder/app/builder/features/help/help-center.tsx
index f5d3a19eb9..904a0fe854 100644
--- a/apps/builder/app/builder/features/help/help-center.tsx
+++ b/apps/builder/app/builder/features/help/help-center.tsx
@@ -9,11 +9,11 @@ import {
} from "@webstudio-is/design-system";
import {
BugIcon,
+ ContentIcon,
DiscordIcon,
GithubIcon,
LifeBuoyIcon,
- PageIcon,
- Youtube1cIcon,
+ YoutubeIcon,
} from "@webstudio-is/icons";
import { type ComponentProps } from "react";
import { $remoteDialog } from "../../shared/nano-states";
@@ -58,10 +58,10 @@ export const HelpCenter = ({
Support Hub
</Button>
<Button
- formAction="https://www.youtube.com/playlist"
+ formAction="https://wstd.us/101"
name="list"
value="PL4vVqpngzeT4sDlanyPe99dYl8BgUYCac"
- prefix={<Youtube1cIcon fill="currentColor" />}
+ prefix={<YoutubeIcon />}
color="ghost"
css={{ justifyContent: "start" }}
>
@@ -69,15 +69,15 @@ export const HelpCenter = ({
</Button>
<Button
formAction="https://docs.webstudio.is/"
- prefix={<PageIcon />}
+ prefix={<ContentIcon />}
color="ghost"
css={{ justifyContent: "start" }}
>
Learn from docs
</Button>
<Button
- formAction="https://discord.gg/UNdyrDkq5r"
- prefix={<DiscordIcon fill="currentColor" />}
+ formAction="https://wstd.us/community"
+ prefix={<DiscordIcon />}
color="ghost"
css={{ justifyContent: "start" }}
>
diff --git a/apps/builder/app/dashboard/dashboard.stories.tsx b/apps/builder/app/dashboard/dashboard.stories.tsx
index e0b366e106..0397552455 100644
--- a/apps/builder/app/dashboard/dashboard.stories.tsx
+++ b/apps/builder/app/dashboard/dashboard.stories.tsx
@@ -43,7 +43,6 @@ export const Empty: StoryFn<typeof Dashboard> = () => {
<Dashboard
user={user}
projects={[]}
- projectTemplates={[]}
userPlanFeatures={userPlanFeatures}
publisherHost={"https://wstd.work"}
/>
@@ -72,7 +71,34 @@ export const WithProjects: StoryFn<typeof Dashboard> = () => {
<Dashboard
user={user}
projects={projects}
- projectTemplates={projects}
+ userPlanFeatures={userPlanFeatures}
+ publisherHost={"https://wstd.work"}
+ />
+ );
+ return <RouterProvider router={router} />;
+};
+
+export const WithTemplates: StoryFn<typeof Dashboard> = () => {
+ const projects = [
+ {
+ id: "0",
+ createdAt: new Date().toString(),
+ title: "My Project",
+ domain: "domain.com",
+ userId: "",
+ isDeleted: false,
+ isPublished: false,
+ latestBuild: null,
+ previewImageAsset: null,
+ previewImageAssetId: "",
+ latestBuildVirtual: null,
+ marketplaceApprovalStatus: "UNLISTED" as const,
+ } as DashboardProject,
+ ];
+ const router = createRouter(
+ <Dashboard
+ user={user}
+ templates={projects}
userPlanFeatures={userPlanFeatures}
publisherHost={"https://wstd.work"}
/>
diff --git a/apps/builder/app/dashboard/dashboard.tsx b/apps/builder/app/dashboard/dashboard.tsx
index 37a9ec15cb..e3dfc4c7ba 100644
--- a/apps/builder/app/dashboard/dashboard.tsx
+++ b/apps/builder/app/dashboard/dashboard.tsx
@@ -1,63 +1,41 @@
-import { useEffect, useState, type ComponentProps } from "react";
+import { useEffect, useState, type ReactNode } from "react";
import {
Flex,
+ List,
+ ListItem,
+ Text,
TooltipProvider,
+ Toaster,
+ css,
globalCss,
theme,
} from "@webstudio-is/design-system";
import type { DashboardProject } from "@webstudio-is/dashboard";
-import { Header } from "./header";
-import { Projects } from "./projects";
+import {
+ BodyIcon,
+ ContentIcon,
+ DiscordIcon,
+ ExtensionIcon,
+ LifeBuoyIcon,
+ YoutubeIcon,
+} from "@webstudio-is/icons";
import type { User } from "~/shared/db/user.server";
import type { UserPlanFeatures } from "~/shared/db/user-plan-features.server";
-import { Resources } from "./resources";
-import { useLocation, useRevalidator } from "@remix-run/react";
+import { NavLink, useLocation, useRevalidator } from "@remix-run/react";
import { CloneProjectDialog } from "~/shared/clone-project";
-import { Toaster } from "@webstudio-is/design-system";
+import { dashboardPath, templatesPath } from "~/shared/router-utils";
+import { CollapsibleSection } from "~/builder/shared/collapsible-section";
+import { ProfileMenu } from "./profile-menu";
+import { Projects } from "./projects/projects";
+import { Templates } from "./templates/templates";
+import { Header } from "./shared/layout";
const globalStyles = globalCss({
body: {
margin: 0,
- background: theme.colors.brandBackgroundDashboard,
},
});
-const Main = (props: ComponentProps<typeof Flex>) => {
- return (
- <Flex
- {...props}
- as="main"
- direction="column"
- gap="5"
- css={{ padding: theme.spacing[13] }}
- />
- );
-};
-
-const Section = (props: ComponentProps<typeof Flex>) => {
- return (
- <Flex
- {...props}
- justify="center"
- as="section"
- css={{ minWidth: theme.spacing[33] }}
- />
- );
-};
-
-export type DashboardProps = {
- user: User;
- projects: Array<DashboardProject>;
- projectTemplates: Array<DashboardProject>;
- userPlanFeatures: UserPlanFeatures;
- publisherHost: string;
- projectToClone?: {
- authToken: string;
- id: string;
- title: string;
- };
-};
-
const CloneProject = ({
projectToClone,
}: {
@@ -95,10 +73,74 @@ const CloneProject = ({
) : undefined;
};
+const sidebarLinkStyle = css({
+ all: "unset",
+ cursor: "pointer",
+ display: "flex",
+ alignItems: "center",
+ gap: theme.spacing[5],
+ height: theme.spacing[13],
+ paddingInline: theme.panel.paddingInline,
+ outline: "none",
+ "&:focus-visible, &:hover": {
+ background: theme.colors.backgroundHover,
+ },
+ "&[aria-current=page]": {
+ background: theme.colors.backgroundItemCurrent,
+ color: theme.colors.foregroundMain,
+ },
+});
+
+const NavigationItems = ({
+ items,
+}: {
+ items: Array<{
+ to: string;
+ prefix: ReactNode;
+ children: string;
+ target?: string;
+ }>;
+}) => {
+ return (
+ <List style={{ padding: 0, margin: 0 }}>
+ {items.map((item, index) => {
+ return (
+ <ListItem asChild index={index}>
+ <NavLink
+ to={item.to}
+ end
+ target={item.target}
+ className={sidebarLinkStyle()}
+ >
+ {item.prefix}
+ <Text variant="labelsSentenceCase" color="main">
+ {item.children}
+ </Text>
+ </NavLink>
+ </ListItem>
+ );
+ })}
+ </List>
+ );
+};
+
+type DashboardProps = {
+ user: User;
+ projects?: Array<DashboardProject>;
+ templates?: Array<DashboardProject>;
+ userPlanFeatures: UserPlanFeatures;
+ publisherHost: string;
+ projectToClone?: {
+ authToken: string;
+ id: string;
+ title: string;
+ };
+};
+
export const Dashboard = ({
user,
projects,
- projectTemplates,
+ templates,
userPlanFeatures,
publisherHost,
projectToClone,
@@ -107,20 +149,79 @@ export const Dashboard = ({
return (
<TooltipProvider>
- <Header user={user} userPlanFeatures={userPlanFeatures} />
- <Main>
- <Section>
- <Resources />
- </Section>
- <Section>
+ <Flex css={{ height: "100vh" }}>
+ <Flex
+ as="aside"
+ align="stretch"
+ direction="column"
+ css={{
+ width: theme.sizes.sidebarWidth,
+ borderRight: `1px solid ${theme.colors.borderMain}`,
+ position: "sticky",
+ top: 0,
+ }}
+ >
+ <Header variant="aside">
+ <ProfileMenu user={user} userPlanFeatures={userPlanFeatures} />
+ </Header>
+ <nav>
+ <CollapsibleSection label="Workspace" fullWidth>
+ <NavigationItems
+ items={[
+ {
+ to: dashboardPath(),
+ prefix: <BodyIcon />,
+ children: "Projects",
+ },
+ {
+ to: templatesPath(),
+ prefix: <ExtensionIcon />,
+ children: "Starter templates",
+ },
+ ]}
+ />
+ </CollapsibleSection>
+ <CollapsibleSection label="Help & support" fullWidth>
+ <NavigationItems
+ items={[
+ {
+ to: "https://wstd.us/101",
+ target: "_blank",
+ prefix: <YoutubeIcon />,
+ children: "Video tutorials",
+ },
+ {
+ to: "https://help.webstudio.is/",
+ target: "_blank",
+ prefix: <LifeBuoyIcon />,
+ children: "Support hub",
+ },
+ {
+ to: "https://docs.webstudio.is",
+ target: "_blank",
+ prefix: <ContentIcon />,
+ children: "Docs",
+ },
+ {
+ to: "https://wstd.us/community",
+ target: "_blank",
+ prefix: <DiscordIcon />,
+ children: "Community",
+ },
+ ]}
+ />
+ </CollapsibleSection>
+ </nav>
+ </Flex>
+ {projects && (
<Projects
projects={projects}
- projectTemplates={projectTemplates}
hasProPlan={userPlanFeatures.hasProPlan}
publisherHost={publisherHost}
/>
- </Section>
- </Main>
+ )}
+ {templates && <Templates templates={templates} />}
+ </Flex>
<CloneProject projectToClone={projectToClone} />
<Toaster />
</TooltipProvider>
diff --git a/apps/builder/app/dashboard/header.tsx b/apps/builder/app/dashboard/profile-menu.tsx
similarity index 59%
rename from apps/builder/app/dashboard/header.tsx
rename to apps/builder/app/dashboard/profile-menu.tsx
index 9474e644d7..e9c421f6c7 100644
--- a/apps/builder/app/dashboard/header.tsx
+++ b/apps/builder/app/dashboard/profile-menu.tsx
@@ -1,8 +1,5 @@
-import {
- ChevronDownIcon,
- UpgradeIcon,
- WebstudioIcon,
-} from "@webstudio-is/icons";
+import { forwardRef } from "react";
+import { ChevronDownIcon, UpgradeIcon } from "@webstudio-is/icons";
import {
DropdownMenu,
DropdownMenuTrigger,
@@ -10,10 +7,7 @@ import {
DropdownMenuPortal,
DropdownMenuItem,
DropdownMenuLabel,
- Flex,
Avatar,
- css,
- rawTheme,
theme,
Button,
ProBadge,
@@ -25,20 +19,41 @@ import { logoutPath, userPlanSubscriptionPath } from "~/shared/router-utils";
import type { User } from "~/shared/db/user.server";
import type { UserPlanFeatures } from "~/shared/db/user-plan-features.server";
-const containerStyle = css({
- px: theme.spacing[13],
- backgroundColor: theme.colors.backgroundPanel,
- height: theme.spacing[15],
- boxShadow: theme.shadows.brandElevationBig,
-});
-
const getAvatarLetter = (title?: string) => {
return (title || "X").charAt(0).toLocaleUpperCase();
};
const defaultUserName = "James Bond";
-const Menu = ({
+const ProfileButton = forwardRef<
+ HTMLButtonElement,
+ {
+ name: string;
+ image?: string;
+ badge?: string;
+ }
+>(({ image, name, badge, ...rest }, forwardedRef) => {
+ return (
+ <Button
+ color="ghost"
+ aria-label="Profile Menu"
+ {...rest}
+ ref={forwardedRef}
+ prefix={
+ <Avatar src={image} fallback={getAvatarLetter(name)} alt={name} />
+ }
+ suffix={<ChevronDownIcon size={12} />}
+ css={{
+ // Exception for avatar. May need to introduce a 32px controls size later.
+ height: theme.spacing[13],
+ }}
+ >
+ {badge && <ProBadge>{badge}</ProBadge>}
+ </Button>
+ );
+});
+
+export const ProfileMenu = ({
user,
userPlanFeatures,
}: {
@@ -50,31 +65,16 @@ const Menu = ({
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <Button color="ghost" aria-label="Menu Button" css={{ height: "100%" }}>
- <Flex gap="1" align="center">
- {userPlanFeatures.hasProPlan && (
- <>
- <ProBadge>{userPlanFeatures.planName}</ProBadge>
- <div />
- </>
- )}
-
- <Avatar
- src={user?.image || undefined}
- fallback={getAvatarLetter(nameOrEmail)}
- alt={nameOrEmail}
- />
-
- <ChevronDownIcon
- width={15}
- height={15}
- color={rawTheme.colors.foregroundMain}
- />
- </Flex>
- </Button>
+ <ProfileButton
+ image={user.image || undefined}
+ name={nameOrEmail}
+ badge={
+ userPlanFeatures.hasProPlan ? userPlanFeatures.planName : undefined
+ }
+ />
</DropdownMenuTrigger>
<DropdownMenuPortal>
- <DropdownMenuContent align="end">
+ <DropdownMenuContent align="start">
<DropdownMenuLabel>
{user.username ?? defaultUserName}
<Text>{user.email}</Text>
@@ -108,24 +108,3 @@ const Menu = ({
</DropdownMenu>
);
};
-
-export const Header = ({
- user,
- userPlanFeatures,
-}: {
- user: User;
- userPlanFeatures: UserPlanFeatures;
-}) => {
- return (
- <Flex
- as="header"
- align="center"
- justify="between"
- className={containerStyle()}
- >
- <WebstudioIcon size={22} />
-
- <Menu user={user} userPlanFeatures={userPlanFeatures} />
- </Flex>
- );
-};
diff --git a/apps/builder/app/dashboard/projects/empty-state.tsx b/apps/builder/app/dashboard/projects/empty-state.tsx
index 600f329e97..4cdd423f97 100644
--- a/apps/builder/app/dashboard/projects/empty-state.tsx
+++ b/apps/builder/app/dashboard/projects/empty-state.tsx
@@ -1,49 +1,11 @@
-import {
- css,
- Dialog,
- DialogContent,
- DialogTrigger,
- Flex,
- Text,
- theme,
-} from "@webstudio-is/design-system";
+import { Flex, Text } from "@webstudio-is/design-system";
import { CreateProject } from "./project-dialogs";
-const contentStyle = css({
- maxWidth: "none",
- width: "80vw",
- aspectRatio: "16/9",
-});
-
-const iframeStyle = css({
- width: "100%",
- height: "100%",
- border: 0,
-});
-
export const EmptyState = () => (
- <Flex
- align="center"
- justify="center"
- direction="column"
- gap="6"
- css={{ height: theme.spacing[27] }}
- >
+ <Flex align="center" justify="center" direction="column" gap="6">
<Text variant="brandMediumTitle" as="h1" align="center">
What will you create?
</Text>
- <Dialog>
- <DialogTrigger asChild>
- <CreateProject buttonText="Create First Project" />
- </DialogTrigger>
- <DialogContent className={contentStyle()}>
- <iframe
- className={iframeStyle()}
- src="https://www.youtube-nocookie.com/embed/aL2sBSb3ghg?si=siExeIRt-YI_ypuA&autoplay=true"
- allowFullScreen
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
- />
- </DialogContent>
- </Dialog>
+ <CreateProject buttonText="Create First Project" />
</Flex>
);
diff --git a/apps/builder/app/dashboard/projects/index.ts b/apps/builder/app/dashboard/projects/index.ts
deleted file mode 100644
index 9274ed4398..0000000000
--- a/apps/builder/app/dashboard/projects/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { Projects } from "./projects";
diff --git a/apps/builder/app/dashboard/projects/project-card.tsx b/apps/builder/app/dashboard/projects/project-card.tsx
index 3336ed3e37..e85158e6a5 100644
--- a/apps/builder/app/dashboard/projects/project-card.tsx
+++ b/apps/builder/app/dashboard/projects/project-card.tsx
@@ -1,3 +1,4 @@
+import { type KeyboardEvent, useEffect, useRef, useState } from "react";
import {
DropdownMenu,
DropdownMenuTrigger,
@@ -16,7 +17,7 @@ import {
Box,
} from "@webstudio-is/design-system";
import { InfoCircleIcon, EllipsesIcon } from "@webstudio-is/icons";
-import { type KeyboardEvent, useEffect, useRef, useState } from "react";
+import type { DashboardProject } from "@webstudio-is/dashboard";
import { builderUrl } from "~/shared/router-utils";
import {
RenameProjectDialog,
@@ -27,13 +28,9 @@ import {
import {
ThumbnailLinkWithAbbr,
ThumbnailLinkWithImage,
- ThumbnailWithAbbr,
- ThumbnailWithImage,
-} from "./thumbnail";
+} from "../shared/thumbnail";
import { Spinner } from "../shared/spinner";
-import type { DashboardProject } from "@webstudio-is/dashboard";
import { Card, CardContent, CardFooter } from "../shared/card";
-import { CloneProjectDialog } from "~/shared/clone-project";
const infoIconStyle = css({ flexShrink: 0 });
@@ -88,7 +85,7 @@ const Menu = ({
</IconButton>
</DropdownMenuTrigger>
<DropdownMenuPortal>
- <DropdownMenuContent align="end">
+ <DropdownMenuContent align="end" css={{ width: theme.spacing[24] }}>
<DropdownMenuItem onSelect={onDuplicate}>Duplicate</DropdownMenuItem>
<DropdownMenuItem onSelect={onRename}>Rename</DropdownMenuItem>
<DropdownMenuItem onSelect={onShare}>Share</DropdownMenuItem>
@@ -99,7 +96,8 @@ const Menu = ({
);
};
-const useProjectCard = () => {
+// @todo use List/ListItem instead
+export const useProjectCard = () => {
const thumbnailRef = useRef<HTMLAnchorElement & HTMLDivElement>(null);
const handleKeyDown = (event: KeyboardEvent<HTMLElement>) => {
@@ -201,7 +199,6 @@ export const ProjectCard = ({
<CardContent
css={{
background: theme.colors.brandBackgroundProjectCardBack,
- position: "relative",
[`&:hover`]: {
"--ws-project-card-prefetch-image-background": `url(${linkPath}cgi/empty.gif)`,
},
@@ -314,64 +311,3 @@ export const ProjectCard = ({
</Card>
);
};
-
-export const ProjectTemplateCard = ({
- project,
- publisherHost,
-}: Omit<ProjectCardProps, "hasProPlan">) => {
- const { thumbnailRef, handleKeyDown } = useProjectCard();
- const [isDuplicateDialogOpen, setIsDuplicateDialogOpen] = useState(false);
- const { title, domain, previewImageAsset, isPublished } = project;
- return (
- <Card tabIndex={0} onKeyDown={handleKeyDown}>
- <CardContent
- css={{ background: theme.colors.brandBackgroundProjectCardBack }}
- >
- {previewImageAsset ? (
- <ThumbnailWithImage
- name={previewImageAsset.name}
- ref={thumbnailRef}
- onClick={() => {
- setIsDuplicateDialogOpen(true);
- }}
- />
- ) : (
- <ThumbnailWithAbbr
- title={title}
- ref={thumbnailRef}
- onClick={() => {
- setIsDuplicateDialogOpen(true);
- }}
- />
- )}
- </CardContent>
- <CardFooter>
- <Flex direction="column" justify="around">
- <Text variant="titles" truncate userSelect="text">
- {title}
- </Text>
- {isPublished ? (
- <PublishedLink
- publisherHost={publisherHost}
- domain={domain}
- tabIndex={-1}
- />
- ) : (
- <Text color="subtle">Not Published</Text>
- )}
- </Flex>
- </CardFooter>
- <CloneProjectDialog
- isOpen={isDuplicateDialogOpen}
- onOpenChange={setIsDuplicateDialogOpen}
- project={project}
- onCreate={(projectId) => {
- window.location.href = builderUrl({
- origin: window.origin,
- projectId: projectId,
- });
- }}
- />
- </Card>
- );
-};
diff --git a/apps/builder/app/dashboard/projects/project-dialogs.tsx b/apps/builder/app/dashboard/projects/project-dialogs.tsx
index 15e5f843e3..cbe2d0ca34 100644
--- a/apps/builder/app/dashboard/projects/project-dialogs.tsx
+++ b/apps/builder/app/dashboard/projects/project-dialogs.tsx
@@ -163,7 +163,7 @@ export const CreateProject = ({
return (
<Dialog
title="New Project"
- trigger={<Button prefix={<PlusIcon />}>{buttonText}</Button>}
+ trigger={<Button prefix={<PlusIcon size={12} />}>{buttonText}</Button>}
onOpenChange={handleOpenChange}
>
<DialogContent
diff --git a/apps/builder/app/dashboard/projects/projects.tsx b/apps/builder/app/dashboard/projects/projects.tsx
index fed5334aec..9880e5bfb8 100644
--- a/apps/builder/app/dashboard/projects/projects.tsx
+++ b/apps/builder/app/dashboard/projects/projects.tsx
@@ -1,37 +1,43 @@
-import { Flex, Grid, Text, rawTheme } from "@webstudio-is/design-system";
+import { Flex, Grid, Text, rawTheme, theme } from "@webstudio-is/design-system";
import type { DashboardProject } from "@webstudio-is/dashboard";
import { EmptyState } from "./empty-state";
-import { Panel } from "../shared/panel";
-import { ProjectCard, ProjectTemplateCard } from "./project-card";
+import { ProjectCard } from "./project-card";
import { CreateProject } from "./project-dialogs";
+import { Header, Main } from "../shared/layout";
type ProjectsProps = {
projects: Array<DashboardProject>;
- projectTemplates: Array<DashboardProject>;
hasProPlan: boolean;
publisherHost: string;
};
export const Projects = ({
projects,
- projectTemplates,
hasProPlan,
publisherHost,
}: ProjectsProps) => {
return (
- <Panel>
- <Flex direction="column" gap="3">
- <Flex justify="between">
- <Text variant="brandSectionTitle" as="h2">
- Projects
- </Text>
- <Flex gap="2">{projects.length !== 0 && <CreateProject />}</Flex>
- </Flex>
+ <Main>
+ <Header variant="main">
+ <Text variant="brandSectionTitle" as="h2">
+ Projects
+ </Text>
+ <Flex gap="2">{projects.length !== 0 && <CreateProject />}</Flex>
+ </Header>
+ <Flex
+ direction="column"
+ gap="3"
+ css={{
+ paddingInline: theme.spacing[13],
+ paddingTop: projects.length === 0 ? "20vh" : 0,
+ }}
+ >
{projects.length === 0 && <EmptyState />}
<Grid
gap="6"
css={{
gridTemplateColumns: `repeat(auto-fill, minmax(${rawTheme.spacing[31]}, 1fr))`,
+ paddingBottom: theme.spacing[13],
}}
>
{projects.map((project) => {
@@ -46,32 +52,6 @@ export const Projects = ({
})}
</Grid>
</Flex>
-
- {projectTemplates.length > 0 && (
- <Flex direction="column" gap="3">
- <Flex justify="between">
- <Text variant="brandSectionTitle" as="h2">
- Templates
- </Text>
- </Flex>
- <Grid
- gap="6"
- css={{
- gridTemplateColumns: `repeat(auto-fill, minmax(${rawTheme.spacing[31]}, 1fr))`,
- }}
- >
- {projectTemplates.map((project) => {
- return (
- <ProjectTemplateCard
- project={project}
- publisherHost={publisherHost}
- key={project.id}
- />
- );
- })}
- </Grid>
- </Flex>
- )}
- </Panel>
+ </Main>
);
};
diff --git a/apps/builder/app/dashboard/resources/index.tsx b/apps/builder/app/dashboard/resources/index.tsx
deleted file mode 100644
index 3e5335fe42..0000000000
--- a/apps/builder/app/dashboard/resources/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./resources";
diff --git a/apps/builder/app/dashboard/resources/intro-thumb.jpg b/apps/builder/app/dashboard/resources/intro-thumb.jpg
deleted file mode 100644
index 52f2797c9c..0000000000
Binary files a/apps/builder/app/dashboard/resources/intro-thumb.jpg and /dev/null differ
diff --git a/apps/builder/app/dashboard/resources/intro-video.tsx b/apps/builder/app/dashboard/resources/intro-video.tsx
deleted file mode 100644
index 9930a75bf0..0000000000
--- a/apps/builder/app/dashboard/resources/intro-video.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import type { ReactNode } from "react";
-import {
- css,
- Dialog,
- DialogContent,
- DialogTrigger,
-} from "@webstudio-is/design-system";
-
-const iframeStyle = css({
- width: "100%",
- height: "100%",
- border: 0,
-});
-
-export const IntroVideoDialog = ({
- children,
- asChild,
-}: {
- children: ReactNode;
- asChild?: boolean;
-}) => {
- return (
- <Dialog>
- <DialogTrigger asChild={asChild}>{children}</DialogTrigger>
- <DialogContent
- css={{
- maxWidth: "none",
- width: "80vw",
- aspectRatio: "16/9",
- }}
- >
- <iframe
- className={iframeStyle()}
- src="https://www.youtube-nocookie.com/embed/videoseries?si=fk5L11IcnVErQRRS&list=PL4vVqpngzeT4Bfs_D25xNi_qNMY99R928&autoplay=true"
- allowFullScreen
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
- />
- </DialogContent>
- </Dialog>
- );
-};
diff --git a/apps/builder/app/dashboard/resources/resources.tsx b/apps/builder/app/dashboard/resources/resources.tsx
deleted file mode 100644
index 729abce7e8..0000000000
--- a/apps/builder/app/dashboard/resources/resources.tsx
+++ /dev/null
@@ -1,155 +0,0 @@
-import {
- Flex,
- Grid,
- Link,
- Text,
- css,
- rawTheme,
- theme,
-} from "@webstudio-is/design-system";
-import {
- DiscordIcon,
- GithubIcon,
- XLogoIcon,
- Youtube1cIcon,
- type IconComponent,
- WebstudioIcon,
-} from "@webstudio-is/icons";
-import { Card, CardContent, CardFooter } from "../shared/card";
-import { Panel } from "../shared/panel";
-import { IntroVideoDialog } from "./intro-video";
-import introThumb from "./intro-thumb.jpg";
-
-const introButtonStyle = css({
- "&:hover, &:focus-visible": {
- "--ws-resource-intro-video-filter": "none",
- },
-});
-
-const introThumbStyle = css({
- width: "100%",
- height: "100%",
- objectFit: "cover",
- objectPosition: "center",
- filter: "var(--ws-resource-intro-video-filter, brightness(80%))",
-});
-
-const IntroVideoCard = () => {
- return (
- <IntroVideoDialog asChild>
- <Card asChild>
- <button className={introButtonStyle()}>
- <CardContent>
- <Flex align="center" justify="center">
- <img src={introThumb} className={introThumbStyle()} />
- </Flex>
- </CardContent>
- <CardFooter>
- <Flex justify="center" align="center" direction="column" grow>
- <Text variant="titles" align="center" color="main">
- Watch the Intro!
- </Text>
- </Flex>
- </CardFooter>
- </button>
- </Card>
- </IntroVideoDialog>
- );
-};
-
-const resourceIconSyle = css({
- width: "35%",
- height: "auto",
- filter: "var(--ws-resource-icon-filter, opacity(0.8) brightness(80%))",
-});
-
-const Resource = ({
- href,
- Icon,
- title,
- color,
-}: {
- href: string;
- Icon: IconComponent;
- title: string;
- color?: string;
-}) => {
- return (
- <Card asChild>
- <Link
- href={href}
- target="_blank"
- underline="none"
- css={{
- "&:hover, &:focus-visible": {
- "--ws-resource-icon-filter": "none",
- },
- }}
- >
- <CardContent>
- <Flex align="center" justify="center">
- <Icon className={resourceIconSyle({ css: { fill: color } })} />
- </Flex>
- </CardContent>
- <CardFooter>
- <Flex justify="center" align="center" direction="column" grow>
- <Text variant="titles" align="center" color="main">
- {title}
- </Text>
- </Flex>
- </CardFooter>
- </Link>
- </Card>
- );
-};
-
-export const Resources = () => {
- return (
- <Panel>
- <Flex direction="column" gap="3">
- <Flex justify="between">
- <Text variant="brandSectionTitle" as="h2">
- Resources
- </Text>
- </Flex>
- <Grid
- gap="6"
- css={{
- gridTemplateColumns: `repeat(auto-fill, minmax(${rawTheme.spacing[23]}, 1fr))`,
- }}
- >
- <IntroVideoCard />
- <Resource
- href="https://www.youtube.com/playlist?list=PL4vVqpngzeT4sDlanyPe99dYl8BgUYCac"
- title="Learn with Videos"
- Icon={Youtube1cIcon}
- color="#FF0000"
- />
- <Resource
- href="https://docs.webstudio.is/"
- title="Read the Docs"
- Icon={WebstudioIcon}
- />
- <Resource
- href="https://discord.gg/UNdyrDkq5r"
- title="Join the Community"
- Icon={DiscordIcon}
- color="#5865F2"
- />
- <Resource
- href="https://x.com/getwebstudio"
- title="Follow on X"
- Icon={XLogoIcon}
- color={theme.colors.foregroundMain}
- />
- <Resource
- href="https://github.com/webstudio-is/webstudio-community/discussions"
- title="Discuss on GitHub"
- Icon={GithubIcon}
- color={theme.colors.foregroundMain}
- />
- </Grid>
- </Flex>
- </Panel>
- );
-};
diff --git a/apps/builder/app/dashboard/shared/card.tsx b/apps/builder/app/dashboard/shared/card.tsx
index 2744ba2bd7..0b44705df4 100644
--- a/apps/builder/app/dashboard/shared/card.tsx
+++ b/apps/builder/app/dashboard/shared/card.tsx
@@ -10,26 +10,19 @@ import {
} from "@webstudio-is/design-system";
import { forwardRef, type ComponentProps } from "react";
+const borderColorVar = "--ws-dashboard-card-border-color";
+
const cardStyle = css({
+ position: "relative",
display: "flex",
padding: 0,
height: "100%",
flexDirection: "column",
alignItems: "center",
flexShrink: 0,
- overflow: "hidden",
- aspectRatio: "8 / 7",
- borderWidth: 1,
- borderStyle: "solid",
- borderColor: theme.colors.borderMain,
- borderRadius: theme.borderRadius[4],
- background: theme.colors.brandBackgroundProjectCardFront,
outline: "none",
- "&:hover, &:focus-within": {
- boxShadow: theme.shadows.brandElevationBig,
- },
- "&:focus-visible": {
- borderColor: theme.colors.borderFocus,
+ "&:focus-within": {
+ [borderColorVar]: theme.colors.borderFocus,
},
});
@@ -48,8 +41,17 @@ Card.displayName = "Card";
export const CardContent = styled(Grid, {
position: "relative",
overflow: "hidden",
- minWidth: "100%",
- height: "100%",
+ width: "100%",
+ aspectRatio: "1.91/1",
+ borderRadius: theme.borderRadius[5],
+ "&::after": {
+ content: '""',
+ position: "absolute",
+ inset: 0,
+ border: `1px solid var(${borderColorVar}, transparent)`,
+ borderRadius: theme.borderRadius[5],
+ pointerEvents: "none",
+ },
});
export const CardFooter = styled(Flex, {
@@ -59,5 +61,5 @@ export const CardFooter = styled(Flex, {
flexGap: theme.spacing[3],
background: theme.colors.brandBackgroundProjectCardTextArea,
height: theme.spacing[17],
- padding: theme.panel.padding,
+ paddingBlock: theme.panel.paddingBlock,
});
diff --git a/apps/builder/app/dashboard/shared/layout.tsx b/apps/builder/app/dashboard/shared/layout.tsx
new file mode 100644
index 0000000000..a5744f4c1d
--- /dev/null
+++ b/apps/builder/app/dashboard/shared/layout.tsx
@@ -0,0 +1,43 @@
+import type { ComponentProps } from "react";
+import { Flex, theme } from "@webstudio-is/design-system";
+
+export const Header = ({
+ variant,
+ ...props
+}: { variant: "aside" | "main" } & ComponentProps<typeof Flex>) => {
+ return (
+ <Flex
+ as="header"
+ align="center"
+ justify="between"
+ shrink={false}
+ css={{
+ paddingInline:
+ variant === "aside" ? theme.spacing[5] : theme.spacing[13],
+ height: theme.spacing[19],
+ position: "sticky",
+ top: 0,
+ background: theme.colors.backgroundPanel,
+ zIndex: 1,
+ }}
+ {...props}
+ />
+ );
+};
+
+export const Main = (props: ComponentProps<typeof Flex>) => {
+ return (
+ <Flex
+ direction="column"
+ as="main"
+ grow
+ css={{
+ // Allows scrolling most parent container while header stays sticky
+ overflow: "auto",
+ // Keeps dialogs on top of the main content
+ isolation: "isolate",
+ }}
+ {...props}
+ />
+ );
+};
diff --git a/apps/builder/app/dashboard/shared/panel.tsx b/apps/builder/app/dashboard/shared/panel.tsx
deleted file mode 100644
index 945da64ca0..0000000000
--- a/apps/builder/app/dashboard/shared/panel.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Flex, css, theme } from "@webstudio-is/design-system";
-import type { ComponentProps } from "react";
-
-const panelStyle = css({
- background: theme.colors.backgroundPanel,
- padding: theme.spacing[13],
- borderRadius: theme.borderRadius[6],
- color: theme.colors.foregroundMain,
- minWidth: "min-content",
- boxShadow: theme.shadows.brandElevationBig,
- flexGrow: 1,
-});
-
-export const Panel = (props: ComponentProps<typeof Flex>) => (
- <Flex direction="column" gap="5" className={panelStyle()} {...props} />
-);
diff --git a/apps/builder/app/dashboard/shared/spinner/spinner.tsx b/apps/builder/app/dashboard/shared/spinner.tsx
similarity index 100%
rename from apps/builder/app/dashboard/shared/spinner/spinner.tsx
rename to apps/builder/app/dashboard/shared/spinner.tsx
diff --git a/apps/builder/app/dashboard/shared/spinner/index.tsx b/apps/builder/app/dashboard/shared/spinner/index.tsx
deleted file mode 100644
index eff29707a5..0000000000
--- a/apps/builder/app/dashboard/shared/spinner/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./spinner";
diff --git a/apps/builder/app/dashboard/projects/thumbnail.tsx b/apps/builder/app/dashboard/shared/thumbnail.tsx
similarity index 93%
rename from apps/builder/app/dashboard/projects/thumbnail.tsx
rename to apps/builder/app/dashboard/shared/thumbnail.tsx
index be58f02903..42478df1bd 100644
--- a/apps/builder/app/dashboard/projects/thumbnail.tsx
+++ b/apps/builder/app/dashboard/shared/thumbnail.tsx
@@ -12,10 +12,8 @@ const abbrStyle = css(textVariants.brandThumbnailLargeDefault, {
backgroundClip: "text",
color: "transparent",
outline: "none",
- "&:hover, &:focus": {
- ...textVariants.brandThumbnailLargeHover,
- transition: "100ms",
- },
+ transition: "100ms",
+ "&:hover, &:focus": textVariants.brandThumbnailLargeHover,
});
// My Next Project > MN
@@ -56,9 +54,9 @@ const imageContainerStyle = css({
background: theme.colors.brandBackgroundProjectCardFront,
outline: "none",
overflow: "hidden",
- transition: "transform 100ms",
+ transition: "scale 100ms",
"&:hover, &:focus": {
- transform: "scale(1.1)",
+ scale: "1.1",
},
});
diff --git a/apps/builder/app/dashboard/templates/template-card.tsx b/apps/builder/app/dashboard/templates/template-card.tsx
new file mode 100644
index 0000000000..4ca4832ea2
--- /dev/null
+++ b/apps/builder/app/dashboard/templates/template-card.tsx
@@ -0,0 +1,64 @@
+import { useState } from "react";
+import { Flex, Text, theme } from "@webstudio-is/design-system";
+import type { DashboardProject } from "@webstudio-is/dashboard";
+import { builderUrl } from "~/shared/router-utils";
+import { Card, CardContent, CardFooter } from "../shared/card";
+import { ThumbnailWithAbbr, ThumbnailWithImage } from "../shared/thumbnail";
+import { CloneProjectDialog } from "~/shared/clone-project";
+import { useProjectCard } from "../projects/project-card";
+
+type TemplateCardProps = {
+ project: DashboardProject;
+};
+
+export const TemplateCard = ({ project }: TemplateCardProps) => {
+ const { thumbnailRef, handleKeyDown } = useProjectCard();
+ const [isDuplicateDialogOpen, setIsDuplicateDialogOpen] = useState(false);
+ const { title, previewImageAsset } = project;
+ return (
+ <Card tabIndex={0} onKeyDown={handleKeyDown}>
+ <CardContent
+ css={{
+ background: theme.colors.brandBackgroundProjectCardBack,
+ cursor: "default",
+ }}
+ >
+ {previewImageAsset ? (
+ <ThumbnailWithImage
+ name={previewImageAsset.name}
+ ref={thumbnailRef}
+ onClick={() => {
+ setIsDuplicateDialogOpen(true);
+ }}
+ />
+ ) : (
+ <ThumbnailWithAbbr
+ title={title}
+ ref={thumbnailRef}
+ onClick={() => {
+ setIsDuplicateDialogOpen(true);
+ }}
+ />
+ )}
+ </CardContent>
+ <CardFooter>
+ <Flex direction="column" justify="around">
+ <Text variant="titles" truncate userSelect="text">
+ {title}
+ </Text>
+ </Flex>
+ </CardFooter>
+ <CloneProjectDialog
+ isOpen={isDuplicateDialogOpen}
+ onOpenChange={setIsDuplicateDialogOpen}
+ project={project}
+ onCreate={(projectId) => {
+ window.location.href = builderUrl({
+ origin: window.origin,
+ projectId: projectId,
+ });
+ }}
+ />
+ </Card>
+ );
+};
diff --git a/apps/builder/app/dashboard/templates/templates.tsx b/apps/builder/app/dashboard/templates/templates.tsx
new file mode 100644
index 0000000000..94094ee180
--- /dev/null
+++ b/apps/builder/app/dashboard/templates/templates.tsx
@@ -0,0 +1,39 @@
+import { Flex, Grid, Text, rawTheme, theme } from "@webstudio-is/design-system";
+import type { DashboardProject } from "@webstudio-is/dashboard";
+import { Header, Main } from "../shared/layout";
+import { TemplateCard } from "./template-card";
+
+type ProjectsProps = {
+ templates: Array<DashboardProject>;
+};
+
+export const Templates = ({ templates }: ProjectsProps) => {
+ return (
+ <Main>
+ <Header variant="main">
+ <Text variant="brandSectionTitle" as="h2">
+ Starter templates
+ </Text>
+ </Header>
+ {templates.length > 0 && (
+ <Flex
+ direction="column"
+ gap="3"
+ css={{ paddingInline: theme.spacing[13] }}
+ >
+ <Grid
+ gap="6"
+ css={{
+ gridTemplateColumns: `repeat(auto-fill, minmax(${rawTheme.spacing[31]}, 1fr))`,
+ paddingBottom: theme.spacing[13],
+ }}
+ >
+ {templates.map((project) => {
+ return <TemplateCard project={project} key={project.id} />;
+ })}
+ </Grid>
+ </Flex>
+ )}
+ </Main>
+ );
+};
diff --git a/apps/builder/app/routes/_ui.dashboard._index.tsx b/apps/builder/app/routes/_ui.dashboard._index.tsx
new file mode 100644
index 0000000000..db14b554de
--- /dev/null
+++ b/apps/builder/app/routes/_ui.dashboard._index.tsx
@@ -0,0 +1,87 @@
+import { lazy } from "react";
+import { useLoaderData, type MetaFunction } from "@remix-run/react";
+import { type LoaderFunctionArgs } from "@remix-run/server-runtime";
+import { dashboardProjectRouter } from "@webstudio-is/dashboard/index.server";
+import { builderUrl } from "~/shared/router-utils";
+import env from "~/env/env.server";
+import { ClientOnly } from "~/shared/client-only";
+import { createCallerFactory } from "@webstudio-is/trpc-interface/index.server";
+import { preconnect, prefetchDNS } from "react-dom";
+import {
+ getProjectToClone,
+ loadDashboardData,
+} from "~/shared/router-utils/dashboard";
+import { preventCrossOriginCookie } from "~/services/no-cross-origin-cookie";
+import { allowedDestinations } from "~/services/destinations.server";
+export { ErrorBoundary } from "~/shared/error/error-boundary";
+
+const dashboardProjectCaller = createCallerFactory(dashboardProjectRouter);
+
+export const meta = () => {
+ const metas: ReturnType<MetaFunction> = [];
+
+ metas.push({ title: "Webstudio Dashboard | Projects" });
+
+ return metas;
+};
+
+/**
+ * When deleting/adding a project, then navigating to a new project and pressing the back button,
+ * the dashboard page may display stale data because it’s being retrieved from the browser’s back/forward cache (bfcache).
+ *
+ * https://web.dev/articles/bfcache
+ *
+ */
+export const headers = () => {
+ return {
+ "Cache-Control": "no-store",
+ };
+};
+
+export const loader = async ({ request }: LoaderFunctionArgs) => {
+ // CSRF token checks are not necessary for dashboard-only pages.
+ // All requests from the builder or canvas app are safeguarded either by preventCrossOriginCookie for fetch requests
+ // or by allowedDestinations for iframe requests.
+ preventCrossOriginCookie(request);
+ allowedDestinations(request, ["document", "empty"]);
+
+ const { context, user, userPlanFeatures, origin } =
+ await loadDashboardData(request);
+ const projects = await dashboardProjectCaller(context).findMany({
+ userId: user.id,
+ });
+ const projectToClone = await getProjectToClone(request, context);
+
+ return {
+ user,
+ projects,
+ userPlanFeatures,
+ publisherHost: env.PUBLISHER_HOST,
+ origin,
+ projectToClone,
+ };
+};
+
+const Dashboard = lazy(async () => {
+ const { Dashboard } = await import("~/dashboard/index.client");
+ return { default: Dashboard };
+});
+
+const DashboardRoute = () => {
+ const data = useLoaderData<typeof loader>();
+
+ data.projects.slice(0, 5).forEach((project) => {
+ prefetchDNS(builderUrl({ projectId: project.id, origin: data.origin }));
+ });
+ data.projects.slice(0, 5).forEach((project) => {
+ preconnect(builderUrl({ projectId: project.id, origin: data.origin }));
+ });
+
+ return (
+ <ClientOnly>
+ <Dashboard {...data} />
+ </ClientOnly>
+ );
+};
+
+export default DashboardRoute;
diff --git a/apps/builder/app/routes/_ui.dashboard.templates.tsx b/apps/builder/app/routes/_ui.dashboard.templates.tsx
new file mode 100644
index 0000000000..918f44fe5a
--- /dev/null
+++ b/apps/builder/app/routes/_ui.dashboard.templates.tsx
@@ -0,0 +1,65 @@
+import { lazy } from "react";
+import { useLoaderData, type MetaFunction } from "@remix-run/react";
+import { type LoaderFunctionArgs } from "@remix-run/server-runtime";
+import { dashboardProjectRouter } from "@webstudio-is/dashboard/index.server";
+import env from "~/env/env.server";
+import { ClientOnly } from "~/shared/client-only";
+import { createCallerFactory } from "@webstudio-is/trpc-interface/index.server";
+import {
+ getProjectToClone,
+ loadDashboardData,
+} from "~/shared/router-utils/dashboard";
+import { preventCrossOriginCookie } from "~/services/no-cross-origin-cookie";
+import { allowedDestinations } from "~/services/destinations.server";
+export { ErrorBoundary } from "~/shared/error/error-boundary";
+
+const dashboardProjectCaller = createCallerFactory(dashboardProjectRouter);
+
+export const meta = () => {
+ const metas: ReturnType<MetaFunction> = [];
+
+ metas.push({ title: "Webstudio Dashboard | Starter templates" });
+
+ return metas;
+};
+
+export const loader = async ({ request }: LoaderFunctionArgs) => {
+ // CSRF token checks are not necessary for dashboard-only pages.
+ // All requests from the builder or canvas app are safeguarded either by preventCrossOriginCookie for fetch requests
+ // or by allowedDestinations for iframe requests.
+ preventCrossOriginCookie(request);
+ allowedDestinations(request, ["document", "empty"]);
+
+ const { context, user, userPlanFeatures, origin } =
+ await loadDashboardData(request);
+ const projectToClone = await getProjectToClone(request, context);
+ const templates = await dashboardProjectCaller(context).findManyByIds({
+ projectIds: env.PROJECT_TEMPLATES,
+ });
+
+ return {
+ user,
+ templates,
+ userPlanFeatures,
+ publisherHost: env.PUBLISHER_HOST,
+ origin,
+ projectToClone,
+ };
+};
+
+const Dashboard = lazy(async () => {
+ const { Dashboard } = await import("~/dashboard/index.client");
+ return { default: Dashboard };
+});
+
+const DashboardRoute = () => {
+ const data = useLoaderData<typeof loader>();
+
+ return (
+ <ClientOnly>
+ <Dashboard {...data} />
+ </ClientOnly>
+ );
+};
+
+export default DashboardRoute;
diff --git a/apps/builder/app/routes/_ui.dashboard.tsx b/apps/builder/app/routes/_ui.dashboard.tsx
deleted file mode 100644
index df9f4b46e2..0000000000
--- a/apps/builder/app/routes/_ui.dashboard.tsx
+++ /dev/null
@@ -1,161 +0,0 @@
-import { lazy } from "react";
-import { useLoaderData, type MetaFunction } from "@remix-run/react";
-import { json, type LoaderFunctionArgs } from "@remix-run/server-runtime";
-import { dashboardProjectRouter } from "@webstudio-is/dashboard/index.server";
-import { findAuthenticatedUser } from "~/services/auth.server";
-import { builderUrl, isDashboard, loginPath } from "~/shared/router-utils";
-import { createContext } from "~/shared/context.server";
-import env from "~/env/env.server";
-import { ClientOnly } from "~/shared/client-only";
-import { preventCrossOriginCookie } from "~/services/no-cross-origin-cookie";
-import {
- AuthorizationError,
- createCallerFactory,
-} from "@webstudio-is/trpc-interface/index.server";
-import { redirect } from "~/services/no-store-redirect";
-import { preconnect, prefetchDNS } from "react-dom";
-import { parseBuilderUrl } from "@webstudio-is/http-client";
-import { allowedDestinations } from "~/services/destinations.server";
-import { db as authDb } from "@webstudio-is/authorization-token/index.server";
-import { db } from "@webstudio-is/project/index.server";
-export { ErrorBoundary } from "~/shared/error/error-boundary";
-
-const dashboardProjectCaller = createCallerFactory(dashboardProjectRouter);
-
-export const meta: MetaFunction<typeof loader> = () => {
- const metas: ReturnType<MetaFunction> = [];
-
- metas.push({ title: "Webstudio Dashboard" });
-
- return metas;
-};
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- if (false === isDashboard(request)) {
- throw new Response("Not Found", {
- status: 404,
- });
- }
-
- preventCrossOriginCookie(request);
- allowedDestinations(request, ["document", "empty"]);
- // CSRF token checks are not necessary for dashboard-only pages.
- // All requests from the builder or canvas app are safeguarded either by preventCrossOriginCookie for fetch requests
- // or by allowedDestinations for iframe requests.
-
- const user = await findAuthenticatedUser(request);
-
- const url = new URL(request.url);
-
- if (user === null) {
- throw redirect(
- loginPath({
- returnTo: `${url.pathname}${url.search}`,
- })
- );
- }
-
- const context = await createContext(request);
-
- if (context.authorization.type !== "user") {
- throw new AuthorizationError("You must be logged in to access this page");
- }
-
- const projectToCloneAuthToken = url.searchParams.get(
- "projectToCloneAuthToken"
- );
-
- let projectToClone:
- | { id: string; title: string; authToken: string }
- | undefined = undefined;
-
- if (
- // Only on navigation requests
- request.headers.get("sec-fetch-mode") === "navigate" &&
- projectToCloneAuthToken !== null
- ) {
- // Clone project
- const token = await authDb.getTokenInfo(projectToCloneAuthToken, context);
- if (token.canClone === false) {
- throw new AuthorizationError(
- "You don't have access to clone this project"
- );
- }
-
- const project = await db.project.loadById(
- token.projectId,
- await context.createTokenContext(projectToCloneAuthToken)
- );
-
- projectToClone = {
- id: token.projectId,
- authToken: projectToCloneAuthToken,
- title: project.title,
- };
- }
-
- const projects = await dashboardProjectCaller(context).findMany({
- userId: user.id,
- });
-
- const projectTemplates = await dashboardProjectCaller(context).findManyByIds({
- projectIds: env.PROJECT_TEMPLATES,
- });
-
- const { userPlanFeatures } = context;
-
- if (userPlanFeatures === undefined) {
- throw new Response("User plan features are not defined", {
- status: 404,
- });
- }
-
- const { sourceOrigin } = parseBuilderUrl(request.url);
-
- return json({
- user,
- projects,
- projectTemplates,
- userPlanFeatures,
- publisherHost: env.PUBLISHER_HOST,
- origin: sourceOrigin,
- projectToClone,
- });
-};
-
-/**
- * When deleting/adding a project, then navigating to a new project and pressing the back button,
- * the dashboard page may display stale data because it’s being retrieved from the browser’s back/forward cache (bfcache).
- *
- * https://web.dev/articles/bfcache
- *
- */
-export const headers = () => {
- return {
- "Cache-Control": "no-store",
- };
-};
-
-const Dashboard = lazy(async () => {
- const { Dashboard } = await import("~/dashboard/index.client");
- return { default: Dashboard };
-});
-
-const DashboardRoute = () => {
- const data = useLoaderData<typeof loader>();
-
- data.projects.slice(0, 5).forEach((project) => {
- prefetchDNS(builderUrl({ projectId: project.id, origin: data.origin }));
- });
- data.projects.slice(0, 5).forEach((project) => {
- preconnect(builderUrl({ projectId: project.id, origin: data.origin }));
- });
-
- return (
- <ClientOnly>
- <Dashboard {...data} />
- </ClientOnly>
- );
-};
-
-export default DashboardRoute;
diff --git a/apps/builder/app/shared/router-utils/dashboard.ts b/apps/builder/app/shared/router-utils/dashboard.ts
new file mode 100644
index 0000000000..7460074e9e
--- /dev/null
+++ b/apps/builder/app/shared/router-utils/dashboard.ts
@@ -0,0 +1,86 @@
+import {
+ AuthorizationError,
+ type AppContext,
+} from "@webstudio-is/trpc-interface/index.server";
+import { db as authDb } from "@webstudio-is/authorization-token/index.server";
+import { db } from "@webstudio-is/project/index.server";
+import { parseBuilderUrl } from "@webstudio-is/http-client";
+import { findAuthenticatedUser } from "~/services/auth.server";
+import { createContext } from "~/shared/context.server";
+export { ErrorBoundary } from "~/shared/error/error-boundary";
+import { redirect } from "~/services/no-store-redirect";
+import { loginPath } from "./path-utils";
+import { isDashboard } from "./is-canvas";
+
+export const loadDashboardData = async (request: Request) => {
+ if (false === isDashboard(request)) {
+ throw new Response("Not Found", {
+ status: 404,
+ });
+ }
+
+ const user = await findAuthenticatedUser(request);
+
+ const url = new URL(request.url);
+
+ if (user === null) {
+ throw redirect(
+ loginPath({
+ returnTo: `${url.pathname}${url.search}`,
+ })
+ );
+ }
+
+ const context = await createContext(request);
+
+ if (context.authorization.type !== "user") {
+ throw new AuthorizationError("You must be logged in to access this page");
+ }
+
+ const { userPlanFeatures } = context;
+
+ if (userPlanFeatures === undefined) {
+ throw new Response("User plan features are not defined", {
+ status: 404,
+ });
+ }
+
+ const { sourceOrigin } = parseBuilderUrl(request.url);
+
+ return { context, user, origin: sourceOrigin, userPlanFeatures };
+};
+
+export const getProjectToClone = async (
+ request: Request,
+ context: AppContext
+) => {
+ const url = new URL(request.url);
+ const projectToCloneAuthToken = url.searchParams.get(
+ "projectToCloneAuthToken"
+ );
+
+ if (
+ // Only on navigation requests
+ request.headers.get("sec-fetch-mode") !== "navigate" ||
+ projectToCloneAuthToken === null
+ ) {
+ return;
+ }
+
+ // Clone project
+ const token = await authDb.getTokenInfo(projectToCloneAuthToken, context);
+ if (token.canClone === false) {
+ throw new AuthorizationError("You don't have access to clone this project");
+ }
+
+ const project = await db.project.loadById(
+ token.projectId,
+ await context.createTokenContext(projectToCloneAuthToken)
+ );
+
+ return {
+ id: token.projectId,
+ authToken: projectToCloneAuthToken,
+ title: project.title,
+ };
+};
diff --git a/apps/builder/app/shared/router-utils/path-utils.ts b/apps/builder/app/shared/router-utils/path-utils.ts
index 8f88a3b722..abeb1e0d82 100644
--- a/apps/builder/app/shared/router-utils/path-utils.ts
+++ b/apps/builder/app/shared/router-utils/path-utils.ts
@@ -68,6 +68,10 @@ export const dashboardPath = () => {
return "/dashboard";
};
+export const templatesPath = () => {
+ return "/dashboard/templates";
+};
+
export const dashboardUrl = (props: { origin: string }) => {
const authServerOrigin = getAuthorizationServerOrigin(props.origin);
diff --git a/packages/design-system/src/__generated__/figma-design-tokens.json b/packages/design-system/src/__generated__/figma-design-tokens.json
index ca3f93801c..3a1a494a83 100644
--- a/packages/design-system/src/__generated__/figma-design-tokens.json
+++ b/packages/design-system/src/__generated__/figma-design-tokens.json
@@ -77,7 +77,7 @@
"type": "lineHeights"
},
"10": {
- "value": "360",
+ "value": "260",
"type": "lineHeights"
}
},
@@ -1351,7 +1351,7 @@
"type": "fontSizes"
},
"7": {
- "value": "360",
+ "value": "260",
"type": "fontSizes"
}
},
diff --git a/packages/design-system/src/__generated__/figma-design-tokens.ts b/packages/design-system/src/__generated__/figma-design-tokens.ts
index 697d007c76..5f235b6ef9 100644
--- a/packages/design-system/src/__generated__/figma-design-tokens.ts
+++ b/packages/design-system/src/__generated__/figma-design-tokens.ts
@@ -26,7 +26,7 @@ export const lineHeights = {
"7": "58px",
"8": "22px",
"9": "38px",
- "10": "360px",
+ "10": "260px",
} as const;
export const fontWeights = {
@@ -231,8 +231,8 @@ export const typography = {
brandThumbnailLargeDefault: {
fontFamily: "Manrope Variable, ManropeVariable, Manrope, sans-serif",
fontWeight: 200,
- fontSize: "360px",
- lineHeight: "360px",
+ fontSize: "260px",
+ lineHeight: "260px",
letterSpacing: "-0.05em",
textTransform: "none",
textDecoration: "none",
@@ -241,8 +241,8 @@ export const typography = {
brandThumbnailLargeHover: {
fontFamily: "Manrope Variable, ManropeVariable, Manrope, sans-serif",
fontWeight: 800,
- fontSize: "360px",
- lineHeight: "360px",
+ fontSize: "260px",
+ lineHeight: "260px",
letterSpacing: "-0.05em",
textTransform: "none",
textDecoration: "none",
@@ -553,7 +553,7 @@ export const fontSizes = {
fontSize_4: "20px",
fontSize_5: "32px",
fontSize_6: "48px",
- fontSize_7: "360px",
+ fontSize_7: "260px",
} as const;
export const other = { tokenSetOrder_0: "global" } as const;
diff --git a/packages/design-system/src/components/avatar.tsx b/packages/design-system/src/components/avatar.tsx
index 86363c913e..a4eff652dc 100644
--- a/packages/design-system/src/components/avatar.tsx
+++ b/packages/design-system/src/components/avatar.tsx
@@ -25,8 +25,8 @@ const StyledAvatar = styled(AvatarPrimitive.Root, {
outline: "none",
padding: "0",
fontWeight: "500",
- width: 22,
- height: 22,
+ width: 24,
+ height: 24,
backgroundColor: theme.colors.foregroundSubtle,
borderRadius: "50%",
});
diff --git a/packages/design-system/src/components/pro-badge.tsx b/packages/design-system/src/components/pro-badge.tsx
index 9610f259f1..fc3292d570 100644
--- a/packages/design-system/src/components/pro-badge.tsx
+++ b/packages/design-system/src/components/pro-badge.tsx
@@ -1,27 +1,29 @@
import type { ReactNode } from "react";
-import { theme } from "../stitches.config";
+import { css, theme, type CSS } from "../stitches.config";
import { Text } from "./text";
-export const ProBadge = (props: { children: ReactNode }) => {
- return (
- <Text
- css={{
- display: "inline-flex",
- borderRadius: theme.borderRadius[2],
- px: theme.spacing[3],
- py: theme.spacing[1],
- height: theme.spacing[9],
- color: theme.colors.foregroundContrastMain,
- alignItems: "center",
- maxWidth: "100%",
- whiteSpace: "nowrap",
- overflow: "hidden",
- // @todo doesn't work in tooltips, needs a workaround
- textOverflow: "ellipsis",
- background: theme.colors.backgroundStyleSourceNeutral,
- }}
- >
- {props.children}
- </Text>
- );
+const style = css({
+ display: "inline-flex",
+ borderRadius: theme.borderRadius[3],
+ px: theme.spacing[3],
+ py: theme.spacing[1],
+ height: theme.spacing[9],
+ color: theme.colors.foregroundContrastMain,
+ alignItems: "center",
+ maxWidth: "100%",
+ whiteSpace: "nowrap",
+ overflow: "hidden",
+ // @todo doesn't work in tooltips, needs a workaround
+ textOverflow: "ellipsis",
+ background: theme.colors.foregroundTextSubtle,
+});
+
+export const ProBadge = ({
+ css,
+ children,
+}: {
+ children: ReactNode;
+ css?: CSS;
+}) => {
+ return <Text className={style({ css })}>{children}</Text>;
};
diff --git a/packages/design-system/src/components/section-title.tsx b/packages/design-system/src/components/section-title.tsx
index 9a1385cc3a..ba9bfc9dbd 100644
--- a/packages/design-system/src/components/section-title.tsx
+++ b/packages/design-system/src/components/section-title.tsx
@@ -71,13 +71,13 @@ const invisibleSuffixStyle = css({
const chevronStyle = css({
width: theme.spacing[7],
opacity: `var(${chevronOpacity}, 0)`,
- marginLeft: `-${theme.spacing[7]}`,
+ translate: "-100%",
transition: "transform 150ms, opacity 200ms",
color: theme.colors.backgroundIconSubtle,
variants: {
openState: {
open: {
- transform: "rotate(90deg)",
+ rotate: "90deg",
},
closed: {},
inactive: {},
diff --git a/packages/design-system/src/stitches.config.ts b/packages/design-system/src/stitches.config.ts
index a20ff4304f..9e7b4f0f1b 100644
--- a/packages/design-system/src/stitches.config.ts
+++ b/packages/design-system/src/stitches.config.ts
@@ -146,12 +146,10 @@ const { styled, css, getCssText, globalCss, keyframes, config, reset } =
marginLeft: value,
}),
mx: (value: Stitches.PropertyValue<"marginLeft">) => ({
- marginLeft: value,
- marginRight: value,
+ marginInline: value,
}),
my: (value: Stitches.PropertyValue<"marginTop">) => ({
- marginTop: value,
- marginBottom: value,
+ marginBlock: value,
}),
userSelect: (value: Stitches.PropertyValue<"userSelect">) => ({
diff --git a/packages/icons/icons/content.svg b/packages/icons/icons/content.svg
index e13cf856b3..5a2cbbbd27 100644
--- a/packages/icons/icons/content.svg
+++ b/packages/icons/icons/content.svg
@@ -6,25 +6,7 @@
xmlns="http://www.w3.org/2000/svg"
>
<path
- d="M4.6665 5.33334H8.6665"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- <path
- d="M4.6665 8H9.99984"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- <path
- d="M4.6665 10.6667H8.6665"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- <path
- d="M3.3125 14C2.58763 14 2 13.4124 2 12.6875V12.6875V11.375V8.75V3.5C2 3.10218 2.15804 2.72064 2.43934 2.43934C2.72064 2.15804 3.10218 2 3.5 2H12.5C12.8978 2 13.2794 2.15804 13.5607 2.43934C13.842 2.72064 14 3.10218 14 3.5V8.75V11.375V12.6875V12.6875"
+ d="M4.6665 5.33334H8.6665M4.6665 8H9.99984M4.6665 10.6667H8.6665M2 3.5C2 3.10218 2.15804 2.72064 2.43934 2.43934C2.72064 2.15804 3.10218 2 3.5 2H12.5C12.8978 2 13.2794 2.15804 13.5607 2.43934C13.842 2.72064 14 3.10218 14 3.5V12.6875C14 13.4124 13.4124 14 12.6875 14H3.3125C2.58763 14 2 13.4124 2 12.6875V3.5Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
diff --git a/packages/icons/icons/discord.svg b/packages/icons/icons/discord.svg
index 1afd2dbe6f..ac581efcc6 100644
--- a/packages/icons/icons/discord.svg
+++ b/packages/icons/icons/discord.svg
@@ -1,5 +1,24 @@
-<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
- <path d="M6.8881 6.7C6.54083 6.7 6.26666 7.09039 6.26666 7.56666C6.26666 8.04294 6.54692 8.43333 6.8881 8.43333C7.23538 8.43333 7.50954 8.04294 7.50954 7.56666C7.51564 7.09039 7.23538 6.7 6.8881 6.7ZM9.11189 6.7C8.76461 6.7 8.49045 7.09039 8.49045 7.56666C8.49045 8.04294 8.7707 8.43333 9.11189 8.43333C9.45916 8.43333 9.73333 8.04294 9.73333 7.56666C9.73333 7.09039 9.45916 6.7 9.11189 6.7Z"/>
- <path d="M12.9771 1.5H3.02286C2.18343 1.5 1.5 2.098 1.5 2.839V11.627C1.5 12.368 2.18343 12.966 3.02286 12.966H11.4469L11.0531 11.7635L12.004 12.537L12.9029 13.265L14.5 14.5V2.839C14.5 2.098 13.8166 1.5 12.9771 1.5ZM10.1097 9.989C10.1097 9.989 9.84229 9.7095 9.61943 9.4625C10.5926 9.222 10.964 8.689 10.964 8.689C10.6594 8.8645 10.3697 8.988 10.1097 9.0725C9.73829 9.209 9.38171 9.3 9.03257 9.352C8.39635 9.4545 7.74387 9.45229 7.10857 9.3455C6.7356 9.28164 6.37008 9.18809 6.01657 9.066C5.83023 9.0033 5.64904 8.92946 5.47429 8.845C5.452 8.832 5.42971 8.8255 5.40743 8.8125C5.39257 8.806 5.38514 8.7995 5.37771 8.793C5.244 8.728 5.16971 8.6825 5.16971 8.6825C5.16971 8.6825 5.52629 9.2025 6.46971 9.4495C6.24686 9.6965 5.972 9.989 5.972 9.989C4.33029 9.9435 3.70629 9.001 3.70629 9.001C3.70629 6.908 4.776 5.2115 4.776 5.2115C5.84571 4.5095 6.86343 4.529 6.86343 4.529L6.93771 4.607C5.60057 4.945 4.984 5.4585 4.984 5.4585C4.984 5.4585 5.14743 5.3805 5.42229 5.27C6.21714 4.9645 6.84857 4.88 7.10857 4.8605C7.15314 4.854 7.19029 4.8475 7.23486 4.8475C8.52305 4.69494 9.83315 4.90916 10.9714 5.4585C10.9714 5.4585 10.3846 4.971 9.12171 4.633L9.22571 4.529C9.22571 4.529 10.2434 4.5095 11.3131 5.2115C11.3131 5.2115 12.3829 6.908 12.3829 9.001C12.3829 9.001 11.7514 9.9435 10.1097 9.989Z"/>
+<svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+>
+ <path
+ d="M4.56482 7.42857C4.56482 7.58012 4.63062 7.72547 4.74776 7.83263C4.86489 7.9398 5.02375 8 5.1894 8C5.35505 8 5.51392 7.9398 5.63105 7.83263C5.74818 7.72547 5.81399 7.58012 5.81399 7.42857C5.81399 7.27702 5.74818 7.13167 5.63105 7.02451C5.51392 6.91735 5.35505 6.85714 5.1894 6.85714C5.02375 6.85714 4.86489 6.91735 4.74776 7.02451C4.63062 7.13167 4.56482 7.27702 4.56482 7.42857ZM10.1861 7.42857C10.1861 7.58012 10.2519 7.72547 10.369 7.83263C10.4861 7.9398 10.645 8 10.8107 8C10.9763 8 11.1352 7.9398 11.2523 7.83263C11.3694 7.72547 11.4352 7.58012 11.4352 7.42857C11.4352 7.27702 11.3694 7.13167 11.2523 7.02451C11.1352 6.91735 10.9763 6.85714 10.8107 6.85714C10.645 6.85714 10.4861 6.91735 10.369 7.02451C10.2519 7.13167 10.1861 7.27702 10.1861 7.42857Z"
+ stroke="currentColor"
+ />
+ <path
+ d="M0.5 11.2731C0.5 8.52914 1.57179 4.90286 2.64232 3.432C2.64232 3.432 3.71411 2.94172 8 2.94172C12.2846 2.94172 13.3564 3.43314 13.3564 3.43314C14.4282 4.90286 15.5 8.52914 15.5 11.2731C15.1427 11.7646 13.8923 12.8423 11.75 13.2343L9.86376 11.0789C8.63722 11.34 7.36153 11.34 6.13499 11.0789L4.25 13.2343C2.10768 12.8423 0.857262 11.7634 0.5 11.2731Z"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ />
+ <path
+ d="M4.25 10.2937C4.57603 10.592 5.26183 10.8914 6.13499 11.0789C7.36193 11.3401 8.63807 11.3401 9.86501 11.0789C10.7382 10.8914 11.4227 10.592 11.75 10.2937"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ />
</svg>
-
\ No newline at end of file
diff --git a/packages/icons/icons/extension.svg b/packages/icons/icons/extension.svg
index dcaa3107f1..3f30bf60ad 100644
--- a/packages/icons/icons/extension.svg
+++ b/packages/icons/icons/extension.svg
@@ -6,19 +6,19 @@
xmlns="http://www.w3.org/2000/svg"
>
<path
- d="M7.14242 9.2856L12.2848 9.2856M7.14242 9.2856L2 9.2856M7.14242 9.2856L7.14242 13.9995"
+ d="M7.5 8.5L13.5 8.5M7.5 8.5L1.5 8.5M7.5 8.5L7.5 14"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
- d="M12.2848 9.28561V13.2853C12.2848 13.9164 11.7732 14.428 11.1421 14.428H3.14276C2.51163 14.428 2 13.9164 2 13.2853V5.28595C2 4.65482 2.51163 4.14319 3.14276 4.14319H7.14242V9.28561"
+ d="M13.5 8.5V13.1667C13.5 13.903 12.903 14.5 12.1667 14.5H2.83333C2.09695 14.5 1.5 13.903 1.5 13.1667V3.83333C1.5 3.09695 2.09695 2.5 2.83333 2.5H7.5V8.5"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
- d="M9.71362 1.57198V6.7144H14.856V3.03509C14.856 2.64705 14.7019 2.2749 14.4275 2.00051C14.1531 1.72613 13.781 1.57198 13.3929 1.57198H9.71362Z"
+ d="M9.5 0.5V6.5H15.5V2.20711C15.5 1.75435 15.3201 1.32014 15 1C14.6799 0.679855 14.2456 0.5 13.7929 0.5H9.5Z"
stroke="currentColor"
stroke-linejoin="round"
/>
diff --git a/packages/icons/icons/life-buoy.svg b/packages/icons/icons/life-buoy.svg
index 904247917a..bf84d53a5f 100644
--- a/packages/icons/icons/life-buoy.svg
+++ b/packages/icons/icons/life-buoy.svg
@@ -4,41 +4,14 @@
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
>
- <path
- d="M7.99992 14.6667C11.6818 14.6667 14.6666 11.6819 14.6666 8C14.6666 4.3181 11.6818 1.33333 7.99992 1.33333C4.31802 1.33333 1.33325 4.3181 1.33325 8C1.33325 11.6819 4.31802 14.6667 7.99992 14.6667Z"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- <path
- d="M3.28662 3.28667L6.11329 6.11333"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- <path
- d="M9.88672 6.11333L12.7134 3.28667"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- <path
- d="M9.88672 9.88667L12.7134 12.7133"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- <path
- d="M6.11329 9.88667L3.28662 12.7133"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- <path
- d="M7.99992 10.6667C9.47268 10.6667 10.6666 9.47276 10.6666 8C10.6666 6.52724 9.47268 5.33333 7.99992 5.33333C6.52716 5.33333 5.33325 6.52724 5.33325 8C5.33325 9.47276 6.52716 10.6667 7.99992 10.6667Z"
- stroke="currentColor"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
+ <circle cx="7.99483" cy="7.995" r="6.665" stroke="black" />
+ <path d="M3.2865 3.28667L6.11317 6.11333" />
+ <path d="M9.88647 6.11333L12.7131 3.28667" />
+ <path d="M9.88647 9.88667L12.7131 12.7133" />
+ <path d="M6.11317 9.88667L3.2865 12.7133" />
+ <circle cx="7.99483" cy="7.995" r="2.665" stroke="black" />
</svg>
diff --git a/packages/icons/icons/vimeo.svg b/packages/icons/icons/vimeo.svg
index 9ba57fe825..6a492f490e 100644
--- a/packages/icons/icons/vimeo.svg
+++ b/packages/icons/icons/vimeo.svg
@@ -1,10 +1,14 @@
<svg
- width="22"
- height="22"
- viewBox="0 0 22 22"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
- d="M20.1578 6.738C20.0764 8.52283 18.8292 10.9678 16.4184 14.0706C13.9262 17.3114 11.8172 18.9324 10.0913 18.9324C9.02325 18.9324 8.11905 17.9456 7.37989 15.971C6.88712 14.1614 6.39317 12.353 5.90039 10.5434C5.35221 8.56999 4.76395 7.58208 4.13443 7.58208C3.99768 7.58208 3.51669 7.87091 2.69501 8.4462L1.83325 7.33452C2.73745 6.53995 3.62987 5.74421 4.50813 4.94728C5.71531 3.90515 6.62069 3.35579 7.22546 3.30039C8.6519 3.16363 9.53017 4.13975 9.86026 6.22755C10.2163 8.48157 10.4627 9.88326 10.6006 10.4314C11.012 12.3011 11.4647 13.2348 11.9587 13.2348C12.343 13.2348 12.9195 12.6277 13.6881 11.4158C14.4555 10.2027 14.867 9.27967 14.9224 8.64661C15.032 7.59977 14.6206 7.07516 13.6881 7.07516C13.2484 7.07516 12.7957 7.17537 12.3312 7.37578C13.2319 4.42386 14.953 2.98916 17.4947 3.0705C19.3785 3.12591 20.2662 4.34841 20.1578 6.738Z"
+ d="M14.9933 4.80117C14.9311 6.16384 13.9793 8.02945 12.138 10.398C10.2347 12.8711 8.62443 14.1079 7.30722 14.1084C6.49091 14.1084 5.80048 13.3551 5.23593 11.8486L4.10623 7.70529C3.68742 6.1995 3.23774 5.44625 2.75719 5.44553C2.36025 5.60965 1.98992 5.8319 1.65836 6.10497L1 5.25671C1.69091 4.6498 2.37177 4.04253 3.04258 3.4349C3.96443 2.63917 4.65606 2.22024 5.11747 2.17812C6.20684 2.0733 6.87741 2.81782 7.12917 4.41168C7.40128 6.13166 7.58998 7.20105 7.69528 7.61985C8.00974 9.04691 8.35556 9.76007 8.73272 9.75936C9.02541 9.75936 9.46551 9.29652 10.053 8.37083C10.6389 7.44539 10.953 6.74084 10.9954 6.25718C11.0791 5.45857 10.765 5.05891 10.053 5.0582C9.69554 5.06338 9.34287 5.14156 9.01667 5.28794C9.70471 3.03452 11.0189 1.9394 12.9593 2.00258C14.3979 2.0447 15.0758 2.97757 14.9933 4.80117Z"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
/>
</svg>
diff --git a/packages/icons/icons/youtube.svg b/packages/icons/icons/youtube.svg
new file mode 100644
index 0000000000..fbe138ec61
--- /dev/null
+++ b/packages/icons/icons/youtube.svg
@@ -0,0 +1,15 @@
+<svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+>
+ <path
+ d="M0.892011 11.5282C0.36933 9.06155 0.36933 6.51275 0.892011 4.0461C0.960688 3.79561 1.09338 3.56731 1.27704 3.38364C1.46071 3.19998 1.68901 3.06729 1.9395 2.99861C5.95249 2.3338 10.0475 2.3338 14.0605 2.99861C14.311 3.06729 14.5393 3.19998 14.723 3.38364C14.9066 3.56731 15.0393 3.79561 15.108 4.0461C15.6307 6.51275 15.6307 9.06155 15.108 11.5282C15.0393 11.7787 14.9066 12.007 14.723 12.1907C14.5393 12.3743 14.311 12.507 14.0605 12.5757C10.0475 13.2406 5.95248 13.2406 1.9395 12.5757C1.68901 12.507 1.46071 12.3743 1.27704 12.1907C1.09338 12.007 0.960688 11.7787 0.892011 11.5282Z"
+ />
+ <path d="M6.5 10.3L10.5 7.9L6.5 5.5V10.3Z" />
+</svg>
diff --git a/packages/icons/src/__generated__/components.tsx b/packages/icons/src/__generated__/components.tsx
index 7a5c7ebe4f..d8cd5676ab 100644
--- a/packages/icons/src/__generated__/components.tsx
+++ b/packages/icons/src/__generated__/components.tsx
@@ -1794,7 +1794,7 @@ export const ContentIcon: IconComponent = forwardRef(
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
- d="M4.667 5.333h4M4.667 8H10M4.667 10.667h4M3.313 14A1.312 1.312 0 0 1 2 12.687v0V3.5A1.5 1.5 0 0 1 3.5 2h9A1.5 1.5 0 0 1 14 3.5v9.188"
+ d="M4.667 5.333h4M4.666 8H10m-5.333 2.667h4M2 3.5A1.5 1.5 0 0 1 3.5 2h9A1.5 1.5 0 0 1 14 3.5v9.188c0 .724-.588 1.312-1.313 1.312H3.313A1.312 1.312 0 0 1 2 12.687V3.5Z"
/>
</svg>
);
@@ -1951,8 +1951,22 @@ export const DiscordIcon: IconComponent = forwardRef(
{...props}
ref={forwardedRef}
>
- <path d="M6.888 6.7c-.347 0-.621.39-.621.867 0 .476.28.866.621.866.347 0 .622-.39.622-.866.006-.477-.275-.867-.622-.867Zm2.224 0c-.347 0-.622.39-.622.867 0 .476.28.866.622.866.347 0 .621-.39.621-.866 0-.477-.274-.867-.621-.867Z" />
- <path d="M12.977 1.5H3.023c-.84 0-1.523.598-1.523 1.339v8.788c0 .741.683 1.339 1.523 1.339h8.424l-.394-1.202.951.773.899.728L14.5 14.5V2.839c0-.741-.683-1.339-1.523-1.339ZM10.11 9.989s-.268-.28-.49-.527c.973-.24 1.344-.773 1.344-.773a4.509 4.509 0 0 1-.854.383 5.935 5.935 0 0 1-3.001.273 6.928 6.928 0 0 1-1.092-.279 4.665 4.665 0 0 1-.543-.221c-.022-.013-.044-.02-.067-.033a.102.102 0 0 1-.03-.019c-.133-.065-.207-.11-.207-.11s.356.52 1.3.767c-.223.247-.498.539-.498.539-1.642-.046-2.266-.988-2.266-.988 0-2.093 1.07-3.79 1.07-3.79 1.07-.702 2.087-.682 2.087-.682l.075.078c-1.337.338-1.954.851-1.954.851s.163-.078.438-.188c.795-.305 1.427-.39 1.687-.41.044-.006.081-.013.126-.013a6.8 6.8 0 0 1 3.736.611s-.586-.487-1.85-.825l.105-.104s1.017-.02 2.087.683c0 0 1.07 1.696 1.07 3.789 0 0-.632.943-2.273.988Z" />
+ <path
+ stroke="currentColor"
+ d="M4.565 7.429c0 .151.066.296.183.404A.655.655 0 0 0 5.189 8c.166 0 .325-.06.442-.167a.548.548 0 0 0 .183-.404.548.548 0 0 0-.183-.404.655.655 0 0 0-.442-.168.655.655 0 0 0-.441.168.548.548 0 0 0-.183.404Zm5.621 0c0 .151.066.296.183.404a.655.655 0 0 0 .442.167c.165 0 .324-.06.441-.167a.548.548 0 0 0 .183-.404.548.548 0 0 0-.183-.404.655.655 0 0 0-.441-.168.655.655 0 0 0-.442.168.548.548 0 0 0-.183.404Z"
+ />
+ <path
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="M.5 11.273c0-2.744 1.072-6.37 2.142-7.841 0 0 1.072-.49 5.358-.49 4.285 0 5.356.491 5.356.491 1.072 1.47 2.144 5.096 2.144 7.84-.357.492-1.608 1.57-3.75 1.961L9.864 11.08a8.973 8.973 0 0 1-3.729 0L4.25 13.234c-2.142-.392-3.393-1.47-3.75-1.96Z"
+ />
+ <path
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="M4.25 10.294c.326.298 1.012.597 1.885.785a8.976 8.976 0 0 0 3.73 0c.873-.188 1.558-.487 1.885-.785"
+ />
</svg>
);
}
@@ -2157,12 +2171,12 @@ export const ExtensionIcon: IconComponent = forwardRef(
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
- d="M7.142 9.286h5.143m-5.143 0H2m5.142 0v4.713M12.285 9.286v4c0 .63-.512 1.142-1.143 1.142h-8A1.143 1.143 0 0 1 2 13.285v-8c0-.63.512-1.142 1.143-1.142h4v5.143"
+ d="M7.5 8.5h6m-6 0h-6m6 0V14M13.5 8.5v4.667c0 .736-.597 1.333-1.333 1.333H2.833A1.333 1.333 0 0 1 1.5 13.167V3.833c0-.736.597-1.333 1.333-1.333H7.5v6"
/>
<path
stroke="currentColor"
strokeLinejoin="round"
- d="M9.714 1.572v5.142h5.142V3.035a1.463 1.463 0 0 0-1.463-1.463h-3.68Z"
+ d="M9.5.5v6h6V2.207A1.707 1.707 0 0 0 13.793.5H9.5Z"
/>
</svg>
);
@@ -2880,6 +2894,9 @@ export const LifeBuoyIcon: IconComponent = forwardRef(
return (
<svg
xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
viewBox="0 0 16 16"
width={size}
height={size}
@@ -2887,18 +2904,9 @@ export const LifeBuoyIcon: IconComponent = forwardRef(
{...props}
ref={forwardedRef}
>
- <path
- stroke="currentColor"
- strokeLinecap="round"
- strokeLinejoin="round"
- d="M8 14.667A6.667 6.667 0 1 0 8 1.333a6.667 6.667 0 0 0 0 13.334ZM3.287 3.287l2.826 2.826M9.887 6.113l2.826-2.826M9.887 9.887l2.826 2.826M6.113 9.887l-2.826 2.826"
- />
- <path
- stroke="currentColor"
- strokeLinecap="round"
- strokeLinejoin="round"
- d="M8 10.667a2.667 2.667 0 1 0 0-5.334 2.667 2.667 0 0 0 0 5.334Z"
- />
+ <circle cx="7.995" cy="7.995" r="6.665" stroke="#000" />
+ <path d="m3.287 3.287 2.826 2.826M9.886 6.113l2.827-2.826M9.886 9.887l2.827 2.826M6.113 9.887l-2.827 2.826" />
+ <circle cx="7.995" cy="7.995" r="2.665" stroke="#000" />
</svg>
);
}
@@ -4967,14 +4975,19 @@ export const VimeoIcon: IconComponent = forwardRef(
return (
<svg
xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 22 22"
+ viewBox="0 0 16 16"
width={size}
height={size}
fill={fill}
{...props}
ref={forwardedRef}
>
- <path d="M20.158 6.738c-.082 1.785-1.329 4.23-3.74 7.333-2.492 3.24-4.6 4.861-6.327 4.861-1.068 0-1.972-.986-2.711-2.961L5.9 10.543c-.548-1.973-1.136-2.96-1.766-2.96-.136 0-.617.288-1.439.863l-.862-1.111c.904-.795 1.797-1.59 2.675-2.388C5.715 3.905 6.621 3.356 7.225 3.3c1.427-.136 2.305.84 2.635 2.928.356 2.254.603 3.655.74 4.203.412 1.87.865 2.804 1.359 2.804.384 0 .96-.607 1.73-1.82.767-1.212 1.178-2.135 1.233-2.768.11-1.047-.301-1.572-1.234-1.572-.44 0-.892.1-1.357.3.9-2.951 2.622-4.386 5.164-4.304 1.883.055 2.771 1.277 2.663 3.667Z" />
+ <path
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="M14.993 4.801c-.062 1.363-1.014 3.228-2.855 5.597-1.903 2.473-3.514 3.71-4.83 3.71-.817 0-1.508-.753-2.072-2.26l-1.13-4.143c-.419-1.506-.868-2.259-1.349-2.26a4.332 4.332 0 0 0-1.099.66L1 5.257c.69-.607 1.372-1.214 2.043-1.822.921-.796 1.613-1.215 2.074-1.257 1.09-.105 1.76.64 2.012 2.234.272 1.72.461 2.79.566 3.208.315 1.427.66 2.14 1.038 2.14.292 0 .733-.463 1.32-1.39.586-.925.9-1.63.942-2.113.084-.798-.23-1.198-.942-1.199-.357.005-.71.084-1.036.23.688-2.253 2.002-3.349 3.942-3.285 1.439.042 2.117.975 2.034 2.798Z"
+ />
</svg>
);
}
@@ -5699,6 +5712,29 @@ export const Youtube1cIcon: IconComponent = forwardRef(
);
Youtube1cIcon.displayName = "Youtube1cIcon";
+export const YoutubeIcon: IconComponent = forwardRef(
+ ({ fill = "none", size = 16, ...props }, forwardedRef) => {
+ return (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 16 16"
+ width={size}
+ height={size}
+ fill={fill}
+ {...props}
+ ref={forwardedRef}
+ >
+ <path d="M.892 11.528a18.047 18.047 0 0 1 0-7.482A1.496 1.496 0 0 1 1.94 3a37.082 37.082 0 0 1 12.12 0 1.497 1.497 0 0 1 1.048 1.047 18.046 18.046 0 0 1 0 7.482 1.497 1.497 0 0 1-1.048 1.048 37.077 37.077 0 0 1-12.12 0 1.497 1.497 0 0 1-1.048-1.048Z" />
+ <path d="m6.5 10.3 4-2.4-4-2.4v4.8Z" />
+ </svg>
+ );
+ }
+);
+YoutubeIcon.displayName = "YoutubeIcon";
+
export const ZAxisRotateIcon: IconComponent = forwardRef(
({ fill = "none", size = 16, ...props }, forwardedRef) => {
return (
diff --git a/packages/icons/src/__generated__/svg.ts b/packages/icons/src/__generated__/svg.ts
index a291aa947d..9a5e6d3b62 100644
--- a/packages/icons/src/__generated__/svg.ts
+++ b/packages/icons/src/__generated__/svg.ts
@@ -132,7 +132,7 @@ export const ContentBlockIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="n
export const ContentEmbedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.667 5.333h4M4.667 8H10M14 8.75V3.5A1.5 1.5 0 0 0 12.5 2h-9A1.5 1.5 0 0 0 2 3.5v9.252c0 .69.56 1.25 1.25 1.25v0H6M12.817 13.698 14 12.515l-1.183-1.182"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m9.269 11.333-1.183 1.182 1.183 1.183M11.652 10.612l-1.218 3.651"/></svg>`;
-export const ContentIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.667 5.333h4M4.667 8H10M4.667 10.667h4M3.313 14A1.312 1.312 0 0 1 2 12.687v0V3.5A1.5 1.5 0 0 1 3.5 2h9A1.5 1.5 0 0 1 14 3.5v9.188"/></svg>`;
+export const ContentIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.667 5.333h4M4.666 8H10m-5.333 2.667h4M2 3.5A1.5 1.5 0 0 1 3.5 2h9A1.5 1.5 0 0 1 14 3.5v9.188c0 .724-.588 1.312-1.313 1.312H3.313A1.312 1.312 0 0 1 2 12.687V3.5Z"/></svg>`;
export const CopyIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.214 5.5H6.786c-.71 0-1.286.576-1.286 1.286v6.428c0 .71.576 1.286 1.286 1.286h6.428c.71 0 1.286-.576 1.286-1.286V6.786c0-.71-.576-1.286-1.286-1.286Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2.786 10.5A1.29 1.29 0 0 1 1.5 9.214V2.786A1.29 1.29 0 0 1 2.786 1.5h6.428A1.29 1.29 0 0 1 10.5 2.786"/></svg>`;
@@ -144,7 +144,7 @@ export const DialogIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" v
export const DimensionsIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2.833 6.833v-4h4"/><path fill="currentColor" fill-rule="evenodd" d="M3.687 2.98a.5.5 0 0 0-.707.707l8.48 8.48H8.666a.5.5 0 1 0 0 1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 1 0-1 0v2.793l-8.48-8.48Z" clip-rule="evenodd"/></svg>`;
-export const DiscordIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path d="M6.888 6.7c-.347 0-.621.39-.621.867 0 .476.28.866.621.866.347 0 .622-.39.622-.866.006-.477-.275-.867-.622-.867Zm2.224 0c-.347 0-.622.39-.622.867 0 .476.28.866.622.866.347 0 .621-.39.621-.866 0-.477-.274-.867-.621-.867Z"/><path d="M12.977 1.5H3.023c-.84 0-1.523.598-1.523 1.339v8.788c0 .741.683 1.339 1.523 1.339h8.424l-.394-1.202.951.773.899.728L14.5 14.5V2.839c0-.741-.683-1.339-1.523-1.339ZM10.11 9.989s-.268-.28-.49-.527c.973-.24 1.344-.773 1.344-.773a4.509 4.509 0 0 1-.854.383 5.935 5.935 0 0 1-3.001.273 6.928 6.928 0 0 1-1.092-.279 4.665 4.665 0 0 1-.543-.221c-.022-.013-.044-.02-.067-.033a.102.102 0 0 1-.03-.019c-.133-.065-.207-.11-.207-.11s.356.52 1.3.767c-.223.247-.498.539-.498.539-1.642-.046-2.266-.988-2.266-.988 0-2.093 1.07-3.79 1.07-3.79 1.07-.702 2.087-.682 2.087-.682l.075.078c-1.337.338-1.954.851-1.954.851s.163-.078.438-.188c.795-.305 1.427-.39 1.687-.41.044-.006.081-.013.126-.013a6.8 6.8 0 0 1 3.736.611s-.586-.487-1.85-.825l.105-.104s1.017-.02 2.087.683c0 0 1.07 1.696 1.07 3.789 0 0-.632.943-2.273.988Z"/></svg>`;
+export const DiscordIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" d="M4.565 7.429c0 .151.066.296.183.404A.655.655 0 0 0 5.189 8c.166 0 .325-.06.442-.167a.548.548 0 0 0 .183-.404.548.548 0 0 0-.183-.404.655.655 0 0 0-.442-.168.655.655 0 0 0-.441.168.548.548 0 0 0-.183.404Zm5.621 0c0 .151.066.296.183.404a.655.655 0 0 0 .442.167c.165 0 .324-.06.441-.167a.548.548 0 0 0 .183-.404.548.548 0 0 0-.183-.404.655.655 0 0 0-.441-.168.655.655 0 0 0-.442.168.548.548 0 0 0-.183.404Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 11.273c0-2.744 1.072-6.37 2.142-7.841 0 0 1.072-.49 5.358-.49 4.285 0 5.356.491 5.356.491 1.072 1.47 2.144 5.096 2.144 7.84-.357.492-1.608 1.57-3.75 1.961L9.864 11.08a8.973 8.973 0 0 1-3.729 0L4.25 13.234c-2.142-.392-3.393-1.47-3.75-1.96Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.25 10.294c.326.298 1.012.597 1.885.785a8.976 8.976 0 0 0 3.73 0c.873-.188 1.558-.487 1.885-.785"/></svg>`;
export const DotIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></svg>`;
@@ -160,7 +160,7 @@ export const EmailIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" vi
export const EmbedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 10.667 14.667 8 12 5.333M4 5.333 1.333 8 4 10.667M9.667 2.667 6.333 13.333"/></svg>`;
-export const ExtensionIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M7.142 9.286h5.143m-5.143 0H2m5.142 0v4.713M12.285 9.286v4c0 .63-.512 1.142-1.143 1.142h-8A1.143 1.143 0 0 1 2 13.285v-8c0-.63.512-1.142 1.143-1.142h4v5.143"/><path stroke="currentColor" stroke-linejoin="round" d="M9.714 1.572v5.142h5.142V3.035a1.463 1.463 0 0 0-1.463-1.463h-3.68Z"/></svg>`;
+export const ExtensionIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.5h6m-6 0h-6m6 0V14M13.5 8.5v4.667c0 .736-.597 1.333-1.333 1.333H2.833A1.333 1.333 0 0 1 1.5 13.167V3.833c0-.736.597-1.333 1.333-1.333H7.5v6"/><path stroke="currentColor" stroke-linejoin="round" d="M9.5.5v6h6V2.207A1.707 1.707 0 0 0 13.793.5H9.5Z"/></svg>`;
export const ExternalLinkIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10 2h4v4M6.667 9.333 14 2M12 8.667v4A1.334 1.334 0 0 1 10.667 14H3.333A1.334 1.334 0 0 1 2 12.667V5.333A1.333 1.333 0 0 1 3.333 4h4"/></svg>`;
@@ -214,7 +214,7 @@ export const LabelIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" vi
export const LargeXIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.5 3 3 12.5M3 3l9.5 9.5"/></svg>`;
-export const LifeBuoyIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 14.667A6.667 6.667 0 1 0 8 1.333a6.667 6.667 0 0 0 0 13.334ZM3.287 3.287l2.826 2.826M9.887 6.113l2.826-2.826M9.887 9.887l2.826 2.826M6.113 9.887l-2.826 2.826"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 10.667a2.667 2.667 0 1 0 0-5.334 2.667 2.667 0 0 0 0 5.334Z"/></svg>`;
+export const LifeBuoyIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><circle cx="7.995" cy="7.995" r="6.665" stroke="#000"/><path d="m3.287 3.287 2.826 2.826M9.886 6.113l2.827-2.826M9.886 9.887l2.827 2.826M6.113 9.887l-2.827 2.826"/><circle cx="7.995" cy="7.995" r="2.665" stroke="#000"/></svg>`;
export const Link2UnlinkedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10 4.667h1.333a3.333 3.333 0 0 1 0 6.666H10m-4 0H4.667a3.333 3.333 0 0 1 0-6.666H6"/></svg>`;
@@ -368,7 +368,7 @@ export const VideoIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" vi
export const ViewportIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M5.173 1.35h.157a.65.65 0 0 1 0 1.3H5.2c-.57 0-.96 0-1.26.025-.294.024-.446.068-.553.122a1.35 1.35 0 0 0-.59.59c-.054.107-.098.259-.122.552-.025.301-.025.69-.025 1.261v.13a.65.65 0 0 1-1.3 0v-.157c0-.537 0-.98.03-1.34.03-.373.095-.715.259-1.036a2.65 2.65 0 0 1 1.158-1.158c.32-.164.663-.229 1.036-.26.36-.029.803-.029 1.34-.029Zm6.888 1.325c-.301-.024-.69-.025-1.261-.025h-.13a.65.65 0 1 1 0-1.3h.157c.537 0 .98 0 1.34.03.373.03.715.095 1.036.259.499.254.904.66 1.158 1.158.164.32.229.663.26 1.036.029.36.029.803.029 1.34v.157a.65.65 0 1 1-1.3 0V5.2c0-.57 0-.96-.025-1.26-.024-.294-.068-.446-.122-.553a1.35 1.35 0 0 0-.59-.59c-.107-.054-.26-.098-.552-.122ZM2 10.02a.65.65 0 0 1 .65.65v.13c0 .57 0 .96.025 1.26.024.294.068.446.122.553.13.254.336.46.59.59.107.054.259.098.552.122.301.025.69.025 1.261.025h.13a.65.65 0 1 1 0 1.3h-.157c-.537 0-.98 0-1.34-.03-.373-.03-.715-.095-1.036-.259a2.65 2.65 0 0 1-1.158-1.158c-.164-.32-.23-.663-.26-1.037-.029-.36-.029-.802-.029-1.34v-.156a.65.65 0 0 1 .65-.65Zm12 0a.65.65 0 0 1 .65.65v.157c0 .537 0 .98-.03 1.34-.03.373-.095.715-.259 1.036a2.65 2.65 0 0 1-1.158 1.158c-.32.164-.663.23-1.037.26-.36.029-.802.029-1.34.029h-.156a.65.65 0 1 1 0-1.3h.13c.57 0 .96 0 1.26-.025.294-.024.446-.068.553-.122.254-.13.46-.336.59-.59.054-.107.098-.259.122-.552.025-.301.025-.69.025-1.261v-.13a.65.65 0 0 1 .65-.65ZM8 10.033a2.033 2.033 0 1 0 0-4.066 2.033 2.033 0 0 0 0 4.066Zm0 1.3a3.333 3.333 0 1 0 0-6.666 3.333 3.333 0 0 0 0 6.666Z" clip-rule="evenodd"/></svg>`;
-export const VimeoIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" fill="currentColor" width="100%" height="100%" style="display: block;"><path d="M20.158 6.738c-.082 1.785-1.329 4.23-3.74 7.333-2.492 3.24-4.6 4.861-6.327 4.861-1.068 0-1.972-.986-2.711-2.961L5.9 10.543c-.548-1.973-1.136-2.96-1.766-2.96-.136 0-.617.288-1.439.863l-.862-1.111c.904-.795 1.797-1.59 2.675-2.388C5.715 3.905 6.621 3.356 7.225 3.3c1.427-.136 2.305.84 2.635 2.928.356 2.254.603 3.655.74 4.203.412 1.87.865 2.804 1.359 2.804.384 0 .96-.607 1.73-1.82.767-1.212 1.178-2.135 1.233-2.768.11-1.047-.301-1.572-1.234-1.572-.44 0-.892.1-1.357.3.9-2.951 2.622-4.386 5.164-4.304 1.883.055 2.771 1.277 2.663 3.667Z"/></svg>`;
+export const VimeoIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14.993 4.801c-.062 1.363-1.014 3.228-2.855 5.597-1.903 2.473-3.514 3.71-4.83 3.71-.817 0-1.508-.753-2.072-2.26l-1.13-4.143c-.419-1.506-.868-2.259-1.349-2.26a4.332 4.332 0 0 0-1.099.66L1 5.257c.69-.607 1.372-1.214 2.043-1.822.921-.796 1.613-1.215 2.074-1.257 1.09-.105 1.76.64 2.012 2.234.272 1.72.461 2.79.566 3.208.315 1.427.66 2.14 1.038 2.14.292 0 .733-.463 1.32-1.39.586-.925.9-1.63.942-2.113.084-.798-.23-1.198-.942-1.199-.357.005-.71.084-1.036.23.688-2.253 2.002-3.349 3.942-3.285 1.439.042 2.117.975 2.034 2.798Z"/></svg>`;
export const WebhookFormIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 11.32H8.007c-.734 0-1.3.627-1.654 1.267a2.666 2.666 0 0 1-5.02-1.254A2.62 2.62 0 0 1 1.713 10"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4 11.333 6.087 7.48c.353-.647.066-1.453-.334-2.067a2.667 2.667 0 1 1 4.594-2.706"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m8 4 2.087 3.82c.353.647 1.18.847 1.913.847A2.667 2.667 0 0 1 12 14"/></svg>`;
@@ -398,6 +398,8 @@ export const YAxisIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" vi
export const Youtube1cIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M13.47 3.299a1.771 1.771 0 0 1 1.238 1.263C15 5.675 15 8 15 8s0 2.325-.293 3.438a1.771 1.771 0 0 1-1.238 1.263C12.38 13 8 13 8 13s-4.378 0-5.47-.299a1.771 1.771 0 0 1-1.237-1.263C1 10.325 1 8 1 8s0-2.325.293-3.438A1.771 1.771 0 0 1 2.53 3.299C3.622 3 8 3 8 3s4.378 0 5.47.299Zm-3.232 4.7L6.6 10.144V5.857L10.238 8Z" clip-rule="evenodd"/></svg>`;
+export const YoutubeIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path d="M.892 11.528a18.047 18.047 0 0 1 0-7.482A1.496 1.496 0 0 1 1.94 3a37.082 37.082 0 0 1 12.12 0 1.497 1.497 0 0 1 1.048 1.047 18.046 18.046 0 0 1 0 7.482 1.497 1.497 0 0 1-1.048 1.048 37.077 37.077 0 0 1-12.12 0 1.497 1.497 0 0 1-1.048-1.048Z"/><path d="m6.5 10.3 4-2.4-4-2.4v4.8Z"/></svg>`;
+
export const ZAxisRotateIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 17" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14 9.28a5.993 5.993 0 0 1-2.007 3.736 6.04 6.04 0 0 1-7.962-.024 5.98 5.98 0 0 1-.988-7.867A6.025 6.025 0 0 1 6.526 2.69a6.049 6.049 0 0 1 4.23.462 6.01 6.01 0 0 1 2.868 3.129M14 2.53v3.75h-3.766"/></svg>`;
export const ZAxisIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M5.636 2.09v8.274h8.275M2.09 13.91l3.546-3.546m-3.547 3.547h3.547m-3.547 0v-3.744"/></svg>`;
diff --git a/packages/sdk-components-react/src/youtube.ws.ts b/packages/sdk-components-react/src/youtube.ws.ts
index c0aa80a58b..face4d1a3f 100644
--- a/packages/sdk-components-react/src/youtube.ws.ts
+++ b/packages/sdk-components-react/src/youtube.ws.ts
@@ -1,5 +1,5 @@
import type { ComponentProps } from "react";
-import { Youtube1cIcon } from "@webstudio-is/icons/svg";
+import { YoutubeIcon } from "@webstudio-is/icons/svg";
import {
defaultStates,
type PresetStyle,
@@ -16,7 +16,7 @@ const presetStyle = {
export const meta: WsComponentMeta = {
type: "container",
- icon: Youtube1cIcon,
+ icon: YoutubeIcon,
states: defaultStates,
presetStyle,
constraints: {
diff --git a/packages/trpc-interface/src/authorize/project.server.ts b/packages/trpc-interface/src/authorize/project.server.ts
index 51b95812c8..8af24faa14 100644
--- a/packages/trpc-interface/src/authorize/project.server.ts
+++ b/packages/trpc-interface/src/authorize/project.server.ts
@@ -122,6 +122,7 @@ export const checkProjectPermit = async (
// Staging IDs
"c236999d-be6b-43fb-9edc-78a2ba59e56d",
"a1371dce-752c-4ccf-8ea4-88bab577fe50",
+ "6204396c-3f9e-4d29-8d19-ff0f76960a74",
];
// @todo Delete and use tokens