diff --git a/src/ui/converters/createPenpotCircle.ts b/src/ui/converters/createPenpotCircle.ts index dbc2e27..c38be1f 100644 --- a/src/ui/converters/createPenpotCircle.ts +++ b/src/ui/converters/createPenpotCircle.ts @@ -8,6 +8,7 @@ export const createPenpotCircle = ( baseY: number ) => { file.penpotFile.createCircle({ + type: Symbol.for('circle'), name: node.name, x: node.x + baseX, y: node.y + baseY, diff --git a/src/ui/lib/penpot.d.ts b/src/ui/lib/penpot.d.ts index 5ba398f..2e8cb5c 100644 --- a/src/ui/lib/penpot.d.ts +++ b/src/ui/lib/penpot.d.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import { CircleShape } from './types/circle/circleShape'; import { TextShape } from './types/text/textShape'; export interface PenpotFile { @@ -11,7 +12,7 @@ export interface PenpotFile { addGroup(group: any): void; closeGroup(): void; createRect(rect: any): void; - createCircle(circle: any): void; + createCircle(circle: CircleShape): void; createText(options: TextShape): void; createImage(image: any): void; } diff --git a/src/ui/lib/types/circle/circleAttributes.d.ts b/src/ui/lib/types/circle/circleAttributes.d.ts new file mode 100644 index 0000000..dad0c53 --- /dev/null +++ b/src/ui/lib/types/circle/circleAttributes.d.ts @@ -0,0 +1,4 @@ +export type CircleAttributes = { + id?: string; + type: symbol; +}; diff --git a/src/ui/lib/types/circle/circleShape.d.ts b/src/ui/lib/types/circle/circleShape.d.ts new file mode 100644 index 0000000..7e29625 --- /dev/null +++ b/src/ui/lib/types/circle/circleShape.d.ts @@ -0,0 +1,4 @@ +import { Shape } from '../shape'; +import { CircleAttributes } from './circleAttributes'; + +export type CircleShape = Shape & CircleAttributes;