Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
import { Grid, HStack } from '@chakra-ui/react';
import { PaletteButton } from '@workbench/palette/PaletteButton';
import { SettingsDialogHost } from '@workbench/settings/SettingsDialogHost';
import { WidgetsDialog } from '@workbench/shell/WidgetsDialog';
import { AppMenu } from './AppMenu';
import { InvocationCluster } from './InvocationCluster';
import { LayoutPresetAdminDialogs } from './LayoutPresetAdminDialogs';
import { LayoutPresetManagerDialog } from './LayoutPresetManagerDialog';
import { LayoutPresetStrip } from './LayoutPresetStrip';
import { ProjectSwitcher } from './ProjectSwitcher';
import { TopbarProgressRail } from './TopbarProgressRail';
/** Use minmax(0,1fr) side columns to center presets independently of project-name width. */
const TOPBAR_COLUMNS = 'minmax(0, 1fr) auto minmax(0, 1fr)';
export const TopBar = () => (
<>
<Grid
alignItems="center"
as="header"
bg="bg.subtle"
borderBottomWidth="1px"
borderColor="border.subtle"
flexShrink={0}
gap="2"
gridTemplateColumns={TOPBAR_COLUMNS}
h="44px"
// Positioning context for the progress rail, which overlays the bottom border rather than taking a row of its
// own.
position="relative"
px="1.5"
w="full"
>
<HStack gap="0.5" minW="0">
<AppMenu />
<ProjectSwitcher />
{/* The palette's own button, beside the project, so its shortcut is not the only way in. */}
<PaletteButton />
</HStack>
<LayoutPresetStrip />
<InvocationCluster />
<TopbarProgressRail />
</Grid>
{/* Dialog hosts, not controls: every surface that can open one writes to a store, so the body cannot belong to
whichever trigger happens to be mounted. */}
<LayoutPresetManagerDialog />
<LayoutPresetAdminDialogs />
<SettingsDialogHost />
<WidgetsDialog />
</>
);