v3.0.0
This release is 90% handmade by @TheReincarnator 👏Thank you!
Breaking
If you were importing models (e.g. Page, Document, Text, SymbolMaster etc.) like so:
import Document from '@brainly/html-sketchapp/html2asketch/document';
import SymbolMaster from '@brainly/html-sketchapp/html2asketch/symbolMaster';please update to:
import {Document, SymbolMaster} from '@brainly/html-sketchapp';That's it ✨
New
- two new top level methods 🔥
nodeTreeToSketchGroup- that walks given DOM subtree recursively and creates a tree of Sketch groups and layersnodeTreeToSketchPage- that wrapsnodeTreeToSketchGroupand crates a page with an (optional) Artboard where all groups and layers are placed
Artboardobjectindex.jsfile that lets you importhtml-sketchappin a convenient way
import {Document, Page, Text, nodeToSketchLayers} from '@brainly/html-sketchapp';- TypeScript files with type definitions
skipSystemFontsoption
some websites or component libraries use font-family lists starting with OS-specific fonts, if the option 'skipSystemFonts' is enabled, we skip those fonts to choose a font Sketch is capable of.
getRectangleNameoption that gives you full control over layer names
Improved
- Fixed bug in the Page object where width and height were mixed up
- ES5 transpilation for better compat
- Electron compat improvements (BCR)
