convert PatternView to new StyleDoc (JsonML) structure