mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 05:33:02 -05:00
35 lines
905 B
TypeScript
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)
|
|
};
|
|
};
|