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
feat(webv2): give the live preview the standard media layout
joshistoaste37dc98479a9
diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewDetails.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewDetails.browser.test.tsxindex 205b6abffb..9e34348199 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewDetails.browser.test.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewDetails.browser.test.tsx@@ -155,6 +155,14 @@ const interact = (action: () => void, delay = 100): Promise<void> =>});});+const buildItemMedia = (item: GalleryImageItem | GalleryVideoItem) =>+ ({+ actionImage: item.kind === 'image' ? actionImage : null,+ actions,+ item,+ kind: 'item',+ }) as const;+const renderFooter = async ({isOpen,item,@@ -162,18 +170,18 @@ const renderFooter = async ({isOpen: boolean;item: GalleryImageItem | GalleryVideoItem;}): Promise<void> => {+ const media = buildItemMedia(item);+await interact(() => {root?.render(<QueryClientProvider client={queryClient}><I18nextProvider i18n={i18n}><ChakraProvider value={system}><PreviewFooter- actionImage={item.kind === 'image' ? actionImage : null}- actions={actions}boardItemCount={2}isLoadingBoard={false}isMetadataOpen={isOpen}- item={item}+ media={media}selectedIndex={0}onNext={() => undefined}onPrevious={() => undefined}diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewFooter.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewFooter.tsxindex 16b1dcb817..73c9557f93 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewFooter.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewFooter.tsx@@ -1,7 +1,7 @@import type { GalleryImage, GalleryItem } from '@features/gallery';import type { ImageActions } from '@workbench/image-actions';-import { HStack, Stack, Text } from '@chakra-ui/react';+import { HStack, Icon, Stack, Text } from '@chakra-ui/react';import { formatGalleryVideoDuration } from '@features/gallery/contracts';import { Button } from '@platform/ui';import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';@@ -10,33 +10,42 @@ import { useTranslation } from 'react-i18next';import { PreviewMetadataPanel } from './PreviewMetadataPanel';/**- * The preview's slim status bar: board position and dimensions (or live- * progress) on one quiet row with prev/next, plus the Details expander.- * Identity (board / image name) lives in the widget header; image actions- * live in the header's actions slot — never here.+ * What the footer is describing: a selected gallery item, or the image slot a+ * live generation is filling. The live shape carries the slot's requested+ * output dimensions — the denoise preview frames arrive at other sizes, and a+ * dimensions readout that ticks while rendering reads as noise.+ */+export type PreviewFooterMedia =+ | { actionImage: GalleryImage | null; actions: ImageActions; item: GalleryItem; kind: 'item' }+ | { height: number; kind: 'live'; width: number };++/**+ * The preview's slim status bar: board position and dimensions on one quiet+ * row with prev/next, plus the Details expander. Identity (board / image name)+ * lives in the widget header; image actions live in the header's actions slot+ * — never here.** It floats over the dot-grid surface rather than partitioning it, so it* carries its own opaque panel fill — the grid runs behind and past it.+ *+ * It renders while a generation is live too, with the same geometry: the+ * moment denoising finishes is exactly when the fitted frame must not move,+ * so the bar never appears or disappears across that boundary.*/export const PreviewFooter = ({- actionImage,- actions,boardItemCount,isLoadingBoard,isMetadataOpen,- item,+ media,onNext,onPrevious,onToggleMetadata,selectedIndex,}: {- /** The selected image with board/star context, for the metadata/recall panel. */- actionImage: GalleryImage | null;- actions: ImageActions;boardItemCount: number;isLoadingBoard: boolean;isMetadataOpen: boolean;- item: GalleryItem;+ media: PreviewFooterMedia;onNext: () => void;onPrevious: () => void;onToggleMetadata: () => void;@@ -48,10 +57,12 @@ export const PreviewFooter = ({: selectedIndex === -1? t('widgets.preview.itemCount', { count: boardItemCount }): t('common.countOfTotal', { count: selectedIndex + 1, total: boardItemCount });+ const item = media.kind === 'item' ? media.item : null;const fps =- item.kind === 'video' && item.fps !== undefined+ item?.kind === 'video' && item.fps !== undefined? new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 3 }).format(item.fps): null;+ const { height, width } = media.kind === 'item' ? media.item : media;return (<Stack bg="bg.subtle" borderColor="border.subtle" borderWidth="1px" gap="2" minW="0" p="3" rounded="md" shadow="sm">@@ -64,8 +75,8 @@ export const PreviewFooter = ({·</Text><Text color="fg.muted" flexShrink={0} fontSize="2xs" fontVariantNumeric="tabular-nums">- {item.width} × {item.height}- {item.kind === 'video'+ {width} × {height}+ {item?.kind === 'video'? ` · ${t('widgets.preview.videoDuration', {duration: formatGalleryVideoDuration(item.durationSeconds),})}${fps === null ? '' : ` · ${t('widgets.preview.framesPerSecond', { count: fps })}`}`@@ -93,13 +104,24 @@ export const PreviewFooter = ({</Button></HStack></HStack>- <PreviewMetadataPanel- actions={actions}- image={actionImage}- isOpen={isMetadataOpen}- item={item}- onToggle={onToggleMetadata}- />+ {media.kind === 'item' ? (+ <PreviewMetadataPanel+ actions={media.actions}+ image={media.actionImage}+ isOpen={isMetadataOpen}+ item={media.item}+ onToggle={onToggleMetadata}+ />+ ) : (+ // The Details row an in-flight image cannot answer yet, at the exact+ // geometry of the live one, so completion swaps content — never layout.+ <HStack aria-disabled="true" color="fg.subtle" gap="1" w="fit-content">+ <Icon as={ChevronRightIcon} boxSize="3" />+ <Text fontSize="2xs" fontWeight="700" textTransform="uppercase">+ {t('widgets.preview.details')}+ </Text>+ </HStack>+ )}</Stack>);};diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewFrame.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewFrame.tsxindex f5f7a624a0..345bb738c2 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewFrame.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewFrame.tsx@@ -22,7 +22,6 @@ import {import { useTranslation } from 'react-i18next';import { PreviewCompareDropZone } from './PreviewCompareDropZone';-import { PreviewLiveOverlay } from './PreviewLiveReadout';import { FittedFrame, PreviewStage } from './PreviewStage';import { usePreviewLoupe, type PreviewLoupeControls } from './usePreviewLoupe';@@ -37,8 +36,13 @@ interface PreviewFrameProps {frameWidth: number;isItemCurrent?: (itemKey: GalleryItemKey) => boolean;isLive: boolean;- liveBadgeLabel: string;- liveQueueItemId?: string | null;+ /**+ * Static caption over a live frame — used only by the multi-session tiles to+ * name the GPU. The single live preview carries no badge at all: the frame+ * is styled exactly like a finished item, and progress readouts belong to+ * the footer and the top bar rail.+ */+ liveBadgeLabel?: string;loupeControlsRef?: Ref<PreviewLoupeControls>;onContextMenu?: (x: number, y: number) => void;onVideoCopyAvailabilityChange?: (itemKey: GalleryItemKey, isAvailable: boolean) => void;@@ -78,7 +82,6 @@ const PreviewImageFrame = ({frameWidth,isLive,liveBadgeLabel,- liveQueueItemId,loupeControlsRef,onContextMenu,padding,@@ -151,15 +154,12 @@ const PreviewImageFrame = ({width={frameWidth}/>) : null;- const liveBadge = isLive ? (- typeof liveQueueItemId === 'string' ? (- <PreviewLiveOverlay queueItemId={liveQueueItemId} />- ) : (+ const liveBadge =+ isLive && liveBadgeLabel !== undefined ? (<Badge left="2" pointerEvents="none" position="absolute" size="xs" top="2" variant="solid">{liveBadgeLabel}</Badge>- )- ) : null;+ ) : null;if (variant === 'inset') {return (@@ -168,11 +168,7 @@ const PreviewImageFrame = ({// the cell, so only the fitted frame sits a little lower.<PreviewStage fill="parent">{source ? (- <FittedFrame- borderColor={isLive ? 'accent.solid' : 'border.emphasized'}- frameHeight={frameHeight}- frameWidth={frameWidth}- >+ <FittedFrame frameHeight={frameHeight} frameWidth={frameWidth}>{media}{liveBadge}</FittedFrame>@@ -192,12 +188,14 @@ const PreviewImageFrame = ({paddingBottom={paddingBottom}{...loupe.stageProps}>- <PreviewCompareDropZone currentImageName={dragItem?.kind === 'image' ? dragItem.name : null} />+ {/* Never armed over a live render: arming a comparison pauses live-follow+ and would swap the in-progress image for a compare of the stale hidden+ selection. The inset live frame never offered this either. */}+ {isLive ? null : <PreviewCompareDropZone currentImageName={dragItem?.kind === 'image' ? dragItem.name : null} />}<FittedFrameref={setContentRef}{...listeners}bg="transparent"- borderColor={isLive ? 'accent.solid' : 'border.emphasized'}cursor={isDragDisabled ? undefined : isDragging ? 'grabbing' : 'grab'}frameHeight={frameHeight}frameWidth={frameWidth}diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewLiveReadout.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewLiveReadout.tsxdeleted file mode 100644index de45bb8109..0000000000--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewLiveReadout.tsx+++ /dev/null@@ -1,30 +0,0 @@-import { Badge } from '@chakra-ui/react';-import { useQueueItemProgress } from '@features/queue/react';-import { useTranslation } from 'react-i18next';--/**- * Leaf subscriber for live generation state, kept out of the frame component- * so per-step progress events only re-render this sliver.- */--const formatPercent = (percentage: number): string => `${Math.round(percentage * 100)}%`;--/**- * The live badge drawn over the fitted frame.- *- * No bar under it any more: the denoising image *is* the progress here — you can- * watch it resolve — and the top bar's rail already carries the quantified- * version at viewport width. A second hairline across the image only competed- * with the thing it was describing.- */-export const PreviewLiveOverlay = ({ queueItemId }: { queueItemId: string }) => {- const { t } = useTranslation();- const progress = useQueueItemProgress(queueItemId);- const percentage = progress?.percentage ?? null;-- return (- <Badge left="2" pointerEvents="none" position="absolute" size="xs" top="2" variant="solid">- {percentage === null ? t('common.generating') : `${t('common.generating')} · ${formatPercent(percentage)}`}- </Badge>- );-};diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewMediaChrome.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewMediaChrome.browser.test.tsxindex ab37420977..ba59bddff1 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewMediaChrome.browser.test.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewMediaChrome.browser.test.tsx@@ -256,12 +256,10 @@ describe('Preview mixed media footer and actions', () => {Expected muted</Text><PreviewFooter- actionImage={null}- actions={{} as ImageActions}boardItemCount={3}isLoadingBoard={false}isMetadataOpen={false}- item={item}+ media={{ actionImage: null, actions: {} as ImageActions, item, kind: 'item' }}selectedIndex={1}onNext={() => undefined}onPrevious={() => undefined}@@ -288,12 +286,10 @@ describe('Preview mixed media footer and actions', () => {it('shows mixed position, dimensions, duration, and localized fps with tabular numerals', async () => {await render(<PreviewFooter- actionImage={null}- actions={{} as ImageActions}boardItemCount={3}isLoadingBoard={false}isMetadataOpen={false}- item={sharedVideo}+ media={{ actionImage: null, actions: {} as ImageActions, item: sharedVideo, kind: 'item' }}selectedIndex={1}onNext={() => undefined}onPrevious={() => undefined}diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewNavigation.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewNavigation.browser.test.tsxindex fc2ca11665..73ddb45093 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewNavigation.browser.test.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewNavigation.browser.test.tsx@@ -581,6 +581,29 @@ describe('preview keyboard navigation boundary', () => {);});+ it('renders the live frame with the standard media chrome: footer up, no badge, item border', async () => {+ mocks.project.queue.items = [queueItem];+ mocks.project.settings.showProgressImagesInViewer = true;+ mocks.useActiveProgressTarget.mockReturnValue({ itemIndex: 1, queueItemId: 'queue-item-live' });+ mocks.useProgressImage.mockReturnValue({+ dataUrl: 'data:image/png;base64,',+ height: 64,+ target: { itemIndex: 1, queueItemId: 'queue-item-live' },+ width: 64,+ });++ await render();++ // The footer island is up during the live render, fed by queue data: the+ // slot's requested output size, and working prev/next.+ expect(host?.textContent).toContain('64 × 64');+ expect(host?.querySelector('button[aria-label="Next item in board"]')).not.toBeNull();+ // No progress badge over the frame — the image is styled exactly like a+ // finished item, so completion changes pixels, not chrome.+ expect(host?.textContent).not.toContain('Generating');+ expect(host?.querySelector<HTMLImageElement>('img[src^="data:image/png"]')).not.toBeNull();+ });+it('uses the active placeholder board while following live, even before an image frame arrives', async () => {const liveBoardImage = {...mocks.project.widgetInstances.gallery.state.values.recentImages[0],diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetView.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetView.tsxindex f76e5e0122..5e03f14540 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetView.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetView.tsx@@ -70,7 +70,17 @@ import {useWorkbenchCommands,useWorkbenchQueries,} from '@workbench/WorkbenchContext';-import { useCallback, useEffect, useEffectEvent, useMemo, useRef, useState, type KeyboardEvent, type Ref } from 'react';+import {+ useCallback,+ useEffect,+ useEffectEvent,+ useMemo,+ useRef,+ useState,+ type KeyboardEvent,+ type ReactNode,+ type Ref,+} from 'react';import { useTranslation } from 'react-i18next';import type { PreviewLoupeControls } from './usePreviewLoupe';@@ -79,7 +89,7 @@ import { PreviewCompare } from './PreviewCompare';import { resolvePreviewCompareDrop } from './previewCompareDnd';import { usePreviewDensity, type PreviewDensity } from './previewDensity';import { PreviewFilmstrip } from './PreviewFilmstrip';-import { PreviewFooter } from './PreviewFooter';+import { PreviewFooter, type PreviewFooterMedia } from './PreviewFooter';import {PreviewFrame,type PreviewMediaSource,@@ -100,6 +110,8 @@ import {} from './previewSettings';const EMPTY_PREVIEW_ITEMS: GalleryItem[] = [];+/** For the live footer's Details slot, which renders disabled and never fires. */+const noop = (): void => {};const VIDEO_FRAME_COPY_FAILURE_KEYS = {'clipboard-failed': 'widgets.preview.copyCurrentFrameWriteFailed',@@ -878,9 +890,17 @@ export const PreviewWidgetView = ({ region, runtime }: WidgetViewProps) => {/>) : shouldFollowLive && activeGalleryPlaceholder ? (<LivePreview+ boardItemCount={navigationSequence.length}+ density={density}+ filmstripItems={isFilmstripVisible && density !== 'minimal' ? boardItems : null}+ isLoadingBoard={isLoadingBoard}placeholder={activeGalleryPlaceholder}progressImage={matchingProgressImage}+ selectedIndex={navigationCursor}shouldAntialiasProgressImage={antialiasProgressImages}+ onNext={selectNextItem}+ onPrevious={selectPreviousItem}+ onSelectItem={selectPreviewItem}/>) : selectedItem ? (<>@@ -1021,6 +1041,30 @@ interface SelectedMediaPreviewProps {videoControllerRef?: Ref<PreviewVideoFrameController>;}+/**+ * The one media arrangement, shared by selected items and the live preview:+ * the stage fills, and the filmstrip + footer float above its lower edge in a+ * single island stack. The stage reserves bottom padding for the footer island+ * only, so the fitted media is never tucked under it; the filmstrip floats+ * over the media itself and steals no height. Live and finished renders MUST+ * pass through the same scaffold — the denoise→done boundary may change only+ * the pixels inside the frame, never the geometry around it.+ */+const PreviewMediaScaffold = ({ children }: { children: ReactNode }) => (+ <Flex direction="column" h="full" minH="0" position="relative" w="full">+ {children}+ </Flex>+);++/** The floating island column the filmstrip and footer share. */+const PreviewOverlayStack = ({ children }: { children: ReactNode }) => (+ <Stack bottom="2" gap="2" insetX="2" position="absolute" zIndex="1">+ {children}+ </Stack>+);++const getMediaStagePadding = (density: PreviewDensity): string => (density === 'full' ? '6' : '3');+const SelectedMediaPreview = ({actionImage,actions,@@ -1050,24 +1094,22 @@ const SelectedMediaPreview = ({frameWidth: number;source: Parameters<typeof PreviewFrame>[0]['source'];}) => {- const { t } = useTranslation();+ const media = useMemo<PreviewFooterMedia>(+ () => ({ actionImage, actions, item, kind: 'item' }),+ [actionImage, actions, item]+ );- // The grid surface fills; the filmstrip and details float above its lower- // edge. The surface reserves bottom padding for the details island only, so- // the fitted media is never tucked under it; the filmstrip floats over the- // media itself and steals no height.return (- <Flex direction="column" h="full" minH="0" position="relative" w="full">+ <PreviewMediaScaffold><PreviewFramedragItem={dragItem}frameHeight={frameHeight}frameWidth={frameWidth}isItemCurrent={isItemCurrent}isLive={false}- liveBadgeLabel={t('common.generating')}loupeControlsRef={loupeControlsRef}onVideoCopyAvailabilityChange={onCopyAvailabilityChange}- padding={density === 'full' ? '6' : '3'}+ padding={getMediaStagePadding(density)}paddingBottom={PREVIEW_OVERLAY_RESERVE}shouldAntialiasLiveImagesource={source}@@ -1075,7 +1117,7 @@ const SelectedMediaPreview = ({videoControllerRef={videoControllerRef}onContextMenu={onContextMenu}/>- <Stack bottom="2" gap="2" insetX="2" position="absolute" zIndex="1">+ <PreviewOverlayStack>{filmstripItems ? (<PreviewFilmstripdensity={density}@@ -1085,32 +1127,52 @@ const SelectedMediaPreview = ({/>) : null}<PreviewFooter- actionImage={actionImage}- actions={actions}boardItemCount={boardItemCount}- item={item}isLoadingBoard={isLoadingBoard}isMetadataOpen={isMetadataOpen}+ media={media}selectedIndex={selectedIndex}onNext={onNext}onPrevious={onPrevious}onToggleMetadata={onToggleMetadata}/>- </Stack>- </Flex>+ </PreviewOverlayStack>+ </PreviewMediaScaffold>);};+/**+ * The single-session live preview: the denoise stream rendered exactly like a+ * finished item — same scaffold, same frame chrome, no badge — so the moment+ * generation completes, only the pixels change. The footer stays up+ * throughout, fed by queue data: the slot's position in the same navigation+ * sequence the arrow keys walk, and its requested output size.+ */const LivePreview = ({+ boardItemCount,+ density,+ filmstripItems,+ isLoadingBoard,placeholder,progressImage,+ selectedIndex,shouldAntialiasProgressImage,+ onNext,+ onPrevious,+ onSelectItem,}: {+ boardItemCount: number;+ density: PreviewDensity;+ filmstripItems: GalleryItem[] | null;+ isLoadingBoard: boolean;placeholder: GalleryQueuePlaceholder;progressImage: LatestProgressImageSnapshot | null;+ selectedIndex: number;shouldAntialiasProgressImage: boolean;+ onNext: () => void;+ onPrevious: () => void;+ onSelectItem: (item: GalleryItem) => void;}) => {- const { t } = useTranslation();const previewImage = useStreamingImageSource({liveImage: progressImageToStreamingSource(progressImage),});@@ -1126,17 +1188,39 @@ const LivePreview = ({[placeholder.id, previewImage]);+ const media = useMemo<PreviewFooterMedia>(+ () => ({ height: placeholder.height, kind: 'live', width: placeholder.width }),+ [placeholder.height, placeholder.width]+ );+return (- <PreviewFrame- frameHeight={previewImage?.height ?? placeholder.height}- frameWidth={previewImage?.width ?? placeholder.width}- isLive- liveBadgeLabel={t('common.generating')}- liveQueueItemId={placeholder.queueItemId}- shouldAntialiasLiveImage={shouldAntialiasProgressImage}- source={source}- variant="inset"- />+ <PreviewMediaScaffold>+ <PreviewFrame+ frameHeight={previewImage?.height ?? placeholder.height}+ frameWidth={previewImage?.width ?? placeholder.width}+ isLive+ padding={getMediaStagePadding(density)}+ paddingBottom={PREVIEW_OVERLAY_RESERVE}+ shouldAntialiasLiveImage={shouldAntialiasProgressImage}+ source={source}+ variant="framed"+ />+ <PreviewOverlayStack>+ {filmstripItems ? (+ <PreviewFilmstrip density={density} items={filmstripItems} selectedItemKey={null} onSelect={onSelectItem} />+ ) : null}+ <PreviewFooter+ boardItemCount={boardItemCount}+ isLoadingBoard={isLoadingBoard}+ isMetadataOpen={false}+ media={media}+ selectedIndex={selectedIndex}+ onNext={onNext}+ onPrevious={onPrevious}+ onToggleMetadata={noop}+ />+ </PreviewOverlayStack>+ </PreviewMediaScaffold>);};@@ -1179,10 +1263,7 @@ const LivePreviewTile = ({frameHeight={previewImage?.height ?? placeholder.height}frameWidth={previewImage?.width ?? placeholder.width}isLive- liveBadgeLabel={- deviceLabel ? t('widgets.queue.device.shortLabel', { index: deviceLabel.index }) : t('common.generating')- }- liveQueueItemId={placeholder.queueItemId}+ liveBadgeLabel={deviceLabel ? t('widgets.queue.device.shortLabel', { index: deviceLabel.index }) : undefined}shouldAntialiasLiveImage={shouldAntialiasProgressImage}source={source}variant="inset"@@ -1219,15 +1300,7 @@ const EmptyPreview = () => {const { t } = useTranslation();return (- <PreviewFrame- frameHeight={1}- frameWidth={1}- isLive={false}- liveBadgeLabel={t('common.generating')}- shouldAntialiasLiveImage- source={null}- variant="inset"- >+ <PreviewFrame frameHeight={1} frameWidth={1} isLive={false} shouldAntialiasLiveImage source={null} variant="inset"><Stack align="center" color="fg" gap="2" maxW="18rem" textAlign="center"><Text fontSize="sm" fontWeight="800">{t('widgets.preview.noGallerySelection')}