# UILibraryDetector

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/detectors/ui-library-detector.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/detectors/ui-library-detector.ts#L51)

UI Library Detector

## Methods

| Method | Signature | Returns |
|---|---|---|
| `detect` | `detect(entities: Entity[])` | `DetectedUIComponent[]` |
| `getSummary` | `getSummary(components: DetectedUIComponent[])` | `UILibrarySummary[]` |
| `getComponentSummary` | `getComponentSummary(component: DetectedUIComponent)` | `string` |

## Where it refuses work

- `UILibraryDetector` stops the work with an early return when `!tagMatch`, in 2 places.
- `UILibraryDetector` stops the work with an early return when `patterns.importPattern.test(code)`.
- `UILibraryDetector` stops the work with an early return when `/className\s*=\s*["'][^"']*(?:flex|grid|bg-|text-|p-|m-|w-|h-)/.test(code)`.
- `UILibraryDetector` stops the work with an early return when `seen.has(key)`.
