From 2e731c9924359590ff0ce3ed4cb53b84c68ce353 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Mon, 14 Nov 2022 17:32:38 +0100 Subject: [PATCH 1/9] update lib --- dist/index.cjs | 1 + dist/index.d.ts | 6 + dist/index.mjs | 1 + dist/transform-single-pair.d.ts | 2 + dist/transform.d.ts | 1 + index.js | 122 -- package.json | 32 +- rollup/configs/babel-presets.mjs | 8 + rollup/configs/externals.mjs | 6 + rollup/default.mjs | 28 + src/index.ts | 43 + src/transform-single-pair.ts | 147 ++ src/transform.ts | 245 +++ tsconfig.json | 15 + yarn.lock | 2412 ++++++++++++++++++++++++++---- 15 files changed, 2676 insertions(+), 393 deletions(-) create mode 100644 dist/index.cjs create mode 100644 dist/index.d.ts create mode 100644 dist/index.mjs create mode 100644 dist/transform-single-pair.d.ts create mode 100644 dist/transform.d.ts delete mode 100644 index.js create mode 100644 rollup/configs/babel-presets.mjs create mode 100644 rollup/configs/externals.mjs create mode 100644 rollup/default.mjs create mode 100644 src/index.ts create mode 100644 src/transform-single-pair.ts create mode 100644 src/transform.ts create mode 100644 tsconfig.json diff --git a/dist/index.cjs b/dist/index.cjs new file mode 100644 index 0000000..f97661e --- /dev/null +++ b/dist/index.cjs @@ -0,0 +1 @@ +"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function r(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const a={">":1,"<":-1};function o(o,s,u,d){if(!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ){return i.newMediaFeaturePlain(r(s)+o,...u.tokens())}if(Array.isArray(u.value)&&i.matchesRatioExactly(u.value))return;let p;if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=a[s],r=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${r}`,-1,-1,{value:i,unit:r,type:n.NumberType.Integer}]}else{const i=a[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(r(s)+o,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0])}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+a[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*a[s]+"e6"))+"e-6")}else e=a[s],d=t[o.toLowerCase()];!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString();return i.newMediaFeaturePlain(r(s)+o,u)}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map((t=>{const r=e.gatherNodeAncestry(t);return t.walk((e=>{const a=e.node;if(!i.isMediaFeatureRange(a))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=a.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(a)||i.isMediaFeatureRangeValueName(a)){const e=a.operatorKind();if(!1===e)return;const n=o(d,e,a.value,i.isMediaFeatureRangeNameValue(a));return void(n&&(u.feature=n.feature))}const p=r.get(u);if(!i.isMediaInParens(p))return;let c=null,l=null;{const e=a.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,a.valueOne,!1);if(!n)return;c=n}{const e=a.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,a.valueTwo,!0);if(!n)return;l=n}const T=new i.MediaInParens(c),v=new i.MediaInParens(l),m=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(t=n.get(t),!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,r);if(m)return m.leading===p?(m.leading=T,void(m.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...m.list])):void m.list.splice(m.indexOf(r.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],T),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const y=new i.MediaConditionListWithAnd(T,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let r=e;if(!r)return;if(r=t.get(r),!i.isMediaCondition(r))return;const a=r;if(r=t.get(r),!i.isMediaQuery(r))return;if(r!==n)return;return a}(p,t,r);f?f.media=y:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(y),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))})),t.toString()})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..0672df0 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,6 @@ +import type { PluginCreator } from 'postcss'; +declare type pluginOptions = { + preserve?: boolean; +}; +declare const creator: PluginCreator; +export default creator; diff --git a/dist/index.mjs b/dist/index.mjs new file mode 100644 index 0000000..d24b81c --- /dev/null +++ b/dist/index.mjs @@ -0,0 +1 @@ +import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as n}from"@csstools/css-parser-algorithms";import{TokenType as r,NumberType as i}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as a,MediaFeatureLT as s,MediaFeatureGT as u,newMediaFeaturePlain as c,matchesRatioExactly as l,parse as d,isMediaFeatureRange as v,isMediaFeature as p,isMediaFeatureRangeNameValue as m,isMediaFeatureRangeValueName as f,isMediaInParens as h,MediaInParens as g,MediaAnd as w,MediaConditionListWithAnd as O,MediaCondition as W,isMediaConditionListWithAnd as x,isMediaAnd as y,isMediaCondition as T,isMediaQuery as I}from"@csstools/media-query-list-parser";const L={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function _(e){return e===s.LT||e===s.LT_OR_EQ?"max-":e===u.GT||e===u.GT_OR_EQ?"min-":""}const b={">":1,"<":-1};function C(n,d,v,p){if(!p){const e=o(d);if(!1===e)return;d=e}if(d===a.EQ||d===s.LT_OR_EQ||d===u.GT_OR_EQ){return c(_(d)+n,...v.tokens())}if(Array.isArray(v.value)&&l(v.value))return;let m;if(m=Array.isArray(v.value)?v.value.find((n=>e(n)||t(n))):v.value,e(m)&&"calc"===m.nameTokenValue().toLowerCase()){let e;if(L[n.toLowerCase()]){const t=b[d],o=L[n.toLowerCase()];e=[r.Dimension,`${t.toString()}${o}`,-1,-1,{value:t,unit:o,type:i.Integer}]}else{const t=b[d];e=[r.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return c(_(d)+n,[r.Function,"calc(",-1,-1,{value:"calc("}],[r.OpenParen,"(",-1,-1,void 0],...m.tokens().slice(1),[r.Whitespace," ",-1,-1,void 0],[r.Delim,"+",-1,-1,void 0],[r.Whitespace," ",-1,-1,void 0],e,[r.CloseParen,")",-1,-1,void 0])}if(t(m)){let e,t=m.value,o=!1;if(t[0]!==r.Dimension&&t[0]!==r.Number||0!==t[4].value)if(t[0]===r.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+b[d];else{if(t[0]!==r.Dimension&&t[0]!==r.Number)return;e=Number(Math.round(Number(t[4].value+.001*b[d]+"e6"))+"e-6")}else e=b[d],o=L[n.toLowerCase()];!1!==o&&(t=[r.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:o,type:t[4].type}]),t[4].value=e,t[0]===r.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString();return c(_(d)+n,t)}}const D=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function E(e){return d(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map((e=>{const t=n(e);return e.walk((n=>{const i=n.node;if(!v(i))return;const o=n.parent;if(!p(o))return;const a=i.name.getName();if(!D.has(a.toLowerCase()))return;if(m(i)||f(i)){const e=i.operatorKind();if(!1===e)return;const t=C(a,e,i.value,m(i));return void(t&&(o.feature=t.feature))}const s=t.get(o);if(!h(s))return;let u=null,c=null;{const e=i.valueOneOperatorKind();if(!1===e)return;const t=C(a,e,i.valueOne,!1);if(!t)return;u=t}{const e=i.valueTwoOperatorKind();if(!1===e)return;const t=C(a,e,i.valueTwo,!0);if(!t)return;c=t}const l=new g(u),d=new g(c),L=function(e,t){let n=e;if(!n)return;if(n=t.get(n),x(n))return n;if(n=t.get(n),!y(n))return;if(n=t.get(n),x(n))return n;return}(s,t);if(L)return L.leading===s?(L.leading=l,void(L.list=[new w([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d),...L.list])):void L.list.splice(L.indexOf(t.get(s)),1,new w([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],l),new w([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d));const _=new O(l,[new w([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d)],[[r.Whitespace," ",-1,-1,void 0]]),b=function(e,t,n){let r=e;if(!r)return;if(r=n.get(r),!T(r))return;const i=r;if(r=n.get(r),!I(r))return;if(r!==t)return;return i}(s,e,t);b?b.media=_:s.media=new W(new g(new W(_),[[r.Whitespace," ",-1,-1,void 0],[r.OpenParen,"(",-1,-1,void 0]],[[r.CloseParen,")",-1,-1,void 0]]))})),e.toString()})).join(",")}const N=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const n=E(e.params);e.params!==n&&(e.cloneBefore({params:n}),t.preserve||e.remove())}}}};N.postcss=!0;export{N as default}; diff --git a/dist/transform-single-pair.d.ts b/dist/transform-single-pair.d.ts new file mode 100644 index 0000000..70dc850 --- /dev/null +++ b/dist/transform-single-pair.d.ts @@ -0,0 +1,2 @@ +import { MediaFeature, MediaFeatureComparison, MediaFeatureValue } from '@csstools/media-query-list-parser'; +export declare function transformSingleNameValuePair(name: string, operator: MediaFeatureComparison, value: MediaFeatureValue, nameBeforeValue: boolean): MediaFeature | null; diff --git a/dist/transform.d.ts b/dist/transform.d.ts new file mode 100644 index 0000000..7e90004 --- /dev/null +++ b/dist/transform.d.ts @@ -0,0 +1 @@ +export declare function transform(mediaQueryListString: string): string; diff --git a/index.js b/index.js deleted file mode 100644 index 6845243..0000000 --- a/index.js +++ /dev/null @@ -1,122 +0,0 @@ -const feature_unit = { - 'width': 'px', - 'height': 'px', - 'device-width': 'px', - 'device-height': 'px', - 'aspect-ratio': '', - 'device-aspect-ratio': '', - 'color': '', - 'color-index': '', - 'monochrome': '', - 'resolution': 'dpi' -}; - -// Supported min-/max- attributes -const feature_name = Object.keys(feature_unit); - -const step = .001; // smallest even number that won’t break complex queries (1in = 96px) - -const power = { - '>': 1, - '<': -1 -}; - -const minmax = { - '>': 'min', - '<': 'max' -}; - -function create_query(name, gtlt, eq, value) { - return value.replace(/([-\d\.]+)(.*)/, function (_match, number, unit) { - const initialNumber = parseFloat(number); - - if (parseFloat(number) || eq) { - // if eq is true, then number remains same - if (!eq) { - // change integer pixels value only on integer pixel - if (unit === 'px' && initialNumber === parseInt(number, 10)) { - number = initialNumber + power[gtlt]; - } else { - number = Number(Math.round(parseFloat(number) + step * power[gtlt] + 'e6')+'e-6'); - } - } - } else { - number = power[gtlt] + feature_unit[name]; - } - - return '(' + minmax[gtlt] + '-' + name + ': ' + number + unit + ')'; - }); -} - -function transform(rule) { - /** - * 转换 <|>= - * $1 $2 $3 - * (width >= 300px) => (min-width: 300px) - * (width <= 900px) => (max-width: 900px) - */ - - if (!rule.params.includes('<') && !rule.params.includes('>')) { - return - } - - // The value doesn't support negative values - // But -0 is always equivalent to 0 in CSS, and so is also accepted as a valid value. - - rule.params = rule.params.replace(/\(\s*([a-z-]+?)\s*([<>])(=?)\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*\)/gi, function($0, $1, $2, $3, $4) { - if (feature_name.indexOf($1) > -1) { - return create_query($1, $2, $3, $4); - } - // If it is not the specified attribute, don't replace - return $0; - }) - - /** - * 转换 <|<= <|<= - * 转换 >|>= >|>= - * $1 $2$3 $4 $5$6 $7 - * (500px <= width <= 1200px) => (min-width: 500px) and (max-width: 1200px) - * (500px < width <= 1200px) => (min-width: 501px) and (max-width: 1200px) - * (900px >= width >= 300px) => (min-width: 300px) and (max-width: 900px) - */ - - rule.params = rule.params.replace(/\(\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*(<|>)(=?)\s*([a-z-]+)\s*(<|>)(=?)\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*\)/gi, function($0, $1, $2, $3, $4, $5, $6, $7) { - - if (feature_name.indexOf($4) > -1) { - if ($2 === '<' && $5 === '<' || $2 === '>' && $5 === '>') { - const min = ($2 === '<') ? $1 : $7; - const max = ($2 === '<') ? $7 : $1; - - // output differently depended on expression direction - // <|<= <|<= - // or - // >|>= >|>= - let equals_for_min = $3; - let equals_for_max = $6; - - if ($2 === '>') { - equals_for_min = $6; - equals_for_max = $3; - } - - return create_query($4, '>', equals_for_min, min) + ' and ' + create_query($4, '<', equals_for_max, max); - } - } - // If it is not the specified attribute, don't replace - return $0; - }); -} - -module.exports = () => ({ - postcssPlugin: 'postcss-media-minmax', - AtRule: { - media: (atRule) => { - transform(atRule); - }, - 'custom-media': (atRule) => { - transform(atRule); - }, - }, -}); - -module.exports.postcss = true diff --git a/package.json b/package.json index 84eb249..7debb68 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "5.0.0", "description": "Using more intuitive `>=`, `<=`, `>`, `<` instead of media queries min/max prefix.", "scripts": { + "build": "rollup -c ./rollup/default.mjs", "test": "tape test" }, "repository": "https://github.com/postcss/postcss-media-minmax.git", @@ -16,21 +17,48 @@ ], "author": "yisi", "license": "MIT", + "main": "dist/index.cjs", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.cjs", + "default": "./dist/index.mjs" + } + }, "files": [ "CHANGELOG.md", "README.md", "README-zh.md", "LICENSE", - "index.js" + "dist" ], "engines": { "node": ">=10.0.0" }, + "dependencies": { + "@csstools/css-parser-algorithms": "^1.0.0", + "@csstools/css-tokenizer": "^1.0.0", + "@csstools/media-query-list-parser": "^1.0.0" + }, "peerDependencies": { "postcss": "8.4.5" }, "devDependencies": { + "@babel/core": "^7.19.3", + "@babel/preset-env": "^7.19.3", + "@rollup/plugin-babel": "^6.0.0", + "@rollup/plugin-commonjs": "^23.0.0", + "@rollup/plugin-node-resolve": "^15.0.0", + "@rollup/plugin-terser": "^0.1.0", + "@rollup/plugin-typescript": "^9.0.0", + "@types/node": "^18.11.9", + "eslint": "^8.25.0", "postcss": "8.4.5", - "tape": "^5.3.1" + "rollup": "^3.0.0", + "tape": "^5.3.1", + "tslib": "^2.4.1", + "typescript": "^4.8.4" } } diff --git a/rollup/configs/babel-presets.mjs b/rollup/configs/babel-presets.mjs new file mode 100644 index 0000000..0fd75be --- /dev/null +++ b/rollup/configs/babel-presets.mjs @@ -0,0 +1,8 @@ +export const packageBabelPreset = [ + ['@babel/preset-env', { + loose: true, + modules: false, + targets: { node: 10 }, + useBuiltIns: false, + }], +]; diff --git a/rollup/configs/externals.mjs b/rollup/configs/externals.mjs new file mode 100644 index 0000000..011fd99 --- /dev/null +++ b/rollup/configs/externals.mjs @@ -0,0 +1,6 @@ +export const externalsForPlugin = [ + 'postcss', + '@csstools/css-parser-algorithms', + '@csstools/css-tokenizer', + '@csstools/media-query-list-parser', +]; diff --git a/rollup/default.mjs b/rollup/default.mjs new file mode 100644 index 0000000..98d4ab3 --- /dev/null +++ b/rollup/default.mjs @@ -0,0 +1,28 @@ +import babel from '@rollup/plugin-babel'; +import terser from '@rollup/plugin-terser'; +import typescript from '@rollup/plugin-typescript'; +import { externalsForPlugin } from './configs/externals.mjs'; +import { packageBabelPreset } from './configs/babel-presets.mjs'; + +export default [ + { + input: 'src/index.ts', + output: [ + { file: 'dist/index.cjs', format: 'cjs', sourcemap: false, exports: 'auto' }, + { file: 'dist/index.mjs', format: 'esm', sourcemap: false, exports: 'auto' }, + ], + external: externalsForPlugin, + plugins: [ + typescript({ tsconfig: './tsconfig.json' }), + babel({ + babelHelpers: 'bundled', + exclude: 'node_modules/**', + extensions: ['.js', '.ts'], + presets: packageBabelPreset, + }), + terser({ + keep_classnames: true, + }), + ], + }, +]; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..20617e8 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,43 @@ +import type { PluginCreator } from 'postcss'; +import { transform } from './transform'; + +type pluginOptions = { preserve?: boolean }; + +const creator: PluginCreator = (opts?: pluginOptions) => { + const options = Object.assign( + // Default options + { + preserve: false, + }, + // Provided options + opts, + ); + + return { + postcssPlugin: 'postcss-media-minmax', + AtRule: { + media: (atRule) => { + if (!(atRule.params.includes('<') || atRule.params.includes('>') || atRule.params.includes('='))) { + return; + } + + const transformed = transform(atRule.params); + if (atRule.params === transformed) { + return; + } + + atRule.cloneBefore({ + params: transformed, + }); + + if (!options.preserve) { + atRule.remove(); + } + }, + }, + }; +}; + +creator.postcss = true; + +export default creator; diff --git a/src/transform-single-pair.ts b/src/transform-single-pair.ts new file mode 100644 index 0000000..4f4b988 --- /dev/null +++ b/src/transform-single-pair.ts @@ -0,0 +1,147 @@ +import { ComponentValue, isFunctionNode, isTokenNode } from '@csstools/css-parser-algorithms'; +import { NumberType, TokenType } from '@csstools/css-tokenizer'; +import { invertComparison, matchesRatioExactly, MediaFeature, MediaFeatureComparison, MediaFeatureEQ, MediaFeatureGT, MediaFeatureLT, MediaFeatureValue, newMediaFeaturePlain } from '@csstools/media-query-list-parser'; + +const unitsForFeature = { + 'width': 'px', + 'height': 'px', + 'device-width': 'px', + 'device-height': 'px', + 'aspect-ratio': '', + 'device-aspect-ratio': '', + 'color': '', + 'color-index': '', + 'monochrome': '', + 'resolution': 'dpi', +}; + +function featureNamePrefix(operator: MediaFeatureComparison) { + if (operator === MediaFeatureLT.LT || operator === MediaFeatureLT.LT_OR_EQ) { + return 'max-'; + } + + if (operator === MediaFeatureGT.GT || operator === MediaFeatureGT.GT_OR_EQ) { + return 'min-'; + } + + return ''; +} + +const power = { + '>': 1, + '<': -1, +}; + +const step = .001; // smallest even number that won’t break complex queries (1in = 96px) + +export function transformSingleNameValuePair(name: string, operator: MediaFeatureComparison, value: MediaFeatureValue, nameBeforeValue: boolean): MediaFeature | null { + if (!nameBeforeValue) { + const invertedOperator = invertComparison(operator); + if (invertedOperator === false) { + return; + } + + operator = invertedOperator; + } + + if (operator === MediaFeatureEQ.EQ || operator === MediaFeatureLT.LT_OR_EQ || operator === MediaFeatureGT.GT_OR_EQ) { + const transformed = newMediaFeaturePlain( + featureNamePrefix(operator) + name, + ...value.tokens(), + ); + + return transformed; + } + + if (Array.isArray(value.value) && matchesRatioExactly(value.value)) { + // TODO : handle ratio + return; + } + + let valueNode: ComponentValue; + if (Array.isArray(value.value)) { + valueNode = value.value.find((x) => { + return isFunctionNode(x) || isTokenNode(x); + }); + } else { + valueNode = value.value; + } + + if (isFunctionNode(valueNode) && valueNode.nameTokenValue().toLowerCase() === 'calc') { + let valueToken; + if (unitsForFeature[name.toLowerCase()]) { + const tokenValue = power[operator]; + const tokenUnit = unitsForFeature[name.toLowerCase()]; + + valueToken = [TokenType.Dimension, `${tokenValue.toString()}${tokenUnit}`, -1, -1, { value: tokenValue, unit: tokenUnit, type: NumberType.Integer }]; + } else { + const tokenValue = power[operator]; + + valueToken = [TokenType.Number, tokenValue.toString(), -1, -1, { value: tokenValue, type: NumberType.Integer }]; + } + + const transformed = newMediaFeaturePlain( + featureNamePrefix(operator) + name, + [TokenType.Function, 'calc(', -1, -1, { value: 'calc(' }], + [TokenType.OpenParen, '(', -1, -1, undefined], + ...valueNode.tokens().slice(1), + [TokenType.Whitespace, ' ', -1, -1, undefined], + [TokenType.Delim, '+', -1, -1, undefined], + [TokenType.Whitespace, ' ', -1, -1, undefined], + valueToken, + [TokenType.CloseParen, ')', -1, -1, undefined], + ); + + return transformed; + } else if (isTokenNode(valueNode)) { + let token = valueNode.value; + let tokenValue: number; + let tokenUnit: string | false = false; + + if ((token[0] === TokenType.Dimension || token[0] === TokenType.Number) && token[4].value === 0) { + // Zero values: + // - convert to "1" or "-1" + // - assign a unit when needed + tokenValue = power[operator]; + tokenUnit = unitsForFeature[name.toLowerCase()]; + } else if (token[0] === TokenType.Dimension && token[4].unit === 'px' && token[4].type === NumberType.Integer) { + // Integer pixel values + // - add "+1" or "-1" + tokenValue = token[4].value + power[operator]; + } else if (token[0] === TokenType.Dimension || token[0] === TokenType.Number) { + // Float or non-pixel values + // - add "+step" or "-step" + tokenValue = Number(Math.round(Number(token[4].value + step * power[operator] + 'e6')) + 'e-6'); + } else { + return; + } + + if (tokenUnit !== false) { + token = [ + TokenType.Dimension, + token[1], + token[2], + token[3], + { + value: token[4].value, + unit: tokenUnit, + type: token[4].type, + }, + ]; + } + + token[4].value = tokenValue; + if (token[0] === TokenType.Dimension) { + token[1] = token[4].value.toString() + token[4].unit; + } else { + token[1] = token[4].value.toString(); + } + + const transformed = newMediaFeaturePlain( + featureNamePrefix(operator) + name, + token, + ); + + return transformed; + } +} diff --git a/src/transform.ts b/src/transform.ts new file mode 100644 index 0000000..b491c2c --- /dev/null +++ b/src/transform.ts @@ -0,0 +1,245 @@ +import { gatherNodeAncestry } from '@csstools/css-parser-algorithms'; +import { TokenType } from '@csstools/css-tokenizer'; +import { isMediaAnd, isMediaCondition, isMediaConditionListWithAnd, isMediaFeature, isMediaFeatureRange, isMediaFeatureRangeNameValue, isMediaFeatureRangeValueName, isMediaInParens, isMediaQuery, MediaAnd, MediaCondition, MediaConditionListWithAnd, MediaFeature, MediaInParens, MediaQuery, parse } from '@csstools/media-query-list-parser'; +import { transformSingleNameValuePair } from './transform-single-pair'; + +const supportedFeatureNames = new Set([ + 'aspect-ratio', + 'color', + 'color-index', + 'device-aspect-ratio', + 'device-height', + 'device-width', + 'height', + 'horizontal-viewport-segments', + 'monochrome', + 'resolution', + 'vertical-viewport-segments', + 'width', +]); + +export function transform(mediaQueryListString: string) { + const mediaQueries = parse(mediaQueryListString, { + preserveInvalidMediaQueries: true, + onParseError: () => { + throw new Error(`Unable to parse media query "${mediaQueryListString}"`); + }, + }); + + return mediaQueries.map((mediaQuery) => { + const ancestry = gatherNodeAncestry(mediaQuery); + + mediaQuery.walk((entry) => { + const node = entry.node; + if (!isMediaFeatureRange(node)) { + return; + } + + const parent = entry.parent; + if (!isMediaFeature(parent)) { + return; + } + + const name = node.name.getName(); + if (!supportedFeatureNames.has(name.toLowerCase())) { + return; + } + + if (isMediaFeatureRangeNameValue(node) || isMediaFeatureRangeValueName(node)) { + const operator = node.operatorKind(); + if (operator === false) { + return; + } + + const transformed = transformSingleNameValuePair(name, operator, node.value, isMediaFeatureRangeNameValue(node)); + if (transformed) { + parent.feature = transformed.feature; + } + + return; + } + + const grandParent: unknown | MediaInParens = ancestry.get(parent); + if (!isMediaInParens(grandParent)) { + return; + } + + let featureOne: MediaFeature | null = null; + let featureTwo: MediaFeature | null = null; + { + const operator = node.valueOneOperatorKind(); + if (operator === false) { + return; + } + + const transformed = transformSingleNameValuePair(name, operator, node.valueOne, false); + if (!transformed) { + return; + } + + featureOne = transformed; + } + + { + const operator = node.valueTwoOperatorKind(); + if (operator === false) { + return; + } + + const transformed = transformSingleNameValuePair(name, operator, node.valueTwo, true); + if (!transformed) { + return; + } + + featureTwo = transformed; + } + + const parensOne = new MediaInParens( + featureOne, + ); + + const parensTwo = new MediaInParens( + featureTwo, + ); + + // ((color) and (300px < width < 400px)) + // ((300px < width < 400px) and (color)) + const andList = getMediaConditionListWithAndFromAncestry(grandParent, ancestry); + if (andList) { + if (andList.leading === grandParent) { + andList.leading = parensOne; + + andList.list = [ + new MediaAnd( + [ + [TokenType.Whitespace, ' ', -1, -1, undefined], + [TokenType.Ident, 'and', -1, -1, { value: 'and' }], + [TokenType.Whitespace, ' ', -1, -1, undefined], + ], + parensTwo, + ), + ...andList.list, + ]; + + return; + } + + andList.list.splice( + andList.indexOf(ancestry.get(grandParent) as MediaAnd) as number, + 1, + new MediaAnd( + [ + [TokenType.Whitespace, ' ', -1, -1, undefined], + [TokenType.Ident, 'and', -1, -1, { value: 'and' }], + [TokenType.Whitespace, ' ', -1, -1, undefined], + ], + parensOne, + ), + new MediaAnd( + [ + [TokenType.Whitespace, ' ', -1, -1, undefined], + [TokenType.Ident, 'and', -1, -1, { value: 'and' }], + [TokenType.Whitespace, ' ', -1, -1, undefined], + ], + parensTwo, + ), + ); + + return; + } + + const conditionList = new MediaConditionListWithAnd( + parensOne, + [ + new MediaAnd( + [ + [TokenType.Whitespace, ' ', -1, -1, undefined], + [TokenType.Ident, 'and', -1, -1, { value: 'and' }], + [TokenType.Whitespace, ' ', -1, -1, undefined], + ], + parensTwo, + ), + ], + [ + [TokenType.Whitespace, ' ', -1, -1, undefined], + ], + ); + + // @media screen and (300px < width < 400px) + // @media (300px < width < 400px) + const conditionInShallowQuery = getMediaConditionInShallowMediaQueryFromAncestry(grandParent, mediaQuery, ancestry); + if (conditionInShallowQuery) { + conditionInShallowQuery.media = conditionList; + return; + } + + // Remaining (more complex) cases. + // Wrapped in extra parens. + grandParent.media = new MediaCondition( + new MediaInParens( + new MediaCondition( + conditionList, + ), + [ + [TokenType.Whitespace, ' ', -1, -1, undefined], + [TokenType.OpenParen, '(', -1, -1, undefined], + ], + [ + [TokenType.CloseParen, ')', -1, -1, undefined], + ], + ), + ); + }); + + return mediaQuery.toString(); + }).join(','); +} + +function getMediaConditionListWithAndFromAncestry(mediaInParens: MediaInParens, ancestry: Map): MediaConditionListWithAnd | null { + let focus: unknown = mediaInParens; + if (!focus) { + return; + } + + focus = ancestry.get(focus); + if (isMediaConditionListWithAnd(focus)) { + return focus; + } + + focus = ancestry.get(focus); + if (!isMediaAnd(focus)) { + return; + } + + focus = ancestry.get(focus); + if (isMediaConditionListWithAnd(focus)) { + return focus; + } + + return; +} + +function getMediaConditionInShallowMediaQueryFromAncestry(mediaInParens: MediaInParens, mediaQuery: MediaQuery, ancestry: Map): MediaCondition | null { + let focus: unknown = mediaInParens; + if (!focus) { + return; + } + + focus = ancestry.get(focus); + if (!isMediaCondition(focus)) { + return; + } + + const condition = focus; + + focus = ancestry.get(focus); + if (!isMediaQuery(focus)) { + return; + } + + if (focus !== mediaQuery) { + return; + } + + return condition; +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..e795a22 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "allowJs": false, + "allowSyntheticDefaultImports": true, + "declaration": true, + "declarationDir": ".", + "lib": ["ES2022"], + "module": "ES2022", + "moduleResolution": "node", + "outDir": "dist", + "target": "ES2022", + }, + "include": ["./src/**/*"], + "exclude": ["dist"], +} diff --git a/yarn.lock b/yarn.lock index 1618ac8..87ba755 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,14 +2,1145 @@ # yarn lockfile v1 +"@ampproject/remapping@^2.1.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" + integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== + dependencies: + "@jridgewell/gen-mapping" "^0.1.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.0", "@babel/compat-data@^7.20.1": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30" + integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ== + +"@babel/core@^7.19.3": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" + integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.20.2" + "@babel/helper-compilation-targets" "^7.20.0" + "@babel/helper-module-transforms" "^7.20.2" + "@babel/helpers" "^7.20.1" + "@babel/parser" "^7.20.2" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.20.1" + "@babel/types" "^7.20.2" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + +"@babel/generator@^7.20.1", "@babel/generator@^7.20.2": + version "7.20.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8" + integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA== + dependencies: + "@babel/types" "^7.20.2" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + +"@babel/helper-annotate-as-pure@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" + integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" + integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.18.6" + "@babel/types" "^7.18.9" + +"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a" + integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== + dependencies: + "@babel/compat-data" "^7.20.0" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.21.3" + semver "^6.3.0" + +"@babel/helper-create-class-features-plugin@^7.18.6": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz#3c08a5b5417c7f07b5cf3dfb6dc79cbec682e8c2" + integrity sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-replace-supers" "^7.19.1" + "@babel/helper-split-export-declaration" "^7.18.6" + +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz#7976aca61c0984202baca73d84e2337a5424a41b" + integrity sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + regexpu-core "^5.1.0" + +"@babel/helper-define-polyfill-provider@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz#8612e55be5d51f0cd1f36b4a5a83924e89884b7a" + integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== + dependencies: + "@babel/helper-compilation-targets" "^7.17.7" + "@babel/helper-plugin-utils" "^7.16.7" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + semver "^6.1.2" + +"@babel/helper-environment-visitor@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" + integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== + +"@babel/helper-explode-assignable-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" + integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" + integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== + dependencies: + "@babel/template" "^7.18.10" + "@babel/types" "^7.19.0" + +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-member-expression-to-functions@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815" + integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg== + dependencies: + "@babel/types" "^7.18.9" + +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.19.6", "@babel/helper-module-transforms@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712" + integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.20.2" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.19.1" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.20.1" + "@babel/types" "^7.20.2" + +"@babel/helper-optimise-call-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" + integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" + integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== + +"@babel/helper-remap-async-to-generator@^7.18.6", "@babel/helper-remap-async-to-generator@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" + integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-wrap-function" "^7.18.9" + "@babel/types" "^7.18.9" + +"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz#e1592a9b4b368aa6bdb8784a711e0bcbf0612b78" + integrity sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/traverse" "^7.19.1" + "@babel/types" "^7.19.0" + +"@babel/helper-simple-access@^7.19.4", "@babel/helper-simple-access@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" + integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== + dependencies: + "@babel/types" "^7.20.2" + +"@babel/helper-skip-transparent-expression-wrappers@^7.18.9": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" + integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== + dependencies: + "@babel/types" "^7.20.0" + +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-string-parser@^7.19.4": + version "7.19.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" + integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== + +"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== + +"@babel/helper-wrap-function@^7.18.9": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz#89f18335cff1152373222f76a4b37799636ae8b1" + integrity sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg== + dependencies: + "@babel/helper-function-name" "^7.19.0" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" + +"@babel/helpers@^7.20.1": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9" + integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg== + dependencies: + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.20.1" + "@babel/types" "^7.20.0" + +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2": + version "7.20.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" + integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" + integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz#a11af19aa373d68d561f08e0a57242350ed0ec50" + integrity sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" + "@babel/plugin-proposal-optional-chaining" "^7.18.9" + +"@babel/plugin-proposal-async-generator-functions@^7.20.1": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.1.tgz#352f02baa5d69f4e7529bdac39aaa02d41146af9" + integrity sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-remap-async-to-generator" "^7.18.9" + "@babel/plugin-syntax-async-generators" "^7.8.4" + +"@babel/plugin-proposal-class-properties@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" + integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-class-static-block@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz#8aa81d403ab72d3962fc06c26e222dacfc9b9020" + integrity sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + +"@babel/plugin-proposal-dynamic-import@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" + integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + +"@babel/plugin-proposal-export-namespace-from@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" + integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + +"@babel/plugin-proposal-json-strings@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" + integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-json-strings" "^7.8.3" + +"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz#8148cbb350483bf6220af06fa6db3690e14b2e23" + integrity sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" + integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-proposal-numeric-separator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" + integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-proposal-object-rest-spread@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz#a556f59d555f06961df1e572bb5eca864c84022d" + integrity sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ== + dependencies: + "@babel/compat-data" "^7.20.1" + "@babel/helper-compilation-targets" "^7.20.0" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.20.1" + +"@babel/plugin-proposal-optional-catch-binding@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" + integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + +"@babel/plugin-proposal-optional-chaining@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz#e8e8fe0723f2563960e4bf5e9690933691915993" + integrity sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-proposal-private-methods@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" + integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-private-property-in-object@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz#a64137b232f0aca3733a67eb1a144c192389c503" + integrity sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + +"@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" + integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-import-assertions@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" + integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== + dependencies: + "@babel/helper-plugin-utils" "^7.19.0" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-arrow-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz#19063fcf8771ec7b31d742339dac62433d0611fe" + integrity sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-async-to-generator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz#ccda3d1ab9d5ced5265fdb13f1882d5476c71615" + integrity sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag== + dependencies: + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-remap-async-to-generator" "^7.18.6" + +"@babel/plugin-transform-block-scoped-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" + integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-block-scoping@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz#f59b1767e6385c663fd0bce655db6ca9c8b236ed" + integrity sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ== + dependencies: + "@babel/helper-plugin-utils" "^7.20.2" + +"@babel/plugin-transform-classes@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz#c0033cf1916ccf78202d04be4281d161f6709bb2" + integrity sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-compilation-targets" "^7.20.0" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-replace-supers" "^7.19.1" + "@babel/helper-split-export-declaration" "^7.18.6" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz#2357a8224d402dad623caf6259b611e56aec746e" + integrity sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + +"@babel/plugin-transform-destructuring@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz#c23741cfa44ddd35f5e53896e88c75331b8b2792" + integrity sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw== + dependencies: + "@babel/helper-plugin-utils" "^7.20.2" + +"@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" + integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-duplicate-keys@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" + integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + +"@babel/plugin-transform-exponentiation-operator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" + integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-for-of@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" + integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-function-name@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" + integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== + dependencies: + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-plugin-utils" "^7.18.9" + +"@babel/plugin-transform-literals@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" + integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + +"@babel/plugin-transform-member-expression-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" + integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-modules-amd@^7.19.6": + version "7.19.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.19.6.tgz#aca391801ae55d19c4d8d2ebfeaa33df5f2a2cbd" + integrity sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg== + dependencies: + "@babel/helper-module-transforms" "^7.19.6" + "@babel/helper-plugin-utils" "^7.19.0" + +"@babel/plugin-transform-modules-commonjs@^7.19.6": + version "7.19.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz#25b32feef24df8038fc1ec56038917eacb0b730c" + integrity sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ== + dependencies: + "@babel/helper-module-transforms" "^7.19.6" + "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-simple-access" "^7.19.4" + +"@babel/plugin-transform-modules-systemjs@^7.19.6": + version "7.19.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.6.tgz#59e2a84064b5736a4471b1aa7b13d4431d327e0d" + integrity sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ== + dependencies: + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-module-transforms" "^7.19.6" + "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-validator-identifier" "^7.19.1" + +"@babel/plugin-transform-modules-umd@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" + integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== + dependencies: + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz#ec7455bab6cd8fb05c525a94876f435a48128888" + integrity sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.19.0" + "@babel/helper-plugin-utils" "^7.19.0" + +"@babel/plugin-transform-new-target@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" + integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-object-super@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" + integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.6" + +"@babel/plugin-transform-parameters@^7.20.1": + version "7.20.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.3.tgz#7b3468d70c3c5b62e46be0a47b6045d8590fb748" + integrity sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA== + dependencies: + "@babel/helper-plugin-utils" "^7.20.2" + +"@babel/plugin-transform-property-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" + integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-regenerator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz#585c66cb84d4b4bf72519a34cfce761b8676ca73" + integrity sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + regenerator-transform "^0.15.0" + +"@babel/plugin-transform-reserved-words@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" + integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-shorthand-properties@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" + integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-spread@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz#dd60b4620c2fec806d60cfaae364ec2188d593b6" + integrity sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w== + dependencies: + "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" + +"@babel/plugin-transform-sticky-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" + integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-template-literals@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" + integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + +"@babel/plugin-transform-typeof-symbol@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" + integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + +"@babel/plugin-transform-unicode-escapes@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" + integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + +"@babel/plugin-transform-unicode-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" + integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/preset-env@^7.19.3": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.20.2.tgz#9b1642aa47bb9f43a86f9630011780dab7f86506" + integrity sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg== + dependencies: + "@babel/compat-data" "^7.20.1" + "@babel/helper-compilation-targets" "^7.20.0" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" + "@babel/plugin-proposal-async-generator-functions" "^7.20.1" + "@babel/plugin-proposal-class-properties" "^7.18.6" + "@babel/plugin-proposal-class-static-block" "^7.18.6" + "@babel/plugin-proposal-dynamic-import" "^7.18.6" + "@babel/plugin-proposal-export-namespace-from" "^7.18.9" + "@babel/plugin-proposal-json-strings" "^7.18.6" + "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" + "@babel/plugin-proposal-numeric-separator" "^7.18.6" + "@babel/plugin-proposal-object-rest-spread" "^7.20.2" + "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" + "@babel/plugin-proposal-optional-chaining" "^7.18.9" + "@babel/plugin-proposal-private-methods" "^7.18.6" + "@babel/plugin-proposal-private-property-in-object" "^7.18.6" + "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-import-assertions" "^7.20.0" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-transform-arrow-functions" "^7.18.6" + "@babel/plugin-transform-async-to-generator" "^7.18.6" + "@babel/plugin-transform-block-scoped-functions" "^7.18.6" + "@babel/plugin-transform-block-scoping" "^7.20.2" + "@babel/plugin-transform-classes" "^7.20.2" + "@babel/plugin-transform-computed-properties" "^7.18.9" + "@babel/plugin-transform-destructuring" "^7.20.2" + "@babel/plugin-transform-dotall-regex" "^7.18.6" + "@babel/plugin-transform-duplicate-keys" "^7.18.9" + "@babel/plugin-transform-exponentiation-operator" "^7.18.6" + "@babel/plugin-transform-for-of" "^7.18.8" + "@babel/plugin-transform-function-name" "^7.18.9" + "@babel/plugin-transform-literals" "^7.18.9" + "@babel/plugin-transform-member-expression-literals" "^7.18.6" + "@babel/plugin-transform-modules-amd" "^7.19.6" + "@babel/plugin-transform-modules-commonjs" "^7.19.6" + "@babel/plugin-transform-modules-systemjs" "^7.19.6" + "@babel/plugin-transform-modules-umd" "^7.18.6" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.1" + "@babel/plugin-transform-new-target" "^7.18.6" + "@babel/plugin-transform-object-super" "^7.18.6" + "@babel/plugin-transform-parameters" "^7.20.1" + "@babel/plugin-transform-property-literals" "^7.18.6" + "@babel/plugin-transform-regenerator" "^7.18.6" + "@babel/plugin-transform-reserved-words" "^7.18.6" + "@babel/plugin-transform-shorthand-properties" "^7.18.6" + "@babel/plugin-transform-spread" "^7.19.0" + "@babel/plugin-transform-sticky-regex" "^7.18.6" + "@babel/plugin-transform-template-literals" "^7.18.9" + "@babel/plugin-transform-typeof-symbol" "^7.18.9" + "@babel/plugin-transform-unicode-escapes" "^7.18.10" + "@babel/plugin-transform-unicode-regex" "^7.18.6" + "@babel/preset-modules" "^0.1.5" + "@babel/types" "^7.20.2" + babel-plugin-polyfill-corejs2 "^0.3.3" + babel-plugin-polyfill-corejs3 "^0.6.0" + babel-plugin-polyfill-regenerator "^0.4.1" + core-js-compat "^3.25.1" + semver "^6.3.0" + +"@babel/preset-modules@^0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" + integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/runtime@^7.8.4": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9" + integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg== + dependencies: + regenerator-runtime "^0.13.10" + +"@babel/template@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" + integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" + +"@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.20.1": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8" + integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.20.1" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.20.1" + "@babel/types" "^7.20.0" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.4.4": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" + integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== + dependencies: + "@babel/helper-string-parser" "^7.19.4" + "@babel/helper-validator-identifier" "^7.19.1" + to-fast-properties "^2.0.0" + +"@csstools/css-parser-algorithms@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-1.0.0.tgz#63f0ecbb926abf92d6cd8d076663650ad340db8c" + integrity sha512-lPphY34yfV15tEXiz/SYaU8hwqAhbAwqiTExv5tOfc7QZxT70VVYrsiPBaX1osdWZFowrDEAhHe4H3JnyzbjhA== + +"@csstools/css-tokenizer@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-1.0.0.tgz#161c0c9b632952ee8c2f0a62eb479d736a5627ff" + integrity sha512-xdFjdQ+zqqkOsmee+kYRieZD9Cqh4hr01YBQ2/8NtTkMMxbtRX18MC50LX6cMrtaLryqmIdZHN9e16/l0QqnQw== + +"@csstools/media-query-list-parser@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-1.0.0.tgz#17d08bfbcca677fc018e3dc3f54172a38c2fdca5" + integrity sha512-HsTj5ejI8NKKZ4IEd6kK2kQZA/JmIVlUV8+XvO/YS9ntrlYPnbmFT3rkqtbxOVfEafblYCNOpeNw1c+fKGkAqw== + +"@eslint/eslintrc@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" + integrity sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.4.0" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@humanwhocodes/config-array@^0.11.6": + version "0.11.7" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.7.tgz#38aec044c6c828f6ed51d5d7ae3d9b9faf6dbb0f" + integrity sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@jridgewell/gen-mapping@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" + integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/source-map@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" + integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.17" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" + integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== + dependencies: + "@jridgewell/resolve-uri" "3.1.0" + "@jridgewell/sourcemap-codec" "1.4.14" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@rollup/plugin-babel@^6.0.0": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-6.0.2.tgz#92ad7a00cc0e4a6b59e1498cda9f907a9c0d2db3" + integrity sha512-Vnt8XIWYwCf3MD7qhBWYlP9pjSZvcE++nlPXhQYw6YNehl5742AzFbrV6h4BHb20VAOVUlIksVLymQCTwVCGDg== + dependencies: + "@babel/helper-module-imports" "^7.18.6" + "@rollup/pluginutils" "^5.0.1" + +"@rollup/plugin-commonjs@^23.0.0": + version "23.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.2.tgz#3a3a5b7b1b1cb29037eb4992edcaae997d7ebd92" + integrity sha512-e9ThuiRf93YlVxc4qNIurvv+Hp9dnD+4PjOqQs5vAYfcZ3+AXSrcdzXnVjWxcGQOa6KGJFcRZyUI3ktWLavFjg== + dependencies: + "@rollup/pluginutils" "^5.0.1" + commondir "^1.0.1" + estree-walker "^2.0.2" + glob "^8.0.3" + is-reference "1.2.1" + magic-string "^0.26.4" + +"@rollup/plugin-node-resolve@^15.0.0": + version "15.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.1.tgz#72be449b8e06f6367168d5b3cd5e2802e0248971" + integrity sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg== + dependencies: + "@rollup/pluginutils" "^5.0.1" + "@types/resolve" "1.20.2" + deepmerge "^4.2.2" + is-builtin-module "^3.2.0" + is-module "^1.0.0" + resolve "^1.22.1" + +"@rollup/plugin-terser@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz#7530c0f11667637419d71820461646c418526041" + integrity sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ== + dependencies: + terser "^5.15.1" + +"@rollup/plugin-typescript@^9.0.0": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-9.0.2.tgz#c0cdfa39e267f306ff7316405a35406d5821eaa7" + integrity sha512-/sS93vmHUMjzDUsl5scNQr1mUlNE1QjBBvOhmRwJCH8k2RRhDIm3c977B3wdu3t3Ap17W6dDeXP3hj1P1Un1bA== + dependencies: + "@rollup/pluginutils" "^5.0.1" + resolve "^1.22.1" + +"@rollup/pluginutils@^5.0.1": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" + integrity sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" + integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== + +"@types/node@^18.11.9": + version "18.11.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" + integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== + +"@types/resolve@1.20.2": + version "1.20.2" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" + integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.5.0, acorn@^8.8.0: + version "8.8.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" + integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array.prototype.every@^1.1.3: - version "1.1.3" - resolved "https://registry.npmmirror.com/array.prototype.every/-/array.prototype.every-1.1.3.tgz#31f01b48e1160bc4b49ecab246bf7f765c6686f9" - integrity sha512-vWnriJI//SOMOWtXbU/VXhJ/InfnNHPF6BLKn5WfY8xXy+NWql0fUy20GO3sdqBhCAO+qw8S/E5nJiZX+QFdCA== + version "1.1.4" + resolved "https://registry.yarnpkg.com/array.prototype.every/-/array.prototype.every-1.1.4.tgz#2762daecd9cec87cb63f3ca6be576817074a684e" + integrity sha512-Aui35iRZk1HHLRAyF7QP0KAnOnduaQ6fo6k1NVWfRc0xTs2AZ70ytlXvOmkC6Di4JmUs2Wv3DYzGtCQFSk5uGg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" + define-properties "^1.1.4" + es-abstract "^1.20.4" is-string "^1.0.7" available-typed-arrays@^1.0.5: @@ -17,10 +1148,34 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +babel-plugin-polyfill-corejs2@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" + integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== + dependencies: + "@babel/compat-data" "^7.17.7" + "@babel/helper-define-polyfill-provider" "^0.3.3" + semver "^6.1.1" + +babel-plugin-polyfill-corejs3@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz#56ad88237137eade485a71b52f72dbed57c6230a" + integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.3.3" + core-js-compat "^3.25.1" + +babel-plugin-polyfill-regenerator@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz#390f91c38d90473592ed43351e801a9d3e0fd747" + integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.3.3" + balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== brace-expansion@^1.1.7: version "1.1.11" @@ -30,6 +1185,33 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +browserslist@^4.21.3, browserslist@^4.21.4: + version "4.21.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" + integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== + dependencies: + caniuse-lite "^1.0.30001400" + electron-to-chromium "^1.4.251" + node-releases "^2.0.6" + update-browserslist-db "^1.0.9" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +builtin-modules@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -38,51 +1220,150 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +caniuse-lite@^1.0.30001400: + version "1.0.30001431" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz#e7c59bd1bc518fae03a4656be442ce6c4887a795" + integrity sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ== + +chalk@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +convert-source-map@^1.7.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" + integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== + +core-js-compat@^3.25.1: + version "3.26.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.26.1.tgz#0e710b09ebf689d719545ac36e49041850f943df" + integrity sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A== + dependencies: + browserslist "^4.21.4" + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" deep-equal@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.5.tgz#55cd2fe326d83f9cbf7261ef0e060b3f724c5cb9" - integrity sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw== + version "2.1.0" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.1.0.tgz#5ba60402cf44ab92c2c07f3f3312c3d857a0e1dd" + integrity sha512-2pxgvWu3Alv1PoWEyVg7HS8YhGlUFUV7N5oOvfL6d+7xAmLSemMwv/c8Zv/i9KFzxV5Kt5CAvQc70fLwVuf4UA== dependencies: - call-bind "^1.0.0" - es-get-iterator "^1.1.1" - get-intrinsic "^1.0.1" - is-arguments "^1.0.4" - is-date-object "^1.0.2" - is-regex "^1.1.1" + call-bind "^1.0.2" + es-get-iterator "^1.1.2" + get-intrinsic "^1.1.3" + is-arguments "^1.1.1" + is-date-object "^1.0.5" + is-regex "^1.1.4" isarray "^2.0.5" - object-is "^1.1.4" + object-is "^1.1.5" object-keys "^1.1.1" - object.assign "^4.1.2" - regexp.prototype.flags "^1.3.0" - side-channel "^1.0.3" - which-boxed-primitive "^1.0.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.4.3" + side-channel "^1.0.4" + which-boxed-primitive "^1.0.2" which-collection "^1.0.1" - which-typed-array "^1.1.2" + which-typed-array "^1.1.8" -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +deepmerge@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -define-properties@^1.1.4: +define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" - resolved "https://registry.npmmirror.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== dependencies: has-property-descriptors "^1.0.0" object-keys "^1.1.1" defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= + version "1.0.1" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.1.tgz#c0b9db27bfaffd95d6f61399419b893df0f91ebf" + integrity sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q== + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" dotignore@^0.1.2: version "0.1.2" @@ -91,60 +1372,42 @@ dotignore@^0.1.2: dependencies: minimatch "^3.0.4" -es-abstract@^1.18.5: - version "1.18.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.6.tgz#2c44e3ea7a6255039164d26559777a6d978cb456" - integrity sha512-kAeIT4cku5eNLNuUKhlmtuk1/TRZvQoYccn6TO0cSVdf1kzB0T7+dYuVK9MWM7l+/53W2Q8M7N2c6MQvhXFcUQ== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - is-callable "^1.2.4" - is-negative-zero "^2.0.1" - is-regex "^1.1.4" - is-string "^1.0.7" - object-inspect "^1.11.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" +electron-to-chromium@^1.4.251: + version "1.4.284" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" + integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== -es-abstract@^1.19.0, es-abstract@^1.19.5: - version "1.20.1" - resolved "https://registry.npmmirror.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" - integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== +es-abstract@^1.19.0, es-abstract@^1.20.4: + version "1.20.4" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861" + integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" function-bind "^1.1.1" function.prototype.name "^1.1.5" - get-intrinsic "^1.1.1" + get-intrinsic "^1.1.3" get-symbol-description "^1.0.0" has "^1.0.3" has-property-descriptors "^1.0.0" has-symbols "^1.0.3" internal-slot "^1.0.3" - is-callable "^1.2.4" + is-callable "^1.2.7" is-negative-zero "^2.0.2" is-regex "^1.1.4" is-shared-array-buffer "^1.0.2" is-string "^1.0.7" is-weakref "^1.0.2" - object-inspect "^1.12.0" + object-inspect "^1.12.2" object-keys "^1.1.1" - object.assign "^4.1.2" + object.assign "^4.1.4" regexp.prototype.flags "^1.4.3" + safe-regex-test "^1.0.0" string.prototype.trimend "^1.0.5" string.prototype.trimstart "^1.0.5" unbox-primitive "^1.0.2" -es-get-iterator@^1.1.1: +es-get-iterator@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7" integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== @@ -167,6 +1430,179 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +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" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.25.0: + version "8.27.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.27.0.tgz#d547e2f7239994ad1faa4bb5d84e5d809db7cf64" + integrity sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ== + dependencies: + "@eslint/eslintrc" "^1.3.3" + "@humanwhocodes/config-array" "^0.11.6" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.4.0" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.15.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-sdsl "^4.1.4" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + +espree@^9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" + integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estree-walker@^2.0.2: + 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: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +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" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flatted@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -174,15 +1610,15 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" @@ -191,7 +1627,7 @@ function-bind@^1.1.1: function.prototype.name@^1.1.5: version "1.1.5" - resolved "https://registry.npmmirror.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== dependencies: call-bind "^1.0.2" @@ -201,26 +1637,22 @@ function.prototype.name@^1.1.5: functions-have-names@^1.2.2: version "1.2.3" - resolved "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -get-intrinsic@^1.0.1, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-intrinsic@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49" - integrity sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" + integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== dependencies: function-bind "^1.1.1" has "^1.0.3" - has-symbols "^1.0.1" + has-symbols "^1.0.3" get-package-type@^0.1.0: version "0.1.0" @@ -235,9 +1667,16 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -glob@^7.2.0: +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7.1.3, glob@^7.2.3: version "7.2.3" - resolved "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -247,44 +1686,74 @@ glob@^7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -has-bigints@^1.0.1: +glob@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" + integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^13.15.0: + version "13.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== + dependencies: + type-fest "^0.20.2" + +gopd@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== -has-bigints@^1.0.2: +has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" - resolved "https://registry.npmmirror.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== has-dynamic-import@^2.0.1: version "2.0.1" - resolved "https://registry.npmmirror.com/has-dynamic-import/-/has-dynamic-import-2.0.1.tgz#9bca87846aa264f2ad224fcd014946f5e5182f52" + resolved "https://registry.yarnpkg.com/has-dynamic-import/-/has-dynamic-import-2.0.1.tgz#9bca87846aa264f2ad224fcd014946f5e5182f52" integrity sha512-X3fbtsZmwb6W7fJGR9o7x65fZoodygCrZ3TVycvghP62yYQfS0t4RS0Qcz+j5tQYUKeSWS09tHkWW6WhFV3XhQ== dependencies: call-bind "^1.0.2" get-intrinsic "^1.1.1" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-property-descriptors@^1.0.0: version "1.0.0" - resolved "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== dependencies: get-intrinsic "^1.1.1" -has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - -has-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== - -has-symbols@^1.0.3: +has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" - resolved "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== has-tostringtag@^1.0.0: @@ -301,10 +1770,28 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" @@ -323,14 +1810,7 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== - dependencies: - call-bind "^1.0.0" - -is-arguments@^1.1.0: +is-arguments@^1.1.0, is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== @@ -353,63 +1833,77 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-callable@^1.1.3, is-callable@^1.1.4: - version "1.2.2" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" - integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== +is-builtin-module@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.0.tgz#bb0310dfe881f144ca83f30100ceb10cf58835e0" + integrity sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== + dependencies: + builtin-modules "^3.3.0" -is-callable@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" - integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.2.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" - integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== +is-core-module@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" + integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== dependencies: has "^1.0.3" -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - -is-date-object@^1.0.2: +is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== dependencies: has-tostringtag "^1.0.0" +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.0, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-map@^2.0.1, is-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== -is-negative-zero@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" - integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== is-negative-zero@^2.0.2: version "2.0.2" - resolved "https://registry.npmmirror.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== is-number-object@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" - integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== dependencies: has-tostringtag "^1.0.0" -is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== +is-path-inside@^3.0.3: + 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== + +is-reference@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== dependencies: - has-symbols "^1.0.1" + "@types/estree" "*" is-regex@^1.1.4: version "1.1.4" @@ -426,7 +1920,7 @@ is-set@^2.0.1, is-set@^2.0.2: is-shared-array-buffer@^1.0.2: version "1.0.2" - resolved "https://registry.npmmirror.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== dependencies: call-bind "^1.0.2" @@ -438,29 +1932,22 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-symbol@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-symbol@^1.0.3: +is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.8.tgz#cbaa6585dc7db43318bc5b89523ea384a6f65e79" - integrity sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA== +is-typed-array@^1.1.10: + version "1.1.10" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" + integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== dependencies: available-typed-arrays "^1.0.5" call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" + for-each "^0.3.3" + gopd "^1.0.1" has-tostringtag "^1.0.0" is-weakmap@^2.0.1: @@ -470,56 +1957,148 @@ is-weakmap@^2.0.1: is-weakref@^1.0.2: version "1.0.2" - resolved "https://registry.npmmirror.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== dependencies: call-bind "^1.0.2" is-weakset@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83" - integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" + integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +js-sdsl@^4.1.4: + version "4.1.5" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.5.tgz#1ff1645e6b4d1b028cd3f862db88c9d887f26e2a" + integrity sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: - brace-expansion "^1.1.7" + argparse "^2.0.1" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -minimatch@^3.1.1: +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +magic-string@^0.26.4: + version "0.26.7" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.7.tgz#caf7daf61b34e9982f8228c4527474dac8981d6f" + integrity sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow== + dependencies: + sourcemap-codec "^1.4.8" + +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" - resolved "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" + integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.npmmirror.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== nanoid@^3.1.30: version "3.3.4" - resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== -object-inspect@^1.11.0, object-inspect@^1.9.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== -object-inspect@^1.12.0: +object-inspect@^1.12.2, object-inspect@^1.9.0: version "1.12.2" - resolved "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== -object-is@^1.1.4, object-is@^1.1.5: +object-is@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== @@ -527,85 +2106,260 @@ object-is@^1.1.4, object-is@^1.1.5: call-bind "^1.0.2" define-properties "^1.1.3" -object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== +object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" object-keys "^1.1.1" once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-parse@^1.0.6: +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== picocolors@^1.0.0: version "1.0.0" - resolved "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + postcss@8.4.5: version "8.4.5" - resolved "https://registry.npmmirror.com/postcss/-/postcss-8.4.5.tgz#bae665764dfd4c6fcc24dc0fdf7e7aa00cc77f95" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.5.tgz#bae665764dfd4c6fcc24dc0fdf7e7aa00cc77f95" integrity sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg== dependencies: nanoid "^3.1.30" picocolors "^1.0.0" source-map-js "^1.0.1" -regexp.prototype.flags@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" - integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +regenerate-unicode-properties@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" + integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" + regenerate "^1.4.2" + +regenerate@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regenerator-runtime@^0.13.10: + version "0.13.10" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee" + integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw== + +regenerator-transform@^0.15.0: + version "0.15.0" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.0.tgz#cbd9ead5d77fae1a48d957cf889ad0586adb6537" + integrity sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg== + dependencies: + "@babel/runtime" "^7.8.4" regexp.prototype.flags@^1.4.3: version "1.4.3" - resolved "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" functions-have-names "^1.2.2" +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +regexpu-core@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.1.tgz#a69c26f324c1e962e9ffd0b88b055caba8089139" + integrity sha512-HrnlNtpvqP1Xkb28tMhBUO2EbyUHdQlsnlAhzWcwHy8WJR53UWr7/MAvqrsQKMbV4qdpv03oTMG8iIhfsPFktQ== + dependencies: + regenerate "^1.4.2" + regenerate-unicode-properties "^10.1.0" + regjsgen "^0.7.1" + regjsparser "^0.9.1" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" + +regjsgen@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.7.1.tgz#ee5ef30e18d3f09b7c369b76e7c2373ed25546f6" + integrity sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA== + +regjsparser@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" + integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== + dependencies: + jsesc "~0.5.0" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.14.2, resolve@^1.22.1: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + resolve@^2.0.0-next.3: - version "2.0.0-next.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46" - integrity sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q== + version "2.0.0-next.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" + integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" resumer@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= + integrity sha512-Fn9X8rX8yYF4m81rZCK/5VmrmsSbqS/i3rDLl6ZZHAXgC2nTAx3dhwG8q8odP/RmdLa2YrybDJaAMg+X1ajY3w== dependencies: through "~2.3.4" -side-channel@^1.0.3, side-channel@^1.0.4: +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rollup@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.3.0.tgz#ae8dc84808a9c75d775d8b2ed8db1adada31a581" + integrity sha512-wqOV/vUJCYEbWsXvwCkgGWvgaEnsbn4jxBQWKpN816CqsmCimDmCNJI83c6if7QVD4v/zlyRzxN7U2yDT5rfoA== + optionalDependencies: + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + +semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== @@ -616,56 +2370,89 @@ side-channel@^1.0.3, side-channel@^1.0.4: source-map-js@^1.0.1: version "1.0.2" - resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -string.prototype.trim@^1.2.5: - version "1.2.6" - resolved "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.6.tgz#824960787db37a9e24711802ed0c1d1c0254f83e" - integrity sha512-8lMR2m+U0VJTPp6JjvJTtGyc4FIGq9CdRt7O9p6T0e6K4vjU+OP+SQJpbe/SBmRcCUIvNUnjsbmY6lnMp8MhsQ== +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sourcemap-codec@^1.4.8: + version "1.4.8" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== + +string.prototype.trim@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" + integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== dependencies: call-bind "^1.0.2" define-properties "^1.1.4" - es-abstract "^1.19.5" + es-abstract "^1.20.4" -string.prototype.trimend@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" - integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== +string.prototype.trimend@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" + integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" + define-properties "^1.1.4" + es-abstract "^1.20.4" -string.prototype.trimend@^1.0.5: - version "1.0.5" - resolved "https://registry.npmmirror.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" - integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== +string.prototype.trimstart@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" + integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== dependencies: call-bind "^1.0.2" define-properties "^1.1.4" - es-abstract "^1.19.5" + es-abstract "^1.20.4" -string.prototype.trimstart@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" - integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" + ansi-regex "^5.0.1" -string.prototype.trimstart@^1.0.5: - version "1.0.5" - resolved "https://registry.npmmirror.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" - integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== tape@^5.3.1: - version "5.5.3" - resolved "https://registry.npmmirror.com/tape/-/tape-5.5.3.tgz#b6d6f3c99a7bade12b9dcf6ee2234b1dd35e5003" - integrity sha512-hPBJZBL9S7bH9vECg/KSM24slGYV589jJr4dmtiJrLD71AL66+8o4b9HdZazXZyvnilqA7eE8z5/flKiy0KsBg== + version "5.6.1" + resolved "https://registry.yarnpkg.com/tape/-/tape-5.6.1.tgz#bbc1420e5e13003cbd7e2cf0efaa091bfb5c970a" + integrity sha512-reNzS3rzsJtKk0f+zJx2XlzIsjJXlIcOIrIxk5shHAG/DzW3BKyMg8UfN79oluYlcWo4lIt56ahLqwgpRT4idg== dependencies: array.prototype.every "^1.1.3" call-bind "^1.0.2" @@ -674,39 +2461,71 @@ tape@^5.3.1: dotignore "^0.1.2" for-each "^0.3.3" get-package-type "^0.1.0" - glob "^7.2.0" + glob "^7.2.3" has "^1.0.3" has-dynamic-import "^2.0.1" inherits "^2.0.4" is-regex "^1.1.4" minimist "^1.2.6" - object-inspect "^1.12.0" + object-inspect "^1.12.2" object-is "^1.1.5" object-keys "^1.1.1" - object.assign "^4.1.2" + object.assign "^4.1.4" resolve "^2.0.0-next.3" resumer "^0.0.0" - string.prototype.trim "^1.2.5" + string.prototype.trim "^1.2.6" through "^2.3.8" +terser@^5.15.1: + version "5.15.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.15.1.tgz#8561af6e0fd6d839669c73b92bdd5777d870ed6c" + integrity sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw== + dependencies: + "@jridgewell/source-map" "^0.3.2" + acorn "^8.5.0" + commander "^2.20.0" + source-map-support "~0.5.20" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + through@^2.3.8, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -unbox-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" - integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +tslib@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.1" - has-symbols "^1.0.2" - which-boxed-primitive "^1.0.2" + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +typescript@^4.8.4: + version "4.8.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" + integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== unbox-primitive@^1.0.2: version "1.0.2" - resolved "https://registry.npmmirror.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== dependencies: call-bind "^1.0.2" @@ -714,7 +2533,45 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -which-boxed-primitive@^1.0.1, which-boxed-primitive@^1.0.2: +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== + +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== + dependencies: + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" + +unicode-match-property-value-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" + integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== + +unicode-property-aliases-ecmascript@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" + integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== + +update-browserslist-db@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" + integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== @@ -735,19 +2592,36 @@ which-collection@^1.0.1: is-weakmap "^2.0.1" is-weakset "^2.0.1" -which-typed-array@^1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.7.tgz#2761799b9a22d4b8660b3c1b40abaa7739691793" - integrity sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw== +which-typed-array@^1.1.8: + version "1.1.9" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" + integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== dependencies: available-typed-arrays "^1.0.5" call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" + for-each "^0.3.3" + gopd "^1.0.1" has-tostringtag "^1.0.0" - is-typed-array "^1.1.7" + is-typed-array "^1.1.10" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 9b56b829f94b254f7548b40b9a3bf53d2a3312ea Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Mon, 14 Nov 2022 17:44:22 +0100 Subject: [PATCH 2/9] add more tests --- .github/workflows/test.yml | 40 ++++++++++++++++++++ .travis.yml | 11 ------ package.json | 4 +- rollup/configs/babel-presets.mjs | 2 +- test/fixtures/aspect-ratio.output.css | 6 +-- test/fixtures/calc.css | 35 +++++++++++++++++ test/fixtures/calc.output.css | 35 +++++++++++++++++ test/fixtures/color-index.output.css | 4 +- test/fixtures/color.output.css | 4 +- test/fixtures/comment.output.css | 2 +- test/fixtures/complex.css | 12 ++++++ test/fixtures/complex.output.css | 12 ++++++ test/fixtures/device-aspect-ratio.output.css | 6 +-- test/fixtures/device-width-height.output.css | 12 +++--- test/fixtures/line-break.output.css | 2 +- test/fixtures/min-max.output.css | 28 +++++++------- test/fixtures/monochrome.output.css | 4 +- test/fixtures/more-units.output.css | 4 +- test/fixtures/operators.css | 35 +++++++++++++++++ test/fixtures/operators.output.css | 35 +++++++++++++++++ test/fixtures/other-name.output.css | 2 +- test/fixtures/resolution.output.css | 6 +-- test/fixtures/shorthands.output.css | 16 ++++---- test/fixtures/unknown-feature.css | 1 + test/fixtures/unknown-feature.output.css | 1 + test/fixtures/width-height.output.css | 12 +++--- test/index.js | 5 +++ 27 files changed, 268 insertions(+), 68 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml create mode 100644 test/fixtures/calc.css create mode 100644 test/fixtures/calc.output.css create mode 100644 test/fixtures/complex.css create mode 100644 test/fixtures/complex.output.css create mode 100644 test/fixtures/operators.css create mode 100644 test/fixtures/operators.output.css create mode 100644 test/fixtures/unknown-feature.css create mode 100644 test/fixtures/unknown-feature.output.css diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8fe48da --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: test +on: + push: + branches: + - 'main' + - 'master' + pull_request: + +concurrency: + group: branch-node-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest] + node: [14, 16, 18] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + + - name: install + run: | + yarn install + + - name: build + run: yarn build + + - name: test + run: yarn test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f6bef04..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -# https://docs.travis-ci.com/user/travis-lint - -language: node_js - -node_js: - - 14 - - 12 - - 10 - -install: - - npm install --ignore-scripts diff --git a/package.json b/package.json index 7debb68..958a385 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "css3", "postcss", "postcss-plugin", - "media querie", + "media query", "media queries" ], "author": "yisi", @@ -35,7 +35,7 @@ "dist" ], "engines": { - "node": ">=10.0.0" + "node": ">=14.0.0" }, "dependencies": { "@csstools/css-parser-algorithms": "^1.0.0", diff --git a/rollup/configs/babel-presets.mjs b/rollup/configs/babel-presets.mjs index 0fd75be..c370ecf 100644 --- a/rollup/configs/babel-presets.mjs +++ b/rollup/configs/babel-presets.mjs @@ -2,7 +2,7 @@ export const packageBabelPreset = [ ['@babel/preset-env', { loose: true, modules: false, - targets: { node: 10 }, + targets: { node: 14 }, useBuiltIns: false, }], ]; diff --git a/test/fixtures/aspect-ratio.output.css b/test/fixtures/aspect-ratio.output.css index bd8a56f..63b75af 100644 --- a/test/fixtures/aspect-ratio.output.css +++ b/test/fixtures/aspect-ratio.output.css @@ -1,7 +1,7 @@ @media screen and (min-aspect-ratio: 1/1000) and (max-aspect-ratio: 16/9) {} -@media screen and (min-aspect-ratio: 1 / 1000) and (max-aspect-ratio: 16 / 9) {} +@media screen and (min-aspect-ratio:1 / 1000 ) and (max-aspect-ratio: 16 / 9) {} -@media screen and (min-aspect-ratio: 0/0) and (max-aspect-ratio: 16/9) {} +@media screen and (min-aspect-ratio:0/0 ) and (max-aspect-ratio: 16/9) {} -@media screen and (aspect-ratio) and (min-aspect-ratio: 1 / 1000) and (max-aspect-ratio: 16 / 9) {} +@media screen and (aspect-ratio) and ( (min-aspect-ratio:1 / 1000 ) and (max-aspect-ratio: 16 / 9)) {} diff --git a/test/fixtures/calc.css b/test/fixtures/calc.css new file mode 100644 index 0000000..0a18c9e --- /dev/null +++ b/test/fixtures/calc.css @@ -0,0 +1,35 @@ +@media (width < calc(10px * 50)) {} + +@media (width <= calc(10px * 50)) {} + +@media (width = calc(10px * 50)) {} + +@media (width > calc(10px * 50)) {} + +@media (width >= calc(10px * 50)) {} + +@media (calc(10px * 50) < width) {} + +@media (calc(10px * 50) <= width) {} + +@media (calc(10px * 50) = width) {} + +@media (calc(10px * 50) > width) {} + +@media (calc(10px * 50) >= width) {} + +@media (calc(10px * 50) < width < calc(100px * 10)) {} + +@media (calc(10px * 50) <= width < calc(100px * 10)) {} + +@media (calc(10px * 50) < width <= calc(100px * 10)) {} + +@media (calc(10px * 50) <= width <= calc(100px * 10)) {} + +@media (calc(10px * 50) > width > calc(100px * 10)) {} + +@media (calc(10px * 50) >= width > calc(100px * 10)) {} + +@media (calc(10px * 50) > width >= calc(100px * 10)) {} + +@media (calc(10px * 50) >= width >= calc(100px * 10)) {} diff --git a/test/fixtures/calc.output.css b/test/fixtures/calc.output.css new file mode 100644 index 0000000..86706c2 --- /dev/null +++ b/test/fixtures/calc.output.css @@ -0,0 +1,35 @@ +@media (max-width:calc((10px * 50) + -1px)) {} + +@media (max-width: calc(10px * 50)) {} + +@media (width: calc(10px * 50)) {} + +@media (min-width:calc((10px * 50) + 1px)) {} + +@media (min-width: calc(10px * 50)) {} + +@media (min-width:calc((10px * 50) + 1px)) {} + +@media (min-width:calc(10px * 50) ) {} + +@media (width:calc(10px * 50) ) {} + +@media (max-width:calc((10px * 50) + -1px)) {} + +@media (max-width:calc(10px * 50) ) {} + +@media (min-width:calc((10px * 50) + 1px)) and (max-width:calc((100px * 10) + -1px)) {} + +@media (min-width:calc(10px * 50) ) and (max-width:calc((100px * 10) + -1px)) {} + +@media (min-width:calc((10px * 50) + 1px)) and (max-width: calc(100px * 10)) {} + +@media (min-width:calc(10px * 50) ) and (max-width: calc(100px * 10)) {} + +@media (max-width:calc((10px * 50) + -1px)) and (min-width:calc((100px * 10) + 1px)) {} + +@media (max-width:calc(10px * 50) ) and (min-width:calc((100px * 10) + 1px)) {} + +@media (max-width:calc((10px * 50) + -1px)) and (min-width: calc(100px * 10)) {} + +@media (max-width:calc(10px * 50) ) and (min-width: calc(100px * 10)) {} diff --git a/test/fixtures/color-index.output.css b/test/fixtures/color-index.output.css index af6e7d1..2c00cff 100644 --- a/test/fixtures/color-index.output.css +++ b/test/fixtures/color-index.output.css @@ -1,5 +1,5 @@ @media screen and (min-color-index: 0) and (max-color-index: 8) {} -@media screen and (min-color-index: 0) and (max-color-index: 8) {} +@media screen and (min-color-index:0 ) and (max-color-index: 8) {} -@media screen and (color-index) and (min-color-index: 6) and (max-color-index: 256) {} +@media screen and (color-index) and ( (min-color-index:6 ) and (max-color-index: 256)) {} diff --git a/test/fixtures/color.output.css b/test/fixtures/color.output.css index 148fcf9..40b2be3 100644 --- a/test/fixtures/color.output.css +++ b/test/fixtures/color.output.css @@ -1,5 +1,5 @@ @media screen and (min-color: 0) and (max-color: 8) {} -@media screen and (min-color: 0) and (max-color: 8) {} +@media screen and (min-color:0 ) and (max-color: 8) {} -@media screen and (color) and (min-color: 6) and (max-color: 256) {} +@media screen and (color) and ( (min-color:6 ) and (max-color: 256)) {} diff --git a/test/fixtures/comment.output.css b/test/fixtures/comment.output.css index 8f1637b..392e66a 100644 --- a/test/fixtures/comment.output.css +++ b/test/fixtures/comment.output.css @@ -4,7 +4,7 @@ } } -@media screen and (min-width: 500px) and (max-width: 1200px) /* comment */{ +@media screen and (min-width:500px ) and (max-width: 1200px) /* comment */{ .bar { display: block; } diff --git a/test/fixtures/complex.css b/test/fixtures/complex.css new file mode 100644 index 0000000..d542106 --- /dev/null +++ b/test/fixtures/complex.css @@ -0,0 +1,12 @@ +@media screen and (not (200px <=width < 500px)) {} + +@media screen and not (200px <=width < 500px) {} + +@media (not (200px <=width < 500px)) {} + +@media ((min-width: 300px) or (200px <=width < 500px)) {} + +@media screen and (not (200px <=width < 500px)), + screen and not (200px <=width < 500px), + (not (200px <=width < 500px)), + ((min-width: 300px) or (200px <=width < 500px)) {} diff --git a/test/fixtures/complex.output.css b/test/fixtures/complex.output.css new file mode 100644 index 0000000..f425974 --- /dev/null +++ b/test/fixtures/complex.output.css @@ -0,0 +1,12 @@ +@media screen and (not ( (min-width:200px ) and (max-width:499px))) {} + +@media screen and not ( (min-width:200px ) and (max-width:499px)) {} + +@media (not ( (min-width:200px ) and (max-width:499px))) {} + +@media ((min-width: 300px) or ( (min-width:200px ) and (max-width:499px))) {} + +@media screen and (not ( (min-width:200px ) and (max-width:499px))), + screen and not ( (min-width:200px ) and (max-width:499px)), + (not ( (min-width:200px ) and (max-width:499px))), + ((min-width: 300px) or ( (min-width:200px ) and (max-width:499px))) {} diff --git a/test/fixtures/device-aspect-ratio.output.css b/test/fixtures/device-aspect-ratio.output.css index 0f2dd9a..c235545 100644 --- a/test/fixtures/device-aspect-ratio.output.css +++ b/test/fixtures/device-aspect-ratio.output.css @@ -1,7 +1,7 @@ @media screen and (min-device-aspect-ratio: 1/1000) and (max-device-aspect-ratio: 16/9) {} -@media screen and (min-device-aspect-ratio: 1 / 1000) and (max-device-aspect-ratio: 16 / 9) {} +@media screen and (min-device-aspect-ratio:1 / 1000 ) and (max-device-aspect-ratio: 16 / 9) {} -@media screen and (min-device-aspect-ratio: 0/0) and (max-device-aspect-ratio: 16/9) {} +@media screen and (min-device-aspect-ratio:0/0 ) and (max-device-aspect-ratio: 16/9) {} -@media screen and (device-aspect-ratio) and (min-device-aspect-ratio: 1 / 1000) and (max-device-aspect-ratio: 16 / 9) {} +@media screen and (device-aspect-ratio) and ( (min-device-aspect-ratio:1 / 1000 ) and (max-device-aspect-ratio: 16 / 9)) {} diff --git a/test/fixtures/device-width-height.output.css b/test/fixtures/device-width-height.output.css index 836745d..e3ad808 100644 --- a/test/fixtures/device-width-height.output.css +++ b/test/fixtures/device-width-height.output.css @@ -1,16 +1,16 @@ @media screen and (min-device-width: 500px) and (max-device-width: 1200px) {} -@media screen and (min-device-width: 500px) and (max-device-width: 1200px) {} +@media screen and (min-device-width:500px ) and (max-device-width: 1200px) {} -@media screen and (min-device-width: 0) and (max-device-width: 500.58px) {} +@media screen and (min-device-width:0 ) and (max-device-width: 500.58px) {} -@media screen and (device-width) and (min-device-width: .08px) and (max-device-width: 0.68px) {} +@media screen and (device-width) and ( (min-device-width:.08px ) and (max-device-width: 0.68px)) {} /* device-height */ @media screen and (min-device-height: 500px) and (max-device-height: 1200px) {} -@media screen and (min-device-height: 500px) and (max-device-height: 1200px) {} +@media screen and (min-device-height:500px ) and (max-device-height: 1200px) {} -@media screen and (min-device-height: 0) and (max-device-height: 500.58px) {} +@media screen and (min-device-height:0 ) and (max-device-height: 500.58px) {} -@media screen and (device-height) and (min-device-height: .08px) and (max-device-height: 0.68px) {} +@media screen and (device-height) and ( (min-device-height:.08px ) and (max-device-height: 0.68px)) {} diff --git a/test/fixtures/line-break.output.css b/test/fixtures/line-break.output.css index 0b64c1b..c9d2de5 100644 --- a/test/fixtures/line-break.output.css +++ b/test/fixtures/line-break.output.css @@ -10,7 +10,7 @@ and @media screen and -(min-width: 1200px) and (max-width: 500px) +(min-width:1200px ) and (max-width: 500px) and (hover) { .bar { diff --git a/test/fixtures/min-max.output.css b/test/fixtures/min-max.output.css index b3249f6..5ed03e1 100644 --- a/test/fixtures/min-max.output.css +++ b/test/fixtures/min-max.output.css @@ -1,28 +1,28 @@ -@media screen and (min-width: 501px) and (max-width: 1199px) {} +@media screen and (min-width:501px) and (max-width:1199px) {} -@media screen and (min-width: 501px) and (max-width: 1199px) {} +@media screen and (min-width:501px) and (max-width:1199px) {} -@media screen and (min-width: 40.001em) and (max-width: 59.999em) {} +@media screen and (min-width:40.001em) and (max-width:59.999em) {} -@media screen and (min-width: 13.801rem) and (max-width: 51.2rem) {} +@media screen and (min-width:13.801rem) and (max-width: 51.2rem) {} -@media screen and (min-width: 6.001in) and (max-width: 8.999in) {} +@media screen and (min-width:6.001in) and (max-width:8.999in) {} -@media screen and (min-width: 1px) and (max-width: 500.579px) {} +@media screen and (min-width:1px) and (max-width:500.579px) {} -@media screen and (width) and (min-width: 0.081px) and (max-width: 0.679px) {} +@media screen and (width) and ( (min-width:0.081px) and (max-width:0.679px)) {} /* height */ -@media screen and (min-height: 501px) and (max-height: 1199px) {} +@media screen and (min-height:501px) and (max-height:1199px) {} -@media screen and (min-height: 501px) and (max-height: 1199px) {} +@media screen and (min-height:501px) and (max-height:1199px) {} -@media screen and (min-height: 40.001em) and (max-height: 59.999em) {} +@media screen and (min-height:40.001em) and (max-height:59.999em) {} -@media screen and (min-height: 13.8rem) and (max-height: 51.199rem) {} +@media screen and (min-height:13.8rem ) and (max-height:51.199rem) {} -@media screen and (min-height: 6.001in) and (max-height: 8.999in) {} +@media screen and (min-height:6.001in) and (max-height:8.999in) {} -@media screen and (min-height: 1px) and (max-height: 500.579px) {} +@media screen and (min-height:1px) and (max-height:500.579px) {} -@media screen and (height) and (min-height: 0.081px) and (max-height: 0.679px) {} +@media screen and (height) and ( (min-height:0.081px) and (max-height:0.679px)) {} diff --git a/test/fixtures/monochrome.output.css b/test/fixtures/monochrome.output.css index a034069..e234e2d 100644 --- a/test/fixtures/monochrome.output.css +++ b/test/fixtures/monochrome.output.css @@ -1,5 +1,5 @@ @media screen and (min-monochrome: 0) and (max-monochrome: 1000) {} -@media screen and (min-monochrome: 0) and (max-monochrome: 1000) {} +@media screen and (min-monochrome:0 ) and (max-monochrome: 1000) {} -@media screen and (monochrome) and (min-monochrome: 1) and (max-monochrome: 300) {} +@media screen and (monochrome) and ( (min-monochrome:1 ) and (max-monochrome: 300)) {} diff --git a/test/fixtures/more-units.output.css b/test/fixtures/more-units.output.css index 515bc92..bbd0912 100644 --- a/test/fixtures/more-units.output.css +++ b/test/fixtures/more-units.output.css @@ -10,5 +10,5 @@ @media screen and (resolution) { } @media screen and (min-resolution: 1000dpi) and (max-resolution: 3dppx) { } -@media screen and (min-resolution: 1000000dpi) and (max-resolution: 1000000dpcm) { } -@media screen and (min-resolution: 1 / 1000) and (max-resolution: 16 /9) { } +@media screen and (min-resolution:1000000dpi ) and (max-resolution: 1000000dpcm) { } +@media screen and (min-resolution:1 / 1000 ) and (max-resolution: 16 /9) { } diff --git a/test/fixtures/operators.css b/test/fixtures/operators.css new file mode 100644 index 0000000..b7ca47a --- /dev/null +++ b/test/fixtures/operators.css @@ -0,0 +1,35 @@ +@media (width < 300px) {} + +@media (width <= 300px) {} + +@media (width = 300px) {} + +@media (width > 300px) {} + +@media (width >= 300px) {} + +@media (300px < width) {} + +@media (300px <= width) {} + +@media (300px = width) {} + +@media (300px > width) {} + +@media (300px >= width) {} + +@media (300px < width < 1000px) {} + +@media (300px <= width < 1000px) {} + +@media (300px < width <= 1000px) {} + +@media (300px <= width <= 1000px) {} + +@media (300px > width > 1000px) {} + +@media (300px >= width > 1000px) {} + +@media (300px > width >= 1000px) {} + +@media (300px >= width >= 1000px) {} diff --git a/test/fixtures/operators.output.css b/test/fixtures/operators.output.css new file mode 100644 index 0000000..139a090 --- /dev/null +++ b/test/fixtures/operators.output.css @@ -0,0 +1,35 @@ +@media (max-width:299px) {} + +@media (max-width: 300px) {} + +@media (width: 300px) {} + +@media (min-width:301px) {} + +@media (min-width: 300px) {} + +@media (min-width:301px) {} + +@media (min-width:300px ) {} + +@media (width:300px ) {} + +@media (max-width:299px) {} + +@media (max-width:300px ) {} + +@media (min-width:301px) and (max-width:999px) {} + +@media (min-width:300px ) and (max-width:999px) {} + +@media (min-width:301px) and (max-width: 1000px) {} + +@media (min-width:300px ) and (max-width: 1000px) {} + +@media (max-width:299px) and (min-width:1001px) {} + +@media (max-width:300px ) and (min-width:1001px) {} + +@media (max-width:299px) and (min-width: 1000px) {} + +@media (max-width:300px ) and (min-width: 1000px) {} diff --git a/test/fixtures/other-name.output.css b/test/fixtures/other-name.output.css index c92af15..86985b8 100644 --- a/test/fixtures/other-name.output.css +++ b/test/fixtures/other-name.output.css @@ -4,7 +4,7 @@ } } -@media screen and (min-width: 500px) and (max-width: 1200px) and (height) { +@media screen and (min-width:500px ) and (max-width: 1200px) and (height) { .bar { display: block; } diff --git a/test/fixtures/resolution.output.css b/test/fixtures/resolution.output.css index 2e577ff..16460ca 100644 --- a/test/fixtures/resolution.output.css +++ b/test/fixtures/resolution.output.css @@ -1,7 +1,7 @@ @media screen and (min-resolution: 1dpi) and (max-resolution: 192dpi) {} -@media screen and (min-resolution: 1.5dppx) and (max-resolution: 3dppx) {} +@media screen and (min-resolution:1.5dppx ) and (max-resolution: 3dppx) {} -@media screen and (min-resolution: .5dppx) and (max-resolution: 2.5dppx) {} +@media screen and (min-resolution:.5dppx ) and (max-resolution: 2.5dppx) {} -@media screen and (resolution) and (min-resolution: 10dpi) and (max-resolution: 118dpcm) {} +@media screen and (resolution) and ( (min-resolution:10dpi ) and (max-resolution: 118dpcm)) {} diff --git a/test/fixtures/shorthands.output.css b/test/fixtures/shorthands.output.css index dbc2542..2ed43be 100644 --- a/test/fixtures/shorthands.output.css +++ b/test/fixtures/shorthands.output.css @@ -1,11 +1,11 @@ -@media (min-width: 768px) and (max-width: 1023px) {} -@media (min-width: 768px) and (max-width: 1023px) {} +@media (max-width:1023px) and (min-width: 768px) {} +@media (min-width:768px ) and (max-width:1023px) {} -@media (min-width: 769px) and (max-width: 1024px) {} -@media (min-width: 769px) and (max-width: 1024px) {} +@media (max-width:1024px ) and (min-width:769px) {} +@media (min-width:769px) and (max-width: 1024px) {} -@media (min-width: 768px) and (max-width: 1024px) {} -@media (min-width: 768px) and (max-width: 1024px) {} +@media (max-width:1024px ) and (min-width: 768px) {} +@media (min-width:768px ) and (max-width: 1024px) {} -@media (min-width: 769px) and (max-width: 1023px) {} -@media (min-width: 769px) and (max-width: 1023px) {} +@media (max-width:1023px) and (min-width:769px) {} +@media (min-width:769px) and (max-width:1023px) {} diff --git a/test/fixtures/unknown-feature.css b/test/fixtures/unknown-feature.css new file mode 100644 index 0000000..d979bf7 --- /dev/null +++ b/test/fixtures/unknown-feature.css @@ -0,0 +1 @@ +@media screen and (unknown-feature >=500px) and (foo <=1200px) {} diff --git a/test/fixtures/unknown-feature.output.css b/test/fixtures/unknown-feature.output.css new file mode 100644 index 0000000..d979bf7 --- /dev/null +++ b/test/fixtures/unknown-feature.output.css @@ -0,0 +1 @@ +@media screen and (unknown-feature >=500px) and (foo <=1200px) {} diff --git a/test/fixtures/width-height.output.css b/test/fixtures/width-height.output.css index 8608220..f330cfd 100644 --- a/test/fixtures/width-height.output.css +++ b/test/fixtures/width-height.output.css @@ -1,16 +1,16 @@ @media screen and (min-width: 500px) and (max-width: 1200px) {} -@media screen and (min-width: 500px) and (max-width: 1200px) {} +@media screen and (min-width:500px ) and (max-width: 1200px) {} -@media screen and (min-width: 0) and (max-width: 500.58px) {} +@media screen and (min-width:0 ) and (max-width: 500.58px) {} -@media screen and (width) and (min-width: .08px) and (max-width: 0.68px) {} +@media screen and (width) and ( (min-width:.08px ) and (max-width: 0.68px)) {} /* height */ @media screen and (min-height: 500px) and (max-height: 1200px) {} -@media screen and (min-height: 500px) and (max-height: 1200px) {} +@media screen and (min-height:500px ) and (max-height: 1200px) {} -@media screen and (min-height: 0) and (max-height: 500.58px) {} +@media screen and (min-height:0 ) and (max-height: 500.58px) {} -@media screen and (height) and (min-height: .08px) and (max-height: 0.68px) {} +@media screen and (height) and ( (min-height:.08px ) and (max-height: 0.68px)) {} diff --git a/test/index.js b/test/index.js index 86c402e..445abca 100644 --- a/test/index.js +++ b/test/index.js @@ -23,9 +23,12 @@ test("@media", function(t) { compareFixtures(t, "device-width-height", "should transform") compareFixtures(t, "aspect-ratio", "should transform") compareFixtures(t, "device-aspect-ratio", "should transform") + compareFixtures(t, "calc", "should transform") + compareFixtures(t, "complex", "should transform") compareFixtures(t, "color", "should transform") compareFixtures(t, "color-index", "should transform") compareFixtures(t, "monochrome", "should transform") + compareFixtures(t, "operators", "should transform") compareFixtures(t, "resolution", "should transform") compareFixtures(t, "comment", "should transform") @@ -36,5 +39,7 @@ test("@media", function(t) { compareFixtures(t, "min-max", "should transform") compareFixtures(t, "shorthands", "should transform shorthands") + compareFixtures(t, "unknown-feature", "should not transform") + t.end() }) From ee6181cd322fd20e143ec19b6d1c2b9b2b828044 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Mon, 14 Nov 2022 18:08:18 +0100 Subject: [PATCH 3/9] fix typo --- dist/index.cjs | 2 +- dist/index.mjs | 2 +- src/transform.ts | 1 - test/fixtures/aspect-ratio.output.css | 2 +- test/fixtures/color-index.output.css | 2 +- test/fixtures/color.output.css | 2 +- test/fixtures/device-aspect-ratio.output.css | 2 +- test/fixtures/device-width-height.output.css | 4 ++-- test/fixtures/min-max.output.css | 4 ++-- test/fixtures/monochrome.output.css | 2 +- test/fixtures/resolution.output.css | 2 +- test/fixtures/width-height.output.css | 4 ++-- 12 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dist/index.cjs b/dist/index.cjs index f97661e..241d2e2 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1 +1 @@ -"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function r(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const a={">":1,"<":-1};function o(o,s,u,d){if(!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ){return i.newMediaFeaturePlain(r(s)+o,...u.tokens())}if(Array.isArray(u.value)&&i.matchesRatioExactly(u.value))return;let p;if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=a[s],r=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${r}`,-1,-1,{value:i,unit:r,type:n.NumberType.Integer}]}else{const i=a[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(r(s)+o,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0])}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+a[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*a[s]+"e6"))+"e-6")}else e=a[s],d=t[o.toLowerCase()];!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString();return i.newMediaFeaturePlain(r(s)+o,u)}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map((t=>{const r=e.gatherNodeAncestry(t);return t.walk((e=>{const a=e.node;if(!i.isMediaFeatureRange(a))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=a.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(a)||i.isMediaFeatureRangeValueName(a)){const e=a.operatorKind();if(!1===e)return;const n=o(d,e,a.value,i.isMediaFeatureRangeNameValue(a));return void(n&&(u.feature=n.feature))}const p=r.get(u);if(!i.isMediaInParens(p))return;let c=null,l=null;{const e=a.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,a.valueOne,!1);if(!n)return;c=n}{const e=a.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,a.valueTwo,!0);if(!n)return;l=n}const T=new i.MediaInParens(c),v=new i.MediaInParens(l),m=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(t=n.get(t),!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,r);if(m)return m.leading===p?(m.leading=T,void(m.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...m.list])):void m.list.splice(m.indexOf(r.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],T),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const y=new i.MediaConditionListWithAnd(T,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let r=e;if(!r)return;if(r=t.get(r),!i.isMediaCondition(r))return;const a=r;if(r=t.get(r),!i.isMediaQuery(r))return;if(r!==n)return;return a}(p,t,r);f?f.media=y:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(y),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))})),t.toString()})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; +"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function r(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const a={">":1,"<":-1};function o(o,s,u,d){if(!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ){return i.newMediaFeaturePlain(r(s)+o,...u.tokens())}if(Array.isArray(u.value)&&i.matchesRatioExactly(u.value))return;let p;if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=a[s],r=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${r}`,-1,-1,{value:i,unit:r,type:n.NumberType.Integer}]}else{const i=a[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(r(s)+o,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0])}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+a[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*a[s]+"e6"))+"e-6")}else e=a[s],d=t[o.toLowerCase()];!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString();return i.newMediaFeaturePlain(r(s)+o,u)}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map((t=>{const r=e.gatherNodeAncestry(t);return t.walk((e=>{const a=e.node;if(!i.isMediaFeatureRange(a))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=a.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(a)||i.isMediaFeatureRangeValueName(a)){const e=a.operatorKind();if(!1===e)return;const n=o(d,e,a.value,i.isMediaFeatureRangeNameValue(a));return void(n&&(u.feature=n.feature))}const p=r.get(u);if(!i.isMediaInParens(p))return;let c=null,l=null;{const e=a.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,a.valueOne,!1);if(!n)return;c=n}{const e=a.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,a.valueTwo,!0);if(!n)return;l=n}const T=new i.MediaInParens(c),v=new i.MediaInParens(l),m=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,r);if(m)return m.leading===p?(m.leading=T,void(m.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...m.list])):void m.list.splice(m.indexOf(r.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],T),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const y=new i.MediaConditionListWithAnd(T,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let r=e;if(!r)return;if(r=t.get(r),!i.isMediaCondition(r))return;const a=r;if(r=t.get(r),!i.isMediaQuery(r))return;if(r!==n)return;return a}(p,t,r);f?f.media=y:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(y),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))})),t.toString()})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; diff --git a/dist/index.mjs b/dist/index.mjs index d24b81c..5592eb1 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1 +1 @@ -import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as n}from"@csstools/css-parser-algorithms";import{TokenType as r,NumberType as i}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as a,MediaFeatureLT as s,MediaFeatureGT as u,newMediaFeaturePlain as c,matchesRatioExactly as l,parse as d,isMediaFeatureRange as v,isMediaFeature as p,isMediaFeatureRangeNameValue as m,isMediaFeatureRangeValueName as f,isMediaInParens as h,MediaInParens as g,MediaAnd as w,MediaConditionListWithAnd as O,MediaCondition as W,isMediaConditionListWithAnd as x,isMediaAnd as y,isMediaCondition as T,isMediaQuery as I}from"@csstools/media-query-list-parser";const L={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function _(e){return e===s.LT||e===s.LT_OR_EQ?"max-":e===u.GT||e===u.GT_OR_EQ?"min-":""}const b={">":1,"<":-1};function C(n,d,v,p){if(!p){const e=o(d);if(!1===e)return;d=e}if(d===a.EQ||d===s.LT_OR_EQ||d===u.GT_OR_EQ){return c(_(d)+n,...v.tokens())}if(Array.isArray(v.value)&&l(v.value))return;let m;if(m=Array.isArray(v.value)?v.value.find((n=>e(n)||t(n))):v.value,e(m)&&"calc"===m.nameTokenValue().toLowerCase()){let e;if(L[n.toLowerCase()]){const t=b[d],o=L[n.toLowerCase()];e=[r.Dimension,`${t.toString()}${o}`,-1,-1,{value:t,unit:o,type:i.Integer}]}else{const t=b[d];e=[r.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return c(_(d)+n,[r.Function,"calc(",-1,-1,{value:"calc("}],[r.OpenParen,"(",-1,-1,void 0],...m.tokens().slice(1),[r.Whitespace," ",-1,-1,void 0],[r.Delim,"+",-1,-1,void 0],[r.Whitespace," ",-1,-1,void 0],e,[r.CloseParen,")",-1,-1,void 0])}if(t(m)){let e,t=m.value,o=!1;if(t[0]!==r.Dimension&&t[0]!==r.Number||0!==t[4].value)if(t[0]===r.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+b[d];else{if(t[0]!==r.Dimension&&t[0]!==r.Number)return;e=Number(Math.round(Number(t[4].value+.001*b[d]+"e6"))+"e-6")}else e=b[d],o=L[n.toLowerCase()];!1!==o&&(t=[r.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:o,type:t[4].type}]),t[4].value=e,t[0]===r.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString();return c(_(d)+n,t)}}const D=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function E(e){return d(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map((e=>{const t=n(e);return e.walk((n=>{const i=n.node;if(!v(i))return;const o=n.parent;if(!p(o))return;const a=i.name.getName();if(!D.has(a.toLowerCase()))return;if(m(i)||f(i)){const e=i.operatorKind();if(!1===e)return;const t=C(a,e,i.value,m(i));return void(t&&(o.feature=t.feature))}const s=t.get(o);if(!h(s))return;let u=null,c=null;{const e=i.valueOneOperatorKind();if(!1===e)return;const t=C(a,e,i.valueOne,!1);if(!t)return;u=t}{const e=i.valueTwoOperatorKind();if(!1===e)return;const t=C(a,e,i.valueTwo,!0);if(!t)return;c=t}const l=new g(u),d=new g(c),L=function(e,t){let n=e;if(!n)return;if(n=t.get(n),x(n))return n;if(n=t.get(n),!y(n))return;if(n=t.get(n),x(n))return n;return}(s,t);if(L)return L.leading===s?(L.leading=l,void(L.list=[new w([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d),...L.list])):void L.list.splice(L.indexOf(t.get(s)),1,new w([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],l),new w([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d));const _=new O(l,[new w([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d)],[[r.Whitespace," ",-1,-1,void 0]]),b=function(e,t,n){let r=e;if(!r)return;if(r=n.get(r),!T(r))return;const i=r;if(r=n.get(r),!I(r))return;if(r!==t)return;return i}(s,e,t);b?b.media=_:s.media=new W(new g(new W(_),[[r.Whitespace," ",-1,-1,void 0],[r.OpenParen,"(",-1,-1,void 0]],[[r.CloseParen,")",-1,-1,void 0]]))})),e.toString()})).join(",")}const N=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const n=E(e.params);e.params!==n&&(e.cloneBefore({params:n}),t.preserve||e.remove())}}}};N.postcss=!0;export{N as default}; +import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as n}from"@csstools/css-parser-algorithms";import{TokenType as r,NumberType as i}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as a,MediaFeatureLT as s,MediaFeatureGT as u,newMediaFeaturePlain as c,matchesRatioExactly as l,parse as d,isMediaFeatureRange as v,isMediaFeature as p,isMediaFeatureRangeNameValue as m,isMediaFeatureRangeValueName as f,isMediaInParens as h,MediaInParens as w,MediaAnd as g,MediaConditionListWithAnd as O,MediaCondition as W,isMediaConditionListWithAnd as x,isMediaAnd as y,isMediaCondition as T,isMediaQuery as I}from"@csstools/media-query-list-parser";const L={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function _(e){return e===s.LT||e===s.LT_OR_EQ?"max-":e===u.GT||e===u.GT_OR_EQ?"min-":""}const b={">":1,"<":-1};function C(n,d,v,p){if(!p){const e=o(d);if(!1===e)return;d=e}if(d===a.EQ||d===s.LT_OR_EQ||d===u.GT_OR_EQ){return c(_(d)+n,...v.tokens())}if(Array.isArray(v.value)&&l(v.value))return;let m;if(m=Array.isArray(v.value)?v.value.find((n=>e(n)||t(n))):v.value,e(m)&&"calc"===m.nameTokenValue().toLowerCase()){let e;if(L[n.toLowerCase()]){const t=b[d],o=L[n.toLowerCase()];e=[r.Dimension,`${t.toString()}${o}`,-1,-1,{value:t,unit:o,type:i.Integer}]}else{const t=b[d];e=[r.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return c(_(d)+n,[r.Function,"calc(",-1,-1,{value:"calc("}],[r.OpenParen,"(",-1,-1,void 0],...m.tokens().slice(1),[r.Whitespace," ",-1,-1,void 0],[r.Delim,"+",-1,-1,void 0],[r.Whitespace," ",-1,-1,void 0],e,[r.CloseParen,")",-1,-1,void 0])}if(t(m)){let e,t=m.value,o=!1;if(t[0]!==r.Dimension&&t[0]!==r.Number||0!==t[4].value)if(t[0]===r.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+b[d];else{if(t[0]!==r.Dimension&&t[0]!==r.Number)return;e=Number(Math.round(Number(t[4].value+.001*b[d]+"e6"))+"e-6")}else e=b[d],o=L[n.toLowerCase()];!1!==o&&(t=[r.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:o,type:t[4].type}]),t[4].value=e,t[0]===r.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString();return c(_(d)+n,t)}}const D=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function E(e){return d(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map((e=>{const t=n(e);return e.walk((n=>{const i=n.node;if(!v(i))return;const o=n.parent;if(!p(o))return;const a=i.name.getName();if(!D.has(a.toLowerCase()))return;if(m(i)||f(i)){const e=i.operatorKind();if(!1===e)return;const t=C(a,e,i.value,m(i));return void(t&&(o.feature=t.feature))}const s=t.get(o);if(!h(s))return;let u=null,c=null;{const e=i.valueOneOperatorKind();if(!1===e)return;const t=C(a,e,i.valueOne,!1);if(!t)return;u=t}{const e=i.valueTwoOperatorKind();if(!1===e)return;const t=C(a,e,i.valueTwo,!0);if(!t)return;c=t}const l=new w(u),d=new w(c),L=function(e,t){let n=e;if(!n)return;if(n=t.get(n),x(n))return n;if(!y(n))return;if(n=t.get(n),x(n))return n;return}(s,t);if(L)return L.leading===s?(L.leading=l,void(L.list=[new g([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d),...L.list])):void L.list.splice(L.indexOf(t.get(s)),1,new g([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],l),new g([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d));const _=new O(l,[new g([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d)],[[r.Whitespace," ",-1,-1,void 0]]),b=function(e,t,n){let r=e;if(!r)return;if(r=n.get(r),!T(r))return;const i=r;if(r=n.get(r),!I(r))return;if(r!==t)return;return i}(s,e,t);b?b.media=_:s.media=new W(new w(new W(_),[[r.Whitespace," ",-1,-1,void 0],[r.OpenParen,"(",-1,-1,void 0]],[[r.CloseParen,")",-1,-1,void 0]]))})),e.toString()})).join(",")}const N=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const n=E(e.params);e.params!==n&&(e.cloneBefore({params:n}),t.preserve||e.remove())}}}};N.postcss=!0;export{N as default}; diff --git a/src/transform.ts b/src/transform.ts index b491c2c..ccb1186 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -206,7 +206,6 @@ function getMediaConditionListWithAndFromAncestry(mediaInParens: MediaInParens, return focus; } - focus = ancestry.get(focus); if (!isMediaAnd(focus)) { return; } diff --git a/test/fixtures/aspect-ratio.output.css b/test/fixtures/aspect-ratio.output.css index 63b75af..506a8b4 100644 --- a/test/fixtures/aspect-ratio.output.css +++ b/test/fixtures/aspect-ratio.output.css @@ -4,4 +4,4 @@ @media screen and (min-aspect-ratio:0/0 ) and (max-aspect-ratio: 16/9) {} -@media screen and (aspect-ratio) and ( (min-aspect-ratio:1 / 1000 ) and (max-aspect-ratio: 16 / 9)) {} +@media screen and (aspect-ratio) and (min-aspect-ratio:1 / 1000 ) and (max-aspect-ratio: 16 / 9) {} diff --git a/test/fixtures/color-index.output.css b/test/fixtures/color-index.output.css index 2c00cff..fc4213b 100644 --- a/test/fixtures/color-index.output.css +++ b/test/fixtures/color-index.output.css @@ -2,4 +2,4 @@ @media screen and (min-color-index:0 ) and (max-color-index: 8) {} -@media screen and (color-index) and ( (min-color-index:6 ) and (max-color-index: 256)) {} +@media screen and (color-index) and (min-color-index:6 ) and (max-color-index: 256) {} diff --git a/test/fixtures/color.output.css b/test/fixtures/color.output.css index 40b2be3..6fa555a 100644 --- a/test/fixtures/color.output.css +++ b/test/fixtures/color.output.css @@ -2,4 +2,4 @@ @media screen and (min-color:0 ) and (max-color: 8) {} -@media screen and (color) and ( (min-color:6 ) and (max-color: 256)) {} +@media screen and (color) and (min-color:6 ) and (max-color: 256) {} diff --git a/test/fixtures/device-aspect-ratio.output.css b/test/fixtures/device-aspect-ratio.output.css index c235545..cdbb74d 100644 --- a/test/fixtures/device-aspect-ratio.output.css +++ b/test/fixtures/device-aspect-ratio.output.css @@ -4,4 +4,4 @@ @media screen and (min-device-aspect-ratio:0/0 ) and (max-device-aspect-ratio: 16/9) {} -@media screen and (device-aspect-ratio) and ( (min-device-aspect-ratio:1 / 1000 ) and (max-device-aspect-ratio: 16 / 9)) {} +@media screen and (device-aspect-ratio) and (min-device-aspect-ratio:1 / 1000 ) and (max-device-aspect-ratio: 16 / 9) {} diff --git a/test/fixtures/device-width-height.output.css b/test/fixtures/device-width-height.output.css index e3ad808..64fe2ed 100644 --- a/test/fixtures/device-width-height.output.css +++ b/test/fixtures/device-width-height.output.css @@ -4,7 +4,7 @@ @media screen and (min-device-width:0 ) and (max-device-width: 500.58px) {} -@media screen and (device-width) and ( (min-device-width:.08px ) and (max-device-width: 0.68px)) {} +@media screen and (device-width) and (min-device-width:.08px ) and (max-device-width: 0.68px) {} /* device-height */ @media screen and (min-device-height: 500px) and (max-device-height: 1200px) {} @@ -13,4 +13,4 @@ @media screen and (min-device-height:0 ) and (max-device-height: 500.58px) {} -@media screen and (device-height) and ( (min-device-height:.08px ) and (max-device-height: 0.68px)) {} +@media screen and (device-height) and (min-device-height:.08px ) and (max-device-height: 0.68px) {} diff --git a/test/fixtures/min-max.output.css b/test/fixtures/min-max.output.css index 5ed03e1..f8313e8 100644 --- a/test/fixtures/min-max.output.css +++ b/test/fixtures/min-max.output.css @@ -10,7 +10,7 @@ @media screen and (min-width:1px) and (max-width:500.579px) {} -@media screen and (width) and ( (min-width:0.081px) and (max-width:0.679px)) {} +@media screen and (width) and (min-width:0.081px) and (max-width:0.679px) {} /* height */ @media screen and (min-height:501px) and (max-height:1199px) {} @@ -25,4 +25,4 @@ @media screen and (min-height:1px) and (max-height:500.579px) {} -@media screen and (height) and ( (min-height:0.081px) and (max-height:0.679px)) {} +@media screen and (height) and (min-height:0.081px) and (max-height:0.679px) {} diff --git a/test/fixtures/monochrome.output.css b/test/fixtures/monochrome.output.css index e234e2d..6289e50 100644 --- a/test/fixtures/monochrome.output.css +++ b/test/fixtures/monochrome.output.css @@ -2,4 +2,4 @@ @media screen and (min-monochrome:0 ) and (max-monochrome: 1000) {} -@media screen and (monochrome) and ( (min-monochrome:1 ) and (max-monochrome: 300)) {} +@media screen and (monochrome) and (min-monochrome:1 ) and (max-monochrome: 300) {} diff --git a/test/fixtures/resolution.output.css b/test/fixtures/resolution.output.css index 16460ca..93de8cd 100644 --- a/test/fixtures/resolution.output.css +++ b/test/fixtures/resolution.output.css @@ -4,4 +4,4 @@ @media screen and (min-resolution:.5dppx ) and (max-resolution: 2.5dppx) {} -@media screen and (resolution) and ( (min-resolution:10dpi ) and (max-resolution: 118dpcm)) {} +@media screen and (resolution) and (min-resolution:10dpi ) and (max-resolution: 118dpcm) {} diff --git a/test/fixtures/width-height.output.css b/test/fixtures/width-height.output.css index f330cfd..af26192 100644 --- a/test/fixtures/width-height.output.css +++ b/test/fixtures/width-height.output.css @@ -4,7 +4,7 @@ @media screen and (min-width:0 ) and (max-width: 500.58px) {} -@media screen and (width) and ( (min-width:.08px ) and (max-width: 0.68px)) {} +@media screen and (width) and (min-width:.08px ) and (max-width: 0.68px) {} /* height */ @media screen and (min-height: 500px) and (max-height: 1200px) {} @@ -13,4 +13,4 @@ @media screen and (min-height:0 ) and (max-height: 500.58px) {} -@media screen and (height) and ( (min-height:.08px ) and (max-height: 0.68px)) {} +@media screen and (height) and (min-height:.08px ) and (max-height: 0.68px) {} From 9dc83a458a93acb33496deb8c1fc33d6df197c95 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Mon, 16 Jan 2023 13:48:36 +0100 Subject: [PATCH 4/9] update whitespace and comment handling --- dist/index.cjs | 2 +- dist/index.mjs | 2 +- src/transform-single-pair.ts | 42 ++++++++++++++------ test/fixtures/aspect-ratio.output.css | 6 +-- test/fixtures/calc.output.css | 30 +++++++------- test/fixtures/color-index.output.css | 4 +- test/fixtures/color.output.css | 4 +- test/fixtures/comment.output.css | 2 +- test/fixtures/complex.output.css | 16 ++++---- test/fixtures/device-aspect-ratio.output.css | 6 +-- test/fixtures/device-width-height.output.css | 12 +++--- test/fixtures/line-break.output.css | 2 +- test/fixtures/min-max.output.css | 28 ++++++------- test/fixtures/monochrome.output.css | 4 +- test/fixtures/more-units.output.css | 4 +- test/fixtures/operators.output.css | 30 +++++++------- test/fixtures/other-name.output.css | 2 +- test/fixtures/resolution.output.css | 6 +-- test/fixtures/shorthands.output.css | 16 ++++---- test/fixtures/width-height.output.css | 12 +++--- 20 files changed, 123 insertions(+), 107 deletions(-) diff --git a/dist/index.cjs b/dist/index.cjs index 241d2e2..7e4c5f9 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1 +1 @@ -"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function r(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const a={">":1,"<":-1};function o(o,s,u,d){if(!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ){return i.newMediaFeaturePlain(r(s)+o,...u.tokens())}if(Array.isArray(u.value)&&i.matchesRatioExactly(u.value))return;let p;if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=a[s],r=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${r}`,-1,-1,{value:i,unit:r,type:n.NumberType.Integer}]}else{const i=a[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(r(s)+o,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0])}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+a[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*a[s]+"e6"))+"e-6")}else e=a[s],d=t[o.toLowerCase()];!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString();return i.newMediaFeaturePlain(r(s)+o,u)}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map((t=>{const r=e.gatherNodeAncestry(t);return t.walk((e=>{const a=e.node;if(!i.isMediaFeatureRange(a))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=a.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(a)||i.isMediaFeatureRangeValueName(a)){const e=a.operatorKind();if(!1===e)return;const n=o(d,e,a.value,i.isMediaFeatureRangeNameValue(a));return void(n&&(u.feature=n.feature))}const p=r.get(u);if(!i.isMediaInParens(p))return;let c=null,l=null;{const e=a.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,a.valueOne,!1);if(!n)return;c=n}{const e=a.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,a.valueTwo,!0);if(!n)return;l=n}const T=new i.MediaInParens(c),v=new i.MediaInParens(l),m=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,r);if(m)return m.leading===p?(m.leading=T,void(m.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...m.list])):void m.list.splice(m.indexOf(r.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],T),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const y=new i.MediaConditionListWithAnd(T,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let r=e;if(!r)return;if(r=t.get(r),!i.isMediaCondition(r))return;const a=r;if(r=t.get(r),!i.isMediaQuery(r))return;if(r!==n)return;return a}(p,t,r);f?f.media=y:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(y),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))})),t.toString()})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; +"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function a(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const r={">":1,"<":-1};function o(o,s,u,d){let p,l=u.before,c=u.after;if(d||(l=u.after,c=u.before),!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ)return Array.isArray(u.value)?i.newMediaFeaturePlain(a(s)+o,...l,...u.value.flatMap((e=>e.tokens())),...c):i.newMediaFeaturePlain(a(s)+o,...l,...u.value.tokens(),...c);if(!Array.isArray(u.value)||!i.matchesRatioExactly(u.value)){if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=r[s],a=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${a}`,-1,-1,{value:i,unit:a,type:n.NumberType.Integer}]}else{const i=r[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(a(s)+o,...l,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0],...c)}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+r[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*r[s]+"e6"))+"e-6")}else e=r[s],d=t[o.toLowerCase()];return!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString(),i.newMediaFeaturePlain(a(s)+o,...l,u,...c)}}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map((t=>{const a=e.gatherNodeAncestry(t);return t.walk((e=>{const r=e.node;if(!i.isMediaFeatureRange(r))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=r.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(r)||i.isMediaFeatureRangeValueName(r)){const e=r.operatorKind();if(!1===e)return;const n=o(d,e,r.value,i.isMediaFeatureRangeNameValue(r));return void(n&&(u.feature=n.feature))}const p=a.get(u);if(!i.isMediaInParens(p))return;let l=null,c=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,r.valueOne,!1);if(!n)return;l=n}{const e=r.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,r.valueTwo,!0);if(!n)return;c=n}const T=new i.MediaInParens(l),v=new i.MediaInParens(c),y=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,a);if(y)return y.leading===p?(y.leading=T,void(y.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...y.list])):void y.list.splice(y.indexOf(a.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],T),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const m=new i.MediaConditionListWithAnd(T,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let a=e;if(!a)return;if(a=t.get(a),!i.isMediaCondition(a))return;const r=a;if(a=t.get(a),!i.isMediaQuery(a))return;if(a!==n)return;return r}(p,t,a);f?f.media=m:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(m),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))})),t.toString()})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; diff --git a/dist/index.mjs b/dist/index.mjs index 5592eb1..c064475 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1 +1 @@ -import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as n}from"@csstools/css-parser-algorithms";import{TokenType as r,NumberType as i}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as a,MediaFeatureLT as s,MediaFeatureGT as u,newMediaFeaturePlain as c,matchesRatioExactly as l,parse as d,isMediaFeatureRange as v,isMediaFeature as p,isMediaFeatureRangeNameValue as m,isMediaFeatureRangeValueName as f,isMediaInParens as h,MediaInParens as w,MediaAnd as g,MediaConditionListWithAnd as O,MediaCondition as W,isMediaConditionListWithAnd as x,isMediaAnd as y,isMediaCondition as T,isMediaQuery as I}from"@csstools/media-query-list-parser";const L={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function _(e){return e===s.LT||e===s.LT_OR_EQ?"max-":e===u.GT||e===u.GT_OR_EQ?"min-":""}const b={">":1,"<":-1};function C(n,d,v,p){if(!p){const e=o(d);if(!1===e)return;d=e}if(d===a.EQ||d===s.LT_OR_EQ||d===u.GT_OR_EQ){return c(_(d)+n,...v.tokens())}if(Array.isArray(v.value)&&l(v.value))return;let m;if(m=Array.isArray(v.value)?v.value.find((n=>e(n)||t(n))):v.value,e(m)&&"calc"===m.nameTokenValue().toLowerCase()){let e;if(L[n.toLowerCase()]){const t=b[d],o=L[n.toLowerCase()];e=[r.Dimension,`${t.toString()}${o}`,-1,-1,{value:t,unit:o,type:i.Integer}]}else{const t=b[d];e=[r.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return c(_(d)+n,[r.Function,"calc(",-1,-1,{value:"calc("}],[r.OpenParen,"(",-1,-1,void 0],...m.tokens().slice(1),[r.Whitespace," ",-1,-1,void 0],[r.Delim,"+",-1,-1,void 0],[r.Whitespace," ",-1,-1,void 0],e,[r.CloseParen,")",-1,-1,void 0])}if(t(m)){let e,t=m.value,o=!1;if(t[0]!==r.Dimension&&t[0]!==r.Number||0!==t[4].value)if(t[0]===r.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+b[d];else{if(t[0]!==r.Dimension&&t[0]!==r.Number)return;e=Number(Math.round(Number(t[4].value+.001*b[d]+"e6"))+"e-6")}else e=b[d],o=L[n.toLowerCase()];!1!==o&&(t=[r.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:o,type:t[4].type}]),t[4].value=e,t[0]===r.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString();return c(_(d)+n,t)}}const D=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function E(e){return d(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map((e=>{const t=n(e);return e.walk((n=>{const i=n.node;if(!v(i))return;const o=n.parent;if(!p(o))return;const a=i.name.getName();if(!D.has(a.toLowerCase()))return;if(m(i)||f(i)){const e=i.operatorKind();if(!1===e)return;const t=C(a,e,i.value,m(i));return void(t&&(o.feature=t.feature))}const s=t.get(o);if(!h(s))return;let u=null,c=null;{const e=i.valueOneOperatorKind();if(!1===e)return;const t=C(a,e,i.valueOne,!1);if(!t)return;u=t}{const e=i.valueTwoOperatorKind();if(!1===e)return;const t=C(a,e,i.valueTwo,!0);if(!t)return;c=t}const l=new w(u),d=new w(c),L=function(e,t){let n=e;if(!n)return;if(n=t.get(n),x(n))return n;if(!y(n))return;if(n=t.get(n),x(n))return n;return}(s,t);if(L)return L.leading===s?(L.leading=l,void(L.list=[new g([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d),...L.list])):void L.list.splice(L.indexOf(t.get(s)),1,new g([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],l),new g([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d));const _=new O(l,[new g([[r.Whitespace," ",-1,-1,void 0],[r.Ident,"and",-1,-1,{value:"and"}],[r.Whitespace," ",-1,-1,void 0]],d)],[[r.Whitespace," ",-1,-1,void 0]]),b=function(e,t,n){let r=e;if(!r)return;if(r=n.get(r),!T(r))return;const i=r;if(r=n.get(r),!I(r))return;if(r!==t)return;return i}(s,e,t);b?b.media=_:s.media=new W(new w(new W(_),[[r.Whitespace," ",-1,-1,void 0],[r.OpenParen,"(",-1,-1,void 0]],[[r.CloseParen,")",-1,-1,void 0]]))})),e.toString()})).join(",")}const N=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const n=E(e.params);e.params!==n&&(e.cloneBefore({params:n}),t.preserve||e.remove())}}}};N.postcss=!0;export{N as default}; +import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as r}from"@csstools/css-parser-algorithms";import{TokenType as n,NumberType as i}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as a,MediaFeatureLT as s,MediaFeatureGT as u,newMediaFeaturePlain as l,matchesRatioExactly as c,parse as d,isMediaFeatureRange as v,isMediaFeature as p,isMediaFeatureRangeNameValue as f,isMediaFeatureRangeValueName as m,isMediaInParens as h,MediaInParens as w,MediaAnd as g,MediaConditionListWithAnd as y,MediaCondition as O,isMediaConditionListWithAnd as W,isMediaAnd as x,isMediaCondition as b,isMediaQuery as T}from"@csstools/media-query-list-parser";const I={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function L(e){return e===s.LT||e===s.LT_OR_EQ?"max-":e===u.GT||e===u.GT_OR_EQ?"min-":""}const _={">":1,"<":-1};function A(r,d,v,p){let f,m=v.before,h=v.after;if(p||(m=v.after,h=v.before),!p){const e=o(d);if(!1===e)return;d=e}if(d===a.EQ||d===s.LT_OR_EQ||d===u.GT_OR_EQ)return Array.isArray(v.value)?l(L(d)+r,...m,...v.value.flatMap((e=>e.tokens())),...h):l(L(d)+r,...m,...v.value.tokens(),...h);if(!Array.isArray(v.value)||!c(v.value)){if(f=Array.isArray(v.value)?v.value.find((r=>e(r)||t(r))):v.value,e(f)&&"calc"===f.nameTokenValue().toLowerCase()){let e;if(I[r.toLowerCase()]){const t=_[d],o=I[r.toLowerCase()];e=[n.Dimension,`${t.toString()}${o}`,-1,-1,{value:t,unit:o,type:i.Integer}]}else{const t=_[d];e=[n.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return l(L(d)+r,...m,[n.Function,"calc(",-1,-1,{value:"calc("}],[n.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[n.Whitespace," ",-1,-1,void 0],[n.Delim,"+",-1,-1,void 0],[n.Whitespace," ",-1,-1,void 0],e,[n.CloseParen,")",-1,-1,void 0],...h)}if(t(f)){let e,t=f.value,o=!1;if(t[0]!==n.Dimension&&t[0]!==n.Number||0!==t[4].value)if(t[0]===n.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+_[d];else{if(t[0]!==n.Dimension&&t[0]!==n.Number)return;e=Number(Math.round(Number(t[4].value+.001*_[d]+"e6"))+"e-6")}else e=_[d],o=I[r.toLowerCase()];return!1!==o&&(t=[n.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:o,type:t[4].type}]),t[4].value=e,t[0]===n.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString(),l(L(d)+r,...m,t,...h)}}}const C=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function D(e){return d(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map((e=>{const t=r(e);return e.walk((r=>{const i=r.node;if(!v(i))return;const o=r.parent;if(!p(o))return;const a=i.name.getName();if(!C.has(a.toLowerCase()))return;if(f(i)||m(i)){const e=i.operatorKind();if(!1===e)return;const t=A(a,e,i.value,f(i));return void(t&&(o.feature=t.feature))}const s=t.get(o);if(!h(s))return;let u=null,l=null;{const e=i.valueOneOperatorKind();if(!1===e)return;const t=A(a,e,i.valueOne,!1);if(!t)return;u=t}{const e=i.valueTwoOperatorKind();if(!1===e)return;const t=A(a,e,i.valueTwo,!0);if(!t)return;l=t}const c=new w(u),d=new w(l),I=function(e,t){let r=e;if(!r)return;if(r=t.get(r),W(r))return r;if(!x(r))return;if(r=t.get(r),W(r))return r;return}(s,t);if(I)return I.leading===s?(I.leading=c,void(I.list=[new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d),...I.list])):void I.list.splice(I.indexOf(t.get(s)),1,new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],c),new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d));const L=new y(c,[new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d)],[[n.Whitespace," ",-1,-1,void 0]]),_=function(e,t,r){let n=e;if(!n)return;if(n=r.get(n),!b(n))return;const i=n;if(n=r.get(n),!T(n))return;if(n!==t)return;return i}(s,e,t);_?_.media=L:s.media=new O(new w(new O(L),[[n.Whitespace," ",-1,-1,void 0],[n.OpenParen,"(",-1,-1,void 0]],[[n.CloseParen,")",-1,-1,void 0]]))})),e.toString()})).join(",")}const E=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=D(e.params);e.params!==r&&(e.cloneBefore({params:r}),t.preserve||e.remove())}}}};E.postcss=!0;export{E as default}; diff --git a/src/transform-single-pair.ts b/src/transform-single-pair.ts index 4f4b988..c160ca3 100644 --- a/src/transform-single-pair.ts +++ b/src/transform-single-pair.ts @@ -1,5 +1,5 @@ import { ComponentValue, isFunctionNode, isTokenNode } from '@csstools/css-parser-algorithms'; -import { NumberType, TokenType } from '@csstools/css-tokenizer'; +import { CSSToken, NumberType, TokenType } from '@csstools/css-tokenizer'; import { invertComparison, matchesRatioExactly, MediaFeature, MediaFeatureComparison, MediaFeatureEQ, MediaFeatureGT, MediaFeatureLT, MediaFeatureValue, newMediaFeaturePlain } from '@csstools/media-query-list-parser'; const unitsForFeature = { @@ -35,6 +35,13 @@ const power = { const step = .001; // smallest even number that won’t break complex queries (1in = 96px) export function transformSingleNameValuePair(name: string, operator: MediaFeatureComparison, value: MediaFeatureValue, nameBeforeValue: boolean): MediaFeature | null { + let tokensBefore: Array = value.before; + let tokensAfter: Array = value.after; + if (!nameBeforeValue) { + tokensBefore = value.after; + tokensAfter = value.before; + } + if (!nameBeforeValue) { const invertedOperator = invertComparison(operator); if (invertedOperator === false) { @@ -45,12 +52,21 @@ export function transformSingleNameValuePair(name: string, operator: MediaFeatur } if (operator === MediaFeatureEQ.EQ || operator === MediaFeatureLT.LT_OR_EQ || operator === MediaFeatureGT.GT_OR_EQ) { - const transformed = newMediaFeaturePlain( - featureNamePrefix(operator) + name, - ...value.tokens(), - ); - - return transformed; + if (Array.isArray(value.value)) { + return newMediaFeaturePlain( + featureNamePrefix(operator) + name, + ...tokensBefore, + ...value.value.flatMap(x => x.tokens()), + ...tokensAfter, + ); + } else { + return newMediaFeaturePlain( + featureNamePrefix(operator) + name, + ...tokensBefore, + ...value.value.tokens(), + ...tokensAfter, + ); + } } if (Array.isArray(value.value) && matchesRatioExactly(value.value)) { @@ -80,8 +96,9 @@ export function transformSingleNameValuePair(name: string, operator: MediaFeatur valueToken = [TokenType.Number, tokenValue.toString(), -1, -1, { value: tokenValue, type: NumberType.Integer }]; } - const transformed = newMediaFeaturePlain( + return newMediaFeaturePlain( featureNamePrefix(operator) + name, + ...tokensBefore, [TokenType.Function, 'calc(', -1, -1, { value: 'calc(' }], [TokenType.OpenParen, '(', -1, -1, undefined], ...valueNode.tokens().slice(1), @@ -90,9 +107,8 @@ export function transformSingleNameValuePair(name: string, operator: MediaFeatur [TokenType.Whitespace, ' ', -1, -1, undefined], valueToken, [TokenType.CloseParen, ')', -1, -1, undefined], + ...tokensAfter, ); - - return transformed; } else if (isTokenNode(valueNode)) { let token = valueNode.value; let tokenValue: number; @@ -137,11 +153,11 @@ export function transformSingleNameValuePair(name: string, operator: MediaFeatur token[1] = token[4].value.toString(); } - const transformed = newMediaFeaturePlain( + return newMediaFeaturePlain( featureNamePrefix(operator) + name, + ...tokensBefore, token, + ...tokensAfter, ); - - return transformed; } } diff --git a/test/fixtures/aspect-ratio.output.css b/test/fixtures/aspect-ratio.output.css index 506a8b4..bd8a56f 100644 --- a/test/fixtures/aspect-ratio.output.css +++ b/test/fixtures/aspect-ratio.output.css @@ -1,7 +1,7 @@ @media screen and (min-aspect-ratio: 1/1000) and (max-aspect-ratio: 16/9) {} -@media screen and (min-aspect-ratio:1 / 1000 ) and (max-aspect-ratio: 16 / 9) {} +@media screen and (min-aspect-ratio: 1 / 1000) and (max-aspect-ratio: 16 / 9) {} -@media screen and (min-aspect-ratio:0/0 ) and (max-aspect-ratio: 16/9) {} +@media screen and (min-aspect-ratio: 0/0) and (max-aspect-ratio: 16/9) {} -@media screen and (aspect-ratio) and (min-aspect-ratio:1 / 1000 ) and (max-aspect-ratio: 16 / 9) {} +@media screen and (aspect-ratio) and (min-aspect-ratio: 1 / 1000) and (max-aspect-ratio: 16 / 9) {} diff --git a/test/fixtures/calc.output.css b/test/fixtures/calc.output.css index 86706c2..fb822f9 100644 --- a/test/fixtures/calc.output.css +++ b/test/fixtures/calc.output.css @@ -1,35 +1,35 @@ -@media (max-width:calc((10px * 50) + -1px)) {} +@media (max-width: calc((10px * 50) + -1px)) {} @media (max-width: calc(10px * 50)) {} @media (width: calc(10px * 50)) {} -@media (min-width:calc((10px * 50) + 1px)) {} +@media (min-width: calc((10px * 50) + 1px)) {} @media (min-width: calc(10px * 50)) {} -@media (min-width:calc((10px * 50) + 1px)) {} +@media (min-width: calc((10px * 50) + 1px)) {} -@media (min-width:calc(10px * 50) ) {} +@media (min-width: calc(10px * 50)) {} -@media (width:calc(10px * 50) ) {} +@media (width: calc(10px * 50)) {} -@media (max-width:calc((10px * 50) + -1px)) {} +@media (max-width: calc((10px * 50) + -1px)) {} -@media (max-width:calc(10px * 50) ) {} +@media (max-width: calc(10px * 50)) {} -@media (min-width:calc((10px * 50) + 1px)) and (max-width:calc((100px * 10) + -1px)) {} +@media (min-width: calc((10px * 50) + 1px)) and (max-width: calc((100px * 10) + -1px)) {} -@media (min-width:calc(10px * 50) ) and (max-width:calc((100px * 10) + -1px)) {} +@media (min-width: calc(10px * 50)) and (max-width: calc((100px * 10) + -1px)) {} -@media (min-width:calc((10px * 50) + 1px)) and (max-width: calc(100px * 10)) {} +@media (min-width: calc((10px * 50) + 1px)) and (max-width: calc(100px * 10)) {} -@media (min-width:calc(10px * 50) ) and (max-width: calc(100px * 10)) {} +@media (min-width: calc(10px * 50)) and (max-width: calc(100px * 10)) {} -@media (max-width:calc((10px * 50) + -1px)) and (min-width:calc((100px * 10) + 1px)) {} +@media (max-width: calc((10px * 50) + -1px)) and (min-width: calc((100px * 10) + 1px)) {} -@media (max-width:calc(10px * 50) ) and (min-width:calc((100px * 10) + 1px)) {} +@media (max-width: calc(10px * 50)) and (min-width: calc((100px * 10) + 1px)) {} -@media (max-width:calc((10px * 50) + -1px)) and (min-width: calc(100px * 10)) {} +@media (max-width: calc((10px * 50) + -1px)) and (min-width: calc(100px * 10)) {} -@media (max-width:calc(10px * 50) ) and (min-width: calc(100px * 10)) {} +@media (max-width: calc(10px * 50)) and (min-width: calc(100px * 10)) {} diff --git a/test/fixtures/color-index.output.css b/test/fixtures/color-index.output.css index fc4213b..af6e7d1 100644 --- a/test/fixtures/color-index.output.css +++ b/test/fixtures/color-index.output.css @@ -1,5 +1,5 @@ @media screen and (min-color-index: 0) and (max-color-index: 8) {} -@media screen and (min-color-index:0 ) and (max-color-index: 8) {} +@media screen and (min-color-index: 0) and (max-color-index: 8) {} -@media screen and (color-index) and (min-color-index:6 ) and (max-color-index: 256) {} +@media screen and (color-index) and (min-color-index: 6) and (max-color-index: 256) {} diff --git a/test/fixtures/color.output.css b/test/fixtures/color.output.css index 6fa555a..148fcf9 100644 --- a/test/fixtures/color.output.css +++ b/test/fixtures/color.output.css @@ -1,5 +1,5 @@ @media screen and (min-color: 0) and (max-color: 8) {} -@media screen and (min-color:0 ) and (max-color: 8) {} +@media screen and (min-color: 0) and (max-color: 8) {} -@media screen and (color) and (min-color:6 ) and (max-color: 256) {} +@media screen and (color) and (min-color: 6) and (max-color: 256) {} diff --git a/test/fixtures/comment.output.css b/test/fixtures/comment.output.css index 392e66a..8f1637b 100644 --- a/test/fixtures/comment.output.css +++ b/test/fixtures/comment.output.css @@ -4,7 +4,7 @@ } } -@media screen and (min-width:500px ) and (max-width: 1200px) /* comment */{ +@media screen and (min-width: 500px) and (max-width: 1200px) /* comment */{ .bar { display: block; } diff --git a/test/fixtures/complex.output.css b/test/fixtures/complex.output.css index f425974..c4521b9 100644 --- a/test/fixtures/complex.output.css +++ b/test/fixtures/complex.output.css @@ -1,12 +1,12 @@ -@media screen and (not ( (min-width:200px ) and (max-width:499px))) {} +@media screen and (not ( (min-width: 200px) and (max-width: 499px))) {} -@media screen and not ( (min-width:200px ) and (max-width:499px)) {} +@media screen and not ( (min-width: 200px) and (max-width: 499px)) {} -@media (not ( (min-width:200px ) and (max-width:499px))) {} +@media (not ( (min-width: 200px) and (max-width: 499px))) {} -@media ((min-width: 300px) or ( (min-width:200px ) and (max-width:499px))) {} +@media ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499px))) {} -@media screen and (not ( (min-width:200px ) and (max-width:499px))), - screen and not ( (min-width:200px ) and (max-width:499px)), - (not ( (min-width:200px ) and (max-width:499px))), - ((min-width: 300px) or ( (min-width:200px ) and (max-width:499px))) {} +@media screen and (not ( (min-width: 200px) and (max-width: 499px))), + screen and not ( (min-width: 200px) and (max-width: 499px)), + (not ( (min-width: 200px) and (max-width: 499px))), + ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499px))) {} diff --git a/test/fixtures/device-aspect-ratio.output.css b/test/fixtures/device-aspect-ratio.output.css index cdbb74d..0f2dd9a 100644 --- a/test/fixtures/device-aspect-ratio.output.css +++ b/test/fixtures/device-aspect-ratio.output.css @@ -1,7 +1,7 @@ @media screen and (min-device-aspect-ratio: 1/1000) and (max-device-aspect-ratio: 16/9) {} -@media screen and (min-device-aspect-ratio:1 / 1000 ) and (max-device-aspect-ratio: 16 / 9) {} +@media screen and (min-device-aspect-ratio: 1 / 1000) and (max-device-aspect-ratio: 16 / 9) {} -@media screen and (min-device-aspect-ratio:0/0 ) and (max-device-aspect-ratio: 16/9) {} +@media screen and (min-device-aspect-ratio: 0/0) and (max-device-aspect-ratio: 16/9) {} -@media screen and (device-aspect-ratio) and (min-device-aspect-ratio:1 / 1000 ) and (max-device-aspect-ratio: 16 / 9) {} +@media screen and (device-aspect-ratio) and (min-device-aspect-ratio: 1 / 1000) and (max-device-aspect-ratio: 16 / 9) {} diff --git a/test/fixtures/device-width-height.output.css b/test/fixtures/device-width-height.output.css index 64fe2ed..836745d 100644 --- a/test/fixtures/device-width-height.output.css +++ b/test/fixtures/device-width-height.output.css @@ -1,16 +1,16 @@ @media screen and (min-device-width: 500px) and (max-device-width: 1200px) {} -@media screen and (min-device-width:500px ) and (max-device-width: 1200px) {} +@media screen and (min-device-width: 500px) and (max-device-width: 1200px) {} -@media screen and (min-device-width:0 ) and (max-device-width: 500.58px) {} +@media screen and (min-device-width: 0) and (max-device-width: 500.58px) {} -@media screen and (device-width) and (min-device-width:.08px ) and (max-device-width: 0.68px) {} +@media screen and (device-width) and (min-device-width: .08px) and (max-device-width: 0.68px) {} /* device-height */ @media screen and (min-device-height: 500px) and (max-device-height: 1200px) {} -@media screen and (min-device-height:500px ) and (max-device-height: 1200px) {} +@media screen and (min-device-height: 500px) and (max-device-height: 1200px) {} -@media screen and (min-device-height:0 ) and (max-device-height: 500.58px) {} +@media screen and (min-device-height: 0) and (max-device-height: 500.58px) {} -@media screen and (device-height) and (min-device-height:.08px ) and (max-device-height: 0.68px) {} +@media screen and (device-height) and (min-device-height: .08px) and (max-device-height: 0.68px) {} diff --git a/test/fixtures/line-break.output.css b/test/fixtures/line-break.output.css index c9d2de5..0b64c1b 100644 --- a/test/fixtures/line-break.output.css +++ b/test/fixtures/line-break.output.css @@ -10,7 +10,7 @@ and @media screen and -(min-width:1200px ) and (max-width: 500px) +(min-width: 1200px) and (max-width: 500px) and (hover) { .bar { diff --git a/test/fixtures/min-max.output.css b/test/fixtures/min-max.output.css index f8313e8..b3249f6 100644 --- a/test/fixtures/min-max.output.css +++ b/test/fixtures/min-max.output.css @@ -1,28 +1,28 @@ -@media screen and (min-width:501px) and (max-width:1199px) {} +@media screen and (min-width: 501px) and (max-width: 1199px) {} -@media screen and (min-width:501px) and (max-width:1199px) {} +@media screen and (min-width: 501px) and (max-width: 1199px) {} -@media screen and (min-width:40.001em) and (max-width:59.999em) {} +@media screen and (min-width: 40.001em) and (max-width: 59.999em) {} -@media screen and (min-width:13.801rem) and (max-width: 51.2rem) {} +@media screen and (min-width: 13.801rem) and (max-width: 51.2rem) {} -@media screen and (min-width:6.001in) and (max-width:8.999in) {} +@media screen and (min-width: 6.001in) and (max-width: 8.999in) {} -@media screen and (min-width:1px) and (max-width:500.579px) {} +@media screen and (min-width: 1px) and (max-width: 500.579px) {} -@media screen and (width) and (min-width:0.081px) and (max-width:0.679px) {} +@media screen and (width) and (min-width: 0.081px) and (max-width: 0.679px) {} /* height */ -@media screen and (min-height:501px) and (max-height:1199px) {} +@media screen and (min-height: 501px) and (max-height: 1199px) {} -@media screen and (min-height:501px) and (max-height:1199px) {} +@media screen and (min-height: 501px) and (max-height: 1199px) {} -@media screen and (min-height:40.001em) and (max-height:59.999em) {} +@media screen and (min-height: 40.001em) and (max-height: 59.999em) {} -@media screen and (min-height:13.8rem ) and (max-height:51.199rem) {} +@media screen and (min-height: 13.8rem) and (max-height: 51.199rem) {} -@media screen and (min-height:6.001in) and (max-height:8.999in) {} +@media screen and (min-height: 6.001in) and (max-height: 8.999in) {} -@media screen and (min-height:1px) and (max-height:500.579px) {} +@media screen and (min-height: 1px) and (max-height: 500.579px) {} -@media screen and (height) and (min-height:0.081px) and (max-height:0.679px) {} +@media screen and (height) and (min-height: 0.081px) and (max-height: 0.679px) {} diff --git a/test/fixtures/monochrome.output.css b/test/fixtures/monochrome.output.css index 6289e50..a034069 100644 --- a/test/fixtures/monochrome.output.css +++ b/test/fixtures/monochrome.output.css @@ -1,5 +1,5 @@ @media screen and (min-monochrome: 0) and (max-monochrome: 1000) {} -@media screen and (min-monochrome:0 ) and (max-monochrome: 1000) {} +@media screen and (min-monochrome: 0) and (max-monochrome: 1000) {} -@media screen and (monochrome) and (min-monochrome:1 ) and (max-monochrome: 300) {} +@media screen and (monochrome) and (min-monochrome: 1) and (max-monochrome: 300) {} diff --git a/test/fixtures/more-units.output.css b/test/fixtures/more-units.output.css index bbd0912..515bc92 100644 --- a/test/fixtures/more-units.output.css +++ b/test/fixtures/more-units.output.css @@ -10,5 +10,5 @@ @media screen and (resolution) { } @media screen and (min-resolution: 1000dpi) and (max-resolution: 3dppx) { } -@media screen and (min-resolution:1000000dpi ) and (max-resolution: 1000000dpcm) { } -@media screen and (min-resolution:1 / 1000 ) and (max-resolution: 16 /9) { } +@media screen and (min-resolution: 1000000dpi) and (max-resolution: 1000000dpcm) { } +@media screen and (min-resolution: 1 / 1000) and (max-resolution: 16 /9) { } diff --git a/test/fixtures/operators.output.css b/test/fixtures/operators.output.css index 139a090..f6ad1ee 100644 --- a/test/fixtures/operators.output.css +++ b/test/fixtures/operators.output.css @@ -1,35 +1,35 @@ -@media (max-width:299px) {} +@media (max-width: 299px) {} @media (max-width: 300px) {} @media (width: 300px) {} -@media (min-width:301px) {} +@media (min-width: 301px) {} @media (min-width: 300px) {} -@media (min-width:301px) {} +@media (min-width: 301px) {} -@media (min-width:300px ) {} +@media (min-width: 300px) {} -@media (width:300px ) {} +@media (width: 300px) {} -@media (max-width:299px) {} +@media (max-width: 299px) {} -@media (max-width:300px ) {} +@media (max-width: 300px) {} -@media (min-width:301px) and (max-width:999px) {} +@media (min-width: 301px) and (max-width: 999px) {} -@media (min-width:300px ) and (max-width:999px) {} +@media (min-width: 300px) and (max-width: 999px) {} -@media (min-width:301px) and (max-width: 1000px) {} +@media (min-width: 301px) and (max-width: 1000px) {} -@media (min-width:300px ) and (max-width: 1000px) {} +@media (min-width: 300px) and (max-width: 1000px) {} -@media (max-width:299px) and (min-width:1001px) {} +@media (max-width: 299px) and (min-width: 1001px) {} -@media (max-width:300px ) and (min-width:1001px) {} +@media (max-width: 300px) and (min-width: 1001px) {} -@media (max-width:299px) and (min-width: 1000px) {} +@media (max-width: 299px) and (min-width: 1000px) {} -@media (max-width:300px ) and (min-width: 1000px) {} +@media (max-width: 300px) and (min-width: 1000px) {} diff --git a/test/fixtures/other-name.output.css b/test/fixtures/other-name.output.css index 86985b8..c92af15 100644 --- a/test/fixtures/other-name.output.css +++ b/test/fixtures/other-name.output.css @@ -4,7 +4,7 @@ } } -@media screen and (min-width:500px ) and (max-width: 1200px) and (height) { +@media screen and (min-width: 500px) and (max-width: 1200px) and (height) { .bar { display: block; } diff --git a/test/fixtures/resolution.output.css b/test/fixtures/resolution.output.css index 93de8cd..2e577ff 100644 --- a/test/fixtures/resolution.output.css +++ b/test/fixtures/resolution.output.css @@ -1,7 +1,7 @@ @media screen and (min-resolution: 1dpi) and (max-resolution: 192dpi) {} -@media screen and (min-resolution:1.5dppx ) and (max-resolution: 3dppx) {} +@media screen and (min-resolution: 1.5dppx) and (max-resolution: 3dppx) {} -@media screen and (min-resolution:.5dppx ) and (max-resolution: 2.5dppx) {} +@media screen and (min-resolution: .5dppx) and (max-resolution: 2.5dppx) {} -@media screen and (resolution) and (min-resolution:10dpi ) and (max-resolution: 118dpcm) {} +@media screen and (resolution) and (min-resolution: 10dpi) and (max-resolution: 118dpcm) {} diff --git a/test/fixtures/shorthands.output.css b/test/fixtures/shorthands.output.css index 2ed43be..face0b5 100644 --- a/test/fixtures/shorthands.output.css +++ b/test/fixtures/shorthands.output.css @@ -1,11 +1,11 @@ -@media (max-width:1023px) and (min-width: 768px) {} -@media (min-width:768px ) and (max-width:1023px) {} +@media (max-width: 1023px) and (min-width: 768px) {} +@media (min-width: 768px) and (max-width: 1023px) {} -@media (max-width:1024px ) and (min-width:769px) {} -@media (min-width:769px) and (max-width: 1024px) {} +@media (max-width: 1024px) and (min-width: 769px) {} +@media (min-width: 769px) and (max-width: 1024px) {} -@media (max-width:1024px ) and (min-width: 768px) {} -@media (min-width:768px ) and (max-width: 1024px) {} +@media (max-width: 1024px) and (min-width: 768px) {} +@media (min-width: 768px) and (max-width: 1024px) {} -@media (max-width:1023px) and (min-width:769px) {} -@media (min-width:769px) and (max-width:1023px) {} +@media (max-width: 1023px) and (min-width: 769px) {} +@media (min-width: 769px) and (max-width: 1023px) {} diff --git a/test/fixtures/width-height.output.css b/test/fixtures/width-height.output.css index af26192..8608220 100644 --- a/test/fixtures/width-height.output.css +++ b/test/fixtures/width-height.output.css @@ -1,16 +1,16 @@ @media screen and (min-width: 500px) and (max-width: 1200px) {} -@media screen and (min-width:500px ) and (max-width: 1200px) {} +@media screen and (min-width: 500px) and (max-width: 1200px) {} -@media screen and (min-width:0 ) and (max-width: 500.58px) {} +@media screen and (min-width: 0) and (max-width: 500.58px) {} -@media screen and (width) and (min-width:.08px ) and (max-width: 0.68px) {} +@media screen and (width) and (min-width: .08px) and (max-width: 0.68px) {} /* height */ @media screen and (min-height: 500px) and (max-height: 1200px) {} -@media screen and (min-height:500px ) and (max-height: 1200px) {} +@media screen and (min-height: 500px) and (max-height: 1200px) {} -@media screen and (min-height:0 ) and (max-height: 500.58px) {} +@media screen and (min-height: 0) and (max-height: 500.58px) {} -@media screen and (height) and (min-height:.08px ) and (max-height: 0.68px) {} +@media screen and (height) and (min-height: .08px) and (max-height: 0.68px) {} From 7c3e810a469e696807787235b516859266ca7af4 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Mon, 16 Jan 2023 15:13:38 +0100 Subject: [PATCH 5/9] more output formatting --- dist/index.cjs | 2 +- dist/index.mjs | 2 +- src/transform.ts | 14 +++++++++++--- test/fixtures/calc.output.css | 8 ++++---- test/fixtures/operators.css | 6 ++++++ test/fixtures/operators.output.css | 14 ++++++++++---- test/fixtures/shorthands.output.css | 8 ++++---- 7 files changed, 37 insertions(+), 17 deletions(-) diff --git a/dist/index.cjs b/dist/index.cjs index 7e4c5f9..2f904a8 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1 +1 @@ -"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function a(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const r={">":1,"<":-1};function o(o,s,u,d){let p,l=u.before,c=u.after;if(d||(l=u.after,c=u.before),!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ)return Array.isArray(u.value)?i.newMediaFeaturePlain(a(s)+o,...l,...u.value.flatMap((e=>e.tokens())),...c):i.newMediaFeaturePlain(a(s)+o,...l,...u.value.tokens(),...c);if(!Array.isArray(u.value)||!i.matchesRatioExactly(u.value)){if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=r[s],a=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${a}`,-1,-1,{value:i,unit:a,type:n.NumberType.Integer}]}else{const i=r[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(a(s)+o,...l,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0],...c)}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+r[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*r[s]+"e6"))+"e-6")}else e=r[s],d=t[o.toLowerCase()];return!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString(),i.newMediaFeaturePlain(a(s)+o,...l,u,...c)}}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map((t=>{const a=e.gatherNodeAncestry(t);return t.walk((e=>{const r=e.node;if(!i.isMediaFeatureRange(r))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=r.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(r)||i.isMediaFeatureRangeValueName(r)){const e=r.operatorKind();if(!1===e)return;const n=o(d,e,r.value,i.isMediaFeatureRangeNameValue(r));return void(n&&(u.feature=n.feature))}const p=a.get(u);if(!i.isMediaInParens(p))return;let l=null,c=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,r.valueOne,!1);if(!n)return;l=n}{const e=r.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,r.valueTwo,!0);if(!n)return;c=n}const T=new i.MediaInParens(l),v=new i.MediaInParens(c),y=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,a);if(y)return y.leading===p?(y.leading=T,void(y.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...y.list])):void y.list.splice(y.indexOf(a.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],T),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const m=new i.MediaConditionListWithAnd(T,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let a=e;if(!a)return;if(a=t.get(a),!i.isMediaCondition(a))return;const r=a;if(a=t.get(a),!i.isMediaQuery(a))return;if(a!==n)return;return r}(p,t,a);f?f.media=m:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(m),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))})),t.toString()})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; +"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function a(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const r={">":1,"<":-1};function o(o,s,u,d){let p,T=u.before,l=u.after;if(d||(T=u.after,l=u.before),!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ)return Array.isArray(u.value)?i.newMediaFeaturePlain(a(s)+o,...T,...u.value.flatMap((e=>e.tokens())),...l):i.newMediaFeaturePlain(a(s)+o,...T,...u.value.tokens(),...l);if(!Array.isArray(u.value)||!i.matchesRatioExactly(u.value)){if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=r[s],a=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${a}`,-1,-1,{value:i,unit:a,type:n.NumberType.Integer}]}else{const i=r[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(a(s)+o,...T,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0],...l)}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+r[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*r[s]+"e6"))+"e-6")}else e=r[s],d=t[o.toLowerCase()];return!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString(),i.newMediaFeaturePlain(a(s)+o,...T,u,...l)}}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map((t=>{const a=e.gatherNodeAncestry(t);return t.walk((e=>{const r=e.node;if(!i.isMediaFeatureRange(r))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=r.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(r)||i.isMediaFeatureRangeValueName(r)){const e=r.operatorKind();if(!1===e)return;const n=o(d,e,r.value,i.isMediaFeatureRangeNameValue(r));return void(n&&(u.feature=n.feature))}const p=a.get(u);if(!i.isMediaInParens(p))return;let T=null,l=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,r.valueOne,!1);if(!n)return;e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?T=n:l=n}{const e=r.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,r.valueTwo,!0);if(!n)return;e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?l=n:T=n}const c=new i.MediaInParens(T),v=new i.MediaInParens(l),y=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,a);if(y)return y.leading===p?(y.leading=c,void(y.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...y.list])):void y.list.splice(y.indexOf(a.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],c),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const m=new i.MediaConditionListWithAnd(c,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let a=e;if(!a)return;if(a=t.get(a),!i.isMediaCondition(a))return;const r=a;if(a=t.get(a),!i.isMediaQuery(a))return;if(a!==n)return;return r}(p,t,a);f?f.media=m:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(m),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))})),t.toString()})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; diff --git a/dist/index.mjs b/dist/index.mjs index c064475..546f922 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1 +1 @@ -import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as r}from"@csstools/css-parser-algorithms";import{TokenType as n,NumberType as i}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as a,MediaFeatureLT as s,MediaFeatureGT as u,newMediaFeaturePlain as l,matchesRatioExactly as c,parse as d,isMediaFeatureRange as v,isMediaFeature as p,isMediaFeatureRangeNameValue as f,isMediaFeatureRangeValueName as m,isMediaInParens as h,MediaInParens as w,MediaAnd as g,MediaConditionListWithAnd as y,MediaCondition as O,isMediaConditionListWithAnd as W,isMediaAnd as x,isMediaCondition as b,isMediaQuery as T}from"@csstools/media-query-list-parser";const I={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function L(e){return e===s.LT||e===s.LT_OR_EQ?"max-":e===u.GT||e===u.GT_OR_EQ?"min-":""}const _={">":1,"<":-1};function A(r,d,v,p){let f,m=v.before,h=v.after;if(p||(m=v.after,h=v.before),!p){const e=o(d);if(!1===e)return;d=e}if(d===a.EQ||d===s.LT_OR_EQ||d===u.GT_OR_EQ)return Array.isArray(v.value)?l(L(d)+r,...m,...v.value.flatMap((e=>e.tokens())),...h):l(L(d)+r,...m,...v.value.tokens(),...h);if(!Array.isArray(v.value)||!c(v.value)){if(f=Array.isArray(v.value)?v.value.find((r=>e(r)||t(r))):v.value,e(f)&&"calc"===f.nameTokenValue().toLowerCase()){let e;if(I[r.toLowerCase()]){const t=_[d],o=I[r.toLowerCase()];e=[n.Dimension,`${t.toString()}${o}`,-1,-1,{value:t,unit:o,type:i.Integer}]}else{const t=_[d];e=[n.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return l(L(d)+r,...m,[n.Function,"calc(",-1,-1,{value:"calc("}],[n.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[n.Whitespace," ",-1,-1,void 0],[n.Delim,"+",-1,-1,void 0],[n.Whitespace," ",-1,-1,void 0],e,[n.CloseParen,")",-1,-1,void 0],...h)}if(t(f)){let e,t=f.value,o=!1;if(t[0]!==n.Dimension&&t[0]!==n.Number||0!==t[4].value)if(t[0]===n.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+_[d];else{if(t[0]!==n.Dimension&&t[0]!==n.Number)return;e=Number(Math.round(Number(t[4].value+.001*_[d]+"e6"))+"e-6")}else e=_[d],o=I[r.toLowerCase()];return!1!==o&&(t=[n.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:o,type:t[4].type}]),t[4].value=e,t[0]===n.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString(),l(L(d)+r,...m,t,...h)}}}const C=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function D(e){return d(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map((e=>{const t=r(e);return e.walk((r=>{const i=r.node;if(!v(i))return;const o=r.parent;if(!p(o))return;const a=i.name.getName();if(!C.has(a.toLowerCase()))return;if(f(i)||m(i)){const e=i.operatorKind();if(!1===e)return;const t=A(a,e,i.value,f(i));return void(t&&(o.feature=t.feature))}const s=t.get(o);if(!h(s))return;let u=null,l=null;{const e=i.valueOneOperatorKind();if(!1===e)return;const t=A(a,e,i.valueOne,!1);if(!t)return;u=t}{const e=i.valueTwoOperatorKind();if(!1===e)return;const t=A(a,e,i.valueTwo,!0);if(!t)return;l=t}const c=new w(u),d=new w(l),I=function(e,t){let r=e;if(!r)return;if(r=t.get(r),W(r))return r;if(!x(r))return;if(r=t.get(r),W(r))return r;return}(s,t);if(I)return I.leading===s?(I.leading=c,void(I.list=[new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d),...I.list])):void I.list.splice(I.indexOf(t.get(s)),1,new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],c),new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d));const L=new y(c,[new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d)],[[n.Whitespace," ",-1,-1,void 0]]),_=function(e,t,r){let n=e;if(!n)return;if(n=r.get(n),!b(n))return;const i=n;if(n=r.get(n),!T(n))return;if(n!==t)return;return i}(s,e,t);_?_.media=L:s.media=new O(new w(new O(L),[[n.Whitespace," ",-1,-1,void 0],[n.OpenParen,"(",-1,-1,void 0]],[[n.CloseParen,")",-1,-1,void 0]]))})),e.toString()})).join(",")}const E=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=D(e.params);e.params!==r&&(e.cloneBefore({params:r}),t.preserve||e.remove())}}}};E.postcss=!0;export{E as default}; +import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as r}from"@csstools/css-parser-algorithms";import{TokenType as n,NumberType as i}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as a,MediaFeatureLT as s,MediaFeatureGT as u,newMediaFeaturePlain as l,matchesRatioExactly as c,parse as d,isMediaFeatureRange as v,isMediaFeature as p,isMediaFeatureRangeNameValue as f,isMediaFeatureRangeValueName as m,isMediaInParens as h,MediaInParens as w,MediaAnd as g,MediaConditionListWithAnd as O,MediaCondition as y,isMediaConditionListWithAnd as T,isMediaAnd as L,isMediaCondition as W,isMediaQuery as _}from"@csstools/media-query-list-parser";const x={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function b(e){return e===s.LT||e===s.LT_OR_EQ?"max-":e===u.GT||e===u.GT_OR_EQ?"min-":""}const E={">":1,"<":-1};function I(r,d,v,p){let f,m=v.before,h=v.after;if(p||(m=v.after,h=v.before),!p){const e=o(d);if(!1===e)return;d=e}if(d===a.EQ||d===s.LT_OR_EQ||d===u.GT_OR_EQ)return Array.isArray(v.value)?l(b(d)+r,...m,...v.value.flatMap((e=>e.tokens())),...h):l(b(d)+r,...m,...v.value.tokens(),...h);if(!Array.isArray(v.value)||!c(v.value)){if(f=Array.isArray(v.value)?v.value.find((r=>e(r)||t(r))):v.value,e(f)&&"calc"===f.nameTokenValue().toLowerCase()){let e;if(x[r.toLowerCase()]){const t=E[d],o=x[r.toLowerCase()];e=[n.Dimension,`${t.toString()}${o}`,-1,-1,{value:t,unit:o,type:i.Integer}]}else{const t=E[d];e=[n.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return l(b(d)+r,...m,[n.Function,"calc(",-1,-1,{value:"calc("}],[n.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[n.Whitespace," ",-1,-1,void 0],[n.Delim,"+",-1,-1,void 0],[n.Whitespace," ",-1,-1,void 0],e,[n.CloseParen,")",-1,-1,void 0],...h)}if(t(f)){let e,t=f.value,o=!1;if(t[0]!==n.Dimension&&t[0]!==n.Number||0!==t[4].value)if(t[0]===n.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+E[d];else{if(t[0]!==n.Dimension&&t[0]!==n.Number)return;e=Number(Math.round(Number(t[4].value+.001*E[d]+"e6"))+"e-6")}else e=E[d],o=x[r.toLowerCase()];return!1!==o&&(t=[n.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:o,type:t[4].type}]),t[4].value=e,t[0]===n.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString(),l(b(d)+r,...m,t,...h)}}}const Q=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function A(e){return d(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map((e=>{const t=r(e);return e.walk((r=>{const i=r.node;if(!v(i))return;const o=r.parent;if(!p(o))return;const a=i.name.getName();if(!Q.has(a.toLowerCase()))return;if(f(i)||m(i)){const e=i.operatorKind();if(!1===e)return;const t=I(a,e,i.value,f(i));return void(t&&(o.feature=t.feature))}const u=t.get(o);if(!h(u))return;let l=null,c=null;{const e=i.valueOneOperatorKind();if(!1===e)return;const t=I(a,e,i.valueOne,!1);if(!t)return;e===s.LT||e===s.LT_OR_EQ?l=t:c=t}{const e=i.valueTwoOperatorKind();if(!1===e)return;const t=I(a,e,i.valueTwo,!0);if(!t)return;e===s.LT||e===s.LT_OR_EQ?c=t:l=t}const d=new w(l),x=new w(c),b=function(e,t){let r=e;if(!r)return;if(r=t.get(r),T(r))return r;if(!L(r))return;if(r=t.get(r),T(r))return r;return}(u,t);if(b)return b.leading===u?(b.leading=d,void(b.list=[new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],x),...b.list])):void b.list.splice(b.indexOf(t.get(u)),1,new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d),new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],x));const E=new O(d,[new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],x)],[[n.Whitespace," ",-1,-1,void 0]]),A=function(e,t,r){let n=e;if(!n)return;if(n=r.get(n),!W(n))return;const i=n;if(n=r.get(n),!_(n))return;if(n!==t)return;return i}(u,e,t);A?A.media=E:u.media=new y(new w(new y(E),[[n.Whitespace," ",-1,-1,void 0],[n.OpenParen,"(",-1,-1,void 0]],[[n.CloseParen,")",-1,-1,void 0]]))})),e.toString()})).join(",")}const C=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=A(e.params);e.params!==r&&(e.cloneBefore({params:r}),t.preserve||e.remove())}}}};C.postcss=!0;export{C as default}; diff --git a/src/transform.ts b/src/transform.ts index ccb1186..2887f8e 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -1,6 +1,6 @@ import { gatherNodeAncestry } from '@csstools/css-parser-algorithms'; import { TokenType } from '@csstools/css-tokenizer'; -import { isMediaAnd, isMediaCondition, isMediaConditionListWithAnd, isMediaFeature, isMediaFeatureRange, isMediaFeatureRangeNameValue, isMediaFeatureRangeValueName, isMediaInParens, isMediaQuery, MediaAnd, MediaCondition, MediaConditionListWithAnd, MediaFeature, MediaInParens, MediaQuery, parse } from '@csstools/media-query-list-parser'; +import { isMediaAnd, isMediaCondition, isMediaConditionListWithAnd, isMediaFeature, isMediaFeatureRange, isMediaFeatureRangeNameValue, isMediaFeatureRangeValueName, isMediaInParens, isMediaQuery, MediaAnd, MediaCondition, MediaConditionListWithAnd, MediaFeature, MediaInParens, MediaQuery, MediaFeatureLT, parse } from '@csstools/media-query-list-parser'; import { transformSingleNameValuePair } from './transform-single-pair'; const supportedFeatureNames = new Set([ @@ -77,7 +77,11 @@ export function transform(mediaQueryListString: string) { return; } - featureOne = transformed; + if (operator === MediaFeatureLT.LT || operator === MediaFeatureLT.LT_OR_EQ) { + featureOne = transformed; + } else { + featureTwo = transformed; + } } { @@ -91,7 +95,11 @@ export function transform(mediaQueryListString: string) { return; } - featureTwo = transformed; + if (operator === MediaFeatureLT.LT || operator === MediaFeatureLT.LT_OR_EQ) { + featureTwo = transformed; + } else { + featureOne = transformed; + } } const parensOne = new MediaInParens( diff --git a/test/fixtures/calc.output.css b/test/fixtures/calc.output.css index fb822f9..c7db89a 100644 --- a/test/fixtures/calc.output.css +++ b/test/fixtures/calc.output.css @@ -26,10 +26,10 @@ @media (min-width: calc(10px * 50)) and (max-width: calc(100px * 10)) {} -@media (max-width: calc((10px * 50) + -1px)) and (min-width: calc((100px * 10) + 1px)) {} +@media (min-width: calc((100px * 10) + 1px)) and (max-width: calc((10px * 50) + -1px)) {} -@media (max-width: calc(10px * 50)) and (min-width: calc((100px * 10) + 1px)) {} +@media (min-width: calc((100px * 10) + 1px)) and (max-width: calc(10px * 50)) {} -@media (max-width: calc((10px * 50) + -1px)) and (min-width: calc(100px * 10)) {} +@media (min-width: calc(100px * 10)) and (max-width: calc((10px * 50) + -1px)) {} -@media (max-width: calc(10px * 50)) and (min-width: calc(100px * 10)) {} +@media (min-width: calc(100px * 10)) and (max-width: calc(10px * 50)) {} diff --git a/test/fixtures/operators.css b/test/fixtures/operators.css index b7ca47a..8d41709 100644 --- a/test/fixtures/operators.css +++ b/test/fixtures/operators.css @@ -33,3 +33,9 @@ @media (300px > width >= 1000px) {} @media (300px >= width >= 1000px) {} + +@media (300px > width < 1000px) {} + +@media (300px < width > 1000px) {} + +@media (300px = width = 1000px) {} diff --git a/test/fixtures/operators.output.css b/test/fixtures/operators.output.css index f6ad1ee..d0349b4 100644 --- a/test/fixtures/operators.output.css +++ b/test/fixtures/operators.output.css @@ -26,10 +26,16 @@ @media (min-width: 300px) and (max-width: 1000px) {} -@media (max-width: 299px) and (min-width: 1001px) {} +@media (min-width: 1001px) and (max-width: 299px) {} -@media (max-width: 300px) and (min-width: 1001px) {} +@media (min-width: 1001px) and (max-width: 300px) {} -@media (max-width: 299px) and (min-width: 1000px) {} +@media (min-width: 1000px) and (max-width: 299px) {} -@media (max-width: 300px) and (min-width: 1000px) {} +@media (min-width: 1000px) and (max-width: 300px) {} + +@media (300px > width < 1000px) {} + +@media (300px < width > 1000px) {} + +@media (300px = width = 1000px) {} diff --git a/test/fixtures/shorthands.output.css b/test/fixtures/shorthands.output.css index face0b5..29000f7 100644 --- a/test/fixtures/shorthands.output.css +++ b/test/fixtures/shorthands.output.css @@ -1,11 +1,11 @@ -@media (max-width: 1023px) and (min-width: 768px) {} +@media (min-width: 768px) and (max-width: 1023px) {} @media (min-width: 768px) and (max-width: 1023px) {} -@media (max-width: 1024px) and (min-width: 769px) {} +@media (min-width: 769px) and (max-width: 1024px) {} @media (min-width: 769px) and (max-width: 1024px) {} -@media (max-width: 1024px) and (min-width: 768px) {} +@media (min-width: 768px) and (max-width: 1024px) {} @media (min-width: 768px) and (max-width: 1024px) {} -@media (max-width: 1023px) and (min-width: 769px) {} +@media (min-width: 769px) and (max-width: 1023px) {} @media (min-width: 769px) and (max-width: 1023px) {} From f6a797597d7d796e5626780ac0816fe737f0962e Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Mon, 16 Jan 2023 15:42:55 +0100 Subject: [PATCH 6/9] more whitespace handling --- dist/index.cjs | 2 +- dist/index.mjs | 2 +- src/transform.ts | 23 ++++++++++++++++++++--- test/fixtures/calc.output.css | 16 ++++++++-------- test/fixtures/complex.css | 2 ++ test/fixtures/complex.output.css | 18 ++++++++++-------- test/fixtures/operators.output.css | 16 ++++++++-------- test/fixtures/shorthands.css | 2 ++ test/fixtures/shorthands.output.css | 18 ++++++++++-------- 9 files changed, 62 insertions(+), 37 deletions(-) diff --git a/dist/index.cjs b/dist/index.cjs index 2f904a8..106c203 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1 +1 @@ -"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function a(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const r={">":1,"<":-1};function o(o,s,u,d){let p,T=u.before,l=u.after;if(d||(T=u.after,l=u.before),!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ)return Array.isArray(u.value)?i.newMediaFeaturePlain(a(s)+o,...T,...u.value.flatMap((e=>e.tokens())),...l):i.newMediaFeaturePlain(a(s)+o,...T,...u.value.tokens(),...l);if(!Array.isArray(u.value)||!i.matchesRatioExactly(u.value)){if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=r[s],a=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${a}`,-1,-1,{value:i,unit:a,type:n.NumberType.Integer}]}else{const i=r[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(a(s)+o,...T,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0],...l)}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+r[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*r[s]+"e6"))+"e-6")}else e=r[s],d=t[o.toLowerCase()];return!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString(),i.newMediaFeaturePlain(a(s)+o,...T,u,...l)}}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map((t=>{const a=e.gatherNodeAncestry(t);return t.walk((e=>{const r=e.node;if(!i.isMediaFeatureRange(r))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=r.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(r)||i.isMediaFeatureRangeValueName(r)){const e=r.operatorKind();if(!1===e)return;const n=o(d,e,r.value,i.isMediaFeatureRangeNameValue(r));return void(n&&(u.feature=n.feature))}const p=a.get(u);if(!i.isMediaInParens(p))return;let T=null,l=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,r.valueOne,!1);if(!n)return;e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?T=n:l=n}{const e=r.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,r.valueTwo,!0);if(!n)return;e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?l=n:T=n}const c=new i.MediaInParens(T),v=new i.MediaInParens(l),y=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,a);if(y)return y.leading===p?(y.leading=c,void(y.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...y.list])):void y.list.splice(y.indexOf(a.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],c),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const m=new i.MediaConditionListWithAnd(c,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let a=e;if(!a)return;if(a=t.get(a),!i.isMediaCondition(a))return;const r=a;if(a=t.get(a),!i.isMediaQuery(a))return;if(a!==n)return;return r}(p,t,a);f?f.media=m:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(m),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))})),t.toString()})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; +"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function a(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const r={">":1,"<":-1};function o(o,s,u,d){let p,T=u.before,c=u.after;if(d||(T=u.after,c=u.before),!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ)return Array.isArray(u.value)?i.newMediaFeaturePlain(a(s)+o,...T,...u.value.flatMap((e=>e.tokens())),...c):i.newMediaFeaturePlain(a(s)+o,...T,...u.value.tokens(),...c);if(!Array.isArray(u.value)||!i.matchesRatioExactly(u.value)){if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=r[s],a=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${a}`,-1,-1,{value:i,unit:a,type:n.NumberType.Integer}]}else{const i=r[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(a(s)+o,...T,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0],...c)}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+r[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*r[s]+"e6"))+"e-6")}else e=r[s],d=t[o.toLowerCase()];return!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString(),i.newMediaFeaturePlain(a(s)+o,...T,u,...c)}}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map(((t,a)=>{const r=e.gatherNodeAncestry(t);t.walk((e=>{const a=e.node;if(!i.isMediaFeatureRange(a))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=a.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(a)||i.isMediaFeatureRangeValueName(a)){const e=a.operatorKind();if(!1===e)return;const n=o(d,e,a.value,i.isMediaFeatureRangeNameValue(a));return void(n&&(u.feature=n.feature))}const p=r.get(u);if(!i.isMediaInParens(p))return;let T=null,c=null;{const e=a.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,a.valueOne,!1);if(!n)return;e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?T=n:c=n}{const e=a.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,a.valueTwo,!0);if(!n)return;e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?c=n:T=n}const l=new i.MediaInParens(T),v=new i.MediaInParens(c),y=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,r);if(y)return y.leading===p?(y.leading=l,void(y.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...y.list])):void y.list.splice(y.indexOf(r.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],l),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const m=new i.MediaConditionListWithAnd(l,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let a=e;if(!a)return;if(a=t.get(a),!i.isMediaCondition(a))return;const r=a;if(a=t.get(a),!i.isMediaQuery(a))return;if(a!==n)return;return r}(p,t,r);f?f.media=m:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(m),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))}));const u=t.tokens();return n.stringify(...u.filter(((e,i)=>(0!==i||0!==a||e[0]!==n.TokenType.Whitespace)&&(e[0]!==n.TokenType.Whitespace||!u[i+1]||u[i+1][0]!==n.TokenType.Whitespace))))})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; diff --git a/dist/index.mjs b/dist/index.mjs index 546f922..aa62019 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1 +1 @@ -import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as r}from"@csstools/css-parser-algorithms";import{TokenType as n,NumberType as i}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as a,MediaFeatureLT as s,MediaFeatureGT as u,newMediaFeaturePlain as l,matchesRatioExactly as c,parse as d,isMediaFeatureRange as v,isMediaFeature as p,isMediaFeatureRangeNameValue as f,isMediaFeatureRangeValueName as m,isMediaInParens as h,MediaInParens as w,MediaAnd as g,MediaConditionListWithAnd as O,MediaCondition as y,isMediaConditionListWithAnd as T,isMediaAnd as L,isMediaCondition as W,isMediaQuery as _}from"@csstools/media-query-list-parser";const x={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function b(e){return e===s.LT||e===s.LT_OR_EQ?"max-":e===u.GT||e===u.GT_OR_EQ?"min-":""}const E={">":1,"<":-1};function I(r,d,v,p){let f,m=v.before,h=v.after;if(p||(m=v.after,h=v.before),!p){const e=o(d);if(!1===e)return;d=e}if(d===a.EQ||d===s.LT_OR_EQ||d===u.GT_OR_EQ)return Array.isArray(v.value)?l(b(d)+r,...m,...v.value.flatMap((e=>e.tokens())),...h):l(b(d)+r,...m,...v.value.tokens(),...h);if(!Array.isArray(v.value)||!c(v.value)){if(f=Array.isArray(v.value)?v.value.find((r=>e(r)||t(r))):v.value,e(f)&&"calc"===f.nameTokenValue().toLowerCase()){let e;if(x[r.toLowerCase()]){const t=E[d],o=x[r.toLowerCase()];e=[n.Dimension,`${t.toString()}${o}`,-1,-1,{value:t,unit:o,type:i.Integer}]}else{const t=E[d];e=[n.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return l(b(d)+r,...m,[n.Function,"calc(",-1,-1,{value:"calc("}],[n.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[n.Whitespace," ",-1,-1,void 0],[n.Delim,"+",-1,-1,void 0],[n.Whitespace," ",-1,-1,void 0],e,[n.CloseParen,")",-1,-1,void 0],...h)}if(t(f)){let e,t=f.value,o=!1;if(t[0]!==n.Dimension&&t[0]!==n.Number||0!==t[4].value)if(t[0]===n.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+E[d];else{if(t[0]!==n.Dimension&&t[0]!==n.Number)return;e=Number(Math.round(Number(t[4].value+.001*E[d]+"e6"))+"e-6")}else e=E[d],o=x[r.toLowerCase()];return!1!==o&&(t=[n.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:o,type:t[4].type}]),t[4].value=e,t[0]===n.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString(),l(b(d)+r,...m,t,...h)}}}const Q=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function A(e){return d(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map((e=>{const t=r(e);return e.walk((r=>{const i=r.node;if(!v(i))return;const o=r.parent;if(!p(o))return;const a=i.name.getName();if(!Q.has(a.toLowerCase()))return;if(f(i)||m(i)){const e=i.operatorKind();if(!1===e)return;const t=I(a,e,i.value,f(i));return void(t&&(o.feature=t.feature))}const u=t.get(o);if(!h(u))return;let l=null,c=null;{const e=i.valueOneOperatorKind();if(!1===e)return;const t=I(a,e,i.valueOne,!1);if(!t)return;e===s.LT||e===s.LT_OR_EQ?l=t:c=t}{const e=i.valueTwoOperatorKind();if(!1===e)return;const t=I(a,e,i.valueTwo,!0);if(!t)return;e===s.LT||e===s.LT_OR_EQ?c=t:l=t}const d=new w(l),x=new w(c),b=function(e,t){let r=e;if(!r)return;if(r=t.get(r),T(r))return r;if(!L(r))return;if(r=t.get(r),T(r))return r;return}(u,t);if(b)return b.leading===u?(b.leading=d,void(b.list=[new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],x),...b.list])):void b.list.splice(b.indexOf(t.get(u)),1,new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d),new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],x));const E=new O(d,[new g([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],x)],[[n.Whitespace," ",-1,-1,void 0]]),A=function(e,t,r){let n=e;if(!n)return;if(n=r.get(n),!W(n))return;const i=n;if(n=r.get(n),!_(n))return;if(n!==t)return;return i}(u,e,t);A?A.media=E:u.media=new y(new w(new y(E),[[n.Whitespace," ",-1,-1,void 0],[n.OpenParen,"(",-1,-1,void 0]],[[n.CloseParen,")",-1,-1,void 0]]))})),e.toString()})).join(",")}const C=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=A(e.params);e.params!==r&&(e.cloneBefore({params:r}),t.preserve||e.remove())}}}};C.postcss=!0;export{C as default}; +import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as r}from"@csstools/css-parser-algorithms";import{TokenType as n,NumberType as i,stringify as o}from"@csstools/css-tokenizer";import{invertComparison as a,MediaFeatureEQ as s,MediaFeatureLT as u,MediaFeatureGT as c,newMediaFeaturePlain as l,matchesRatioExactly as d,parse as v,isMediaFeatureRange as p,isMediaFeature as f,isMediaFeatureRangeNameValue as m,isMediaFeatureRangeValueName as h,isMediaInParens as w,MediaInParens as g,MediaAnd as W,MediaConditionListWithAnd as O,MediaCondition as y,isMediaConditionListWithAnd as T,isMediaAnd as L,isMediaCondition as _,isMediaQuery as x}from"@csstools/media-query-list-parser";const b={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function E(e){return e===u.LT||e===u.LT_OR_EQ?"max-":e===c.GT||e===c.GT_OR_EQ?"min-":""}const I={">":1,"<":-1};function Q(r,o,v,p){let f,m=v.before,h=v.after;if(p||(m=v.after,h=v.before),!p){const e=a(o);if(!1===e)return;o=e}if(o===s.EQ||o===u.LT_OR_EQ||o===c.GT_OR_EQ)return Array.isArray(v.value)?l(E(o)+r,...m,...v.value.flatMap((e=>e.tokens())),...h):l(E(o)+r,...m,...v.value.tokens(),...h);if(!Array.isArray(v.value)||!d(v.value)){if(f=Array.isArray(v.value)?v.value.find((r=>e(r)||t(r))):v.value,e(f)&&"calc"===f.nameTokenValue().toLowerCase()){let e;if(b[r.toLowerCase()]){const t=I[o],a=b[r.toLowerCase()];e=[n.Dimension,`${t.toString()}${a}`,-1,-1,{value:t,unit:a,type:i.Integer}]}else{const t=I[o];e=[n.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return l(E(o)+r,...m,[n.Function,"calc(",-1,-1,{value:"calc("}],[n.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[n.Whitespace," ",-1,-1,void 0],[n.Delim,"+",-1,-1,void 0],[n.Whitespace," ",-1,-1,void 0],e,[n.CloseParen,")",-1,-1,void 0],...h)}if(t(f)){let e,t=f.value,a=!1;if(t[0]!==n.Dimension&&t[0]!==n.Number||0!==t[4].value)if(t[0]===n.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+I[o];else{if(t[0]!==n.Dimension&&t[0]!==n.Number)return;e=Number(Math.round(Number(t[4].value+.001*I[o]+"e6"))+"e-6")}else e=I[o],a=b[r.toLowerCase()];return!1!==a&&(t=[n.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:a,type:t[4].type}]),t[4].value=e,t[0]===n.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString(),l(E(o)+r,...m,t,...h)}}}const k=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function A(e){return v(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map(((e,t)=>{const i=r(e);e.walk((t=>{const r=t.node;if(!p(r))return;const o=t.parent;if(!f(o))return;const a=r.name.getName();if(!k.has(a.toLowerCase()))return;if(m(r)||h(r)){const e=r.operatorKind();if(!1===e)return;const t=Q(a,e,r.value,m(r));return void(t&&(o.feature=t.feature))}const s=i.get(o);if(!w(s))return;let c=null,l=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const t=Q(a,e,r.valueOne,!1);if(!t)return;e===u.LT||e===u.LT_OR_EQ?c=t:l=t}{const e=r.valueTwoOperatorKind();if(!1===e)return;const t=Q(a,e,r.valueTwo,!0);if(!t)return;e===u.LT||e===u.LT_OR_EQ?l=t:c=t}const d=new g(c),v=new g(l),b=function(e,t){let r=e;if(!r)return;if(r=t.get(r),T(r))return r;if(!L(r))return;if(r=t.get(r),T(r))return r;return}(s,i);if(b)return b.leading===s?(b.leading=d,void(b.list=[new W([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],v),...b.list])):void b.list.splice(b.indexOf(i.get(s)),1,new W([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d),new W([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],v));const E=new O(d,[new W([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],v)],[[n.Whitespace," ",-1,-1,void 0]]),I=function(e,t,r){let n=e;if(!n)return;if(n=r.get(n),!_(n))return;const i=n;if(n=r.get(n),!x(n))return;if(n!==t)return;return i}(s,e,i);I?I.media=E:s.media=new y(new g(new y(E),[[n.Whitespace," ",-1,-1,void 0],[n.OpenParen,"(",-1,-1,void 0]],[[n.CloseParen,")",-1,-1,void 0]]))}));const a=e.tokens();return o(...a.filter(((e,r)=>(0!==r||0!==t||e[0]!==n.Whitespace)&&(e[0]!==n.Whitespace||!a[r+1]||a[r+1][0]!==n.Whitespace))))})).join(",")}const C=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=A(e.params);e.params!==r&&(e.cloneBefore({params:r}),t.preserve||e.remove())}}}};C.postcss=!0;export{C as default}; diff --git a/src/transform.ts b/src/transform.ts index 2887f8e..e69ba39 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -1,5 +1,5 @@ import { gatherNodeAncestry } from '@csstools/css-parser-algorithms'; -import { TokenType } from '@csstools/css-tokenizer'; +import { stringify, TokenType } from '@csstools/css-tokenizer'; import { isMediaAnd, isMediaCondition, isMediaConditionListWithAnd, isMediaFeature, isMediaFeatureRange, isMediaFeatureRangeNameValue, isMediaFeatureRangeValueName, isMediaInParens, isMediaQuery, MediaAnd, MediaCondition, MediaConditionListWithAnd, MediaFeature, MediaInParens, MediaQuery, MediaFeatureLT, parse } from '@csstools/media-query-list-parser'; import { transformSingleNameValuePair } from './transform-single-pair'; @@ -26,7 +26,7 @@ export function transform(mediaQueryListString: string) { }, }); - return mediaQueries.map((mediaQuery) => { + return mediaQueries.map((mediaQuery, mediaQueryIndex) => { const ancestry = gatherNodeAncestry(mediaQuery); mediaQuery.walk((entry) => { @@ -199,7 +199,24 @@ export function transform(mediaQueryListString: string) { ); }); - return mediaQuery.toString(); + const tokens = mediaQuery.tokens(); + return stringify( + ...tokens.filter((x, i) => { + // The algorithms above will err on the side of caution and might insert to much whitespace. + + if (i === 0 && mediaQueryIndex === 0 && x[0] === TokenType.Whitespace) { + // Trim leading whitespace from the first media query. + return false; + } + + if (x[0] === TokenType.Whitespace && tokens[i + 1] && tokens[i + 1][0] === TokenType.Whitespace) { + // Collapse multiple sequential whitespace tokens + return false; + } + + return true; + }) + ); }).join(','); } diff --git a/test/fixtures/calc.output.css b/test/fixtures/calc.output.css index c7db89a..94a5d7e 100644 --- a/test/fixtures/calc.output.css +++ b/test/fixtures/calc.output.css @@ -18,18 +18,18 @@ @media (max-width: calc(10px * 50)) {} -@media (min-width: calc((10px * 50) + 1px)) and (max-width: calc((100px * 10) + -1px)) {} +@media (min-width: calc((10px * 50) + 1px)) and (max-width: calc((100px * 10) + -1px)) {} -@media (min-width: calc(10px * 50)) and (max-width: calc((100px * 10) + -1px)) {} +@media (min-width: calc(10px * 50)) and (max-width: calc((100px * 10) + -1px)) {} -@media (min-width: calc((10px * 50) + 1px)) and (max-width: calc(100px * 10)) {} +@media (min-width: calc((10px * 50) + 1px)) and (max-width: calc(100px * 10)) {} -@media (min-width: calc(10px * 50)) and (max-width: calc(100px * 10)) {} +@media (min-width: calc(10px * 50)) and (max-width: calc(100px * 10)) {} -@media (min-width: calc((100px * 10) + 1px)) and (max-width: calc((10px * 50) + -1px)) {} +@media (min-width: calc((100px * 10) + 1px)) and (max-width: calc((10px * 50) + -1px)) {} -@media (min-width: calc((100px * 10) + 1px)) and (max-width: calc(10px * 50)) {} +@media (min-width: calc((100px * 10) + 1px)) and (max-width: calc(10px * 50)) {} -@media (min-width: calc(100px * 10)) and (max-width: calc((10px * 50) + -1px)) {} +@media (min-width: calc(100px * 10)) and (max-width: calc((10px * 50) + -1px)) {} -@media (min-width: calc(100px * 10)) and (max-width: calc(10px * 50)) {} +@media (min-width: calc(100px * 10)) and (max-width: calc(10px * 50)) {} diff --git a/test/fixtures/complex.css b/test/fixtures/complex.css index d542106..1173450 100644 --- a/test/fixtures/complex.css +++ b/test/fixtures/complex.css @@ -1,5 +1,7 @@ @media screen and (not (200px <=width < 500px)) {} +@media (min-height: 500px) and (200px <= width < 500px) {} + @media screen and not (200px <=width < 500px) {} @media (not (200px <=width < 500px)) {} diff --git a/test/fixtures/complex.output.css b/test/fixtures/complex.output.css index c4521b9..c1782ed 100644 --- a/test/fixtures/complex.output.css +++ b/test/fixtures/complex.output.css @@ -1,12 +1,14 @@ -@media screen and (not ( (min-width: 200px) and (max-width: 499px))) {} +@media screen and (not ( (min-width: 200px) and (max-width: 499px))) {} -@media screen and not ( (min-width: 200px) and (max-width: 499px)) {} +@media (min-height: 500px) and (min-width: 200px) and (max-width: 499px) {} -@media (not ( (min-width: 200px) and (max-width: 499px))) {} +@media screen and not ( (min-width: 200px) and (max-width: 499px)) {} -@media ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499px))) {} +@media (not ( (min-width: 200px) and (max-width: 499px))) {} -@media screen and (not ( (min-width: 200px) and (max-width: 499px))), - screen and not ( (min-width: 200px) and (max-width: 499px)), - (not ( (min-width: 200px) and (max-width: 499px))), - ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499px))) {} +@media ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499px))) {} + +@media screen and (not ( (min-width: 200px) and (max-width: 499px))), + screen and not ( (min-width: 200px) and (max-width: 499px)), + (not ( (min-width: 200px) and (max-width: 499px))), + ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499px))) {} diff --git a/test/fixtures/operators.output.css b/test/fixtures/operators.output.css index d0349b4..7ffbbb0 100644 --- a/test/fixtures/operators.output.css +++ b/test/fixtures/operators.output.css @@ -18,21 +18,21 @@ @media (max-width: 300px) {} -@media (min-width: 301px) and (max-width: 999px) {} +@media (min-width: 301px) and (max-width: 999px) {} -@media (min-width: 300px) and (max-width: 999px) {} +@media (min-width: 300px) and (max-width: 999px) {} -@media (min-width: 301px) and (max-width: 1000px) {} +@media (min-width: 301px) and (max-width: 1000px) {} -@media (min-width: 300px) and (max-width: 1000px) {} +@media (min-width: 300px) and (max-width: 1000px) {} -@media (min-width: 1001px) and (max-width: 299px) {} +@media (min-width: 1001px) and (max-width: 299px) {} -@media (min-width: 1001px) and (max-width: 300px) {} +@media (min-width: 1001px) and (max-width: 300px) {} -@media (min-width: 1000px) and (max-width: 299px) {} +@media (min-width: 1000px) and (max-width: 299px) {} -@media (min-width: 1000px) and (max-width: 300px) {} +@media (min-width: 1000px) and (max-width: 300px) {} @media (300px > width < 1000px) {} diff --git a/test/fixtures/shorthands.css b/test/fixtures/shorthands.css index 4212ca8..5c53edf 100644 --- a/test/fixtures/shorthands.css +++ b/test/fixtures/shorthands.css @@ -9,3 +9,5 @@ @media (1024px > width > 768px) {} @media (768px < width < 1024px) {} + +@media (1024px > width > 768px), (768px < width < 1024px) {} diff --git a/test/fixtures/shorthands.output.css b/test/fixtures/shorthands.output.css index 29000f7..21d0478 100644 --- a/test/fixtures/shorthands.output.css +++ b/test/fixtures/shorthands.output.css @@ -1,11 +1,13 @@ -@media (min-width: 768px) and (max-width: 1023px) {} -@media (min-width: 768px) and (max-width: 1023px) {} +@media (min-width: 768px) and (max-width: 1023px) {} +@media (min-width: 768px) and (max-width: 1023px) {} -@media (min-width: 769px) and (max-width: 1024px) {} -@media (min-width: 769px) and (max-width: 1024px) {} +@media (min-width: 769px) and (max-width: 1024px) {} +@media (min-width: 769px) and (max-width: 1024px) {} -@media (min-width: 768px) and (max-width: 1024px) {} -@media (min-width: 768px) and (max-width: 1024px) {} +@media (min-width: 768px) and (max-width: 1024px) {} +@media (min-width: 768px) and (max-width: 1024px) {} -@media (min-width: 769px) and (max-width: 1023px) {} -@media (min-width: 769px) and (max-width: 1023px) {} +@media (min-width: 769px) and (max-width: 1023px) {} +@media (min-width: 769px) and (max-width: 1023px) {} + +@media (min-width: 769px) and (max-width: 1023px), (min-width: 769px) and (max-width: 1023px) {} From 09dc24f4f21506e93adad65a3e9ef28561a9991c Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Mon, 16 Jan 2023 15:52:29 +0100 Subject: [PATCH 7/9] illustrate ratio issue --- test/fixtures/aspect-ratio.css | 2 ++ test/fixtures/aspect-ratio.output.css | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/fixtures/aspect-ratio.css b/test/fixtures/aspect-ratio.css index 85264be..a7cd2e0 100644 --- a/test/fixtures/aspect-ratio.css +++ b/test/fixtures/aspect-ratio.css @@ -5,3 +5,5 @@ @media screen and (0/0 <= aspect-ratio <= 16/9) {} @media screen and (aspect-ratio) and (1 / 1000 <= aspect-ratio <= 16 / 9) {} + +@media screen and (0/0 < aspect-ratio < 16/9) {} diff --git a/test/fixtures/aspect-ratio.output.css b/test/fixtures/aspect-ratio.output.css index bd8a56f..beb8514 100644 --- a/test/fixtures/aspect-ratio.output.css +++ b/test/fixtures/aspect-ratio.output.css @@ -5,3 +5,5 @@ @media screen and (min-aspect-ratio: 0/0) and (max-aspect-ratio: 16/9) {} @media screen and (aspect-ratio) and (min-aspect-ratio: 1 / 1000) and (max-aspect-ratio: 16 / 9) {} + +@media screen and (0/0 < aspect-ratio < 16/9) {} From 778d7430a338a7a8629933f1b8b3f64863bada2d Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Thu, 19 Jan 2023 23:01:54 +0100 Subject: [PATCH 8/9] cleanup --- dist/index.cjs | 2 +- dist/index.d.ts | 5 +-- dist/index.mjs | 2 +- dist/transform.d.ts | 3 +- package.json | 6 ++-- src/index.ts | 52 ++++++++++++++++++--------- src/transform-single-pair.ts | 2 +- src/transform.ts | 15 ++++---- test/fixtures/custom-media.css | 9 +++++ test/fixtures/custom-media.output.css | 9 +++++ test/index.js | 6 ++++ yarn.lock | 24 ++++++------- 12 files changed, 86 insertions(+), 49 deletions(-) create mode 100644 test/fixtures/custom-media.css create mode 100644 test/fixtures/custom-media.output.css diff --git a/dist/index.cjs b/dist/index.cjs index 106c203..f5cb113 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1 +1 @@ -"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-tokenizer"),i=require("@csstools/media-query-list-parser");const t={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function a(e){return e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?"max-":e===i.MediaFeatureGT.GT||e===i.MediaFeatureGT.GT_OR_EQ?"min-":""}const r={">":1,"<":-1};function o(o,s,u,d){let p,T=u.before,c=u.after;if(d||(T=u.after,c=u.before),!d){const e=i.invertComparison(s);if(!1===e)return;s=e}if(s===i.MediaFeatureEQ.EQ||s===i.MediaFeatureLT.LT_OR_EQ||s===i.MediaFeatureGT.GT_OR_EQ)return Array.isArray(u.value)?i.newMediaFeaturePlain(a(s)+o,...T,...u.value.flatMap((e=>e.tokens())),...c):i.newMediaFeaturePlain(a(s)+o,...T,...u.value.tokens(),...c);if(!Array.isArray(u.value)||!i.matchesRatioExactly(u.value)){if(p=Array.isArray(u.value)?u.value.find((n=>e.isFunctionNode(n)||e.isTokenNode(n))):u.value,e.isFunctionNode(p)&&"calc"===p.nameTokenValue().toLowerCase()){let e;if(t[o.toLowerCase()]){const i=r[s],a=t[o.toLowerCase()];e=[n.TokenType.Dimension,`${i.toString()}${a}`,-1,-1,{value:i,unit:a,type:n.NumberType.Integer}]}else{const i=r[s];e=[n.TokenType.Number,i.toString(),-1,-1,{value:i,type:n.NumberType.Integer}]}return i.newMediaFeaturePlain(a(s)+o,...T,[n.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[n.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Delim,"+",-1,-1,void 0],[n.TokenType.Whitespace," ",-1,-1,void 0],e,[n.TokenType.CloseParen,")",-1,-1,void 0],...c)}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number||0!==u[4].value)if(u[0]===n.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===n.NumberType.Integer)e=u[4].value+r[s];else{if(u[0]!==n.TokenType.Dimension&&u[0]!==n.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*r[s]+"e6"))+"e-6")}else e=r[s],d=t[o.toLowerCase()];return!1!==d&&(u=[n.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===n.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString(),i.newMediaFeaturePlain(a(s)+o,...T,u,...c)}}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(t){return i.parse(t,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${t}"`)}}).map(((t,a)=>{const r=e.gatherNodeAncestry(t);t.walk((e=>{const a=e.node;if(!i.isMediaFeatureRange(a))return;const u=e.parent;if(!i.isMediaFeature(u))return;const d=a.name.getName();if(!s.has(d.toLowerCase()))return;if(i.isMediaFeatureRangeNameValue(a)||i.isMediaFeatureRangeValueName(a)){const e=a.operatorKind();if(!1===e)return;const n=o(d,e,a.value,i.isMediaFeatureRangeNameValue(a));return void(n&&(u.feature=n.feature))}const p=r.get(u);if(!i.isMediaInParens(p))return;let T=null,c=null;{const e=a.valueOneOperatorKind();if(!1===e)return;const n=o(d,e,a.valueOne,!1);if(!n)return;e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?T=n:c=n}{const e=a.valueTwoOperatorKind();if(!1===e)return;const n=o(d,e,a.valueTwo,!0);if(!n)return;e===i.MediaFeatureLT.LT||e===i.MediaFeatureLT.LT_OR_EQ?c=n:T=n}const l=new i.MediaInParens(T),v=new i.MediaInParens(c),y=function(e,n){let t=e;if(!t)return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;if(!i.isMediaAnd(t))return;if(t=n.get(t),i.isMediaConditionListWithAnd(t))return t;return}(p,r);if(y)return y.leading===p?(y.leading=l,void(y.list=[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v),...y.list])):void y.list.splice(y.indexOf(r.get(p)),1,new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],l),new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v));const m=new i.MediaConditionListWithAnd(l,[new i.MediaAnd([[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.Ident,"and",-1,-1,{value:"and"}],[n.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[n.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,n,t){let a=e;if(!a)return;if(a=t.get(a),!i.isMediaCondition(a))return;const r=a;if(a=t.get(a),!i.isMediaQuery(a))return;if(a!==n)return;return r}(p,t,r);f?f.media=m:p.media=new i.MediaCondition(new i.MediaInParens(new i.MediaCondition(m),[[n.TokenType.Whitespace," ",-1,-1,void 0],[n.TokenType.OpenParen,"(",-1,-1,void 0]],[[n.TokenType.CloseParen,")",-1,-1,void 0]]))}));const u=t.tokens();return n.stringify(...u.filter(((e,i)=>(0!==i||0!==a||e[0]!==n.TokenType.Whitespace)&&(e[0]!==n.TokenType.Whitespace||!u[i+1]||u[i+1][0]!==n.TokenType.Whitespace))))})).join(",")}const d=e=>{const n=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(e.params);e.params!==i&&(e.cloneBefore({params:i}),n.preserve||e.remove())}}}};d.postcss=!0,module.exports=d; +"use strict";var e=require("@csstools/css-parser-algorithms"),i=require("@csstools/css-tokenizer"),n=require("@csstools/media-query-list-parser");const a={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function r(e){return e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?"max-":e===n.MediaFeatureGT.GT||e===n.MediaFeatureGT.GT_OR_EQ?"min-":""}const t={">":1,"<":-1};function o(o,s,u,d){let p,T=u.before,c=u.after;if(d||(T=u.after,c=u.before),!d){const e=n.invertComparison(s);if(!1===e)return;s=e}if(s===n.MediaFeatureEQ.EQ||s===n.MediaFeatureLT.LT_OR_EQ||s===n.MediaFeatureGT.GT_OR_EQ)return Array.isArray(u.value)?n.newMediaFeaturePlain(r(s)+o,...T,...u.value.flatMap((e=>e.tokens())),...c):n.newMediaFeaturePlain(r(s)+o,...T,...u.value.tokens(),...c);if(!Array.isArray(u.value)||!n.matchesRatioExactly(u.value)){if(p=Array.isArray(u.value)?u.value.find((i=>e.isFunctionNode(i)||e.isTokenNode(i))):u.value,e.isFunctionNode(p)&&"calc"===p.getName().toLowerCase()){let e;if(a[o.toLowerCase()]){const n=t[s],r=a[o.toLowerCase()];e=[i.TokenType.Dimension,`${n.toString()}${r}`,-1,-1,{value:n,unit:r,type:i.NumberType.Integer}]}else{const n=t[s];e=[i.TokenType.Number,n.toString(),-1,-1,{value:n,type:i.NumberType.Integer}]}return n.newMediaFeaturePlain(r(s)+o,...T,[i.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[i.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Delim,"+",-1,-1,void 0],[i.TokenType.Whitespace," ",-1,-1,void 0],e,[i.TokenType.CloseParen,")",-1,-1,void 0],...c)}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==i.TokenType.Dimension&&u[0]!==i.TokenType.Number||0!==u[4].value)if(u[0]===i.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===i.NumberType.Integer)e=u[4].value+t[s];else{if(u[0]!==i.TokenType.Dimension&&u[0]!==i.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*t[s]+"e6"))+"e-6")}else e=t[s],d=a[o.toLowerCase()];return!1!==d&&(u=[i.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===i.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString(),n.newMediaFeaturePlain(r(s)+o,...T,u,...c)}}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(a){return a.map(((a,r)=>{const t=e.gatherNodeAncestry(a);a.walk((e=>{const r=e.node;if(!n.isMediaFeatureRange(r))return;const u=e.parent;if(!n.isMediaFeature(u))return;const d=r.name.getName();if(!s.has(d.toLowerCase()))return;if(n.isMediaFeatureRangeNameValue(r)||n.isMediaFeatureRangeValueName(r)){const e=r.operatorKind();if(!1===e)return;const i=o(d,e,r.value,n.isMediaFeatureRangeNameValue(r));return void(i&&(u.feature=i.feature))}const p=t.get(u);if(!n.isMediaInParens(p))return;let T=null,c=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const i=o(d,e,r.valueOne,!1);if(!i)return;e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?(T=i,T.before=u.before):(c=i,c.after=u.after)}{const e=r.valueTwoOperatorKind();if(!1===e)return;const i=o(d,e,r.valueTwo,!0);if(!i)return;e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?(c=i,c.before=u.before):(T=i,T.after=u.after)}const l=new n.MediaInParens(T),v=new n.MediaInParens(c),m=function(e,i){let a=e;if(!a)return;if(a=i.get(a),n.isMediaConditionListWithAnd(a))return a;if(!n.isMediaAnd(a))return;if(a=i.get(a),n.isMediaConditionListWithAnd(a))return a;return}(p,t);if(m)return m.leading===p?(m.leading=l,void(m.list=[new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],v),...m.list])):void m.list.splice(m.indexOf(t.get(p)),1,new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],l),new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],v));const y=new n.MediaConditionListWithAnd(l,[new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[i.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,i,a){let r=e;if(!r)return;if(r=a.get(r),!n.isMediaCondition(r))return;const t=r;if(r=a.get(r),!n.isMediaQuery(r))return;if(r!==i)return;return t}(p,a,t);f?f.media=y:p.media=new n.MediaCondition(new n.MediaInParens(new n.MediaCondition(y),[[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.OpenParen,"(",-1,-1,void 0]],[[i.TokenType.CloseParen,")",-1,-1,void 0]]))}));const u=a.tokens();return i.stringify(...u.filter(((e,n)=>(0!==n||0!==r||e[0]!==i.TokenType.Whitespace)&&(e[0]!==i.TokenType.Whitespace||!u[n+1]||u[n+1][0]!==i.TokenType.Whitespace))))})).join(",")}const d=()=>({postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(n.parse(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}}));e.params!==i&&(e.params=i)},"custom-media":e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=n.parseCustomMedia(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}});if(!i)return;if(!i.hasMediaQueryList())return;const a=i.mediaQueryList.map((e=>e.toString())).join(","),r=u(i.mediaQueryList);a!==r&&(e.params=e.params.replace(a," "+r))}}});d.postcss=!0,module.exports=d; diff --git a/dist/index.d.ts b/dist/index.d.ts index 0672df0..89d75c8 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,6 +1,3 @@ import type { PluginCreator } from 'postcss'; -declare type pluginOptions = { - preserve?: boolean; -}; -declare const creator: PluginCreator; +declare const creator: PluginCreator; export default creator; diff --git a/dist/index.mjs b/dist/index.mjs index aa62019..9102b19 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1 +1 @@ -import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as r}from"@csstools/css-parser-algorithms";import{TokenType as n,NumberType as i,stringify as o}from"@csstools/css-tokenizer";import{invertComparison as a,MediaFeatureEQ as s,MediaFeatureLT as u,MediaFeatureGT as c,newMediaFeaturePlain as l,matchesRatioExactly as d,parse as v,isMediaFeatureRange as p,isMediaFeature as f,isMediaFeatureRangeNameValue as m,isMediaFeatureRangeValueName as h,isMediaInParens as w,MediaInParens as g,MediaAnd as W,MediaConditionListWithAnd as O,MediaCondition as y,isMediaConditionListWithAnd as T,isMediaAnd as L,isMediaCondition as _,isMediaQuery as x}from"@csstools/media-query-list-parser";const b={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function E(e){return e===u.LT||e===u.LT_OR_EQ?"max-":e===c.GT||e===c.GT_OR_EQ?"min-":""}const I={">":1,"<":-1};function Q(r,o,v,p){let f,m=v.before,h=v.after;if(p||(m=v.after,h=v.before),!p){const e=a(o);if(!1===e)return;o=e}if(o===s.EQ||o===u.LT_OR_EQ||o===c.GT_OR_EQ)return Array.isArray(v.value)?l(E(o)+r,...m,...v.value.flatMap((e=>e.tokens())),...h):l(E(o)+r,...m,...v.value.tokens(),...h);if(!Array.isArray(v.value)||!d(v.value)){if(f=Array.isArray(v.value)?v.value.find((r=>e(r)||t(r))):v.value,e(f)&&"calc"===f.nameTokenValue().toLowerCase()){let e;if(b[r.toLowerCase()]){const t=I[o],a=b[r.toLowerCase()];e=[n.Dimension,`${t.toString()}${a}`,-1,-1,{value:t,unit:a,type:i.Integer}]}else{const t=I[o];e=[n.Number,t.toString(),-1,-1,{value:t,type:i.Integer}]}return l(E(o)+r,...m,[n.Function,"calc(",-1,-1,{value:"calc("}],[n.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[n.Whitespace," ",-1,-1,void 0],[n.Delim,"+",-1,-1,void 0],[n.Whitespace," ",-1,-1,void 0],e,[n.CloseParen,")",-1,-1,void 0],...h)}if(t(f)){let e,t=f.value,a=!1;if(t[0]!==n.Dimension&&t[0]!==n.Number||0!==t[4].value)if(t[0]===n.Dimension&&"px"===t[4].unit&&t[4].type===i.Integer)e=t[4].value+I[o];else{if(t[0]!==n.Dimension&&t[0]!==n.Number)return;e=Number(Math.round(Number(t[4].value+.001*I[o]+"e6"))+"e-6")}else e=I[o],a=b[r.toLowerCase()];return!1!==a&&(t=[n.Dimension,t[1],t[2],t[3],{value:t[4].value,unit:a,type:t[4].type}]),t[4].value=e,t[0]===n.Dimension?t[1]=t[4].value.toString()+t[4].unit:t[1]=t[4].value.toString(),l(E(o)+r,...m,t,...h)}}}const k=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function A(e){return v(e,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw new Error(`Unable to parse media query "${e}"`)}}).map(((e,t)=>{const i=r(e);e.walk((t=>{const r=t.node;if(!p(r))return;const o=t.parent;if(!f(o))return;const a=r.name.getName();if(!k.has(a.toLowerCase()))return;if(m(r)||h(r)){const e=r.operatorKind();if(!1===e)return;const t=Q(a,e,r.value,m(r));return void(t&&(o.feature=t.feature))}const s=i.get(o);if(!w(s))return;let c=null,l=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const t=Q(a,e,r.valueOne,!1);if(!t)return;e===u.LT||e===u.LT_OR_EQ?c=t:l=t}{const e=r.valueTwoOperatorKind();if(!1===e)return;const t=Q(a,e,r.valueTwo,!0);if(!t)return;e===u.LT||e===u.LT_OR_EQ?l=t:c=t}const d=new g(c),v=new g(l),b=function(e,t){let r=e;if(!r)return;if(r=t.get(r),T(r))return r;if(!L(r))return;if(r=t.get(r),T(r))return r;return}(s,i);if(b)return b.leading===s?(b.leading=d,void(b.list=[new W([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],v),...b.list])):void b.list.splice(b.indexOf(i.get(s)),1,new W([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],d),new W([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],v));const E=new O(d,[new W([[n.Whitespace," ",-1,-1,void 0],[n.Ident,"and",-1,-1,{value:"and"}],[n.Whitespace," ",-1,-1,void 0]],v)],[[n.Whitespace," ",-1,-1,void 0]]),I=function(e,t,r){let n=e;if(!n)return;if(n=r.get(n),!_(n))return;const i=n;if(n=r.get(n),!x(n))return;if(n!==t)return;return i}(s,e,i);I?I.media=E:s.media=new y(new g(new y(E),[[n.Whitespace," ",-1,-1,void 0],[n.OpenParen,"(",-1,-1,void 0]],[[n.CloseParen,")",-1,-1,void 0]]))}));const a=e.tokens();return o(...a.filter(((e,r)=>(0!==r||0!==t||e[0]!==n.Whitespace)&&(e[0]!==n.Whitespace||!a[r+1]||a[r+1][0]!==n.Whitespace))))})).join(",")}const C=e=>{const t=Object.assign({preserve:!1},e);return{postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=A(e.params);e.params!==r&&(e.cloneBefore({params:r}),t.preserve||e.remove())}}}};C.postcss=!0;export{C as default}; +import{isFunctionNode as e,isTokenNode as r,gatherNodeAncestry as t}from"@csstools/css-parser-algorithms";import{TokenType as i,NumberType as n,stringify as a}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as s,MediaFeatureLT as u,MediaFeatureGT as c,newMediaFeaturePlain as l,matchesRatioExactly as d,isMediaFeatureRange as p,isMediaFeature as v,isMediaFeatureRangeNameValue as f,isMediaFeatureRangeValueName as m,isMediaInParens as h,MediaInParens as w,MediaAnd as g,MediaConditionListWithAnd as y,MediaCondition as L,isMediaConditionListWithAnd as W,isMediaAnd as b,isMediaCondition as O,isMediaQuery as Q,parse as T,parseCustomMedia as _}from"@csstools/media-query-list-parser";const x={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function E(e){return e===u.LT||e===u.LT_OR_EQ?"max-":e===c.GT||e===c.GT_OR_EQ?"min-":""}const I={">":1,"<":-1};function A(t,a,p,v){let f,m=p.before,h=p.after;if(v||(m=p.after,h=p.before),!v){const e=o(a);if(!1===e)return;a=e}if(a===s.EQ||a===u.LT_OR_EQ||a===c.GT_OR_EQ)return Array.isArray(p.value)?l(E(a)+t,...m,...p.value.flatMap((e=>e.tokens())),...h):l(E(a)+t,...m,...p.value.tokens(),...h);if(!Array.isArray(p.value)||!d(p.value)){if(f=Array.isArray(p.value)?p.value.find((t=>e(t)||r(t))):p.value,e(f)&&"calc"===f.getName().toLowerCase()){let e;if(x[t.toLowerCase()]){const r=I[a],o=x[t.toLowerCase()];e=[i.Dimension,`${r.toString()}${o}`,-1,-1,{value:r,unit:o,type:n.Integer}]}else{const r=I[a];e=[i.Number,r.toString(),-1,-1,{value:r,type:n.Integer}]}return l(E(a)+t,...m,[i.Function,"calc(",-1,-1,{value:"calc("}],[i.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[i.Whitespace," ",-1,-1,void 0],[i.Delim,"+",-1,-1,void 0],[i.Whitespace," ",-1,-1,void 0],e,[i.CloseParen,")",-1,-1,void 0],...h)}if(r(f)){let e,r=f.value,o=!1;if(r[0]!==i.Dimension&&r[0]!==i.Number||0!==r[4].value)if(r[0]===i.Dimension&&"px"===r[4].unit&&r[4].type===n.Integer)e=r[4].value+I[a];else{if(r[0]!==i.Dimension&&r[0]!==i.Number)return;e=Number(Math.round(Number(r[4].value+.001*I[a]+"e6"))+"e-6")}else e=I[a],o=x[t.toLowerCase()];return!1!==o&&(r=[i.Dimension,r[1],r[2],r[3],{value:r[4].value,unit:o,type:r[4].type}]),r[4].value=e,r[0]===i.Dimension?r[1]=r[4].value.toString()+r[4].unit:r[1]=r[4].value.toString(),l(E(a)+t,...m,r,...h)}}}const C=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function D(e){return e.map(((e,r)=>{const n=t(e);e.walk((r=>{const t=r.node;if(!p(t))return;const a=r.parent;if(!v(a))return;const o=t.name.getName();if(!C.has(o.toLowerCase()))return;if(f(t)||m(t)){const e=t.operatorKind();if(!1===e)return;const r=A(o,e,t.value,f(t));return void(r&&(a.feature=r.feature))}const s=n.get(a);if(!h(s))return;let c=null,l=null;{const e=t.valueOneOperatorKind();if(!1===e)return;const r=A(o,e,t.valueOne,!1);if(!r)return;e===u.LT||e===u.LT_OR_EQ?(c=r,c.before=a.before):(l=r,l.after=a.after)}{const e=t.valueTwoOperatorKind();if(!1===e)return;const r=A(o,e,t.valueTwo,!0);if(!r)return;e===u.LT||e===u.LT_OR_EQ?(l=r,l.before=a.before):(c=r,c.after=a.after)}const d=new w(c),T=new w(l),_=function(e,r){let t=e;if(!t)return;if(t=r.get(t),W(t))return t;if(!b(t))return;if(t=r.get(t),W(t))return t;return}(s,n);if(_)return _.leading===s?(_.leading=d,void(_.list=[new g([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],T),..._.list])):void _.list.splice(_.indexOf(n.get(s)),1,new g([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],d),new g([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],T));const x=new y(d,[new g([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],T)],[[i.Whitespace," ",-1,-1,void 0]]),E=function(e,r,t){let i=e;if(!i)return;if(i=t.get(i),!O(i))return;const n=i;if(i=t.get(i),!Q(i))return;if(i!==r)return;return n}(s,e,n);E?E.media=x:s.media=new L(new w(new L(x),[[i.Whitespace," ",-1,-1,void 0],[i.OpenParen,"(",-1,-1,void 0]],[[i.CloseParen,")",-1,-1,void 0]]))}));const o=e.tokens();return a(...o.filter(((e,t)=>(0!==t||0!==r||e[0]!==i.Whitespace)&&(e[0]!==i.Whitespace||!o[t+1]||o[t+1][0]!==i.Whitespace))))})).join(",")}const N=()=>({postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=D(T(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}}));e.params!==r&&(e.params=r)},"custom-media":e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=_(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}});if(!r)return;if(!r.hasMediaQueryList())return;const t=r.mediaQueryList.map((e=>e.toString())).join(","),i=D(r.mediaQueryList);t!==i&&(e.params=e.params.replace(t," "+i))}}});N.postcss=!0;export{N as default}; diff --git a/dist/transform.d.ts b/dist/transform.d.ts index 7e90004..9bcd622 100644 --- a/dist/transform.d.ts +++ b/dist/transform.d.ts @@ -1 +1,2 @@ -export declare function transform(mediaQueryListString: string): string; +import { MediaQuery } from '@csstools/media-query-list-parser'; +export declare function transform(mediaQueries: Array): string; diff --git a/package.json b/package.json index 958a385..bf96420 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,9 @@ "node": ">=14.0.0" }, "dependencies": { - "@csstools/css-parser-algorithms": "^1.0.0", - "@csstools/css-tokenizer": "^1.0.0", - "@csstools/media-query-list-parser": "^1.0.0" + "@csstools/css-parser-algorithms": "^2.0.0", + "@csstools/css-tokenizer": "^2.0.0", + "@csstools/media-query-list-parser": "^2.0.0" }, "peerDependencies": { "postcss": "8.4.5" diff --git a/src/index.ts b/src/index.ts index 20617e8..b881484 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,18 +1,8 @@ import type { PluginCreator } from 'postcss'; import { transform } from './transform'; +import { parse, parseCustomMedia } from '@csstools/media-query-list-parser'; -type pluginOptions = { preserve?: boolean }; - -const creator: PluginCreator = (opts?: pluginOptions) => { - const options = Object.assign( - // Default options - { - preserve: false, - }, - // Provided options - opts, - ); - +const creator: PluginCreator = () => { return { postcssPlugin: 'postcss-media-minmax', AtRule: { @@ -21,18 +11,46 @@ const creator: PluginCreator = (opts?: pluginOptions) => { return; } - const transformed = transform(atRule.params); + const mediaQueries = parse(atRule.params, { + preserveInvalidMediaQueries: true, + onParseError: () => { + throw atRule.error(`Unable to parse media query "${atRule.params}"`); + }, + }); + + const transformed = transform(mediaQueries); if (atRule.params === transformed) { return; } - atRule.cloneBefore({ - params: transformed, + atRule.params = transformed + }, + 'custom-media': (atRule) => { + if (!(atRule.params.includes('<') || atRule.params.includes('>') || atRule.params.includes('='))) { + return; + } + + const customMedia = parseCustomMedia(atRule.params, { + preserveInvalidMediaQueries: true, + onParseError: () => { + throw atRule.error(`Unable to parse media query "${atRule.params}"`); + }, }); + if (!customMedia) { + return + } + + if (!customMedia.hasMediaQueryList()) { + return; + } - if (!options.preserve) { - atRule.remove(); + const originalMediaQueries = customMedia.mediaQueryList.map((x) => x.toString()).join(','); + const transformed = transform(customMedia.mediaQueryList); + if (originalMediaQueries === transformed) { + return; } + + atRule.params = atRule.params.replace(originalMediaQueries, ' ' + transformed) }, }, }; diff --git a/src/transform-single-pair.ts b/src/transform-single-pair.ts index c160ca3..5f3c518 100644 --- a/src/transform-single-pair.ts +++ b/src/transform-single-pair.ts @@ -83,7 +83,7 @@ export function transformSingleNameValuePair(name: string, operator: MediaFeatur valueNode = value.value; } - if (isFunctionNode(valueNode) && valueNode.nameTokenValue().toLowerCase() === 'calc') { + if (isFunctionNode(valueNode) && valueNode.getName().toLowerCase() === 'calc') { let valueToken; if (unitsForFeature[name.toLowerCase()]) { const tokenValue = power[operator]; diff --git a/src/transform.ts b/src/transform.ts index e69ba39..c0fac8c 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -1,6 +1,6 @@ import { gatherNodeAncestry } from '@csstools/css-parser-algorithms'; import { stringify, TokenType } from '@csstools/css-tokenizer'; -import { isMediaAnd, isMediaCondition, isMediaConditionListWithAnd, isMediaFeature, isMediaFeatureRange, isMediaFeatureRangeNameValue, isMediaFeatureRangeValueName, isMediaInParens, isMediaQuery, MediaAnd, MediaCondition, MediaConditionListWithAnd, MediaFeature, MediaInParens, MediaQuery, MediaFeatureLT, parse } from '@csstools/media-query-list-parser'; +import { isMediaAnd, isMediaCondition, isMediaConditionListWithAnd, isMediaFeature, isMediaFeatureRange, isMediaFeatureRangeNameValue, isMediaFeatureRangeValueName, isMediaInParens, isMediaQuery, MediaAnd, MediaCondition, MediaConditionListWithAnd, MediaFeature, MediaInParens, MediaQuery, MediaFeatureLT } from '@csstools/media-query-list-parser'; import { transformSingleNameValuePair } from './transform-single-pair'; const supportedFeatureNames = new Set([ @@ -18,14 +18,7 @@ const supportedFeatureNames = new Set([ 'width', ]); -export function transform(mediaQueryListString: string) { - const mediaQueries = parse(mediaQueryListString, { - preserveInvalidMediaQueries: true, - onParseError: () => { - throw new Error(`Unable to parse media query "${mediaQueryListString}"`); - }, - }); - +export function transform(mediaQueries: Array) { return mediaQueries.map((mediaQuery, mediaQueryIndex) => { const ancestry = gatherNodeAncestry(mediaQuery); @@ -79,8 +72,10 @@ export function transform(mediaQueryListString: string) { if (operator === MediaFeatureLT.LT || operator === MediaFeatureLT.LT_OR_EQ) { featureOne = transformed; + featureOne.before = parent.before } else { featureTwo = transformed; + featureTwo.after = parent.after } } @@ -97,8 +92,10 @@ export function transform(mediaQueryListString: string) { if (operator === MediaFeatureLT.LT || operator === MediaFeatureLT.LT_OR_EQ) { featureTwo = transformed; + featureTwo.before = parent.before } else { featureOne = transformed; + featureOne.after = parent.after } } diff --git a/test/fixtures/custom-media.css b/test/fixtures/custom-media.css new file mode 100644 index 0000000..84df9c9 --- /dev/null +++ b/test/fixtures/custom-media.css @@ -0,0 +1,9 @@ +@custom-media --one (width < 300px) {} + +@custom-media --two (width <= 300px), (width=300px) {} + +@custom-media --three (width = 300px) {} + +@custom-media /* a comment */ --four (width > 300px) {} + +@custom-media /* a comment */ --five /* a comment */ (width >= 300px) /* a comment */ {} diff --git a/test/fixtures/custom-media.output.css b/test/fixtures/custom-media.output.css new file mode 100644 index 0000000..6106095 --- /dev/null +++ b/test/fixtures/custom-media.output.css @@ -0,0 +1,9 @@ +@custom-media --one (max-width: 299px) {} + +@custom-media --two (max-width: 300px), (width:300px) {} + +@custom-media --three (width: 300px) {} + +@custom-media /* a comment */ --four (min-width: 301px) {} + +@custom-media /* a comment */ --five (min-width: 300px) /* a comment */ {} diff --git a/test/index.js b/test/index.js index 445abca..67c2843 100644 --- a/test/index.js +++ b/test/index.js @@ -43,3 +43,9 @@ test("@media", function(t) { t.end() }) + +test("@custom-media", function (t) { + compareFixtures(t, "custom-media", "should transform") + + t.end() +}) diff --git a/yarn.lock b/yarn.lock index 87ba755..578e9d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -900,20 +900,20 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@csstools/css-parser-algorithms@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-1.0.0.tgz#63f0ecbb926abf92d6cd8d076663650ad340db8c" - integrity sha512-lPphY34yfV15tEXiz/SYaU8hwqAhbAwqiTExv5tOfc7QZxT70VVYrsiPBaX1osdWZFowrDEAhHe4H3JnyzbjhA== +"@csstools/css-parser-algorithms@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.0.0.tgz#2f27a1f2aef94f5d009d3d83f08f1e095dff2b30" + integrity sha512-RbukP8OjQvuH85veuzOq8abPjsvqvleZaQC6W0GJFGpwLUh8XmFMQjvtuIM9bQ589YFx4lwwAcSwN4nfcvxIEw== -"@csstools/css-tokenizer@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-1.0.0.tgz#161c0c9b632952ee8c2f0a62eb479d736a5627ff" - integrity sha512-xdFjdQ+zqqkOsmee+kYRieZD9Cqh4hr01YBQ2/8NtTkMMxbtRX18MC50LX6cMrtaLryqmIdZHN9e16/l0QqnQw== +"@csstools/css-tokenizer@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.0.0.tgz#fa2a7e8f4ed965e73ba30ee80c00fa64980fd11e" + integrity sha512-IB6EFP0Hc/YEz1sJVD47oFqJP6TXMB+OW1jXSYnOk5g+6wpk2/zkuBa0gm5edIMM9nVUZ3hF0xCBnyFbK5OIyg== -"@csstools/media-query-list-parser@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-1.0.0.tgz#17d08bfbcca677fc018e3dc3f54172a38c2fdca5" - integrity sha512-HsTj5ejI8NKKZ4IEd6kK2kQZA/JmIVlUV8+XvO/YS9ntrlYPnbmFT3rkqtbxOVfEafblYCNOpeNw1c+fKGkAqw== +"@csstools/media-query-list-parser@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.0.tgz#06c6dce65656e4970927a603e910c6f949c5c07f" + integrity sha512-84kEbyJjh2T4Lnz8EkVQrwNANP+dtNb0SDkI3P7kqKnGorPknQUuq8Iqf2v5UsaH08XzPp3ouVJNsyPOdI2B/Q== "@eslint/eslintrc@^1.3.3": version "1.3.3" From 12b7d7ead026784a2cf5fe650879282f3b1f7479 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 29 Mar 2023 22:43:46 +0200 Subject: [PATCH 9/9] bring over latest patches --- dist/index.cjs | 2 +- dist/index.mjs | 2 +- dist/to-lower-case-a-z.d.ts | 1 + dist/transform-single-pair.d.ts | 2 +- package.json | 7 +- rollup/configs/externals.mjs | 1 + src/to-lower-case-a-z.ts | 4 + src/transform-single-pair.ts | 242 +++++-- src/transform.ts | 23 +- test/fixtures/aspect-ratio.css | 11 + test/fixtures/aspect-ratio.output.css | 13 +- test/fixtures/calc.css | 76 ++ test/fixtures/calc.output.css | 96 ++- test/fixtures/color-index.css | 6 + test/fixtures/color-index.output.css | 6 + test/fixtures/color.css | 6 + test/fixtures/color.output.css | 6 + test/fixtures/complex.output.css | 18 +- test/fixtures/custom-media.output.css | 4 +- test/fixtures/min-max.output.css | 8 +- test/fixtures/more-units.css | 15 + test/fixtures/more-units.output.css | 15 + test/fixtures/operators.output.css | 20 +- test/fixtures/shorthands.output.css | 14 +- yarn.lock | 991 ++++++++++++++------------ 25 files changed, 999 insertions(+), 590 deletions(-) create mode 100644 dist/to-lower-case-a-z.d.ts create mode 100644 src/to-lower-case-a-z.ts diff --git a/dist/index.cjs b/dist/index.cjs index f5cb113..874d331 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1 +1 @@ -"use strict";var e=require("@csstools/css-parser-algorithms"),i=require("@csstools/css-tokenizer"),n=require("@csstools/media-query-list-parser");const a={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function r(e){return e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?"max-":e===n.MediaFeatureGT.GT||e===n.MediaFeatureGT.GT_OR_EQ?"min-":""}const t={">":1,"<":-1};function o(o,s,u,d){let p,T=u.before,c=u.after;if(d||(T=u.after,c=u.before),!d){const e=n.invertComparison(s);if(!1===e)return;s=e}if(s===n.MediaFeatureEQ.EQ||s===n.MediaFeatureLT.LT_OR_EQ||s===n.MediaFeatureGT.GT_OR_EQ)return Array.isArray(u.value)?n.newMediaFeaturePlain(r(s)+o,...T,...u.value.flatMap((e=>e.tokens())),...c):n.newMediaFeaturePlain(r(s)+o,...T,...u.value.tokens(),...c);if(!Array.isArray(u.value)||!n.matchesRatioExactly(u.value)){if(p=Array.isArray(u.value)?u.value.find((i=>e.isFunctionNode(i)||e.isTokenNode(i))):u.value,e.isFunctionNode(p)&&"calc"===p.getName().toLowerCase()){let e;if(a[o.toLowerCase()]){const n=t[s],r=a[o.toLowerCase()];e=[i.TokenType.Dimension,`${n.toString()}${r}`,-1,-1,{value:n,unit:r,type:i.NumberType.Integer}]}else{const n=t[s];e=[i.TokenType.Number,n.toString(),-1,-1,{value:n,type:i.NumberType.Integer}]}return n.newMediaFeaturePlain(r(s)+o,...T,[i.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[i.TokenType.OpenParen,"(",-1,-1,void 0],...p.tokens().slice(1),[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Delim,"+",-1,-1,void 0],[i.TokenType.Whitespace," ",-1,-1,void 0],e,[i.TokenType.CloseParen,")",-1,-1,void 0],...c)}if(e.isTokenNode(p)){let e,u=p.value,d=!1;if(u[0]!==i.TokenType.Dimension&&u[0]!==i.TokenType.Number||0!==u[4].value)if(u[0]===i.TokenType.Dimension&&"px"===u[4].unit&&u[4].type===i.NumberType.Integer)e=u[4].value+t[s];else{if(u[0]!==i.TokenType.Dimension&&u[0]!==i.TokenType.Number)return;e=Number(Math.round(Number(u[4].value+.001*t[s]+"e6"))+"e-6")}else e=t[s],d=a[o.toLowerCase()];return!1!==d&&(u=[i.TokenType.Dimension,u[1],u[2],u[3],{value:u[4].value,unit:d,type:u[4].type}]),u[4].value=e,u[0]===i.TokenType.Dimension?u[1]=u[4].value.toString()+u[4].unit:u[1]=u[4].value.toString(),n.newMediaFeaturePlain(r(s)+o,...T,u,...c)}}}const s=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function u(a){return a.map(((a,r)=>{const t=e.gatherNodeAncestry(a);a.walk((e=>{const r=e.node;if(!n.isMediaFeatureRange(r))return;const u=e.parent;if(!n.isMediaFeature(u))return;const d=r.name.getName();if(!s.has(d.toLowerCase()))return;if(n.isMediaFeatureRangeNameValue(r)||n.isMediaFeatureRangeValueName(r)){const e=r.operatorKind();if(!1===e)return;const i=o(d,e,r.value,n.isMediaFeatureRangeNameValue(r));return void(i&&(u.feature=i.feature))}const p=t.get(u);if(!n.isMediaInParens(p))return;let T=null,c=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const i=o(d,e,r.valueOne,!1);if(!i)return;e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?(T=i,T.before=u.before):(c=i,c.after=u.after)}{const e=r.valueTwoOperatorKind();if(!1===e)return;const i=o(d,e,r.valueTwo,!0);if(!i)return;e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?(c=i,c.before=u.before):(T=i,T.after=u.after)}const l=new n.MediaInParens(T),v=new n.MediaInParens(c),m=function(e,i){let a=e;if(!a)return;if(a=i.get(a),n.isMediaConditionListWithAnd(a))return a;if(!n.isMediaAnd(a))return;if(a=i.get(a),n.isMediaConditionListWithAnd(a))return a;return}(p,t);if(m)return m.leading===p?(m.leading=l,void(m.list=[new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],v),...m.list])):void m.list.splice(m.indexOf(t.get(p)),1,new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],l),new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],v));const y=new n.MediaConditionListWithAnd(l,[new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],v)],[[i.TokenType.Whitespace," ",-1,-1,void 0]]),f=function(e,i,a){let r=e;if(!r)return;if(r=a.get(r),!n.isMediaCondition(r))return;const t=r;if(r=a.get(r),!n.isMediaQuery(r))return;if(r!==i)return;return t}(p,a,t);f?f.media=y:p.media=new n.MediaCondition(new n.MediaInParens(new n.MediaCondition(y),[[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.OpenParen,"(",-1,-1,void 0]],[[i.TokenType.CloseParen,")",-1,-1,void 0]]))}));const u=a.tokens();return i.stringify(...u.filter(((e,n)=>(0!==n||0!==r||e[0]!==i.TokenType.Whitespace)&&(e[0]!==i.TokenType.Whitespace||!u[n+1]||u[n+1][0]!==i.TokenType.Whitespace))))})).join(",")}const d=()=>({postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=u(n.parse(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}}));e.params!==i&&(e.params=i)},"custom-media":e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=n.parseCustomMedia(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}});if(!i)return;if(!i.hasMediaQueryList())return;const a=i.mediaQueryList.map((e=>e.toString())).join(","),r=u(i.mediaQueryList);a!==r&&(e.params=e.params.replace(a," "+r))}}});d.postcss=!0,module.exports=d; +"use strict";var e=require("@csstools/css-parser-algorithms"),i=require("@csstools/css-tokenizer"),n=require("@csstools/media-query-list-parser"),t=require("@csstools/css-calc");const a=/[A-Z]/g;const r={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"},o={width:!1,height:!1,"device-width":!1,"device-height":!1,"aspect-ratio":!1,"device-aspect-ratio":!1,color:!0,"color-index":!0,monochrome:!0,resolution:"dpi"};function s(e){return e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?"max-":e===n.MediaFeatureGT.GT||e===n.MediaFeatureGT.GT_OR_EQ?"min-":""}const u={">":1,"<":-1},d=.001,p=.02;function l(a,l,c,T){let v=c.before,m=c.after;if(T||(v=c.after,m=c.before),!T){const e=n.invertComparison(l);if(!1===e)return;l=e}if(l===n.MediaFeatureEQ.EQ||l===n.MediaFeatureLT.LT_OR_EQ||l===n.MediaFeatureGT.GT_OR_EQ)return Array.isArray(c.value)?n.newMediaFeaturePlain(s(l)+a,...v,...c.value.flatMap((e=>e.tokens())),...m):n.newMediaFeaturePlain(s(l)+a,...v,...c.value.tokens(),...m);let f,y,h=!1;if(Array.isArray(c.value)){if(!n.matchesRatioExactly(c.value))return;if("aspect-ratio"!==a&&"device-aspect-ratio"!==a)return;const e=n.matchesRatio(c.value);if(-1===e)return;h=!0,f=c.value[e[0]],y=[...c.value.slice(e[0]+1).flatMap((e=>e.tokens()))]}else f=c.value,y=[];const k=r[a.toLowerCase()];if(e.isFunctionNode(f)&&"calc"===f.getName().toLowerCase()){const[[r]]=t.calcFromComponentValues([[f]],{precision:5,toCanonicalUnits:!0});if(!r||!e.isTokenNode(r)||r.value[0]!==i.TokenType.Number&&r.value[0]!==i.TokenType.Percentage&&r.value[0]!==i.TokenType.Dimension||!Number.isInteger(r.value[4].value)){let e;if(void 0!==k){const n=u[l]*("px"===k?p:d);e=[i.TokenType.Dimension,`${n.toString()}${k}`,-1,-1,{value:n,unit:k,type:i.NumberType.Integer}]}else if(!0===o[a]){const n=u[l];e=[i.TokenType.Number,n.toString(),-1,-1,{value:n,type:i.NumberType.Integer}]}else if(h){const n=u[l]*d;e=[i.TokenType.Number,n.toString(),-1,-1,{value:n,type:i.NumberType.Integer}]}else{const n=u[l];e=[i.TokenType.Number,n.toString(),-1,-1,{value:n,type:i.NumberType.Integer}]}return n.newMediaFeaturePlain(s(l)+a,...v,[i.TokenType.Function,"calc(",-1,-1,{value:"calc("}],[i.TokenType.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Delim,"+",-1,-1,{value:"+"}],[i.TokenType.Whitespace," ",-1,-1,void 0],e,[i.TokenType.CloseParen,")",-1,-1,void 0],...y,...m)}f=r}if(!e.isTokenNode(f))return;let M,g=f.value,w="";if(void 0!==k&&g[0]===i.TokenType.Number&&0===g[4].value)M=u[l],w=k;else if(g[0]===i.TokenType.Number&&0===g[4].value)M=u[l],w="";else if(g[0]===i.TokenType.Dimension&&0===g[4].value)M=u[l],w=g[4].unit;else if(g[0]===i.TokenType.Number&&!0===o[a])M=g[4].value+u[l];else if(g[0]===i.TokenType.Dimension&&"px"===g[4].unit&&g[4].type===i.NumberType.Integer)M=Number(Math.round(Number(g[4].value+p*u[l]+"e6"))+"e-6");else{if(g[0]!==i.TokenType.Dimension&&g[0]!==i.TokenType.Number)return;M=Number(Math.round(Number(g[4].value+d*u[l]+"e6"))+"e-6")}return w&&(g=[i.TokenType.Dimension,g[1],g[2],g[3],{value:g[4].value,unit:w,type:g[4].type}]),g[4].value=M,g[0]===i.TokenType.Dimension?g[1]=g[4].value.toString()+g[4].unit:g[1]=g[4].value.toString(),n.newMediaFeaturePlain(s(l)+a,...v,g,...y,...m)}const c=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function T(t){return t.map(((t,r)=>{const o=e.gatherNodeAncestry(t);t.walk((e=>{const r=e.node;if(!n.isMediaFeatureRange(r))return;const s=e.parent;if(!n.isMediaFeature(s))return;const u=r.name.getName().replace(a,(e=>String.fromCharCode(e.charCodeAt(0)+32)));if(!c.has(u))return;if(n.isMediaFeatureRangeNameValue(r)||n.isMediaFeatureRangeValueName(r)){const e=r.operatorKind();if(!1===e)return;const i=l(u,e,r.value,n.isMediaFeatureRangeNameValue(r));return void(i&&(s.feature=i.feature))}const d=o.get(s);if(!n.isMediaInParens(d))return;let p=null,T=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const i=l(u,e,r.valueOne,!1);if(!i)return;e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?(p=i,p.before=s.before):(T=i,T.after=s.after)}{const e=r.valueTwoOperatorKind();if(!1===e)return;const i=l(u,e,r.valueTwo,!0);if(!i)return;e===n.MediaFeatureLT.LT||e===n.MediaFeatureLT.LT_OR_EQ?(T=i,T.before=s.before):(p=i,p.after=s.after)}if(!p||!T)return;const v=new n.MediaInParens(p),m=new n.MediaInParens(T),f=function(e,i){let t=e;if(!t)return;if(t=i.get(t),n.isMediaConditionListWithAnd(t))return t;if(!n.isMediaAnd(t))return;if(t=i.get(t),n.isMediaConditionListWithAnd(t))return t;return}(d,o);if(f)return f.leading===d?(f.leading=v,void(f.list=[new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],m),...f.list])):void f.list.splice(f.indexOf(o.get(d)),1,new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],v),new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],m));const y=new n.MediaConditionListWithAnd(v,[new n.MediaAnd([[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.Ident,"and",-1,-1,{value:"and"}],[i.TokenType.Whitespace," ",-1,-1,void 0]],m)],[[i.TokenType.Whitespace," ",-1,-1,void 0]]),h=function(e,i,t){let a=e;if(!a)return;if(a=t.get(a),!n.isMediaCondition(a))return;const r=a;if(a=t.get(a),!n.isMediaQuery(a))return;if(a!==i)return;return r}(d,t,o);h?h.media=y:d.media=new n.MediaCondition(new n.MediaInParens(new n.MediaCondition(y),[[i.TokenType.Whitespace," ",-1,-1,void 0],[i.TokenType.OpenParen,"(",-1,-1,void 0]],[[i.TokenType.CloseParen,")",-1,-1,void 0]]))}));const s=t.tokens();return i.stringify(...s.filter(((e,n)=>(0!==n||0!==r||e[0]!==i.TokenType.Whitespace)&&(e[0]!==i.TokenType.Whitespace||!s[n+1]||s[n+1][0]!==i.TokenType.Whitespace))))})).join(",")}const v=()=>({postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=T(n.parse(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}}));e.params!==i&&(e.params=i)},"custom-media":e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const i=n.parseCustomMedia(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}});if(!i)return;if(!i.hasMediaQueryList())return;const t=i.mediaQueryList.map((e=>e.toString())).join(","),a=T(i.mediaQueryList);t!==a&&(e.params=e.params.replace(t," "+a))}}});v.postcss=!0,module.exports=v; diff --git a/dist/index.mjs b/dist/index.mjs index 9102b19..570c0a0 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1 +1 @@ -import{isFunctionNode as e,isTokenNode as r,gatherNodeAncestry as t}from"@csstools/css-parser-algorithms";import{TokenType as i,NumberType as n,stringify as a}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as s,MediaFeatureLT as u,MediaFeatureGT as c,newMediaFeaturePlain as l,matchesRatioExactly as d,isMediaFeatureRange as p,isMediaFeature as v,isMediaFeatureRangeNameValue as f,isMediaFeatureRangeValueName as m,isMediaInParens as h,MediaInParens as w,MediaAnd as g,MediaConditionListWithAnd as y,MediaCondition as L,isMediaConditionListWithAnd as W,isMediaAnd as b,isMediaCondition as O,isMediaQuery as Q,parse as T,parseCustomMedia as _}from"@csstools/media-query-list-parser";const x={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};function E(e){return e===u.LT||e===u.LT_OR_EQ?"max-":e===c.GT||e===c.GT_OR_EQ?"min-":""}const I={">":1,"<":-1};function A(t,a,p,v){let f,m=p.before,h=p.after;if(v||(m=p.after,h=p.before),!v){const e=o(a);if(!1===e)return;a=e}if(a===s.EQ||a===u.LT_OR_EQ||a===c.GT_OR_EQ)return Array.isArray(p.value)?l(E(a)+t,...m,...p.value.flatMap((e=>e.tokens())),...h):l(E(a)+t,...m,...p.value.tokens(),...h);if(!Array.isArray(p.value)||!d(p.value)){if(f=Array.isArray(p.value)?p.value.find((t=>e(t)||r(t))):p.value,e(f)&&"calc"===f.getName().toLowerCase()){let e;if(x[t.toLowerCase()]){const r=I[a],o=x[t.toLowerCase()];e=[i.Dimension,`${r.toString()}${o}`,-1,-1,{value:r,unit:o,type:n.Integer}]}else{const r=I[a];e=[i.Number,r.toString(),-1,-1,{value:r,type:n.Integer}]}return l(E(a)+t,...m,[i.Function,"calc(",-1,-1,{value:"calc("}],[i.OpenParen,"(",-1,-1,void 0],...f.tokens().slice(1),[i.Whitespace," ",-1,-1,void 0],[i.Delim,"+",-1,-1,void 0],[i.Whitespace," ",-1,-1,void 0],e,[i.CloseParen,")",-1,-1,void 0],...h)}if(r(f)){let e,r=f.value,o=!1;if(r[0]!==i.Dimension&&r[0]!==i.Number||0!==r[4].value)if(r[0]===i.Dimension&&"px"===r[4].unit&&r[4].type===n.Integer)e=r[4].value+I[a];else{if(r[0]!==i.Dimension&&r[0]!==i.Number)return;e=Number(Math.round(Number(r[4].value+.001*I[a]+"e6"))+"e-6")}else e=I[a],o=x[t.toLowerCase()];return!1!==o&&(r=[i.Dimension,r[1],r[2],r[3],{value:r[4].value,unit:o,type:r[4].type}]),r[4].value=e,r[0]===i.Dimension?r[1]=r[4].value.toString()+r[4].unit:r[1]=r[4].value.toString(),l(E(a)+t,...m,r,...h)}}}const C=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function D(e){return e.map(((e,r)=>{const n=t(e);e.walk((r=>{const t=r.node;if(!p(t))return;const a=r.parent;if(!v(a))return;const o=t.name.getName();if(!C.has(o.toLowerCase()))return;if(f(t)||m(t)){const e=t.operatorKind();if(!1===e)return;const r=A(o,e,t.value,f(t));return void(r&&(a.feature=r.feature))}const s=n.get(a);if(!h(s))return;let c=null,l=null;{const e=t.valueOneOperatorKind();if(!1===e)return;const r=A(o,e,t.valueOne,!1);if(!r)return;e===u.LT||e===u.LT_OR_EQ?(c=r,c.before=a.before):(l=r,l.after=a.after)}{const e=t.valueTwoOperatorKind();if(!1===e)return;const r=A(o,e,t.valueTwo,!0);if(!r)return;e===u.LT||e===u.LT_OR_EQ?(l=r,l.before=a.before):(c=r,c.after=a.after)}const d=new w(c),T=new w(l),_=function(e,r){let t=e;if(!t)return;if(t=r.get(t),W(t))return t;if(!b(t))return;if(t=r.get(t),W(t))return t;return}(s,n);if(_)return _.leading===s?(_.leading=d,void(_.list=[new g([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],T),..._.list])):void _.list.splice(_.indexOf(n.get(s)),1,new g([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],d),new g([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],T));const x=new y(d,[new g([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],T)],[[i.Whitespace," ",-1,-1,void 0]]),E=function(e,r,t){let i=e;if(!i)return;if(i=t.get(i),!O(i))return;const n=i;if(i=t.get(i),!Q(i))return;if(i!==r)return;return n}(s,e,n);E?E.media=x:s.media=new L(new w(new L(x),[[i.Whitespace," ",-1,-1,void 0],[i.OpenParen,"(",-1,-1,void 0]],[[i.CloseParen,")",-1,-1,void 0]]))}));const o=e.tokens();return a(...o.filter(((e,t)=>(0!==t||0!==r||e[0]!==i.Whitespace)&&(e[0]!==i.Whitespace||!o[t+1]||o[t+1][0]!==i.Whitespace))))})).join(",")}const N=()=>({postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=D(T(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}}));e.params!==r&&(e.params=r)},"custom-media":e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const r=_(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}});if(!r)return;if(!r.hasMediaQueryList())return;const t=r.mediaQueryList.map((e=>e.toString())).join(","),i=D(r.mediaQueryList);t!==i&&(e.params=e.params.replace(t," "+i))}}});N.postcss=!0;export{N as default}; +import{isFunctionNode as e,isTokenNode as t,gatherNodeAncestry as r}from"@csstools/css-parser-algorithms";import{TokenType as i,NumberType as n,stringify as a}from"@csstools/css-tokenizer";import{invertComparison as o,MediaFeatureEQ as s,MediaFeatureLT as u,MediaFeatureGT as c,newMediaFeaturePlain as l,matchesRatioExactly as d,matchesRatio as p,isMediaFeatureRange as v,isMediaFeature as m,isMediaFeatureRangeNameValue as f,isMediaFeatureRangeValueName as h,isMediaInParens as g,MediaInParens as w,MediaAnd as b,MediaConditionListWithAnd as y,MediaCondition as N,isMediaConditionListWithAnd as W,isMediaAnd as x,isMediaCondition as O,isMediaQuery as I,parse as L,parseCustomMedia as Q}from"@csstools/media-query-list-parser";import{calcFromComponentValues as T}from"@csstools/css-calc";const _=/[A-Z]/g;const E={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"},S={width:!1,height:!1,"device-width":!1,"device-height":!1,"aspect-ratio":!1,"device-aspect-ratio":!1,color:!0,"color-index":!0,monochrome:!0,resolution:"dpi"};function C(e){return e===u.LT||e===u.LT_OR_EQ?"max-":e===c.GT||e===c.GT_OR_EQ?"min-":""}const D={">":1,"<":-1},P=.001,k=.02;function A(r,a,v,m){let f=v.before,h=v.after;if(m||(f=v.after,h=v.before),!m){const e=o(a);if(!1===e)return;a=e}if(a===s.EQ||a===u.LT_OR_EQ||a===c.GT_OR_EQ)return Array.isArray(v.value)?l(C(a)+r,...f,...v.value.flatMap((e=>e.tokens())),...h):l(C(a)+r,...f,...v.value.tokens(),...h);let g,w,b=!1;if(Array.isArray(v.value)){if(!d(v.value))return;if("aspect-ratio"!==r&&"device-aspect-ratio"!==r)return;const e=p(v.value);if(-1===e)return;b=!0,g=v.value[e[0]],w=[...v.value.slice(e[0]+1).flatMap((e=>e.tokens()))]}else g=v.value,w=[];const y=E[r.toLowerCase()];if(e(g)&&"calc"===g.getName().toLowerCase()){const[[e]]=T([[g]],{precision:5,toCanonicalUnits:!0});if(!e||!t(e)||e.value[0]!==i.Number&&e.value[0]!==i.Percentage&&e.value[0]!==i.Dimension||!Number.isInteger(e.value[4].value)){let e;if(void 0!==y){const t=D[a]*("px"===y?k:P);e=[i.Dimension,`${t.toString()}${y}`,-1,-1,{value:t,unit:y,type:n.Integer}]}else if(!0===S[r]){const t=D[a];e=[i.Number,t.toString(),-1,-1,{value:t,type:n.Integer}]}else if(b){const t=D[a]*P;e=[i.Number,t.toString(),-1,-1,{value:t,type:n.Integer}]}else{const t=D[a];e=[i.Number,t.toString(),-1,-1,{value:t,type:n.Integer}]}return l(C(a)+r,...f,[i.Function,"calc(",-1,-1,{value:"calc("}],[i.OpenParen,"(",-1,-1,void 0],...g.tokens().slice(1),[i.Whitespace," ",-1,-1,void 0],[i.Delim,"+",-1,-1,{value:"+"}],[i.Whitespace," ",-1,-1,void 0],e,[i.CloseParen,")",-1,-1,void 0],...w,...h)}g=e}if(!t(g))return;let N,W=g.value,x="";if(void 0!==y&&W[0]===i.Number&&0===W[4].value)N=D[a],x=y;else if(W[0]===i.Number&&0===W[4].value)N=D[a],x="";else if(W[0]===i.Dimension&&0===W[4].value)N=D[a],x=W[4].unit;else if(W[0]===i.Number&&!0===S[r])N=W[4].value+D[a];else if(W[0]===i.Dimension&&"px"===W[4].unit&&W[4].type===n.Integer)N=Number(Math.round(Number(W[4].value+k*D[a]+"e6"))+"e-6");else{if(W[0]!==i.Dimension&&W[0]!==i.Number)return;N=Number(Math.round(Number(W[4].value+P*D[a]+"e6"))+"e-6")}return x&&(W=[i.Dimension,W[1],W[2],W[3],{value:W[4].value,unit:x,type:W[4].type}]),W[4].value=N,W[0]===i.Dimension?W[1]=W[4].value.toString()+W[4].unit:W[1]=W[4].value.toString(),l(C(a)+r,...f,W,...w,...h)}const M=new Set(["aspect-ratio","color","color-index","device-aspect-ratio","device-height","device-width","height","horizontal-viewport-segments","monochrome","resolution","vertical-viewport-segments","width"]);function R(e){return e.map(((e,t)=>{const n=r(e);e.walk((t=>{const r=t.node;if(!v(r))return;const a=t.parent;if(!m(a))return;const o=r.name.getName().replace(_,(e=>String.fromCharCode(e.charCodeAt(0)+32)));if(!M.has(o))return;if(f(r)||h(r)){const e=r.operatorKind();if(!1===e)return;const t=A(o,e,r.value,f(r));return void(t&&(a.feature=t.feature))}const s=n.get(a);if(!g(s))return;let c=null,l=null;{const e=r.valueOneOperatorKind();if(!1===e)return;const t=A(o,e,r.valueOne,!1);if(!t)return;e===u.LT||e===u.LT_OR_EQ?(c=t,c.before=a.before):(l=t,l.after=a.after)}{const e=r.valueTwoOperatorKind();if(!1===e)return;const t=A(o,e,r.valueTwo,!0);if(!t)return;e===u.LT||e===u.LT_OR_EQ?(l=t,l.before=a.before):(c=t,c.after=a.after)}if(!c||!l)return;const d=new w(c),p=new w(l),L=function(e,t){let r=e;if(!r)return;if(r=t.get(r),W(r))return r;if(!x(r))return;if(r=t.get(r),W(r))return r;return}(s,n);if(L)return L.leading===s?(L.leading=d,void(L.list=[new b([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],p),...L.list])):void L.list.splice(L.indexOf(n.get(s)),1,new b([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],d),new b([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],p));const Q=new y(d,[new b([[i.Whitespace," ",-1,-1,void 0],[i.Ident,"and",-1,-1,{value:"and"}],[i.Whitespace," ",-1,-1,void 0]],p)],[[i.Whitespace," ",-1,-1,void 0]]),T=function(e,t,r){let i=e;if(!i)return;if(i=r.get(i),!O(i))return;const n=i;if(i=r.get(i),!I(i))return;if(i!==t)return;return n}(s,e,n);T?T.media=Q:s.media=new N(new w(new N(Q),[[i.Whitespace," ",-1,-1,void 0],[i.OpenParen,"(",-1,-1,void 0]],[[i.CloseParen,")",-1,-1,void 0]]))}));const o=e.tokens();return a(...o.filter(((e,r)=>(0!==r||0!==t||e[0]!==i.Whitespace)&&(e[0]!==i.Whitespace||!o[r+1]||o[r+1][0]!==i.Whitespace))))})).join(",")}const $=()=>({postcssPlugin:"postcss-media-minmax",AtRule:{media:e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const t=R(L(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}}));e.params!==t&&(e.params=t)},"custom-media":e=>{if(!(e.params.includes("<")||e.params.includes(">")||e.params.includes("=")))return;const t=Q(e.params,{preserveInvalidMediaQueries:!0,onParseError:()=>{throw e.error(`Unable to parse media query "${e.params}"`)}});if(!t)return;if(!t.hasMediaQueryList())return;const r=t.mediaQueryList.map((e=>e.toString())).join(","),i=R(t.mediaQueryList);r!==i&&(e.params=e.params.replace(r," "+i))}}});$.postcss=!0;export{$ as default}; diff --git a/dist/to-lower-case-a-z.d.ts b/dist/to-lower-case-a-z.d.ts new file mode 100644 index 0000000..396b252 --- /dev/null +++ b/dist/to-lower-case-a-z.d.ts @@ -0,0 +1 @@ +export declare function toLowerCaseAZ(x: string): string; diff --git a/dist/transform-single-pair.d.ts b/dist/transform-single-pair.d.ts index 70dc850..2b3e5ce 100644 --- a/dist/transform-single-pair.d.ts +++ b/dist/transform-single-pair.d.ts @@ -1,2 +1,2 @@ import { MediaFeature, MediaFeatureComparison, MediaFeatureValue } from '@csstools/media-query-list-parser'; -export declare function transformSingleNameValuePair(name: string, operator: MediaFeatureComparison, value: MediaFeatureValue, nameBeforeValue: boolean): MediaFeature | null; +export declare function transformSingleNameValuePair(name: string, operator: MediaFeatureComparison, value: MediaFeatureValue, nameBeforeValue: boolean): MediaFeature | undefined; diff --git a/package.json b/package.json index bf96420..0865e1d 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,10 @@ "node": ">=14.0.0" }, "dependencies": { - "@csstools/css-parser-algorithms": "^2.0.0", - "@csstools/css-tokenizer": "^2.0.0", - "@csstools/media-query-list-parser": "^2.0.0" + "@csstools/css-calc": "^1.0.1", + "@csstools/css-parser-algorithms": "^2.1.0", + "@csstools/css-tokenizer": "^2.1.0", + "@csstools/media-query-list-parser": "^2.0.2" }, "peerDependencies": { "postcss": "8.4.5" diff --git a/rollup/configs/externals.mjs b/rollup/configs/externals.mjs index 011fd99..d6f6cdf 100644 --- a/rollup/configs/externals.mjs +++ b/rollup/configs/externals.mjs @@ -1,5 +1,6 @@ export const externalsForPlugin = [ 'postcss', + '@csstools/css-calc', '@csstools/css-parser-algorithms', '@csstools/css-tokenizer', '@csstools/media-query-list-parser', diff --git a/src/to-lower-case-a-z.ts b/src/to-lower-case-a-z.ts new file mode 100644 index 0000000..d82e0bf --- /dev/null +++ b/src/to-lower-case-a-z.ts @@ -0,0 +1,4 @@ +const toLowerCaseAZRegex = /[A-Z]/g; +export function toLowerCaseAZ(x: string): string { + return x.replace(toLowerCaseAZRegex, (c) => String.fromCharCode(c.charCodeAt(0) + 32)); +} diff --git a/src/transform-single-pair.ts b/src/transform-single-pair.ts index 5f3c518..04d68bd 100644 --- a/src/transform-single-pair.ts +++ b/src/transform-single-pair.ts @@ -1,8 +1,9 @@ +import { calcFromComponentValues } from '@csstools/css-calc'; import { ComponentValue, isFunctionNode, isTokenNode } from '@csstools/css-parser-algorithms'; import { CSSToken, NumberType, TokenType } from '@csstools/css-tokenizer'; -import { invertComparison, matchesRatioExactly, MediaFeature, MediaFeatureComparison, MediaFeatureEQ, MediaFeatureGT, MediaFeatureLT, MediaFeatureValue, newMediaFeaturePlain } from '@csstools/media-query-list-parser'; +import { invertComparison, matchesRatio, matchesRatioExactly, MediaFeature, MediaFeatureComparison, MediaFeatureEQ, MediaFeatureGT, MediaFeatureLT, MediaFeatureValue, newMediaFeaturePlain } from '@csstools/media-query-list-parser'; -const unitsForFeature = { +const unitsForFeature: Record = { 'width': 'px', 'height': 'px', 'device-width': 'px', @@ -15,6 +16,19 @@ const unitsForFeature = { 'resolution': 'dpi', }; +const integerFeatures: Record = { + 'width': false, + 'height': false, + 'device-width': false, + 'device-height': false, + 'aspect-ratio': false, + 'device-aspect-ratio': false, + 'color': true, + 'color-index': true, + 'monochrome': true, + 'resolution': 'dpi', +}; + function featureNamePrefix(operator: MediaFeatureComparison) { if (operator === MediaFeatureLT.LT || operator === MediaFeatureLT.LT_OR_EQ) { return 'max-'; @@ -33,8 +47,9 @@ const power = { }; const step = .001; // smallest even number that won’t break complex queries (1in = 96px) +const pixelStep = .02; // smallest step that will work in older Safari -export function transformSingleNameValuePair(name: string, operator: MediaFeatureComparison, value: MediaFeatureValue, nameBeforeValue: boolean): MediaFeature | null { +export function transformSingleNameValuePair(name: string, operator: MediaFeatureComparison, value: MediaFeatureValue, nameBeforeValue: boolean): MediaFeature | undefined { let tokensBefore: Array = value.before; let tokensAfter: Array = value.after; if (!nameBeforeValue) { @@ -69,95 +84,164 @@ export function transformSingleNameValuePair(name: string, operator: MediaFeatur } } - if (Array.isArray(value.value) && matchesRatioExactly(value.value)) { - // TODO : handle ratio - return; - } + let isRatio = false; + let valueNode: ComponentValue | undefined; + let valueRemainder: Array; - let valueNode: ComponentValue; if (Array.isArray(value.value)) { - valueNode = value.value.find((x) => { - return isFunctionNode(x) || isTokenNode(x); - }); + if (!matchesRatioExactly(value.value)) { + return; + } + + if (name !== 'aspect-ratio' && name !== 'device-aspect-ratio') { + return; + } + + const ratioValues = matchesRatio(value.value); + if (ratioValues === -1) { + return; + } + + isRatio = true; + valueNode = value.value[ratioValues[0]]; + valueRemainder = [ + ...value.value.slice(ratioValues[0] + 1).flatMap(x => x.tokens()), + ]; } else { valueNode = value.value; + valueRemainder = []; } - if (isFunctionNode(valueNode) && valueNode.getName().toLowerCase() === 'calc') { - let valueToken; - if (unitsForFeature[name.toLowerCase()]) { - const tokenValue = power[operator]; - const tokenUnit = unitsForFeature[name.toLowerCase()]; + const featureUnit: string | undefined = unitsForFeature[name.toLowerCase()]; - valueToken = [TokenType.Dimension, `${tokenValue.toString()}${tokenUnit}`, -1, -1, { value: tokenValue, unit: tokenUnit, type: NumberType.Integer }]; + // 1. If the value is a calc() function, try to evaluate it. + if (isFunctionNode(valueNode) && valueNode.getName().toLowerCase() === 'calc') { + const [[result]] = calcFromComponentValues([[valueNode]], { precision: 5, toCanonicalUnits: true }); + if ( + result && + isTokenNode(result) && + ( + result.value[0] === TokenType.Number || + result.value[0] === TokenType.Percentage || + result.value[0] === TokenType.Dimension + ) && + Number.isInteger(result.value[4].value) + ) { + // 1.a. If the result is an integer it is safe to use the result as the value and proceed as if there was no calc() function. + + valueNode = result; } else { - const tokenValue = power[operator]; + // 1.b. If the result is not an integer, it is not safe to use the result as the value. + // Wrap the value in an additional calc() function and adjust with the appropriate step. - valueToken = [TokenType.Number, tokenValue.toString(), -1, -1, { value: tokenValue, type: NumberType.Integer }]; - } + let valueToken: CSSToken; - return newMediaFeaturePlain( - featureNamePrefix(operator) + name, - ...tokensBefore, - [TokenType.Function, 'calc(', -1, -1, { value: 'calc(' }], - [TokenType.OpenParen, '(', -1, -1, undefined], - ...valueNode.tokens().slice(1), - [TokenType.Whitespace, ' ', -1, -1, undefined], - [TokenType.Delim, '+', -1, -1, undefined], - [TokenType.Whitespace, ' ', -1, -1, undefined], - valueToken, - [TokenType.CloseParen, ')', -1, -1, undefined], - ...tokensAfter, - ); - } else if (isTokenNode(valueNode)) { - let token = valueNode.value; - let tokenValue: number; - let tokenUnit: string | false = false; - - if ((token[0] === TokenType.Dimension || token[0] === TokenType.Number) && token[4].value === 0) { - // Zero values: - // - convert to "1" or "-1" - // - assign a unit when needed - tokenValue = power[operator]; - tokenUnit = unitsForFeature[name.toLowerCase()]; - } else if (token[0] === TokenType.Dimension && token[4].unit === 'px' && token[4].type === NumberType.Integer) { - // Integer pixel values - // - add "+1" or "-1" - tokenValue = token[4].value + power[operator]; - } else if (token[0] === TokenType.Dimension || token[0] === TokenType.Number) { - // Float or non-pixel values - // - add "+step" or "-step" - tokenValue = Number(Math.round(Number(token[4].value + step * power[operator] + 'e6')) + 'e-6'); - } else { - return; - } + if (typeof featureUnit !== 'undefined') { + const tokenValue = power[operator] * (featureUnit === 'px' ? pixelStep : step); - if (tokenUnit !== false) { - token = [ - TokenType.Dimension, - token[1], - token[2], - token[3], - { - value: token[4].value, - unit: tokenUnit, - type: token[4].type, - }, - ]; - } + valueToken = [TokenType.Dimension, `${tokenValue.toString()}${featureUnit}`, -1, -1, { value: tokenValue, unit: featureUnit, type: NumberType.Integer }]; + } else if (integerFeatures[name] === true) { + const tokenValue = power[operator]; - token[4].value = tokenValue; - if (token[0] === TokenType.Dimension) { - token[1] = token[4].value.toString() + token[4].unit; - } else { - token[1] = token[4].value.toString(); + valueToken = [TokenType.Number, tokenValue.toString(), -1, -1, { value: tokenValue, type: NumberType.Integer }]; + } else if (isRatio) { + const tokenValue = power[operator] * step; + + valueToken = [TokenType.Number, tokenValue.toString(), -1, -1, { value: tokenValue, type: NumberType.Integer }]; + } else { + const tokenValue = power[operator]; + + valueToken = [TokenType.Number, tokenValue.toString(), -1, -1, { value: tokenValue, type: NumberType.Integer }]; + } + + // 1.c. return a new media feature with the adjusted value. + return newMediaFeaturePlain( + featureNamePrefix(operator) + name, + ...tokensBefore, + [TokenType.Function, 'calc(', -1, -1, { value: 'calc(' }], + [TokenType.OpenParen, '(', -1, -1, undefined], + ...valueNode.tokens().slice(1), + [TokenType.Whitespace, ' ', -1, -1, undefined], + [TokenType.Delim, '+', -1, -1, { value: '+' }], + [TokenType.Whitespace, ' ', -1, -1, undefined], + valueToken, + [TokenType.CloseParen, ')', -1, -1, undefined], + ...valueRemainder, + ...tokensAfter, + ); } + } - return newMediaFeaturePlain( - featureNamePrefix(operator) + name, - ...tokensBefore, - token, - ...tokensAfter, - ); + // 2. If the value is not a single token, return. + if (!isTokenNode(valueNode)) { + return; } + + // 3. The value is a single token. + // Adjust the value by the appropriate step and return a new media feature with the adjusted value. + + let token = valueNode.value; + let tokenValue: number; + let tokenUnit = ''; + + if (typeof featureUnit !== 'undefined' && token[0] === TokenType.Number && token[4].value === 0) { + // unit-less zero for dimension features: + // - convert to "1" or "-1" + tokenValue = power[operator]; + tokenUnit = featureUnit; + } else if (token[0] === TokenType.Number && token[4].value === 0) { + // unit-less zero for number features: + // - convert to "1" or "-1" + tokenValue = power[operator]; + tokenUnit = ''; + } else if ((token[0] === TokenType.Dimension) && token[4].value === 0) { + // Zero values: + // - convert to "1" or "-1" + // - assign a unit when needed + tokenValue = power[operator]; + tokenUnit = token[4].unit; + } else if (token[0] === TokenType.Number && integerFeatures[name] === true) { + // Integer features + // - add "+step" or "-step" + tokenValue = token[4].value + power[operator]; + } else if (token[0] === TokenType.Dimension && token[4].unit === 'px' && token[4].type === NumberType.Integer) { + // Pixel values + // - add "+1" or "-1" + tokenValue = Number(Math.round(Number(token[4].value + pixelStep * power[operator] + 'e6')) + 'e-6'); + } else if (token[0] === TokenType.Dimension || token[0] === TokenType.Number) { + // Float or non-pixel values + // - add "+step" or "-step" + tokenValue = Number(Math.round(Number(token[4].value + step * power[operator] + 'e6')) + 'e-6'); + } else { + return; + } + + if (tokenUnit) { + token = [ + TokenType.Dimension, + token[1], + token[2], + token[3], + { + value: token[4].value, + unit: tokenUnit, + type: token[4].type, + }, + ]; + } + + token[4].value = tokenValue; + if (token[0] === TokenType.Dimension) { + token[1] = token[4].value.toString() + token[4].unit; + } else { + token[1] = token[4].value.toString(); + } + + return newMediaFeaturePlain( + featureNamePrefix(operator) + name, + ...tokensBefore, + token, + ...valueRemainder, + ...tokensAfter, + ); } diff --git a/src/transform.ts b/src/transform.ts index c0fac8c..96b5d8d 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -1,6 +1,7 @@ import { gatherNodeAncestry } from '@csstools/css-parser-algorithms'; import { stringify, TokenType } from '@csstools/css-tokenizer'; import { isMediaAnd, isMediaCondition, isMediaConditionListWithAnd, isMediaFeature, isMediaFeatureRange, isMediaFeatureRangeNameValue, isMediaFeatureRangeValueName, isMediaInParens, isMediaQuery, MediaAnd, MediaCondition, MediaConditionListWithAnd, MediaFeature, MediaInParens, MediaQuery, MediaFeatureLT } from '@csstools/media-query-list-parser'; +import { toLowerCaseAZ } from './to-lower-case-a-z'; import { transformSingleNameValuePair } from './transform-single-pair'; const supportedFeatureNames = new Set([ @@ -33,8 +34,8 @@ export function transform(mediaQueries: Array) { return; } - const name = node.name.getName(); - if (!supportedFeatureNames.has(name.toLowerCase())) { + const name = toLowerCaseAZ(node.name.getName()); + if (!supportedFeatureNames.has(name)) { return; } @@ -72,10 +73,10 @@ export function transform(mediaQueries: Array) { if (operator === MediaFeatureLT.LT || operator === MediaFeatureLT.LT_OR_EQ) { featureOne = transformed; - featureOne.before = parent.before + featureOne.before = parent.before; } else { featureTwo = transformed; - featureTwo.after = parent.after + featureTwo.after = parent.after; } } @@ -92,13 +93,17 @@ export function transform(mediaQueries: Array) { if (operator === MediaFeatureLT.LT || operator === MediaFeatureLT.LT_OR_EQ) { featureTwo = transformed; - featureTwo.before = parent.before + featureTwo.before = parent.before; } else { featureOne = transformed; - featureOne.after = parent.after + featureOne.after = parent.after; } } + if (!featureOne || !featureTwo) { + return; + } + const parensOne = new MediaInParens( featureOne, ); @@ -212,12 +217,12 @@ export function transform(mediaQueries: Array) { } return true; - }) + }), ); }).join(','); } -function getMediaConditionListWithAndFromAncestry(mediaInParens: MediaInParens, ancestry: Map): MediaConditionListWithAnd | null { +function getMediaConditionListWithAndFromAncestry(mediaInParens: MediaInParens, ancestry: Map): MediaConditionListWithAnd | undefined { let focus: unknown = mediaInParens; if (!focus) { return; @@ -240,7 +245,7 @@ function getMediaConditionListWithAndFromAncestry(mediaInParens: MediaInParens, return; } -function getMediaConditionInShallowMediaQueryFromAncestry(mediaInParens: MediaInParens, mediaQuery: MediaQuery, ancestry: Map): MediaCondition | null { +function getMediaConditionInShallowMediaQueryFromAncestry(mediaInParens: MediaInParens, mediaQuery: MediaQuery, ancestry: Map): MediaCondition | undefined { let focus: unknown = mediaInParens; if (!focus) { return; diff --git a/test/fixtures/aspect-ratio.css b/test/fixtures/aspect-ratio.css index a7cd2e0..0d2acb1 100644 --- a/test/fixtures/aspect-ratio.css +++ b/test/fixtures/aspect-ratio.css @@ -7,3 +7,14 @@ @media screen and (aspect-ratio) and (1 / 1000 <= aspect-ratio <= 16 / 9) {} @media screen and (0/0 < aspect-ratio < 16/9) {} + + +@media screen and (aspect-ratio >= calc(0.33 + 0.66) / 1000) and (aspect-ratio <= calc(11.1 + 5.9) / 9) {} + +@media screen and (calc(0.33 + 0.66) / 1000 <= aspect-ratio <= calc(11.1 + 5.9) / 9) {} + +@media screen and (0/0 <= aspect-ratio <= calc(11.1 + 5.9)/9) {} + +@media screen and (aspect-ratio) and (calc(0.33 + 0.66) / 1000 <= aspect-ratio <= calc(11.1 + 5.9) / 9) {} + +@media screen and (0/0 < aspect-ratio < calc(11.1 + 5.9)/9) {} diff --git a/test/fixtures/aspect-ratio.output.css b/test/fixtures/aspect-ratio.output.css index beb8514..310a2be 100644 --- a/test/fixtures/aspect-ratio.output.css +++ b/test/fixtures/aspect-ratio.output.css @@ -6,4 +6,15 @@ @media screen and (aspect-ratio) and (min-aspect-ratio: 1 / 1000) and (max-aspect-ratio: 16 / 9) {} -@media screen and (0/0 < aspect-ratio < 16/9) {} +@media screen and (min-aspect-ratio: 1/0) and (max-aspect-ratio: 15.999/9) {} + + +@media screen and (min-aspect-ratio: calc(0.33 + 0.66) / 1000) and (max-aspect-ratio: calc(11.1 + 5.9) / 9) {} + +@media screen and (min-aspect-ratio: calc(0.33 + 0.66) / 1000) and (max-aspect-ratio: calc(11.1 + 5.9) / 9) {} + +@media screen and (min-aspect-ratio: 0/0) and (max-aspect-ratio: calc(11.1 + 5.9)/9) {} + +@media screen and (aspect-ratio) and (min-aspect-ratio: calc(0.33 + 0.66) / 1000) and (max-aspect-ratio: calc(11.1 + 5.9) / 9) {} + +@media screen and (min-aspect-ratio: 1/0) and (max-aspect-ratio: 16.999/9) {} diff --git a/test/fixtures/calc.css b/test/fixtures/calc.css index 0a18c9e..88d6cf3 100644 --- a/test/fixtures/calc.css +++ b/test/fixtures/calc.css @@ -1,3 +1,4 @@ +/* px */ @media (width < calc(10px * 50)) {} @media (width <= calc(10px * 50)) {} @@ -33,3 +34,78 @@ @media (calc(10px * 50) > width >= calc(100px * 10)) {} @media (calc(10px * 50) >= width >= calc(100px * 10)) {} + + +/* rem */ +@media (width < calc(1rem * 50)) {} + +@media (width <= calc(1rem * 50)) {} + +@media (width = calc(1rem * 50)) {} + +@media (width > calc(1rem * 50)) {} + +@media (width >= calc(1rem * 50)) {} + +@media (calc(1rem * 50) < width) {} + +@media (calc(1rem * 50) <= width) {} + +@media (calc(1rem * 50) = width) {} + +@media (calc(1rem * 50) > width) {} + +@media (calc(1rem * 50) >= width) {} + +@media (calc(1rem * 50) < width < calc(10rem * 10)) {} + +@media (calc(1rem * 50) <= width < calc(10rem * 10)) {} + +@media (calc(1rem * 50) < width <= calc(10rem * 10)) {} + +@media (calc(1rem * 50) <= width <= calc(10rem * 10)) {} + +@media (calc(1rem * 50) > width > calc(10rem * 10)) {} + +@media (calc(1rem * 50) >= width > calc(10rem * 10)) {} + +@media (calc(1rem * 50) > width >= calc(10rem * 10)) {} + +@media (calc(1rem * 50) >= width >= calc(10rem * 10)) {} + +/* not an integer */ +@media (width < calc(10px / 3)) {} + +@media (width <= calc(10px / 3)) {} + +@media (width = calc(10px / 3)) {} + +@media (width > calc(10px / 3)) {} + +@media (width >= calc(10px / 3)) {} + +@media (calc(10px / 3) < width) {} + +@media (calc(10px / 3) <= width) {} + +@media (calc(10px / 3) = width) {} + +@media (calc(10px / 3) > width) {} + +@media (calc(10px / 3) >= width) {} + +@media (calc(10px / 3) < width < calc(100px / 3)) {} + +@media (calc(10px / 3) <= width < calc(100px / 3)) {} + +@media (calc(10px / 3) < width <= calc(100px / 3)) {} + +@media (calc(10px / 3) <= width <= calc(100px / 3)) {} + +@media (calc(10px / 3) > width > calc(100px / 3)) {} + +@media (calc(10px / 3) >= width > calc(100px / 3)) {} + +@media (calc(10px / 3) > width >= calc(100px / 3)) {} + +@media (calc(10px / 3) >= width >= calc(100px / 3)) {} diff --git a/test/fixtures/calc.output.css b/test/fixtures/calc.output.css index 94a5d7e..6baee28 100644 --- a/test/fixtures/calc.output.css +++ b/test/fixtures/calc.output.css @@ -1,35 +1,111 @@ -@media (max-width: calc((10px * 50) + -1px)) {} +/* px */ +@media (max-width: 499.98px) {} @media (max-width: calc(10px * 50)) {} @media (width: calc(10px * 50)) {} -@media (min-width: calc((10px * 50) + 1px)) {} +@media (min-width: 500.02px) {} @media (min-width: calc(10px * 50)) {} -@media (min-width: calc((10px * 50) + 1px)) {} +@media (min-width: 500.02px) {} @media (min-width: calc(10px * 50)) {} @media (width: calc(10px * 50)) {} -@media (max-width: calc((10px * 50) + -1px)) {} +@media (max-width: 499.98px) {} @media (max-width: calc(10px * 50)) {} -@media (min-width: calc((10px * 50) + 1px)) and (max-width: calc((100px * 10) + -1px)) {} +@media (min-width: 500.02px) and (max-width: 999.98px) {} -@media (min-width: calc(10px * 50)) and (max-width: calc((100px * 10) + -1px)) {} +@media (min-width: calc(10px * 50)) and (max-width: 999.98px) {} -@media (min-width: calc((10px * 50) + 1px)) and (max-width: calc(100px * 10)) {} +@media (min-width: 500.02px) and (max-width: calc(100px * 10)) {} @media (min-width: calc(10px * 50)) and (max-width: calc(100px * 10)) {} -@media (min-width: calc((100px * 10) + 1px)) and (max-width: calc((10px * 50) + -1px)) {} +@media (min-width: 1000.02px) and (max-width: 499.98px) {} -@media (min-width: calc((100px * 10) + 1px)) and (max-width: calc(10px * 50)) {} +@media (min-width: 1000.02px) and (max-width: calc(10px * 50)) {} -@media (min-width: calc(100px * 10)) and (max-width: calc((10px * 50) + -1px)) {} +@media (min-width: calc(100px * 10)) and (max-width: 499.98px) {} @media (min-width: calc(100px * 10)) and (max-width: calc(10px * 50)) {} + + +/* rem */ +@media (max-width: 49.999rem) {} + +@media (max-width: calc(1rem * 50)) {} + +@media (width: calc(1rem * 50)) {} + +@media (min-width: 50.001rem) {} + +@media (min-width: calc(1rem * 50)) {} + +@media (min-width: 50.001rem) {} + +@media (min-width: calc(1rem * 50)) {} + +@media (width: calc(1rem * 50)) {} + +@media (max-width: 49.999rem) {} + +@media (max-width: calc(1rem * 50)) {} + +@media (min-width: 50.001rem) and (max-width: 99.999rem) {} + +@media (min-width: calc(1rem * 50)) and (max-width: 99.999rem) {} + +@media (min-width: 50.001rem) and (max-width: calc(10rem * 10)) {} + +@media (min-width: calc(1rem * 50)) and (max-width: calc(10rem * 10)) {} + +@media (min-width: 100.001rem) and (max-width: 49.999rem) {} + +@media (min-width: 100.001rem) and (max-width: calc(1rem * 50)) {} + +@media (min-width: calc(10rem * 10)) and (max-width: 49.999rem) {} + +@media (min-width: calc(10rem * 10)) and (max-width: calc(1rem * 50)) {} + +/* not an integer */ +@media (max-width: calc((10px / 3) + -0.02px)) {} + +@media (max-width: calc(10px / 3)) {} + +@media (width: calc(10px / 3)) {} + +@media (min-width: calc((10px / 3) + 0.02px)) {} + +@media (min-width: calc(10px / 3)) {} + +@media (min-width: calc((10px / 3) + 0.02px)) {} + +@media (min-width: calc(10px / 3)) {} + +@media (width: calc(10px / 3)) {} + +@media (max-width: calc((10px / 3) + -0.02px)) {} + +@media (max-width: calc(10px / 3)) {} + +@media (min-width: calc((10px / 3) + 0.02px)) and (max-width: calc((100px / 3) + -0.02px)) {} + +@media (min-width: calc(10px / 3)) and (max-width: calc((100px / 3) + -0.02px)) {} + +@media (min-width: calc((10px / 3) + 0.02px)) and (max-width: calc(100px / 3)) {} + +@media (min-width: calc(10px / 3)) and (max-width: calc(100px / 3)) {} + +@media (min-width: calc((100px / 3) + 0.02px)) and (max-width: calc((10px / 3) + -0.02px)) {} + +@media (min-width: calc((100px / 3) + 0.02px)) and (max-width: calc(10px / 3)) {} + +@media (min-width: calc(100px / 3)) and (max-width: calc((10px / 3) + -0.02px)) {} + +@media (min-width: calc(100px / 3)) and (max-width: calc(10px / 3)) {} diff --git a/test/fixtures/color-index.css b/test/fixtures/color-index.css index 978e8e4..97b36a6 100644 --- a/test/fixtures/color-index.css +++ b/test/fixtures/color-index.css @@ -3,3 +3,9 @@ @media screen and (0 <= color-index <= 8) {} @media screen and (color-index) and (6 <= color-index <= 256) {} + +@media screen and (color-index > 0) and (color-index < 8) {} + +@media screen and (0 < color-index < 8) {} + +@media screen and (color-index) and (6 < color-index < 256) {} diff --git a/test/fixtures/color-index.output.css b/test/fixtures/color-index.output.css index af6e7d1..af78370 100644 --- a/test/fixtures/color-index.output.css +++ b/test/fixtures/color-index.output.css @@ -3,3 +3,9 @@ @media screen and (min-color-index: 0) and (max-color-index: 8) {} @media screen and (color-index) and (min-color-index: 6) and (max-color-index: 256) {} + +@media screen and (min-color-index: 1) and (max-color-index: 7) {} + +@media screen and (min-color-index: 1) and (max-color-index: 7) {} + +@media screen and (color-index) and (min-color-index: 7) and (max-color-index: 255) {} diff --git a/test/fixtures/color.css b/test/fixtures/color.css index 765dd70..dfe4f01 100644 --- a/test/fixtures/color.css +++ b/test/fixtures/color.css @@ -3,3 +3,9 @@ @media screen and (0 <= color <= 8) {} @media screen and (color) and (6 <= color <= 256) {} + +@media screen and (color > 0) and (color < 8) {} + +@media screen and (0 < color < 8) {} + +@media screen and (color) and (6 < color < 256) {} diff --git a/test/fixtures/color.output.css b/test/fixtures/color.output.css index 148fcf9..aeda476 100644 --- a/test/fixtures/color.output.css +++ b/test/fixtures/color.output.css @@ -3,3 +3,9 @@ @media screen and (min-color: 0) and (max-color: 8) {} @media screen and (color) and (min-color: 6) and (max-color: 256) {} + +@media screen and (min-color: 1) and (max-color: 7) {} + +@media screen and (min-color: 1) and (max-color: 7) {} + +@media screen and (color) and (min-color: 7) and (max-color: 255) {} diff --git a/test/fixtures/complex.output.css b/test/fixtures/complex.output.css index c1782ed..00e9fb4 100644 --- a/test/fixtures/complex.output.css +++ b/test/fixtures/complex.output.css @@ -1,14 +1,14 @@ -@media screen and (not ( (min-width: 200px) and (max-width: 499px))) {} +@media screen and (not ( (min-width: 200px) and (max-width: 499.98px))) {} -@media (min-height: 500px) and (min-width: 200px) and (max-width: 499px) {} +@media (min-height: 500px) and (min-width: 200px) and (max-width: 499.98px) {} -@media screen and not ( (min-width: 200px) and (max-width: 499px)) {} +@media screen and not ( (min-width: 200px) and (max-width: 499.98px)) {} -@media (not ( (min-width: 200px) and (max-width: 499px))) {} +@media (not ( (min-width: 200px) and (max-width: 499.98px))) {} -@media ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499px))) {} +@media ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499.98px))) {} -@media screen and (not ( (min-width: 200px) and (max-width: 499px))), - screen and not ( (min-width: 200px) and (max-width: 499px)), - (not ( (min-width: 200px) and (max-width: 499px))), - ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499px))) {} +@media screen and (not ( (min-width: 200px) and (max-width: 499.98px))), + screen and not ( (min-width: 200px) and (max-width: 499.98px)), + (not ( (min-width: 200px) and (max-width: 499.98px))), + ((min-width: 300px) or ( (min-width: 200px) and (max-width: 499.98px))) {} diff --git a/test/fixtures/custom-media.output.css b/test/fixtures/custom-media.output.css index 6106095..392f5e4 100644 --- a/test/fixtures/custom-media.output.css +++ b/test/fixtures/custom-media.output.css @@ -1,9 +1,9 @@ -@custom-media --one (max-width: 299px) {} +@custom-media --one (max-width: 299.98px) {} @custom-media --two (max-width: 300px), (width:300px) {} @custom-media --three (width: 300px) {} -@custom-media /* a comment */ --four (min-width: 301px) {} +@custom-media /* a comment */ --four (min-width: 300.02px) {} @custom-media /* a comment */ --five (min-width: 300px) /* a comment */ {} diff --git a/test/fixtures/min-max.output.css b/test/fixtures/min-max.output.css index b3249f6..6f0ba2d 100644 --- a/test/fixtures/min-max.output.css +++ b/test/fixtures/min-max.output.css @@ -1,6 +1,6 @@ -@media screen and (min-width: 501px) and (max-width: 1199px) {} +@media screen and (min-width: 500.02px) and (max-width: 1199.98px) {} -@media screen and (min-width: 501px) and (max-width: 1199px) {} +@media screen and (min-width: 500.02px) and (max-width: 1199.98px) {} @media screen and (min-width: 40.001em) and (max-width: 59.999em) {} @@ -13,9 +13,9 @@ @media screen and (width) and (min-width: 0.081px) and (max-width: 0.679px) {} /* height */ -@media screen and (min-height: 501px) and (max-height: 1199px) {} +@media screen and (min-height: 500.02px) and (max-height: 1199.98px) {} -@media screen and (min-height: 501px) and (max-height: 1199px) {} +@media screen and (min-height: 500.02px) and (max-height: 1199.98px) {} @media screen and (min-height: 40.001em) and (max-height: 59.999em) {} diff --git a/test/fixtures/more-units.css b/test/fixtures/more-units.css index 319a4e8..32f434f 100644 --- a/test/fixtures/more-units.css +++ b/test/fixtures/more-units.css @@ -12,3 +12,18 @@ @media screen and (resolution >= 1000dpi) and (resolution <= 3dppx) { } @media screen and (1000000dpi <= resolution <= 1000000dpcm) { } @media screen and (1 / 1000 <= resolution <= 16 /9) { } + + +@media screen and (color-index > 0) and (color-index < 1000) { } +@media screen and (monochrome > 0) and (monochrome < 1000) { } + + +@media screen and (resolution > 96dpi) and (resolution < 3dppx) { } +@media screen and (width > -200px) and (width < 900.56px) { } +@media screen and (width > -0.58px) and (width < .99px) { } +@media screen and (width > 3rem) and (width < 5em) { } + + +@media screen and (resolution > 1000dpi) and (resolution < 3dppx) { } +@media screen and (1000000dpi < resolution < 1000000dpcm) { } +@media screen and (1 / 1000 < resolution < 16 /9) { } diff --git a/test/fixtures/more-units.output.css b/test/fixtures/more-units.output.css index 515bc92..3e5df1c 100644 --- a/test/fixtures/more-units.output.css +++ b/test/fixtures/more-units.output.css @@ -12,3 +12,18 @@ @media screen and (min-resolution: 1000dpi) and (max-resolution: 3dppx) { } @media screen and (min-resolution: 1000000dpi) and (max-resolution: 1000000dpcm) { } @media screen and (min-resolution: 1 / 1000) and (max-resolution: 16 /9) { } + + +@media screen and (min-color-index: 1) and (max-color-index: 999) { } +@media screen and (min-monochrome: 1) and (max-monochrome: 999) { } + + +@media screen and (min-resolution: 96.001dpi) and (max-resolution: 2.999dppx) { } +@media screen and (min-width: -199.98px) and (max-width: 900.559px) { } +@media screen and (min-width: -0.579px) and (max-width: 0.989px) { } +@media screen and (min-width: 3.001rem) and (max-width: 4.999em) { } + + +@media screen and (min-resolution: 1000.001dpi) and (max-resolution: 2.999dppx) { } +@media screen and (min-resolution: 1000000.001dpi) and (max-resolution: 999999.999dpcm) { } +@media screen and (1 / 1000 < resolution < 16 /9) { } diff --git a/test/fixtures/operators.output.css b/test/fixtures/operators.output.css index 7ffbbb0..a127978 100644 --- a/test/fixtures/operators.output.css +++ b/test/fixtures/operators.output.css @@ -1,36 +1,36 @@ -@media (max-width: 299px) {} +@media (max-width: 299.98px) {} @media (max-width: 300px) {} @media (width: 300px) {} -@media (min-width: 301px) {} +@media (min-width: 300.02px) {} @media (min-width: 300px) {} -@media (min-width: 301px) {} +@media (min-width: 300.02px) {} @media (min-width: 300px) {} @media (width: 300px) {} -@media (max-width: 299px) {} +@media (max-width: 299.98px) {} @media (max-width: 300px) {} -@media (min-width: 301px) and (max-width: 999px) {} +@media (min-width: 300.02px) and (max-width: 999.98px) {} -@media (min-width: 300px) and (max-width: 999px) {} +@media (min-width: 300px) and (max-width: 999.98px) {} -@media (min-width: 301px) and (max-width: 1000px) {} +@media (min-width: 300.02px) and (max-width: 1000px) {} @media (min-width: 300px) and (max-width: 1000px) {} -@media (min-width: 1001px) and (max-width: 299px) {} +@media (min-width: 1000.02px) and (max-width: 299.98px) {} -@media (min-width: 1001px) and (max-width: 300px) {} +@media (min-width: 1000.02px) and (max-width: 300px) {} -@media (min-width: 1000px) and (max-width: 299px) {} +@media (min-width: 1000px) and (max-width: 299.98px) {} @media (min-width: 1000px) and (max-width: 300px) {} diff --git a/test/fixtures/shorthands.output.css b/test/fixtures/shorthands.output.css index 21d0478..aa2acb1 100644 --- a/test/fixtures/shorthands.output.css +++ b/test/fixtures/shorthands.output.css @@ -1,13 +1,13 @@ -@media (min-width: 768px) and (max-width: 1023px) {} -@media (min-width: 768px) and (max-width: 1023px) {} +@media (min-width: 768px) and (max-width: 1023.98px) {} +@media (min-width: 768px) and (max-width: 1023.98px) {} -@media (min-width: 769px) and (max-width: 1024px) {} -@media (min-width: 769px) and (max-width: 1024px) {} +@media (min-width: 768.02px) and (max-width: 1024px) {} +@media (min-width: 768.02px) and (max-width: 1024px) {} @media (min-width: 768px) and (max-width: 1024px) {} @media (min-width: 768px) and (max-width: 1024px) {} -@media (min-width: 769px) and (max-width: 1023px) {} -@media (min-width: 769px) and (max-width: 1023px) {} +@media (min-width: 768.02px) and (max-width: 1023.98px) {} +@media (min-width: 768.02px) and (max-width: 1023.98px) {} -@media (min-width: 769px) and (max-width: 1023px), (min-width: 769px) and (max-width: 1023px) {} +@media (min-width: 768.02px) and (max-width: 1023.98px), (min-width: 768.02px) and (max-width: 1023.98px) {} diff --git a/yarn.lock b/yarn.lock index 578e9d8..b7cc59f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.1.0": +"@ampproject/remapping@^2.2.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== @@ -17,39 +17,40 @@ dependencies: "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.0", "@babel/compat-data@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30" - integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ== +"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298" + integrity sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g== "@babel/core@^7.19.3": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" - integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" + integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== dependencies: - "@ampproject/remapping" "^2.1.0" + "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.2" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-module-transforms" "^7.20.2" - "@babel/helpers" "^7.20.1" - "@babel/parser" "^7.20.2" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" + "@babel/generator" "^7.21.3" + "@babel/helper-compilation-targets" "^7.20.7" + "@babel/helper-module-transforms" "^7.21.2" + "@babel/helpers" "^7.21.0" + "@babel/parser" "^7.21.3" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.21.3" + "@babel/types" "^7.21.3" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.1" + json5 "^2.2.2" semver "^6.3.0" -"@babel/generator@^7.20.1", "@babel/generator@^7.20.2": - version "7.20.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8" - integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA== +"@babel/generator@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" + integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA== dependencies: - "@babel/types" "^7.20.2" + "@babel/types" "^7.21.3" "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" "@babel/helper-annotate-as-pure@^7.18.6": @@ -67,36 +68,38 @@ "@babel/helper-explode-assignable-expression" "^7.18.6" "@babel/types" "^7.18.9" -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a" - integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== +"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" + integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== dependencies: - "@babel/compat-data" "^7.20.0" + "@babel/compat-data" "^7.20.5" "@babel/helper-validator-option" "^7.18.6" browserslist "^4.21.3" + lru-cache "^5.1.1" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.18.6": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz#3c08a5b5417c7f07b5cf3dfb6dc79cbec682e8c2" - integrity sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA== +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz#64f49ecb0020532f19b1d014b03bccaa1ab85fb9" + integrity sha512-Q8wNiMIdwsv5la5SPxNYzzkPnjgC0Sy0i7jLkVOCdllu/xcVNkr3TeZzbHBJrj+XXRqzX5uCyCoV9eu6xUG7KQ== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-function-name" "^7.21.0" + "@babel/helper-member-expression-to-functions" "^7.21.0" "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.19.1" + "@babel/helper-replace-supers" "^7.20.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/helper-split-export-declaration" "^7.18.6" -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz#7976aca61c0984202baca73d84e2337a5424a41b" - integrity sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw== +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.0.tgz#53ff78472e5ce10a52664272a239787107603ebb" + integrity sha512-N+LaFW/auRSWdx7SHD/HiARwXQju1vXTW4fKr4u5SgBUTm51OKEjKgj+cs00ggW3kEvNqwErnlwuq7Y3xBe4eg== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.1.0" + regexpu-core "^5.3.1" "@babel/helper-define-polyfill-provider@^0.3.3": version "0.3.3" @@ -122,13 +125,13 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== +"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" + integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" + "@babel/template" "^7.20.7" + "@babel/types" "^7.21.0" "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" @@ -137,12 +140,12 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-member-expression-to-functions@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815" - integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg== +"@babel/helper-member-expression-to-functions@^7.20.7", "@babel/helper-member-expression-to-functions@^7.21.0": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5" + integrity sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q== dependencies: - "@babel/types" "^7.18.9" + "@babel/types" "^7.21.0" "@babel/helper-module-imports@^7.18.6": version "7.18.6" @@ -151,19 +154,19 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.19.6", "@babel/helper-module-transforms@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712" - integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== +"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.2": + version "7.21.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" + integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== dependencies: "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-module-imports" "^7.18.6" "@babel/helper-simple-access" "^7.20.2" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.21.2" + "@babel/types" "^7.21.2" "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" @@ -177,7 +180,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== -"@babel/helper-remap-async-to-generator@^7.18.6", "@babel/helper-remap-async-to-generator@^7.18.9": +"@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== @@ -187,25 +190,26 @@ "@babel/helper-wrap-function" "^7.18.9" "@babel/types" "^7.18.9" -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz#e1592a9b4b368aa6bdb8784a711e0bcbf0612b78" - integrity sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw== +"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" + integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== dependencies: "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.20.7" "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/traverse" "^7.19.1" - "@babel/types" "^7.19.0" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.20.7" + "@babel/types" "^7.20.7" -"@babel/helper-simple-access@^7.19.4", "@babel/helper-simple-access@^7.20.2": +"@babel/helper-simple-access@^7.20.2": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== dependencies: "@babel/types" "^7.20.2" -"@babel/helper-skip-transparent-expression-wrappers@^7.18.9": +"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== @@ -230,28 +234,28 @@ integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== "@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" + integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== "@babel/helper-wrap-function@^7.18.9": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz#89f18335cff1152373222f76a4b37799636ae8b1" - integrity sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg== + version "7.20.5" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" + integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== dependencies: "@babel/helper-function-name" "^7.19.0" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.0" - "@babel/types" "^7.19.0" + "@babel/traverse" "^7.20.5" + "@babel/types" "^7.20.5" -"@babel/helpers@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9" - integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg== +"@babel/helpers@^7.21.0": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" + integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA== dependencies: - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.0" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.21.0" + "@babel/types" "^7.21.0" "@babel/highlight@^7.18.6": version "7.18.6" @@ -262,10 +266,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" - integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== +"@babel/parser@^7.20.7", "@babel/parser@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" + integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -275,21 +279,21 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz#a11af19aa373d68d561f08e0a57242350ed0ec50" - integrity sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" + integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" - "@babel/plugin-proposal-optional-chaining" "^7.18.9" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" + "@babel/plugin-proposal-optional-chaining" "^7.20.7" "@babel/plugin-proposal-async-generator-functions@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.1.tgz#352f02baa5d69f4e7529bdac39aaa02d41146af9" - integrity sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" + integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== dependencies: "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" @@ -302,12 +306,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-proposal-class-static-block@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz#8aa81d403ab72d3962fc06c26e222dacfc9b9020" - integrity sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz#77bdd66fb7b605f3a61302d224bdfacf5547977d" + integrity sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-class-features-plugin" "^7.21.0" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-proposal-dynamic-import@^7.18.6": @@ -335,11 +339,11 @@ "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-proposal-logical-assignment-operators@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz#8148cbb350483bf6220af06fa6db3690e14b2e23" - integrity sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" + integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": @@ -359,15 +363,15 @@ "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-proposal-object-rest-spread@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz#a556f59d555f06961df1e572bb5eca864c84022d" - integrity sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" + integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== dependencies: - "@babel/compat-data" "^7.20.1" - "@babel/helper-compilation-targets" "^7.20.0" + "@babel/compat-data" "^7.20.5" + "@babel/helper-compilation-targets" "^7.20.7" "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.1" + "@babel/plugin-transform-parameters" "^7.20.7" "@babel/plugin-proposal-optional-catch-binding@^7.18.6": version "7.18.6" @@ -377,13 +381,13 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz#e8e8fe0723f2563960e4bf5e9690933691915993" - integrity sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w== +"@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.20.7": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" + integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-proposal-private-methods@^7.18.6": @@ -395,13 +399,13 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-proposal-private-property-in-object@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz#a64137b232f0aca3733a67eb1a144c192389c503" - integrity sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" + integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-class-features-plugin" "^7.21.0" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": @@ -518,20 +522,20 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-arrow-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz#19063fcf8771ec7b31d742339dac62433d0611fe" - integrity sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" + integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-async-to-generator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz#ccda3d1ab9d5ced5265fdb13f1882d5476c71615" - integrity sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" + integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== dependencies: "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-remap-async-to-generator" "^7.18.6" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-transform-block-scoped-functions@^7.18.6": version "7.18.6" @@ -541,38 +545,39 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-block-scoping@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz#f59b1767e6385c663fd0bce655db6ca9c8b236ed" - integrity sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz#e737b91037e5186ee16b76e7ae093358a5634f02" + integrity sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-classes@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz#c0033cf1916ccf78202d04be4281d161f6709bb2" - integrity sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz#f469d0b07a4c5a7dbb21afad9e27e57b47031665" + integrity sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-compilation-targets" "^7.20.0" + "@babel/helper-compilation-targets" "^7.20.7" "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" + "@babel/helper-function-name" "^7.21.0" "@babel/helper-optimise-call-expression" "^7.18.6" "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-replace-supers" "^7.19.1" + "@babel/helper-replace-supers" "^7.20.7" "@babel/helper-split-export-declaration" "^7.18.6" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz#2357a8224d402dad623caf6259b611e56aec746e" - integrity sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" + integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/template" "^7.20.7" "@babel/plugin-transform-destructuring@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz#c23741cfa44ddd35f5e53896e88c75331b8b2792" - integrity sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw== + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" + integrity sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -600,11 +605,11 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-for-of@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" - integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz#964108c9988de1a60b4be2354a7d7e245f36e86e" + integrity sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-function-name@^7.18.9": version "7.18.9" @@ -630,30 +635,30 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-modules-amd@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.19.6.tgz#aca391801ae55d19c4d8d2ebfeaa33df5f2a2cbd" - integrity sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg== + version "7.20.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" + integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== dependencies: - "@babel/helper-module-transforms" "^7.19.6" - "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-module-transforms" "^7.20.11" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-modules-commonjs@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz#25b32feef24df8038fc1ec56038917eacb0b730c" - integrity sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ== + version "7.21.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz#6ff5070e71e3192ef2b7e39820a06fb78e3058e7" + integrity sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA== dependencies: - "@babel/helper-module-transforms" "^7.19.6" - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/helper-simple-access" "^7.19.4" + "@babel/helper-module-transforms" "^7.21.2" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-simple-access" "^7.20.2" "@babel/plugin-transform-modules-systemjs@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.6.tgz#59e2a84064b5736a4471b1aa7b13d4431d327e0d" - integrity sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ== + version "7.20.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz#467ec6bba6b6a50634eea61c9c232654d8a4696e" + integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== dependencies: "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.19.6" - "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-module-transforms" "^7.20.11" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/helper-validator-identifier" "^7.19.1" "@babel/plugin-transform-modules-umd@^7.18.6": @@ -665,12 +670,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz#ec7455bab6cd8fb05c525a94876f435a48128888" - integrity sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw== + version "7.20.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" + integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.19.0" - "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-create-regexp-features-plugin" "^7.20.5" + "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-new-target@^7.18.6": version "7.18.6" @@ -687,10 +692,10 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/helper-replace-supers" "^7.18.6" -"@babel/plugin-transform-parameters@^7.20.1": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.3.tgz#7b3468d70c3c5b62e46be0a47b6045d8590fb748" - integrity sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA== +"@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz#18fc4e797cf6d6d972cb8c411dbe8a809fa157db" + integrity sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -702,12 +707,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-regenerator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz#585c66cb84d4b4bf72519a34cfce761b8676ca73" - integrity sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ== + version "7.20.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" + integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - regenerator-transform "^0.15.0" + "@babel/helper-plugin-utils" "^7.20.2" + regenerator-transform "^0.15.1" "@babel/plugin-transform-reserved-words@^7.18.6": version "7.18.6" @@ -724,12 +729,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-spread@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz#dd60b4620c2fec806d60cfaae364ec2188d593b6" - integrity sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" + integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/plugin-transform-sticky-regex@^7.18.6": version "7.18.6" @@ -859,81 +864,108 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" +"@babel/regjsgen@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" + integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== + "@babel/runtime@^7.8.4": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9" - integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" + integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== dependencies: - regenerator-runtime "^0.13.10" + regenerator-runtime "^0.13.11" -"@babel/template@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" - integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== +"@babel/template@^7.18.10", "@babel/template@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" + integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" -"@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8" - integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA== +"@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67" + integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.1" + "@babel/generator" "^7.21.3" "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" + "@babel/helper-function-name" "^7.21.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.1" - "@babel/types" "^7.20.0" + "@babel/parser" "^7.21.3" + "@babel/types" "^7.21.3" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.4.4": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" - integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== +"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3", "@babel/types@^7.4.4": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" + integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg== dependencies: "@babel/helper-string-parser" "^7.19.4" "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@csstools/css-parser-algorithms@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.0.0.tgz#2f27a1f2aef94f5d009d3d83f08f1e095dff2b30" - integrity sha512-RbukP8OjQvuH85veuzOq8abPjsvqvleZaQC6W0GJFGpwLUh8XmFMQjvtuIM9bQ589YFx4lwwAcSwN4nfcvxIEw== +"@csstools/css-calc@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@csstools/css-calc/-/css-calc-1.0.1.tgz#c478dbfb2c10e22741b261b2a64998960d69bfc7" + integrity sha512-VBI8X0bmStfc85wWTa2bsbnlBQxgW4FmJ0Ts9ar9UqytE6kii3yg6GO+wpgzht2oK5Qlbpkm1Fy2kcqVmu6f3Q== -"@csstools/css-tokenizer@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.0.0.tgz#fa2a7e8f4ed965e73ba30ee80c00fa64980fd11e" - integrity sha512-IB6EFP0Hc/YEz1sJVD47oFqJP6TXMB+OW1jXSYnOk5g+6wpk2/zkuBa0gm5edIMM9nVUZ3hF0xCBnyFbK5OIyg== +"@csstools/css-parser-algorithms@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.1.0.tgz#c0a605b0218790faeb5911f240964891c6031501" + integrity sha512-KP8TicdXpUyeB1NMlbHud/1l39xvLGvqNFWMpG4qC6H1zs9SadGUHe5SO92n/659sDW9aGDvm9AMru0DZkN1Bw== -"@csstools/media-query-list-parser@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.0.tgz#06c6dce65656e4970927a603e910c6f949c5c07f" - integrity sha512-84kEbyJjh2T4Lnz8EkVQrwNANP+dtNb0SDkI3P7kqKnGorPknQUuq8Iqf2v5UsaH08XzPp3ouVJNsyPOdI2B/Q== +"@csstools/css-tokenizer@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.1.0.tgz#fee4de3d444db3ce9007f3af6474af8ba3e4b930" + integrity sha512-dtqFyoJBHUxGi9zPZdpCKP1xk8tq6KPHJ/NY4qWXiYo6IcSGwzk3L8x2XzZbbyOyBs9xQARoGveU2AsgLj6D2A== + +"@csstools/media-query-list-parser@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.2.tgz#36058f8ff6a28274e7dfe32e48431e1de97c2fbb" + integrity sha512-8V6JD8Av1HttuClYr1ZBu0LRVe5Nnz4qrv8RppO8mobsX/USBHZy5JQOXYIlpOVhl46nzkx3X5cfH6CqUghjrQ== -"@eslint/eslintrc@^1.3.3": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" - integrity sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0": + version "4.5.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.0.tgz#f6f729b02feee2c749f57e334b7a1b5f40a81724" + integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== + +"@eslint/eslintrc@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.2.tgz#01575e38707add677cf73ca1589abba8da899a02" + integrity sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.4.0" - globals "^13.15.0" + espree "^9.5.1" + globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.11.6": - version "0.11.7" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.7.tgz#38aec044c6c828f6ed51d5d7ae3d9b9faf6dbb0f" - integrity sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw== +"@eslint/js@8.37.0": + version "8.37.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.37.0.tgz#cf1b5fa24217fe007f6487a26d765274925efa7d" + integrity sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A== + +"@humanwhocodes/config-array@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" + integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -984,12 +1016,12 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13": version "1.4.14" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": version "0.3.17" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== @@ -1019,24 +1051,24 @@ fastq "^1.6.0" "@rollup/plugin-babel@^6.0.0": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-6.0.2.tgz#92ad7a00cc0e4a6b59e1498cda9f907a9c0d2db3" - integrity sha512-Vnt8XIWYwCf3MD7qhBWYlP9pjSZvcE++nlPXhQYw6YNehl5742AzFbrV6h4BHb20VAOVUlIksVLymQCTwVCGDg== + version "6.0.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-6.0.3.tgz#07ccde15de278c581673034ad6accdb4a153dfeb" + integrity sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg== dependencies: "@babel/helper-module-imports" "^7.18.6" "@rollup/pluginutils" "^5.0.1" "@rollup/plugin-commonjs@^23.0.0": - version "23.0.2" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.2.tgz#3a3a5b7b1b1cb29037eb4992edcaae997d7ebd92" - integrity sha512-e9ThuiRf93YlVxc4qNIurvv+Hp9dnD+4PjOqQs5vAYfcZ3+AXSrcdzXnVjWxcGQOa6KGJFcRZyUI3ktWLavFjg== + version "23.0.7" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.7.tgz#7d26d879caa54283086de1974b66f512ef60abdc" + integrity sha512-hsSD5Qzyuat/swzrExGG5l7EuIlPhwTsT7KwKbSCQzIcJWjRxiimi/0tyMYY2bByitNb3i1p+6JWEDGa0NvT0Q== dependencies: "@rollup/pluginutils" "^5.0.1" commondir "^1.0.1" estree-walker "^2.0.2" glob "^8.0.3" is-reference "1.2.1" - magic-string "^0.26.4" + magic-string "^0.27.0" "@rollup/plugin-node-resolve@^15.0.0": version "15.0.1" @@ -1080,9 +1112,9 @@ integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== "@types/node@^18.11.9": - version "18.11.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" - integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== + version "18.15.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" + integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== "@types/resolve@1.20.2": version "1.20.2" @@ -1095,9 +1127,9 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn@^8.5.0, acorn@^8.8.0: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== ajv@^6.10.0, ajv@^6.12.4: version "6.12.6" @@ -1133,7 +1165,15 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array.prototype.every@^1.1.3: +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + +array.prototype.every@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/array.prototype.every/-/array.prototype.every-1.1.4.tgz#2762daecd9cec87cb63f3ca6be576817074a684e" integrity sha512-Aui35iRZk1HHLRAyF7QP0KAnOnduaQ6fo6k1NVWfRc0xTs2AZ70ytlXvOmkC6Di4JmUs2Wv3DYzGtCQFSk5uGg== @@ -1192,15 +1232,15 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -browserslist@^4.21.3, browserslist@^4.21.4: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== +browserslist@^4.21.3, browserslist@^4.21.5: + version "4.21.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" + integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" + caniuse-lite "^1.0.30001449" + electron-to-chromium "^1.4.284" + node-releases "^2.0.8" + update-browserslist-db "^1.0.10" buffer-from@^1.0.0: version "1.1.2" @@ -1225,10 +1265,10 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -caniuse-lite@^1.0.30001400: - version "1.0.30001431" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz#e7c59bd1bc518fae03a4656be442ce6c4887a795" - integrity sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ== +caniuse-lite@^1.0.30001449: + version "1.0.30001472" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001472.tgz#3f484885f2a2986c019dc416e65d9d62798cdd64" + integrity sha512-xWC/0+hHHQgj3/vrKYY0AAzeIUgr7L9wlELIcAvZdDUHlhL/kNxMdnQLOSOQfP8R51ZzPhmHdyMkI0MMpmxCfg== chalk@^2.0.0: version "2.4.2" @@ -1292,11 +1332,11 @@ convert-source-map@^1.7.0: integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== core-js-compat@^3.25.1: - version "3.26.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.26.1.tgz#0e710b09ebf689d719545ac36e49041850f943df" - integrity sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A== + version "3.29.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.29.1.tgz#15c0fb812ea27c973c18d425099afa50b934b41b" + integrity sha512-QmchCua884D8wWskMX8tW5ydINzd8oSJVx38lx/pVkFGqztxt73GYre3pm/hyYq8bPf+MW5In4I/uRShFDsbrA== dependencies: - browserslist "^4.21.4" + browserslist "^4.21.5" cross-spawn@^7.0.2: version "7.0.3" @@ -1314,17 +1354,19 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: dependencies: ms "2.1.2" -deep-equal@^2.0.5: - version "2.1.0" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.1.0.tgz#5ba60402cf44ab92c2c07f3f3312c3d857a0e1dd" - integrity sha512-2pxgvWu3Alv1PoWEyVg7HS8YhGlUFUV7N5oOvfL6d+7xAmLSemMwv/c8Zv/i9KFzxV5Kt5CAvQc70fLwVuf4UA== +deep-equal@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.0.tgz#5caeace9c781028b9ff459f33b779346637c43e6" + integrity sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw== dependencies: call-bind "^1.0.2" es-get-iterator "^1.1.2" get-intrinsic "^1.1.3" is-arguments "^1.1.1" + is-array-buffer "^3.0.1" is-date-object "^1.0.5" is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" isarray "^2.0.5" object-is "^1.1.5" object-keys "^1.1.1" @@ -1333,7 +1375,7 @@ deep-equal@^2.0.5: side-channel "^1.0.4" which-boxed-primitive "^1.0.2" which-collection "^1.0.1" - which-typed-array "^1.1.8" + which-typed-array "^1.1.9" deep-is@^0.1.3: version "0.1.4" @@ -1341,19 +1383,19 @@ deep-is@^0.1.3: integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== define-properties@^1.1.3, define-properties@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" - integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + version "1.2.0" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" + integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== dependencies: has-property-descriptors "^1.0.0" object-keys "^1.1.1" -defined@^1.0.0: +defined@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.1.tgz#c0b9db27bfaffd95d6f61399419b893df0f91ebf" integrity sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q== @@ -1372,54 +1414,74 @@ dotignore@^0.1.2: dependencies: minimatch "^3.0.4" -electron-to-chromium@^1.4.251: - version "1.4.284" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== +electron-to-chromium@^1.4.284: + version "1.4.342" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.342.tgz#3c7e199c3aa89c993df4b6f5223d6d26988f58e6" + integrity sha512-dTei3VResi5bINDENswBxhL+N0Mw5YnfWyTqO75KGsVldurEkhC9+CelJVAse8jycWyP8pv3VSj4BSyP8wTWJA== es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.20.4" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861" - integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA== + version "1.21.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" + integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== dependencies: + array-buffer-byte-length "^1.0.0" + available-typed-arrays "^1.0.5" call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" es-to-primitive "^1.2.1" - function-bind "^1.1.1" function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" + get-intrinsic "^1.2.0" get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" has "^1.0.3" has-property-descriptors "^1.0.0" + has-proto "^1.0.1" has-symbols "^1.0.3" - internal-slot "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" is-callable "^1.2.7" is-negative-zero "^2.0.2" is-regex "^1.1.4" is-shared-array-buffer "^1.0.2" is-string "^1.0.7" + is-typed-array "^1.1.10" is-weakref "^1.0.2" - object-inspect "^1.12.2" + object-inspect "^1.12.3" object-keys "^1.1.1" object.assign "^4.1.4" regexp.prototype.flags "^1.4.3" safe-regex-test "^1.0.0" - string.prototype.trimend "^1.0.5" - string.prototype.trimstart "^1.0.5" + string.prototype.trim "^1.2.7" + string.prototype.trimend "^1.0.6" + string.prototype.trimstart "^1.0.6" + typed-array-length "^1.0.4" unbox-primitive "^1.0.2" + which-typed-array "^1.1.9" es-get-iterator@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7" - integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== + version "1.1.3" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" + integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.1.0" - has-symbols "^1.0.1" - is-arguments "^1.1.0" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" + is-arguments "^1.1.1" is-map "^2.0.2" is-set "^2.0.2" - is-string "^1.0.5" + is-string "^1.0.7" isarray "^2.0.5" + stop-iteration-iterator "^1.0.0" + +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" es-to-primitive@^1.2.1: version "1.2.1" @@ -1453,30 +1515,21 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" + integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== eslint@^8.25.0: - version "8.27.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.27.0.tgz#d547e2f7239994ad1faa4bb5d84e5d809db7cf64" - integrity sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ== - dependencies: - "@eslint/eslintrc" "^1.3.3" - "@humanwhocodes/config-array" "^0.11.6" + version "8.37.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.37.0.tgz#1f660ef2ce49a0bfdec0b0d698e0b8b627287412" + integrity sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.4.0" + "@eslint/eslintrc" "^2.0.2" + "@eslint/js" "8.37.0" + "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" ajv "^6.10.0" @@ -1486,16 +1539,15 @@ eslint@^8.25.0: doctrine "^3.0.0" escape-string-regexp "^4.0.0" eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" + eslint-visitor-keys "^3.4.0" + espree "^9.5.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.15.0" + globals "^13.19.0" grapheme-splitter "^1.0.4" ignore "^5.2.0" import-fresh "^3.0.0" @@ -1510,24 +1562,23 @@ eslint@^8.25.0: minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.1" - regexpp "^3.2.0" strip-ansi "^6.0.1" strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.4.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" - integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== +espree@^9.5.1: + version "9.5.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4" + integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg== dependencies: acorn "^8.8.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.0" -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" @@ -1569,9 +1620,9 @@ fast-levenshtein@^2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== dependencies: reusify "^1.0.4" @@ -1645,10 +1696,10 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== dependencies: function-bind "^1.1.1" has "^1.0.3" @@ -1687,9 +1738,9 @@ glob@^7.1.3, glob@^7.2.3: path-is-absolute "^1.0.0" glob@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" - integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -1702,13 +1753,20 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.15.0: - version "13.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" - integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== +globals@^13.19.0: + version "13.20.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" + integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== dependencies: type-fest "^0.20.2" +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -1751,7 +1809,12 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== @@ -1771,9 +1834,9 @@ has@^1.0.3: function-bind "^1.1.1" ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" @@ -1801,16 +1864,16 @@ inherits@2, inherits@^2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== +internal-slot@^1.0.4, internal-slot@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== dependencies: - get-intrinsic "^1.1.0" + get-intrinsic "^1.2.0" has "^1.0.3" side-channel "^1.0.4" -is-arguments@^1.1.0, is-arguments@^1.1.1: +is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== @@ -1818,6 +1881,15 @@ is-arguments@^1.1.0, is-arguments@^1.1.1: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -1834,9 +1906,9 @@ is-boolean-object@^1.1.0: has-tostringtag "^1.0.0" is-builtin-module@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.0.tgz#bb0310dfe881f144ca83f30100ceb10cf58835e0" - integrity sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== + version "3.2.1" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" + integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== dependencies: builtin-modules "^3.3.0" @@ -1939,7 +2011,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10: +is-typed-array@^1.1.10, is-typed-array@^1.1.9: version "1.1.10" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== @@ -1981,9 +2053,9 @@ isexe@^2.0.0: integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== js-sdsl@^4.1.4: - version "4.1.5" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.5.tgz#1ff1645e6b4d1b028cd3f862db88c9d887f26e2a" - integrity sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q== + version "4.4.0" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" + integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== js-tokens@^4.0.0: version "4.0.0" @@ -2017,10 +2089,10 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +json5@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== levn@^0.4.1: version "0.4.1" @@ -2047,12 +2119,19 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -magic-string@^0.26.4: - version "0.26.7" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.7.tgz#caf7daf61b34e9982f8228c4527474dac8981d6f" - integrity sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow== +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: - sourcemap-codec "^1.4.8" + yallist "^3.0.2" + +magic-string@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" + integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.13" minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" @@ -2062,16 +2141,16 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: brace-expansion "^1.1.7" minimatch@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" - integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" -minimist@^1.2.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== +minimist@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== ms@2.1.2: version "2.1.2" @@ -2079,24 +2158,24 @@ ms@2.1.2: integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== nanoid@^3.1.30: - version "3.3.4" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + version "3.3.6" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" + integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -node-releases@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" - integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== +node-releases@^2.0.8: + version "2.0.10" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" + integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== -object-inspect@^1.12.2, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== +object-inspect@^1.12.3, object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== object-is@^1.1.5: version "1.1.5" @@ -2206,9 +2285,9 @@ prelude-ls@^1.2.1: integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== queue-microtask@^1.2.2: version "1.2.3" @@ -2227,15 +2306,15 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.10: - version "0.13.10" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee" - integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw== +regenerator-runtime@^0.13.11: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== -regenerator-transform@^0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.0.tgz#cbd9ead5d77fae1a48d957cf889ad0586adb6537" - integrity sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg== +regenerator-transform@^0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" + integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== dependencies: "@babel/runtime" "^7.8.4" @@ -2248,27 +2327,17 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -regexpu-core@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.1.tgz#a69c26f324c1e962e9ffd0b88b055caba8089139" - integrity sha512-HrnlNtpvqP1Xkb28tMhBUO2EbyUHdQlsnlAhzWcwHy8WJR53UWr7/MAvqrsQKMbV4qdpv03oTMG8iIhfsPFktQ== +regexpu-core@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" + integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== dependencies: + "@babel/regjsgen" "^0.8.0" regenerate "^1.4.2" regenerate-unicode-properties "^10.1.0" - regjsgen "^0.7.1" regjsparser "^0.9.1" unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.0.0" - -regjsgen@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.7.1.tgz#ee5ef30e18d3f09b7c369b76e7c2373ed25546f6" - integrity sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA== + unicode-match-property-value-ecmascript "^2.1.0" regjsparser@^0.9.1: version "0.9.1" @@ -2291,7 +2360,7 @@ resolve@^1.14.2, resolve@^1.22.1: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.3: +resolve@^2.0.0-next.4: version "2.0.0-next.4" resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== @@ -2320,9 +2389,9 @@ rimraf@^3.0.2: glob "^7.1.3" rollup@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.3.0.tgz#ae8dc84808a9c75d775d8b2ed8db1adada31a581" - integrity sha512-wqOV/vUJCYEbWsXvwCkgGWvgaEnsbn4jxBQWKpN816CqsmCimDmCNJI83c6if7QVD4v/zlyRzxN7U2yDT5rfoA== + version "3.20.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.20.2.tgz#f798c600317f216de2e4ad9f4d9ab30a89b690ff" + integrity sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg== optionalDependencies: fsevents "~2.3.2" @@ -2386,12 +2455,14 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== +stop-iteration-iterator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" + integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== + dependencies: + internal-slot "^1.0.4" -string.prototype.trim@^1.2.6: +string.prototype.trim@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== @@ -2400,7 +2471,7 @@ string.prototype.trim@^1.2.6: define-properties "^1.1.4" es-abstract "^1.20.4" -string.prototype.trimend@^1.0.5: +string.prototype.trimend@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== @@ -2409,7 +2480,7 @@ string.prototype.trimend@^1.0.5: define-properties "^1.1.4" es-abstract "^1.20.4" -string.prototype.trimstart@^1.0.5: +string.prototype.trimstart@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== @@ -2450,14 +2521,14 @@ supports-preserve-symlinks-flag@^1.0.0: integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== tape@^5.3.1: - version "5.6.1" - resolved "https://registry.yarnpkg.com/tape/-/tape-5.6.1.tgz#bbc1420e5e13003cbd7e2cf0efaa091bfb5c970a" - integrity sha512-reNzS3rzsJtKk0f+zJx2XlzIsjJXlIcOIrIxk5shHAG/DzW3BKyMg8UfN79oluYlcWo4lIt56ahLqwgpRT4idg== + version "5.6.3" + resolved "https://registry.yarnpkg.com/tape/-/tape-5.6.3.tgz#0d3cc82f96b0906f73b0981df1a38a44fec7901d" + integrity sha512-cUDDGSbyoSIpdUAqbqLI/r7i/S4BHuCB9M5j7E/LrLs/x/i4zeAJ798aqo+FGo+kr9seBZwr8AkZW6rjceyAMQ== dependencies: - array.prototype.every "^1.1.3" + array.prototype.every "^1.1.4" call-bind "^1.0.2" - deep-equal "^2.0.5" - defined "^1.0.0" + deep-equal "^2.2.0" + defined "^1.0.1" dotignore "^0.1.2" for-each "^0.3.3" get-package-type "^0.1.0" @@ -2466,20 +2537,20 @@ tape@^5.3.1: has-dynamic-import "^2.0.1" inherits "^2.0.4" is-regex "^1.1.4" - minimist "^1.2.6" - object-inspect "^1.12.2" + minimist "^1.2.7" + object-inspect "^1.12.3" object-is "^1.1.5" object-keys "^1.1.1" object.assign "^4.1.4" - resolve "^2.0.0-next.3" + resolve "^2.0.0-next.4" resumer "^0.0.0" - string.prototype.trim "^1.2.6" + string.prototype.trim "^1.2.7" through "^2.3.8" terser@^5.15.1: - version "5.15.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.15.1.tgz#8561af6e0fd6d839669c73b92bdd5777d870ed6c" - integrity sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw== + version "5.16.8" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.8.tgz#ccde583dabe71df3f4ed02b65eb6532e0fae15d5" + integrity sha512-QI5g1E/ef7d+PsDifb+a6nnVgC4F22Bg6T0xrBrz6iloVB4PUkkunp6V8nzoOOZJIzjWVdAGqCdlKlhLq/TbIA== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" @@ -2502,9 +2573,9 @@ to-fast-properties@^2.0.0: integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== tslib@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" - integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" @@ -2518,10 +2589,19 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + typescript@^4.8.4: - version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" - integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== unbox-primitive@^1.0.2: version "1.0.2" @@ -2546,17 +2626,17 @@ unicode-match-property-ecmascript@^2.0.0: unicode-canonical-property-names-ecmascript "^2.0.0" unicode-property-aliases-ecmascript "^2.0.0" -unicode-match-property-value-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" - integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== +unicode-match-property-value-ecmascript@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" + integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== unicode-property-aliases-ecmascript@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== -update-browserslist-db@^1.0.9: +update-browserslist-db@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== @@ -2592,7 +2672,7 @@ which-collection@^1.0.1: is-weakmap "^2.0.1" is-weakset "^2.0.1" -which-typed-array@^1.1.8: +which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== @@ -2621,6 +2701,11 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"