2024-04-15 07:06:38 -05:00
|
|
|
import { transformChildren } from '@plugin/transformers/partials';
|
2024-05-13 10:04:13 -05:00
|
|
|
import { translatePageFill } from '@plugin/translators/fills';
|
2024-04-12 09:52:36 -05:00
|
|
|
|
2024-04-15 07:06:38 -05:00
|
|
|
import { PenpotPage } from '@ui/lib/types/penpotPage';
|
2024-04-12 06:55:42 -05:00
|
|
|
|
|
|
|
export const transformPageNode = async (node: PageNode): Promise<PenpotPage> => {
|
|
|
|
return {
|
|
|
|
name: node.name,
|
2024-04-22 03:52:25 -05:00
|
|
|
options: {
|
|
|
|
background: node.backgrounds.length ? translatePageFill(node.backgrounds[0]) : undefined
|
|
|
|
},
|
2024-04-15 07:06:38 -05:00
|
|
|
...(await transformChildren(node))
|
2024-04-12 06:55:42 -05:00
|
|
|
};
|
|
|
|
};
|