UNPKG

@fylgja/props-builder

Version:

Effortlessly generate Design Tokens (CSS custom properties) from JavaScript objects.

140 lines (83 loc) 3.46 kB
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased ## 2.2.0 - 2026-07-06 ### Added - Support for importing a Google Stitch Markdown design-token export, by setting the input syntax to `stitch`. Only the YAML frontmatter is used, and the `colors` group is renamed to the singular `color` automatically, unless one already exists. - A `stripPrefix` option on `propsBuilder()`, to unwrap props by following a key path and dropping the wrapping keys. - A `rename` option on `propsBuilder()`, to recursively rename keys, aligning them with your own naming convention. See the Usage section in the README for examples of both. ### Changed - Metadata keys are now filtered out during token conversion, so they're never turned into a CSS custom property. - Figma-syntax conversion no longer automatically unwraps every structural group at every nesting level, since this sometimes removed too much in real-world token files. Use the `stripPrefix`/`rename` options to unwrap groups explicitly instead. Two exceptions are still handled automatically: a top-level `other` group, since it's only ever meaningful at the root of the tree, and a redundant nested color group, which some Figma exports produce. - Migrated the test suite from an ad-hoc script runner to Node's built-in test runner. The old example script moved to a clearer, more descriptive filename. ## 2.1.1 - 2026-06-10 ### Added - Support for adding a banner to the props file ## 2.1.0 - 2025-08-21 ### Added - Support for Tailwind v4 selector `@theme`, allowing you to create Tailwind configuration with Design Tokens. - Support for importing Design Tokens as the source, allowing you to create CSS Props with a Design Token file. ## 2.0.1 - 2025-07-19 ### Fixed - Incorrect type output in `design-token` syntax ## 2.0.0 - 2025-03-16 A complete rewrite of the props builder has resulted in a cleaner, more efficient architecture. The argument list has been significantly reduced, and the parser layer has been redesigned for enhanced extensibility. A direct output export option has been added, enabling direct access and modification of the parsed props. ## 1.2.0 - 2024-06-22 ### Changed - default selector to `:where(:root)` ### Fixed - `varPrefix` having no effect on JSON and JS files ## 1.1.0 - 2023-04-29 ### Added - Support for removing the default key from the name output, this enable by default ## 1.0.8 - 2023-04-28 ### Added - Support for array values ## 1.0.7 - 2023-02-20 ### Added - Support for dark mode ## 1.0.5 - 2023-01-02 ### Added - Support for mjs & cjs exports, to make this easier to maintain cjs export options in the Fylgja tokens pkg's, also adds the option for creating exports for postcss-jit-props(https://github.com/GoogleChromeLabs/postcss-jit-props) ### Changed - FileType return checker syntax, for readability - Simplified the build steps in the main file for readability ## 1.0.4 - 2022-10-05 ### Fixed - json types ## 1.0.2 - 2022-08-18 ### Added - Suffix support ## 1.0.1 - 2022-08-15 ### Fixed - use case where the scss escape for `/` is not needed, by adding an option to disable it, use `safeMode: false` ## 1.0.0 - 2022-07-20 Initial Release 🎉