@teacss/autocomplete
v0.5.2
Published
TeaCSS suggestion engine — utility-class completions for a partial token or a position in a file.
Readme
@teacss/autocomplete
Completion suggestions for TeaCSS editors and language tools.
createAutocomplete reads completion metadata from a configured generator. It
does not load configuration, define utilities, generate CSS, or implement an
editor protocol.
import { createAutocomplete } from "@teacss/autocomplete";
const autocomplete = createAutocomplete(generator, { matchType: "prefix" });
await autocomplete.suggest("bg-color:r");
await autocomplete.suggestInFile(code, offset);File-aware suggestions support quoted class attributes and valid unquoted HTML
values such as class=p:4.
Results are bounded to 1,000 suggestions and 600,000 characters. Candidate scanning, template concurrency, and caching also have independent limits. Completion output follows the generator's resolved configuration.
Pre-1.0. Used by @teacss/language-service.
