W3C Design Tokens (DTCG) emitter + conformance validator for the design-import IR token set. More...
Go to the source code of this file.
Namespaces | |
| namespace | pulp |
| namespace | pulp::view |
| Hover-cursor tracking for platform window hosts. | |
Functions | |
| std::string | pulp::view::to_w3c_tokens_json (const IRTokens &tokens, bool pretty=true) |
| Serialize design-import tokens to a W3C Design Tokens (DTCG) JSON document. | |
| std::vector< std::string > | pulp::view::validate_dtcg (const std::string &json) |
| Validate a JSON document against the DTCG invariants the emitter targets. | |
W3C Design Tokens (DTCG) emitter + conformance validator for the design-import IR token set.
Serializes IRTokens — the importer's flat name→value maps — into a DTCG-conformant document. Distinct from w3c_tokens.hpp, which converts a runtime Theme and stays always-compiled: this authoring-side emitter depends on design_ir.hpp and lives in the PULP_ENABLE_DESIGN_IMPORT cluster. It preserves the source tool's full token names ("/" group separators nest into DTCG groups), emits the DTCG dimension object form ({"value": N, "unit": "px"}), and carries IRTokens::source_identity provenance under $extensions["dev.pulp.source"].