DOM APIs for unified-doc.
unified-doc provides a set of unified document APIs to streamline working with content across varying types. unified-doc-dom extends a set of useful browser/DOM-based APIs for documents that are rendered with unified-doc.
With unified-doc-dom, we can easily
- highlight and emphasize marked elements in a document.
- convert and save supported file formats.
- capture text selections and create
Markdata compatible withunified-doc. - extend future features to all document types supported by
unified-doc. - evolve with interoperable web technologies.
Please refer to the Spec documentation for more details on goals, definitions, and implementations in unified-doc-dom.
The following packages are managed under the unified-doc-dom project.
Unified DOM methods
DOM-baesd parsers that parse source content into hast trees.
unified-doc-dom-parse-pdfjs(in development)
This project is:
- implemented with the
unified-docinterface. - linted with
xo+prettier+tsc. - developed and built with
microbundle. - tested with
jest. - softly-typed with
typescriptwithcheckJs(only public APIs are typed). - managed with
lerna
Monorepo scripts:
# install dependencies and bootstrap with lerna
npm run bootstrap
# build all packages with microbundle
npm run build
# clean all packages (rm dist + node_modules)
npm run clean
# watch/rebuild all packages with microbundle
npm run dev
# lint all packages with xo + prettier + tsc
npm run lint
# test all packages with jest in --watch mode (make sure to run the 'dev' script)
npm run test
# test all packages in a single run
npm run test:run
# publish all packages with lerna
npm run publish