From 54bf359bde69cfbe3f48406e7537d7fd3e09ac62 Mon Sep 17 00:00:00 2001 From: Jordi Sala Morales Date: Tue, 23 Apr 2024 10:37:33 +0000 Subject: [PATCH] wip --- manifest.json | 5 ++++- plugin-src/transformers/partials/transformTextStyle.ts | 2 +- ui-src/converters/createPenpotText.ts | 1 - ui-src/index.html | 1 + vite.config.ts | 5 +++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index b17cb318..2c20996d 100644 --- a/manifest.json +++ b/manifest.json @@ -5,6 +5,9 @@ "main": "dist/code.js", "ui": "dist/index.html", "editorType": ["figma"], - "networkAccess": { "allowedDomains": ["https://design.penpot.app"] }, + "networkAccess": { + "allowedDomains": ["https://design.penpot.app"], + "devAllowedDomains": ["http://localhost:5173"] + }, "documentAccess": "dynamic-page" } diff --git a/plugin-src/transformers/partials/transformTextStyle.ts b/plugin-src/transformers/partials/transformTextStyle.ts index 5f794c76..720e4de2 100644 --- a/plugin-src/transformers/partials/transformTextStyle.ts +++ b/plugin-src/transformers/partials/transformTextStyle.ts @@ -29,7 +29,7 @@ export const transformTextStyle = ( // @TODO: translate lineHeight and letterspacing return { fontFamily: segment.fontName.family, - // fontId: `gfont-${slugify(segment.fontName.family.toLowerCase())}`, + fontId: `gfont-${slugify(segment.fontName.family.toLowerCase())}`, fontSize: segment.fontSize.toString(), fontStyle: segment.fontName.style, fontWeight: segment.fontWeight.toString(), diff --git a/ui-src/converters/createPenpotText.ts b/ui-src/converters/createPenpotText.ts index 191a64b5..3c686df6 100644 --- a/ui-src/converters/createPenpotText.ts +++ b/ui-src/converters/createPenpotText.ts @@ -4,7 +4,6 @@ import { TextShape } from '@ui/lib/types/text/textShape'; import { translateUiBlendMode } from '@ui/translators'; export const createPenpotText = (file: PenpotFile, { type, blendMode, ...rest }: TextShape) => { - console.log({ type, blendMode, ...rest }); file.createText({ type: TEXT_TYPE, blendMode: translateUiBlendMode(blendMode), diff --git a/ui-src/index.html b/ui-src/index.html index 23463835..6bb973f9 100644 --- a/ui-src/index.html +++ b/ui-src/index.html @@ -9,6 +9,7 @@
diff --git a/vite.config.ts b/vite.config.ts index 12ab2180..51c6cd0d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,6 +7,11 @@ import tsconfigPaths from 'vite-tsconfig-paths'; export default defineConfig({ root: './ui-src', plugins: [svgr(), react(), viteSingleFile(), tsconfigPaths()], + server: { + proxy: { + '/': 'https://design.penpot.app' + } + }, build: { target: 'esnext', assetsInlineLimit: 100000000,