0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00
penpot-exporter-figma-plugin/plugin-src/transformers/transformPathNode.ts
Alex Sánchez 4591369e3c
Instances Overrides (#166)
* wip

* added support for overrides

* fixes
2024-06-17 09:58:23 +02:00

36 lines
936 B
TypeScript

import {
transformBlend,
transformConstraints,
transformEffects,
transformFigmaIds,
transformFills,
transformLayoutAttributes,
transformOverrides,
transformProportion,
transformSceneNode,
transformStrokes
} from '@plugin/transformers/partials';
import { translatePathNode } from '@plugin/translators/vectors';
import { PathShape } from '@ui/lib/types/shapes/pathShape';
export const transformPathNode = (
node: StarNode | PolygonNode,
baseRotation: number
): PathShape => {
return {
type: 'path',
name: node.name,
content: translatePathNode(node, baseRotation),
...transformFigmaIds(node),
...transformFills(node),
...transformStrokes(node),
...transformEffects(node),
...transformSceneNode(node),
...transformBlend(node),
...transformProportion(node),
...transformLayoutAttributes(node),
...transformConstraints(node),
...transformOverrides(node)
};
};