Releases: tokens-studio/tokenscript-interpreter
Releases · tokens-studio/tokenscript-interpreter
v0.30.0
v0.29.1
Added
- Public schema accessors on managers:
FunctionsManager.getFunctionSchemas()andColorManager.getColorSchemas()expose the registered specification maps, giving consumers access to metadata like descriptions.
What's Changed
Full Changelog: v0.29.0...v0.29.1
v0.29.0
Added
- Opt-in type validation for
resolveValue(): Passtypeandvalidate: trueto validate the resolved value against a registered token type spec, returning validation issues alongside the result. Useful for live preview validation without full CRUD overhead.
What's Changed
Full Changelog: v0.28.0...v0.29.0
v0.28.0
Added
resolveValue()method on TokenResolver: Lightweight expression resolution against the warm cache without cloning or rebuilding the dependency graph. Intended for live preview scenarios (e.g. form inputs) where full CRUD overhead is unnecessary.
Changed
- Graph-based cache seeding for CRUD operations:
rebuildResolver()now uses the dependency graph to seed the reference cache for unaffected tokens, so only the changed token and its dependents are re-resolved from scratch. Improves performance for large token sets during incremental updates.
What's Changed
Full Changelog: v0.27.0...v0.28.0
v0.27.0
Added
- Fault-tolerant parser for editor support: Inline-mode parser that gracefully handles incomplete expressions, enabling real-time syntax highlighting, autocomplete, and live preview
parseTolerantly()/tokenizeTolerantly()for partial input- Partial AST node types for incomplete references, strings, function calls, binary ops, unary ops, and parenthesized expressions
collectAllReferences()/hasPartialNodes()/walkAST()utilities- Trailing dot detection for property/method autocomplete triggers
- Vue tolerant parser demo: Interactive example at
examples/tolerant-parser-vue/with syntax highlighting, reference extraction, and live color preview
Fixed
- Lexer crash on empty string input
- Lexer
peek()returningundefinedinstead ofnullfor out-of-bounds access - Upgraded vitest to v4 to resolve minimatch vulnerability
What's Changed
Full Changelog: v0.26.0...v0.27.0
v0.26.0
What's Changed
Full Changelog: v0.25.0...v0.26.0
v0.25.0
Added
- Constants schema type: New
"constants"schema type for registering named constants (e.g., CSS color names likered→#FF0000). Constants withinline: trueare injected into the symbol table and resolve as bare identifiers during token$valueevaluation, without leaking into function/color/unit scripts. Multiple constants schemas merge, andConfig.clone()isolates them. String values are parsed through the interpreter so"#FF0000"becomes aColorSymbol, numbers stay asNumberSymbol, etc.
What's Changed
Full Changelog: v0.24.0...v0.25.0
v0.24.0
Added
- Time units (
s,ms): Support for seconds and milliseconds in expressions. Use3sfor 3 seconds,500msfor 500 milliseconds. Arithmetic works as expected:3s + 2s→5s.
Fixed
sign()function returns Number: Thesign()function now always returns a plainNumberinstead of preserving the input unit. This matches the mathematical behavior where sign indicates direction (-1, 0, 1), not a measurement.
What's Changed
- refactor: Refactor math tests to use common helpers by @floscr in #109
- fix: sign() function always returns Number symbol by @floscr in #110
- fix: Fix s/ms unit parsing edge-case by @floscr in #111
Full Changelog: v0.23.1...v0.24.0
v0.23.1
Fixed
- Hex color alpha preservation in string output: Colors with alpha now output hex8 format (
#RRGGBBAA) when converted to string, preserving the alpha channel instead of losing it
What's Changed
Full Changelog: v0.23.0...v0.23.1