From 4aed934b376266b874fa7b1020a9ef842096af66 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 4 Sep 2024 09:14:27 +0200 Subject: [PATCH] refactor(poc-state-plugin): adapt to type refactor --- apps/poc-state-plugin/src/app/app.component.ts | 6 +++--- apps/poc-state-plugin/src/plugin.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/poc-state-plugin/src/app/app.component.ts b/apps/poc-state-plugin/src/app/app.component.ts index ef33398..2e9bc85 100644 --- a/apps/poc-state-plugin/src/app/app.component.ts +++ b/apps/poc-state-plugin/src/app/app.component.ts @@ -1,6 +1,6 @@ import { Component, effect, signal } from '@angular/core'; import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; -import type { PenpotShape } from '@penpot/plugin-types'; +import type { Shape } from '@penpot/plugin-types'; @Component({ standalone: true, @@ -113,7 +113,7 @@ export class AppComponent { #pageId: null | string = null; #fileId = null; #revn = 0; - #selection = signal([]); + #selection = signal([]); form = new FormGroup({ name: new FormControl(''), @@ -245,7 +245,7 @@ export class AppComponent { this.projectName.set(name || 'Unknown'); } - #refreshSelection(selection: PenpotShape[]) { + #refreshSelection(selection: Shape[]) { this.#selection.set(selection); if (selection && selection.length > 0) { this.form.get('name')?.setValue(this.#selection()[0].name); diff --git a/apps/poc-state-plugin/src/plugin.ts b/apps/poc-state-plugin/src/plugin.ts index abccc61..8e66188 100644 --- a/apps/poc-state-plugin/src/plugin.ts +++ b/apps/poc-state-plugin/src/plugin.ts @@ -221,7 +221,7 @@ function addIcon() { } function createGrid() { - const frame = penpot.createFrame(); + const frame = penpot.createBoard(); frame.name = 'Frame Grid'; const viewport = penpot.viewport; @@ -263,7 +263,7 @@ function createGrid() { } function createColors() { - const frame = penpot.createFrame(); + const frame = penpot.createBoard(); frame.name = 'Palette'; const viewport = penpot.viewport; @@ -337,7 +337,7 @@ function createColors() { return; } - const board = penpot.createFrame(); + const board = penpot.createBoard(); grid.appendChild(board, row + 1, col + 1); board.fills = [color.asFill()]; board.strokes = [