@utrecht/web-component-library-stencil 1.0.0-alpha.23 → 1.0.0-alpha.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/dist/cjs/{index-4628fffe.js → index-bc39ab9c.js} +267 -74
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/utrecht-article.cjs.entry.js +3 -3
- package/dist/cjs/utrecht-backdrop.cjs.entry.js +21 -0
- package/dist/cjs/utrecht-badge-counter.cjs.entry.js +5 -5
- package/dist/cjs/utrecht-badge-data.cjs.entry.js +3 -3
- package/dist/cjs/utrecht-badge-status.cjs.entry.js +4 -4
- package/dist/cjs/utrecht-breadcrumb.cjs.entry.js +23 -0
- package/dist/cjs/utrecht-button_2.cjs.entry.js +58 -0
- package/dist/cjs/utrecht-checkbox.cjs.entry.js +32 -0
- package/dist/cjs/utrecht-contact-card-template.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-custom-checkbox.cjs.entry.js +52 -0
- package/dist/cjs/utrecht-digid-button.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-document.cjs.entry.js +3 -3
- package/dist/cjs/utrecht-eherkenning-logo.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-eidas-logo.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-form-field-checkbox.cjs.entry.js +34 -0
- package/dist/cjs/utrecht-form-field-description.cjs.entry.js +22 -0
- package/dist/cjs/utrecht-form-field-textarea.cjs.entry.js +34 -0
- package/dist/cjs/utrecht-form-field-textbox.cjs.entry.js +39 -0
- package/dist/cjs/utrecht-form-toggle.cjs.entry.js +48 -0
- package/dist/cjs/utrecht-heading-1.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-heading-2_3.cjs.entry.js +46 -0
- package/dist/cjs/utrecht-heading-4.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-heading-5.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-heading-6.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-heading.cjs.entry.js +3 -3
- package/dist/cjs/utrecht-html-content.cjs.entry.js +3 -3
- package/dist/cjs/utrecht-icon-afval.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-arrow.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-checkmark.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-cross.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-error.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-facebook.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-filter.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-information.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-instagram.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-linkedin.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-list.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-loupe.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-melding.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-paspoort.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-rijbewijs.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-toeslag.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-trouwen.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-twitter.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-verhuizen.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-warning.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-whatsapp.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-zoomin.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-zoomout.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-logo-button.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-logo.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-page-content.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-page-footer.cjs.entry.js +3 -3
- package/dist/cjs/utrecht-page-header.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-page.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-pagination.cjs.entry.js +38 -0
- package/dist/cjs/utrecht-separator.cjs.entry.js +3 -3
- package/dist/cjs/utrecht-sidenav.cjs.entry.js +4 -4
- package/dist/cjs/utrecht-table-body.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-table-caption.cjs.entry.js +20 -0
- package/dist/cjs/utrecht-table-cell.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-table-footer.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-table-header-cell.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-table-header.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-table-row.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-table.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-textbox.cjs.entry.js +39 -0
- package/dist/cjs/utrecht.cjs.js +3 -3
- package/dist/collection/alternate-lang-nav/css/template.js +12 -0
- package/dist/collection/article/css/template.js +6 -0
- package/dist/collection/article/html/template.js +5 -0
- package/dist/collection/article/web-component/index.css +23 -0
- package/dist/collection/article/{stencil.js → web-component/index.stencil.js} +3 -3
- package/dist/collection/article/web-component/template.js +1 -0
- package/dist/collection/backdrop/css/template.js +28 -0
- package/dist/collection/backdrop/web-component/index.css +37 -0
- package/dist/collection/{button/stencil.js → backdrop/web-component/index.stencil.js} +14 -9
- package/dist/collection/backdrop/web-component/template.js +17 -0
- package/dist/collection/badge-counter/css/template.js +7 -0
- package/dist/collection/badge-counter/{bem.css → web-component/index.css} +9 -19
- package/dist/collection/badge-counter/{stencil.js → web-component/index.stencil.js} +5 -5
- package/dist/collection/badge-counter/web-component/template.js +4 -0
- package/dist/collection/badge-data/css/template.js +6 -0
- package/dist/collection/badge-data/{bem.css → web-component/index.css} +16 -5
- package/dist/collection/badge-data/{stencil.js → web-component/index.stencil.js} +3 -3
- package/dist/collection/badge-data/web-component/template.js +1 -0
- package/dist/collection/badge-status/css/template.js +7 -0
- package/dist/collection/badge-status/{bem.css → web-component/index.css} +21 -5
- package/dist/collection/badge-status/{stencil.js → web-component/index.stencil.js} +4 -4
- package/dist/collection/badge-status/web-component/template.js +4 -0
- package/dist/collection/blockquote/css/template.js +24 -0
- package/dist/collection/blockquote/html/template.js +6 -0
- package/dist/collection/breadcrumb/css/template.js +41 -0
- package/dist/collection/breadcrumb/web-component/index.css +330 -0
- package/dist/collection/breadcrumb/web-component/index.stencil.js +62 -0
- package/dist/collection/breadcrumb/web-component/template.js +4 -0
- package/dist/collection/button/css/stories/02-appearance.js +57 -0
- package/dist/collection/button/css/template.js +82 -0
- package/dist/collection/button/html/template.js +41 -0
- package/dist/collection/button/web-component/index.css +228 -0
- package/dist/collection/button/web-component/index.stencil.js +140 -0
- package/dist/collection/button/web-component/template.js +44 -0
- package/dist/collection/button-group/css/template.js +13 -0
- package/dist/collection/button-link/css/template.js +25 -0
- package/dist/collection/checkbox/css/template.js +19 -0
- package/dist/collection/checkbox/html/template.js +14 -0
- package/dist/collection/checkbox/web-component/index.css +69 -0
- package/dist/collection/checkbox/web-component/index.stencil.js +164 -0
- package/dist/collection/checkbox/web-component/template.js +8 -0
- package/dist/collection/collection-manifest.json +72 -14
- package/dist/collection/custom-checkbox/css/template.js +46 -0
- package/dist/collection/custom-checkbox/web-component/index.css +273 -0
- package/dist/collection/custom-checkbox/web-component/index.stencil.js +205 -0
- package/dist/collection/custom-checkbox/web-component/template.js +22 -0
- package/dist/collection/custom-radio-button/css/template.js +30 -0
- package/dist/collection/digid-button/css/template.js +16 -0
- package/dist/collection/digid-button/web-component/index.css +32 -0
- package/dist/collection/digid-button/web-component/index.stencil.js +41 -0
- package/dist/collection/digid-button/web-component/template.js +1 -0
- package/dist/collection/digid-logo/web-component/index.css +18 -0
- package/dist/collection/digid-logo/web-component/index.stencil.js +23 -0
- package/dist/collection/digid-logo/web-component/template.js +1 -0
- package/dist/collection/document/web-component/index.css +37 -0
- package/dist/collection/document/{stencil.js → web-component/index.stencil.js} +3 -3
- package/dist/collection/document/web-component/template.js +1 -0
- package/dist/collection/eherkenning-logo/web-component/index.css +18 -0
- package/dist/collection/eherkenning-logo/web-component/index.stencil.js +26 -0
- package/dist/collection/eherkenning-logo/web-component/template.js +1 -0
- package/dist/collection/eidas-logo/web-component/index.css +18 -0
- package/dist/collection/eidas-logo/web-component/index.stencil.js +28 -0
- package/dist/collection/eidas-logo/web-component/template.js +1 -0
- package/dist/collection/emphasis/css/template.js +19 -0
- package/dist/collection/emphasis/html/template.js +20 -0
- package/dist/collection/favicon/html/template.js +1 -0
- package/dist/collection/form-field-checkbox/css/template.js +10 -0
- package/dist/collection/form-field-checkbox/web-component/index.css +128 -0
- package/dist/collection/form-field-checkbox/web-component/index.stencil.js +190 -0
- package/dist/collection/form-field-checkbox/web-component/template.js +18 -0
- package/dist/collection/form-field-checkbox-group/css/template.js +33 -0
- package/dist/collection/form-field-description/css/template.js +15 -0
- package/dist/collection/form-field-description/web-component/index.css +43 -0
- package/dist/collection/form-field-description/web-component/index.stencil.js +44 -0
- package/dist/collection/form-field-description/web-component/template.js +4 -0
- package/dist/collection/form-field-radio/css/template.js +10 -0
- package/dist/collection/form-field-radio-group/css/template.js +20 -0
- package/dist/collection/form-field-textarea/web-component/index.css +177 -0
- package/dist/collection/form-field-textarea/web-component/index.stencil.js +205 -0
- package/dist/collection/form-field-textarea/web-component/template.js +14 -0
- package/dist/collection/form-field-textbox/web-component/index.css +180 -0
- package/dist/collection/form-field-textbox/web-component/index.stencil.js +300 -0
- package/dist/collection/form-field-textbox/web-component/template.js +21 -0
- package/dist/collection/form-fieldset/css/template.js +10 -0
- package/dist/collection/form-fieldset/html/template.js +12 -0
- package/dist/collection/form-label/css/template.js +22 -0
- package/dist/collection/form-label/html/template.js +5 -0
- package/dist/collection/form-toggle/css/template.js +47 -0
- package/dist/collection/form-toggle/web-component/index.css +115 -0
- package/dist/collection/form-toggle/web-component/index.stencil.js +148 -0
- package/dist/collection/form-toggle/web-component/template.js +7 -0
- package/dist/collection/heading/{bem.css → web-component/index.css} +144 -37
- package/dist/collection/heading/{stencil.js → web-component/index.stencil.js} +3 -3
- package/dist/collection/heading/web-component/template.js +4 -0
- package/dist/collection/heading-1/css/template.js +11 -0
- package/dist/collection/heading-1/html/template.js +4 -0
- package/dist/collection/heading-1/web-component/index.css +46 -0
- package/dist/collection/heading-1/web-component/index.stencil.js +15 -0
- package/dist/collection/heading-1/web-component/template.js +4 -0
- package/dist/collection/heading-2/css/template.js +11 -0
- package/dist/collection/heading-2/html/template.js +4 -0
- package/dist/collection/heading-2/web-component/index.css +46 -0
- package/dist/collection/heading-2/web-component/index.stencil.js +15 -0
- package/dist/collection/heading-2/web-component/template.js +4 -0
- package/dist/collection/heading-3/css/template.js +11 -0
- package/dist/collection/heading-3/html/template.js +4 -0
- package/dist/collection/heading-3/web-component/index.css +46 -0
- package/dist/collection/heading-3/web-component/index.stencil.js +15 -0
- package/dist/collection/heading-3/web-component/template.js +4 -0
- package/dist/collection/heading-4/css/template.js +11 -0
- package/dist/collection/heading-4/html/template.js +4 -0
- package/dist/collection/heading-4/web-component/index.css +46 -0
- package/dist/collection/heading-4/web-component/index.stencil.js +15 -0
- package/dist/collection/heading-4/web-component/template.js +4 -0
- package/dist/collection/heading-5/css/template.js +11 -0
- package/dist/collection/heading-5/html/template.js +4 -0
- package/dist/collection/heading-5/web-component/index.css +46 -0
- package/dist/collection/heading-5/web-component/index.stencil.js +15 -0
- package/dist/collection/heading-5/web-component/template.js +4 -0
- package/dist/collection/heading-6/css/template.js +11 -0
- package/dist/collection/heading-6/html/template.js +4 -0
- package/dist/collection/heading-6/web-component/index.css +46 -0
- package/dist/collection/heading-6/web-component/index.stencil.js +15 -0
- package/dist/collection/heading-6/web-component/template.js +4 -0
- package/dist/collection/html-content/web-component/index.css +1166 -0
- package/dist/collection/html-content/{stencil.js → web-component/index.stencil.js} +3 -3
- package/dist/collection/html-content/web-component/template.js +1 -0
- package/dist/collection/icon/dist/Vervoersvoorziening.svg +1 -0
- package/dist/collection/icon/dist/afspraakmaken.svg +1 -0
- package/dist/collection/icon/dist/afval.svg +1 -0
- package/dist/collection/icon/dist/afvalkalender.svg +1 -0
- package/dist/collection/icon/dist/afvalscheiden.svg +1 -0
- package/dist/collection/icon/dist/arrow.svg +1 -0
- package/dist/collection/icon/dist/bestemmindsplan.svg +1 -0
- package/dist/collection/icon/dist/betaaldatum.svg +1 -0
- package/dist/collection/icon/dist/bewijsstukken.svg +1 -0
- package/dist/collection/icon/dist/bijstand.svg +1 -0
- package/dist/collection/icon/dist/checkmark.svg +1 -0
- package/dist/collection/icon/dist/collegevanbenw.svg +1 -0
- package/dist/collection/icon/dist/cross.svg +1 -0
- package/dist/collection/icon/dist/eikenprocessie.svg +1 -0
- package/dist/collection/icon/dist/energietransitie.svg +1 -0
- package/dist/collection/icon/dist/error.svg +1 -0
- package/dist/collection/icon/dist/evenementen.svg +1 -0
- package/dist/collection/icon/dist/facebook.svg +1 -0
- package/dist/collection/icon/dist/fiets.svg +1 -0
- package/dist/collection/icon/dist/filter.svg +1 -0
- package/dist/collection/icon/dist/gegevenswoordenboek.svg +1 -0
- package/dist/collection/icon/dist/gemeenteraad.svg +1 -0
- package/dist/collection/icon/dist/grofvuil.svg +1 -0
- package/dist/collection/icon/dist/hulphuishouden.svg +1 -0
- package/dist/collection/icon/dist/hulpvervoer.svg +1 -0
- package/dist/collection/icon/dist/information.svg +1 -0
- package/dist/collection/icon/dist/innovatie.svg +1 -0
- package/dist/collection/icon/dist/instagram.svg +1 -0
- package/dist/collection/icon/dist/kalender.svg +1 -0
- package/dist/collection/icon/dist/klachten.svg +1 -0
- package/dist/collection/icon/dist/laadpaal.svg +1 -0
- package/dist/collection/icon/dist/leren.svg +1 -0
- package/dist/collection/icon/dist/letop.svg +1 -0
- package/dist/collection/icon/dist/linkedin.svg +1 -0
- package/dist/collection/icon/dist/list.svg +1 -0
- package/dist/collection/icon/dist/loupe.svg +1 -0
- package/dist/collection/icon/dist/markt.svg +1 -0
- package/dist/collection/icon/dist/medlingklacht.svg +1 -0
- package/dist/collection/icon/dist/melding.svg +1 -0
- package/dist/collection/icon/dist/nieuwhuis.svg +1 -0
- package/dist/collection/icon/dist/nummerbord.svg +1 -0
- package/dist/collection/icon/dist/openingstijden.svg +1 -0
- package/dist/collection/icon/dist/panden.svg +1 -0
- package/dist/collection/icon/dist/parkeerkaart.svg +1 -0
- package/dist/collection/icon/dist/parken.svg +1 -0
- package/dist/collection/icon/dist/parkerenbedrijven.svg +1 -0
- package/dist/collection/icon/dist/parkerenbetalen.svg +1 -0
- package/dist/collection/icon/dist/paspoort.svg +1 -0
- package/dist/collection/icon/dist/rijbewijs.svg +1 -0
- package/dist/collection/icon/dist/shoppen.svg +1 -0
- package/dist/collection/icon/dist/sport.svg +1 -0
- package/dist/collection/icon/dist/toeslag.svg +1 -0
- package/dist/collection/icon/dist/trouwen.svg +1 -0
- package/dist/collection/icon/dist/twitter.svg +1 -0
- package/dist/collection/icon/dist/vergoeding.svg +1 -0
- package/dist/collection/icon/dist/verhuizen.svg +1 -0
- package/dist/collection/icon/dist/virus.svg +1 -0
- package/dist/collection/icon/dist/vluchtelingen.svg +1 -0
- package/dist/collection/icon/dist/warm.svg +1 -0
- package/dist/collection/icon/dist/warning.svg +1 -0
- package/dist/collection/icon/dist/werken.svg +1 -0
- package/dist/collection/icon/dist/werkzaamheden.svg +1 -0
- package/dist/collection/icon/dist/whatsapp.svg +1 -0
- package/dist/collection/icon/dist/wonenkosten.svg +1 -0
- package/dist/collection/icon/dist/woningzoeken.svg +1 -0
- package/dist/collection/icon/dist/zoomin.svg +1 -0
- package/dist/collection/icon/dist/zoomout.svg +1 -0
- package/dist/collection/icon/dist/zwemmen.svg +1 -0
- package/dist/collection/icon/svg/Vervoersvoorziening.svg +1 -0
- package/dist/collection/icon/svg/afspraakmaken.svg +1 -0
- package/dist/collection/icon/svg/afval.svg +1 -0
- package/dist/collection/icon/svg/afvalkalender.svg +1 -0
- package/dist/collection/icon/svg/afvalscheiden.svg +1 -0
- package/dist/collection/icon/svg/arrow.svg +9 -0
- package/dist/collection/icon/svg/bestemmindsplan.svg +1 -0
- package/dist/collection/icon/svg/betaaldatum.svg +1 -0
- package/dist/collection/icon/svg/bewijsstukken.svg +1 -0
- package/dist/collection/icon/svg/bijstand.svg +1 -0
- package/dist/collection/icon/svg/checkmark.svg +9 -0
- package/dist/collection/icon/svg/collegevanbenw.svg +1 -0
- package/dist/collection/icon/svg/cross.svg +9 -0
- package/dist/collection/icon/svg/eikenprocessie.svg +1 -0
- package/dist/collection/icon/svg/energietransitie.svg +1 -0
- package/dist/collection/icon/svg/error.svg +15 -0
- package/dist/collection/icon/svg/evenementen.svg +1 -0
- package/dist/collection/icon/svg/facebook.svg +9 -0
- package/dist/collection/icon/svg/fiets.svg +1 -0
- package/dist/collection/icon/svg/filter.svg +6 -0
- package/dist/collection/icon/svg/gegevenswoordenboek.svg +1 -0
- package/dist/collection/icon/svg/gemeenteraad.svg +1 -0
- package/dist/collection/icon/svg/grofvuil.svg +1 -0
- package/dist/collection/icon/svg/hulphuishouden.svg +1 -0
- package/dist/collection/icon/svg/hulpvervoer.svg +1 -0
- package/dist/collection/icon/svg/information.svg +14 -0
- package/dist/collection/icon/svg/innovatie.svg +1 -0
- package/dist/collection/icon/svg/instagram.svg +16 -0
- package/dist/collection/icon/svg/kalender.svg +1 -0
- package/dist/collection/icon/svg/klachten.svg +1 -0
- package/dist/collection/icon/svg/laadpaal.svg +1 -0
- package/dist/collection/icon/svg/leren.svg +1 -0
- package/dist/collection/icon/svg/letop.svg +1 -0
- package/dist/collection/icon/svg/linkedin.svg +14 -0
- package/dist/collection/icon/svg/list.svg +9 -0
- package/dist/collection/icon/svg/loupe.svg +11 -0
- package/dist/collection/icon/svg/markt.svg +1 -0
- package/dist/collection/icon/svg/medlingklacht.svg +1 -0
- package/dist/collection/icon/svg/melding.svg +5 -0
- package/dist/collection/icon/svg/nieuwhuis.svg +1 -0
- package/dist/collection/icon/svg/nummerbord.svg +1 -0
- package/dist/collection/icon/svg/openingstijden.svg +1 -0
- package/dist/collection/icon/svg/panden.svg +1 -0
- package/dist/collection/icon/svg/parkeerkaart.svg +1 -0
- package/dist/collection/icon/svg/parken.svg +1 -0
- package/dist/collection/icon/svg/parkerenbedrijven.svg +1 -0
- package/dist/collection/icon/svg/parkerenbetalen.svg +1 -0
- package/dist/collection/icon/svg/paspoort.svg +1 -0
- package/dist/collection/icon/svg/rijbewijs.svg +1 -0
- package/dist/collection/icon/svg/shoppen.svg +1 -0
- package/dist/collection/icon/svg/sport.svg +1 -0
- package/dist/collection/icon/svg/toeslag.svg +5 -0
- package/dist/collection/icon/svg/trouwen.svg +1 -0
- package/dist/collection/icon/svg/twitter.svg +9 -0
- package/dist/collection/icon/svg/vergoeding.svg +1 -0
- package/dist/collection/icon/svg/verhuizen.svg +1 -0
- package/dist/collection/icon/svg/virus.svg +1 -0
- package/dist/collection/icon/svg/vluchtelingen.svg +1 -0
- package/dist/collection/icon/svg/warm.svg +1 -0
- package/dist/collection/icon/svg/warning.svg +19 -0
- package/dist/collection/icon/svg/werken.svg +1 -0
- package/dist/collection/icon/svg/werkzaamheden.svg +1 -0
- package/dist/collection/icon/svg/whatsapp.svg +9 -0
- package/dist/collection/icon/svg/wonenkosten.svg +1 -0
- package/dist/collection/icon/svg/woningzoeken.svg +1 -0
- package/dist/collection/icon/svg/zoomin.svg +13 -0
- package/dist/collection/icon/svg/zoomout.svg +9 -0
- package/dist/collection/icon/svg/zwemmen.svg +1 -0
- package/dist/collection/icon/web-component/afval.stencil.js +19 -0
- package/dist/collection/icon/web-component/arrow.stencil.js +17 -0
- package/dist/collection/icon/web-component/checkmark.stencil.js +16 -0
- package/dist/collection/icon/web-component/cross.stencil.js +17 -0
- package/dist/collection/icon/web-component/error.stencil.js +18 -0
- package/dist/collection/icon/web-component/facebook.stencil.js +17 -0
- package/dist/collection/icon/web-component/filter.stencil.js +18 -0
- package/dist/collection/icon/web-component/index.css +20 -0
- package/dist/collection/icon/web-component/information.stencil.js +19 -0
- package/dist/collection/icon/web-component/instagram.stencil.js +19 -0
- package/dist/collection/icon/web-component/linkedin.stencil.js +18 -0
- package/dist/collection/icon/web-component/list.stencil.js +21 -0
- package/dist/collection/icon/web-component/loupe.stencil.js +17 -0
- package/dist/collection/icon/web-component/melding.stencil.js +17 -0
- package/dist/collection/icon/web-component/paspoort.stencil.js +17 -0
- package/dist/collection/icon/web-component/rijbewijs.stencil.js +20 -0
- package/dist/collection/icon/web-component/template.js +7 -0
- package/dist/collection/icon/web-component/toeslag.stencil.js +17 -0
- package/dist/collection/icon/web-component/trouwen.stencil.js +16 -0
- package/dist/collection/icon/web-component/twitter.stencil.js +17 -0
- package/dist/collection/icon/web-component/verhuizen.stencil.js +21 -0
- package/dist/collection/icon/web-component/warning.stencil.js +19 -0
- package/dist/collection/icon/web-component/whatsapp.stencil.js +17 -0
- package/dist/collection/icon/web-component/zoomin.stencil.js +18 -0
- package/dist/collection/icon/web-component/zoomout.stencil.js +17 -0
- package/dist/collection/link/css/template.js +57 -0
- package/dist/collection/link/html/template.js +11 -0
- package/dist/collection/link-button/css/template.js +42 -0
- package/dist/collection/link-list/css/template.js +10 -0
- package/dist/collection/link-social/css/template.js +20 -0
- package/dist/collection/logo/css/template.js +33 -0
- package/dist/collection/logo/web-component/index.css +38 -0
- package/dist/collection/logo/web-component/index.stencil.js +26 -0
- package/dist/collection/logo/web-component/template.js +1 -0
- package/dist/collection/logo-button/css/template.js +17 -0
- package/dist/collection/logo-button/web-component/index.css +31 -0
- package/dist/collection/logo-button/web-component/index.stencil.js +41 -0
- package/dist/collection/logo-button/web-component/template.js +1 -0
- package/dist/collection/mapcontrolbutton/css/template.js +34 -0
- package/dist/collection/menulijst/css/template.js +18 -0
- package/dist/collection/navigatie sidenav/css/template.js +69 -0
- package/dist/collection/navigatie sidenav/web-component/index.css +189 -0
- package/dist/collection/navigatie sidenav/web-component/index.stencil.js +45 -0
- package/dist/collection/navigatie sidenav/web-component/template.js +1 -0
- package/dist/collection/navigatie topnav/css/template.js +26 -0
- package/dist/collection/node_modules/@trysound/sax/lib/sax.js +1413 -0
- package/dist/collection/node_modules/commander/index.js +2217 -0
- package/dist/collection/node_modules/css-tree/data/index.js +103 -0
- package/dist/collection/node_modules/css-tree/dist/csstree.js +12606 -0
- package/dist/collection/node_modules/css-tree/dist/csstree.min.js +1 -0
- package/dist/collection/node_modules/css-tree/lib/common/List.js +576 -0
- package/dist/collection/node_modules/css-tree/lib/common/OffsetToLocation.js +91 -0
- package/dist/collection/node_modules/css-tree/lib/common/SyntaxError.js +82 -0
- package/dist/collection/node_modules/css-tree/lib/common/TokenStream.js +219 -0
- package/dist/collection/node_modules/css-tree/lib/common/adopt-buffer.js +10 -0
- package/dist/collection/node_modules/css-tree/lib/convertor/create.js +28 -0
- package/dist/collection/node_modules/css-tree/lib/convertor/index.js +3 -0
- package/dist/collection/node_modules/css-tree/lib/definition-syntax/SyntaxError.js +14 -0
- package/dist/collection/node_modules/css-tree/lib/definition-syntax/generate.js +129 -0
- package/dist/collection/node_modules/css-tree/lib/definition-syntax/index.js +6 -0
- package/dist/collection/node_modules/css-tree/lib/definition-syntax/parse.js +568 -0
- package/dist/collection/node_modules/css-tree/lib/definition-syntax/tokenizer.js +55 -0
- package/dist/collection/node_modules/css-tree/lib/definition-syntax/walk.js +52 -0
- package/dist/collection/node_modules/css-tree/lib/generator/create.js +66 -0
- package/dist/collection/node_modules/css-tree/lib/generator/index.js +4 -0
- package/dist/collection/node_modules/css-tree/lib/generator/sourceMap.js +95 -0
- package/dist/collection/node_modules/css-tree/lib/index.js +1 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/Lexer.js +466 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/error.js +127 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/generic-an-plus-b.js +236 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/generic-urange.js +159 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/generic.js +585 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/index.js +3 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/match-graph.js +455 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/match.js +639 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/prepare-tokens.js +73 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/search.js +65 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/structure.js +163 -0
- package/dist/collection/node_modules/css-tree/lib/lexer/trace.js +79 -0
- package/dist/collection/node_modules/css-tree/lib/parser/create.js +304 -0
- package/dist/collection/node_modules/css-tree/lib/parser/index.js +4 -0
- package/dist/collection/node_modules/css-tree/lib/parser/sequence.js +54 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/atrule/font-face.js +8 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/atrule/import.js +40 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/atrule/index.js +7 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/atrule/media.js +12 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/atrule/page.js +12 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/atrule/supports.js +89 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/config/lexer.js +9 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/config/mix.js +140 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/config/parser.js +25 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/config/walker.js +3 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/create.js +77 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/function/expression.js +7 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/function/var.js +43 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/index.js +21 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/AnPlusB.js +297 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Atrule.js +107 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js +51 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/AttributeSelector.js +165 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Block.js +91 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Brackets.js +34 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/CDC.js +19 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/CDO.js +19 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/ClassSelector.js +29 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Combinator.js +55 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Comment.js +36 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Declaration.js +169 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/DeclarationList.js +49 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Dimension.js +29 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Function.js +40 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Hash.js +26 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/IdSelector.js +27 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Identifier.js +20 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/MediaFeature.js +76 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/MediaQuery.js +68 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/MediaQueryList.js +36 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Nth.js +51 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Number.js +18 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Operator.js +21 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Parentheses.js +34 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Percentage.js +27 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/PseudoClassSelector.js +61 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/PseudoElementSelector.js +62 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Ratio.js +66 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Raw.js +87 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Rule.js +54 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Selector.js +32 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/SelectorList.js +39 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/String.js +18 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/StyleSheet.js +81 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/TypeSelector.js +53 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/UnicodeRange.js +173 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Url.js +69 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/Value.js +19 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/WhiteSpace.js +26 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/node/index.js +42 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/common/nth.js +9 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/common/nthWithOfClause.js +9 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/common/selectorList.js +7 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/dir.js +7 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/has.js +7 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/index.js +12 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/lang.js +7 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/matches.js +1 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/not.js +1 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/nth-child.js +1 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/nth-last-child.js +1 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/nth-last-of-type.js +1 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/nth-of-type.js +1 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/pseudo/slotted.js +7 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/scope/atrulePrelude.js +3 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/scope/default.js +87 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/scope/index.js +5 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/scope/selector.js +80 -0
- package/dist/collection/node_modules/css-tree/lib/syntax/scope/value.js +5 -0
- package/dist/collection/node_modules/css-tree/lib/tokenizer/char-code-definitions.js +249 -0
- package/dist/collection/node_modules/css-tree/lib/tokenizer/const.js +40 -0
- package/dist/collection/node_modules/css-tree/lib/tokenizer/index.js +591 -0
- package/dist/collection/node_modules/css-tree/lib/tokenizer/utils.js +243 -0
- package/dist/collection/node_modules/css-tree/lib/utils/clone.js +21 -0
- package/dist/collection/node_modules/css-tree/lib/utils/createCustomError.js +17 -0
- package/dist/collection/node_modules/css-tree/lib/utils/names.js +104 -0
- package/dist/collection/node_modules/css-tree/lib/walker/create.js +284 -0
- package/dist/collection/node_modules/css-tree/lib/walker/index.js +4 -0
- package/dist/collection/node_modules/mdn-data/api/index.js +3 -0
- package/dist/collection/node_modules/mdn-data/css/index.js +8 -0
- package/dist/collection/node_modules/mdn-data/index.js +5 -0
- package/dist/collection/node_modules/mdn-data/l10n/index.js +3 -0
- package/dist/collection/node_modules/source-map/dist/source-map.debug.js +3234 -0
- package/dist/collection/node_modules/source-map/dist/source-map.js +3233 -0
- package/dist/collection/node_modules/source-map/dist/source-map.min.js +2 -0
- package/dist/collection/node_modules/source-map/lib/array-set.js +121 -0
- package/dist/collection/node_modules/source-map/lib/base64-vlq.js +140 -0
- package/dist/collection/node_modules/source-map/lib/base64.js +67 -0
- package/dist/collection/node_modules/source-map/lib/binary-search.js +111 -0
- package/dist/collection/node_modules/source-map/lib/mapping-list.js +79 -0
- package/dist/collection/node_modules/source-map/lib/quick-sort.js +114 -0
- package/dist/collection/node_modules/source-map/lib/source-map-consumer.js +1145 -0
- package/dist/collection/node_modules/source-map/lib/source-map-generator.js +425 -0
- package/dist/collection/node_modules/source-map/lib/source-node.js +413 -0
- package/dist/collection/node_modules/source-map/lib/util.js +488 -0
- package/dist/collection/node_modules/source-map/source-map.js +8 -0
- package/dist/collection/node_modules/svgo/dist/svgo.browser.js +1 -0
- package/dist/collection/node_modules/svgo/lib/css-tools.js +239 -0
- package/dist/collection/node_modules/svgo/lib/parser.js +259 -0
- package/dist/collection/node_modules/svgo/lib/path.js +347 -0
- package/dist/collection/node_modules/svgo/lib/stringifier.js +326 -0
- package/dist/collection/node_modules/svgo/lib/style.js +283 -0
- package/dist/collection/node_modules/svgo/lib/svgo/coa.js +517 -0
- package/dist/collection/node_modules/svgo/lib/svgo/config.js +138 -0
- package/dist/collection/node_modules/svgo/lib/svgo/css-class-list.js +72 -0
- package/dist/collection/node_modules/svgo/lib/svgo/css-select-adapter.js +120 -0
- package/dist/collection/node_modules/svgo/lib/svgo/css-style-declaration.js +232 -0
- package/dist/collection/node_modules/svgo/lib/svgo/jsAPI.js +443 -0
- package/dist/collection/node_modules/svgo/lib/svgo/plugins.js +109 -0
- package/dist/collection/node_modules/svgo/lib/svgo/tools.js +137 -0
- package/dist/collection/node_modules/svgo/lib/svgo-node.js +106 -0
- package/dist/collection/node_modules/svgo/lib/svgo.js +83 -0
- package/dist/collection/node_modules/svgo/lib/xast.js +102 -0
- package/dist/collection/node_modules/svgo/plugins/_applyTransforms.js +335 -0
- package/dist/collection/node_modules/svgo/plugins/_collections.js +2168 -0
- package/dist/collection/node_modules/svgo/plugins/_path.js +816 -0
- package/dist/collection/node_modules/svgo/plugins/_transforms.js +379 -0
- package/dist/collection/node_modules/svgo/plugins/addAttributesToSVGElement.js +87 -0
- package/dist/collection/node_modules/svgo/plugins/addClassesToSVGElement.js +87 -0
- package/dist/collection/node_modules/svgo/plugins/cleanupAttrs.js +55 -0
- package/dist/collection/node_modules/svgo/plugins/cleanupEnableBackground.js +75 -0
- package/dist/collection/node_modules/svgo/plugins/cleanupIDs.js +297 -0
- package/dist/collection/node_modules/svgo/plugins/cleanupListOfValues.js +154 -0
- package/dist/collection/node_modules/svgo/plugins/cleanupNumericValues.js +113 -0
- package/dist/collection/node_modules/svgo/plugins/collapseGroups.js +135 -0
- package/dist/collection/node_modules/svgo/plugins/convertColors.js +152 -0
- package/dist/collection/node_modules/svgo/plugins/convertEllipseToCircle.js +39 -0
- package/dist/collection/node_modules/svgo/plugins/convertPathData.js +1023 -0
- package/dist/collection/node_modules/svgo/plugins/convertShapeToPath.js +175 -0
- package/dist/collection/node_modules/svgo/plugins/convertStyleToAttrs.js +132 -0
- package/dist/collection/node_modules/svgo/plugins/convertTransform.js +432 -0
- package/dist/collection/node_modules/svgo/plugins/inlineStyles.js +379 -0
- package/dist/collection/node_modules/svgo/plugins/mergePaths.js +104 -0
- package/dist/collection/node_modules/svgo/plugins/mergeStyles.js +93 -0
- package/dist/collection/node_modules/svgo/plugins/minifyStyles.js +148 -0
- package/dist/collection/node_modules/svgo/plugins/moveElemsAttrsToGroup.js +130 -0
- package/dist/collection/node_modules/svgo/plugins/moveGroupAttrsToElems.js +62 -0
- package/dist/collection/node_modules/svgo/plugins/plugins.js +56 -0
- package/dist/collection/node_modules/svgo/plugins/prefixIds.js +241 -0
- package/dist/collection/node_modules/svgo/plugins/preset-default.js +80 -0
- package/dist/collection/node_modules/svgo/plugins/removeAttributesBySelector.js +99 -0
- package/dist/collection/node_modules/svgo/plugins/removeAttrs.js +159 -0
- package/dist/collection/node_modules/svgo/plugins/removeComments.js +31 -0
- package/dist/collection/node_modules/svgo/plugins/removeDesc.js +41 -0
- package/dist/collection/node_modules/svgo/plugins/removeDimensions.js +43 -0
- package/dist/collection/node_modules/svgo/plugins/removeDoctype.js +42 -0
- package/dist/collection/node_modules/svgo/plugins/removeEditorsNSData.js +68 -0
- package/dist/collection/node_modules/svgo/plugins/removeElementsByAttr.js +78 -0
- package/dist/collection/node_modules/svgo/plugins/removeEmptyAttrs.js +33 -0
- package/dist/collection/node_modules/svgo/plugins/removeEmptyContainers.js +58 -0
- package/dist/collection/node_modules/svgo/plugins/removeEmptyText.js +57 -0
- package/dist/collection/node_modules/svgo/plugins/removeHiddenElems.js +318 -0
- package/dist/collection/node_modules/svgo/plugins/removeMetadata.js +29 -0
- package/dist/collection/node_modules/svgo/plugins/removeNonInheritableGroupAttrs.js +38 -0
- package/dist/collection/node_modules/svgo/plugins/removeOffCanvasPaths.js +138 -0
- package/dist/collection/node_modules/svgo/plugins/removeRasterImages.js +33 -0
- package/dist/collection/node_modules/svgo/plugins/removeScriptElement.js +29 -0
- package/dist/collection/node_modules/svgo/plugins/removeStyleElement.js +29 -0
- package/dist/collection/node_modules/svgo/plugins/removeTitle.js +29 -0
- package/dist/collection/node_modules/svgo/plugins/removeUnknownsAndDefaults.js +218 -0
- package/dist/collection/node_modules/svgo/plugins/removeUnusedNS.js +61 -0
- package/dist/collection/node_modules/svgo/plugins/removeUselessDefs.js +65 -0
- package/dist/collection/node_modules/svgo/plugins/removeUselessStrokeAndFill.js +144 -0
- package/dist/collection/node_modules/svgo/plugins/removeViewBox.js +51 -0
- package/dist/collection/node_modules/svgo/plugins/removeXMLNS.js +30 -0
- package/dist/collection/node_modules/svgo/plugins/removeXMLProcInst.js +30 -0
- package/dist/collection/node_modules/svgo/plugins/reusePaths.js +113 -0
- package/dist/collection/node_modules/svgo/plugins/sortAttrs.js +113 -0
- package/dist/collection/node_modules/svgo/plugins/sortDefsChildren.js +60 -0
- package/dist/collection/ordered-list/css/template.js +11 -0
- package/dist/collection/ordered-list/html/template.js +17 -0
- package/dist/collection/page/css/template.js +6 -0
- package/dist/collection/page/web-component/index.css +35 -0
- package/dist/collection/page/web-component/index.stencil.js +20 -0
- package/dist/collection/page/web-component/template.js +5 -0
- package/dist/collection/page-content/css/template.js +10 -0
- package/dist/collection/page-content/web-component/index.css +36 -0
- package/dist/collection/page-content/web-component/index.stencil.js +20 -0
- package/dist/collection/page-content/web-component/template.js +1 -0
- package/dist/collection/page-footer/css/template.js +7 -0
- package/dist/collection/page-footer/{bem.css → web-component/index.css} +35 -12
- package/dist/collection/page-footer/{stencil.js → web-component/index.stencil.js} +3 -3
- package/dist/collection/page-footer/web-component/template.js +1 -0
- package/dist/collection/page-header/css/template.js +6 -0
- package/dist/collection/page-header/web-component/index.css +35 -0
- package/dist/collection/page-header/web-component/stencil.js +20 -0
- package/dist/collection/page-header/web-component/template.js +1 -0
- package/dist/collection/pagination/css/template.js +54 -0
- package/dist/collection/pagination/web-component/index.css +138 -0
- package/dist/collection/pagination/web-component/index.stencil.js +110 -0
- package/dist/collection/pagination/web-component/template.js +7 -0
- package/dist/collection/paragraph/css/template.js +22 -0
- package/dist/collection/paragraph/html/template.js +11 -0
- package/dist/collection/paragraph/{bem.css → web-component/index.css} +22 -3
- package/dist/collection/paragraph/{stencil.js → web-component/index.stencil.js} +5 -5
- package/dist/collection/paragraph/web-component/template.js +12 -0
- package/dist/collection/pre-heading/css/template.js +15 -0
- package/dist/collection/radio-button/css/template.js +19 -0
- package/dist/collection/radio-button/html/template.js +19 -0
- package/dist/collection/search-bar/css/template.js +15 -0
- package/dist/collection/select/css/template.js +39 -0
- package/dist/collection/select/html/template.js +26 -0
- package/dist/collection/separator/css/template.js +16 -0
- package/dist/collection/separator/html/template.js +4 -0
- package/dist/collection/separator/web-component/index.css +34 -0
- package/dist/collection/separator/{stencil.js → web-component/index.stencil.js} +3 -3
- package/dist/collection/separator/web-component/template.js +1 -0
- package/dist/collection/surface/css/template.js +8 -0
- package/dist/collection/table/html/template.js +41 -0
- package/dist/collection/table/web-component/table-body.css +14 -0
- package/dist/collection/table/web-component/table-body.stencil.js +15 -0
- package/dist/collection/table/web-component/table-caption.css +22 -0
- package/dist/collection/table/web-component/table-caption.stencil.js +15 -0
- package/dist/collection/table/web-component/table-cell.css +22 -0
- package/dist/collection/table/web-component/table-cell.stencil.js +15 -0
- package/dist/collection/table/web-component/table-footer.css +13 -0
- package/dist/collection/table/web-component/table-footer.stencil.js +15 -0
- package/dist/collection/table/web-component/table-header-cell.css +18 -0
- package/dist/collection/table/web-component/table-header-cell.stencil.js +34 -0
- package/dist/collection/table/web-component/table-header.css +18 -0
- package/dist/collection/table/web-component/table-header.stencil.js +15 -0
- package/dist/collection/table/web-component/table-row.css +13 -0
- package/dist/collection/table/web-component/table-row.stencil.js +15 -0
- package/dist/collection/table/web-component/table.css +20 -0
- package/dist/collection/table/web-component/table.stencil.js +15 -0
- package/dist/collection/table/web-component/template.js +23 -0
- package/dist/collection/templates/contact-card-template/css/template.js +30 -0
- package/dist/collection/templates/contact-card-template/web-component/index.css +209 -0
- package/dist/collection/templates/contact-card-template/web-component/index.stencil.js +25 -0
- package/dist/collection/templates/contact-card-template/web-component/template.js +1 -0
- package/dist/collection/textarea/css/template.js +35 -0
- package/dist/collection/textarea/html/template.js +20 -0
- package/dist/collection/textbox/css/template.js +37 -0
- package/dist/collection/textbox/html/template.js +36 -0
- package/dist/collection/textbox/web-component/index.css +139 -0
- package/dist/collection/textbox/web-component/index.stencil.js +297 -0
- package/dist/collection/textbox/web-component/template.js +20 -0
- package/dist/collection/toptask-link/css/template.js +33 -0
- package/dist/collection/toptask-nav/css/template.js +50 -0
- package/dist/collection/unordered-list/css/template.js +28 -0
- package/dist/collection/unordered-list/html/template.js +22 -0
- package/dist/collection/url/css/template.js +14 -0
- package/dist/custom-elements/index.d.ts +348 -0
- package/dist/custom-elements/index.js +1204 -88
- package/dist/esm/{index-73546a7d.js → index-b6f2699c.js} +265 -75
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/utrecht-article.entry.js +3 -3
- package/dist/esm/utrecht-backdrop.entry.js +17 -0
- package/dist/esm/utrecht-badge-counter.entry.js +5 -5
- package/dist/esm/utrecht-badge-data.entry.js +3 -3
- package/dist/esm/utrecht-badge-status.entry.js +4 -4
- package/dist/esm/utrecht-breadcrumb.entry.js +19 -0
- package/dist/esm/utrecht-button_2.entry.js +53 -0
- package/dist/esm/utrecht-checkbox.entry.js +28 -0
- package/dist/esm/utrecht-contact-card-template.entry.js +15 -0
- package/dist/esm/utrecht-custom-checkbox.entry.js +48 -0
- package/dist/esm/utrecht-digid-button.entry.js +15 -0
- package/dist/esm/utrecht-document.entry.js +3 -3
- package/dist/esm/utrecht-eherkenning-logo.entry.js +15 -0
- package/dist/esm/utrecht-eidas-logo.entry.js +15 -0
- package/dist/esm/utrecht-form-field-checkbox.entry.js +30 -0
- package/dist/esm/utrecht-form-field-description.entry.js +18 -0
- package/dist/esm/utrecht-form-field-textarea.entry.js +30 -0
- package/dist/esm/utrecht-form-field-textbox.entry.js +35 -0
- package/dist/esm/utrecht-form-toggle.entry.js +44 -0
- package/dist/esm/utrecht-heading-1.entry.js +15 -0
- package/dist/esm/utrecht-heading-2_3.entry.js +40 -0
- package/dist/esm/utrecht-heading-4.entry.js +15 -0
- package/dist/esm/utrecht-heading-5.entry.js +15 -0
- package/dist/esm/utrecht-heading-6.entry.js +15 -0
- package/dist/esm/utrecht-heading.entry.js +3 -3
- package/dist/esm/utrecht-html-content.entry.js +3 -3
- package/dist/esm/utrecht-icon-afval.entry.js +15 -0
- package/dist/esm/utrecht-icon-arrow.entry.js +15 -0
- package/dist/esm/utrecht-icon-checkmark.entry.js +15 -0
- package/dist/esm/utrecht-icon-cross.entry.js +15 -0
- package/dist/esm/utrecht-icon-error.entry.js +15 -0
- package/dist/esm/utrecht-icon-facebook.entry.js +15 -0
- package/dist/esm/utrecht-icon-filter.entry.js +15 -0
- package/dist/esm/utrecht-icon-information.entry.js +15 -0
- package/dist/esm/utrecht-icon-instagram.entry.js +15 -0
- package/dist/esm/utrecht-icon-linkedin.entry.js +15 -0
- package/dist/esm/utrecht-icon-list.entry.js +15 -0
- package/dist/esm/utrecht-icon-loupe.entry.js +15 -0
- package/dist/esm/utrecht-icon-melding.entry.js +15 -0
- package/dist/esm/utrecht-icon-paspoort.entry.js +15 -0
- package/dist/esm/utrecht-icon-rijbewijs.entry.js +15 -0
- package/dist/esm/utrecht-icon-toeslag.entry.js +15 -0
- package/dist/esm/utrecht-icon-trouwen.entry.js +15 -0
- package/dist/esm/utrecht-icon-twitter.entry.js +15 -0
- package/dist/esm/utrecht-icon-verhuizen.entry.js +15 -0
- package/dist/esm/utrecht-icon-warning.entry.js +15 -0
- package/dist/esm/utrecht-icon-whatsapp.entry.js +15 -0
- package/dist/esm/utrecht-icon-zoomin.entry.js +15 -0
- package/dist/esm/utrecht-icon-zoomout.entry.js +15 -0
- package/dist/esm/utrecht-logo-button.entry.js +15 -0
- package/dist/esm/utrecht-logo.entry.js +15 -0
- package/dist/esm/utrecht-page-content.entry.js +15 -0
- package/dist/esm/utrecht-page-footer.entry.js +3 -3
- package/dist/esm/utrecht-page-header.entry.js +15 -0
- package/dist/esm/utrecht-page.entry.js +15 -0
- package/dist/esm/utrecht-pagination.entry.js +34 -0
- package/dist/esm/utrecht-separator.entry.js +3 -3
- package/dist/esm/utrecht-sidenav.entry.js +4 -4
- package/dist/esm/utrecht-table-body.entry.js +15 -0
- package/dist/esm/utrecht-table-caption.entry.js +16 -0
- package/dist/esm/utrecht-table-cell.entry.js +15 -0
- package/dist/esm/utrecht-table-footer.entry.js +15 -0
- package/dist/esm/utrecht-table-header-cell.entry.js +15 -0
- package/dist/esm/utrecht-table-header.entry.js +15 -0
- package/dist/esm/utrecht-table-row.entry.js +15 -0
- package/dist/esm/utrecht-table.entry.js +15 -0
- package/dist/esm/utrecht-textbox.entry.js +35 -0
- package/dist/esm/utrecht.js +3 -3
- package/dist/types/article/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/backdrop/web-component/index.stencil.d.ts +4 -0
- package/dist/types/badge-counter/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/badge-data/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/badge-status/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/breadcrumb/web-component/index.stencil.d.ts +5 -0
- package/dist/types/button/web-component/index.stencil.d.ts +11 -0
- package/dist/types/checkbox/web-component/index.stencil.d.ts +16 -0
- package/dist/types/components.d.ts +900 -0
- package/dist/types/custom-checkbox/web-component/index.stencil.d.ts +17 -0
- package/dist/types/digid-button/web-component/index.stencil.d.ts +9 -0
- package/dist/types/digid-logo/web-component/index.stencil.d.ts +8 -0
- package/dist/types/document/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/eherkenning-logo/web-component/index.stencil.d.ts +8 -0
- package/dist/types/eidas-logo/web-component/index.stencil.d.ts +8 -0
- package/dist/types/form-field-checkbox/web-component/index.stencil.d.ts +18 -0
- package/dist/types/form-field-description/web-component/index.stencil.d.ts +8 -0
- package/dist/types/form-field-textarea/web-component/index.stencil.d.ts +18 -0
- package/dist/types/form-field-textbox/web-component/index.stencil.d.ts +23 -0
- package/dist/types/form-toggle/web-component/index.stencil.d.ts +14 -0
- package/dist/types/heading/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/heading-1/web-component/index.stencil.d.ts +3 -0
- package/dist/types/heading-2/web-component/index.stencil.d.ts +3 -0
- package/dist/types/heading-3/web-component/index.stencil.d.ts +3 -0
- package/dist/types/heading-4/web-component/index.stencil.d.ts +3 -0
- package/dist/types/heading-5/web-component/index.stencil.d.ts +3 -0
- package/dist/types/heading-6/web-component/index.stencil.d.ts +3 -0
- package/dist/types/html-content/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/icon/web-component/afval.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/arrow.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/checkmark.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/cross.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/error.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/facebook.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/filter.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/information.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/instagram.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/linkedin.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/list.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/loupe.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/melding.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/paspoort.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/rijbewijs.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/toeslag.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/trouwen.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/twitter.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/verhuizen.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/warning.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/whatsapp.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/zoomin.stencil.d.ts +3 -0
- package/dist/types/icon/web-component/zoomout.stencil.d.ts +3 -0
- package/dist/types/logo/web-component/index.stencil.d.ts +7 -0
- package/dist/types/logo-button/web-component/index.stencil.d.ts +9 -0
- package/dist/types/navigatie sidenav/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/page/web-component/index.stencil.d.ts +7 -0
- package/dist/types/page-content/web-component/index.stencil.d.ts +7 -0
- package/dist/types/page-footer/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/page-header/web-component/stencil.d.ts +7 -0
- package/dist/types/pagination/web-component/index.stencil.d.ts +11 -0
- package/dist/types/paragraph/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/separator/{stencil.d.ts → web-component/index.stencil.d.ts} +0 -0
- package/dist/types/stencil-public-runtime.d.ts +189 -186
- package/dist/types/table/web-component/table-body.stencil.d.ts +3 -0
- package/dist/types/table/web-component/table-caption.stencil.d.ts +3 -0
- package/dist/types/table/web-component/table-cell.stencil.d.ts +3 -0
- package/dist/types/table/web-component/table-footer.stencil.d.ts +3 -0
- package/dist/types/table/web-component/table-header-cell.stencil.d.ts +4 -0
- package/dist/types/table/web-component/table-header.stencil.d.ts +3 -0
- package/dist/types/table/web-component/table-row.stencil.d.ts +3 -0
- package/dist/types/table/web-component/table.stencil.d.ts +3 -0
- package/dist/types/templates/contact-card-template/web-component/index.stencil.d.ts +3 -0
- package/dist/types/textbox/web-component/index.stencil.d.ts +23 -0
- package/dist/utrecht/p-0194fa7f.entry.js +1 -0
- package/dist/utrecht/p-090e32d6.entry.js +1 -0
- package/dist/utrecht/p-0f3d64b2.entry.js +1 -0
- package/dist/utrecht/p-10f54e6f.entry.js +1 -0
- package/dist/utrecht/p-11ed0b35.entry.js +1 -0
- package/dist/utrecht/p-13b0e8b5.entry.js +1 -0
- package/dist/utrecht/p-159d13d8.entry.js +1 -0
- package/dist/utrecht/p-2aa38502.entry.js +1 -0
- package/dist/utrecht/p-2cd2e42e.entry.js +1 -0
- package/dist/utrecht/p-2da9cd65.entry.js +1 -0
- package/dist/utrecht/p-2f5f82db.entry.js +1 -0
- package/dist/utrecht/p-473f9e1c.entry.js +1 -0
- package/dist/utrecht/p-48ff7293.entry.js +1 -0
- package/dist/utrecht/p-4b5cfde3.entry.js +1 -0
- package/dist/utrecht/p-529e0370.entry.js +1 -0
- package/dist/utrecht/p-5a5cda2b.entry.js +1 -0
- package/dist/utrecht/p-5d2e03f9.entry.js +1 -0
- package/dist/utrecht/p-60c3ff78.js +1 -0
- package/dist/utrecht/p-63f63190.entry.js +1 -0
- package/dist/utrecht/p-6a7285d1.entry.js +1 -0
- package/dist/utrecht/p-6a7c2f56.entry.js +1 -0
- package/dist/utrecht/p-6f06960a.entry.js +1 -0
- package/dist/utrecht/p-6fc42b7c.entry.js +1 -0
- package/dist/utrecht/p-716709ad.entry.js +1 -0
- package/dist/utrecht/p-76994008.entry.js +1 -0
- package/dist/utrecht/p-8030bfef.entry.js +1 -0
- package/dist/utrecht/p-8480852a.entry.js +1 -0
- package/dist/utrecht/p-85254628.entry.js +1 -0
- package/dist/utrecht/p-85d784ef.entry.js +1 -0
- package/dist/utrecht/p-8783339b.entry.js +1 -0
- package/dist/utrecht/p-88a4fc6a.entry.js +1 -0
- package/dist/utrecht/p-88e3a314.entry.js +1 -0
- package/dist/utrecht/p-8ba5d048.entry.js +1 -0
- package/dist/utrecht/p-8e7e3244.entry.js +1 -0
- package/dist/utrecht/p-8eec7ccf.entry.js +1 -0
- package/dist/utrecht/p-98b30c5b.entry.js +1 -0
- package/dist/utrecht/p-9fbf1c4d.entry.js +1 -0
- package/dist/utrecht/p-a003f4db.entry.js +1 -0
- package/dist/utrecht/p-a57c37b2.entry.js +1 -0
- package/dist/utrecht/p-afb31b7c.entry.js +1 -0
- package/dist/utrecht/p-b0f8c85c.entry.js +1 -0
- package/dist/utrecht/p-b667ddfb.entry.js +1 -0
- package/dist/utrecht/p-bb460ad4.entry.js +1 -0
- package/dist/utrecht/p-bb8b69c2.entry.js +1 -0
- package/dist/utrecht/p-bd4e712c.entry.js +1 -0
- package/dist/utrecht/p-be94c685.entry.js +1 -0
- package/dist/utrecht/p-bee211d3.entry.js +1 -0
- package/dist/utrecht/p-c3b90927.entry.js +1 -0
- package/dist/utrecht/p-c659d683.entry.js +1 -0
- package/dist/utrecht/p-c6c0edde.entry.js +1 -0
- package/dist/utrecht/p-c88cce3d.entry.js +1 -0
- package/dist/utrecht/p-c971b496.entry.js +1 -0
- package/dist/utrecht/p-cf247794.entry.js +1 -0
- package/dist/utrecht/p-d14ef5a6.entry.js +1 -0
- package/dist/utrecht/p-d3a16e55.entry.js +1 -0
- package/dist/utrecht/p-d53c80a5.entry.js +1 -0
- package/dist/utrecht/p-d9b1668c.entry.js +1 -0
- package/dist/utrecht/p-de6e5fdc.entry.js +1 -0
- package/dist/utrecht/p-df3f83e2.entry.js +1 -0
- package/dist/utrecht/p-e26c5ecb.entry.js +1 -0
- package/dist/utrecht/p-e31acdfb.entry.js +1 -0
- package/dist/utrecht/p-f5398f9f.entry.js +1 -0
- package/dist/utrecht/p-f79c82aa.entry.js +1 -0
- package/dist/utrecht/p-f8c96e57.entry.js +1 -0
- package/dist/utrecht/p-f8e1fa76.entry.js +1 -0
- package/dist/utrecht/p-fb116c84.entry.js +1 -0
- package/dist/utrecht/p-fb2096b1.entry.js +1 -0
- package/dist/utrecht/p-fd286294.entry.js +1 -0
- package/dist/utrecht/utrecht.esm.js +1 -1
- package/loader/index.d.ts +0 -1
- package/package.json +17 -9
- package/dist/article/stencil.js +0 -21
- package/dist/badge-counter/stencil.js +0 -37
- package/dist/badge-data/stencil.js +0 -25
- package/dist/badge-status/stencil.js +0 -28
- package/dist/button/stencil.js +0 -25
- package/dist/cjs/utrecht-button.cjs.entry.js +0 -20
- package/dist/cjs/utrecht-paragraph.cjs.entry.js +0 -20
- package/dist/collection/article/bem.css +0 -8
- package/dist/collection/button/bem.css +0 -48
- package/dist/collection/document/bem.css +0 -12
- package/dist/collection/html-content/html.css +0 -633
- package/dist/collection/menulijst/pijltje.svg +0 -1
- package/dist/collection/navigatie sidenav/bem.css +0 -248
- package/dist/collection/navigatie sidenav/stencil.js +0 -40
- package/dist/collection/separator/bem.css +0 -14
- package/dist/document/stencil.js +0 -21
- package/dist/esm/utrecht-button.entry.js +0 -16
- package/dist/esm/utrecht-paragraph.entry.js +0 -16
- package/dist/heading/stencil.js +0 -50
- package/dist/html-content/stencil.js +0 -25
- package/dist/navigatie sidenav/stencil.js +0 -30
- package/dist/page-footer/stencil.js +0 -25
- package/dist/paragraph/stencil.js +0 -25
- package/dist/separator/stencil.js +0 -20
- package/dist/types/button/stencil.d.ts +0 -4
- package/dist/utrecht/p-3a69515b.entry.js +0 -1
- package/dist/utrecht/p-6f35490c.entry.js +0 -1
- package/dist/utrecht/p-7157cce8.entry.js +0 -1
- package/dist/utrecht/p-7603f427.entry.js +0 -1
- package/dist/utrecht/p-7bb755d1.entry.js +0 -1
- package/dist/utrecht/p-7e18e0f8.entry.js +0 -1
- package/dist/utrecht/p-9e84c97e.js +0 -1
- package/dist/utrecht/p-b5095fed.entry.js +0 -1
- package/dist/utrecht/p-b5aa001b.entry.js +0 -1
- package/dist/utrecht/p-e1d48327.entry.js +0 -1
- package/dist/utrecht/p-e2fb0e03.entry.js +0 -1
- package/dist/utrecht/p-f8adb4e0.entry.js +0 -1
- package/dist/utrecht/p-fc20c5e2.entry.js +0 -1
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const colors = require('picocolors');
|
|
6
|
+
const { loadConfig, optimize } = require('../svgo-node.js');
|
|
7
|
+
const pluginsMap = require('../../plugins/plugins.js');
|
|
8
|
+
const PKG = require('../../package.json');
|
|
9
|
+
const { encodeSVGDatauri, decodeSVGDatauri } = require('./tools.js');
|
|
10
|
+
|
|
11
|
+
const regSVGFile = /\.svg$/i;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Synchronously check if path is a directory. Tolerant to errors like ENOENT.
|
|
15
|
+
* @param {string} path
|
|
16
|
+
*/
|
|
17
|
+
function checkIsDir(path) {
|
|
18
|
+
try {
|
|
19
|
+
return fs.lstatSync(path).isDirectory();
|
|
20
|
+
} catch (e) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
module.exports = function makeProgram(program) {
|
|
26
|
+
program
|
|
27
|
+
.name(PKG.name)
|
|
28
|
+
.description(PKG.description, {
|
|
29
|
+
INPUT: 'Alias to --input',
|
|
30
|
+
})
|
|
31
|
+
.version(PKG.version, '-v, --version')
|
|
32
|
+
.arguments('[INPUT...]')
|
|
33
|
+
.option('-i, --input <INPUT...>', 'Input files, "-" for STDIN')
|
|
34
|
+
.option('-s, --string <STRING>', 'Input SVG data string')
|
|
35
|
+
.option(
|
|
36
|
+
'-f, --folder <FOLDER>',
|
|
37
|
+
'Input folder, optimize and rewrite all *.svg files'
|
|
38
|
+
)
|
|
39
|
+
.option(
|
|
40
|
+
'-o, --output <OUTPUT...>',
|
|
41
|
+
'Output file or folder (by default the same as the input), "-" for STDOUT'
|
|
42
|
+
)
|
|
43
|
+
.option(
|
|
44
|
+
'-p, --precision <INTEGER>',
|
|
45
|
+
'Set number of digits in the fractional part, overrides plugins params'
|
|
46
|
+
)
|
|
47
|
+
.option('--config <CONFIG>', 'Custom config file, only .js is supported')
|
|
48
|
+
.option(
|
|
49
|
+
'--datauri <FORMAT>',
|
|
50
|
+
'Output as Data URI string (base64), URI encoded (enc) or unencoded (unenc)'
|
|
51
|
+
)
|
|
52
|
+
.option(
|
|
53
|
+
'--multipass',
|
|
54
|
+
'Pass over SVGs multiple times to ensure all optimizations are applied'
|
|
55
|
+
)
|
|
56
|
+
.option('--pretty', 'Make SVG pretty printed')
|
|
57
|
+
.option('--indent <INTEGER>', 'Indent number when pretty printing SVGs')
|
|
58
|
+
.option(
|
|
59
|
+
'--eol <EOL>',
|
|
60
|
+
'Line break to use when outputting SVG: lf, crlf. If unspecified, uses platform default.'
|
|
61
|
+
)
|
|
62
|
+
.option('--final-newline', 'Ensure SVG ends with a line break')
|
|
63
|
+
.option(
|
|
64
|
+
'-r, --recursive',
|
|
65
|
+
"Use with '--folder'. Optimizes *.svg files in folders recursively."
|
|
66
|
+
)
|
|
67
|
+
.option(
|
|
68
|
+
'--exclude <PATTERN...>',
|
|
69
|
+
"Use with '--folder'. Exclude files matching regular expression pattern."
|
|
70
|
+
)
|
|
71
|
+
.option(
|
|
72
|
+
'-q, --quiet',
|
|
73
|
+
'Only output error messages, not regular status messages'
|
|
74
|
+
)
|
|
75
|
+
.option('--show-plugins', 'Show available plugins and exit')
|
|
76
|
+
// used by picocolors internally
|
|
77
|
+
.option('--no-color', 'Output plain text without color')
|
|
78
|
+
.action(action);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
async function action(args, opts, command) {
|
|
82
|
+
var input = opts.input || args;
|
|
83
|
+
var output = opts.output;
|
|
84
|
+
var config = {};
|
|
85
|
+
|
|
86
|
+
if (opts.precision != null) {
|
|
87
|
+
const number = Number.parseInt(opts.precision, 10);
|
|
88
|
+
if (Number.isNaN(number)) {
|
|
89
|
+
console.error(
|
|
90
|
+
"error: option '-p, --precision' argument must be an integer number"
|
|
91
|
+
);
|
|
92
|
+
process.exit(1);
|
|
93
|
+
} else {
|
|
94
|
+
opts.precision = number;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (opts.datauri != null) {
|
|
99
|
+
if (
|
|
100
|
+
opts.datauri !== 'base64' &&
|
|
101
|
+
opts.datauri !== 'enc' &&
|
|
102
|
+
opts.datauri !== 'unenc'
|
|
103
|
+
) {
|
|
104
|
+
console.error(
|
|
105
|
+
"error: option '--datauri' must have one of the following values: 'base64', 'enc' or 'unenc'"
|
|
106
|
+
);
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (opts.indent != null) {
|
|
112
|
+
const number = Number.parseInt(opts.indent, 10);
|
|
113
|
+
if (Number.isNaN(number)) {
|
|
114
|
+
console.error(
|
|
115
|
+
"error: option '--indent' argument must be an integer number"
|
|
116
|
+
);
|
|
117
|
+
process.exit(1);
|
|
118
|
+
} else {
|
|
119
|
+
opts.indent = number;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (opts.eol != null && opts.eol !== 'lf' && opts.eol !== 'crlf') {
|
|
124
|
+
console.error(
|
|
125
|
+
"error: option '--eol' must have one of the following values: 'lf' or 'crlf'"
|
|
126
|
+
);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// --show-plugins
|
|
131
|
+
if (opts.showPlugins) {
|
|
132
|
+
showAvailablePlugins();
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// w/o anything
|
|
137
|
+
if (
|
|
138
|
+
(input.length === 0 || input[0] === '-') &&
|
|
139
|
+
!opts.string &&
|
|
140
|
+
!opts.stdin &&
|
|
141
|
+
!opts.folder &&
|
|
142
|
+
process.stdin.isTTY === true
|
|
143
|
+
) {
|
|
144
|
+
return command.help();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (
|
|
148
|
+
typeof process == 'object' &&
|
|
149
|
+
process.versions &&
|
|
150
|
+
process.versions.node &&
|
|
151
|
+
PKG &&
|
|
152
|
+
PKG.engines.node
|
|
153
|
+
) {
|
|
154
|
+
var nodeVersion = String(PKG.engines.node).match(/\d*(\.\d+)*/)[0];
|
|
155
|
+
if (parseFloat(process.versions.node) < parseFloat(nodeVersion)) {
|
|
156
|
+
throw Error(
|
|
157
|
+
`${PKG.name} requires Node.js version ${nodeVersion} or higher.`
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// --config
|
|
163
|
+
const loadedConfig = await loadConfig(opts.config);
|
|
164
|
+
if (loadedConfig != null) {
|
|
165
|
+
config = loadedConfig;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// --quiet
|
|
169
|
+
if (opts.quiet) {
|
|
170
|
+
config.quiet = opts.quiet;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// --recursive
|
|
174
|
+
if (opts.recursive) {
|
|
175
|
+
config.recursive = opts.recursive;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// --exclude
|
|
179
|
+
config.exclude = opts.exclude
|
|
180
|
+
? opts.exclude.map((pattern) => RegExp(pattern))
|
|
181
|
+
: [];
|
|
182
|
+
|
|
183
|
+
// --precision
|
|
184
|
+
if (opts.precision != null) {
|
|
185
|
+
var precision = Math.min(Math.max(0, opts.precision), 20);
|
|
186
|
+
config.floatPrecision = precision;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// --multipass
|
|
190
|
+
if (opts.multipass) {
|
|
191
|
+
config.multipass = true;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// --pretty
|
|
195
|
+
if (opts.pretty) {
|
|
196
|
+
config.js2svg = config.js2svg || {};
|
|
197
|
+
config.js2svg.pretty = true;
|
|
198
|
+
if (opts.indent != null) {
|
|
199
|
+
config.js2svg.indent = opts.indent;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// --eol
|
|
204
|
+
if (opts.eol) {
|
|
205
|
+
config.js2svg = config.js2svg || {};
|
|
206
|
+
config.js2svg.eol = opts.eol;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// --final-newline
|
|
210
|
+
if (opts.finalNewline) {
|
|
211
|
+
config.js2svg = config.js2svg || {};
|
|
212
|
+
config.js2svg.finalNewline = true;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// --output
|
|
216
|
+
if (output) {
|
|
217
|
+
if (input.length && input[0] != '-') {
|
|
218
|
+
if (output.length == 1 && checkIsDir(output[0])) {
|
|
219
|
+
var dir = output[0];
|
|
220
|
+
for (var i = 0; i < input.length; i++) {
|
|
221
|
+
output[i] = checkIsDir(input[i])
|
|
222
|
+
? input[i]
|
|
223
|
+
: path.resolve(dir, path.basename(input[i]));
|
|
224
|
+
}
|
|
225
|
+
} else if (output.length < input.length) {
|
|
226
|
+
output = output.concat(input.slice(output.length));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
} else if (input.length) {
|
|
230
|
+
output = input;
|
|
231
|
+
} else if (opts.string) {
|
|
232
|
+
output = '-';
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (opts.datauri) {
|
|
236
|
+
config.datauri = opts.datauri;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// --folder
|
|
240
|
+
if (opts.folder) {
|
|
241
|
+
var ouputFolder = (output && output[0]) || opts.folder;
|
|
242
|
+
await optimizeFolder(config, opts.folder, ouputFolder);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// --input
|
|
246
|
+
if (input.length !== 0) {
|
|
247
|
+
// STDIN
|
|
248
|
+
if (input[0] === '-') {
|
|
249
|
+
return new Promise((resolve, reject) => {
|
|
250
|
+
var data = '',
|
|
251
|
+
file = output[0];
|
|
252
|
+
|
|
253
|
+
process.stdin
|
|
254
|
+
.on('data', (chunk) => (data += chunk))
|
|
255
|
+
.once('end', () =>
|
|
256
|
+
processSVGData(config, { input: 'string' }, data, file).then(
|
|
257
|
+
resolve,
|
|
258
|
+
reject
|
|
259
|
+
)
|
|
260
|
+
);
|
|
261
|
+
});
|
|
262
|
+
// file
|
|
263
|
+
} else {
|
|
264
|
+
await Promise.all(
|
|
265
|
+
input.map((file, n) => optimizeFile(config, file, output[n]))
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// --string
|
|
270
|
+
} else if (opts.string) {
|
|
271
|
+
var data = decodeSVGDatauri(opts.string);
|
|
272
|
+
|
|
273
|
+
return processSVGData(config, { input: 'string' }, data, output[0]);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Optimize SVG files in a directory.
|
|
279
|
+
* @param {Object} config options
|
|
280
|
+
* @param {string} dir input directory
|
|
281
|
+
* @param {string} output output directory
|
|
282
|
+
* @return {Promise}
|
|
283
|
+
*/
|
|
284
|
+
function optimizeFolder(config, dir, output) {
|
|
285
|
+
if (!config.quiet) {
|
|
286
|
+
console.log(`Processing directory '${dir}':\n`);
|
|
287
|
+
}
|
|
288
|
+
return fs.promises
|
|
289
|
+
.readdir(dir)
|
|
290
|
+
.then((files) => processDirectory(config, dir, files, output));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Process given files, take only SVG.
|
|
295
|
+
* @param {Object} config options
|
|
296
|
+
* @param {string} dir input directory
|
|
297
|
+
* @param {Array} files list of file names in the directory
|
|
298
|
+
* @param {string} output output directory
|
|
299
|
+
* @return {Promise}
|
|
300
|
+
*/
|
|
301
|
+
function processDirectory(config, dir, files, output) {
|
|
302
|
+
// take only *.svg files, recursively if necessary
|
|
303
|
+
var svgFilesDescriptions = getFilesDescriptions(config, dir, files, output);
|
|
304
|
+
|
|
305
|
+
return svgFilesDescriptions.length
|
|
306
|
+
? Promise.all(
|
|
307
|
+
svgFilesDescriptions.map((fileDescription) =>
|
|
308
|
+
optimizeFile(
|
|
309
|
+
config,
|
|
310
|
+
fileDescription.inputPath,
|
|
311
|
+
fileDescription.outputPath
|
|
312
|
+
)
|
|
313
|
+
)
|
|
314
|
+
)
|
|
315
|
+
: Promise.reject(
|
|
316
|
+
new Error(`No SVG files have been found in '${dir}' directory.`)
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Get svg files descriptions
|
|
322
|
+
* @param {Object} config options
|
|
323
|
+
* @param {string} dir input directory
|
|
324
|
+
* @param {Array} files list of file names in the directory
|
|
325
|
+
* @param {string} output output directory
|
|
326
|
+
* @return {Array}
|
|
327
|
+
*/
|
|
328
|
+
function getFilesDescriptions(config, dir, files, output) {
|
|
329
|
+
const filesInThisFolder = files
|
|
330
|
+
.filter(
|
|
331
|
+
(name) =>
|
|
332
|
+
regSVGFile.test(name) &&
|
|
333
|
+
!config.exclude.some((regExclude) => regExclude.test(name))
|
|
334
|
+
)
|
|
335
|
+
.map((name) => ({
|
|
336
|
+
inputPath: path.resolve(dir, name),
|
|
337
|
+
outputPath: path.resolve(output, name),
|
|
338
|
+
}));
|
|
339
|
+
|
|
340
|
+
return config.recursive
|
|
341
|
+
? [].concat(
|
|
342
|
+
filesInThisFolder,
|
|
343
|
+
files
|
|
344
|
+
.filter((name) => checkIsDir(path.resolve(dir, name)))
|
|
345
|
+
.map((subFolderName) => {
|
|
346
|
+
const subFolderPath = path.resolve(dir, subFolderName);
|
|
347
|
+
const subFolderFiles = fs.readdirSync(subFolderPath);
|
|
348
|
+
const subFolderOutput = path.resolve(output, subFolderName);
|
|
349
|
+
return getFilesDescriptions(
|
|
350
|
+
config,
|
|
351
|
+
subFolderPath,
|
|
352
|
+
subFolderFiles,
|
|
353
|
+
subFolderOutput
|
|
354
|
+
);
|
|
355
|
+
})
|
|
356
|
+
.reduce((a, b) => [].concat(a, b), [])
|
|
357
|
+
)
|
|
358
|
+
: filesInThisFolder;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Read SVG file and pass to processing.
|
|
363
|
+
* @param {Object} config options
|
|
364
|
+
* @param {string} file
|
|
365
|
+
* @param {string} output
|
|
366
|
+
* @return {Promise}
|
|
367
|
+
*/
|
|
368
|
+
function optimizeFile(config, file, output) {
|
|
369
|
+
return fs.promises.readFile(file, 'utf8').then(
|
|
370
|
+
(data) =>
|
|
371
|
+
processSVGData(config, { input: 'file', path: file }, data, output, file),
|
|
372
|
+
(error) => checkOptimizeFileError(config, file, output, error)
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Optimize SVG data.
|
|
378
|
+
* @param {Object} config options
|
|
379
|
+
* @param {string} data SVG content to optimize
|
|
380
|
+
* @param {string} output where to write optimized file
|
|
381
|
+
* @param {string} [input] input file name (being used if output is a directory)
|
|
382
|
+
* @return {Promise}
|
|
383
|
+
*/
|
|
384
|
+
function processSVGData(config, info, data, output, input) {
|
|
385
|
+
var startTime = Date.now(),
|
|
386
|
+
prevFileSize = Buffer.byteLength(data, 'utf8');
|
|
387
|
+
|
|
388
|
+
const result = optimize(data, { ...config, ...info });
|
|
389
|
+
if (result.modernError) {
|
|
390
|
+
console.error(colors.red(result.modernError.toString()));
|
|
391
|
+
process.exit(1);
|
|
392
|
+
}
|
|
393
|
+
if (config.datauri) {
|
|
394
|
+
result.data = encodeSVGDatauri(result.data, config.datauri);
|
|
395
|
+
}
|
|
396
|
+
var resultFileSize = Buffer.byteLength(result.data, 'utf8'),
|
|
397
|
+
processingTime = Date.now() - startTime;
|
|
398
|
+
|
|
399
|
+
return writeOutput(input, output, result.data).then(
|
|
400
|
+
function () {
|
|
401
|
+
if (!config.quiet && output != '-') {
|
|
402
|
+
if (input) {
|
|
403
|
+
console.log(`\n${path.basename(input)}:`);
|
|
404
|
+
}
|
|
405
|
+
printTimeInfo(processingTime);
|
|
406
|
+
printProfitInfo(prevFileSize, resultFileSize);
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
(error) =>
|
|
410
|
+
Promise.reject(
|
|
411
|
+
new Error(
|
|
412
|
+
error.code === 'ENOTDIR'
|
|
413
|
+
? `Error: output '${output}' is not a directory.`
|
|
414
|
+
: error
|
|
415
|
+
)
|
|
416
|
+
)
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Write result of an optimization.
|
|
422
|
+
* @param {string} input
|
|
423
|
+
* @param {string} output output file name. '-' for stdout
|
|
424
|
+
* @param {string} data data to write
|
|
425
|
+
* @return {Promise}
|
|
426
|
+
*/
|
|
427
|
+
function writeOutput(input, output, data) {
|
|
428
|
+
if (output == '-') {
|
|
429
|
+
console.log(data);
|
|
430
|
+
return Promise.resolve();
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
fs.mkdirSync(path.dirname(output), { recursive: true });
|
|
434
|
+
|
|
435
|
+
return fs.promises
|
|
436
|
+
.writeFile(output, data, 'utf8')
|
|
437
|
+
.catch((error) => checkWriteFileError(input, output, data, error));
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Write a time taken by optimization.
|
|
442
|
+
* @param {number} time time in milliseconds.
|
|
443
|
+
*/
|
|
444
|
+
function printTimeInfo(time) {
|
|
445
|
+
console.log(`Done in ${time} ms!`);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Write optimizing information in human readable format.
|
|
450
|
+
* @param {number} inBytes size before optimization.
|
|
451
|
+
* @param {number} outBytes size after optimization.
|
|
452
|
+
*/
|
|
453
|
+
function printProfitInfo(inBytes, outBytes) {
|
|
454
|
+
var profitPercents = 100 - (outBytes * 100) / inBytes;
|
|
455
|
+
|
|
456
|
+
console.log(
|
|
457
|
+
Math.round((inBytes / 1024) * 1000) / 1000 +
|
|
458
|
+
' KiB' +
|
|
459
|
+
(profitPercents < 0 ? ' + ' : ' - ') +
|
|
460
|
+
colors.green(Math.abs(Math.round(profitPercents * 10) / 10) + '%') +
|
|
461
|
+
' = ' +
|
|
462
|
+
Math.round((outBytes / 1024) * 1000) / 1000 +
|
|
463
|
+
' KiB'
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Check for errors, if it's a dir optimize the dir.
|
|
469
|
+
* @param {Object} config
|
|
470
|
+
* @param {string} input
|
|
471
|
+
* @param {string} output
|
|
472
|
+
* @param {Error} error
|
|
473
|
+
* @return {Promise}
|
|
474
|
+
*/
|
|
475
|
+
function checkOptimizeFileError(config, input, output, error) {
|
|
476
|
+
if (error.code == 'EISDIR') {
|
|
477
|
+
return optimizeFolder(config, input, output);
|
|
478
|
+
} else if (error.code == 'ENOENT') {
|
|
479
|
+
return Promise.reject(
|
|
480
|
+
new Error(`Error: no such file or directory '${error.path}'.`)
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
return Promise.reject(error);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Check for saving file error. If the output is a dir, then write file there.
|
|
488
|
+
* @param {string} input
|
|
489
|
+
* @param {string} output
|
|
490
|
+
* @param {string} data
|
|
491
|
+
* @param {Error} error
|
|
492
|
+
* @return {Promise}
|
|
493
|
+
*/
|
|
494
|
+
function checkWriteFileError(input, output, data, error) {
|
|
495
|
+
if (error.code == 'EISDIR' && input) {
|
|
496
|
+
return fs.promises.writeFile(
|
|
497
|
+
path.resolve(output, path.basename(input)),
|
|
498
|
+
data,
|
|
499
|
+
'utf8'
|
|
500
|
+
);
|
|
501
|
+
} else {
|
|
502
|
+
return Promise.reject(error);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Show list of available plugins with short description.
|
|
508
|
+
*/
|
|
509
|
+
function showAvailablePlugins() {
|
|
510
|
+
const list = Object.entries(pluginsMap)
|
|
511
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
512
|
+
.map(([name, plugin]) => ` [ ${colors.green(name)} ] ${plugin.description}`)
|
|
513
|
+
.join('\n');
|
|
514
|
+
console.log('Currently available plugins:\n' + list);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
module.exports.checkIsDir = checkIsDir;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const pluginsMap = require('../../plugins/plugins.js');
|
|
4
|
+
|
|
5
|
+
const pluginsOrder = [
|
|
6
|
+
'removeDoctype',
|
|
7
|
+
'removeXMLProcInst',
|
|
8
|
+
'removeComments',
|
|
9
|
+
'removeMetadata',
|
|
10
|
+
'removeXMLNS',
|
|
11
|
+
'removeEditorsNSData',
|
|
12
|
+
'cleanupAttrs',
|
|
13
|
+
'mergeStyles',
|
|
14
|
+
'inlineStyles',
|
|
15
|
+
'minifyStyles',
|
|
16
|
+
'convertStyleToAttrs',
|
|
17
|
+
'cleanupIDs',
|
|
18
|
+
'prefixIds',
|
|
19
|
+
'removeRasterImages',
|
|
20
|
+
'removeUselessDefs',
|
|
21
|
+
'cleanupNumericValues',
|
|
22
|
+
'cleanupListOfValues',
|
|
23
|
+
'convertColors',
|
|
24
|
+
'removeUnknownsAndDefaults',
|
|
25
|
+
'removeNonInheritableGroupAttrs',
|
|
26
|
+
'removeUselessStrokeAndFill',
|
|
27
|
+
'removeViewBox',
|
|
28
|
+
'cleanupEnableBackground',
|
|
29
|
+
'removeHiddenElems',
|
|
30
|
+
'removeEmptyText',
|
|
31
|
+
'convertShapeToPath',
|
|
32
|
+
'convertEllipseToCircle',
|
|
33
|
+
'moveElemsAttrsToGroup',
|
|
34
|
+
'moveGroupAttrsToElems',
|
|
35
|
+
'collapseGroups',
|
|
36
|
+
'convertPathData',
|
|
37
|
+
'convertTransform',
|
|
38
|
+
'removeEmptyAttrs',
|
|
39
|
+
'removeEmptyContainers',
|
|
40
|
+
'mergePaths',
|
|
41
|
+
'removeUnusedNS',
|
|
42
|
+
'sortAttrs',
|
|
43
|
+
'sortDefsChildren',
|
|
44
|
+
'removeTitle',
|
|
45
|
+
'removeDesc',
|
|
46
|
+
'removeDimensions',
|
|
47
|
+
'removeAttrs',
|
|
48
|
+
'removeAttributesBySelector',
|
|
49
|
+
'removeElementsByAttr',
|
|
50
|
+
'addClassesToSVGElement',
|
|
51
|
+
'removeStyleElement',
|
|
52
|
+
'removeScriptElement',
|
|
53
|
+
'addAttributesToSVGElement',
|
|
54
|
+
'removeOffCanvasPaths',
|
|
55
|
+
'reusePaths',
|
|
56
|
+
];
|
|
57
|
+
const defaultPlugins = pluginsOrder.filter((name) => pluginsMap[name].active);
|
|
58
|
+
exports.defaultPlugins = defaultPlugins;
|
|
59
|
+
|
|
60
|
+
const extendDefaultPlugins = (plugins) => {
|
|
61
|
+
console.warn(
|
|
62
|
+
'\n"extendDefaultPlugins" utility is deprecated.\n' +
|
|
63
|
+
'Use "preset-default" plugin with overrides instead.\n' +
|
|
64
|
+
'For example:\n' +
|
|
65
|
+
`{\n` +
|
|
66
|
+
` name: 'preset-default',\n` +
|
|
67
|
+
` params: {\n` +
|
|
68
|
+
` overrides: {\n` +
|
|
69
|
+
` // customize plugin options\n` +
|
|
70
|
+
` convertShapeToPath: {\n` +
|
|
71
|
+
` convertArcs: true\n` +
|
|
72
|
+
` },\n` +
|
|
73
|
+
` // disable plugins\n` +
|
|
74
|
+
` convertPathData: false\n` +
|
|
75
|
+
` }\n` +
|
|
76
|
+
` }\n` +
|
|
77
|
+
`}\n`
|
|
78
|
+
);
|
|
79
|
+
const extendedPlugins = pluginsOrder.map((name) => ({
|
|
80
|
+
name,
|
|
81
|
+
active: pluginsMap[name].active,
|
|
82
|
+
}));
|
|
83
|
+
for (const plugin of plugins) {
|
|
84
|
+
const resolvedPlugin = resolvePluginConfig(plugin);
|
|
85
|
+
const index = pluginsOrder.indexOf(resolvedPlugin.name);
|
|
86
|
+
if (index === -1) {
|
|
87
|
+
extendedPlugins.push(plugin);
|
|
88
|
+
} else {
|
|
89
|
+
extendedPlugins[index] = plugin;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return extendedPlugins;
|
|
93
|
+
};
|
|
94
|
+
exports.extendDefaultPlugins = extendDefaultPlugins;
|
|
95
|
+
|
|
96
|
+
const resolvePluginConfig = (plugin) => {
|
|
97
|
+
let configParams = {};
|
|
98
|
+
if (typeof plugin === 'string') {
|
|
99
|
+
// resolve builtin plugin specified as string
|
|
100
|
+
const pluginConfig = pluginsMap[plugin];
|
|
101
|
+
if (pluginConfig == null) {
|
|
102
|
+
throw Error(`Unknown builtin plugin "${plugin}" specified.`);
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
...pluginConfig,
|
|
106
|
+
name: plugin,
|
|
107
|
+
active: true,
|
|
108
|
+
params: { ...pluginConfig.params, ...configParams },
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
if (typeof plugin === 'object' && plugin != null) {
|
|
112
|
+
if (plugin.name == null) {
|
|
113
|
+
throw Error(`Plugin name should be specified`);
|
|
114
|
+
}
|
|
115
|
+
if (plugin.fn) {
|
|
116
|
+
// resolve custom plugin with implementation
|
|
117
|
+
return {
|
|
118
|
+
active: true,
|
|
119
|
+
...plugin,
|
|
120
|
+
params: { ...configParams, ...plugin.params },
|
|
121
|
+
};
|
|
122
|
+
} else {
|
|
123
|
+
// resolve builtin plugin specified as object without implementation
|
|
124
|
+
const pluginConfig = pluginsMap[plugin.name];
|
|
125
|
+
if (pluginConfig == null) {
|
|
126
|
+
throw Error(`Unknown builtin plugin "${plugin.name}" specified.`);
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
...pluginConfig,
|
|
130
|
+
active: true,
|
|
131
|
+
...plugin,
|
|
132
|
+
params: { ...pluginConfig.params, ...configParams, ...plugin.params },
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return null;
|
|
137
|
+
};
|
|
138
|
+
exports.resolvePluginConfig = resolvePluginConfig;
|