@utrecht/web-component-library-stencil 1.0.0-alpha.21 → 1.0.0-alpha.212
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-8c6952a4.js} +266 -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-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/{bem.css → web-component/index.css} +12 -1
- 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 +33 -0
- package/dist/collection/backdrop/web-component/index.stencil.js +40 -0
- 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} +16 -2
- 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} +15 -1
- 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} +20 -1
- 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 +242 -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/bem.js +37 -0
- package/dist/collection/button/html.js +17 -0
- package/dist/collection/button/stencil.css +106 -0
- package/dist/collection/button/stencil.js +93 -5
- 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 +55 -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 +62 -12
- package/dist/collection/custom-checkbox/css/template.js +46 -0
- package/dist/collection/custom-checkbox/web-component/index.css +184 -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/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 +33 -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 +106 -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 +39 -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 +128 -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 +135 -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} +72 -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 +34 -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 +34 -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 +34 -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 +34 -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 +34 -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 +34 -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/stencil.css +1209 -0
- package/dist/collection/html-content/stencil.js +3 -3
- package/dist/collection/icon/dist/afval.svg +1 -0
- package/dist/collection/icon/dist/arrow.svg +1 -0
- package/dist/collection/icon/dist/checkmark.svg +1 -0
- package/dist/collection/icon/dist/cross.svg +1 -0
- package/dist/collection/icon/dist/error.svg +1 -0
- package/dist/collection/icon/dist/facebook.svg +1 -0
- package/dist/collection/icon/dist/filter.svg +1 -0
- package/dist/collection/icon/dist/information.svg +1 -0
- package/dist/collection/icon/dist/instagram.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/melding.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/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/verhuizen.svg +1 -0
- package/dist/collection/icon/dist/warning.svg +1 -0
- package/dist/collection/icon/dist/whatsapp.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/svg/afval.svg +7 -0
- package/dist/collection/icon/svg/arrow.svg +9 -0
- package/dist/collection/icon/svg/checkmark.svg +9 -0
- package/dist/collection/icon/svg/cross.svg +9 -0
- package/dist/collection/icon/svg/error.svg +15 -0
- package/dist/collection/icon/svg/facebook.svg +9 -0
- package/dist/collection/icon/svg/filter.svg +6 -0
- package/dist/collection/icon/svg/information.svg +14 -0
- package/dist/collection/icon/svg/instagram.svg +16 -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/melding.svg +5 -0
- package/dist/collection/icon/svg/paspoort.svg +5 -0
- package/dist/collection/icon/svg/rijbewijs.svg +8 -0
- package/dist/collection/icon/svg/toeslag.svg +5 -0
- package/dist/collection/icon/svg/trouwen.svg +4 -0
- package/dist/collection/icon/svg/twitter.svg +9 -0
- package/dist/collection/icon/svg/verhuizen.svg +9 -0
- package/dist/collection/icon/svg/warning.svg +19 -0
- package/dist/collection/icon/svg/whatsapp.svg +9 -0
- package/dist/collection/icon/svg/zoomin.svg +13 -0
- package/dist/collection/icon/svg/zoomout.svg +9 -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 +33 -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 +30 -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 +31 -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} +30 -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 +30 -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 +118 -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} +18 -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/{bem.css → web-component/index.css} +18 -4
- 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/templates/contact-card-template/css/template.js +30 -0
- package/dist/collection/templates/contact-card-template/web-component/index.css +178 -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 +98 -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 +300 -0
- package/dist/custom-elements/index.js +1075 -88
- package/dist/esm/{index-73546a7d.js → index-86b2856e.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-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/stencil.d.ts +6 -0
- package/dist/types/checkbox/web-component/index.stencil.d.ts +16 -0
- package/dist/types/components.d.ts +792 -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/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/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-02a37490.entry.js +1 -0
- package/dist/utrecht/p-06370f11.entry.js +1 -0
- package/dist/utrecht/p-0babe0e1.entry.js +1 -0
- package/dist/utrecht/p-0bd956aa.entry.js +1 -0
- package/dist/utrecht/p-0de41080.entry.js +1 -0
- package/dist/utrecht/p-0dff1f3a.entry.js +1 -0
- package/dist/utrecht/p-10ed9dbc.entry.js +1 -0
- package/dist/utrecht/p-1d6f6429.entry.js +1 -0
- package/dist/utrecht/p-1e2310d5.entry.js +1 -0
- package/dist/utrecht/p-20ed6fc5.entry.js +1 -0
- package/dist/utrecht/p-22b0b0ab.entry.js +1 -0
- package/dist/utrecht/p-24f6df95.entry.js +1 -0
- package/dist/utrecht/p-28d9ca01.entry.js +1 -0
- package/dist/utrecht/p-33460a3c.entry.js +1 -0
- package/dist/utrecht/p-3d9f0a68.entry.js +1 -0
- package/dist/utrecht/p-450b6c65.entry.js +1 -0
- package/dist/utrecht/p-45462b1b.entry.js +1 -0
- package/dist/utrecht/p-494a2de2.entry.js +1 -0
- package/dist/utrecht/p-4992cc17.entry.js +1 -0
- package/dist/utrecht/p-52b840b4.entry.js +1 -0
- package/dist/utrecht/p-5a1ae611.entry.js +1 -0
- package/dist/utrecht/p-64b8a7bd.entry.js +1 -0
- package/dist/utrecht/p-6c34702d.entry.js +1 -0
- package/dist/utrecht/p-706f3a46.entry.js +1 -0
- package/dist/utrecht/p-78c8320a.entry.js +1 -0
- package/dist/utrecht/p-7a694b68.entry.js +1 -0
- package/dist/utrecht/p-7bb345f1.entry.js +1 -0
- package/dist/utrecht/p-7e3395e4.entry.js +1 -0
- package/dist/utrecht/p-8410a51f.entry.js +1 -0
- package/dist/utrecht/p-844a51cd.entry.js +1 -0
- package/dist/utrecht/p-847f24f7.entry.js +1 -0
- package/dist/utrecht/p-8ca6b8b1.js +1 -0
- package/dist/utrecht/p-8d742d31.entry.js +1 -0
- package/dist/utrecht/p-9f71d7ad.entry.js +1 -0
- package/dist/utrecht/p-a3ba8266.entry.js +1 -0
- package/dist/utrecht/p-a6e74d71.entry.js +1 -0
- package/dist/utrecht/p-a9446486.entry.js +1 -0
- package/dist/utrecht/p-aa3e8f73.entry.js +1 -0
- package/dist/utrecht/p-aa7f0306.entry.js +1 -0
- package/dist/utrecht/p-afd9a538.entry.js +1 -0
- package/dist/utrecht/p-b34cf79e.entry.js +1 -0
- package/dist/utrecht/p-b51a7258.entry.js +1 -0
- package/dist/utrecht/p-b7635555.entry.js +1 -0
- package/dist/utrecht/p-b97f0d95.entry.js +1 -0
- package/dist/utrecht/p-c0b17517.entry.js +1 -0
- package/dist/utrecht/p-c7c1b303.entry.js +1 -0
- package/dist/utrecht/p-ce352a8d.entry.js +1 -0
- package/dist/utrecht/p-cf06abf1.entry.js +1 -0
- package/dist/utrecht/p-d503851f.entry.js +1 -0
- package/dist/utrecht/p-d7c2ff02.entry.js +1 -0
- package/dist/utrecht/p-dad5dcf5.entry.js +1 -0
- package/dist/utrecht/p-dbfb3e72.entry.js +1 -0
- package/dist/utrecht/p-e24992e2.entry.js +1 -0
- package/dist/utrecht/p-e94ddc39.entry.js +1 -0
- package/dist/utrecht/p-ea583d80.entry.js +1 -0
- package/dist/utrecht/p-edcc904a.entry.js +1 -0
- package/dist/utrecht/p-f430397a.entry.js +1 -0
- package/dist/utrecht/p-f5aec0d3.entry.js +1 -0
- package/dist/utrecht/p-f6477f7f.entry.js +1 -0
- package/dist/utrecht/p-fa00a874.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/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/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/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,347 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {import('./types').PathDataItem} PathDataItem
|
|
5
|
+
* @typedef {import('./types').PathDataCommand} PathDataCommand
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Based on https://www.w3.org/TR/SVG11/paths.html#PathDataBNF
|
|
9
|
+
|
|
10
|
+
const argsCountPerCommand = {
|
|
11
|
+
M: 2,
|
|
12
|
+
m: 2,
|
|
13
|
+
Z: 0,
|
|
14
|
+
z: 0,
|
|
15
|
+
L: 2,
|
|
16
|
+
l: 2,
|
|
17
|
+
H: 1,
|
|
18
|
+
h: 1,
|
|
19
|
+
V: 1,
|
|
20
|
+
v: 1,
|
|
21
|
+
C: 6,
|
|
22
|
+
c: 6,
|
|
23
|
+
S: 4,
|
|
24
|
+
s: 4,
|
|
25
|
+
Q: 4,
|
|
26
|
+
q: 4,
|
|
27
|
+
T: 2,
|
|
28
|
+
t: 2,
|
|
29
|
+
A: 7,
|
|
30
|
+
a: 7,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @type {(c: string) => c is PathDataCommand}
|
|
35
|
+
*/
|
|
36
|
+
const isCommand = (c) => {
|
|
37
|
+
return c in argsCountPerCommand;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @type {(c: string) => boolean}
|
|
42
|
+
*/
|
|
43
|
+
const isWsp = (c) => {
|
|
44
|
+
const codePoint = c.codePointAt(0);
|
|
45
|
+
return (
|
|
46
|
+
codePoint === 0x20 ||
|
|
47
|
+
codePoint === 0x9 ||
|
|
48
|
+
codePoint === 0xd ||
|
|
49
|
+
codePoint === 0xa
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @type {(c: string) => boolean}
|
|
55
|
+
*/
|
|
56
|
+
const isDigit = (c) => {
|
|
57
|
+
const codePoint = c.codePointAt(0);
|
|
58
|
+
if (codePoint == null) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return 48 <= codePoint && codePoint <= 57;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @typedef {'none' | 'sign' | 'whole' | 'decimal_point' | 'decimal' | 'e' | 'exponent_sign' | 'exponent'} ReadNumberState
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @type {(string: string, cursor: number) => [number, number | null]}
|
|
70
|
+
*/
|
|
71
|
+
const readNumber = (string, cursor) => {
|
|
72
|
+
let i = cursor;
|
|
73
|
+
let value = '';
|
|
74
|
+
let state = /** @type {ReadNumberState} */ ('none');
|
|
75
|
+
for (; i < string.length; i += 1) {
|
|
76
|
+
const c = string[i];
|
|
77
|
+
if (c === '+' || c === '-') {
|
|
78
|
+
if (state === 'none') {
|
|
79
|
+
state = 'sign';
|
|
80
|
+
value += c;
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if (state === 'e') {
|
|
84
|
+
state = 'exponent_sign';
|
|
85
|
+
value += c;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (isDigit(c)) {
|
|
90
|
+
if (state === 'none' || state === 'sign' || state === 'whole') {
|
|
91
|
+
state = 'whole';
|
|
92
|
+
value += c;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if (state === 'decimal_point' || state === 'decimal') {
|
|
96
|
+
state = 'decimal';
|
|
97
|
+
value += c;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (state === 'e' || state === 'exponent_sign' || state === 'exponent') {
|
|
101
|
+
state = 'exponent';
|
|
102
|
+
value += c;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (c === '.') {
|
|
107
|
+
if (state === 'none' || state === 'sign' || state === 'whole') {
|
|
108
|
+
state = 'decimal_point';
|
|
109
|
+
value += c;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (c === 'E' || c == 'e') {
|
|
114
|
+
if (
|
|
115
|
+
state === 'whole' ||
|
|
116
|
+
state === 'decimal_point' ||
|
|
117
|
+
state === 'decimal'
|
|
118
|
+
) {
|
|
119
|
+
state = 'e';
|
|
120
|
+
value += c;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
const number = Number.parseFloat(value);
|
|
127
|
+
if (Number.isNaN(number)) {
|
|
128
|
+
return [cursor, null];
|
|
129
|
+
} else {
|
|
130
|
+
// step back to delegate iteration to parent loop
|
|
131
|
+
return [i - 1, number];
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @type {(string: string) => Array<PathDataItem>}
|
|
137
|
+
*/
|
|
138
|
+
const parsePathData = (string) => {
|
|
139
|
+
/**
|
|
140
|
+
* @type {Array<PathDataItem>}
|
|
141
|
+
*/
|
|
142
|
+
const pathData = [];
|
|
143
|
+
/**
|
|
144
|
+
* @type {null | PathDataCommand}
|
|
145
|
+
*/
|
|
146
|
+
let command = null;
|
|
147
|
+
let args = /** @type {number[]} */ ([]);
|
|
148
|
+
let argsCount = 0;
|
|
149
|
+
let canHaveComma = false;
|
|
150
|
+
let hadComma = false;
|
|
151
|
+
for (let i = 0; i < string.length; i += 1) {
|
|
152
|
+
const c = string.charAt(i);
|
|
153
|
+
if (isWsp(c)) {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
// allow comma only between arguments
|
|
157
|
+
if (canHaveComma && c === ',') {
|
|
158
|
+
if (hadComma) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
hadComma = true;
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (isCommand(c)) {
|
|
165
|
+
if (hadComma) {
|
|
166
|
+
return pathData;
|
|
167
|
+
}
|
|
168
|
+
if (command == null) {
|
|
169
|
+
// moveto should be leading command
|
|
170
|
+
if (c !== 'M' && c !== 'm') {
|
|
171
|
+
return pathData;
|
|
172
|
+
}
|
|
173
|
+
} else {
|
|
174
|
+
// stop if previous command arguments are not flushed
|
|
175
|
+
if (args.length !== 0) {
|
|
176
|
+
return pathData;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
command = c;
|
|
180
|
+
args = [];
|
|
181
|
+
argsCount = argsCountPerCommand[command];
|
|
182
|
+
canHaveComma = false;
|
|
183
|
+
// flush command without arguments
|
|
184
|
+
if (argsCount === 0) {
|
|
185
|
+
pathData.push({ command, args });
|
|
186
|
+
}
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
// avoid parsing arguments if no command detected
|
|
190
|
+
if (command == null) {
|
|
191
|
+
return pathData;
|
|
192
|
+
}
|
|
193
|
+
// read next argument
|
|
194
|
+
let newCursor = i;
|
|
195
|
+
let number = null;
|
|
196
|
+
if (command === 'A' || command === 'a') {
|
|
197
|
+
const position = args.length;
|
|
198
|
+
if (position === 0 || position === 1) {
|
|
199
|
+
// allow only positive number without sign as first two arguments
|
|
200
|
+
if (c !== '+' && c !== '-') {
|
|
201
|
+
[newCursor, number] = readNumber(string, i);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (position === 2 || position === 5 || position === 6) {
|
|
205
|
+
[newCursor, number] = readNumber(string, i);
|
|
206
|
+
}
|
|
207
|
+
if (position === 3 || position === 4) {
|
|
208
|
+
// read flags
|
|
209
|
+
if (c === '0') {
|
|
210
|
+
number = 0;
|
|
211
|
+
}
|
|
212
|
+
if (c === '1') {
|
|
213
|
+
number = 1;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
[newCursor, number] = readNumber(string, i);
|
|
218
|
+
}
|
|
219
|
+
if (number == null) {
|
|
220
|
+
return pathData;
|
|
221
|
+
}
|
|
222
|
+
args.push(number);
|
|
223
|
+
canHaveComma = true;
|
|
224
|
+
hadComma = false;
|
|
225
|
+
i = newCursor;
|
|
226
|
+
// flush arguments when necessary count is reached
|
|
227
|
+
if (args.length === argsCount) {
|
|
228
|
+
pathData.push({ command, args });
|
|
229
|
+
// subsequent moveto coordinates are threated as implicit lineto commands
|
|
230
|
+
if (command === 'M') {
|
|
231
|
+
command = 'L';
|
|
232
|
+
}
|
|
233
|
+
if (command === 'm') {
|
|
234
|
+
command = 'l';
|
|
235
|
+
}
|
|
236
|
+
args = [];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return pathData;
|
|
240
|
+
};
|
|
241
|
+
exports.parsePathData = parsePathData;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @type {(number: number, precision?: number) => string}
|
|
245
|
+
*/
|
|
246
|
+
const stringifyNumber = (number, precision) => {
|
|
247
|
+
if (precision != null) {
|
|
248
|
+
const ratio = 10 ** precision;
|
|
249
|
+
number = Math.round(number * ratio) / ratio;
|
|
250
|
+
}
|
|
251
|
+
// remove zero whole from decimal number
|
|
252
|
+
return number.toString().replace(/^0\./, '.').replace(/^-0\./, '-.');
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Elliptical arc large-arc and sweep flags are rendered with spaces
|
|
257
|
+
* because many non-browser environments are not able to parse such paths
|
|
258
|
+
*
|
|
259
|
+
* @type {(
|
|
260
|
+
* command: string,
|
|
261
|
+
* args: number[],
|
|
262
|
+
* precision?: number,
|
|
263
|
+
* disableSpaceAfterFlags?: boolean
|
|
264
|
+
* ) => string}
|
|
265
|
+
*/
|
|
266
|
+
const stringifyArgs = (command, args, precision, disableSpaceAfterFlags) => {
|
|
267
|
+
let result = '';
|
|
268
|
+
let prev = '';
|
|
269
|
+
for (let i = 0; i < args.length; i += 1) {
|
|
270
|
+
const number = args[i];
|
|
271
|
+
const numberString = stringifyNumber(number, precision);
|
|
272
|
+
if (
|
|
273
|
+
disableSpaceAfterFlags &&
|
|
274
|
+
(command === 'A' || command === 'a') &&
|
|
275
|
+
// consider combined arcs
|
|
276
|
+
(i % 7 === 4 || i % 7 === 5)
|
|
277
|
+
) {
|
|
278
|
+
result += numberString;
|
|
279
|
+
} else if (i === 0 || numberString.startsWith('-')) {
|
|
280
|
+
// avoid space before first and negative numbers
|
|
281
|
+
result += numberString;
|
|
282
|
+
} else if (prev.includes('.') && numberString.startsWith('.')) {
|
|
283
|
+
// remove space before decimal with zero whole
|
|
284
|
+
// only when previous number is also decimal
|
|
285
|
+
result += numberString;
|
|
286
|
+
} else {
|
|
287
|
+
result += ` ${numberString}`;
|
|
288
|
+
}
|
|
289
|
+
prev = numberString;
|
|
290
|
+
}
|
|
291
|
+
return result;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @typedef {{
|
|
296
|
+
* pathData: Array<PathDataItem>;
|
|
297
|
+
* precision?: number;
|
|
298
|
+
* disableSpaceAfterFlags?: boolean;
|
|
299
|
+
* }} StringifyPathDataOptions
|
|
300
|
+
*/
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @type {(options: StringifyPathDataOptions) => string}
|
|
304
|
+
*/
|
|
305
|
+
const stringifyPathData = ({ pathData, precision, disableSpaceAfterFlags }) => {
|
|
306
|
+
// combine sequence of the same commands
|
|
307
|
+
let combined = [];
|
|
308
|
+
for (let i = 0; i < pathData.length; i += 1) {
|
|
309
|
+
const { command, args } = pathData[i];
|
|
310
|
+
if (i === 0) {
|
|
311
|
+
combined.push({ command, args });
|
|
312
|
+
} else {
|
|
313
|
+
/**
|
|
314
|
+
* @type {PathDataItem}
|
|
315
|
+
*/
|
|
316
|
+
const last = combined[combined.length - 1];
|
|
317
|
+
// match leading moveto with following lineto
|
|
318
|
+
if (i === 1) {
|
|
319
|
+
if (command === 'L') {
|
|
320
|
+
last.command = 'M';
|
|
321
|
+
}
|
|
322
|
+
if (command === 'l') {
|
|
323
|
+
last.command = 'm';
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (
|
|
327
|
+
(last.command === command &&
|
|
328
|
+
last.command !== 'M' &&
|
|
329
|
+
last.command !== 'm') ||
|
|
330
|
+
// combine matching moveto and lineto sequences
|
|
331
|
+
(last.command === 'M' && command === 'L') ||
|
|
332
|
+
(last.command === 'm' && command === 'l')
|
|
333
|
+
) {
|
|
334
|
+
last.args = [...last.args, ...args];
|
|
335
|
+
} else {
|
|
336
|
+
combined.push({ command, args });
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
let result = '';
|
|
341
|
+
for (const { command, args } of combined) {
|
|
342
|
+
result +=
|
|
343
|
+
command + stringifyArgs(command, args, precision, disableSpaceAfterFlags);
|
|
344
|
+
}
|
|
345
|
+
return result;
|
|
346
|
+
};
|
|
347
|
+
exports.stringifyPathData = stringifyPathData;
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {import('./types').XastParent} XastParent
|
|
5
|
+
* @typedef {import('./types').XastRoot} XastRoot
|
|
6
|
+
* @typedef {import('./types').XastElement} XastElement
|
|
7
|
+
* @typedef {import('./types').XastInstruction} XastInstruction
|
|
8
|
+
* @typedef {import('./types').XastDoctype} XastDoctype
|
|
9
|
+
* @typedef {import('./types').XastText} XastText
|
|
10
|
+
* @typedef {import('./types').XastCdata} XastCdata
|
|
11
|
+
* @typedef {import('./types').XastComment} XastComment
|
|
12
|
+
* @typedef {import('./types').StringifyOptions} StringifyOptions
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const { textElems } = require('../plugins/_collections.js');
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @typedef {{
|
|
19
|
+
* width: void | string,
|
|
20
|
+
* height: void | string,
|
|
21
|
+
* indent: string,
|
|
22
|
+
* textContext: null | XastElement,
|
|
23
|
+
* indentLevel: number,
|
|
24
|
+
* }} State
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @typedef {Required<StringifyOptions>} Options
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @type {(char: string) => string}
|
|
33
|
+
*/
|
|
34
|
+
const encodeEntity = (char) => {
|
|
35
|
+
return entities[char];
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @type {Options}
|
|
40
|
+
*/
|
|
41
|
+
const defaults = {
|
|
42
|
+
doctypeStart: '<!DOCTYPE',
|
|
43
|
+
doctypeEnd: '>',
|
|
44
|
+
procInstStart: '<?',
|
|
45
|
+
procInstEnd: '?>',
|
|
46
|
+
tagOpenStart: '<',
|
|
47
|
+
tagOpenEnd: '>',
|
|
48
|
+
tagCloseStart: '</',
|
|
49
|
+
tagCloseEnd: '>',
|
|
50
|
+
tagShortStart: '<',
|
|
51
|
+
tagShortEnd: '/>',
|
|
52
|
+
attrStart: '="',
|
|
53
|
+
attrEnd: '"',
|
|
54
|
+
commentStart: '<!--',
|
|
55
|
+
commentEnd: '-->',
|
|
56
|
+
cdataStart: '<![CDATA[',
|
|
57
|
+
cdataEnd: ']]>',
|
|
58
|
+
textStart: '',
|
|
59
|
+
textEnd: '',
|
|
60
|
+
indent: 4,
|
|
61
|
+
regEntities: /[&'"<>]/g,
|
|
62
|
+
regValEntities: /[&"<>]/g,
|
|
63
|
+
encodeEntity: encodeEntity,
|
|
64
|
+
pretty: false,
|
|
65
|
+
useShortTags: true,
|
|
66
|
+
eol: 'lf',
|
|
67
|
+
finalNewline: false,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @type {Record<string, string>}
|
|
72
|
+
*/
|
|
73
|
+
const entities = {
|
|
74
|
+
'&': '&',
|
|
75
|
+
"'": ''',
|
|
76
|
+
'"': '"',
|
|
77
|
+
'>': '>',
|
|
78
|
+
'<': '<',
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* convert XAST to SVG string
|
|
83
|
+
*
|
|
84
|
+
* @type {(data: XastRoot, config: StringifyOptions) => {
|
|
85
|
+
* data: string,
|
|
86
|
+
* info: {
|
|
87
|
+
* width: void | string,
|
|
88
|
+
* height: void | string
|
|
89
|
+
* }
|
|
90
|
+
* }}
|
|
91
|
+
*/
|
|
92
|
+
const stringifySvg = (data, userOptions = {}) => {
|
|
93
|
+
/**
|
|
94
|
+
* @type {Options}
|
|
95
|
+
*/
|
|
96
|
+
const config = { ...defaults, ...userOptions };
|
|
97
|
+
const indent = config.indent;
|
|
98
|
+
let newIndent = ' ';
|
|
99
|
+
if (typeof indent === 'number' && Number.isNaN(indent) === false) {
|
|
100
|
+
newIndent = indent < 0 ? '\t' : ' '.repeat(indent);
|
|
101
|
+
} else if (typeof indent === 'string') {
|
|
102
|
+
newIndent = indent;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @type {State}
|
|
106
|
+
*/
|
|
107
|
+
const state = {
|
|
108
|
+
// TODO remove width and height in v3
|
|
109
|
+
width: undefined,
|
|
110
|
+
height: undefined,
|
|
111
|
+
indent: newIndent,
|
|
112
|
+
textContext: null,
|
|
113
|
+
indentLevel: 0,
|
|
114
|
+
};
|
|
115
|
+
const eol = config.eol === 'crlf' ? '\r\n' : '\n';
|
|
116
|
+
if (config.pretty) {
|
|
117
|
+
config.doctypeEnd += eol;
|
|
118
|
+
config.procInstEnd += eol;
|
|
119
|
+
config.commentEnd += eol;
|
|
120
|
+
config.cdataEnd += eol;
|
|
121
|
+
config.tagShortEnd += eol;
|
|
122
|
+
config.tagOpenEnd += eol;
|
|
123
|
+
config.tagCloseEnd += eol;
|
|
124
|
+
config.textEnd += eol;
|
|
125
|
+
}
|
|
126
|
+
let svg = stringifyNode(data, config, state);
|
|
127
|
+
if (config.finalNewline && svg.length > 0 && svg[svg.length - 1] !== '\n') {
|
|
128
|
+
svg += eol;
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
data: svg,
|
|
132
|
+
info: {
|
|
133
|
+
width: state.width,
|
|
134
|
+
height: state.height,
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
exports.stringifySvg = stringifySvg;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @type {(node: XastParent, config: Options, state: State) => string}
|
|
142
|
+
*/
|
|
143
|
+
const stringifyNode = (data, config, state) => {
|
|
144
|
+
let svg = '';
|
|
145
|
+
state.indentLevel += 1;
|
|
146
|
+
for (const item of data.children) {
|
|
147
|
+
if (item.type === 'element') {
|
|
148
|
+
svg += stringifyElement(item, config, state);
|
|
149
|
+
}
|
|
150
|
+
if (item.type === 'text') {
|
|
151
|
+
svg += stringifyText(item, config, state);
|
|
152
|
+
}
|
|
153
|
+
if (item.type === 'doctype') {
|
|
154
|
+
svg += stringifyDoctype(item, config);
|
|
155
|
+
}
|
|
156
|
+
if (item.type === 'instruction') {
|
|
157
|
+
svg += stringifyInstruction(item, config);
|
|
158
|
+
}
|
|
159
|
+
if (item.type === 'comment') {
|
|
160
|
+
svg += stringifyComment(item, config);
|
|
161
|
+
}
|
|
162
|
+
if (item.type === 'cdata') {
|
|
163
|
+
svg += stringifyCdata(item, config, state);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
state.indentLevel -= 1;
|
|
167
|
+
return svg;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* create indent string in accordance with the current node level.
|
|
172
|
+
*
|
|
173
|
+
* @type {(config: Options, state: State) => string}
|
|
174
|
+
*/
|
|
175
|
+
const createIndent = (config, state) => {
|
|
176
|
+
let indent = '';
|
|
177
|
+
if (config.pretty && state.textContext == null) {
|
|
178
|
+
indent = state.indent.repeat(state.indentLevel - 1);
|
|
179
|
+
}
|
|
180
|
+
return indent;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @type {(node: XastDoctype, config: Options) => string}
|
|
185
|
+
*/
|
|
186
|
+
const stringifyDoctype = (node, config) => {
|
|
187
|
+
return config.doctypeStart + node.data.doctype + config.doctypeEnd;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @type {(node: XastInstruction, config: Options) => string}
|
|
192
|
+
*/
|
|
193
|
+
const stringifyInstruction = (node, config) => {
|
|
194
|
+
return (
|
|
195
|
+
config.procInstStart + node.name + ' ' + node.value + config.procInstEnd
|
|
196
|
+
);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @type {(node: XastComment, config: Options) => string}
|
|
201
|
+
*/
|
|
202
|
+
const stringifyComment = (node, config) => {
|
|
203
|
+
return config.commentStart + node.value + config.commentEnd;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @type {(node: XastCdata, config: Options, state: State) => string}
|
|
208
|
+
*/
|
|
209
|
+
const stringifyCdata = (node, config, state) => {
|
|
210
|
+
return (
|
|
211
|
+
createIndent(config, state) +
|
|
212
|
+
config.cdataStart +
|
|
213
|
+
node.value +
|
|
214
|
+
config.cdataEnd
|
|
215
|
+
);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @type {(node: XastElement, config: Options, state: State) => string}
|
|
220
|
+
*/
|
|
221
|
+
const stringifyElement = (node, config, state) => {
|
|
222
|
+
// beautiful injection for obtaining SVG information :)
|
|
223
|
+
if (
|
|
224
|
+
node.name === 'svg' &&
|
|
225
|
+
node.attributes.width != null &&
|
|
226
|
+
node.attributes.height != null
|
|
227
|
+
) {
|
|
228
|
+
state.width = node.attributes.width;
|
|
229
|
+
state.height = node.attributes.height;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// empty element and short tag
|
|
233
|
+
if (node.children.length === 0) {
|
|
234
|
+
if (config.useShortTags) {
|
|
235
|
+
return (
|
|
236
|
+
createIndent(config, state) +
|
|
237
|
+
config.tagShortStart +
|
|
238
|
+
node.name +
|
|
239
|
+
stringifyAttributes(node, config) +
|
|
240
|
+
config.tagShortEnd
|
|
241
|
+
);
|
|
242
|
+
} else {
|
|
243
|
+
return (
|
|
244
|
+
createIndent(config, state) +
|
|
245
|
+
config.tagShortStart +
|
|
246
|
+
node.name +
|
|
247
|
+
stringifyAttributes(node, config) +
|
|
248
|
+
config.tagOpenEnd +
|
|
249
|
+
config.tagCloseStart +
|
|
250
|
+
node.name +
|
|
251
|
+
config.tagCloseEnd
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
// non-empty element
|
|
255
|
+
} else {
|
|
256
|
+
let tagOpenStart = config.tagOpenStart;
|
|
257
|
+
let tagOpenEnd = config.tagOpenEnd;
|
|
258
|
+
let tagCloseStart = config.tagCloseStart;
|
|
259
|
+
let tagCloseEnd = config.tagCloseEnd;
|
|
260
|
+
let openIndent = createIndent(config, state);
|
|
261
|
+
let closeIndent = createIndent(config, state);
|
|
262
|
+
|
|
263
|
+
if (state.textContext) {
|
|
264
|
+
tagOpenStart = defaults.tagOpenStart;
|
|
265
|
+
tagOpenEnd = defaults.tagOpenEnd;
|
|
266
|
+
tagCloseStart = defaults.tagCloseStart;
|
|
267
|
+
tagCloseEnd = defaults.tagCloseEnd;
|
|
268
|
+
openIndent = '';
|
|
269
|
+
} else if (textElems.includes(node.name)) {
|
|
270
|
+
tagOpenEnd = defaults.tagOpenEnd;
|
|
271
|
+
tagCloseStart = defaults.tagCloseStart;
|
|
272
|
+
closeIndent = '';
|
|
273
|
+
state.textContext = node;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const children = stringifyNode(node, config, state);
|
|
277
|
+
|
|
278
|
+
if (state.textContext === node) {
|
|
279
|
+
state.textContext = null;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
return (
|
|
283
|
+
openIndent +
|
|
284
|
+
tagOpenStart +
|
|
285
|
+
node.name +
|
|
286
|
+
stringifyAttributes(node, config) +
|
|
287
|
+
tagOpenEnd +
|
|
288
|
+
children +
|
|
289
|
+
closeIndent +
|
|
290
|
+
tagCloseStart +
|
|
291
|
+
node.name +
|
|
292
|
+
tagCloseEnd
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @type {(node: XastElement, config: Options) => string}
|
|
299
|
+
*/
|
|
300
|
+
const stringifyAttributes = (node, config) => {
|
|
301
|
+
let attrs = '';
|
|
302
|
+
for (const [name, value] of Object.entries(node.attributes)) {
|
|
303
|
+
// TODO remove attributes without values support in v3
|
|
304
|
+
if (value !== undefined) {
|
|
305
|
+
const encodedValue = value
|
|
306
|
+
.toString()
|
|
307
|
+
.replace(config.regValEntities, config.encodeEntity);
|
|
308
|
+
attrs += ' ' + name + config.attrStart + encodedValue + config.attrEnd;
|
|
309
|
+
} else {
|
|
310
|
+
attrs += ' ' + name;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return attrs;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @type {(node: XastText, config: Options, state: State) => string}
|
|
318
|
+
*/
|
|
319
|
+
const stringifyText = (node, config, state) => {
|
|
320
|
+
return (
|
|
321
|
+
createIndent(config, state) +
|
|
322
|
+
config.textStart +
|
|
323
|
+
node.value.replace(config.regEntities, config.encodeEntity) +
|
|
324
|
+
(state.textContext ? '' : config.textEnd)
|
|
325
|
+
);
|
|
326
|
+
};
|