0
Fork 0
mirror of https://github.com/penpot/penpot-plugins.git synced 2025-01-22 22:58:43 -05:00

feat(plugins-runtime): fix types mismatch in runtime

This commit is contained in:
alonso.torres 2024-06-25 15:13:25 +02:00 committed by Alonso Torres
parent 6b94617029
commit 5dc0da98b9

View file

@ -258,18 +258,20 @@ export function createApi(context: PenpotContext, manifest: Manifest): Penpot {
return context.getSelectedShapes(); return context.getSelectedShapes();
}, },
getColors(shapes: PenpotShape[]): (PenpotColor & PenpotColorShapeInfo)[] { shapesColors(
shapes: PenpotShape[]
): (PenpotColor & PenpotColorShapeInfo)[] {
// checkPermission('selection:read'); // checkPermission('selection:read');
return context.getColors(shapes); return context.shapesColors(shapes);
}, },
changeColor( replaceColor(
shapes: PenpotShape[], shapes: PenpotShape[],
oldColor: PenpotColor, oldColor: PenpotColor,
newColor: PenpotColor newColor: PenpotColor
) { ) {
// checkPermission('selection:read'); // checkPermission('selection:read');
return context.changeColor(shapes, oldColor, newColor); return context.replaceColor(shapes, oldColor, newColor);
}, },
getTheme(): PenpotTheme { getTheme(): PenpotTheme {