/** * React-specific types for Fragments. * * Import from '@fragments-sdk/core/react' when you need React-typed * component definitions. The main '@fragments-sdk/core' entrypoint * works without React installed. */ import type { ComponentType, ReactNode, JSX } from 'react'; /** * A React component that can be used in a fragment definition. * This type is intentionally broad to support various React component patterns * including FC, forwardRef, memo, and class components across different React versions. */ export type FragmentComponent = | ComponentType | ((props: TProps) => ReactNode | JSX.Element | null); // Re-export definition types for convenience export type { FragmentDefinition, FragmentDefinitionV2 } from './types.js';