# Flicker v0.1.0 - API Reference

## Modules

- [Flicker.Correction](Flicker.Correction.md): Turning an invalid facet value into an offer to fix it
([Spec 023](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-023-inline-value-correction.md)).
- [Flicker.Dispatch](Flicker.Dispatch.md): Dispatch-policy decisions ([Spec 020](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-020-query-dispatch-policy.md)) —
when a component should actually run a query, and what to render while it
isn't.
- [Flicker.Facet.Cast](Flicker.Facet.Cast.md): Value casting and validation for facets ([Spec 018](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-018-rich-facet-types.md)).
- [Flicker.Facet.Format](Flicker.Facet.Format.md): Display formatting for facet values ([Spec 018](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-018-rich-facet-types.md)) —
the one module allowed to call `Localize.*`.
- [Flicker.Facet.Preset](Flicker.Facet.Preset.md): A semantic date preset — `last-30-days`, `this-quarter`, `all-time`
([Spec 018](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-018-rich-facet-types.md)).
- [Flicker.Facet.Range](Flicker.Facet.Range.md): The cast value of every range-typed facet ([Spec 018](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-018-rich-facet-types.md)) —
`created:2026-06-01..2026-06-30`, `price:10..50`, `created:last-30-days`.
- [Flicker.FacetEditor](Flicker.FacetEditor.md): The contract every rich facet editor implements
([Spec 019](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-019-facet-editors.md)).
- [Flicker.FacetEditor.Calendar](Flicker.FacetEditor.Calendar.md): The date and date-range editor ([Spec 019](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-019-facet-editors.md)):
a presets rail beside one or two month grids, with a footer carrying the draft
state.
- [Flicker.FacetEditor.Dial](Flicker.FacetEditor.Dial.md): The numeric and duration editor ([Spec 019](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-019-facet-editors.md)):
a dual-thumb slider when the facet is bounded, paired numeric inputs either
way.
- [Flicker.FacetEditor.Set](Flicker.FacetEditor.Set.md): The editor for a facet whose values come from a set — an `:enum`'s closed
picklist, or a relationship's related records
([Spec 019](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-019-facet-editors.md)).
- [Flicker.FacetEditor.Switch](Flicker.FacetEditor.Switch.md): The boolean editor ([Spec 019](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-019-facet-editors.md)) —
and the one editor with no pop-out.
- [Flicker.Providers.Routes](Flicker.Providers.Routes.md): A `Flicker.Provider` that derives navigable destinations from a host's own
`Phoenix.Router` ([Spec 011](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-011-router-navigation-provider.md)).
- [Flicker.Query.Invalid](Flicker.Query.Invalid.md): A facet token whose key and operator were both recognised but whose value
would not cast ([ADR-012](https://github.com/team-alembic/flicker/blob/main/docs/adrs/adr-012-parse-reports-invalid-facet-tokens.md)).
- [Flicker.RecentValues](Flicker.RecentValues.md): Recently-used facet values, ranked by frecency
([Spec 022](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-022-recently-used-values.md)).
- [Flicker.RecentValues.Ets](Flicker.RecentValues.Ets.md): A **dev/test-only** in-memory `Flicker.RecentValues` store
([Spec 022](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-022-recently-used-values.md)).
- [Flicker.Trigger](Flicker.Trigger.md): The facet-entry trigger character ([Spec 024](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-024-facet-trigger-character.md)) —
parsing and validating the `facet_trigger` attr, and answering "does this
token open the facet menu, and for which facets".

- Public API
  - [Flicker](Flicker.md): Flicker is an Ash-native searchable select / combobox / faceted-search
library for Phoenix LiveView.
  - [Flicker.Facet](Flicker.Facet.md): A facet definition for faceted search ([Spec 003](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-003-faceted-search.md)).
  - [Flicker.Messages](Flicker.Messages.md): The behaviour every user-facing Flicker string routes through (ADR-009).
  - [Flicker.Provider](Flicker.Provider.md): The behaviour every Flicker data source implements.
  - [Flicker.Query](Flicker.Query.md): A search request passed to `c:Flicker.Provider.search/2`, and the result
of parsing faceted-search input ([Spec 003](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-003-faceted-search.md)).
  - [Flicker.Result](Flicker.Result.md): A single searchable/selectable option, as returned by a `Flicker.Provider`.
  - [Flicker.Theme](Flicker.Theme.md): A class-per-part theme map for the select component (ADR-002).

- Providers
  - [Flicker.Providers.AshResource](Flicker.Providers.AshResource.md): The built-in `Flicker.Provider` that Tier 1 declarative component config
compiles to (ADR-001) — searching and fetching directly off an Ash
resource, with no provider module of your own to write.
  - [Flicker.Providers.Static](Flicker.Providers.Static.md): A small in-memory `Flicker.Provider` backed by a fixed list of results.

- Integrations
  - [Flicker.AshPhoenixForm](Flicker.AshPhoenixForm.md): An optional `AshPhoenix.Form` adapter for form-field mode (ADR-005).
  - [Flicker.Integrations.Cinder](Flicker.Integrations.Cinder.md): The optional Level 2 adapter from [Spec 009](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-009-cinder-interop.md):
removes the `Flicker.search/1` + `Cinder.collection/1` boilerplate
[Level 1](https://github.com/team-alembic/flicker/blob/main/guides/cinder-integration.md)
leaves to the host, and coordinates URL state between the two
libraries.

- Testing
  - [Flicker.Test](Flicker.Test.md): A `PhoenixTest` helper for driving `Flicker.select/1` the way a user
would: open the picker, type to filter, pick a result.

- Component internals
  - [Flicker.Components.Palette](Flicker.Components.Palette.md): The internal `Phoenix.LiveComponent` behind `Flicker.palette/1`
([Spec 008](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-008-command-palette.md)).
  - [Flicker.Components.Search](Flicker.Components.Search.md): The internal `Phoenix.LiveComponent` behind `Flicker.search/1`
([Spec 003](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-003-faceted-search.md)).
  - [Flicker.Components.Select](Flicker.Components.Select.md): The internal `Phoenix.LiveComponent` behind `Flicker.select/1`.
  - [Flicker.CursorContext](Flicker.CursorContext.md): The cursor-context state machine ([Spec 003](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-003-faceted-search.md)) — a pure function that,
given typed input, a cursor position, and the active facet registry, says
what the user is typing *right now*: a facet key, a facet value, or free
text. The dropdown reads this to pick its result source (key suggestions,
a facet's value picklist / nested search, or plain free-text handling)
and its keyboard behaviour, without needing a browser to test any of it.
  - [Flicker.FacetSuggest](Flicker.FacetSuggest.md): Shared facet-suggestion machinery ([Spec 003](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-003-faceted-search.md)) —
the pure functions both `Flicker.search/1` and the `facets` attr on
`Flicker.select/1` call to turn a `Flicker.CursorContext` classification
into a suggestion list, and to splice a chosen suggestion back into the
typed text.
  - [Flicker.Keyboard](Flicker.Keyboard.md): Server-side chord parsing/validation for `activate_with_keyboard`
(Spec 006).
  - [Flicker.Messages.English](Flicker.Messages.English.md): The complete default `Flicker.Messages` implementation, and the canonical
list of every message key the select component uses.

## Mix Tasks

- Mix tasks
  - [mix flicker.install](Mix.Tasks.Flicker.Install.md): Installs Flicker into a Phoenix app.

