{"version":3,"file":"data-client.mjs","names":[],"sources":["../src/data-client.ts"],"sourcesContent":["import { createSearchScorer, SearchScorer, suggestNames } from './search';\nimport {\n  DocData,\n  GetItemArgs,\n  IndexItem,\n  ListItemsArgs,\n  SearchDocsArgs,\n  SectionRecord,\n} from './types';\n\nfunction normalize(value: string): string {\n  return value.trim().toLowerCase();\n}\n\nfunction clampLimit(limit: number | undefined, fallback: number, max: number): number {\n  if (typeof limit !== 'number' || Number.isNaN(limit)) {\n    return fallback;\n  }\n\n  return Math.max(1, Math.min(max, Math.floor(limit)));\n}\n\nconst INDEX_REVALIDATE_INTERVAL_MS = 5 * 60 * 1000;\n\n/** Fetches and caches the static MCP data published alongside the docs site */\nexport class MantineMcpDataClient {\n  private readonly baseUrl: string;\n  private readonly timeoutMs: number;\n  private indexCache: IndexItem[] | null = null;\n  private indexEtag: string | null = null;\n  private indexCheckedAt = 0;\n  private sectionsCache: SectionRecord[] | null = null;\n  private docCache = new Map<string, DocData>();\n  private scorer: SearchScorer | null = null;\n\n  constructor(baseUrl = 'https://mantine.dev/mcp', timeoutMs = 10000) {\n    this.baseUrl = baseUrl.replace(/\\/+$/, '');\n    this.timeoutMs = timeoutMs;\n  }\n\n  private async fetchJson<T>(relativePath: string, etag?: string | null) {\n    const controller = new AbortController();\n    const timer = setTimeout(() => controller.abort(), this.timeoutMs);\n\n    try {\n      const url = `${this.baseUrl}/${relativePath.replace(/^\\/+/, '')}`;\n      const headers = etag ? { 'If-None-Match': etag } : undefined;\n      const response = await fetch(url, { signal: controller.signal, headers });\n\n      if (response.status === 304) {\n        return { data: null as T | null, etag };\n      }\n\n      if (!response.ok) {\n        throw new Error(`Failed to fetch ${url}: ${response.status}`);\n      }\n\n      return { data: (await response.json()) as T, etag: response.headers.get('etag') };\n    } finally {\n      clearTimeout(timer);\n    }\n  }\n\n  /**\n   * Re-fetches the index if the published copy changed since it was cached.\n   *\n   * Best-effort: a revalidation failure (network blip, non-ok response) is logged and\n   * swallowed so the still-good cached index keeps serving the in-flight request instead of\n   * failing it outright.\n   */\n  private async revalidateIndex(): Promise<void> {\n    try {\n      const { data, etag } = await this.fetchJson<IndexItem[]>('index.json', this.indexEtag);\n\n      if (data) {\n        this.indexCache = data;\n        this.indexEtag = etag ?? null;\n        this.sectionsCache = null;\n        this.docCache.clear();\n        this.scorer = null;\n      }\n    } catch (error) {\n      // oxlint-disable-next-line no-console\n      console.error('Failed to revalidate Mantine MCP index, serving cached data', error);\n    }\n  }\n\n  async getIndex(): Promise<IndexItem[]> {\n    if (!this.indexCache) {\n      const { data, etag } = await this.fetchJson<IndexItem[]>('index.json');\n      this.indexCache = data ?? [];\n      this.indexEtag = etag ?? null;\n      this.indexCheckedAt = Date.now();\n      return this.indexCache;\n    }\n\n    const now = Date.now();\n    if (now - this.indexCheckedAt >= INDEX_REVALIDATE_INTERVAL_MS) {\n      this.indexCheckedAt = now;\n      await this.revalidateIndex();\n    }\n\n    return this.indexCache;\n  }\n\n  async getSections(): Promise<SectionRecord[]> {\n    if (this.sectionsCache) {\n      return this.sectionsCache;\n    }\n\n    const { data } = await this.fetchJson<SectionRecord[]>('sections.json');\n    this.sectionsCache = data ?? [];\n    return this.sectionsCache;\n  }\n\n  private async getScorer(): Promise<SearchScorer> {\n    if (this.scorer) {\n      return this.scorer;\n    }\n\n    const index = await this.getIndex();\n    const sections = await this.getSections();\n    this.scorer = createSearchScorer(index, sections);\n    return this.scorer;\n  }\n\n  private async getDocData(id: string): Promise<DocData> {\n    const cached = this.docCache.get(id);\n    if (cached) {\n      return cached;\n    }\n\n    const { data } = await this.fetchJson<DocData>(`docs/${id}.json`);\n    if (!data) {\n      throw new Error(`Missing document data for ${id}`);\n    }\n\n    this.docCache.set(id, data);\n    return data;\n  }\n\n  async listItems(args: ListItemsArgs = {}): Promise<IndexItem[]> {\n    const limit = clampLimit(args.limit, 30, 500);\n    const query = args.query ? normalize(args.query) : null;\n    const index = await this.getIndex();\n\n    return index\n      .filter((item) => (args.kind ? item.kind === args.kind : true))\n      .filter((item) => (args.group ? item.group === args.group : true))\n      .filter((item) =>\n        args.category ? normalize(item.category) === normalize(args.category) : true\n      )\n      .filter((item) =>\n        args.package ? normalize(item.package || '') === normalize(args.package) : true\n      )\n      .filter((item) => (query ? item.searchText.includes(query) : true))\n      .slice(0, limit);\n  }\n\n  async findItem(args: GetItemArgs): Promise<IndexItem | null> {\n    const requested = normalize(args.name);\n    const index = await this.getIndex();\n    const candidates = args.kind ? index.filter((item) => item.kind === args.kind) : index;\n\n    return (\n      candidates.find((item) => normalize(item.id) === requested) ||\n      candidates.find((item) => normalize(item.name) === requested) ||\n      candidates.find((item) => normalize(item.name).startsWith(requested)) ||\n      candidates.find((item) => item.searchText.includes(requested)) ||\n      null\n    );\n  }\n\n  /** Names close to a failed lookup, for a helpful error message */\n  async suggestFor(name: string): Promise<string[]> {\n    return suggestNames(await this.getIndex(), name);\n  }\n\n  async search(args: SearchDocsArgs) {\n    const limit = clampLimit(args.limit, 20, 100);\n    const query = args.query.trim();\n\n    if (!query) {\n      return [];\n    }\n\n    const index = await this.getIndex();\n    const sections = await this.getSections();\n    const scorer = await this.getScorer();\n\n    const allowed = index\n      .filter((item) => (args.kind ? item.kind === args.kind : true))\n      .filter((item) =>\n        args.package ? normalize(item.package || '') === normalize(args.package) : true\n      );\n    const allowedIds = new Map(allowed.map((item) => [item.id, item]));\n\n    const sectionHits = sections\n      .filter((section) => allowedIds.has(section.id))\n      .map((section) => ({ section, score: scorer.scoreSection(section, query) }))\n      .filter((entry) => entry.score > 0);\n\n    const pageHits = allowed\n      .map((item) => ({ item, score: scorer.scoreItem(item, query) }))\n      .filter((entry) => entry.score > 0);\n\n    const merged = new Map<string, { item: IndexItem; section?: SectionRecord; score: number }>();\n\n    pageHits.forEach((hit) => {\n      merged.set(hit.item.id, { item: hit.item, score: hit.score });\n    });\n\n    sectionHits.forEach((hit) => {\n      const item = allowedIds.get(hit.section.id)!;\n      const key = `${hit.section.id}#${hit.section.slug}`;\n      merged.set(key, { item, section: hit.section, score: hit.score });\n    });\n\n    return Array.from(merged.values())\n      .sort((a, b) => b.score - a.score)\n      .slice(0, limit)\n      .map((entry) => ({\n        id: entry.item.id,\n        name: entry.item.name,\n        kind: entry.item.kind,\n        package: entry.item.package,\n        route: entry.item.route,\n        docsUrl: entry.item.docsUrl,\n        description: entry.item.description,\n        section: entry.section?.slug,\n        heading: entry.section?.heading,\n        snippet: entry.section?.snippet,\n        score: Number(entry.score.toFixed(2)),\n      }));\n  }\n\n  async getDoc(args: GetItemArgs) {\n    const item = await this.findItem(args);\n    if (!item) {\n      return null;\n    }\n\n    const data = await this.getDocData(item.id);\n\n    if (args.full) {\n      const body = [data.intro, ...data.sections.map((s) => `## ${s.heading}\\n\\n${s.body}`)].join(\n        '\\n\\n'\n      );\n      return { item, mode: 'full' as const, markdown: body };\n    }\n\n    if (args.section) {\n      const requested = normalize(args.section);\n      const section =\n        data.sections.find((s) => s.slug === requested) ||\n        data.sections.find((s) => normalize(s.heading) === requested);\n\n      if (!section) {\n        return {\n          item,\n          mode: 'section-not-found' as const,\n          availableSections: data.sections.map((s) => s.slug),\n        };\n      }\n\n      return { item, mode: 'section' as const, heading: section.heading, markdown: section.body };\n    }\n\n    return {\n      item,\n      mode: 'outline' as const,\n      intro: data.intro,\n      sections: data.sections.map((s) => ({ slug: s.slug, heading: s.heading })),\n      source: data.source,\n      docs: data.docs,\n    };\n  }\n\n  /** The section that most plausibly documents a page's API, when no structured props or signature exist */\n  private findApiSection(sections: DocData['sections']) {\n    return sections.find((s) => /api|return type|overview/i.test(s.heading));\n  }\n\n  async getProps(args: GetItemArgs) {\n    const item = await this.findItem(args);\n    if (!item) {\n      return null;\n    }\n\n    const data = await this.getDocData(item.id);\n\n    if (data.props.length > 0) {\n      return { item, kind: 'props' as const, props: data.props };\n    }\n\n    if (data.signature) {\n      return {\n        item,\n        kind: 'signature' as const,\n        signature: data.signature,\n        exportedTypeNames: data.exportedTypeNames,\n      };\n    }\n\n    const apiSection = this.findApiSection(data.sections);\n\n    return {\n      item,\n      kind: 'sections' as const,\n      message: `${item.name} has no generated props or signature. Use get_item_doc with a section instead.`,\n      suggestedSection: apiSection?.slug,\n      availableSections: data.sections.map((s) => s.slug),\n    };\n  }\n\n  async getApi(symbol: string) {\n    const index = await this.getIndex();\n    const requested = normalize(symbol);\n\n    const candidates = index.filter(\n      (item) => item.hasSignature || item.propsCount > 0 || item.kind === 'hook'\n    );\n\n    const match =\n      candidates.find(\n        (item) => normalize(item.name).replace(/-/g, '') === requested.replace(/-/g, '')\n      ) || candidates.find((item) => item.searchText.includes(requested));\n\n    if (!match) {\n      return null;\n    }\n\n    const data = await this.getDocData(match.id);\n    const hasExportedTypeNames = !!data.exportedTypeNames && data.exportedTypeNames.length > 0;\n\n    if (!data.signature && !hasExportedTypeNames) {\n      const apiSection = this.findApiSection(data.sections);\n\n      return {\n        item: match,\n        signature: data.signature,\n        exportedTypeNames: data.exportedTypeNames,\n        propsCount: data.props.length,\n        suggestedSection: apiSection?.slug,\n        availableSections: data.sections.map((s) => s.slug),\n      };\n    }\n\n    return {\n      item: match,\n      signature: data.signature,\n      exportedTypeNames: data.exportedTypeNames,\n      propsCount: data.props.length,\n    };\n  }\n}\n"],"mappings":";;;AAUA,SAAS,UAAU,OAAuB;CACxC,OAAO,MAAM,KAAK,CAAC,CAAC,YAAY;AAClC;AAEA,SAAS,WAAW,OAA2B,UAAkB,KAAqB;CACpF,IAAI,OAAO,UAAU,YAAY,OAAO,MAAM,KAAK,GACjD,OAAO;CAGT,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,KAAK,MAAM,KAAK,CAAC,CAAC;AACrD;AAEA,MAAM,+BAA+B;;AAGrC,IAAa,uBAAb,MAAkC;CAUhC,YAAY,UAAU,2BAA2B,YAAY,KAAO;EAP3B,KAAA,aAAA;EACN,KAAA,YAAA;EACV,KAAA,iBAAA;EACuB,KAAA,gBAAA;EAC7B,KAAA,2BAAA,IAAI,IAAqB;EACN,KAAA,SAAA;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