2024-05-27 03:05:23 -05:00
|
|
|
import {
|
|
|
|
transformBlend,
|
|
|
|
transformChildren,
|
|
|
|
transformDimensionAndPosition,
|
|
|
|
transformEffects,
|
2024-05-30 10:54:37 -05:00
|
|
|
transformFigmaIds,
|
2024-05-27 03:05:23 -05:00
|
|
|
transformFills,
|
2024-06-14 03:18:34 -05:00
|
|
|
transformLayoutAttributes,
|
2024-05-27 03:05:23 -05:00
|
|
|
transformProportion,
|
|
|
|
transformSceneNode,
|
|
|
|
transformStrokes
|
|
|
|
} from '@plugin/transformers/partials';
|
|
|
|
import { translateBoolType } from '@plugin/translators';
|
|
|
|
|
|
|
|
import { BoolShape } from '@ui/lib/types/shapes/boolShape';
|
|
|
|
|
|
|
|
export const transformBooleanNode = async (
|
|
|
|
node: BooleanOperationNode,
|
|
|
|
baseX: number,
|
|
|
|
baseY: number
|
|
|
|
): Promise<BoolShape> => {
|
|
|
|
return {
|
|
|
|
type: 'bool',
|
|
|
|
name: node.name,
|
|
|
|
boolType: translateBoolType(node.booleanOperation),
|
2024-05-30 10:54:37 -05:00
|
|
|
...transformFigmaIds(node),
|
2024-05-27 03:05:23 -05:00
|
|
|
...(await transformChildren(node, baseX, baseY)),
|
2024-06-05 05:36:49 -05:00
|
|
|
...transformFills(node),
|
2024-05-27 03:05:23 -05:00
|
|
|
...transformEffects(node),
|
2024-06-05 05:36:49 -05:00
|
|
|
...transformStrokes(node),
|
2024-05-27 03:05:23 -05:00
|
|
|
...transformDimensionAndPosition(node, baseX, baseY),
|
|
|
|
...transformSceneNode(node),
|
|
|
|
...transformBlend(node),
|
2024-06-14 03:18:34 -05:00
|
|
|
...transformProportion(node),
|
|
|
|
...transformLayoutAttributes(node)
|
2024-05-27 03:05:23 -05:00
|
|
|
};
|
|
|
|
};
|