mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-03 05:10:13 -05:00
5d4ace337b
* components library management * components library management * fixes * fixes
13 lines
409 B
TypeScript
13 lines
409 B
TypeScript
import { componentsLibrary } from '@plugin/ComponentLibrary';
|
|
|
|
import { PenpotDocument } from '@ui/types';
|
|
|
|
import { transformPageNode } from '.';
|
|
|
|
export const transformDocumentNode = async (node: DocumentNode): Promise<PenpotDocument> => {
|
|
return {
|
|
name: node.name,
|
|
children: await Promise.all(node.children.map(child => transformPageNode(child))),
|
|
components: componentsLibrary.all()
|
|
};
|
|
};
|