0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-23 06:04:01 -05:00
penpot-exporter-figma-plugin/plugin-src/transformers/transformTextNode.ts
2024-06-19 08:10:20 +02:00

35 lines
905 B
TypeScript

import {
transformBlend,
transformConstraints,
transformDimension,
transformEffects,
transformFigmaIds,
transformLayoutAttributes,
transformOverrides,
transformProportion,
transformRotationAndPosition,
transformSceneNode,
transformStrokes,
transformText
} from '@plugin/transformers/partials';
import { TextShape } from '@ui/lib/types/shapes/textShape';
export const transformTextNode = (node: TextNode): TextShape => {
return {
type: 'text',
name: node.name,
...transformFigmaIds(node),
...transformText(node),
...transformDimension(node),
...transformRotationAndPosition(node),
...transformEffects(node),
...transformSceneNode(node),
...transformBlend(node),
...transformProportion(node),
...transformLayoutAttributes(node),
...transformStrokes(node),
...transformConstraints(node),
...transformOverrides(node)
};
};