2024-05-27 03:05:23 -05:00
|
|
|
import {
|
|
|
|
transformBlend,
|
|
|
|
transformChildren,
|
2024-06-14 09:28:01 -05:00
|
|
|
transformDimension,
|
2024-05-27 03:05:23 -05:00
|
|
|
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-06-17 02:58:23 -05:00
|
|
|
transformOverrides,
|
2024-05-27 03:05:23 -05:00
|
|
|
transformProportion,
|
2024-06-14 09:28:01 -05:00
|
|
|
transformRotationAndPosition,
|
2024-05-27 03:05:23 -05:00
|
|
|
transformSceneNode,
|
|
|
|
transformStrokes
|
|
|
|
} from '@plugin/transformers/partials';
|
|
|
|
import { translateBoolType } from '@plugin/translators';
|
|
|
|
|
|
|
|
import { BoolShape } from '@ui/lib/types/shapes/boolShape';
|
|
|
|
|
2024-06-19 01:10:20 -05:00
|
|
|
export const transformBooleanNode = async (node: BooleanOperationNode): Promise<BoolShape> => {
|
2024-05-27 03:05:23 -05:00
|
|
|
return {
|
|
|
|
type: 'bool',
|
|
|
|
name: node.name,
|
|
|
|
boolType: translateBoolType(node.booleanOperation),
|
2024-05-30 10:54:37 -05:00
|
|
|
...transformFigmaIds(node),
|
2024-06-19 01:10:20 -05:00
|
|
|
...(await transformChildren(node)),
|
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-06-14 09:28:01 -05:00
|
|
|
...transformDimension(node),
|
2024-06-19 01:10:20 -05:00
|
|
|
...transformRotationAndPosition(node),
|
2024-05-27 03:05:23 -05:00
|
|
|
...transformSceneNode(node),
|
|
|
|
...transformBlend(node),
|
2024-06-14 03:18:34 -05:00
|
|
|
...transformProportion(node),
|
2024-06-17 02:58:23 -05:00
|
|
|
...transformLayoutAttributes(node),
|
|
|
|
...transformOverrides(node)
|
2024-05-27 03:05:23 -05:00
|
|
|
};
|
|
|
|
};
|