import { SKLayer , Component } from './types' ; import parseDSL from './parseDSL' ; import parseArtboardLayer from './parseArtboard' ; import handleClassName from './handleClassName' ; import operationLayout from './operationLayout' ; import picassoGroup from '../../picasso-group/src' ; import picassoLayout from '../../picasso-layout/src' ; description param { SKLayer } layer returns { Promise < DSL > } export const picassoArtboardMeatureParse = ( layer ) : Component => { layer = parseArtboardLayer ( layer , 'measure' ) ; const DSL = parseDSL ( [ layer ] , 'measure' ) ; return DSL [ 0 ] ; } ; description param { SKLayer } layer returns { Promise < DSL > } export const picassoArtboardCodeParse = ( layer ) : Component => { layer = parseArtboardLayer ( layer , 'code' ) ; let DSL = parseDSL ( [ layer ] , 'code' ) ; DSL = picassoGroup ( DSL ) ; DSL = picassoLayout ( DSL ) ; DSL = handleClassName ( DSL ) ; return DSL [ 0 ] ; } ; description param { SKLayer } layer returns { Promise < DSL > } export const picassoArtboardOperationCodeParse = ( layer ) : Component => { layer = parseArtboardLayer ( layer , 'code' ) ; let DSL = parseDSL ( [ layer ] , 'code' ) ; DSL = operationLayout ( DSL ) ; DSL = handleClassName ( DSL ) ; return DSL [ 0 ] ; } ; description param { SKLayer } layer returns { Promise < DSL > } export const picassoArtboardLowcodeParse = ( layer ) : Component => { layer = parseArtboardLayer ( layer , 'lowcode' ) ; let DSL = parseDSL ( [ layer ] , 'lowcode' ) ; DSL = picassoGroup ( DSL ) ; DSL = picassoLayout ( DSL ) ; return DSL [ 0 ] ; } ; export * from '../../picasso-code-browser/src' ; export * from '../../sketch-dsl/src' ;