Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed Apr 23, 2024
1 parent 2bd914a commit 54bf359
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion plugin-src/transformers/partials/transformTextStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
1 change: 0 additions & 1 deletion ui-src/converters/createPenpotText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions ui-src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<div id="root"></div>
<script>
window.penpotPublicURI = 'https://design.penpot.app';
window.penpotVersion = '2.0.0-13062-gc97f2d620';
</script>
<script type="module" src="./main.tsx"></script>
</body>
Expand Down
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 54bf359

Please sign in to comment.