mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 05:33:02 -05:00
add artboard shape
This commit is contained in:
parent
7383d87125
commit
3646113b00
4 changed files with 20 additions and 3 deletions
|
@ -9,6 +9,7 @@ export const createPenpotBoard = (
|
|||
baseY: number
|
||||
) => {
|
||||
file.penpotFile.addArtboard({
|
||||
type: Symbol.for('frame'),
|
||||
name: node.name,
|
||||
x: node.x + baseX,
|
||||
y: node.y + baseY,
|
||||
|
|
7
src/ui/lib/penpot.d.ts
vendored
7
src/ui/lib/penpot.d.ts
vendored
|
@ -1,4 +1,5 @@
|
|||
import { CircleShape } from './types/circle/circleShape';
|
||||
import { FrameShape } from './types/frame/frameShape';
|
||||
import { GroupShape } from './types/group/groupShape';
|
||||
import { ImageShape } from './types/image/imageShape';
|
||||
import { RectShape } from './types/rect/rectShape';
|
||||
|
@ -8,10 +9,10 @@ export interface PenpotFile {
|
|||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
asMap(): any;
|
||||
export(): void;
|
||||
addPage(name: string, options?: object): void;
|
||||
closePage(): void;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
addArtboard(artboard: any): void;
|
||||
addPage(name: string, options?: any): void;
|
||||
closePage(): void;
|
||||
addArtboard(artboard: FrameShape): void;
|
||||
closeArtboard(): void;
|
||||
addGroup(group: GroupShape): void;
|
||||
closeGroup(): void;
|
||||
|
|
11
src/ui/lib/types/frame/frameAttributes.d.ts
vendored
Normal file
11
src/ui/lib/types/frame/frameAttributes.d.ts
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
export type FrameAttributes = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
id?: any;
|
||||
type: symbol;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
shapes?: any[];
|
||||
fileThumbnail?: boolean;
|
||||
hideFillOnExport?: boolean;
|
||||
showContent?: boolean;
|
||||
hideInViewer?: boolean;
|
||||
};
|
4
src/ui/lib/types/frame/frameShape.d.ts
vendored
Normal file
4
src/ui/lib/types/frame/frameShape.d.ts
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { Shape } from '../shape';
|
||||
import { FrameAttributes } from './frameAttributes';
|
||||
|
||||
export type FrameShape = Shape & FrameAttributes;
|
Loading…
Reference in a new issue