From 6be3c4e02592ff391db697b400106400dc4741a7 Mon Sep 17 00:00:00 2001 From: Julien Fraichot Date: Thu, 26 Sep 2024 16:28:23 +0200 Subject: [PATCH 1/5] style(Lint): lint scss files with stylelint --- .stylelintrc.json | 9 +++++++ .../_components.blockcerts-logo-css.js | 2 +- .../_components.blockcerts-logo.scss | 2 +- .../_components.download-link-css.js | 2 +- .../_components.download-link.scss | 2 +- .../_components.drag-and-drop.scss | 2 +- .../FileUpload/_components.file-upload-css.js | 2 +- .../FileUpload/_components.file-upload.scss | 1 - ..._components.final-verification-step-css.js | 2 +- .../_components.final-verification-step.scss | 4 --- .../GlobalStylesheet/_generic.global.scss | 2 +- .../atoms/Input/_components.input-css.js | 2 +- .../atoms/Input/_components.input.scss | 26 +++---------------- .../molecules/Modal/_components.modal.scss | 2 +- .../_components.verification-step-css.js | 2 +- .../_components.verification-step.scss | 8 +++--- .../CardCertificate/_components.card-css.js | 2 +- .../CardCertificate/_components.card.scss | 2 +- .../_components.certificate-input-css.js | 2 +- .../_components.certificate-input.scss | 4 +-- .../_components.full-certificate-css.js | 2 +- .../_components.full-certificate.scss | 4 +-- .../_components.fullscreen-certificate.scss | 4 +-- .../_components.substeps-list-css.js | 2 +- .../_components.substeps-list.scss | 9 +++---- .../_components.verification-modal.scss | 2 +- .../_components.verification-process-css.js | 2 +- .../_components.verification-process.scss | 3 --- src/shared-styles/_components.badge.scss | 4 +-- src/shared-styles/_objects.link.scss | 2 +- src/shared-styles/_objects.overlay.scss | 2 +- src/shared-styles/_settings.variables.scss | 22 ++++++---------- src/shared-styles/_utils.animations.scss | 4 --- 33 files changed, 55 insertions(+), 87 deletions(-) create mode 100644 .stylelintrc.json diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 000000000..608b9acf7 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,9 @@ +{ + "extends": "stylelint-config-standard-scss", + "rules": { + "selector-class-pattern": null, + "scss/dollar-variable-pattern": null, + "no-invalid-position-at-import-rule": null, + "scss/load-no-partial-leading-underscore": null + } +} diff --git a/src/components/atoms/BlockcertsLogo/_components.blockcerts-logo-css.js b/src/components/atoms/BlockcertsLogo/_components.blockcerts-logo-css.js index 681538b7c..8d48296bd 100644 --- a/src/components/atoms/BlockcertsLogo/_components.blockcerts-logo-css.js +++ b/src/components/atoms/BlockcertsLogo/_components.blockcerts-logo-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/atoms/BlockcertsLogo/_components.blockcerts-logo.scss b/src/components/atoms/BlockcertsLogo/_components.blockcerts-logo.scss index caf83f638..9f6b8cdfd 100644 --- a/src/components/atoms/BlockcertsLogo/_components.blockcerts-logo.scss +++ b/src/components/atoms/BlockcertsLogo/_components.blockcerts-logo.scss @@ -1,7 +1,7 @@ @import '../../../shared-styles/utils.a11y'; .buv-c-logo { - color: currentColor; + color: currentcolor; text-decoration: none; } diff --git a/src/components/atoms/DownloadLink/_components.download-link-css.js b/src/components/atoms/DownloadLink/_components.download-link-css.js index 8f4dd3957..6c678db8c 100644 --- a/src/components/atoms/DownloadLink/_components.download-link-css.js +++ b/src/components/atoms/DownloadLink/_components.download-link-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/atoms/DownloadLink/_components.download-link.scss b/src/components/atoms/DownloadLink/_components.download-link.scss index fea19ecd4..2b4203c81 100644 --- a/src/components/atoms/DownloadLink/_components.download-link.scss +++ b/src/components/atoms/DownloadLink/_components.download-link.scss @@ -2,7 +2,7 @@ .buv-c-download-link { text-decoration: none; - color: currentColor; + color: currentcolor; } .buv-c-download-link--icon { diff --git a/src/components/atoms/DragAndDrop/_components.drag-and-drop.scss b/src/components/atoms/DragAndDrop/_components.drag-and-drop.scss index c027f47d4..6bcce7532 100644 --- a/src/components/atoms/DragAndDrop/_components.drag-and-drop.scss +++ b/src/components/atoms/DragAndDrop/_components.drag-and-drop.scss @@ -2,7 +2,7 @@ .buv-c-drag-and-drop__droparea { z-index: 100; - background-color: rgba(0, 0, 0, .1); + background-color: rgb(0 0 0 / 10%); display: none; position: absolute; top: 0; diff --git a/src/components/atoms/FileUpload/_components.file-upload-css.js b/src/components/atoms/FileUpload/_components.file-upload-css.js index f2c19b3f0..dd692474d 100644 --- a/src/components/atoms/FileUpload/_components.file-upload-css.js +++ b/src/components/atoms/FileUpload/_components.file-upload-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/atoms/FileUpload/_components.file-upload.scss b/src/components/atoms/FileUpload/_components.file-upload.scss index f4c6be543..8e117cbea 100644 --- a/src/components/atoms/FileUpload/_components.file-upload.scss +++ b/src/components/atoms/FileUpload/_components.file-upload.scss @@ -1,4 +1,3 @@ @import '../../../shared-styles/objects.link'; @import '../../../shared-styles/objects.text'; - @import '../../../shared-styles/utils.a11y'; diff --git a/src/components/atoms/FinalVerificationStep/_components.final-verification-step-css.js b/src/components/atoms/FinalVerificationStep/_components.final-verification-step-css.js index b310c6e24..a4016622e 100644 --- a/src/components/atoms/FinalVerificationStep/_components.final-verification-step-css.js +++ b/src/components/atoms/FinalVerificationStep/_components.final-verification-step-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/atoms/FinalVerificationStep/_components.final-verification-step.scss b/src/components/atoms/FinalVerificationStep/_components.final-verification-step.scss index 3dd9716cc..231a9edbb 100644 --- a/src/components/atoms/FinalVerificationStep/_components.final-verification-step.scss +++ b/src/components/atoms/FinalVerificationStep/_components.final-verification-step.scss @@ -19,10 +19,6 @@ line-height: 19px; } -.buv-c-final-verification-step--standalone { - margin-top: 0; -} - .buv-c-final-verification-step.is-test, .buv-c-final-verification-step--standalone.is-success { font-size: 15px; diff --git a/src/components/atoms/GlobalStylesheet/_generic.global.scss b/src/components/atoms/GlobalStylesheet/_generic.global.scss index 180db47f9..7245536bb 100644 --- a/src/components/atoms/GlobalStylesheet/_generic.global.scss +++ b/src/components/atoms/GlobalStylesheet/_generic.global.scss @@ -1,6 +1,6 @@ .buv-c-verifier-main { font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif; - color: rgb(3, 21, 50); + color: rgb(3 21 50); position: relative; } diff --git a/src/components/atoms/Input/_components.input-css.js b/src/components/atoms/Input/_components.input-css.js index addbd6635..a8e53e30c 100644 --- a/src/components/atoms/Input/_components.input-css.js +++ b/src/components/atoms/Input/_components.input-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/atoms/Input/_components.input.scss b/src/components/atoms/Input/_components.input.scss index d51763d3d..d7910cf83 100644 --- a/src/components/atoms/Input/_components.input.scss +++ b/src/components/atoms/Input/_components.input.scss @@ -5,8 +5,8 @@ color: $fontColor; border-radius: 2px 0 0 2px; padding: 12px 15px; - background-color: rgba(243, 244, 245, 6); - border: solid 1px rgba(3, 21, 50, .13); + background-color: rgb(243 244 245 / 600%); + border: solid 1px rgb(3 21 50 / 13%); box-sizing: border-box; width: 100%; } @@ -15,27 +15,9 @@ border: 2px solid #f00; } -.buv-c-input::-moz-placeholder { +.buv-c-input::placeholder { font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif; - color: rgba(3, 21, 50, .3); - letter-spacing: -.25px; -} - -.buv-c-input::-webkit-input-placeholder { - font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif; - color: rgba(3, 21, 50, .3); - letter-spacing: -.25px; -} - -.buv-c-input:-moz-placeholder { - font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif; - color: rgba(3, 21, 50, .3); - letter-spacing: -.25px; -} - -.buv-c-input:-ms-input-placeholder { - font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif; - color: rgba(3, 21, 50, .3); + color: rgb(3 21 50 / 30%); letter-spacing: -.25px; } diff --git a/src/components/molecules/Modal/_components.modal.scss b/src/components/molecules/Modal/_components.modal.scss index 75471007e..81b60ae18 100644 --- a/src/components/molecules/Modal/_components.modal.scss +++ b/src/components/molecules/Modal/_components.modal.scss @@ -5,7 +5,7 @@ position: fixed; width: 100%; height: 100%; - background-color: rgba(3, 21, 50, 0.7); + background-color: rgb(3 21 50 / 70%); top: 0; left: 0; z-index: 1000; diff --git a/src/components/molecules/VerificationStep/_components.verification-step-css.js b/src/components/molecules/VerificationStep/_components.verification-step-css.js index 2dce17d8d..377a67a29 100644 --- a/src/components/molecules/VerificationStep/_components.verification-step-css.js +++ b/src/components/molecules/VerificationStep/_components.verification-step-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/molecules/VerificationStep/_components.verification-step.scss b/src/components/molecules/VerificationStep/_components.verification-step.scss index a151ae6de..cf47a8bd9 100644 --- a/src/components/molecules/VerificationStep/_components.verification-step.scss +++ b/src/components/molecules/VerificationStep/_components.verification-step.scss @@ -15,9 +15,9 @@ .buv-c-verification-substep { margin: 0; font-weight: 400; - color: rgba(3, 21, 50, .7); + color: rgb(3 21 50 / 70%); padding: 3px 0 0; - line-height: 1.71428571; + line-height: 1.7143; } .buv-c-verification-step.is-success::before, @@ -33,15 +33,13 @@ top: 10px; width: 4px; height: 4px; - background-color: rgba(255, 255, 255, .8); + background-color: rgb(255 255 255 / 80%); } .buv-c-verification-step::after { content: ''; position: absolute; z-index: 3; - -webkit-transition: opacity .3s ease-out .2s; - -o-transition: opacity .3s ease-out .2s; transition: opacity .3s ease-out .2s; opacity: 0; } diff --git a/src/components/organisms/CardCertificate/_components.card-css.js b/src/components/organisms/CardCertificate/_components.card-css.js index c44c017d6..0a4199754 100644 --- a/src/components/organisms/CardCertificate/_components.card-css.js +++ b/src/components/organisms/CardCertificate/_components.card-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/organisms/CardCertificate/_components.card.scss b/src/components/organisms/CardCertificate/_components.card.scss index c93a29862..44adddc75 100644 --- a/src/components/organisms/CardCertificate/_components.card.scss +++ b/src/components/organisms/CardCertificate/_components.card.scss @@ -54,7 +54,7 @@ .buv-c-card__record-link::after { content: ''; - border: solid currentColor; + border: solid currentcolor; border-width: 0 2px 2px 0; width: 5px; height: 5px; diff --git a/src/components/organisms/CertificateInput/_components.certificate-input-css.js b/src/components/organisms/CertificateInput/_components.certificate-input-css.js index f0d7c3b62..d53d85b27 100644 --- a/src/components/organisms/CertificateInput/_components.certificate-input-css.js +++ b/src/components/organisms/CertificateInput/_components.certificate-input-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/organisms/CertificateInput/_components.certificate-input.scss b/src/components/organisms/CertificateInput/_components.certificate-input.scss index ba2740776..eb573008e 100644 --- a/src/components/organisms/CertificateInput/_components.certificate-input.scss +++ b/src/components/organisms/CertificateInput/_components.certificate-input.scss @@ -4,11 +4,11 @@ display: flex; width: 100%; padding: 40px 30px; - background-color: rgba(255, 255, 255, .1); + background-color: rgb(255 255 255 / 10%); border: 1px solid $footerBackground; box-sizing: border-box; - @media only screen and (max-width: 600px) { + @media only screen and (width <= 600px) { flex-direction: column; grid-row-gap: 10px; // potentially useless since we are playing on the padding and height, but keeping for intent and future support height: 162px; diff --git a/src/components/organisms/FullCertificate/_components.full-certificate-css.js b/src/components/organisms/FullCertificate/_components.full-certificate-css.js index 8f6cdece2..e3ada500e 100644 --- a/src/components/organisms/FullCertificate/_components.full-certificate-css.js +++ b/src/components/organisms/FullCertificate/_components.full-certificate-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/organisms/FullCertificate/_components.full-certificate.scss b/src/components/organisms/FullCertificate/_components.full-certificate.scss index 6f04f6419..1b682e7b5 100644 --- a/src/components/organisms/FullCertificate/_components.full-certificate.scss +++ b/src/components/organisms/FullCertificate/_components.full-certificate.scss @@ -4,7 +4,7 @@ $sectionSpacer: 20px; .buv-c-full-certificate { - box-shadow: 0 1px 5px rgba(0, 0, 0, .15); + box-shadow: 0 1px 5px rgb(0 0 0 / 15%); padding: $sectionSpacer; background-color: #fff; display: block; @@ -32,7 +32,7 @@ $sectionSpacer: 20px; width: inherit; } -@media only screen and (min-width: 640px) { +@media only screen and (width >= 640px) { .buv-c-full-certificate { font-size: 16px; } diff --git a/src/components/organisms/FullScreenCertificate/_components.fullscreen-certificate.scss b/src/components/organisms/FullScreenCertificate/_components.fullscreen-certificate.scss index 15d02d675..a80fb01cf 100644 --- a/src/components/organisms/FullScreenCertificate/_components.fullscreen-certificate.scss +++ b/src/components/organisms/FullScreenCertificate/_components.fullscreen-certificate.scss @@ -19,7 +19,7 @@ } .buv-c-fullscreen-certificate-header { - box-shadow: 0 1px 5px rgba(0, 0, 0, .15); + box-shadow: 0 1px 5px rgb(0 0 0 / 15%); width: 100%; background-color: #fff; @@ -107,7 +107,7 @@ } .buv-c-fullscreen-certificate__certificate { - box-shadow: 0 1px 5px rgba(0, 0, 0, .15); + box-shadow: 0 1px 5px rgb(0 0 0 / 15%); padding: 20px; background-color: #fff; font-family: serif; diff --git a/src/components/organisms/SubstepsList/_components.substeps-list-css.js b/src/components/organisms/SubstepsList/_components.substeps-list-css.js index 7c2c625d1..c9e60fa17 100644 --- a/src/components/organisms/SubstepsList/_components.substeps-list-css.js +++ b/src/components/organisms/SubstepsList/_components.substeps-list-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/organisms/SubstepsList/_components.substeps-list.scss b/src/components/organisms/SubstepsList/_components.substeps-list.scss index d1e236e14..d4835a65f 100644 --- a/src/components/organisms/SubstepsList/_components.substeps-list.scss +++ b/src/components/organisms/SubstepsList/_components.substeps-list.scss @@ -7,12 +7,12 @@ height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; - border-bottom: 4px solid rgba(118, 128, 135, 1); + border-bottom: 4px solid rgb(118 128 135 / 100%); display: inline-block; vertical-align: 2px; margin: 0 6px; - -webkit-transition: -webkit-transform .3s ease-in; - -o-transition: transform .3s ease-in; + transition: -webkit-transform .3s ease-in; + transition: transform .3s ease-in; transition: transform .3s ease-in; } @@ -23,9 +23,8 @@ .buv-c-substeps-list__list { max-height: 0; overflow: auto; - -webkit-transition: max-height .3s ease-in; - -o-transition: max-height .3s ease-in; transition: max-height .3s ease-in; + // allow for substeps dots to appear (hidden by overflow) padding-left: 50px; margin-left: -50px; diff --git a/src/components/organisms/VerificationModal/_components.verification-modal.scss b/src/components/organisms/VerificationModal/_components.verification-modal.scss index e3d795e7e..a6570a7cf 100644 --- a/src/components/organisms/VerificationModal/_components.verification-modal.scss +++ b/src/components/organisms/VerificationModal/_components.verification-modal.scss @@ -7,7 +7,7 @@ .buv-c-verification-modal__separator { margin-bottom: 30px; - background-color: rgba(3, 21, 50, .05); + background-color: rgb(3 21 50 / 5%); height: 1px; border: 0 none; } diff --git a/src/components/organisms/VerificationProcess/_components.verification-process-css.js b/src/components/organisms/VerificationProcess/_components.verification-process-css.js index 9734c7d14..ec18a4622 100644 --- a/src/components/organisms/VerificationProcess/_components.verification-process-css.js +++ b/src/components/organisms/VerificationProcess/_components.verification-process-css.js @@ -1,2 +1,2 @@ import {html} from '@polymer/lit-element'; -export default html``; +export default html``; diff --git a/src/components/organisms/VerificationProcess/_components.verification-process.scss b/src/components/organisms/VerificationProcess/_components.verification-process.scss index 75a1555d2..f9b644b87 100644 --- a/src/components/organisms/VerificationProcess/_components.verification-process.scss +++ b/src/components/organisms/VerificationProcess/_components.verification-process.scss @@ -37,9 +37,6 @@ } .buv-c-verification-progress-bar.no-transition { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; transition: none; } diff --git a/src/shared-styles/_components.badge.scss b/src/shared-styles/_components.badge.scss index 828742930..f1ff6080e 100644 --- a/src/shared-styles/_components.badge.scss +++ b/src/shared-styles/_components.badge.scss @@ -11,12 +11,10 @@ height: 12px; background-color: #fff; border-radius: 50%; - -webkit-transition: all .2s ease-out; - -o-transition: all .2s ease-out; transition: all .2s ease-out; z-index: 2; box-sizing: content-box; - box-shadow: 0 2px 4px 0 rgba(22, 40, 55, .21); + box-shadow: 0 2px 4px 0 rgb(22 40 55 / 21%); } .buv-c-badge--medium::before { diff --git a/src/shared-styles/_objects.link.scss b/src/shared-styles/_objects.link.scss index 380b97f2a..ee34c55f6 100644 --- a/src/shared-styles/_objects.link.scss +++ b/src/shared-styles/_objects.link.scss @@ -3,7 +3,7 @@ .buv-o-link { cursor: pointer; text-decoration: none; - color: currentColor; + color: currentcolor; } .buv-o-link__text--underline { diff --git a/src/shared-styles/_objects.overlay.scss b/src/shared-styles/_objects.overlay.scss index 74601c354..cc1386307 100644 --- a/src/shared-styles/_objects.overlay.scss +++ b/src/shared-styles/_objects.overlay.scss @@ -1,5 +1,5 @@ .buv-o-overlay { z-index: 100; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); + box-shadow: 0 0 30px rgb(0 0 0 / 25%); background-color: #fff; } diff --git a/src/shared-styles/_settings.variables.scss b/src/shared-styles/_settings.variables.scss index 769e20659..cc307e26c 100644 --- a/src/shared-styles/_settings.variables.scss +++ b/src/shared-styles/_settings.variables.scss @@ -1,16 +1,10 @@ -$successColor: rgba(42, 178, 123, 1); -$successBackgroundColor: rgba(42, 178, 123, .1); - -$errorColor: rgba(208, 2, 27, 1); -$errorBackgroundColor: rgba(208, 2, 27, .1); - -$testColor: rgb(245, 166, 35); -$testBackgroundColor: rgba(245, 166, 35, .1); - -$fontColor: rgba(3, 21, 50, 1); - +$successColor: rgb(42 178 123 / 100%); +$successBackgroundColor: rgb(42 178 123 / 10%); +$errorColor: rgb(208 2 27 / 100%); +$errorBackgroundColor: rgb(208 2 27 / 10%); +$testColor: rgb(245 166 35); +$testBackgroundColor: rgb(245 166 35 / 10%); +$fontColor: rgb(3 21 50 / 100%); $modalMaxDimension: 600px; - -$footerBackground: rgba(0, 0, 0, .1); - +$footerBackground: rgb(0 0 0 / 10%); $breakpoint: 750px; diff --git a/src/shared-styles/_utils.animations.scss b/src/shared-styles/_utils.animations.scss index efe9cbe4f..9f7fe984e 100644 --- a/src/shared-styles/_utils.animations.scss +++ b/src/shared-styles/_utils.animations.scss @@ -1,9 +1,5 @@ .buv-u-slide-from-right { opacity: 0; - -webkit-transition: right ease .5s, opacity .2s; - -moz-transition: right ease .5s, opacity .2s; - -ms-transition: right ease .5s, opacity .2s; - -o-transition: right ease .5s, opacity .2s; transition: right ease .5s, opacity .2s; } From 06dc10564d93874368d8aff4baffb5db526e5d65 Mon Sep 17 00:00:00 2001 From: Julien Fraichot Date: Thu, 26 Sep 2024 16:29:28 +0200 Subject: [PATCH 2/5] fix(Deps): update deps with vulnerabilities --- bundle-stats.html | 44 +- package-lock.json | 49842 +++++++++++--------------------------------- package.json | 13 +- 3 files changed, 12202 insertions(+), 37697 deletions(-) diff --git a/bundle-stats.html b/bundle-stats.html index 4a80cf5ac..5d3765a31 100644 --- a/bundle-stats.html +++ b/bundle-stats.html @@ -137,6 +137,10 @@ margin-left: 0.5rem; } +.node { + cursor: pointer; +} + .details { position: absolute; display: flex; @@ -177,9 +181,9 @@ var drawChart = (function (exports) { 'use strict'; - var n,l$1,u$1,t$1,o$2,r$1,f$1,e$1,c$1={},s$1=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v$1=Array.isArray;function h$1(n,l){for(var u in l)n[u]=l[u];return n}function p$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d$1(l,f,t,o,null)}function d$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function k$1(n){return n.children}function b$1(n,l){this.props=n,this.context=l;}function g$1(n,l){if(null==l)return n.__?g$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;ll&&t$1.sort(f$1));x.__r=0;}function P(n,l,u,i,t,o,r,f,e,a){var h,p,y,_,b,m,w,x=i&&i.__k||s$1,P=x.length;for(u.__k=[],h=0;h0?d$1(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(y=x[h])||y&&_.key==y.key&&_.type===y.type)x[h]=void 0;else for(p=0;p=0;l--)if((u=n.__k[l])&&(i=A(u)))return i;return null}function H(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||T$1(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||T$1(n,o,l[o],u[o],i);}function I(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function T$1(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||I(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||I(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?z$1:j$1,o):n.removeEventListener(l,o?z$1:j$1,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&"rowSpan"!==l&&"colSpan"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u));}}function j$1(n){return this.l[n.type+!1](l$1.event?l$1.event(n):n)}function z$1(n){return this.l[n.type+!0](l$1.event?l$1.event(n):n)}function L(n,u,i,t,o,r,f,e,c){var s,a,p,y,d,_,g,m,w,x,C,S,$,A,H,I=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(s=l$1.__b)&&s(u);try{n:if("function"==typeof I){if(m=u.props,w=(s=I.contextType)&&t[s.__c],x=s?w?w.props.value:s.__:t,i.__c?g=(a=u.__c=i.__c).__=a.__E:("prototype"in I&&I.prototype.render?u.__c=a=new I(m,x):(u.__c=a=new b$1(m,x),a.constructor=I,a.render=B$1),w&&w.sub(a),a.props=m,a.state||(a.state={}),a.context=x,a.__n=t,p=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=I.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h$1({},a.__s)),h$1(a.__s,I.getDerivedStateFromProps(m,a.__s))),y=a.props,d=a.state,a.__v=u,p)null==I.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else {if(null==I.getDerivedStateFromProps&&m!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(m,x),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(m,a.__s,x)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=m,a.state=a.__s,a.__d=!1),a.__e=!1,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),C=0;C2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d$1(l,f,i,o,null)}function d$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$2:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function g$1(n){return n.children}function b$1(n,l){this.props=n,this.context=l;}function m$1(n,l){if(null==l)return n.__?m$1(n.__,n.__i+1):null;for(var u;lu&&i$1.sort(f$2));x.__r=0;}function C(n,l,u,t,i,o,r,f,e,a,h){var v,p,y,d,_,g=t&&t.__k||s$1,b=l.length;for(u.__d=e,P(u,l,g),e=u.__d,v=0;v0?d$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=H(i,u,r=t+a,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f===r+1?a++:f>r?s>e-r?a+=f-r:a--:a=f(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f=i.__.length&&i.__.push({__V:c}),i.__[t]}function h(n){return o=1,s(B,n)}function s(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r.shouldComponentUpdate=f;}return o.__N||o.__}function p(u,i){var o=d(t++,3);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function q(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){r=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[],t=0)),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));}function k(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w(n){var t=r;n.__c=n.__(),r=t;}function z(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return "function"==typeof t?t(n):t} - const PLACEHOLDER = "bundle-*:**/file/**,**/file**, bundle-*:"; + const PLACEHOLDER = "*/**/file.js"; const SideBar = ({ availableSizeProperties, sizeProperty, setSizeProperty, onExcludeChange, onIncludeChange, }) => { const [includeValue, setIncludeValue] = h(""); const [excludeValue, setExcludeValue] = h(""); @@ -2342,11 +2346,11 @@ setExcludeValue(value); onExcludeChange(value); }; - return (o$1("aside", { className: "sidebar", children: [o$1("div", { className: "size-selectors", children: availableSizeProperties.length > 1 && + return (u$1("aside", { className: "sidebar", children: [u$1("div", { className: "size-selectors", children: availableSizeProperties.length > 1 && availableSizeProperties.map((sizeProp) => { const id = `selector-${sizeProp}`; - return (o$1("div", { className: "size-selector", children: [o$1("input", { type: "radio", id: id, checked: sizeProp === sizeProperty, onChange: handleSizePropertyChange(sizeProp) }), o$1("label", { htmlFor: id, children: LABELS[sizeProp] })] }, sizeProp)); - }) }), o$1("div", { className: "module-filters", children: [o$1("div", { className: "module-filter", children: [o$1("label", { htmlFor: "module-filter-exclude", children: "Exclude" }), o$1("input", { type: "text", id: "module-filter-exclude", value: excludeValue, onInput: handleExcludeChange, placeholder: PLACEHOLDER })] }), o$1("div", { className: "module-filter", children: [o$1("label", { htmlFor: "module-filter-include", children: "Include" }), o$1("input", { type: "text", id: "module-filter-include", value: includeValue, onInput: handleIncludeChange, placeholder: PLACEHOLDER })] })] })] })); + return (u$1("div", { className: "size-selector", children: [u$1("input", { type: "radio", id: id, checked: sizeProp === sizeProperty, onChange: handleSizePropertyChange(sizeProp) }), u$1("label", { htmlFor: id, children: LABELS[sizeProp] })] }, sizeProp)); + }) }), u$1("div", { className: "module-filters", children: [u$1("div", { className: "module-filter", children: [u$1("label", { htmlFor: "module-filter-exclude", children: "Exclude" }), u$1("input", { type: "text", id: "module-filter-exclude", value: excludeValue, onInput: handleExcludeChange, placeholder: PLACEHOLDER })] }), u$1("div", { className: "module-filter", children: [u$1("label", { htmlFor: "module-filter-include", children: "Include" }), u$1("input", { type: "text", id: "module-filter-include", value: includeValue, onInput: handleIncludeChange, placeholder: PLACEHOLDER })] })] })] })); }; function getDefaultExportFromCjs (x) { @@ -4682,16 +4686,16 @@ const percentageNum = (100 * mainSize) / getModuleSize(root.data, sizeProperty); const percentage = percentageNum.toFixed(2); const percentageString = percentage + "%"; - return (o$1(k$1, { children: [o$1("div", { className: "details-name", children: node.data.name }), o$1("div", { className: "details-percentage", children: percentageString }), availableSizeProperties.map((sizeProp) => { + return (u$1(g$1, { children: [u$1("div", { className: "details-name", children: node.data.name }), u$1("div", { className: "details-percentage", children: percentageString }), availableSizeProperties.map((sizeProp) => { if (sizeProp === sizeProperty) { - return (o$1("div", { className: "details-size", children: o$1("b", { children: [LABELS[sizeProp], ": ", format_1(getModuleSize(node.data, sizeProp))] }) }, sizeProp)); + return (u$1("div", { className: "details-size", children: u$1("b", { children: [LABELS[sizeProp], ": ", format_1(getModuleSize(node.data, sizeProp))] }) }, sizeProp)); } else { - return (o$1("div", { className: "details-size", children: [LABELS[sizeProp], ": ", format_1(getModuleSize(node.data, sizeProp))] }, sizeProp)); + return (u$1("div", { className: "details-size", children: [LABELS[sizeProp], ": ", format_1(getModuleSize(node.data, sizeProp))] }, sizeProp)); } })] })); }, [availableSizeProperties, getModuleSize, node, root.data, sizeProperty]); - return o$1("div", { className: "details", children: content }); + return u$1("div", { className: "details", children: content }); }; const COLOR_DEFAULT_FILE = "#db7100"; @@ -4709,7 +4713,7 @@ }; const Node = ({ node, onMouseOver, onClick, path, highlighted, selected, }) => { - return (o$1("path", { d: path, "fill-rule": "evenodd", stroke: "#fff", fill: colorDefault(node), onMouseOver: (evt) => { + return (u$1("path", { className: "node", d: path, "fill-rule": "evenodd", stroke: "#fff", fill: colorDefault(node), onMouseOver: (evt) => { evt.stopPropagation(); onMouseOver(node); }, onClick: (evt) => { @@ -4720,8 +4724,8 @@ const SunBurst = ({ root, onNodeHover, isNodeHighlighted, selectedNode, onNodeClick, }) => { const { getModuleIds, size, arc, radius } = q(StaticContext); - return (o$1("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${size} ${size}`, children: o$1("g", { transform: `translate(${radius},${radius})`, children: root.descendants().map((node) => { - return (o$1(Node, { node: node, onMouseOver: onNodeHover, path: arc(node), highlighted: isNodeHighlighted(node), selected: selectedNode === node, onClick: onNodeClick }, getModuleIds(node.data).nodeUid.id)); + return (u$1("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${size} ${size}`, children: u$1("g", { transform: `translate(${radius},${radius})`, children: root.descendants().map((node) => { + return (u$1(Node, { node: node, onMouseOver: onNodeHover, path: arc(node), highlighted: isNodeHighlighted(node), selected: selectedNode === node, onClick: onNodeClick }, getModuleIds(node.data).nodeUid.id)); }) }) })); }; @@ -4743,11 +4747,11 @@ document.removeEventListener("mouseover", handleMouseOut); }; }, [root]); - return (o$1(k$1, { children: [o$1(SunBurst, { root: root, onNodeHover: (node) => { + return (u$1(g$1, { children: [u$1(SunBurst, { root: root, onNodeHover: (node) => { setTooltipNode(node); }, isNodeHighlighted: isNodeHighlighted, selectedNode: selectedNode, onNodeClick: (node) => { setSelectedNode(selectedNode === node ? undefined : node); - } }), o$1(Tooltip, { node: tooltipNode, root: root, sizeProperty: sizeProperty })] })); + } }), u$1(Tooltip, { node: tooltipNode, root: root, sizeProperty: sizeProperty })] })); }; const Main = () => { @@ -4802,10 +4806,10 @@ rawHierarchy, sizeProperty, ]); - return (o$1(k$1, { children: [o$1(SideBar, { sizeProperty: sizeProperty, availableSizeProperties: availableSizeProperties, setSizeProperty: setSizeProperty, onExcludeChange: setExcludeFilter, onIncludeChange: setIncludeFilter }), o$1(Chart, { root: root, sizeProperty: sizeProperty, selectedNode: selectedNode, setSelectedNode: setSelectedNode })] })); + return (u$1(g$1, { children: [u$1(SideBar, { sizeProperty: sizeProperty, availableSizeProperties: availableSizeProperties, setSizeProperty: setSizeProperty, onExcludeChange: setExcludeFilter, onIncludeChange: setIncludeFilter }), u$1(Chart, { root: root, sizeProperty: sizeProperty, selectedNode: selectedNode, setSelectedNode: setSelectedNode })] })); }; - const StaticContext = G({}); + const StaticContext = F$1({}); const drawChart = (parentNode, data, width, height) => { const availableSizeProperties = getAvailableSizeOptions(data.options); const layout = partition(); @@ -4841,7 +4845,7 @@ .endAngle((d) => Math.max(0, Math.min(2 * Math.PI, x(d.x1)))) .innerRadius((d) => y(d.y0)) .outerRadius((d) => y(d.y1)); - D(o$1(StaticContext.Provider, { value: { + q$1(u$1(StaticContext.Provider, { value: { data, availableSizeProperties, width, @@ -4853,7 +4857,7 @@ arc, radius, size, - }, children: o$1(Main, {}) }), parentNode); + }, children: u$1(Main, {}) }), parentNode); }; exports.StaticContext = StaticContext; @@ -4869,7 +4873,7 @@