import { CSSProperties, ReactNode } from 'react'; import { JSX } from 'react/jsx-runtime'; import { ElementIconRenderer, NodeRenderers, OverrideReactFlowProps, PaddingWithUnit, ViewPadding } from './LikeC4Diagram.props'; import type * as t from '@likec4/core/types'; export interface LikeC4ViewProps { /** * View to display. */ viewId: t.aux.ViewId; /** * Layout to display * - `auto`: auto-layouted from the current sources * - `manual`: manually layouted (if available, falls back to `auto`) * * @default 'manual' */ layoutType?: t.LayoutType | undefined; /** * Enable/disable panning * @default false */ pannable?: boolean | undefined; /** * Enable/disable zooming * @default false */ zoomable?: boolean | undefined; /** * @default true */ keepAspectRatio?: boolean | undefined; /** * Background pattern * @default 'transparent' */ background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined; /** * Click on the view opens a modal with browser. * You can customize or disable the browser. * * @default true */ browser?: boolean | LikeC4BrowserProps | undefined; /** * @default - determined by the user's system preferences. */ colorScheme?: 'light' | 'dark' | undefined; /** * LikeC4 views are using 'IBM Plex Sans' font. * By default, component injects the CSS to document head. * Set to false if you want to handle the font yourself. * * @default true */ injectFontCss?: boolean | undefined; /** * Show/hide panel with top left controls, * @default false */ controls?: boolean | undefined; /** * If set, initial viewport will show all nodes & edges * @default true */ fitView?: boolean | undefined; /** * Padding around the diagram * @default '16px' * * @see {@link ViewPadding} * * @example * ```tsx * * * * ``` */ fitViewPadding?: ViewPadding | undefined; /** * Show back/forward navigation buttons in controls panel * @default false */ showNavigationButtons?: undefined | boolean; /** * Display notations of the view * @default false */ enableNotations?: boolean | undefined; /** * If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges * Conflicts with `browser` prop * * @default false */ enableFocusMode?: boolean | undefined; /** * If Walkthrough for dynamic views should be enabled * @default false */ enableDynamicViewWalkthrough?: boolean | undefined; /** * Default dynamic view display variant * @default 'diagram' */ dynamicViewVariant?: t.DynamicViewDisplayVariant | undefined; /** * Enable popup with element details * @default false */ enableElementDetails?: boolean | undefined; /** * Display element tags in the bottom left corner * @default false */ enableElementTags?: boolean | undefined; /** * Display dropdown with details on relationship's label click * @default false */ enableRelationshipDetails?: boolean | undefined; /** * Allow popup to browse relationships * * @default enableRelationshipDetails */ enableRelationshipBrowser?: boolean | undefined; /** * Display element notes, if they are present in the view * * @default false */ enableNotes?: boolean | undefined; /** * Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations) * * @default 'auto' - will be set to true if view is pannable and has more than 3000 * 2000 pixels */ reduceGraphics?: 'auto' | boolean | undefined; where?: t.WhereOperator | undefined; /** * Override some react flow props */ reactFlowProps?: OverrideReactFlowProps | undefined; className?: string | undefined; style?: CSSProperties | undefined; /** * Override Mantine theme */ mantineTheme?: any; /** Function to generate nonce attribute added to all generated `