1.0.35 • Published 1 year ago
@presenta/figma2pjson v1.0.35
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.29
1 year ago
1.0.28
1 year ago
1.0.27
1 year ago
1.0.33
1 year ago
1.0.32
1 year ago
1.0.31
1 year ago
1.0.30
1 year ago
1.0.35
1 year ago
1.0.34
1 year ago
1.0.19
3 years ago
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.22
3 years ago
1.0.21
3 years ago
1.0.20
3 years ago
1.0.26
3 years ago
1.0.25
3 years ago
1.0.24
3 years ago
1.0.23
3 years ago
1.0.11
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.10
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago