Setting up your dashboard0 entities found · 6/29 branches scanned
ID:WORK-110Status:done
Add value mapping to modifier config
Extend ModifierConfig with valueMap and mapTarget fields so that modifier values can be declaratively mapped to different data attribute values. This is the smallest SPEC-033 feature and eliminates 2 existing postTransform uses.
ModifierConfig in packages/transform/src/types.ts has valueMap?: Record<string, string> and mapTarget?: string fields
The engine's modifier resolution in packages/transform/src/engine.ts applies valueMap before emitting data attributes — mapped values go to mapTarget (or the same attribute if mapTarget is not set)
Unmapped values pass through unchanged
mergeThemeConfig correctly merges valueMap overrides (theme replaces base valueMap per modifier)
Add valueMap and mapTarget to ModifierConfig in packages/transform/src/types.ts
In the engine's modifier application logic, after resolving the raw value from meta tags, check for valueMap — if present, look up the value and replace it (or pass through if not found)
If mapTarget is set, emit the mapped value as a separate data attribute (e.g., data-checked) in addition to or instead of the original modifier attribute
Update mergeThemeConfig in packages/transform/src/merge.ts to handle valueMap (theme valueMap replaces base, not deep-merged)