import { type FilterOptions, type TextSegment } from './filter.js'; /** * Splits `text` into segments and memoises the result. * * `options` is compared by value, so an inline object literal is fine and does * not re-run the filter on every render. * * ```tsx * function Comment({ body }: { body: string }) { * const segments = useProfanitySegments(body, { languages: ['en', 'de'] }); * return ( *
* {segments.map((seg, i) => * seg.isProfane ? {seg.text} : {seg.text}, * )} *
* ); * } * ``` */ export declare function useProfanitySegments(text: string, options?: FilterOptions): TextSegment[]; /** * Convenience wrapper for the common "is there anything to moderate here" * check. Memoised the same way. */ export declare function useIsProfane(text: string, options?: FilterOptions): boolean; export { filterFWordsToSegments } from './filter.js'; export type { FilterOptions, TextSegment } from './filter.js'; export type { Language } from './registry.js'; //# sourceMappingURL=react.d.ts.map