The headless components for Svelte.
This report summarizes scanner evidence for huntabyte/bits-ui, a TypeScript project with 3,642 GitHub stars. SynthScan examined 147,417 lines of code across 1403 source files, recording 115 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 1.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 87 finding(s).
Are imports declared and package/API names verified? 28 finding(s).
Are wrappers, guards, and repeated structures necessary? 46 finding(s).
Which changes need focused human review? 115 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 115 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …kages/bits-ui/src/lib/bits/calendar/calendar.svelte.ts | 1045 | const date = this.root.opts.placeholder.current.set({ month }); | CODE |
| CRITICAL | …kages/bits-ui/src/lib/bits/calendar/calendar.svelte.ts | 1086 | this.root.opts.placeholder.current = this.root.opts.placeholder.current.set({ month }); | CODE |
| CRITICAL | …kages/bits-ui/src/lib/bits/calendar/calendar.svelte.ts | 1143 | const date = this.root.opts.placeholder.current.set({ year }); | CODE |
| CRITICAL | …kages/bits-ui/src/lib/bits/calendar/calendar.svelte.ts | 1182 | this.root.opts.placeholder.current = this.root.opts.placeholder.current.set({ year }); | CODE |
| CRITICAL | …src/lib/bits/navigation-menu/navigation-menu.svelte.ts | 651 | this.context.item.listContext.rovingFocusGroup.handleKeydown(this.opts.ref.current, e); | CODE |
| CRITICAL | …kages/bits-ui/src/lib/bits/checkbox/checkbox.svelte.ts | 276 | this.root.group.opts.value.current.includes(this.root.opts.value.current) | CODE |
| CRITICAL | …kages/bits-ui/src/lib/bits/checkbox/checkbox.svelte.ts | 291 | this.root.opts.ref.current.focus(); | CODE |
| CRITICAL | …ts-ui/src/lib/bits/rating-group/rating-group.svelte.ts | 354 | this.root.opts.ref.current.focus(); | CODE |
| CRITICAL | …ts-ui/src/lib/bits/rating-group/rating-group.svelte.ts | 364 | this.root.opts.ref.current.focus(); | CODE |
| CRITICAL | packages/bits-ui/src/lib/bits/menu/menu.svelte.ts | 1316 | this.item.content.parentMenu.root.opts.onClose(); | CODE |
| CRITICAL | packages/bits-ui/src/lib/bits/command/command.svelte.ts | 1231 | return this.root._commandState.filtered.groups.has(this.trueValue); | CODE |
| CRITICAL | packages/bits-ui/src/lib/bits/command/command.svelte.ts | 1435 | const currentScore = this.root.commandState.filtered.items.get(this.trueValue); | CODE |
| CRITICAL | packages/bits-ui/src/lib/bits/command/command.svelte.ts | 1468 | this.trueValue = this.opts.ref.current.textContent.trim(); | CODE |
| CRITICAL | packages/bits-ui/src/lib/bits/select/select.svelte.ts | 509 | ? this.root.opts.value.current.map((value) => ({ | CODE |
| CRITICAL | packages/bits-ui/src/lib/bits/select/select.svelte.ts | 842 | const matchedItem = this.root.opts.items.current.find( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/src/tests/browser-utils.ts | 20 | export function getPointerLeaveTowardSubmenuClientCoords( | CODE |
| LOW | tests/src/tests/browser-utils.ts | 39 | export function getPointerMidpointTowardSubmenuClientCoords( | CODE |
| LOW | tests/src/tests/browser-utils.ts | 58 | export function getPointerAwayFromSubmenuIntentClientCoords( | CODE |
| LOW | tests/src/tests/browser-utils.ts | 110 | export async function focusAndExpectToHaveFocus(loc: Locator) { | CODE |
| LOW | tests/src/tests/browser-utils.ts | 188 | export function bodyPointerEventsOnRemoval(node: Element): Promise<string> { | CODE |
| LOW | …s/dismissible-layer/registration-lifecycle-test.svelte | 12 | function rerenderDuringOutsidePointerdown() { | CODE |
| LOW | tests/src/tests/accordion/accordion.browser.test.ts | 755 | function setupMultipleHiddenUntilFound( | CODE |
| LOW | …xt-selection-layer/prevented-pointerup.browser.test.ts | 18 | async function pressWithPreventedPointerup() { | CODE |
| LOW | tests/src/tests/dialog/dialog.browser.test.ts | 862 | function installDerivedInertCounter() { | CODE |
| LOW | tests/src/tests/select/select.browser.test.ts | 151 | function setupValueChildrenMultiple( | CODE |
| LOW | tests/src/tests/select/select.browser.test.ts | 1570 | async function expectTriggerControlsListbox( | CODE |
| LOW | docs/mdsx.config.js | 105 | function remarkRemovePrettierIgnore() { | CODE |
| LOW | docs/mdsx.config.js | 202 | function transformComponentSourceContent(src = "") { | CODE |
| LOW | docs/mdsx.config.js | 206 | function getComponentSourceFileContent(src = "") { | CODE |
| LOW | docs/other/build-llms-txt.ts | 79 | function remarkDecodeTableEntities() { | CODE |
| LOW | docs/src/lib/content/utils.ts | 115 | export function defineComponentPropSchema(_opts: DefineComponentPropOpts) { | CODE |
| LOW | docs/src/lib/content/utils.ts | 307 | export function stringDefinitionFromMarkdown(raw: string): string { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 305 | export function createCalendarGridBodySchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 329 | export function createCalendarGridHeadSchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 353 | export function createCalendarGridRowSchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 377 | export function createCalendarHeadCellSchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 401 | export function createCalendarHeaderSchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 425 | export function createCalendarHeadingSchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 449 | export function createCalendarNextButtonSchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 470 | export function createCalendarPrevButtonSchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 491 | export function createCalendarMonthSelectSchema(isRange: boolean) { | CODE |
| LOW | docs/src/lib/content/api-reference/calendar.api.ts | 542 | export function createCalendarYearSelectSchema(isRange: boolean) { | CODE |
| LOW | packages/bits-ui/src/lib/internal/focus.ts | 10 | export function handleCalendarInitialFocus(calendar: HTMLElement) { | CODE |
| LOW | …es/bits-ui/src/lib/internal/body-scroll-lock.svelte.ts | 118 | function scheduleCleanupIfNoNewLocks(delay: number | null, callback: () => void) { | CODE |
| LOW | …es/bits-ui/src/lib/internal/body-scroll-lock.svelte.ts | 154 | function ensureInitialStyleCaptured() { | CODE |
| LOW | …/src/lib/internal/date-time/calendar-helpers.svelte.ts | 213 | export function setPlaceholderToNodeValue(node: HTMLElement, placeholder: WritableBox<DateValue>) { | CODE |
| LOW | …/src/lib/internal/date-time/calendar-helpers.svelte.ts | 650 | export function useMonthViewPlaceholderSync({ | CODE |
| LOW | …/src/lib/internal/date-time/calendar-helpers.svelte.ts | 817 | export function getFirstNonDisabledDateInView(calendarRef: HTMLElement): DateValue | undefined { | CODE |
| LOW | …/src/lib/internal/date-time/calendar-helpers.svelte.ts | 852 | export function useEnsureNonDisabledPlaceholder({ | CODE |
| LOW | …ts-ui/src/lib/internal/date-time/field/time-helpers.ts | 218 | export function isEditableTimeSegmentPart(part: unknown): part is EditableTimeSegmentPart { | CODE |
| LOW | …ts-ui/src/lib/internal/date-time/field/time-helpers.ts | 341 | export function removeTimeDescriptionElement(id: string, doc: Document) { | CODE |
| LOW | …ts-ui/src/lib/internal/date-time/field/time-helpers.ts | 348 | export function convertTimeValueToDateValue(time: TimeValue): CalendarDateTime | ZonedDateTime { | CODE |
| LOW | …s/bits-ui/src/lib/internal/date-time/field/segments.ts | 26 | export function handleTimeSegmentNavigation(e: KeyboardEvent, fieldNode: HTMLElement | null) { | CODE |
| LOW | …/lib/internal/floating-svelte/floating-utils.svelte.ts | 20 | export function getFloatingContentCSSVars(name: string) { | CODE |
| LOW | …ties/dismissible-layer/use-dismissable-layer.svelte.ts | 283 | export function getTopMostDismissableLayer( | CODE |
| LOW | …ext-selection-layer/use-text-selection-layer.svelte.ts | 124 | function preventTextSelectionOverflow(node: HTMLElement, body: HTMLElement) { | CODE |
| LOW | …/utilities/floating-layer/use-floating-layer.svelte.ts | 366 | function getSideAndAlignFromPlacement(placement: Placement) { | CODE |
| LOW | …bits-ui/src/lib/bits/scroll-area/scroll-area.svelte.ts | 996 | function getScrollPositionFromPointer({ | CODE |
| LOW | …bits-ui/src/lib/bits/scroll-area/scroll-area.svelte.ts | 1048 | function isScrollingWithinScrollbarBounds(scrollPos: number, maxScrollPos: number) { | CODE |
| LOW | …bits-ui/src/lib/bits/scroll-area/scroll-area.svelte.ts | 1052 | function addUnlinkedScrollListener(node: HTMLElement, handler: () => void) { | CODE |
| LOW | packages/bits-ui/src/lib/bits/command/utils.ts | 19 | export function findFirstStartMarkerWithImmediateSiblingAsEnd(el: Element, type: "item" | "group") { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/other/setup-browser-test.ts | 1 | /// <reference types="@vitest/browser/matchers" /> | COMMENT |
| LOW | packages/bits-ui/src/lib/internal/attrs.test.ts | 1 | import { describe, it, expect } from "vitest"; | COMMENT |
| LOW | packages/bits-ui/src/lib/internal/attrs.test.ts | 21 | // expect(getDataChecked(false)).toBe("unchecked"); | COMMENT |
| LOW | packages/bits-ui/src/lib/internal/attrs.test.ts | 41 | COMMENT | |
| LOW | packages/bits-ui/src/lib/internal/attrs.test.ts | 61 | COMMENT | |
| LOW | packages/bits-ui/src/lib/internal/attrs.test.ts | 81 | COMMENT | |
| LOW | packages/bits-ui/src/lib/internal/attrs.test.ts | 101 | // expect(getDisabled(true)).toBe(true); | COMMENT |
| LOW | packages/bits-ui/src/lib/internal/attrs.test.ts | 121 | // it("returns 'true' when condition is true", () => { | COMMENT |
| LOW | packages/bits-ui/src/lib/internal/attrs.test.ts | 141 | // it("returns 'false' when checked is false and indeterminate is false", () => { | COMMENT |
| LOW | …ext-selection-layer/use-text-selection-layer.svelte.ts | 81 | // meant `composeHandlers` bailed out of the whole chain on a `pointerup` that | COMMENT |
| LOW | packages/bits-ui/src/lib/bits/menu/menu.svelte.ts | 261 | COMMENT | |
| LOW | …/bits-ui/src/lib/bits/command/compute-command-score.ts | 1 | // oxlint-disable ban-ts-comment | COMMENT |
| LOW | …/bits-ui/src/lib/bits/command/compute-command-score.ts | 21 | const SCORE_TRANSPOSITION = 0.1; | COMMENT |
| LOW | .github/workflows/update-bundle-baseline.yml | 1 | # name: Update Bundle Baseline | COMMENT |
| LOW | .github/workflows/update-bundle-baseline.yml | 21 | # contents: write | COMMENT |
| LOW | .github/workflows/update-bundle-baseline.yml | 41 | COMMENT | |
| LOW | .github/workflows/update-bundle-baseline.yml | 61 | # else | COMMENT |
| LOW | .github/workflows/update-bundle-baseline.yml | 81 | # echo "changed=true" >> $GITHUB_OUTPUT | COMMENT |
| LOW | .github/workflows/update-bundle-baseline.yml | 101 | # echo "" >> bundle-summary.md | COMMENT |
| LOW | .github/workflows/update-bundle-baseline.yml | 121 | COMMENT | |
| LOW | .github/workflows/bundle-analysis.yml | 1 | # name: Bundle Analysis | COMMENT |
| LOW | .github/workflows/bundle-analysis.yml | 21 | # pull-requests: write | COMMENT |
| LOW | .github/workflows/bundle-analysis.yml | 41 | COMMENT | |
| LOW | .github/workflows/bundle-analysis.yml | 61 | # fi | COMMENT |
| LOW | .github/workflows/bundle-analysis.yml | 81 | # git checkout ${{ github.head_ref }} | COMMENT |
| LOW | .github/workflows/bundle-analysis.yml | 101 | # with: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| MEDIUM⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| MEDIUM⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| MEDIUM⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| MEDIUM⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| LOW⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| MEDIUM⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …sts/accordion/accordion-hidden-until-found-test.svelte | 38 | search functionality. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | CODE |
| LOW | …sts/accordion/accordion-hidden-until-found-test.svelte | 38 | search functionality. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | CODE |
| LOW | …cordion/accordion-multi-hidden-until-found-test.svelte | 38 | search functionality. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | CODE |
| LOW | …cordion/accordion-multi-hidden-until-found-test.svelte | 38 | search functionality. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | CODE |
| LOW | tests/src/tests/scroll-area/scroll-area-test.svelte | 49 | Lorem ipsum dolor sit, amet consectetur adipisicing elit. Dignissimos impedit rem, | CODE |
| LOW | tests/src/tests/scroll-area/scroll-area-test.svelte | 51 | eveniet incidunt! Deserunt minus laborum accusamus iusto dolorum. Lorem ipsum dolor | CODE |
| LOW | …collapsible/collapsible-hidden-until-found-test.svelte | 20 | functionality. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | CODE |
| LOW | …collapsible/collapsible-hidden-until-found-test.svelte | 20 | functionality. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | CODE |
| LOW | docs/src/lib/content/api-reference/select.api.ts | 276 | name: "placeholder", | CODE |
| LOW | docs/src/lib/content/api-reference/select.api.ts | 319 | name: "placeholder", | CODE |
| LOW | …rc/lib/components/demos/scroll-area-demo-custom.svelte | 56 | Lorem ipsum dolor sit, amet consectetur adipisicing elit. Dignissimos impedit | CODE |
| LOW | docs/src/lib/components/demos/scroll-area-demo.svelte | 13 | Lorem ipsum dolor sit, amet consectetur adipisicing elit. Dignissimos impedit rem, | CODE |
| LOW | docs/src/lib/components/demos/scroll-area-demo.svelte | 15 | incidunt! Deserunt minus laborum accusamus iusto dolorum. Lorem ipsum dolor sit, amet | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| MEDIUM⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| LOW | …tilities/is-using-keyboard/is-using-keyboard.svelte.ts | 52 | // Don't forget to spread and call twice. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | docs/src/routes/api/search.json/search.json | 1 | [{"title":"Accordion","content":" import { APISection, ComponentPreview, AccordionDemo, AccordionDemoTransitions, Accor | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | .github/workflows/update-bundle-baseline.yml | 48 | # # Check if latest.json was generated | COMMENT |
| LOW⚡ | .github/workflows/update-bundle-baseline.yml | 55 | # # Check if latest.json exists in git (committed) | COMMENT |
| LOW⚡ | .github/workflows/update-bundle-baseline.yml | 62 | # # Check if only timestamp changed | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/bits-ui/src/lib/bits/select/select.svelte.ts | 1244 | // onPlaced is also called when the menu is closed, so we need to check if the menu | COMMENT |