2024-04-15 16:30:51 +00:00
|
|
|
import {
|
|
|
|
transformBlend,
|
|
|
|
transformDimensionAndPosition,
|
2024-04-22 14:35:59 +02:00
|
|
|
transformEffects,
|
2024-04-19 12:18:12 +02:00
|
|
|
transformProportion,
|
2024-04-17 15:27:53 +02:00
|
|
|
transformSceneNode,
|
2024-04-29 10:17:08 +02:00
|
|
|
transformStrokes,
|
2024-04-29 15:44:49 +02:00
|
|
|
transformText
|
2024-04-15 16:30:51 +00:00
|
|
|
} from '@plugin/transformers/partials';
|
2024-04-12 16:52:36 +02:00
|
|
|
|
2024-05-06 08:06:14 +02:00
|
|
|
import { TextShape } from '@ui/lib/types/shapes/textShape';
|
2024-04-12 13:55:42 +02:00
|
|
|
|
2024-05-09 16:59:27 +02:00
|
|
|
export const transformTextNode = async (
|
|
|
|
node: TextNode,
|
|
|
|
baseX: number,
|
|
|
|
baseY: number
|
|
|
|
): Promise<TextShape> => {
|
2024-04-12 13:55:42 +02:00
|
|
|
return {
|
|
|
|
type: 'text',
|
|
|
|
name: node.name,
|
2024-05-09 16:59:27 +02:00
|
|
|
...(await transformText(node)),
|
2024-04-15 16:30:51 +00:00
|
|
|
...transformDimensionAndPosition(node, baseX, baseY),
|
2024-04-22 14:35:59 +02:00
|
|
|
...transformEffects(node),
|
2024-04-15 16:30:51 +00:00
|
|
|
...transformSceneNode(node),
|
2024-04-19 12:18:12 +02:00
|
|
|
...transformBlend(node),
|
2024-04-29 10:17:08 +02:00
|
|
|
...transformProportion(node),
|
2024-05-09 16:59:27 +02:00
|
|
|
...(await transformStrokes(node))
|
2024-04-12 13:55:42 +02:00
|
|
|
};
|
|
|
|
};
|