Skip to content

Library API: composable matched_tokens() + generate_from_tokens() #31

@goulvenclech

Description

@goulvenclech

Expose two composable library functions for framework integration:

  • matched_tokens(sources, engine) → Vec<&str> — extract tokens from source content, filter to those that resolve against the engine, deduplicate, sort. No CSS generated.
  • generate_from_tokens(tokens, engine) → String — take a token list and produce the final CSS string.

Frameworks call them sequentially and can stop after the first to hash the token list for cache invalidation, without paying the cost of CSS formatting.

Depends on #30.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions