{"version":3,"file":"Mention.mjs","names":[],"sources":["../../../src/components/Mentions/Mention.tsx"],"sourcesContent":["import type {\n  MentionDataFn,\n  MentionDisplayTransform,\n  MentionItem,\n  MentionRenderSuggestionInput,\n  MentionSerializer,\n} from './Mentions.types';\n\nexport interface MentionProps {\n  /** Character(s) or pattern that opens this source's dropdown. A `RegExp` with fewer than two capture groups matches the trigger itself (for example `/[@#]/`) and the query is everything after it up to a whitespace. A `RegExp` with two or more capture groups is used as is: it must be anchored to the end of the text (`$`), group 1 must capture the trigger and the query, group 2 the query @default '@' */\n  trigger?: string | RegExp;\n\n  /** Static array of suggestions or a sync/async function that returns matches */\n  data?: MentionItem[] | MentionDataFn;\n\n  /** Template controlling how this mention is stored in the value, or a full serializer @default `${trigger}[__display__](__id__)` */\n  markup?: string | MentionSerializer;\n\n  /** Customizes the visible text of a stored mention @default (_, display) => display */\n  displayTransform?: MentionDisplayTransform;\n\n  /** If set, the trigger character is kept as a prefix in the visible text of the mention @default false */\n  withTrigger?: boolean;\n\n  /** Custom function to render a suggestion row */\n  renderSuggestion?: (input: MentionRenderSuggestionInput) => React.ReactNode;\n\n  /** Custom empty state for this source */\n  renderEmpty?: (query: string) => React.ReactNode;\n\n  /** Custom error state when an async `data` function rejects */\n  renderError?: (query: string, error: unknown) => React.ReactNode;\n\n  /** Called when a suggestion from this source is inserted, `startPos` and `endPos` are plain-text indices of the replaced trigger and query */\n  onAdd?: (item: { id: string; display: string; startPos: number; endPos: number }) => void;\n\n  /** If set, a space is appended after inserting a mention @default false */\n  appendSpaceOnAdd?: boolean;\n\n  /** Debounce async `data` calls, in milliseconds @default 0 */\n  debounceMs?: number;\n\n  /** Maximum number of suggestions rendered from array results */\n  maxSuggestions?: number;\n\n  /** If set, the query is allowed to contain whitespace @default false */\n  allowSpaceInQuery?: boolean;\n\n  /** If set, accents are ignored when the query is matched against array data @default false */\n  ignoreAccents?: boolean;\n\n  /** Class name applied to this source's mentions in the overlay */\n  className?: string;\n\n  /** Styles applied to this source's mentions in the overlay */\n  style?: React.CSSProperties;\n}\n\n/**\n * Configuration component that declares a single mention data source. It renders nothing – the parent\n * `Mentions` component reads its props to configure a trigger, its data and how its mentions are\n * serialized. It is not created with `factory`, so theme `defaultProps` and Styles API do not apply to it.\n */\nexport function Mention(_props: MentionProps): React.ReactElement | null {\n  return null;\n}\n\nMention.displayName = '@mantine/core/Mentions.Mention';\n"],"mappings":";;;;;;;AA+DA,SAAgB,QAAQ,QAAiD;CACvE,OAAO;AACT;AAEA,QAAQ,cAAc"}