"use client"; import { PrototypeProvider } from "@prototype/components/prototype-provider"; import { PrototypeBootstrapOnboardingModal } from "@prototype/components/shell/prototype-bootstrap-onboarding-modal"; import { PrototypeBootstrapPreviewFloatingStepper } from "@prototype/components/shell/prototype-bootstrap-preview-floating-stepper"; import { PrototypeGalleryNav } from "@prototype/components/shell/prototype-gallery-nav"; import { BootstrapPreviewProvider, useBootstrapPreview, } from "@prototype/lib/prototypes/use-bootstrap-preview"; import { GalleryHostConfigProvider } from "@prototype/lib/prototypes/use-gallery-host-config"; import { cn } from "@prototype/lib/utils"; import type { HTMLAttributes, ReactNode, RefObject } from "react"; /** Uniform gallery gutter — tile gaps match content inset on every side. */ export const PROTOTYPE_GALLERY_GRID_GAP_CLASS = "gap-6"; export const PROTOTYPE_GALLERY_CONTENT_INSET_CLASS = "p-6"; export const PROTOTYPE_GALLERY_HEADER_INSET_CLASS = "px-6 py-4"; export const PROTOTYPE_GALLERY_FOOTER_INSET_CLASS = "px-6 py-3"; type PrototypeGalleryShellProps = { children: ReactNode; footer?: ReactNode; sourceDirectoryName?: string; sourcePath?: string; syncConfigPath?: string; designSystemPagePath?: string; debug?: boolean; workspaceOnboarded?: boolean; }; function PrototypeGalleryShellMain({ children, }: Pick) { return (
{children}
); } export function PrototypeGalleryShell({ children, footer, sourceDirectoryName, sourcePath, syncConfigPath, designSystemPagePath, debug = false, workspaceOnboarded = false, }: PrototypeGalleryShellProps) { return ( {children} ); } function PrototypeGalleryShellContent({ children, footer, sourceDirectoryName, sourcePath, syncConfigPath, designSystemPagePath, }: PrototypeGalleryShellProps) { const { bootstrapStep, openModalForStep, isOnboardingBackdropActive, isDevelopmentToggleVisible, } = useBootstrapPreview(); return ( {footer && !isOnboardingBackdropActive ? (
{footer}
) : null}
{isOnboardingBackdropActive ? (
) : ( <> {children} )} {isDevelopmentToggleVisible ? ( ) : null}
); } type PrototypeGalleryPageLayoutProps = { header: ReactNode; children: ReactNode; scrollClassName?: string; scrollContainerProps?: HTMLAttributes & Record<`data-${string}`, string>; scrollContainerRef?: RefObject; scrollOverlay?: ReactNode; }; /** Gallery pages: header stays fixed; only body scrolls. */ export function PrototypeGalleryPageLayout({ header, children, scrollClassName, scrollContainerProps, scrollContainerRef, scrollOverlay, }: PrototypeGalleryPageLayoutProps) { return (
{header}
{scrollOverlay ? (
{scrollOverlay}
) : null}
{children}
); } type PrototypeGalleryHeaderProps = { eyebrow?: string; title?: string; description?: string; className?: string; actions?: ReactNode; }; export function PrototypeGalleryHeader({ eyebrow, title = "Prototypes", description = "UI experiments and concept explorations. Select a prototype to open it.", className, actions, }: PrototypeGalleryHeaderProps) { const descriptionClassName = "mt-1 text-sm leading-normal text-[var(--tool-chrome-text-muted)]"; const descriptionBelowActions = Boolean(actions && description); return (
{eyebrow ? (

{eyebrow}

) : null}

{title}

{description && !descriptionBelowActions ? (

{description}

) : null}
{actions ? (
{actions}
) : null}
{descriptionBelowActions ? (

{description}

) : null}
); } export function PrototypeGalleryPage({ children, footer, header, }: PrototypeGalleryShellProps & { header?: ReactNode; }) { return ( } > {children} ); }