import { RawValueSignature } from '@specifyapp/specify-design-token-format'; import { sizeToStyleDictionary } from './size.js'; import { colorToStyleDictionary } from './color.js'; export const shadowToStyleDictionary = (shadow: RawValueSignature<'shadow'>) => { return { type: shadow.type.unwrapValue(), offsetX: shadow.offsetX .resolveDeepValue() .mapPrimitiveValue(sizeToStyleDictionary) .unwrapValue(), offsetY: shadow.offsetY .resolveDeepValue() .mapPrimitiveValue(sizeToStyleDictionary) .unwrapValue(), blurRadius: shadow.blurRadius .resolveDeepValue() .mapPrimitiveValue(sizeToStyleDictionary) .unwrapValue(), spreadRadius: shadow.spreadRadius .resolveDeepValue() .mapPrimitiveValue(sizeToStyleDictionary) .unwrapValue(), color: shadow.color.resolveDeepValue().mapPrimitiveValue(colorToStyleDictionary).unwrapValue(), }; };