2024-05-27 03:05:23 -05:00
|
|
|
import {
|
2024-06-11 03:41:06 -05:00
|
|
|
transformAutoLayoutPosition,
|
2024-05-27 03:05:23 -05:00
|
|
|
transformBlend,
|
|
|
|
transformChildren,
|
|
|
|
transformDimensionAndPosition,
|
|
|
|
transformEffects,
|
2024-05-30 10:54:37 -05:00
|
|
|
transformFigmaIds,
|
2024-05-27 03:05:23 -05:00
|
|
|
transformFills,
|
2024-06-11 02:26:38 -05:00
|
|
|
transformLayoutSizing,
|
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-11 02:26:38 -05:00
|
|
|
...transformProportion(node),
|
2024-06-11 03:41:06 -05:00
|
|
|
...transformLayoutSizing(node),
|
|
|
|
...transformAutoLayoutPosition(node)
|
2024-05-27 03:05:23 -05:00
|
|
|
};
|
|
|
|
};
|