import { transformBlend, transformCornerRadius, transformDimensionAndPosition, transformEffects, transformFills, transformProportion, transformSceneNode, transformStrokes } from '@plugin/transformers/partials'; import { transformChildren } from '@plugin/transformers/partials'; import { ComponentShape } from '@ui/lib/types/shapes/componentShape'; export const transformComponentNode = async ( node: ComponentNode, baseX: number, baseY: number ): Promise => { return { type: 'component', name: node.name, path: '', ...(await transformFills(node)), ...transformEffects(node), ...(await transformStrokes(node)), ...transformSceneNode(node), ...transformBlend(node), ...transformProportion(node), ...transformCornerRadius(node), ...(await transformChildren(node, baseX + node.x, baseY + node.y)), ...transformDimensionAndPosition(node, baseX, baseY) }; };