detectionMethod property in TrackMdRequestParams type causes TypeScript compilation failure.
This commit fixes the issue reported at lib/md-tracking.ts:24 **Bug explanation:** The `trackMdRequest` function in `lib/md-tracking.ts` destructures `detectionMethod` from its parameter (line 24) and includes it in the JSON body (line 39), but the `TrackMdRequestParams` type definition (lines 5-11) does not include a `detectionMethod` property. This causes a TypeScript compilation error: `Property 'detectionMethod' does not exist on type 'TrackMdRequestParams'`, which is confirmed by the Vercel build logs. The property is used in `proxy.ts` at line 81 where `trackMdRequest` is called with `detectionMethod: agentResult.method`, where `agentResult` is of type `DetectionResult` from `lib/ai-agent-detection.ts`, and its `method` property is typed as `DetectionMethod | null`. **Fix explanation:** Added `detectionMethod?: DetectionMethod | null` as an optional property to the `TrackMdRequestParams` type, along with an import of `DetectionMethod` from `@/lib/ai-agent-detection`. The property is optional because most call sites (llms.txt tracking, .md URL tracking, header-negotiated tracking) don't provide it — only the agent-rewrite call site does. The type `DetectionMethod | null` matches `agentResult.method`'s type exactly. Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: molebox <hello@richardhaines.dev>
components.build
An open-source standard for building modern, composable, and accessible UI components.
About
components.build is a formal specification that establishes best practices and guidelines for building open-source UI components for the modern web. Co-authored by Hayden Bleasel and shadcn, this specification aims to help open-source maintainers and senior front-end engineers create components that are:
- Composable - Built with composition over inheritance, easily combined to create complex UIs
- Accessible - WCAG-compliant with proper ARIA attributes and keyboard navigation
- Customizable - Easy to theme and style for any design system
- Performant - Lightweight with minimal dependencies
- Transparent - Full code visibility and ownership
- Well-documented - Clear examples and developer-friendly
While examples use React/TypeScript, the core principles are framework-agnostic and applicable to Vue, Svelte, Angular, and other modern frameworks.
Contributing
Contributions are welcome! This specification is informed by the open-source community and real-world component libraries.
To contribute, please read the contributing guide.
License
This project is open source and available under the MIT License.