1.0.26 • Published 1 year ago
@presenta/figma2pjson v1.0.26
Figma Document to PRESENTA JSON converter
Features:
- Texts will be converted as Editable Text Block in PRESENTA, styles will be preserved
- Images will be converted as Editable Image Block in PRESENTA with a placeholder source
- All the graphics/paths will be rendered as Svg Block in PRESENTA
- Frame background color is added as Svg Block
- Masks are supported
- Locked Elements in FIGMA will hide the API Param Preview in FrameAPI Panel
Limitations:
- Only the first PAGE is considered for the conversion
- Only FRAMEs will be parsed
- The first FRAME size will define the document size in PRESENTA, other Figma frames will inherit the first frame size in PRESENTA
- GROUPs will be rendered as SVG, no matter what they contain (this can be exploited, i.e. text as path or image embeded)
- Editable TEXTs need to be in the FRAME root in order to remain editable in PRESENTA
- Editable IMAGEs need to be in the FRAME root in order to remain editable in PRESENTA
- Images from FIGMA will be used from their CDN. They might expire though after a while.
- Custom or local fonts are not converted. You can add it in PRESENTA though.
This function accepts a data config and a template config and return a merged version useful to create a PRESENTA Lib document.
Usage
import { interpolate } from '@presenta/config-interpolator
const data = {
myText: 'Hello'
}
const templateConfig = {
scenes:[{
blocks:[{
type: 'text',
ukey: 'myText',
content: ''
}]
}]
}
const config = await interpolate(data, templateConfig)
/*
const data = {
myText: 'Hello'
}
const templateConfig = {
scenes:[{
blocks:[{
type: 'text',
ukey: 'myText',
content: 'Hello'
}]
}]
}
*/
1.0.19
2 years ago
1.0.18
2 years ago
1.0.17
2 years ago
1.0.16
2 years ago
1.0.22
2 years ago
1.0.21
2 years ago
1.0.20
2 years ago
1.0.26
1 year ago
1.0.25
1 year ago
1.0.24
1 year ago
1.0.23
2 years ago
1.0.11
2 years ago
1.0.15
2 years ago
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.10
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago