diff --git a/.storybook/package.json b/.storybook/package.json index ee6eb4153f..de812432fa 100644 --- a/.storybook/package.json +++ b/.storybook/package.json @@ -44,7 +44,7 @@ "file-loader": "6.2.0", "lit": "^3.1.1", "lodash-es": "^4.17.21", - "postcss": "^7.0.36", + "postcss": "^8.4.33", "postcss-class-prefix": "^0.3.0", "postcss-loader": "^4.0.0", "postcss-prefix-selector": "^1.16.0", diff --git a/components/modal/index.css b/components/modal/index.css index 007068c640..4aa96484e2 100644 --- a/components/modal/index.css +++ b/components/modal/index.css @@ -104,18 +104,18 @@ governing permissions and limitations under the License. var(--mod-modal-confirm-exit-animation-delay, var(--spectrum-modal-confirm-exit-animation-delay)) + var(--mod-modal-confirm-exit-animation-duration, var(--spectrum-modal-confirm-exit-animation-duration)) ); +} - &.is-open { - @extend %spectrum-overlay--open; +.spectrum-Modal.is-open { + @extend %spectrum-overlay--open; - /* Entry animations */ - transition: transform var(--mod-modal-confirm-entry-animation-duration, var(--spectrum-modal-confirm-entry-animation-duration)) var(--spectrum-animation-ease-out) - var(--mod-modal-confirm-entry-animation-delay, var(--spectrum-modal-confirm-entry-animation-delay)), - opacity var(--mod-modal-confirm-entry-animation-duration, var(--spectrum-modal-confirm-entry-animation-duration)) var(--spectrum-animation-ease-out) - var(--mod-modal-confirm-entry-animation-delay, var(--spectrum-modal-confirm-entry-animation-delay)); + /* Entry animations */ + transition: transform var(--mod-modal-confirm-entry-animation-duration, var(--spectrum-modal-confirm-entry-animation-duration)) var(--spectrum-animation-ease-out) + var(--mod-modal-confirm-entry-animation-delay, var(--spectrum-modal-confirm-entry-animation-delay)), + opacity var(--mod-modal-confirm-entry-animation-duration, var(--spectrum-modal-confirm-entry-animation-duration)) var(--spectrum-animation-ease-out) + var(--mod-modal-confirm-entry-animation-delay, var(--spectrum-modal-confirm-entry-animation-delay)); - transform: translateY(0); - } + transform: translateY(0); } /* Responsive modals will fill the screen on small viewports */ diff --git a/components/page/index.css b/components/page/index.css index 0f0a504607..513b114a58 100644 --- a/components/page/index.css +++ b/components/page/index.css @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -& { +:root { background-color: var(--spectrum-gray-100); /* Prevent tap highlights */ diff --git a/components/popover/index.css b/components/popover/index.css index 78f9750911..e97e7e8fd1 100644 --- a/components/popover/index.css +++ b/components/popover/index.css @@ -77,11 +77,6 @@ governing permissions and limitations under the License. background-color: var(--mod-popover-background-color, var(--spectrum-popover-background-color)); filter: var(--mod-popover-filter, var(--spectrum-popover-filter)); - /* default opens and animates upward */ - &.is-open { - @extend %spectrum-overlay--open; - } - /* has tip triangle */ &.spectrum-Popover--withTip { .spectrum-Popover-tip { @@ -97,6 +92,11 @@ governing permissions and limitations under the License. } } +/* default opens and animates upward */ +.spectrum-Popover.is-open { + @extend %spectrum-overlay--open; +} + /* prevent nested popovers from affecting each others drop shadow filters */ .spectrum-Popover * { --mod-popover-filter: none; diff --git a/components/quickaction/index.css b/components/quickaction/index.css index 17f9313381..4409ca8934 100644 --- a/components/quickaction/index.css +++ b/components/quickaction/index.css @@ -13,10 +13,10 @@ governing permissions and limitations under the License. @import "@spectrum-css/commons/overlay.css"; .spectrum-QuickActions { - box-sizing: border-box; - @extend %spectrum-overlay; + box-sizing: border-box; + display: inline-flex; align-items: center; justify-content: center; @@ -28,37 +28,31 @@ governing permissions and limitations under the License. border-radius: var(--spectrum-quickactions-border-radius); - &.is-open { - @extend %spectrum-overlay--open; - } + background-color: var(--spectrum-quickactions-background-color); .spectrum-ActionButton + .spectrum-ActionButton { margin-inline-start: var(--spectrum-quickactions-button-gap-x); } } -.spectrum-QuickActions--textOnly { - .spectrum-ActionButton + .spectrum-ActionButton { - margin-inline-start: var(--spectrum-quickactions-text-button-gap-x); - } +.spectrum-QuickActions.is-open { + @extend %spectrum-overlay--open; } -.spectrum-QuickActions--right { - &.is-open { - @extend %spectrum-overlay--left--open; /* should animate to the left when aligned right */ - } +.spectrum-QuickActions-overlay { + background-color: var(--spectrum-quickactions-overlay-color); } -.spectrum-QuickActions--left { - &.is-open { - @extend %spectrum-overlay--right--open; /* should animate to the right when aligned left */ +.spectrum-QuickActions--textOnly { + .spectrum-ActionButton + .spectrum-ActionButton { + margin-inline-start: var(--spectrum-quickactions-text-button-gap-x); } } -.spectrum-QuickActions-overlay { - background-color: var(--spectrum-quickactions-overlay-color); +.spectrum-QuickActions--right.is-open { + @extend %spectrum-overlay--left--open; /* should animate to the left when aligned right */ } -.spectrum-QuickActions { - background-color: var(--spectrum-quickactions-background-color); +.spectrum-QuickActions--left.is-open { + @extend %spectrum-overlay--right--open; /* should animate to the right when aligned left */ } diff --git a/components/splitbutton/index.css b/components/splitbutton/index.css index edf07dc333..81921f179d 100644 --- a/components/splitbutton/index.css +++ b/components/splitbutton/index.css @@ -10,8 +10,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -@import "@spectrum-css/vars/dist/components/spectrum-button.css"; - .spectrum-SplitButton { --spectrum-splitbutton-trigger-border-left: 0; --spectrum-splitbutton-trigger-min-width: 0; @@ -26,27 +24,27 @@ governing permissions and limitations under the License. &:dir(rtl) { --spectrum-logical-rotation: matrix(-1, 0, 0, 1, 0, 0); } -} -.spectrum-SplitButton-trigger { - --spectrum-splitbutton-trigger-round-edge-padding: var(--spectrum-global-dimension-size-125); - --spectrum-splitbutton-trigger-flat-edge-padding: var(--spectrum-global-dimension-size-100); + & .spectrum-SplitButton-trigger { + --spectrum-splitbutton-trigger-round-edge-padding: var(--spectrum-global-dimension-size-125); + --spectrum-splitbutton-trigger-flat-edge-padding: var(--spectrum-global-dimension-size-100); - --spectrum-splitbutton-cta-trigger-flat-edge-padding: calc(var(--spectrum-splitbutton-trigger-flat-edge-padding) - var(--spectrum-button-m-primary-outline-texticon-border-size)); -} + --spectrum-splitbutton-cta-trigger-flat-edge-padding: calc(var(--spectrum-splitbutton-trigger-flat-edge-padding) - var(--spectrum-button-m-primary-outline-texticon-border-size)); + } -.spectrum-SplitButton-action { - --spectrum-splitbutton-flat-edge-padding: calc( - var(--spectrum-button-m-primary-outline-texticon-padding-left) - - var(--spectrum-button-m-primary-outline-texticon-border-size) * 2 - ); + & .spectrum-SplitButton-action { + --spectrum-splitbutton-flat-edge-padding: calc( + var(--spectrum-button-m-primary-outline-texticon-padding-left) - + var(--spectrum-button-m-primary-outline-texticon-border-size) * 2 + ); - --spectrum-splitbutton-round-edge-padding: var(--spectrum-button-m-primary-outline-texticon-padding-right); + --spectrum-splitbutton-round-edge-padding: var(--spectrum-button-m-primary-outline-texticon-padding-right); - --spectrum-splitbutton-cta-flat-edge-padding: calc( - var(--spectrum-button-m-primary-outline-texticon-padding-left) - - var(--spectrum-button-m-primary-outline-texticon-border-size) * 3 - ); + --spectrum-splitbutton-cta-flat-edge-padding: calc( + var(--spectrum-button-m-primary-outline-texticon-padding-left) - + var(--spectrum-button-m-primary-outline-texticon-border-size) * 3 + ); + } } .spectrum-SplitButton { @@ -54,143 +52,141 @@ governing permissions and limitations under the License. display: inline-flex; flex-direction: row; vertical-align: top; -} - -.spectrum-SplitButton-action { - margin-inline-start: 0; - - border-start-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); - border-start-end-radius: 0; - border-end-end-radius: 0; - border-end-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); - padding-inline-end: var(--spectrum-splitbutton-flat-edge-padding); - padding-inline-start: var(--spectrum-splitbutton-round-edge-padding); + & .spectrum-SplitButton-action { + margin-inline-start: 0; - /* CTA is special and doesn't have a border between the buttons */ - &.spectrum-Button--accent { - padding-inline-end: var(--spectrum-splitbutton-cta-flat-edge-padding); - margin-inline-end: var(--spectrum-button-m-primary-outline-texticon-border-size); - } - - &::after { - border-start-end-radius: var(--spectrum-splitbutton-border-radius-edge); - border-end-end-radius: var(--spectrum-splitbutton-border-radius-edge); - } -} - -.spectrum-SplitButton-trigger { - margin-inline-start: 0; - - border-start-start-radius: 0; - border-start-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); - border-end-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); - border-end-start-radius: 0; - border-inline-start-width: var(--spectrum-splitbutton-trigger-border-left); - - padding-inline-start: var(--spectrum-splitbutton-trigger-flat-edge-padding); - padding-inline-end: var(--spectrum-splitbutton-trigger-round-edge-padding); - - min-inline-size: var(--spectrum-splitbutton-trigger-min-width); - - /* Fix CTA button focus ring alignment */ - &.spectrum-Button--accent { - padding-inline-start: var(--spectrum-splitbutton-cta-trigger-flat-edge-padding); - border-inline-start-width: var(--spectrum-button-m-primary-outline-texticon-border-size); - } - - &:focus-visible { - box-shadow: none; - } - - &::after { - border-start-start-radius: var(--spectrum-splitbutton-border-radius-edge); - border-end-start-radius: var(--spectrum-splitbutton-border-radius-edge); - } -} - -.spectrum-SplitButton-icon { - display: block; - margin-block-start: 1px; -} - -.spectrum-SplitButton-action, -.spectrum-SplitButton-trigger { - position: relative; + border-start-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + border-start-end-radius: 0; + border-end-end-radius: 0; + border-end-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); - &:focus-visible { - /* Be on top when focused or border leaks */ - z-index: 1; - outline: none; - } + padding-inline-end: var(--spectrum-splitbutton-flat-edge-padding); + padding-inline-start: var(--spectrum-splitbutton-round-edge-padding); - /* Correct the direction of the arrows when viewing right-to-left */ - &.spectrum-Pagination-prevButton .spectrum-Icon { - transform: var(--spectrum-logical-rotation,) rotate(180deg); - } + /* CTA is special and doesn't have a border between the buttons */ + &.spectrum-Button--accent { + padding-inline-end: var(--spectrum-splitbutton-cta-flat-edge-padding); + margin-inline-end: var(--spectrum-button-m-primary-outline-texticon-border-size); + } - &.spectrum-Pagination-nextButton .spectrum-Icon { - transform: var(--spectrum-logical-rotation); + &::after { + border-start-end-radius: var(--spectrum-splitbutton-border-radius-edge); + border-end-end-radius: var(--spectrum-splitbutton-border-radius-edge); + } } -} -.spectrum-SplitButton-action { - .spectrum-Button-label + .spectrum-Icon { - margin-inline-start: var(--spectrum-splitbutton-icon-gap); - } -} + & .spectrum-SplitButton-trigger { + margin-inline-start: 0; -.spectrum-SplitButton--left { - .spectrum-SplitButton-action { border-start-start-radius: 0; border-start-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); border-end-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); border-end-start-radius: 0; - margin-inline-end: 0; - margin-inline-start: var(--spectrum-spltibutton-margin-left); + border-inline-start-width: var(--spectrum-splitbutton-trigger-border-left); - padding-inline-start: var(--spectrum-splitbutton-flat-edge-padding); - padding-inline-end: var(--spectrum-splitbutton-round-edge-padding); + padding-inline-start: var(--spectrum-splitbutton-trigger-flat-edge-padding); + padding-inline-end: var(--spectrum-splitbutton-trigger-round-edge-padding); - /* CTA is special and doesn't have a border between the buttons */ + min-inline-size: var(--spectrum-splitbutton-trigger-min-width); + + /* Fix CTA button focus ring alignment */ &.spectrum-Button--accent { - padding-inline-start: var(--spectrum-splitbutton-cta-flat-edge-padding); - margin-inline-start: var(--spectrum-button-m-primary-outline-texticon-border-size); + padding-inline-start: var(--spectrum-splitbutton-cta-trigger-flat-edge-padding); + border-inline-start-width: var(--spectrum-button-m-primary-outline-texticon-border-size); + } + + &:focus-visible { + box-shadow: none; } &::after { border-start-start-radius: var(--spectrum-splitbutton-border-radius-edge); - border-start-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); - border-end-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); border-end-start-radius: var(--spectrum-splitbutton-border-radius-edge); } } - .spectrum-SplitButton-trigger { - margin-inline-end: 0; + & .spectrum-SplitButton-icon { + display: block; + margin-block-start: 1px; + } - border-start-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); - border-start-end-radius: 0; - border-end-end-radius: 0; - border-end-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + & .spectrum-SplitButton-action, + & .spectrum-SplitButton-trigger { + position: relative; - border-inline-start-width: var(--spectrum-button-m-primary-outline-texticon-border-size); - border-inline-end-width: var(--spectrum-splitbutton-trigger-border-left); + &:focus-visible { + /* Be on top when focused or border leaks */ + z-index: 1; + outline: none; + } - padding-inline-end: var(--spectrum-splitbutton-trigger-flat-edge-padding); - padding-inline-start: var(--spectrum-splitbutton-trigger-round-edge-padding); + /* Correct the direction of the arrows when viewing right-to-left */ + &.spectrum-Pagination-prevButton .spectrum-Icon { + transform: var(--spectrum-logical-rotation,) rotate(180deg); + } - /* Fix CTA button focus ring alignment */ - &.spectrum-Button--accent { - padding-inline-end: var(--spectrum-splitbutton-cta-trigger-flat-edge-padding); - border-inline-end-width: var(--spectrum-button-m-primary-outline-texticon-border-size); + &.spectrum-Pagination-nextButton .spectrum-Icon { + transform: var(--spectrum-logical-rotation); } + } + + &.spectrum-SplitButton--left { + & .spectrum-SplitButton-action { + border-start-start-radius: 0; + border-start-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + border-end-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + border-end-start-radius: 0; + margin-inline-end: 0; + margin-inline-start: var(--spectrum-spltibutton-margin-left); + + padding-inline-start: var(--spectrum-splitbutton-flat-edge-padding); + padding-inline-end: var(--spectrum-splitbutton-round-edge-padding); + + &::after { + border-start-start-radius: var(--spectrum-splitbutton-border-radius-edge); + border-start-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + border-end-end-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + border-end-start-radius: var(--spectrum-splitbutton-border-radius-edge); + } + + /* CTA is special and doesn't have a border between the buttons */ + &.spectrum-Button--accent { + padding-inline-start: var(--spectrum-splitbutton-cta-flat-edge-padding); + margin-inline-start: var(--spectrum-button-m-primary-outline-texticon-border-size); + } + } + + & .spectrum-SplitButton-trigger { + margin-inline-end: 0; - &::after { border-start-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); - border-start-end-radius: var(--spectrum-splitbutton-border-radius-edge); - border-end-end-radius: var(--spectrum-splitbutton-border-radius-edge); + border-start-end-radius: 0; + border-end-end-radius: 0; border-end-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + + border-inline-start-width: var(--spectrum-button-m-primary-outline-texticon-border-size); + border-inline-end-width: var(--spectrum-splitbutton-trigger-border-left); + + padding-inline-end: var(--spectrum-splitbutton-trigger-flat-edge-padding); + padding-inline-start: var(--spectrum-splitbutton-trigger-round-edge-padding); + + &::after { + border-start-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + border-start-end-radius: var(--spectrum-splitbutton-border-radius-edge); + border-end-end-radius: var(--spectrum-splitbutton-border-radius-edge); + border-end-start-radius: var(--spectrum-button-m-primary-outline-texticon-border-radius); + } + + /* Fix CTA button focus ring alignment */ + &.spectrum-Button--accent { + padding-inline-end: var(--spectrum-splitbutton-cta-trigger-flat-edge-padding); + border-inline-end-width: var(--spectrum-button-m-primary-outline-texticon-border-size); + } } } + + & .spectrum-SplitButton-action .spectrum-Button-label + .spectrum-Icon { + margin-inline-start: var(--spectrum-splitbutton-icon-gap); + } } diff --git a/components/tooltip/index.css b/components/tooltip/index.css index 68642ee1ba..c58b3633dc 100644 --- a/components/tooltip/index.css +++ b/components/tooltip/index.css @@ -118,10 +118,6 @@ governing permissions and limitations under the License. line-height: var(--mod-tooltip-cjk-line-height, var(--spectrum-tooltip-cjk-line-height)); } - &.is-open { - @extend %spectrum-overlay--open; - } - & { cursor: default; -webkit-user-select: none; @@ -148,6 +144,10 @@ governing permissions and limitations under the License. } } +.spectrum-Tooltip.is-open { + @extend %spectrum-overlay--open; +} + /****** Tip Base Styles ******/ .spectrum-Tooltip-tip { position: absolute; diff --git a/plugins/legacy-postcss-dropdupedvars/index.js b/plugins/legacy-postcss-dropdupedvars/index.js index 8b368742a0..78edca0c98 100644 --- a/plugins/legacy-postcss-dropdupedvars/index.js +++ b/plugins/legacy-postcss-dropdupedvars/index.js @@ -1,22 +1,37 @@ -const postcss = require("postcss"); +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 -function dropDupes(root, variableList) { - root.walkRules((rule, ruleIndex) => { - let seen = {}; - rule.walkDecls((decl) => { - if (decl.prop.startsWith("--")) { - if (seen[decl.prop]) { - seen[decl.prop].remove(); - } +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ - seen[decl.prop] = decl; - } - }); - }); -} +/** + * @typedef Options + */ -module.exports = postcss.plugin("legacy-postcss-dropdupedvars", function () { - return (root, result) => { - dropDupes(root); +/** @type import('postcss').PluginCreator */ +module.exports = () => { + return { + postcssPlugin: "legacy-postcss-dropdupedvars", + OnceExit(root) { + root.walkRules((rule) => { + const seen = {}; + + rule.walkDecls(/^--/, (decl) => { + if (seen[decl.prop]) { + seen[decl.prop].remove(); + } + + seen[decl.prop] = decl; + }); + }); + }, }; -}); +}; + +module.exports.postcss = true; diff --git a/plugins/legacy-postcss-dropdupedvars/package.json b/plugins/legacy-postcss-dropdupedvars/package.json index 5133d84219..dc82bb10b5 100644 --- a/plugins/legacy-postcss-dropdupedvars/package.json +++ b/plugins/legacy-postcss-dropdupedvars/package.json @@ -9,10 +9,11 @@ "scripts": { "test": "ava" }, - "dependencies": { - "postcss": "^7.0.32" + "peerDependencies": { + "postcss": ">=8" }, "devDependencies": { - "ava": "^5.3.1" + "ava": "^6.1.0", + "postcss": "^8.4.33" } } diff --git a/plugins/legacy-postcss-dropunusedvars/index.js b/plugins/legacy-postcss-dropunusedvars/index.js index 9fe0c908dc..3b6d158a06 100644 --- a/plugins/legacy-postcss-dropunusedvars/index.js +++ b/plugins/legacy-postcss-dropunusedvars/index.js @@ -1,67 +1,76 @@ -const postcss = require("postcss"); +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +/** + * @typedef Options +*/ + const valueParser = require("postcss-value-parser"); -function getUsedVars(root) { - const usedAnywhere = []; - const usedInProps = []; - const variableRelationships = {}; +/** @type import('postcss').PluginCreator */ +module.exports = () => { + return { + postcssPlugin: "legacy-postcss-dropunusedvars", + OnceExit(root) { + // Find all used variables + const usedAnywhere = []; + const usedInProps = []; + const variableRelationships = {}; + + root.walkDecls((decl) => { + const usedInDecl = []; - root.walkRules((rule, ruleIndex) => { - rule.walkDecls((decl) => { - const usedInDecl = []; + const isVar = decl.prop.startsWith("--"); + const matches = decl.value.match(/var\(.*?\)/g); - const isVar = decl.prop.startsWith("--"); - const matches = decl.value.match(/var\(.*?\)/g); - if (matches) { - // Parse value and get a list of variables used - const parsed = valueParser(decl.value); - parsed.walk((node) => { - if (node.type === "function" && node.value === "var") { - if (node.nodes.length) { - const varName = node.nodes[0].value; - usedInDecl.push(varName); - usedAnywhere.push(varName); - if (!isVar) { - usedInProps.push(varName); + if (matches) { + // Parse value and get a list of variables used + valueParser(decl.value).walk((node) => { + if (node.type === "function" && node.value === "var") { + if (node.nodes.length) { + const varName = node.nodes[0].value; + usedInDecl.push(varName); + usedAnywhere.push(varName); + if (!isVar) { + usedInProps.push(varName); + } } } - } - }); - } + }); + } + + // Store every variable referenced by this var + if (!isVar || !usedInDecl.length) return; - // Store every variable referenced by this var - if (isVar && usedInDecl.length) { for (let varName of usedInDecl) { variableRelationships[varName] = variableRelationships[varName] || []; variableRelationships[varName].push(decl.prop); } - } - }); - }); - - return { - usedAnywhere, - usedInProps, - variableRelationships, - }; -} + }); -function dropUnused( - root, - { usedAnywhere, usedInProps, variableRelationships } -) { - root.walkRules((rule, ruleIndex) => { - rule.walkDecls((decl) => { - if (decl.prop.startsWith("--")) { + // Drop unused variable definitions + root.walkDecls(/^--/, (decl) => { const varName = decl.prop; + // Definitely drop it if it's never used if (!usedAnywhere.includes(varName)) { decl.remove(); } else if (!usedInProps.includes(varName)) { // Drop a variable if everything that references it has been removed let relatedVars = variableRelationships[varName]; + if (relatedVars && relatedVars.length) { let keep = false; + // Check if everything that references this variable has been removed for (let relatedVar of relatedVars) { if (usedAnywhere.includes(relatedVar)) { @@ -69,26 +78,13 @@ function dropUnused( break; } } - if (!keep) { - decl.remove(); - } + + if (!keep) decl.remove(); } } - } - }); - }); -} - -function process(root) { - // Find all used variables - const variableUsage = getUsedVars(root); - - // Drop unused variable definitions - dropUnused(root, variableUsage); -} - -module.exports = postcss.plugin("legacy-postcss-dropunusedvars", function () { - return (root, result) => { - process(root); + }); + }, }; -}); +}; + +module.exports.postcss = true; diff --git a/plugins/legacy-postcss-dropunusedvars/package.json b/plugins/legacy-postcss-dropunusedvars/package.json index ac5f9f2b79..f1668a438a 100644 --- a/plugins/legacy-postcss-dropunusedvars/package.json +++ b/plugins/legacy-postcss-dropunusedvars/package.json @@ -10,10 +10,13 @@ "test": "ava" }, "dependencies": { - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" + }, + "peerDependencies": { + "postcss": ">=8" }, "devDependencies": { - "ava": "^5.3.1" + "ava": "^6.1.0", + "postcss": "^8.4.33" } } diff --git a/plugins/postcss-combininator/index.js b/plugins/postcss-combininator/index.js index 3346c57867..88405ce8b6 100644 --- a/plugins/postcss-combininator/index.js +++ b/plugins/postcss-combininator/index.js @@ -10,35 +10,41 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -const postcss = require("postcss"); - -function process(root, options) { - let rules = []; - let declarations = {}; - root.walkRules((rule) => { - rules.push(rule); - rule.walkDecls((decl) => { - if (decl.prop.startsWith("--")) { - declarations[decl.prop] = decl; - decl.remove(); - } - }); - }); - - let lastRule = rules[rules.length - 1]; - if (lastRule) { - rules.forEach((rule, index) => { - if (index !== rules.length - 1) { - rule.remove(); - } - }); +/** + * @typedef Options + */ + +/** @type import('postcss').PluginCreator */ +module.exports = () => { + return { + postcssPlugin: "postcss-combininator", + OnceExit(root) { + const rules = []; + const declarations = {}; + + root.walkRules((rule) => { + rules.push(rule); + rule.walkDecls(/^--/, (decl) => { + declarations[decl.prop] = decl; + decl.remove(); + }); + }); - for (let decl of Object.values(declarations)) { - lastRule.append(decl); - } - } -} + if (!rules.length) return; + + const lastIdx = rules.length - 1; + const lastRule = rules[lastIdx]; + if (!lastRule) return; + + rules.forEach((rule, index) => { + if (index !== lastIdx) rule.remove(); + }); + + for (const decl of Object.values(declarations)) { + lastRule.append(decl); + } + }, + }; +}; -module.exports = postcss.plugin("postcss-combininator", function (options) { - return (root, result) => process(root, options); -}); +module.exports.postcss = true; diff --git a/plugins/postcss-combininator/package.json b/plugins/postcss-combininator/package.json index a24e9bed02..84c426243a 100644 --- a/plugins/postcss-combininator/package.json +++ b/plugins/postcss-combininator/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "postcss-combininator", - "version": "1.0.2", + "version": "1.1.0", "description": "Combines multiple blocks of custom properties", "license": "Apache-2.0", "author": "Adobe", @@ -10,7 +10,7 @@ "test": "ava" }, "dependencies": { - "postcss": "^7.0.32" + "postcss": "^8.4.33" }, "publishConfig": { "access": "public" diff --git a/plugins/postcss-custom-properties-mapping/CHANGELOG.md b/plugins/postcss-custom-properties-mapping/CHANGELOG.md new file mode 100644 index 0000000000..e4d87c4d45 --- /dev/null +++ b/plugins/postcss-custom-properties-mapping/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/plugins/postcss-custom-properties-mapping/README.md b/plugins/postcss-custom-properties-mapping/README.md new file mode 100644 index 0000000000..e96ddce4fa --- /dev/null +++ b/plugins/postcss-custom-properties-mapping/README.md @@ -0,0 +1,8 @@ +# postcss-custom-properties-mapping + +## Installation + +```sh +npm install postcss-custom-properties-mapping +postcss -u postcss-custom-properties-mapping -o dist/index.css src/index.css +``` diff --git a/plugins/postcss-custom-properties-mapping/index.js b/plugins/postcss-custom-properties-mapping/index.js new file mode 100644 index 0000000000..c8f18bef73 --- /dev/null +++ b/plugins/postcss-custom-properties-mapping/index.js @@ -0,0 +1,105 @@ +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +const { readFileSync } = require("fs"); + +const postcss = require("postcss"); +const fg = require("fast-glob"); +const valueParser = require("postcss-value-parser"); + +/** + * @typedef {Object} Options + */ + +/** @type import('postcss').PluginCreator */ +module.exports = ({ + tokenDir, + staticFiles = [], + extendedFiles = [], +} = {}) => { + const fetchVariablesFromFiles = (files, { cwd }) => { + files = fg.sync(files, { + cwd, + absolute: true, + onlyFiles: true, + allowEmpty: true, + }); + + const variableList = {}; + files.forEach((file) => { + const css = readFileSync(file, "utf8"); + const root = postcss.parse(css); + + root.walkDecls((decl) => { + variableList[decl.prop] = decl.value; + }); + }); + + return variableList; + }; + + return { + postcssPlugin: "postcss-custom-properties-mapping", + prepare() { + const fetchStatic = staticFiles.length > 0 && tokenDir; + const fetchExtended = extendedFiles.length > 0 && tokenDir; + + const staticVars = fetchStatic ? fetchVariablesFromFiles(staticFiles, { cwd: tokenDir }) : {}; + const extendedVars = fetchExtended ? fetchVariablesFromFiles(extendedFiles, { cwd: tokenDir }) : {}; + + return { + Declaration(decl) { + // match custom property inclusions + if (!/(^|[^\w-])var\([\W\w]+\)/.test(decl.value)) return; + + const value = valueParser(decl.value); + + if ( + value.nodes && + value.nodes[0] && + value.nodes[0].value === "url" + ) { + // Don't process custom properties within URLs, it does nothing and breaks parcel + // see https://github.com/parcel-bundler/parcel/issues/3881 + return; + } + + value.walk((node, index, nodes) => { + if (node.type === "function" && node.value === "var") { + const v = node.nodes[0].value; + + // If the value is static, replace the variable with the value. + // Otherwise, change the variable name to the mapped name. + if (staticVars[v]) { + nodes.splice( + index, + 1, + ...valueParser(`var(${v}, ${staticVars[v]})`).nodes + ); + } else if (extendedVars[v]) { + nodes.splice( + index, + 1, + ...valueParser(`var(${v}, ${extendedVars[v]})`).nodes + ); + } + } + }); + + decl.value = value.toString(); + }, + }; + }, + }; +}; + +module.exports.postcss = true; diff --git a/plugins/postcss-custom-properties-mapping/package.json b/plugins/postcss-custom-properties-mapping/package.json new file mode 100644 index 0000000000..d225675436 --- /dev/null +++ b/plugins/postcss-custom-properties-mapping/package.json @@ -0,0 +1,16 @@ +{ + "private": true, + "name": "postcss-custom-properties-mapping", + "version": "1.0.0", + "description": "", + "license": "Apache-2.0", + "author": "Adobe", + "main": "index.js", + "dependencies": { + "postcss": "^8.4.33", + "postcss-value-parser": "^4.2.0" + }, + "peerDependencies": { + "postcss": ">=8" + } +} diff --git a/plugins/postcss-custom-properties-passthrough/CHANGELOG.md b/plugins/postcss-custom-properties-passthrough/CHANGELOG.md new file mode 100644 index 0000000000..e4d87c4d45 --- /dev/null +++ b/plugins/postcss-custom-properties-passthrough/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/plugins/postcss-custom-properties-passthrough/README.md b/plugins/postcss-custom-properties-passthrough/README.md new file mode 100644 index 0000000000..e42f37187a --- /dev/null +++ b/plugins/postcss-custom-properties-passthrough/README.md @@ -0,0 +1,36 @@ +# postcss-custom-properties-passthrough + +> Allows passthrough of custom properties without identifying them as unused. + +## Installation + +```sh +npm install postcss-custom-properties-passthrough +postcss -u postcss-custom-properties-passthrough -o dist/index.css src/index.css +``` + +## Usage + +This plugin turns this: + +```css +.spectrum { + x--spectrum-actionbutton-background-color: blue; + x--spectrum-actionbutton-border-color: transparent; + + background-color: xvar(--spectrum-actionbutton-background-color); + border-color: xvar(--spectrum-actionbutton-border-color); +} +``` + +Into this: + +```css +.spectrum { + --spectrum-actionbutton-background-color: blue; + --spectrum-actionbutton-border-color: transparent; + + background-color: var(--spectrum-actionbutton-background-color); + border-color: var(--spectrum-actionbutton-border-color); +} +``` diff --git a/plugins/postcss-custom-properties-passthrough/expected/basic.css b/plugins/postcss-custom-properties-passthrough/expected/basic.css new file mode 100644 index 0000000000..afb5e12d24 --- /dev/null +++ b/plugins/postcss-custom-properties-passthrough/expected/basic.css @@ -0,0 +1,7 @@ +.spectrum { + --spectrum-actionbutton-background-color: blue; + --spectrum-actionbutton-border-color: transparent; + + background-color: var(--spectrum-actionbutton-background-color); + border-color: var(--spectrum-actionbutton-border-color); +} diff --git a/plugins/postcss-custom-properties-passthrough/fixtures/basic.css b/plugins/postcss-custom-properties-passthrough/fixtures/basic.css new file mode 100644 index 0000000000..b7672a26ae --- /dev/null +++ b/plugins/postcss-custom-properties-passthrough/fixtures/basic.css @@ -0,0 +1,7 @@ +.spectrum { + x--spectrum-actionbutton-background-color: blue; + x--spectrum-actionbutton-border-color: transparent; + + background-color: xvar(--spectrum-actionbutton-background-color); + border-color: xvar(--spectrum-actionbutton-border-color); +} diff --git a/tools/component-builder-simple/css/plugins/postcss-custom-properties-passthrough.js b/plugins/postcss-custom-properties-passthrough/index.js similarity index 56% rename from tools/component-builder-simple/css/plugins/postcss-custom-properties-passthrough.js rename to plugins/postcss-custom-properties-passthrough/index.js index 0e96c5f84e..6425db6cbc 100644 --- a/tools/component-builder-simple/css/plugins/postcss-custom-properties-passthrough.js +++ b/plugins/postcss-custom-properties-passthrough/index.js @@ -9,24 +9,26 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -var postcss = require("postcss"); -module.exports = postcss.plugin( - "postcss-custom-properties-passthrough", - function (opts) { - opts = opts || {}; +/** + * @typedef Options + */ - return function (root, result) { - root.walkRules((rule, ruleIndex) => { - rule.walkDecls((decl) => { - if (decl.value.match("xvar(.*?)")) { - decl.value = decl.value.substr(1); - } - if (decl.prop.substr(0, 3) === "x--") { - decl.prop = decl.prop.substr(1); - } - }); - }); - }; - } -); +/** @type import('postcss').PluginCreator */ +module.exports = () => { + return { + postcssPlugin: "postcss-custom-properties-passthrough", + Declaration(decl) { + // Drop the first character of the value + if (decl.value.match("xvar(.*?)")) { + decl.value = decl.value.substr(1); + } + + if (decl.prop.startsWith("x--")) { + decl.prop = decl.prop.substr(1); + } + }, + }; +}; + +module.exports.postcss = true; diff --git a/plugins/postcss-custom-properties-passthrough/package.json b/plugins/postcss-custom-properties-passthrough/package.json new file mode 100644 index 0000000000..b6b84e5ddc --- /dev/null +++ b/plugins/postcss-custom-properties-passthrough/package.json @@ -0,0 +1,19 @@ +{ + "private": true, + "name": "postcss-custom-properties-passthrough", + "version": "1.0.0", + "description": "Supports passthrough custom properties that don't throw unused warnings", + "license": "Apache-2.0", + "author": "Adobe", + "main": "index.js", + "scripts": { + "test": "ava" + }, + "dependencies": { + "postcss": "^8.4.33" + }, + "devDependencies": { + "ava": "^6.1.0", + "postcss": "^8.4.33" + } +} diff --git a/plugins/postcss-custom-properties-passthrough/test.js b/plugins/postcss-custom-properties-passthrough/test.js new file mode 100644 index 0000000000..f25383b98c --- /dev/null +++ b/plugins/postcss-custom-properties-passthrough/test.js @@ -0,0 +1,49 @@ +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +const fs = require("fs"); +const test = require("ava"); +const postcss = require("postcss"); +const plugin = require("./index.js"); + +function compare( + t, + fixtureFilePath, + expectedFilePath, + options = { + processIdentifier: (identifier) => { + if (identifier === "express") { + return "spectrum--express"; + } + return identifier; + }, + } +) { + return postcss([plugin(options)]) + .process(readFile(`./fixtures/${fixtureFilePath}`), { + from: fixtureFilePath, + }) + .then((result) => { + const actual = result.css; + const expected = readFile(`./expected/${expectedFilePath}`); + t.is(actual, expected); + t.is(result.warnings().length, 0); + }); +} + +function readFile(filename) { + return fs.readFileSync(filename, "utf8"); +} + +test("create basic output", (t) => { + return compare(t, "basic.css", "basic.css"); +}); diff --git a/plugins/postcss-dropdupedvars/index.js b/plugins/postcss-dropdupedvars/index.js index f3c08ffb85..1407664096 100644 --- a/plugins/postcss-dropdupedvars/index.js +++ b/plugins/postcss-dropdupedvars/index.js @@ -1,14 +1,30 @@ -const postcss = require("postcss"); +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 -module.exports = postcss.plugin("postcss-dropdupedvars", function () { - return (root) => { - root.walkRules((rule) => { - let seen = {}; - rule.walkDecls((decl) => { - if (!decl.prop.startsWith("--")) return; +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +/** + * @typedef Options + */ + +/** @type import('postcss').PluginCreator */ +module.exports = () => { + return { + postcssPlugin: "postcss-dropdupedvars", + Rule(rule, { result }) { + const seen = {}; + + rule.walkDecls(/^--/, (decl) => { if (seen[decl.prop]) { decl.warn( - root.toResult(), + result, `Dropping duplicate variable ${decl.prop}` ); seen[decl.prop].remove(); @@ -16,6 +32,8 @@ module.exports = postcss.plugin("postcss-dropdupedvars", function () { seen[decl.prop] = decl; }); - }); + }, }; -}); +}; + +module.exports.postcss = true; diff --git a/plugins/postcss-dropdupedvars/package.json b/plugins/postcss-dropdupedvars/package.json index 41a3842189..3f29c6aa57 100644 --- a/plugins/postcss-dropdupedvars/package.json +++ b/plugins/postcss-dropdupedvars/package.json @@ -9,10 +9,11 @@ "scripts": { "test": "ava" }, - "dependencies": { - "postcss": "^7.0.32" + "peerDependencies": { + "postcss": ">=8" }, "devDependencies": { - "ava": "^5.3.1" + "ava": "^6.1.0", + "postcss": "^8.4.33" } } diff --git a/plugins/postcss-droproot/index.js b/plugins/postcss-droproot/index.js index 644fd82659..cc262707bc 100644 --- a/plugins/postcss-droproot/index.js +++ b/plugins/postcss-droproot/index.js @@ -1,17 +1,28 @@ -const postcss = require("postcss"); +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 -function process(root) { - root.walkRules((rule, ruleIndex) => { - if (rule.selector === ":root") { - rule.remove(); - } - }); -} +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +/** + * @typedef Options +*/ -let allVariables; -module.exports = postcss.plugin("postcss-droproot", function () { - allVariables = []; - return (root, result) => { - process(root); +/** @type import('postcss').PluginCreator */ +module.exports = () => { + return { + postcssPlugin: "postcss-droproot", + Rule(root) { + if (root.selector !== ":root") return; + rule.remove(); + }, }; -}); +}; + +module.exports.postcss = true; diff --git a/plugins/postcss-droproot/package.json b/plugins/postcss-droproot/package.json index 90498a8e41..4aef074f39 100644 --- a/plugins/postcss-droproot/package.json +++ b/plugins/postcss-droproot/package.json @@ -10,6 +10,6 @@ "test": "ava" }, "dependencies": { - "postcss": "^7.0.32" + "postcss": "^8.4.33" } } diff --git a/plugins/postcss-dropunusedvars/index.js b/plugins/postcss-dropunusedvars/index.js index e46711def5..3a15050be8 100644 --- a/plugins/postcss-dropunusedvars/index.js +++ b/plugins/postcss-dropunusedvars/index.js @@ -1,109 +1,106 @@ -const postcss = require("postcss"); +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + const valueParser = require("postcss-value-parser"); -function getUsedVars(root) { - const usedAnywhere = []; - const usedInProps = []; - const variableRelationships = {}; - - root.walkRules((rule) => { - rule.walkDecls((decl) => { - const usedInDecl = []; - const isVar = decl.prop.startsWith("--"); - const matches = decl.value.match(/var\(.*?\)/g); - if (matches) { - // Parse value and get a list of variables used - const parsed = valueParser(decl.value); - parsed.walk((node) => { - if (node.type === "function" && node.value === "var") { - if (node.nodes.length) { - const varName = node.nodes[0].value; - usedInDecl.push(varName); - usedAnywhere.push(varName); - if (!isVar) { - usedInProps.push(varName); +/** + * @typedef {Object} Options + * @property {boolean} [fix=true] + */ + +/** @type import('postcss').PluginCreator */ +module.exports = ({ fix = true }) => { + return { + postcssPlugin: "postcss-dropunusedvars", + OnceExit(root, { result }) { + const usedAnywhere = []; + const usedInProps = []; + const variableRelationships = {}; + + root.walkDecls((decl) => { + const usedInDecl = []; + const isVar = decl.prop.startsWith("--"); + const matches = decl.value.match(/var\(.*?\)/g); + + if (matches) { + // Parse value and get a list of variables used + const parsed = valueParser(decl.value); + parsed.walk((node) => { + if (node.type === "function" && node.value === "var") { + if (node.nodes.length) { + const varName = node.nodes[0].value; + usedInDecl.push(varName); + usedAnywhere.push(varName); + if (!isVar) { + usedInProps.push(varName); + } } } + }); + } + + // Store every variable referenced by this var + if (isVar && usedInDecl.length) { + for (let varName of usedInDecl) { + variableRelationships[varName] = variableRelationships[varName] || []; + variableRelationships[varName].push(decl.prop); } - }); - } - - // Store every variable referenced by this var - if (isVar && usedInDecl.length) { - for (let varName of usedInDecl) { - variableRelationships[varName] = variableRelationships[varName] || []; - variableRelationships[varName].push(decl.prop); } - } - }); - }); + }); - return { - usedAnywhere, - usedInProps, - variableRelationships, - }; -} - -function dropUnused( - root, - { usedAnywhere, usedInProps, variableRelationships }, - fix = true -) { - root.walkRules((rule) => { - rule.walkDecls((decl) => { - if (!decl.prop.startsWith("--")) return; - - const varName = decl.prop; - - // Note if it seems like this variable is unused - if (!usedAnywhere.includes(varName)) { - if (!fix) - decl.warn(root.toResult(), "Possible unused variable definition", { - word: varName, - index: decl.sourceIndex, - }); - else decl.remove(); + // Drop unused variable definitions + root.walkDecls(/^--/, (decl) => { + const varName = decl.prop; - return; - } + // Note if it seems like this variable is unused + if (!usedAnywhere.includes(varName)) { + if (!fix) + decl.warn(result, `⚠️ ${varName} unused variable definition`, { + word: varName, + index: decl.sourceIndex, + }); + else decl.remove(); - if (!usedInProps.includes(varName)) { - // Drop a variable if everything that references it has been removed - const relatedVars = variableRelationships[varName]; + return; + } - if (!relatedVars || relatedVars.length === 0) return; + if (!usedInProps.includes(varName)) { + // Drop a variable if everything that references it has been removed + const relatedVars = variableRelationships[varName]; - // Check if everything that references this variable has been removed - const keep = Object.entries(relatedVars).reduce( - (keep, [, relatedVar]) => { - if (usedAnywhere.includes(relatedVar)) return true; - else return keep; - }, - false - ); + if (!relatedVars || relatedVars.length === 0) return; - if (keep) return; + // Check if everything that references this variable has been removed + const keep = Object.entries(relatedVars).reduce( + (keep, [, relatedVar]) => { + if (usedAnywhere.includes(relatedVar)) return true; + else return keep; + }, + false + ); - if (fix) decl.remove(); - else { - decl.warn(root.toResult(), "Possible unused variable definition", { - word: varName, - index: decl.sourceIndex, - }); + if (keep) return; + + if (fix) decl.remove(); + else { + decl.warn(result, `⚠️ ${varName} unused variable definition`, { + word: varName, + index: decl.sourceIndex, + }); + } } - } - }); - }); -} - -module.exports = postcss.plugin( - "postcss-dropunusedvars", - function (options = {}) { - return (root) => { - const fix = options.fix ?? true; - // Drop unused variable definitions - dropUnused(root, getUsedVars(root), fix); - }; - } -); + }); + }, + }; +}; + +module.exports.postcss = true; diff --git a/plugins/postcss-dropunusedvars/package.json b/plugins/postcss-dropunusedvars/package.json index 2b839dd172..21d8956eea 100644 --- a/plugins/postcss-dropunusedvars/package.json +++ b/plugins/postcss-dropunusedvars/package.json @@ -10,10 +10,13 @@ "test": "ava" }, "dependencies": { - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" + }, + "peerDependencies": { + "postcss": ">=8" }, "devDependencies": { - "ava": "^5.3.1" + "ava": "^6.1.0", + "postcss": "^8.4.33" } } diff --git a/plugins/postcss-notnested/CHANGELOG.md b/plugins/postcss-notnested/CHANGELOG.md new file mode 100644 index 0000000000..e4d87c4d45 --- /dev/null +++ b/plugins/postcss-notnested/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/plugins/postcss-notnested/README.md b/plugins/postcss-notnested/README.md new file mode 100644 index 0000000000..d642e1679f --- /dev/null +++ b/plugins/postcss-notnested/README.md @@ -0,0 +1,8 @@ +# postcss-notnested + +## Installation + +```sh +npm install postcss-notnested +postcss -u postcss-notnested -o dist/index.css src/index.css +``` diff --git a/plugins/postcss-notnested/index.js b/plugins/postcss-notnested/index.js new file mode 100644 index 0000000000..3d5331e088 --- /dev/null +++ b/plugins/postcss-notnested/index.js @@ -0,0 +1,71 @@ +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +/** + * @typedef {Object} Options + * @property {string} [replace] + */ + +/** @type import('postcss').PluginCreator */ +module.exports = ({ replace } = {}) => { + return { + postcssPlugin: "postcss-notnested", + Rule(rule) { + if (!rule.selectors) return; + + let selectors; + if (replace) { + let replaced = false; + selectors = rule.selectors.map((selector) => { + if (!selector) return; + + if (/^&/.test(selector)) { + replaced = true; + // Handle special case where the replacement selector === the existing selector + if (selector.replace(/^&/, "") === replace) { + return replace; + } + + return selector.replace(/^&/, replace); + } + + return selector; + }); + + if (!replaced) return; + + // De-dupe selectors + selectors = selectors.filter((selector, index) => { + return selectors.indexOf(selector) === index; + }); + + rule.selectors = selectors; + return; + } + + selectors = rule.selectors.filter((selector) => { + // Kill the selector with the stray ampersand -- it's not nested! + return !/^&/.test(selector); + }); + + if (selectors.length == 0) { + // If no selectors remain, remove the rule completely + rule.remove(); + } else if (selectors.length != rule.selectors.length) { + // Only replace the selectors if we changed something (avoids extra work for every selector) + rule.selectors = selectors; + } + }, + }; +}; + +module.exports.postcss = true; diff --git a/plugins/postcss-notnested/package.json b/plugins/postcss-notnested/package.json new file mode 100644 index 0000000000..717eeda4cb --- /dev/null +++ b/plugins/postcss-notnested/package.json @@ -0,0 +1,15 @@ +{ + "private": true, + "name": "postcss-notnested", + "version": "1.0.0", + "description": "", + "license": "Apache-2.0", + "author": "Adobe", + "main": "index.js", + "peerDependencies": { + "postcss": ">=8" + }, + "devDependencies": { + "postcss": "^8.4.33" + } +} diff --git a/plugins/postcss-remapvars/CHANGELOG.md b/plugins/postcss-remapvars/CHANGELOG.md deleted file mode 100644 index be92670707..0000000000 --- a/plugins/postcss-remapvars/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - - - -# 1.1.0 - -🗓 2020-12-04 - -### ✨ Features - -- add postcss-remapvars ([a4623a6](https://github.com/adobe/spectrum-css/commit/a4623a6)) -- support filter argument ([52a83b2](https://github.com/adobe/spectrum-css/commit/52a83b2)) -- support regexp ([11945b2](https://github.com/adobe/spectrum-css/commit/11945b2)) - -### 🐛 Bug fixes - -- correct order of remapped vars within original rule ([c5a92ee](https://github.com/adobe/spectrum-css/commit/c5a92ee)) -- indentation, tests ([2bc897a](https://github.com/adobe/spectrum-css/commit/2bc897a)) diff --git a/plugins/postcss-remapvars/README.md b/plugins/postcss-remapvars/README.md deleted file mode 100644 index b4f76f4685..0000000000 --- a/plugins/postcss-remapvars/README.md +++ /dev/null @@ -1,221 +0,0 @@ -# postcss-remapvars - -> Remap variables to create variable-driven CSS components - -## Installation - -```sh -npm install postcss-remapvars -postcss -u postcss-remapvars -o dist/index.css src/index.css -``` - -## Usage - -Assuming you have some variables defined and a rule whose properties reference them: - -```css -:root { - --component-background-color: blue; - --component-s-width: 10px; - --component-s-height: 10px; - --component-l-width: 20px; - --component-l-height: 20px; -} - -.component { - background-color: var(--component-background-color); - - width: var(--component-width); - height: var(--component-height); -} -``` - -Define additional rules, calling `@remapvars { find: STRING | REGEXP, replace: STRING, filter: [STRING | REGEXP] }` to re-define the variables with their modified versions: - -```css -.component--small { - @remapvars { - find: --component-s-; - replace: --component-; - } -} - -.component--large { - @remapvars { - find: --component-l-; - replace: --component-; - } -} -``` - -The result are classes that re-define variables to change the visual style of a component. That is, instead of modifying CSS properties to reference new variables, you override the variables that the CSS properties already reference: - -```css -:root { - --component-background-color: blue; - --component-s-width: 10px; - --component-s-height: 10px; - --component-l-width: 20px; - --component-l-height: 20px; -} - -.component { - background-color: var(--component-background-color); - - width: var(--component-width); - height: var(--component-height); -} - -.component--small { - --component-width: var(--component-s-width); - --component-height: var(--component-s-height); -} - -.component--large { - --component-width: var(--component-l-width); - --component-height: var(--component-l-height); -} -``` - -## Advanced Usage - -### RegEx - -Regular expressions can be used as well, and flags are supported ala `/whatever/i`: - -```css -:root { - --component-background-color: black; - --component-text-color: black; - --component-border-style: solid; - --component-border-color: orange; - --component-border-width: 1px; - - --component-background-color-hover: blue; - --component-text-color-hover: blue; - --component-border-color-hover: green; -} - -.component { - background-color: var(--component-background-color); - color: var(--component-text-color); - border: var(--component-border-width) var(--component-border-color) var(--component-border-style); -} - -.component--hover { - @remapvars { - find: /(--component-. +)-hover/; - replace: $1; - } -} -``` - -The result is the same, variable-driven classes: - -```css -:root { - --component-background-color: black; - --component-text-color: black; - --component-border-style: solid; - --component-border-color: orange; - --component-border-width: 1px; - - --component-background-color-hover: blue; - --component-text-color-hover: blue; - --component-border-color-hover: green; -} - -.component { - background-color: var(--component-background-color); - color: var(--component-text-color); - border: var(--component-border-width) var(--component-border-color) var(--component-border-style); -} - -.component--hover { - --component-background-color: var(--component-background-color-hover); - --component-text-color: var(--component-text-color-hover); - --component-border-color: var(--component-border-color-hover); -} -``` - -### Filters - -A list of filter patterns can be provided . If any of them is matched, the variable is skipped. - -```css -:root { - --prefix-component-background-color: blue; - --prefix-component-shadow-size: 1px; - --prefix-component-halo-size: 1px; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-s-background-color: blue; - --prefix-component-s-shadow-size: 1px; - --prefix-component-s-halo-size: 1px; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; - --prefix-component-l-background-color: blue; - --prefix-component-l-shadow-size: 1px; - --prefix-component-l-halo-size: 1px; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - @remapvars { - find: --prefix-component-s-; - filter: color, /shadow|halo/; - replace: --prefix-component-; - } -} - -.component--large { - @remapvars { - find: --prefix-component-l-; - filter: color, /shadow|halo/; - replace: --prefix-component-; - } -} -``` - -Even though `--prefix-component-s-background-color`, `--prefix-component-shadow-size`, and `--prefix-component-l-halo-size` match the `find` pattern, they will be excluded as they match one of the `filter` patterns, and won't be included in the remap: - -```css -:root { - --prefix-component-background-color: blue; - --prefix-component-shadow-size: 1px; - --prefix-component-halo-size: 1px; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-s-background-color: blue; - --prefix-component-s-shadow-size: 1px; - --prefix-component-s-halo-size: 1px; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; - --prefix-component-l-background-color: blue; - --prefix-component-l-shadow-size: 1px; - --prefix-component-s-halo-size: 1px; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - --prefix-component-width: var(--prefix-component-s-width); - --prefix-component-height: var(--prefix-component-s-height); -} - -.component--large { - --prefix-component-width: var(--prefix-component-l-width); - --prefix-component-height: var(--prefix-component-l-height); -} -``` diff --git a/plugins/postcss-remapvars/expected/filter-list-regex.css b/plugins/postcss-remapvars/expected/filter-list-regex.css deleted file mode 100644 index 554b6aba4b..0000000000 --- a/plugins/postcss-remapvars/expected/filter-list-regex.css +++ /dev/null @@ -1,32 +0,0 @@ -:root { - --prefix-component-background-color: blue; - --prefix-component-shadow-size: 1px; - --prefix-component-halo-size: 1px; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-s-background-color: blue; - --prefix-component-s-shadow-size: 1px; - --prefix-component-s-halo-size: 1px; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; - --prefix-component-l-background-color: blue; - --prefix-component-l-shadow-size: 1px; - --prefix-component-s-halo-size: 1px; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - --prefix-component-width: var(--prefix-component-s-width); - --prefix-component-height: var(--prefix-component-s-height); -} - -.component--large { - --prefix-component-width: var(--prefix-component-l-width); - --prefix-component-height: var(--prefix-component-l-height); -} diff --git a/plugins/postcss-remapvars/expected/filter-list.css b/plugins/postcss-remapvars/expected/filter-list.css deleted file mode 100644 index 743ea930c3..0000000000 --- a/plugins/postcss-remapvars/expected/filter-list.css +++ /dev/null @@ -1,29 +0,0 @@ -:root { - --prefix-component-background-color: blue; - --prefix-component-shadow-size: 1px; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-s-background-color: blue; - --prefix-component-s-shadow-size: 1px; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; - --prefix-component-l-background-color: blue; - --prefix-component-l-shadow-size: 1px; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - --prefix-component-width: var(--prefix-component-s-width); - --prefix-component-height: var(--prefix-component-s-height); -} - -.component--large { - --prefix-component-width: var(--prefix-component-l-width); - --prefix-component-height: var(--prefix-component-l-height); -} diff --git a/plugins/postcss-remapvars/expected/filter.css b/plugins/postcss-remapvars/expected/filter.css deleted file mode 100644 index 98d73d5414..0000000000 --- a/plugins/postcss-remapvars/expected/filter.css +++ /dev/null @@ -1,26 +0,0 @@ -:root { - --prefix-component-background-color: blue; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-s-background-color: blue; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; - --prefix-component-l-background-color: blue; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - --prefix-component-width: var(--prefix-component-s-width); - --prefix-component-height: var(--prefix-component-s-height); -} - -.component--large { - --prefix-component-width: var(--prefix-component-l-width); - --prefix-component-height: var(--prefix-component-l-height); -} diff --git a/plugins/postcss-remapvars/expected/find-replace.css b/plugins/postcss-remapvars/expected/find-replace.css deleted file mode 100644 index 406b3224cf..0000000000 --- a/plugins/postcss-remapvars/expected/find-replace.css +++ /dev/null @@ -1,24 +0,0 @@ -:root { - --prefix-component-background-color: blue; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - --prefix-component-width: var(--prefix-component-s-width); - --prefix-component-height: var(--prefix-component-s-height); -} - -.component--large { - --prefix-component-width: var(--prefix-component-l-width); - --prefix-component-height: var(--prefix-component-l-height); -} diff --git a/plugins/postcss-remapvars/expected/regexp.css b/plugins/postcss-remapvars/expected/regexp.css deleted file mode 100644 index 0d952aeb1f..0000000000 --- a/plugins/postcss-remapvars/expected/regexp.css +++ /dev/null @@ -1,24 +0,0 @@ -:root { - --component-background-color: black; - --component-text-color: black; - --component-border-style: solid; - --component-border-color: orange; - --component-border-width: 1px; - - --component-background-color-hover: blue; - --component-text-color-hover: blue; - --component-border-color-hover: green; -} - -.component { - background-color: var(--component-background-color); - color: var(--component-text-color); - border: var(--component-border-width) var(--component-border-color) - var(--component-border-style); -} - -.component--hover { - --component-background-color: var(--component-background-color-hover); - --component-text-color: var(--component-text-color-hover); - --component-border-color: var(--component-border-color-hover); -} diff --git a/plugins/postcss-remapvars/fixtures/filter-list-regex.css b/plugins/postcss-remapvars/fixtures/filter-list-regex.css deleted file mode 100644 index 9cdff57836..0000000000 --- a/plugins/postcss-remapvars/fixtures/filter-list-regex.css +++ /dev/null @@ -1,38 +0,0 @@ -:root { - --prefix-component-background-color: blue; - --prefix-component-shadow-size: 1px; - --prefix-component-halo-size: 1px; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-s-background-color: blue; - --prefix-component-s-shadow-size: 1px; - --prefix-component-s-halo-size: 1px; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; - --prefix-component-l-background-color: blue; - --prefix-component-l-shadow-size: 1px; - --prefix-component-l-halo-size: 1px; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - @remapvars { - find: --prefix-component-s-; - filter: color, /shadow|halo/; - replace: --prefix-component-; - } -} - -.component--large { - @remapvars { - find: --prefix-component-l-; - filter: color, /shadow|halo/; - replace: --prefix-component-; - } -} diff --git a/plugins/postcss-remapvars/fixtures/filter-list.css b/plugins/postcss-remapvars/fixtures/filter-list.css deleted file mode 100644 index e00b3c646c..0000000000 --- a/plugins/postcss-remapvars/fixtures/filter-list.css +++ /dev/null @@ -1,35 +0,0 @@ -:root { - --prefix-component-background-color: blue; - --prefix-component-shadow-size: 1px; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-s-background-color: blue; - --prefix-component-s-shadow-size: 1px; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; - --prefix-component-l-background-color: blue; - --prefix-component-l-shadow-size: 1px; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - @remapvars { - find: --prefix-component-s-; - filter: color, shadow; - replace: --prefix-component-; - } -} - -.component--large { - @remapvars { - find: --prefix-component-l-; - filter: color, shadow; - replace: --prefix-component-; - } -} diff --git a/plugins/postcss-remapvars/fixtures/filter.css b/plugins/postcss-remapvars/fixtures/filter.css deleted file mode 100644 index a115765a78..0000000000 --- a/plugins/postcss-remapvars/fixtures/filter.css +++ /dev/null @@ -1,32 +0,0 @@ -:root { - --prefix-component-background-color: blue; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-s-background-color: blue; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; - --prefix-component-l-background-color: blue; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - @remapvars { - find: --prefix-component-s-; - filter: color; - replace: --prefix-component-; - } -} - -.component--large { - @remapvars { - find: --prefix-component-l-; - filter: color; - replace: --prefix-component-; - } -} diff --git a/plugins/postcss-remapvars/fixtures/find-replace.css b/plugins/postcss-remapvars/fixtures/find-replace.css deleted file mode 100644 index a335e914d5..0000000000 --- a/plugins/postcss-remapvars/fixtures/find-replace.css +++ /dev/null @@ -1,28 +0,0 @@ -:root { - --prefix-component-background-color: blue; - --prefix-component-s-width: 10px; - --prefix-component-s-height: 10px; - --prefix-component-l-width: 20px; - --prefix-component-l-height: 20px; -} - -.component { - background-color: var(--prefix-component-background-color); - - width: var(--prefix-component-width); - height: var(--prefix-component-height); -} - -.component--small { - @remapvars { - find: --prefix-component-s-; - replace: --prefix-component-; - } -} - -.component--large { - @remapvars { - find: --prefix-component-l-; - replace: --prefix-component-; - } -} diff --git a/plugins/postcss-remapvars/fixtures/regexp.css b/plugins/postcss-remapvars/fixtures/regexp.css deleted file mode 100644 index 4c8e5ac7c7..0000000000 --- a/plugins/postcss-remapvars/fixtures/regexp.css +++ /dev/null @@ -1,25 +0,0 @@ -:root { - --component-background-color: black; - --component-text-color: black; - --component-border-style: solid; - --component-border-color: orange; - --component-border-width: 1px; - - --component-background-color-hover: blue; - --component-text-color-hover: blue; - --component-border-color-hover: green; -} - -.component { - background-color: var(--component-background-color); - color: var(--component-text-color); - border: var(--component-border-width) var(--component-border-color) - var(--component-border-style); -} - -.component--hover { - @remapvars { - find: /(--component-. *)-hover/; - replace: $1; - } -} diff --git a/plugins/postcss-remapvars/index.js b/plugins/postcss-remapvars/index.js deleted file mode 100644 index 379b0e22fe..0000000000 --- a/plugins/postcss-remapvars/index.js +++ /dev/null @@ -1,111 +0,0 @@ -const postcss = require("postcss"); - -function getVariable(varName, config) { - return varName.replace(config.find, config.replace); -} - -function getPattern(pattern) { - const match = pattern.match(/^\/(.*?)\/(.*?)$/, ""); - if (match) { - const [, stringPattern, flags] = match; - pattern = RegExp(stringPattern, flags); - } - return pattern; -} - -function remapVars(rule) { - // Read in config - let config = {}; - rule.each((node) => { - config[node.prop.toLowerCase()] = node.value; - }); - - // Support regexp - config.find = getPattern(config.find); - - const filterPatterns = []; - if (config.filter) { - // Support multiple filters split by commas with whitespace - for (let filterPattern of config.filter.split(",")) { - filterPatterns.push(getPattern(filterPattern.trim())); - } - } - - let outVariables = {}; - - // Check for matching variables - varLoop: for (let varName of allVariables) { - if (varName.match(config.find)) { - filterLoop: for (let filterPattern of filterPatterns) { - if (varName.match(filterPattern)) { - // Skip this variable - continue varLoop; - } - } - outVariables[getVariable(varName, config)] = varName; - } - } - - // Remap in output - for (let [varName, value] of Object.entries(outVariables)) { - const decl = postcss.decl({ - prop: varName, - value: `var(${value})`, - }); - decl.raws.before = rule.raws.before; - decl.raws.semicolon = true; - - rule.parent.insertBefore(rule, decl); - } - - // Close out the rule with a semicolon - rule.parent.raws.semicolon = true; - - // Drop the original rule - rule.remove(); -} - -function isVar(node) { - return node.type === "decl" && node.prop.startsWith("--"); -} - -function getVarName(node) { - return node.prop; -} - -function processRule(rule) { - // Check for vars - rule.each((node) => { - if (isVar(node)) { - allVariables.push(getVarName(node)); - } - }); -} - -function processAtRule(rule) { - const operation = rule.name.toLowerCase(); - - if (operation === "remapvars") { - remapVars(rule); - } -} - -function process(root) { - // Gather all variables - root.walkRules((rule) => { - processRule(rule); - }); - - // Remap variables where requested - root.walkAtRules((rule) => { - processAtRule(rule); - }); -} - -let allVariables; -module.exports = postcss.plugin("postcss-remapvars", function () { - allVariables = []; - return (root, result) => { - process(root); - }; -}); diff --git a/plugins/postcss-remapvars/package.json b/plugins/postcss-remapvars/package.json deleted file mode 100644 index c27de1bff5..0000000000 --- a/plugins/postcss-remapvars/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "private": true, - "name": "postcss-remapvars", - "version": "1.1.0", - "description": "Remap variables with find and replace", - "license": "Apache-2.0", - "author": "Adobe", - "main": "index.js", - "scripts": { - "test": "ava" - }, - "dependencies": { - "postcss": "^7.0.32" - }, - "devDependencies": { - "ava": "^5.3.1" - } -} diff --git a/plugins/postcss-remapvars/test.js b/plugins/postcss-remapvars/test.js deleted file mode 100644 index 3c18082e58..0000000000 --- a/plugins/postcss-remapvars/test.js +++ /dev/null @@ -1,41 +0,0 @@ -const fs = require("fs"); -const test = require("ava"); -const postcss = require("postcss"); -const plugin = require("./index.js"); - -function compare(t, fixtureFilePath, expectedFilePath, options = {}) { - return postcss([plugin(options)]) - .process(readFile(`./fixtures/${fixtureFilePath}`), { - from: fixtureFilePath, - }) - .then((result) => { - const expected = result.css; - const actual = readFile(`./expected/${expectedFilePath}`); - t.is(expected, actual); - t.is(result.warnings().length, 0); - }); -} - -function readFile(filename) { - return fs.readFileSync(filename, "utf8"); -} - -test("remap with find and replace", (t) => { - return compare(t, "find-replace.css", "find-replace.css"); -}); - -test("support regexp", (t) => { - return compare(t, "regexp.css", "regexp.css"); -}); - -test("support filter", (t) => { - return compare(t, "filter.css", "filter.css"); -}); - -test("support a list of filters", (t) => { - return compare(t, "filter-list.css", "filter-list.css"); -}); - -test("support a list of filters with regex", (t) => { - return compare(t, "filter-list-regex.css", "filter-list-regex.css"); -}); diff --git a/plugins/postcss-splitinator/index.js b/plugins/postcss-splitinator/index.js index b1a6e3e617..0869820777 100644 --- a/plugins/postcss-splitinator/index.js +++ b/plugins/postcss-splitinator/index.js @@ -10,72 +10,78 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -const postcss = require("postcss"); - -function getName(selector, prop) { - selector = selector.replace(/^:where\((.*?)\)$/, "$1"); - - // This regex is designed to pull spectrum-ActionButton out of a selector - let baseSelectorMatch = selector.match(/^\.([a-z]+-[\A-Z][^-. ]+)/); - if (baseSelectorMatch) { - const [, baseSelector] = baseSelectorMatch; - const baseSelectorRegExp = new RegExp(baseSelector, "gi"); - prop = prop.replace(baseSelectorRegExp, ""); - selector = baseSelector + selector.replace(baseSelectorRegExp, ""); - } - - selector = selector.replace(/is-/g, ""); - - let selectorParts = selector.replace(/\s+/g, "").replace(/,/g, "").split("."); - - return ( - "--" + - (`system-` + `${selectorParts.join("-")}-${prop.substr(2)}`) - .replace(/-+/g, "-") - .toLowerCase() - ); -} - -function process(root, options = {}) { - options.noFlatVariables = options.noFlatVariables ?? false; - options.noSelectors = options.noSelectors ?? false; - const selectorMap = {}; - - root.walkAtRules((container) => { - if (container.name === "container") { - const [, identifierName, identifierValue] = container.params.match( - /\(\s*--(.*?)\s*[:=]\s*(.*?)\s*\)/ - ); - - const rule = postcss.rule({ - selector: `.${ - options && typeof options.processIdentifier === "function" - ? options.processIdentifier(identifierValue, identifierName) - : identifierValue - }`, - source: container.source, - }); +/** + * @typedef Options + * @property {boolean} [noFlatVariables=false] + * @property {boolean} [noSelectors=false] + * @property {(identifierValue: string, identifierName: string) => string} [processIdentifier] + * @property {(selector: string, prop: string) => string} [getName] +*/ - if (!options.noFlatVariables) { - container.parent.insertAfter(container, rule); - } +/** @type import('postcss').PluginCreator */ +module.exports = ({ + noFlatVariables = false, + noSelectors = false, + processIdentifier, + getName = (selector, prop) => { + selector = selector.replace(/^:where\((.*?)\)$/, "$1"); + + // This regex is designed to pull spectrum-ActionButton out of a selector + let baseSelectorMatch = selector.match(/^\.([a-z]+-[\A-Z][^-. ]+)/); + if (baseSelectorMatch) { + const [, baseSelector] = baseSelectorMatch; + const baseSelectorRegExp = new RegExp(baseSelector, "gi"); + prop = prop.replace(baseSelectorRegExp, ""); + selector = baseSelector + selector.replace(baseSelectorRegExp, ""); + } - container.walkDecls((decl) => { - if (decl.prop.startsWith("--")) { + selector = selector.replace(/is-/g, ""); + + let selectorParts = selector.replace(/\s+/g, "").replace(/,/g, "").split("."); + + return ( + "--" + + (`system-` + `${selectorParts.join("-")}-${prop.substr(2)}`) + .replace(/-+/g, "-") + .toLowerCase() + ); + }, +}) => { + return { + postcssPlugin: "postcss-splitinator", + OnceExit(root, { Rule, Declaration }) { + const selectorMap = {}; + + root.walkAtRules(/container/, (container) => { + const [, identifierName, identifierValue] = container.params.match( + /\(\s*--(.*?)\s*[:=]\s*(.*?)\s*\)/ + ); + + const rule = new Rule({ + selector: `.${ + typeof processIdentifier === "function" + ? processIdentifier(identifierValue, identifierName) + : identifierValue + }`, + source: container.source, + }); + + if (!noFlatVariables) { + container.parent.insertAfter(container, rule); + } + + container.walkDecls(/^--/, (decl) => { // Process rules that match multiple selectors separately to avoid weird var names and edge cases // note: this doesn't support :where() and is likely brittle! const selectors = decl.parent.selector.split(/\s*,\s*/); selectors.forEach((selector) => { - const variableName = - typeof options.getName === "function" - ? options.getName(selector, decl.prop) - : getName(selector, decl.prop); + const variableName = getName(selector, decl.prop); const newDecl = decl.clone({ prop: variableName, }); newDecl.raws.before = "\n "; - if (!options.noFlatVariables) { + if (!noFlatVariables) { rule.append(newDecl); } @@ -101,34 +107,27 @@ function process(root, options = {}) { selectorNode[decl.prop] = `var(${variableName})`; } }); - } + }); + + container.remove(); }); - container.remove(); - } - }); + if (noSelectors) return; - if (!options.noSelectors) { - for (let [selector, props] of Object.entries(selectorMap)) { - const rule = postcss.rule({ - selector, - }); + for (let [selector, props] of Object.entries(selectorMap)) { + const rule = new Rule({ selector }); - for (let [prop, value] of Object.entries(props)) { - const decl = postcss.decl({ - prop, - value, - }); - decl.raws.before = "\n "; + for (let [prop, value] of Object.entries(props)) { + const decl = new Declaration({ prop, value }); + decl.raws.before = "\n "; - rule.append(decl); - } + rule.append(decl); + } - root.append(rule); - } - } -} + root.append(rule); + } + }, + }; +}; -module.exports = postcss.plugin("postcss-splitinator", function (options) { - return (root, result) => process(root, options); -}); +module.exports.postcss = true; diff --git a/plugins/postcss-splitinator/package.json b/plugins/postcss-splitinator/package.json index 04a82d9de8..bada56d074 100644 --- a/plugins/postcss-splitinator/package.json +++ b/plugins/postcss-splitinator/package.json @@ -10,7 +10,7 @@ "test": "ava" }, "dependencies": { - "postcss": "^7.0.32" + "postcss": "^8.4.33" }, "publishConfig": { "access": "public" diff --git a/plugins/postcss-transformselectors/index.js b/plugins/postcss-transformselectors/index.js index 5483b1fc08..5e7053d8a0 100644 --- a/plugins/postcss-transformselectors/index.js +++ b/plugins/postcss-transformselectors/index.js @@ -1,22 +1,33 @@ -const postcss = require("postcss"); +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 -const defaultOptions = { - map: {}, -}; +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ -module.exports = function (options) { - options = { - ...defaultOptions, - ...options, - }; +/** + * @typedef {object} Options + * @property {{ search: string | RegExp, replace: string }[]} replace + * @property {(selector: string, rule: import('postcss').Rule) => string} transform + */ +/** @type import('postcss').PluginCreator */ +module.exports = ({ + replace, + transform, +}) => { return { postcssPlugin: "postcss-transformselectors", Rule(rule) { - if (options.replace) { - for (let { search, replace } of options.replace) { + if (replace && Array.isArray(replace)) { + for (let { search, replace } of replace) { + // always replace globally for strings if (typeof search === "string") { - // always replace globally for strings search = new RegExp(search, "g"); } @@ -24,8 +35,8 @@ module.exports = function (options) { } } - if (options.transform) { - rule.selector = options.transform(rule.selector, rule); + if (typeof transform === "function") { + rule.selector = transform(rule.selector, rule); } }, }; diff --git a/plugins/postcss-transformselectors/package.json b/plugins/postcss-transformselectors/package.json index 4e3ea86f20..539d520b65 100644 --- a/plugins/postcss-transformselectors/package.json +++ b/plugins/postcss-transformselectors/package.json @@ -9,10 +9,11 @@ "scripts": { "test": "ava" }, - "dependencies": { - "postcss": "^7.0.36" + "peerDependencies": { + "postcss": ">=8" }, "devDependencies": { - "ava": "^5.3.1" + "ava": "^6.1.0", + "postcss": "^8.4.33" } } diff --git a/plugins/postcss-varfallback/index.js b/plugins/postcss-varfallback/index.js index a7ddc83f7f..5f7da7c303 100644 --- a/plugins/postcss-varfallback/index.js +++ b/plugins/postcss-varfallback/index.js @@ -1,45 +1,57 @@ -const postcss = require("postcss"); +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +/** + * @typedef Options +*/ + const valueParser = require("postcss-value-parser"); -function getFallbackValue(decl) { - const parsed = valueParser(decl.value); - if (!parsed.nodes || !parsed.nodes.length) { - return node.value; - } - - parsed.walk((node) => { - if (node.type === "function" && node.value === "var") { - // If it's a var, recursively find the fallback - const fallbackNode = getFallbackNode(node); - - // Replace node properties with the fallback - node.type = fallbackNode.type; - node.value = fallbackNode.value; - node.nodes = fallbackNode.nodes; - - // Do not investigate children - return false; - } - }); - - return valueParser.stringify(parsed); -} - -function getFallbackNode(node) { - const nodes = node.nodes; - if (nodes && nodes.length === 3) { - // It's got a fallback, go deeper - return getFallbackNode(nodes[2]); - } - - return node; -} - -module.exports = function () { +/** @type import('postcss').PluginCreator */ +module.exports = () => { return { postcssPlugin: "postcss-varfallback", Declaration(decl) { - decl.value = getFallbackValue(decl); + function getFallbackNode(node) { + const nodes = node.nodes; + if (nodes && nodes.length === 3) { + // It's got a fallback, go deeper + return getFallbackNode(nodes[2]); + } + + return node; + } + + const parsed = valueParser(decl.value); + if (!parsed.nodes || !parsed.nodes.length) { + return node.value; + } + + parsed.walk((node) => { + if (node.type === "function" && node.value === "var") { + // If it's a var, recursively find the fallback + const fallbackNode = getFallbackNode(node); + + // Replace node properties with the fallback + node.type = fallbackNode.type; + node.value = fallbackNode.value; + node.nodes = fallbackNode.nodes; + + // Do not investigate children + return false; + } + }); + + decl.value = valueParser.stringify(parsed); }, }; }; diff --git a/plugins/postcss-varfallback/package.json b/plugins/postcss-varfallback/package.json index 77ff552969..4f676742b8 100644 --- a/plugins/postcss-varfallback/package.json +++ b/plugins/postcss-varfallback/package.json @@ -10,10 +10,13 @@ "test": "ava" }, "dependencies": { - "postcss": "^7.0.36", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" + }, + "peerDependencies": { + "postcss": ">=8" }, "devDependencies": { - "ava": "^5.3.1" + "ava": "^6.1.0", + "postcss": "^8.4.33" } } diff --git a/plugins/postcss-varsonly/CHANGELOG.md b/plugins/postcss-varsonly/CHANGELOG.md new file mode 100644 index 0000000000..e4d87c4d45 --- /dev/null +++ b/plugins/postcss-varsonly/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/plugins/postcss-varsonly/README.md b/plugins/postcss-varsonly/README.md new file mode 100644 index 0000000000..2255d73395 --- /dev/null +++ b/plugins/postcss-varsonly/README.md @@ -0,0 +1,8 @@ +# postcss-varsonly + +## Installation + +```sh +npm install postcss-varsonly +postcss -u postcss-varsonly -o dist/index.css src/index.css +``` diff --git a/plugins/postcss-varsonly/index.js b/plugins/postcss-varsonly/index.js new file mode 100644 index 0000000000..1f14543cd3 --- /dev/null +++ b/plugins/postcss-varsonly/index.js @@ -0,0 +1,51 @@ +/*! +Copyright 2023 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +/** + * @typedef {Object} Options + */ + +/** @type import('postcss').PluginCreator */ +module.exports = () => { + return { + postcssPlugin: "postcss-varsonly", + OnceExit(root) { + // Delete all comments + root.walkComments((comment) => { + comment.remove(); + }); + + // Process each rule + root.walkRules((rule) => { + // Don't break variable declarations + if (rule.selector === ":root") { + return; + } + + // Check every declaration + rule.walkDecls((decl) => { + // Remove if not variable + if (!decl.value.match("var(.*?)")) { + decl.remove(); + } + }); + + // Delete the rule if it's empty + if (rule.nodes.length === 0) { + rule.remove(); + } + }); + }, + }; +}; + +module.exports.postcss = true; diff --git a/plugins/postcss-varsonly/package.json b/plugins/postcss-varsonly/package.json new file mode 100644 index 0000000000..dafa6b55a6 --- /dev/null +++ b/plugins/postcss-varsonly/package.json @@ -0,0 +1,15 @@ +{ + "private": true, + "name": "postcss-varsonly", + "version": "1.0.0", + "description": "", + "license": "Apache-2.0", + "author": "Adobe", + "main": "index.js", + "peerDependencies": { + "postcss": ">=8" + }, + "devDependencies": { + "postcss": "^8.4.33" + } +} diff --git a/plugins/stylelint-no-missing-var/package.json b/plugins/stylelint-no-missing-var/package.json index a4c3c79d33..4b9ddf4981 100644 --- a/plugins/stylelint-no-missing-var/package.json +++ b/plugins/stylelint-no-missing-var/package.json @@ -12,9 +12,8 @@ "stylelint": "^14.0.0 || ^15.0.0" }, "devDependencies": { - "ava": "^5.3.1", + "ava": "^6.1.0", "c8": "^9.1.0", - "colors": "^1.4.0", "stylelint": "^15.11.0" }, "keywords": [ diff --git a/plugins/stylelint-no-unknown-custom-properties/package.json b/plugins/stylelint-no-unknown-custom-properties/package.json index 09c3b17ea9..bd4ae0866e 100644 --- a/plugins/stylelint-no-unknown-custom-properties/package.json +++ b/plugins/stylelint-no-unknown-custom-properties/package.json @@ -15,7 +15,7 @@ "stylelint": "^14.0.0 || ^15.0.0" }, "devDependencies": { - "ava": "^5.3.1", + "ava": "^6.1.0", "c8": "^9.1.0", "stylelint": "^15.11.0" }, diff --git a/plugins/stylelint-no-unused-custom-properties/package.json b/plugins/stylelint-no-unused-custom-properties/package.json index 9c12fb5146..819750ceb4 100644 --- a/plugins/stylelint-no-unused-custom-properties/package.json +++ b/plugins/stylelint-no-unused-custom-properties/package.json @@ -13,7 +13,7 @@ "stylelint": "^14.0.0 || ^15.0.0" }, "devDependencies": { - "ava": "^5.3.1", + "ava": "^6.1.0", "c8": "^9.1.0", "stylelint": "^15.11.0" }, diff --git a/tasks/clean-up-after-migration.sh b/tasks/clean-up-after-migration.sh index 28af806773..446387e8cc 100644 --- a/tasks/clean-up-after-migration.sh +++ b/tasks/clean-up-after-migration.sh @@ -40,6 +40,6 @@ test -d "components/icon/medium" && rm -rf components/icon/medium # test -d "plugins/postcss-dropdupedvars" && rm -rf plugins/postcss-dropdupedvars # test -d "plugins/postcss-droproot" && rm -rf plugins/postcss-droproot # test -d "plugins/postcss-dropunusedvars" && rm -rf plugins/postcss-dropunusedvars -# test -d "plugins/postcss-remapvars" && rm -rf plugins/postcss-remapvars +test -d "plugins/postcss-remapvars" && rm -rf plugins/postcss-remapvars # test -d "plugins/postcss-transformselectors" && rm -rf plugins/postcss-transformselectors # test -d "plugins/postcss-varfallback" && rm -rf plugins/postcss-varfallback diff --git a/tools/bundle-builder/docs/index.js b/tools/bundle-builder/docs/index.js index f65a82bd5e..3573246243 100644 --- a/tools/bundle-builder/docs/index.js +++ b/tools/bundle-builder/docs/index.js @@ -21,7 +21,6 @@ const yaml = require("js-yaml"); const through = require("through2"); const ext = require("replace-ext"); const logger = require("gulplog"); -const colors = require("colors"); const lunr = require("lunr"); const dirs = require("../lib/dirs"); @@ -29,6 +28,8 @@ const depUtils = require("../lib/depUtils"); const npmFetch = require("npm-registry-fetch"); +require("colors"); + let minimumDeps = [ "icon", "statuslight", diff --git a/tools/bundle-builder/package.json b/tools/bundle-builder/package.json index f6e74594dc..2647134783 100644 --- a/tools/bundle-builder/package.json +++ b/tools/bundle-builder/package.json @@ -33,7 +33,6 @@ "devDependencies": { "browser-sync": "^2.26.14", "colors": "^1.4.0", - "del": "^5.0.0", "dependency-solver": "^1.0.6", "gulp": "^4.0.0", "gulp-concat": "^2.6.1", diff --git a/tools/component-builder-simple/css/processors.js b/tools/component-builder-simple/css/processors.js index 18121e247d..59dbbc4441 100644 --- a/tools/component-builder-simple/css/processors.js +++ b/tools/component-builder-simple/css/processors.js @@ -13,8 +13,8 @@ governing permissions and limitations under the License. function getProcessors({ noFlatVariables = false, noSelectors = false, keepComments = false } = {}) { return [ require("postcss-import"), - require("postcss-nested"), require("postcss-extend"), + require("postcss-nested"), require("postcss-splitinator")({ processIdentifier: (identifier) => { if (identifier === "express") { @@ -25,7 +25,7 @@ function getProcessors({ noFlatVariables = false, noSelectors = false, keepComme noFlatVariables, noSelectors, }), - require("./plugins/postcss-custom-properties-passthrough")(), + require("postcss-custom-properties-passthrough")(), require("postcss-calc"), require("postcss-dropunusedvars")({ fix: false }), require("postcss-dropdupedvars"), diff --git a/tools/component-builder-simple/index.js b/tools/component-builder-simple/index.js index 25497cf8f7..1339c31d92 100644 --- a/tools/component-builder-simple/index.js +++ b/tools/component-builder-simple/index.js @@ -12,14 +12,9 @@ governing permissions and limitations under the License. const gulp = require("gulp"); const rename = require("gulp-rename"); -const del = require("del"); const css = require("./css"); -function clean() { - return del("dist/*"); -} - -const build = gulp.series(clean, css.buildCSS, function copyIndex() { +const build = gulp.series(css.buildCSS, function copyIndex() { // Just copy index.vars as index.css to maintain backwards compat return gulp .src("dist/index.css") @@ -36,5 +31,4 @@ exports.build = build; exports.buildLite = build; exports.buildMedium = build; exports.buildHeavy = build; -exports.clean = clean; exports.buildCSS = build; diff --git a/tools/component-builder-simple/package.json b/tools/component-builder-simple/package.json index 5af573a473..23a27ca202 100644 --- a/tools/component-builder-simple/package.json +++ b/tools/component-builder-simple/package.json @@ -13,27 +13,26 @@ }, "dependencies": { "@spectrum-css/tokens": "^13.0.8", - "autoprefixer": "^6.5.3", + "autoprefixer": "^10.4.17", "colors": "^1.4.0", - "del": "^5.0.0", "gulp": "^4.0.0", "gulp-concat": "^2.6.1", - "gulp-postcss": "^7.0.0", + "gulp-postcss": "^9.1.0", "gulp-rename": "^1.4.0", "gulplog": "^2.0.1", - "postcss": "^7.0.36", - "postcss-calc": "^6.0.0", - "postcss-combininator": "^1.0.2", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-empty": "^4.0.1", + "postcss": "^8.4.33", + "postcss-calc": "^9.0.1", + "postcss-combininator": "file:../../plugins/postcss-combininator", + "postcss-discard-comments": "^6.0.1", + "postcss-discard-empty": "^6.0.1", "postcss-dropdupedvars": "file:../../plugins/postcss-dropdupedvars", "postcss-dropunusedvars": "file:../../plugins/postcss-dropunusedvars", "postcss-extend": "^1.0.5", - "postcss-import": "^10.0.0", - "postcss-nested": "^3.0.0", - "postcss-selector-parser": "^6.0.2", + "postcss-import": "^16.0.0", + "postcss-nested": "^6.0.1", + "postcss-selector-parser": "^6.0.15", "postcss-splitinator": "^1.0.2", - "postcss-values-parser": "^3.1.1", + "postcss-values-parser": "^6.0.2", "through2": "^3.0.1" }, "peerDependencies": { diff --git a/tools/component-builder/css/plugins/postcss-custom-properties-mapping.js b/tools/component-builder/css/plugins/postcss-custom-properties-mapping.js deleted file mode 100644 index 01d236b359..0000000000 --- a/tools/component-builder/css/plugins/postcss-custom-properties-mapping.js +++ /dev/null @@ -1,92 +0,0 @@ -/*! -Copyright 2023 Adobe. All rights reserved. -This file is licensed to you under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. You may obtain a copy -of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under -the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ -var postcss = require("postcss"); -var valueParser = require("postcss-value-parser"); -let varUtils = require("../lib/varUtils.js"); - -// match custom property inclusions -const customPropertiesRegExp = /(^|[^\w-])var\([\W\w]+\)/; - -let staticVars; -let allVars; -async function fetchVars() { - if (staticVars && allVars) { - return true; - } - - // Read in all static vars - staticVars = Object.assign( - {}, - await varUtils.readDNAVariables("globals/spectrum-staticAliases.css"), - await varUtils.readDNAVariables("globals/spectrum-fontGlobals.css"), - await varUtils.readDNAVariables("globals/spectrum-fontGlobals.css"), - await varUtils.readDNAVariables("globals/spectrum-dimensionGlobals.css"), - await varUtils.readDNAVariables("globals/spectrum-colorGlobals.css"), - await varUtils.readDNAVariables("globals/spectrum-animationGlobals.css") - ); - - // Read in all variables so we have the value they resolve to - allVars = await varUtils.getAllComponentVars(); - - return true; -} - -module.exports = postcss.plugin( - "postcss-custom-properties-mapping", - function () { - return async function (root, result) { - await fetchVars(); - - root.walkRules((rule, ruleIndex) => { - rule.walkDecls((decl) => { - if (customPropertiesRegExp.test(decl.value)) { - let value = valueParser(decl.value); - - if ( - value.nodes && - value.nodes[0] && - value.nodes[0].value === "url" - ) { - // Don't process custom properties within URLs, it does nothing and breaks parcel - // see https://github.com/parcel-bundler/parcel/issues/3881 - return; - } - - value.walk((node, index, nodes) => { - if (node.type === "function" && node.value === "var") { - let v = node.nodes[0].value; - - // If the value is static, replace the variable with the value. - // Otherwise, change the variable name to the mapped name. - if (staticVars[v]) { - nodes.splice( - index, - 1, - ...valueParser(`var(${v}, ${staticVars[v]})`).nodes - ); - } else if (allVars[v]) { - nodes.splice( - index, - 1, - ...valueParser(`var(${v}, ${allVars[v]})`).nodes - ); - } - } - }); - - decl.value = value.toString(); - } - }); - }); - }; - } -); diff --git a/tools/component-builder/css/plugins/postcss-custom-properties-passthrough.js b/tools/component-builder/css/plugins/postcss-custom-properties-passthrough.js deleted file mode 100644 index 0e96c5f84e..0000000000 --- a/tools/component-builder/css/plugins/postcss-custom-properties-passthrough.js +++ /dev/null @@ -1,32 +0,0 @@ -/*! -Copyright 2023 Adobe. All rights reserved. -This file is licensed to you under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. You may obtain a copy -of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under -the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ -var postcss = require("postcss"); - -module.exports = postcss.plugin( - "postcss-custom-properties-passthrough", - function (opts) { - opts = opts || {}; - - return function (root, result) { - root.walkRules((rule, ruleIndex) => { - rule.walkDecls((decl) => { - if (decl.value.match("xvar(.*?)")) { - decl.value = decl.value.substr(1); - } - if (decl.prop.substr(0, 3) === "x--") { - decl.prop = decl.prop.substr(1); - } - }); - }); - }; - } -); diff --git a/tools/component-builder/css/plugins/postcss-notnested.js b/tools/component-builder/css/plugins/postcss-notnested.js deleted file mode 100644 index 12891d0be2..0000000000 --- a/tools/component-builder/css/plugins/postcss-notnested.js +++ /dev/null @@ -1,64 +0,0 @@ -/*! -Copyright 2023 Adobe. All rights reserved. -This file is licensed to you under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. You may obtain a copy -of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under -the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ -var postcss = require("postcss"); - -module.exports = postcss.plugin("postcss-notnested", function (opts) { - opts = opts || {}; - - // Match ampersands at the start of a given selector - var re = /^&/; - - return function (root, result) { - root.walkRules((rule, ruleIndex) => { - if (rule.selectors) { - if (opts.replace) { - var replaced = false; - var selectors = rule.selectors.map((selector) => { - if (re.test(selector)) { - replaced = true; - // Handle special case where the replacement selector === the existing selector - if (selector.replace(re, "") === opts.replace) { - return opts.replace; - } - - return selector.replace(re, opts.replace); - } else { - return selector; - } - }); - - if (replaced) { - // De-dupe selectors - selectors = selectors.filter((selector, index) => { - return selectors.indexOf(selector) === index; - }); - - rule.selectors = selectors; - } - } else { - var selectors = rule.selectors.filter((selector) => { - // Kill the selector with the stray ampersand -- it's not nested! - return !re.test(selector); - }); - - if (selectors.length == 0) { - // If no selectors remain, remove the rule completely - rule.remove(); - } else if (selectors.length != rule.selectors.length) { - // Only replace the selectors if we changed something (avoids extra work for every selector) - rule.selectors = selectors; - } - } - } - }); - }; -}); diff --git a/tools/component-builder/css/plugins/postcss-varsonly.js b/tools/component-builder/css/plugins/postcss-varsonly.js deleted file mode 100644 index 6b598665f3..0000000000 --- a/tools/component-builder/css/plugins/postcss-varsonly.js +++ /dev/null @@ -1,44 +0,0 @@ -/*! -Copyright 2023 Adobe. All rights reserved. -This file is licensed to you under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. You may obtain a copy -of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under -the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ -var postcss = require("postcss"); - -module.exports = postcss.plugin("postcss-varsonly", function (opts) { - opts = opts || {}; - - return function (root, result) { - // Delete all comments - root.walkComments((comment) => { - comment.remove(); - }); - - // Process each rule - root.walkRules((rule, ruleIndex) => { - // Don't break variable declarations - if (rule.selector === ":root") { - return; - } - - // Check every declaration - rule.walkDecls((decl) => { - // Remove if not variable - if (!decl.value.match("var(.*?)")) { - decl.remove(); - } - }); - - // Delete the rule if it's empty - if (rule.nodes.length === 0) { - rule.remove(); - } - }); - }; -}); diff --git a/tools/component-builder/css/processors.js b/tools/component-builder/css/processors.js index df053288e3..82c74ea896 100644 --- a/tools/component-builder/css/processors.js +++ b/tools/component-builder/css/processors.js @@ -10,6 +10,20 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +const path = require("path"); + +const varDir = path.join( + path.dirname( + require.resolve("@spectrum-css/vars", { + paths: [ + process.cwd(), + path.join(process.cwd(), "../../") + ], + }) + ), + ".." +); + /** * Spectrum CSS PostCSS Processor * @@ -41,23 +55,35 @@ function getProcessors( ) { return [ require("postcss-import"), - require("postcss-remapvars"), - require("postcss-nested"), require("postcss-extend"), - diff ? require("./plugins/postcss-varsonly")() : null, + require("postcss-nested"), + diff ? require("postcss-varsonly")() : null, require("postcss-logical")(), require("postcss-dir-pseudo-class")(), - require("./plugins/postcss-custom-properties-passthrough")(), + require("postcss-custom-properties-passthrough")(), require("postcss-calc"), - keepVars ? require("./plugins/postcss-custom-properties-mapping") : null, + keepVars ? require("postcss-custom-properties-mapping")({ + tokenDir: varDir, + staticFiles: [ + "css/globals/spectrum-staticAliases.css", + "css/globals/spectrum-fontGlobals.css", + "css/globals/spectrum-dimensionGlobals.css", + "css/globals/spectrum-colorGlobals.css", + "css/globals/spectrum-animationGlobals.css", + ], + extendedFiles: [ + `css/components/*.css`, + `custom.css`, + ], + }) : null, notNested - ? require("./plugins/postcss-notnested")({ replace: ".spectrum" }) + ? require("postcss-notnested")({ replace: ".spectrum" }) : null, require("postcss-svg"), require("legacy-postcss-dropunusedvars"), require("legacy-postcss-dropdupedvars"), require("postcss-droproot"), - secondNotNested ? require("./plugins/postcss-notnested")() : null, // Second one to catch all stray & + secondNotNested ? require("postcss-notnested")() : null, // Second one to catch all stray & require("postcss-discard-empty"), require("postcss-discard-comments")({ removeAllButFirst: true }), require("autoprefixer")({}), diff --git a/tools/component-builder/index.js b/tools/component-builder/index.js index fa5e3158e8..86c5ccd1a3 100644 --- a/tools/component-builder/index.js +++ b/tools/component-builder/index.js @@ -11,29 +11,23 @@ governing permissions and limitations under the License. */ const gulp = require("gulp"); -const del = require("del"); const css = require("./css"); const docs = require("./docs"); -function clean() { - return del("dist/*"); -} +const build = gulp.parallel(css.buildVars, docs.buildDocs); -const build = gulp.series(clean, gulp.parallel(css.buildVars, docs.buildDocs)); +const buildLite = css.buildIndexVars; -const buildLite = gulp.series(clean, css.buildIndexVars); +const buildMedium = css.buildVars; -const buildMedium = gulp.series(clean, css.buildVars); - -const buildHeavy = gulp.series(clean, css.buildCSS); +const buildHeavy = css.buildCSS; exports.default = build; exports.build = build; exports.buildLite = buildLite; exports.buildMedium = buildMedium; exports.buildHeavy = buildHeavy; -exports.clean = clean; exports.buildCSS = css.buildCSS; exports.buildVars = css.buildVars; diff --git a/tools/component-builder/package.json b/tools/component-builder/package.json index 11162ccbb4..d605d4c50f 100644 --- a/tools/component-builder/package.json +++ b/tools/component-builder/package.json @@ -14,16 +14,15 @@ "dependencies": { "@spectrum-css/tokens": "^13.0.8", "@spectrum-css/vars": "^9.0.8", - "autoprefixer": "^6.5.3", + "autoprefixer": "^10.4.17", "browser-sync": "^2.26.14", "colors": "^1.4.0", - "del": "^5.0.0", "gulp": "^4.0.0", "gulp-concat": "^2.6.1", "gulp-data": "^1.3.1", "gulp-exec": "^3.0.2", "gulp-insert": "^0.5.0", - "gulp-postcss": "^7.0.0", + "gulp-postcss": "^9.1.0", "gulp-rename": "^1.4.0", "gulp-replace": "^1.0.0", "gulplog": "^1.0.0", @@ -31,20 +30,23 @@ "legacy-postcss-dropdupedvars": "file:../../plugins/legacy-postcss-dropdupedvars", "legacy-postcss-dropunusedvars": "file:../../plugins/legacy-postcss-dropunusedvars", "merge-stream": "^2.0.0", - "postcss": "^7.0.36", - "postcss-calc": "^6.0.0", - "postcss-dir-pseudo-class": "^5.0.0", - "postcss-discard-comments": "^4.0.0", - "postcss-discard-empty": "^4.0.1", + "postcss": "^8.4.33", + "postcss-calc": "^9.0.1", + "postcss-custom-properties-mapping": "^1.0.0", + "postcss-custom-properties-passthrough": "^1.0.0", + "postcss-dir-pseudo-class": "^8.0.1", + "postcss-discard-comments": "^6.0.1", + "postcss-discard-empty": "^6.0.1", "postcss-droproot": "^1.0.3", "postcss-extend": "^1.0.5", - "postcss-import": "^10.0.0", - "postcss-logical": "^4.0.2", - "postcss-nested": "^3.0.0", - "postcss-remapvars": "^1.1.0", - "postcss-selector-parser": "^6.0.2", + "postcss-import": "^16.0.0", + "postcss-logical": "^7.0.1", + "postcss-nested": "^6.0.1", + "postcss-notnested": "^1.0.0", + "postcss-selector-parser": "^6.0.15", "postcss-svg": "^3.0.0", - "postcss-values-parser": "^3.1.1", + "postcss-values-parser": "^6.0.2", + "postcss-varsonly": "^1.0.0", "pug": "^3.0.1", "replace-ext": "^1.0.0", "through2": "^3.0.1" diff --git a/yarn.lock b/yarn.lock index e9c7c4d69e..e1841cc632 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2000,6 +2000,21 @@ dependencies: call-bind "^1.0.2" +"@mapbox/node-pre-gyp@^1.0.5": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa" + integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ== + dependencies: + detect-libc "^2.0.0" + https-proxy-agent "^5.0.0" + make-dir "^3.1.0" + node-fetch "^2.6.7" + nopt "^5.0.0" + npmlog "^5.0.1" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.11" + "@mdx-js/react@^2.1.5": version "2.3.0" resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-2.3.0.tgz#4208bd6d70f0d0831def28ef28c26149b03180b3" @@ -3023,6 +3038,14 @@ dependencies: "@babel/runtime" "^7.13.10" +"@rollup/pluginutils@^4.0.0": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" + integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ== + dependencies: + estree-walker "^2.0.1" + picomatch "^2.2.2" + "@sigstore/bundle@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-1.1.0.tgz#17f8d813b09348b16eeed66a8cf1c3d6bd3d04f1" @@ -4486,14 +4509,6 @@ resolved "https://registry.yarnpkg.com/@types/fined/-/fined-1.1.5.tgz#504b87a0de8813e06e7d226f34c1cefb70d9afb0" integrity sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ== -"@types/glob@^7.1.1": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - "@types/graceful-fs@^4.1.3": version "4.1.9" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" @@ -4591,11 +4606,6 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== -"@types/minimatch@*": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - "@types/minimatch@^3.0.3": version "3.0.5" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" @@ -4873,6 +4883,23 @@ "@urql/core" ">=4.1.0" wonka "^6.3.2" +"@vercel/nft@^0.24.4": + version "0.24.4" + resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.24.4.tgz#b8942340c7821e6ff7bdf943b559642dbc9cae78" + integrity sha512-KjYAZty7boH5fi5udp6p+lNu6nawgs++pHW+3koErMgbRkkHuToGX/FwjN5clV1FcaM3udfd4zW/sUapkMgpZw== + dependencies: + "@mapbox/node-pre-gyp" "^1.0.5" + "@rollup/pluginutils" "^4.0.0" + acorn "^8.6.0" + async-sema "^3.1.1" + bindings "^1.4.0" + estree-walker "2.0.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + micromatch "^4.0.2" + node-gyp-build "^4.2.2" + resolve-from "^5.0.0" + "@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": version "1.11.6" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" @@ -5112,10 +5139,10 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.0.tgz#2097665af50fd0cf7a2dfccd2b9368964e66540f" integrity sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA== -acorn-walk@^8.2.0: - version "8.3.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.1.tgz#2f10f5b69329d90ae18c58bf1fa8fccd8b959a43" - integrity sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw== +acorn-walk@^8.3.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== acorn@^3.1.0: version "3.3.0" @@ -5137,6 +5164,11 @@ acorn@^8.10.0, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== +acorn@^8.11.2, acorn@^8.6.0: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -5181,14 +5213,6 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -aggregate-error@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-4.0.1.tgz#25091fe1573b9e0be892aeda15c7c66a545f758e" - integrity sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w== - dependencies: - clean-stack "^4.0.0" - indent-string "^5.0.0" - ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -5428,6 +5452,14 @@ archy@^1.0.0: resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + are-we-there-yet@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" @@ -5725,6 +5757,11 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== +async-sema@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/async-sema/-/async-sema-3.1.1.tgz#e527c08758a0f8f6f9f15f799a173ff3c40ea808" + integrity sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg== + async-settle@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b" @@ -5764,62 +5801,59 @@ author-regex@^1.0.0: resolved "https://registry.yarnpkg.com/author-regex/-/author-regex-1.0.0.tgz#d08885be6b9bbf9439fe087c76287245f0a81450" integrity sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g== -autoprefixer@^6.5.3: - version "6.7.7" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" - integrity sha512-WKExI/eSGgGAkWAO+wMVdFObZV7hQen54UpD1kCCTN3tvlL3W1jL4+lPP/M7MwoP7Q4RHzKtO3JQ4HxYEcd+xQ== +autoprefixer@^10.4.17: + version "10.4.17" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.17.tgz#35cd5695cbbe82f536a50fa025d561b01fdec8be" + integrity sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg== dependencies: - browserslist "^1.7.6" - caniuse-db "^1.0.30000634" + browserslist "^4.22.2" + caniuse-lite "^1.0.30001578" + fraction.js "^4.3.7" normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^5.2.16" - postcss-value-parser "^3.2.3" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" -ava@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ava/-/ava-5.3.1.tgz#335737dd963b7941b90214836cea2e8de1f4d5f4" - integrity sha512-Scv9a4gMOXB6+ni4toLuhAm9KYWEjsgBglJl+kMGI5+IVDt120CCDZyB5HNU9DjmLI2t4I0GbnxGLmmRfGTJGg== +ava@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/ava/-/ava-6.1.0.tgz#13d2eeffed03525caa15557375377a993752676a" + integrity sha512-0fOQIWMHT9DYelzTYc3TI/4fmmmJ5LdvRWd6F43CppYfg84VrM5EO+hmlv2cPujMJAWuVesUWVloUu9PIwrgTA== dependencies: - acorn "^8.8.2" - acorn-walk "^8.2.0" + "@vercel/nft" "^0.24.4" + acorn "^8.11.2" + acorn-walk "^8.3.0" ansi-styles "^6.2.1" arrgv "^1.0.2" arrify "^3.0.0" - callsites "^4.0.0" - cbor "^8.1.0" - chalk "^5.2.0" - chokidar "^3.5.3" + callsites "^4.1.0" + cbor "^9.0.1" + chalk "^5.3.0" chunkd "^2.0.1" - ci-info "^3.8.0" + ci-info "^4.0.0" ci-parallel-vars "^1.0.1" - clean-yaml-object "^0.1.0" - cli-truncate "^3.1.0" + cli-truncate "^4.0.0" code-excerpt "^4.0.0" common-path-prefix "^3.0.0" concordance "^5.0.4" currently-unhandled "^0.4.1" debug "^4.3.4" emittery "^1.0.1" - figures "^5.0.0" - globby "^13.1.4" + figures "^6.0.1" + globby "^14.0.0" ignore-by-default "^2.1.0" indent-string "^5.0.0" - is-error "^2.2.2" is-plain-object "^5.0.0" is-promise "^4.0.0" matcher "^5.0.0" - mem "^9.0.2" + memoize "^10.0.0" ms "^2.1.3" - p-event "^5.0.1" - p-map "^5.5.0" - picomatch "^2.3.1" - pkg-conf "^4.0.0" + p-map "^6.0.0" + package-config "^5.0.0" + picomatch "^3.0.1" plur "^5.1.0" pretty-ms "^8.0.0" resolve-cwd "^3.0.0" stack-utils "^2.0.6" - strip-ansi "^7.0.1" + strip-ansi "^7.1.0" supertap "^3.0.1" temp-dir "^3.0.0" write-file-atomic "^5.0.1" @@ -6045,7 +6079,7 @@ binaryextensions@^2.2.0: resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.3.0.tgz#1d269cbf7e6243ea886aa41453c3651ccbe13c22" integrity sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg== -bindings@^1.5.0: +bindings@^1.4.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -6217,14 +6251,6 @@ browserify-zlib@^0.1.4: dependencies: pako "~0.2.0" -browserslist@^1.7.6: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" - integrity sha512-qHJblDE2bXVRYzuDetv/wAeHOJyO97+9wxC1cdCtyzgNuSozOyRCiiLaCR1f71AN66lQdVVBipWm63V+a7bPOw== - dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" - browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.21.9, browserslist@^4.22.1: version "4.22.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" @@ -6426,7 +6452,7 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -callsites@^4.0.0: +callsites@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-4.1.0.tgz#de72b98612eed4e1e2564c952498677faa9d86c2" integrity sha512-aBMbD1Xxay75ViYezwT40aQONfr+pSXTHwNKvIXhXD6+LY3F1dLIcceoC5OZKBVHbXcysz1hL9D2w0JJIMXpUw== @@ -6488,11 +6514,6 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30001561" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001561.tgz#02b861e2ca89a5aa672a5859a34cad5ef865aad8" - integrity sha512-lrMBU9QyHu5Rg24Eu5bILWA6fvm/IxFy4z2lYc8Nnidkmr0io4Pi/UMqDEBU/3LPBao/UaKk4URwJP9Nww9lpQ== - caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001541: version "1.0.30001561" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz#752f21f56f96f1b1a52e97aae98c57c562d5d9da" @@ -6503,6 +6524,11 @@ caniuse-lite@^1.0.30001565: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz#893be772cf8ee6056d6c1e2d07df365b9ec0a5c4" integrity sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg== +caniuse-lite@^1.0.30001578: + version "1.0.30001579" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz#45c065216110f46d6274311a4b3fcf6278e0852a" + integrity sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA== + capital-case@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" @@ -6517,10 +6543,10 @@ case-sensitive-paths-webpack-plugin@^2.4.0: resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz#db64066c6422eed2e08cc14b986ca43796dbc6d4" integrity sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw== -cbor@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" - integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg== +cbor@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-9.0.1.tgz#b16e393d4948d44758cd54ac6151379d443b37ae" + integrity sha512-/TQOWyamDxvVIv+DY9cOLNuABkoyz8K/F3QE56539pGVYohx0+MEA1f4lChFTX79dBTBS7R1PF6ovH7G+VtBfQ== dependencies: nofilter "^3.1.0" @@ -6555,7 +6581,7 @@ chalk@4.1.2, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1. ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@5.3.0, chalk@^5.0.0, chalk@^5.0.1, chalk@^5.2.0, chalk@^5.3.0: +chalk@5.3.0, chalk@^5.0.0, chalk@^5.0.1, chalk@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== @@ -6751,11 +6777,16 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.2.0, ci-info@^3.6.1, ci-info@^3.8.0: +ci-info@^3.2.0, ci-info@^3.6.1: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== +ci-info@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2" + integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg== + ci-parallel-vars@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz#e87ff0625ccf9d286985b29b4ada8485ca9ffbc2" @@ -6790,18 +6821,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -clean-stack@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-4.2.0.tgz#c464e4cde4ac789f4e0735c5d75beb49d7b30b31" - integrity sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg== - dependencies: - escape-string-regexp "5.0.0" - -clean-yaml-object@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68" - integrity sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw== - cli-cursor@3.1.0, cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -6843,6 +6862,14 @@ cli-truncate@^3.1.0: slice-ansi "^5.0.0" string-width "^5.0.0" +cli-truncate@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-4.0.0.tgz#6cc28a2924fee9e25ce91e973db56c7066e6172a" + integrity sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA== + dependencies: + slice-ansi "^5.0.0" + string-width "^7.0.0" + cli-width@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" @@ -7001,7 +7028,7 @@ color-name@^1.1.4, color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-support@^1.1.3: +color-support@^1.1.2, color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== @@ -7208,7 +7235,7 @@ connect@3.6.6: parseurl "~1.3.2" utils-merge "1.0.1" -console-control-strings@^1.1.0: +console-control-strings@^1.0.0, console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== @@ -7540,19 +7567,6 @@ cosmiconfig@7.0.0: path-type "^4.0.0" yaml "^1.10.0" -cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" - integrity sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A== - dependencies: - is-directory "^0.3.1" - js-yaml "^3.4.3" - minimist "^1.2.0" - object-assign "^4.1.0" - os-homedir "^1.0.1" - parse-json "^2.2.0" - require-from-string "^1.1.0" - cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" @@ -7720,11 +7734,6 @@ css-tree@~2.2.0: mdn-data "2.0.28" source-map-js "^1.0.1" -css-unit-converter@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.2.tgz#4c77f5a1954e6dbff60695ecb214e3270436ab21" - integrity sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA== - css-what@^3.2.1: version "3.4.2" resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" @@ -7740,11 +7749,6 @@ css.escape@^1.5.1: resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg== -cssesc@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703" - integrity sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg== - cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -7980,20 +7984,6 @@ defu@^6.1.2: resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.3.tgz#6d7f56bc61668e844f9f593ace66fd67ef1205fd" integrity sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ== -del@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7" - integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA== - dependencies: - globby "^10.0.1" - graceful-fs "^4.2.2" - is-glob "^4.0.1" - is-path-cwd "^2.2.0" - is-path-inside "^3.0.1" - p-map "^3.0.0" - rimraf "^3.0.0" - slash "^3.0.0" - del@^6.0.0: version "6.1.1" resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a" @@ -8073,6 +8063,11 @@ detect-indent@^6.1.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== +detect-libc@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== + detect-node-es@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" @@ -8263,7 +8258,7 @@ dot-prop@6.0.1: dependencies: is-obj "^2.0.0" -dot-prop@^5.1.0, dot-prop@^5.2.0: +dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== @@ -8339,7 +8334,7 @@ ejs@^3.1.7, ejs@^3.1.8: dependencies: jake "^10.8.5" -electron-to-chromium@^1.2.7, electron-to-chromium@^1.4.535: +electron-to-chromium@^1.4.535: version "1.4.582" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.582.tgz#4908215182266793499ac57d80e2680d7dd9b3db" integrity sha512-89o0MGoocwYbzqUUjc+VNpeOFSOK9nIdC5wY4N+PVUarUK0MtjyTjks75AZS2bW4Kl8MdewdFsWaH0jLy+JNoA== @@ -8359,6 +8354,11 @@ emittery@^1.0.1: resolved "https://registry.yarnpkg.com/emittery/-/emittery-1.0.1.tgz#e0cf36e2d7eef94dbd025969f642d57ae50a56cd" integrity sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ== +emoji-regex@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" + integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -8651,11 +8651,6 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== -escape-string-regexp@5.0.0, escape-string-regexp@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -8666,6 +8661,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" + integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== + eslint-plugin-jest@^27.2.2: version "27.6.1" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.6.1.tgz#5e43b07f3ca48d72e4b4fa243531e5153d9ca1dc" @@ -8715,6 +8715,11 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +estree-walker@2.0.2, estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + esutils@^2.0.2, esutils@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -8934,6 +8939,13 @@ fancy-log@^1.3.2: parse-node-version "^1.0.0" time-stamp "^1.0.0" +fancy-log@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-2.0.0.tgz#cad207b8396d69ae4796d74d17dff5f68b2f7343" + integrity sha512-9CzxZbACXMUXW13tS0tI8XsGGmxWzO2DmYrGuBJOJ8k8q2K7hwfJA5qHjuPPe8wtsco33YR9wc+Rlr5wYFvhSA== + dependencies: + color-support "^1.1.3" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -8955,7 +8967,7 @@ fast-glob@3.2.7: merge2 "^1.3.0" micromatch "^4.0.4" -fast-glob@^3.0.3, fast-glob@^3.2.9, fast-glob@^3.3.0, fast-glob@^3.3.1, fast-glob@^3.3.2: +fast-glob@^3.2.9, fast-glob@^3.3.0, fast-glob@^3.3.1, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -9029,6 +9041,13 @@ figures@^5.0.0: escape-string-regexp "^5.0.0" is-unicode-supported "^1.2.0" +figures@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/figures/-/figures-6.0.1.tgz#75a2baf3ca8c63e2ea253179e9f1157833587ea4" + integrity sha512-0oY/olScYD4IhQ8u//gCPA4F3mlTn2dacYmiDm/mbDQvpmLjV4uH+zhsQ5IyXRyvqkvtUkXkNdGvg5OFJTCsuQ== + dependencies: + is-unicode-supported "^2.0.0" + file-entry-cache@^7.0.0: version "7.0.2" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-7.0.2.tgz#2d61bb70ba89b9548e3035b7c9173fe91deafff0" @@ -9164,6 +9183,11 @@ find-cache-dir@^4.0.0: common-path-prefix "^3.0.0" pkg-dir "^7.0.0" +find-up-simple@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-up-simple/-/find-up-simple-1.0.0.tgz#21d035fde9fdbd56c8f4d2f63f32fd93a1cfc368" + integrity sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw== + find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -9202,7 +9226,7 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^6.0.0, find-up@^6.3.0: +find-up@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== @@ -9387,6 +9411,11 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== +fraction.js@^4.3.7: + version "4.3.7" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" + integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -9511,6 +9540,21 @@ fuzzy@^0.1.3: resolved "https://registry.yarnpkg.com/fuzzy/-/fuzzy-0.1.3.tgz#4c76ec2ff0ac1a36a9dccf9a00df8623078d4ed8" integrity sha512-/gZffu4ykarLrCiP3Ygsa86UAo1E5vEVlvTrpkKywXSbP9Xhln3oSp9QSV57gEq3JFFpGJ4GZ+5zdEp3FcUh4w== +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + object-assign "^4.1.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + gauge@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" @@ -9554,6 +9598,11 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" + integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" @@ -9882,21 +9931,7 @@ globby@11.1.0, globby@^11.0.1, globby@^11.0.2, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -globby@^10.0.1: - version "10.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" - integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== - dependencies: - "@types/glob" "^7.1.1" - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.0.3" - glob "^7.1.3" - ignore "^5.1.1" - merge2 "^1.2.3" - slash "^3.0.0" - -globby@^13.1.1, globby@^13.1.4: +globby@^13.1.1: version "13.2.2" resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== @@ -9961,7 +9996,7 @@ graceful-fs@4.2.10: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -10043,15 +10078,14 @@ gulp-insert@^0.5.0: readable-stream "^1.0.26-4" streamqueue "0.0.6" -gulp-postcss@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/gulp-postcss/-/gulp-postcss-7.0.1.tgz#3f1c36db1197140c399c252ddff339129638e395" - integrity sha512-JEB1NsfuNg9vtpkbonnKHhYxdDEfLZxOXGJey+T4eh5EwCjtvBJQLosocDOXp/CAxyMiH3cOIsamOW8uEtZ5Gw== +gulp-postcss@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/gulp-postcss/-/gulp-postcss-9.1.0.tgz#0d317134d40d9565f265bd32c7f71605a54cadd8" + integrity sha512-a843mcKPApfeI987uqQbc8l50xXeWIXBsiVvYxtCI5XtVAMzTi/HnU2qzQpGwkB/PAOfsLV8OsqDv2iJZ9qvdw== dependencies: - fancy-log "^1.3.2" - plugin-error "^0.1.2" - postcss "^6.0.0" - postcss-load-config "^1.2.0" + fancy-log "^2.0.0" + plugin-error "^2.0.1" + postcss-load-config "^5.0.0" vinyl-sourcemaps-apply "^0.2.1" gulp-pug@^4.0.1: @@ -10528,7 +10562,7 @@ ignore-walk@^6.0.0: dependencies: minimatch "^9.0.0" -ignore@^5.0.4, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0: +ignore@^5.0.4, ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== @@ -10725,11 +10759,6 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== -ip-regex@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" - integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== - ip@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" @@ -10893,21 +10922,11 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-accessor-descriptor "^1.0.1" is-data-descriptor "^1.0.1" -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== - is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== -is-error@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/is-error/-/is-error-2.2.2.tgz#c10ade187b3c93510c5470a5567833ee25649843" - integrity sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg== - is-expression@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-expression/-/is-expression-3.0.0.tgz#39acaa6be7fd1f3471dc42c7416e61c24317ac9f" @@ -11068,7 +11087,7 @@ is-path-cwd@^2.2.0: resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== -is-path-inside@^3.0.1, is-path-inside@^3.0.2: +is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -11201,12 +11220,15 @@ is-unicode-supported@^1.1.0, is-unicode-supported@^1.2.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== -is-url-superb@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-url-superb/-/is-url-superb-3.0.0.tgz#b9a1da878a1ac73659047d1e6f4ef22c209d3e25" - integrity sha512-3faQP+wHCGDQT1qReM5zCPx2mxoal6DzbzquFlCYJLWyy4WPTved33ea2xFbX37z4NoriEwZGIYhFtx8RUB5wQ== - dependencies: - url-regex "^5.0.0" +is-unicode-supported@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz#fdf32df9ae98ff6ab2cedc155a5a6e895701c451" + integrity sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q== + +is-url-superb@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-url-superb/-/is-url-superb-4.0.0.tgz#b54d1d2499bb16792748ac967aa3ecb41a33a8c2" + integrity sha512-GI+WjezhPPcbM+tqE9LnmsY5qqjwHzTvjJ36wxYX5ujNXefSUJ/T17r5bqDV8yLhcgB59KTPNOc9O9cmHTPWsA== is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" @@ -11487,7 +11509,7 @@ js-yaml@4.1.0, js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -js-yaml@^3.10.0, js-yaml@^3.13.1, js-yaml@^3.14.1, js-yaml@^3.4.3: +js-yaml@^3.10.0, js-yaml@^3.13.1, js-yaml@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -11731,14 +11753,11 @@ lead@^1.0.0: "legacy-postcss-dropdupedvars@file:plugins/legacy-postcss-dropdupedvars": version "1.0.0" - dependencies: - postcss "^7.0.32" "legacy-postcss-dropunusedvars@file:plugins/legacy-postcss-dropunusedvars": version "1.0.0" dependencies: - postcss "^7.0.32" - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" lerna@^6.6.2: version "6.6.2" @@ -11995,7 +12014,7 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -load-json-file@^7.0.0: +load-json-file@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-7.0.1.tgz#a3c9fde6beffb6bedb5acf104fad6bb1604e1b00" integrity sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ== @@ -12293,7 +12312,7 @@ magic-string@^0.30.5: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" -make-dir@3.1.0, make-dir@^3.0.2: +make-dir@3.1.0, make-dir@^3.0.2, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -12394,13 +12413,6 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" -map-age-cleaner@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - map-cache@^0.2.0, map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -12515,14 +12527,6 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== -mem@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/mem/-/mem-9.0.2.tgz#bbc2d40be045afe30749681e8f5d554cee0c0354" - integrity sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A== - dependencies: - map-age-cleaner "^0.1.3" - mimic-fn "^4.0.0" - memfs@^3.4.1, memfs@^3.4.12: version "3.6.0" resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.6.0.tgz#d7a2110f86f79dd950a8b6df6d57bc984aa185f6" @@ -12530,6 +12534,13 @@ memfs@^3.4.1, memfs@^3.4.12: dependencies: fs-monkey "^1.0.4" +memoize@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/memoize/-/memoize-10.0.0.tgz#43fa66b2022363c7c50cf5dfab732a808a3d7147" + integrity sha512-H6cBLgsi6vMWOcCpvVCdFFnl3kerEXbrYh9q+lY6VXvQSmM6CkmV08VOwT+WE2tzIEqRPFfAq3fm4v/UIW6mSA== + dependencies: + mimic-function "^5.0.0" + memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a" @@ -12597,7 +12608,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: +merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -12671,6 +12682,11 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== +mimic-function@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.0.tgz#6cb5a922d17923ee58cf2f7d904f3eb350e0c87a" + integrity sha512-RBfQ+9X9DpXdEoK7Bu+KeEU6vFhumEIiXKWECPzRBmDserEq4uR2b/VCm0LwpMSosoq2k+Zuxj/GzOr0Fn6h/g== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -13023,6 +13039,11 @@ node-fetch@^2.0.0, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" +node-gyp-build@^4.2.2: + version "4.8.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd" + integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== + node-gyp-build@^4.3.0: version "4.6.1" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.1.tgz#24b6d075e5e391b8d5539d98c7fc5c210cac8a3e" @@ -13096,6 +13117,13 @@ nopt@1.0.10: dependencies: abbrev "1" +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + nopt@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" @@ -13367,6 +13395,16 @@ npmlog@6.0.2, npmlog@^6.0.0, npmlog@^6.0.2: gauge "^4.0.3" set-blocking "^2.0.0" +npmlog@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" + integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== + dependencies: + are-we-there-yet "^2.0.0" + console-control-strings "^1.1.0" + gauge "^3.0.0" + set-blocking "^2.0.0" + npmlog@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-7.0.1.tgz#7372151a01ccb095c47d8bf1d0771a4ff1f53ac8" @@ -13391,11 +13429,6 @@ nth-check@^2.0.1: dependencies: boolbase "^1.0.0" -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - integrity sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg== - number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -13712,11 +13745,6 @@ ordered-read-streams@^1.0.0: dependencies: readable-stream "^2.0.1" -os-homedir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== - os-locale@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" @@ -13729,18 +13757,6 @@ os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== - -p-event@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/p-event/-/p-event-5.0.1.tgz#614624ec02ae7f4f13d09a721c90586184af5b0c" - integrity sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ== - dependencies: - p-timeout "^5.0.2" - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -13821,19 +13837,10 @@ p-map@4.0.0, p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-map@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" - integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== - dependencies: - aggregate-error "^3.0.0" - -p-map@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-5.5.0.tgz#054ca8ca778dfa4cf3f8db6638ccb5b937266715" - integrity sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg== - dependencies: - aggregate-error "^4.0.0" +p-map@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-6.0.0.tgz#4d9c40d3171632f86c47601b709f4b4acd70fed4" + integrity sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw== p-pipe@3.1.0: version "3.1.0" @@ -13860,11 +13867,6 @@ p-timeout@^3.2.0: dependencies: p-finally "^1.0.0" -p-timeout@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-5.1.0.tgz#b3c691cf4415138ce2d9cfe071dba11f0fee085b" - integrity sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew== - p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -13882,6 +13884,14 @@ p-waterfall@2.1.1: dependencies: p-reduce "^2.0.0" +package-config@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/package-config/-/package-config-5.0.0.tgz#cba78b7feb3396fa0149caca2c72677ff302b3c4" + integrity sha512-GYTTew2slBcYdvRHqjhwaaydVMvn/qrGC323+nKclYioNSLTDUM/lGgtGTgyHVtYcozb+XkE8CNhwcraOmZ9Mg== + dependencies: + find-up-simple "^1.0.0" + load-json-file "^7.0.1" + pacote@15.1.1: version "15.1.1" resolved "https://registry.yarnpkg.com/pacote/-/pacote-15.1.1.tgz#94d8c6e0605e04d427610b3aacb0357073978348" @@ -14236,11 +14246,16 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.0, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.0, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-3.0.1.tgz#817033161def55ec9638567a2f3bbc876b3e7516" + integrity sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag== + pidtree@0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" @@ -14288,14 +14303,6 @@ pirates@^4.0.4, pirates@^4.0.6: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== -pkg-conf@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-4.0.0.tgz#63ace00cbacfa94c2226aee133800802d3e3b80c" - integrity sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w== - dependencies: - find-up "^6.0.0" - load-json-file "^7.0.0" - pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -14359,6 +14366,13 @@ plugin-error@^1.0.1: arr-union "^3.1.0" extend-shallow "^3.0.2" +plugin-error@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-2.0.1.tgz#f2ac92bac8c85e3e23492d76d0c3ca12f30eb00b" + integrity sha512-zMakqvIDyY40xHOvzXka0kUvf40nYIuwRE8dWhti2WtjQZ31xAgBZBhxsK7vK3QbRXS1Xms/LO7B5cuAsfB2Gg== + dependencies: + ansi-colors "^1.0.1" + plur@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/plur/-/plur-5.1.0.tgz#bff58c9f557b9061d60d8ebf93959cf4b08594ae" @@ -14411,15 +14425,13 @@ postcss-bem-linter@^4.0.1: minimatch "^3.1.2" postcss-resolve-nested-selector "^0.1.1" -postcss-calc@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-6.0.2.tgz#4d9a43e27dbbf27d095fecb021ac6896e2318337" - integrity sha512-fiznXjEN5T42Qm7qqMCVJXS3roaj9r4xsSi+meaBVe7CJBl8t/QLOXu02Z2E6oWAMWIvCuF6JrvzFekmVEbOKA== +postcss-calc@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-9.0.1.tgz#a744fd592438a93d6de0f1434c572670361eb6c6" + integrity sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ== dependencies: - css-unit-converter "^1.1.1" - postcss "^7.0.2" - postcss-selector-parser "^2.2.2" - reduce-css-calc "^2.0.0" + postcss-selector-parser "^6.0.11" + postcss-value-parser "^4.2.0" postcss-class-prefix@^0.3.0: version "0.3.0" @@ -14453,33 +14465,23 @@ postcss-combine-duplicated-selectors@^10.0.3: dependencies: postcss-selector-parser "^6.0.4" -postcss-dir-pseudo-class@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-5.0.0.tgz#6e3a4177d0edb3abcc85fdb6fbb1c26dabaeaba2" - integrity sha512-3pm4oq8HYWMZePJY+5ANriPs3P07q+LW6FAdTlkFH2XqDdP4HeeJYMOzn0HYLhRSjBO3fhiqSwwU9xEULSrPgw== +"postcss-combininator@file:plugins/postcss-combininator": + version "1.1.0" dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" + postcss "^8.4.33" -postcss-discard-comments@^4.0.0, postcss-discard-comments@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" - integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== +postcss-dir-pseudo-class@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-8.0.1.tgz#b93755f52fb90215301b1d3ecb7c5e6416930a1e" + integrity sha512-uULohfWBBVoFiZXgsQA24JV6FdKIidQ+ZqxOouhWwdE+qJlALbkS5ScB43ZTjPK+xUZZhlaO/NjfCt5h4IKUfw== dependencies: - postcss "^7.0.0" + postcss-selector-parser "^6.0.13" postcss-discard-comments@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-6.0.1.tgz#46176212bd9c3e5f48aa4b8b4868786726c41d36" integrity sha512-f1KYNPtqYLUeZGCHQPKzzFtsHaRuECe6jLakf/RjSRqvF5XHLZnM2+fXLhb8Qh/HBFHs3M4cSLb1k3B899RYIg== -postcss-discard-empty@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" - integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== - dependencies: - postcss "^7.0.0" - postcss-discard-empty@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-6.0.1.tgz#b34cb45ec891246da4506b53e352390fdef126c4" @@ -14487,14 +14489,11 @@ postcss-discard-empty@^6.0.1: "postcss-dropdupedvars@file:plugins/postcss-dropdupedvars": version "1.1.2" - dependencies: - postcss "^7.0.32" "postcss-dropunusedvars@file:plugins/postcss-dropunusedvars": version "1.2.1" dependencies: - postcss "^7.0.32" - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" postcss-extend@^1.0.5: version "1.0.5" @@ -14503,14 +14502,12 @@ postcss-extend@^1.0.5: dependencies: postcss "^5.0.4" -postcss-import@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-10.0.0.tgz#4c85c97b099136cc5ea0240dc1dfdbfde4e2ebbe" - integrity sha512-tU3ZSSdREBRjndNDxfyaDOozz2ODOlV0DP26EZuZ9b3YVr0PR/AyGiGH/nhqNX1j0ku+D7JgrbcnZd8S6iLwFA== +postcss-import@^16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-16.0.0.tgz#2be1c78391b3f43f129fccfe5cc0cc1a11baef54" + integrity sha512-e77lhVvrD1I2y7dYmBv0k9ULTdArgEYZt97T4w6sFIU5uxIHvDFQlKgUUyY7v7Barj0Yf/zm5A4OquZN7jKm5Q== dependencies: - object-assign "^4.0.1" - postcss "^6.0.1" - postcss-value-parser "^3.2.3" + postcss-value-parser "^4.0.0" read-cache "^1.0.0" resolve "^1.1.7" @@ -14519,16 +14516,6 @@ postcss-licensing@^1.0.1: resolved "https://registry.yarnpkg.com/postcss-licensing/-/postcss-licensing-1.0.1.tgz#a40a6e28768925670734bff66f118d99c7043c3a" integrity sha512-64O1mwaPLqUJP3pOp124ihHNOZBihPv3lnqC48GyeaGaNz1qTQhcsCqlKbuNl4Q8ZqIQqBFexzOAcoePVez2Dw== -postcss-load-config@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" - integrity sha512-3fpCfnXo9Qd/O/q/XL4cJUhRsqjVD2V1Vhy3wOEcLE5kz0TGtdDXJSoiTdH4e847KphbEac4+EZSH4qLRYIgLw== - dependencies: - cosmiconfig "^2.1.0" - object-assign "^4.1.0" - postcss-load-options "^1.2.0" - postcss-load-plugins "^2.3.0" - postcss-load-config@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-5.0.2.tgz#3d4261d616428e3d6e41c8236c3e456c0f49266f" @@ -14537,22 +14524,6 @@ postcss-load-config@^5.0.0: lilconfig "^3.0.0" yaml "^2.3.4" -postcss-load-options@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" - integrity sha512-WKS5LJMZLWGwtfhs5ahb2ycpoYF3m0kK4QEaM+elr5EpiMt0H296P/9ETa13WXzjPwB0DDTBiUBBWSHoApQIJg== - dependencies: - cosmiconfig "^2.1.0" - object-assign "^4.1.0" - -postcss-load-plugins@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" - integrity sha512-/WGUMYhKiryWjYO6c7kAcqMuD7DVkaQ8HcbQenDme/d3OBOmrYMFObOKgUWyUy1uih5U2Dakq8H6VcJi5C9wHQ== - dependencies: - cosmiconfig "^2.1.1" - object-assign "^4.1.0" - postcss-loader@^4.0.0: version "4.3.0" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-4.3.0.tgz#2c4de9657cd4f07af5ab42bd60a673004da1b8cc" @@ -14564,12 +14535,12 @@ postcss-loader@^4.0.0: schema-utils "^3.0.0" semver "^7.3.4" -postcss-logical@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-logical/-/postcss-logical-4.0.2.tgz#63f5207bae63f1f646462c26509185c2eae22c72" - integrity sha512-tlX1n19np6/JznvyymZM6SIe0FymD5Ngwcg2j825vNKhADu0p1PTgEmsCjakCbvn78kaIFzYTI32NpgOEwgifQ== +postcss-logical@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/postcss-logical/-/postcss-logical-7.0.1.tgz#a3121f6510591b195321b16e65fbe13b1cfd3115" + integrity sha512-8GwUQZE0ri0K0HJHkDv87XOLC8DE0msc+HoWLeKdtjDZEwpZ5xuK3QdV6FhmHSQW40LPkg43QzvATRAI3LsRkg== dependencies: - postcss "^7.0.17" + postcss-value-parser "^4.2.0" postcss-merge-rules@^6.0.3: version "6.0.3" @@ -14609,13 +14580,12 @@ postcss-modules-values@^4.0.0: dependencies: icss-utils "^5.0.0" -postcss-nested@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-3.0.0.tgz#cde40bd07a078565f3df72e2dc2665871c724852" - integrity sha512-1xxmLHSfubuUi6xZZ0zLsNoiKfk3BWQj6fkNMaBJC529wKKLcdeCxXt6KJmDLva+trNyQNwEaE/ZWMA7cve1fA== +postcss-nested@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.0.1.tgz#f83dc9846ca16d2f4fa864f16e9d9f7d0961662c" + integrity sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ== dependencies: - postcss "^6.0.14" - postcss-selector-parser "^3.1.1" + postcss-selector-parser "^6.0.11" postcss-prefix-selector@^1.16.0: version "1.16.0" @@ -14652,33 +14622,6 @@ postcss-safe-parser@^7.0.0: resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-7.0.0.tgz#6273d4e5149e286db5a45bc6cf6eafcad464014a" integrity sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg== -postcss-selector-parser@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" - integrity sha512-3pqyakeGhrO0BQ5+/tGTfvi5IAUAhHRayGK8WFSu06aEv2BmHoXw/Mhb+w7VY5HERIuC+QoUI7wgrCcq2hqCVA== - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-selector-parser@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" - integrity sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== - dependencies: - dot-prop "^5.2.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-selector-parser@^5.0.0-rc.3: - version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz#249044356697b33b64f1a8f7c80922dddee7195c" - integrity sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ== - dependencies: - cssesc "^2.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.13, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: version "6.0.13" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz#d05d8d76b1e8e173257ef9d60b706a8e5e99bf1b" @@ -14687,7 +14630,7 @@ postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.13, postcss-select cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss-selector-parser@^6.0.15: +postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.15: version "6.0.15" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz#11cc2b21eebc0b99ea374ffb9887174855a01535" integrity sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw== @@ -14717,12 +14660,7 @@ postcss-svg@^3.0.0: svgo "^1.1.1" xmldoc "^1.1.2" -postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" - integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== - -postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: +postcss-value-parser@^4.0.0, postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== @@ -14736,15 +14674,14 @@ postcss-values-parser@^2.0.0: indexes-of "^1.0.1" uniq "^1.0.1" -postcss-values-parser@^3.1.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-3.2.1.tgz#55114607de6631338ba8728d3e9c15785adcc027" - integrity sha512-SQ7/88VE9LhJh9gc27/hqnSU/aZaREVJcRVccXBmajgP2RkjdJzNyH/a9GCVMI5nsRhT0jC5HpUMwfkz81DVVg== +postcss-values-parser@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-6.0.2.tgz#636edc5b86c953896f1bb0d7a7a6615df00fb76f" + integrity sha512-YLJpK0N1brcNJrs9WatuJFtHaV9q5aAOj+S4DI5S7jgHlRfm0PIbDCAFRYMQD5SHq7Fy6xsDhyutgS0QOAs0qw== dependencies: color-name "^1.1.4" - is-url-superb "^3.0.0" - postcss "^7.0.5" - url-regex "^5.0.0" + is-url-superb "^4.0.0" + quote-unquote "^1.0.0" postcss-warn-cleaner@^0.1.9: version "0.1.9" @@ -14754,7 +14691,7 @@ postcss-warn-cleaner@^0.1.9: multimatch "^2.1.0" postcss "^5.1.0" -postcss@^5.0.4, postcss@^5.1.0, postcss@^5.2.16: +postcss@^5.0.4, postcss@^5.1.0: version "5.2.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" integrity sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg== @@ -14764,7 +14701,7 @@ postcss@^5.0.4, postcss@^5.1.0, postcss@^5.2.16: source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.14, postcss@^6.0.8: +postcss@^6.0.8: version "6.0.23" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== @@ -14773,7 +14710,7 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.14, postcss@^6.0.8: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0.36, postcss@^7.0.5, postcss@^7.0.6: +postcss@^7.0.6: version "7.0.39" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== @@ -15293,6 +15230,11 @@ quick-lru@^5.1.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== +quote-unquote@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/quote-unquote/-/quote-unquote-1.0.0.tgz#67a9a77148effeaf81a4d428404a710baaac8a0b" + integrity sha512-twwRO/ilhlG/FIgYeKGFqyHhoEhqgnKVkcmqMKi2r524gz3ZbDTcyFt38E9xjJI2vT+KbRNHVbnJ/e0I25Azwg== + ramda@0.29.0: version "0.29.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.29.0.tgz#fbbb67a740a754c8a4cbb41e2a6e0eb8507f55fb" @@ -15709,14 +15651,6 @@ redent@^4.0.0: indent-string "^5.0.0" strip-indent "^4.0.0" -reduce-css-calc@^2.0.0: - version "2.1.8" - resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-2.1.8.tgz#7ef8761a28d614980dc0c982f772c93f7a99de03" - integrity sha512-8liAVezDmUcH+tdzoEGrhfbGcP7nOV4NkGE3a74+qqvE7nt9i4sKLGBuZNOnpI4WiGksiNPklZxva80061QiPg== - dependencies: - css-unit-converter "^1.1.1" - postcss-value-parser "^3.3.0" - refractor@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.6.0.tgz#ac318f5a0715ead790fcfb0c71f4dd83d977935a" @@ -15887,11 +15821,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -require-from-string@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== - require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" @@ -16378,7 +16307,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@3.0.7, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@3.0.7, signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -16834,6 +16763,15 @@ string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string-width@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.1.0.tgz#d994252935224729ea3719c49f7206dc9c46550a" + integrity sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + string.prototype.padend@^3.0.0: version "3.1.5" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.5.tgz#311ef3a4e3c557dd999cdf88fbdde223f2ac0f95" @@ -17501,11 +17439,6 @@ title-case@^3.0.3: dependencies: tslib "^2.0.3" -tlds@^1.203.0: - version "1.245.0" - resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.245.0.tgz#afd4c0c33be7227f8f2d4578573fc922b839ba84" - integrity sha512-fbSQFQr8f41/e9q9IoKKVv7CUFvvE3TVJo7m0JQJZcf7jOOXRRf9DIP4Uf04aovYGKG686OvtV4ZrNY1bOz3aA== - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -18136,14 +18069,6 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== -url-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/url-regex/-/url-regex-5.0.0.tgz#8f5456ab83d898d18b2f91753a702649b873273a" - integrity sha512-O08GjTiAFNsSlrUWfqF1jH0H1W3m35ZyadHrGv5krdnmPPoxP27oDTqux/579PtaroiSGm5yma6KT1mHFH6Y/g== - dependencies: - ip-regex "^4.1.0" - tlds "^1.203.0" - url@^0.11.0: version "0.11.3" resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" @@ -18548,7 +18473,7 @@ which@^3.0.0: dependencies: isexe "^2.0.0" -wide-align@^1.1.5: +wide-align@^1.1.2, wide-align@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==