From 243469d7bd596d27d9c73a4d644613c155ea187b Mon Sep 17 00:00:00 2001 From: Brijesh Bittu Date: Fri, 18 Aug 2023 16:18:18 +0530 Subject: [PATCH] [zero][vite] Create a package for vite plugin This internally wraps linaria's vite plugin with ability to generate theme CSS file as well. --- .../zero-tag-processor/src/generateCss.ts | 2 +- packages/zero-tag-processor/src/styled.ts | 2 +- .../src/utils/cssFnValueToVariable.ts | 7 +- .../src/utils/cssFunctionTransformerPlugin.ts | 3 +- packages/zero-vite-plugin/.eslintrc.json | 5 + packages/zero-vite-plugin/README.md | 3 + packages/zero-vite-plugin/package.json | 60 +++++ packages/zero-vite-plugin/src/index.ts | 89 +++++++ packages/zero-vite-plugin/tsconfig.build.json | 21 ++ packages/zero-vite-plugin/tsconfig.json | 9 + tsconfig.json | 3 + yarn.lock | 241 +++++++++++++++++- 12 files changed, 432 insertions(+), 13 deletions(-) create mode 100644 packages/zero-vite-plugin/.eslintrc.json create mode 100644 packages/zero-vite-plugin/README.md create mode 100644 packages/zero-vite-plugin/package.json create mode 100644 packages/zero-vite-plugin/src/index.ts create mode 100644 packages/zero-vite-plugin/tsconfig.build.json create mode 100644 packages/zero-vite-plugin/tsconfig.json diff --git a/packages/zero-tag-processor/src/generateCss.ts b/packages/zero-tag-processor/src/generateCss.ts index 76caa5fa34aa40..5f7ec194c26607 100644 --- a/packages/zero-tag-processor/src/generateCss.ts +++ b/packages/zero-tag-processor/src/generateCss.ts @@ -67,7 +67,7 @@ export function generateCss( } let cssStr = ''; Object.entries(themeArgs).forEach(([themeKey, theme]) => { - const cssVarsObject = generateCssForTheme(theme, [cssVariablesPrefix]); + const cssVarsObject = generateCssForTheme(theme as Theme, [cssVariablesPrefix]); const cssThemeObject: Record = {}; if (themeKey === defaultThemeKey && injectInRoot) { cssThemeObject[':root'] = cssVarsObject; diff --git a/packages/zero-tag-processor/src/styled.ts b/packages/zero-tag-processor/src/styled.ts index 6d0d264991fc3e..aa0a0adecac3f2 100644 --- a/packages/zero-tag-processor/src/styled.ts +++ b/packages/zero-tag-processor/src/styled.ts @@ -369,7 +369,7 @@ export default class StyledProcessor extends BaseProcessor { if (!value.name || !theme) { return; } - const componentData = theme.components?.[value.name]; + const componentData = (theme as Theme).components?.[value.name]; if (!componentData) { return; } diff --git a/packages/zero-tag-processor/src/utils/cssFnValueToVariable.ts b/packages/zero-tag-processor/src/utils/cssFnValueToVariable.ts index 687e43996983cc..761f74e4040cb8 100644 --- a/packages/zero-tag-processor/src/utils/cssFnValueToVariable.ts +++ b/packages/zero-tag-processor/src/utils/cssFnValueToVariable.ts @@ -19,9 +19,7 @@ export type PluginCustomOptions = { /** * Object to pass as parameter to the styled css callback functions. */ - themeArgs?: { - theme: Theme; - }; + themeArgs?: Record; }; type CssFnValueToVariableParams = { @@ -39,7 +37,8 @@ function transformThemeKeysInFn( filename?: string, ) { const { themeArgs: { theme } = {} } = options; - const config = theme?.unstable_sxConfig ?? defaultSxConfig; + const userTheme = theme as Theme; + const config = userTheme?.unstable_sxConfig ?? defaultSxConfig; const cssPropOptions = config[styleKey]; const { themeKey } = cssPropOptions; diff --git a/packages/zero-tag-processor/src/utils/cssFunctionTransformerPlugin.ts b/packages/zero-tag-processor/src/utils/cssFunctionTransformerPlugin.ts index 0ca3c4a2d36bc4..562cb8cd9ef8b2 100644 --- a/packages/zero-tag-processor/src/utils/cssFunctionTransformerPlugin.ts +++ b/packages/zero-tag-processor/src/utils/cssFunctionTransformerPlugin.ts @@ -1,6 +1,7 @@ import { declare } from '@babel/helper-plugin-utils'; import defaultSxConfig from '@mui/system/styleFunctionSx/defaultSxConfig'; import get from 'lodash.get'; +import type { Theme } from '@mui/material/styles'; import type { PluginCustomOptions } from './cssFnValueToVariable'; type BabelPluginOptions = { @@ -25,7 +26,7 @@ const cssFunctionTransformerPlugin = declare((api, pluginOpt options: { cssVariablesPrefix = 'mui', themeArgs: { theme } = {} }, styleKey, } = pluginOptions; - const config = theme?.unstable_sxConfig ?? defaultSxConfig; + const config = (theme as Theme)?.unstable_sxConfig ?? defaultSxConfig; const cssPropOptions = config[styleKey]; const { themeKey } = cssPropOptions; if (!theme || !config || !cssPropOptions || !themeKey) { diff --git a/packages/zero-vite-plugin/.eslintrc.json b/packages/zero-vite-plugin/.eslintrc.json new file mode 100644 index 00000000000000..54a33fd127fb66 --- /dev/null +++ b/packages/zero-vite-plugin/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/consistent-type-imports": "error" + } +} diff --git a/packages/zero-vite-plugin/README.md b/packages/zero-vite-plugin/README.md new file mode 100644 index 00000000000000..cec32be4e491c7 --- /dev/null +++ b/packages/zero-vite-plugin/README.md @@ -0,0 +1,3 @@ +# @mui/zero-vite-plugin + +Vite plugin to support MUI's `styled` processor. diff --git a/packages/zero-vite-plugin/package.json b/packages/zero-vite-plugin/package.json new file mode 100644 index 00000000000000..bdf00914188f76 --- /dev/null +++ b/packages/zero-vite-plugin/package.json @@ -0,0 +1,60 @@ +{ + "name": "@mui/zero-vite-plugin", + "version": "0.0.1-alpha.0", + "private": true, + "author": "MUI Team", + "description": "Vite plugin for MUI zero styled implementation.", + "main": "./src/index.ts", + "keywords": [ + "zero runtime", + "css-in-js", + "mui" + ], + "repository": { + "type": "git", + "url": "https://github.com/mui/material-ui.git", + "directory": "packages/zero-vite-plugin" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/mui/material-ui/issues" + }, + "homepage": "@TODO", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "scripts": { + "build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files", + "build:legacy": "node ../../scripts/build.mjs legacy", + "build:modern": "node ../../scripts/build.mjs modern", + "build:node": "node ../../scripts/build.mjs node", + "build:stable": "node ../../scripts/build.mjs stable", + "build:copy-files": "node ../../scripts/copyFiles.mjs", + "build:types": "node ../../scripts/buildTypes.mjs", + "prebuild": "rimraf build tsconfig.build.tsbuildinfo", + "release": "yarn build && npm publish build", + "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/zero-babel-plugin/**/*.test.{js,ts,tsx}'", + "typescript": "tslint -p tsconfig.json \"{src,test}/**/*.{spec,d}.{ts,tsx}\" && tsc -p tsconfig.json", + "typescript:module-augmentation": "node scripts/testModuleAugmentation.js" + }, + "dependencies": { + "@babel/core": "^7.22.10", + "@linaria/vite": "^4.5.4", + "@mui/zero-tag-processor": "0.0.1-alpha.0" + }, + "devDependencies": { + "@types/babel__core": "^7.20.1", + "vite": "^4.4.9" + }, + "peerDependencies": { + "vite": "^4.0.0" + }, + "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=12.0.0" + } +} diff --git a/packages/zero-vite-plugin/src/index.ts b/packages/zero-vite-plugin/src/index.ts new file mode 100644 index 00000000000000..20280c6446b376 --- /dev/null +++ b/packages/zero-vite-plugin/src/index.ts @@ -0,0 +1,89 @@ +import type { PluginOption } from 'vite'; +import { generateCss } from '@mui/zero-tag-processor/generateCss'; +import { transformAsync } from '@babel/core'; +import linaria from '@linaria/vite'; + +type LinariaOptions = Exclude[0], undefined>; + +export interface ZeroVitePluginOptions extends LinariaOptions { + /** + * An object of the themes that you want passed in as an argument in the callback argument of `styled`. + */ + themeArgs?: Record; + /** + * Prefix string to use in the generated css variables. + */ + cssVariablesPrefix?: string; + /** + * Whether the css variables for the default theme should target the :root selector or not. + * @default true + */ + injectDefaultThemeInRoot?: boolean; +} + +export function zeroVitePlugin(options?: ZeroVitePluginOptions): PluginOption { + const { + cssVariablesPrefix = 'mui', + themeArgs = {}, + injectDefaultThemeInRoot = true, + } = options ?? {}; + + function injectMUITokensPlugin(): PluginOption { + return { + name: 'vite-mui-theme-injection-plugin', + load(id) { + if (id.endsWith('@mui/zero-runtime/styles.css')) { + return { + code: generateCss( + { + cssVariablesPrefix, + themeArgs, + }, + { + defaultThemeKey: 'theme', + injectInRoot: injectDefaultThemeInRoot, + }, + ), + map: null, + }; + } + return null; + }, + }; + } + const extensions = ['.ts', '.tsx', '.js', '.jsx', '.mts', '.mjs', '.cts', '.cjs', '.mtsx']; + + function intermediateBabelPlugin(): PluginOption { + return { + name: 'vite-intermediate-plugin', + async transform(code, id) { + const [filename] = id.split('?'); + if (!extensions.some((ext) => filename.endsWith(ext))) { + return null; + } + const result = await transformAsync(code, { + filename, + babelrc: false, + configFile: false, + plugins: [['@mui/zero-tag-processor/pre-linaria-plugin']], + }); + return { + code: result?.code ?? code, + map: result?.map, + }; + }, + }; + } + + const linariaPlugin = linaria({ + cssVariablesPrefix, + themeArgs, + ...options, + babelOptions: { + ...options?.babelOptions, + plugins: ['@babel/plugin-syntax-jsx'], + }, + }); + + return [injectMUITokensPlugin(), intermediateBabelPlugin(), linariaPlugin]; +} diff --git a/packages/zero-vite-plugin/tsconfig.build.json b/packages/zero-vite-plugin/tsconfig.build.json new file mode 100644 index 00000000000000..2f20623e244163 --- /dev/null +++ b/packages/zero-vite-plugin/tsconfig.build.json @@ -0,0 +1,21 @@ +{ + // This config is for emitting declarations (.d.ts) only + // Actual .ts source files are transpiled via babel + "extends": "./tsconfig", + "compilerOptions": { + "target": "ES2015", + "composite": true, + "declaration": true, + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "build", + "rootDir": "./src" + }, + "include": ["./src/**/*.ts*"], + "exclude": ["src/**/*.spec.ts*", "src/**/*.test.ts*"], + "references": [ + { "path": "../mui-system/tsconfig.build.json" }, + { "path": "../mui-material/tsconfig.build.json" }, + { "path": "../zero-tag-processor/tsconfig.build.json" } + ] +} diff --git a/packages/zero-vite-plugin/tsconfig.json b/packages/zero-vite-plugin/tsconfig.json new file mode 100644 index 00000000000000..79f9a30c3552bd --- /dev/null +++ b/packages/zero-vite-plugin/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig", + "include": ["src/**/*", "test/**/*"], + "compilerOptions": { + "lib": ["ES2022", "DOM"], + "target": "ES2015", + "types": ["mocha", "node", "chai"] + } +} diff --git a/tsconfig.json b/tsconfig.json index 7caf992444606a..607b998b6a5e77 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -39,6 +39,9 @@ "@mui/material-next/*": ["./packages/mui-material-next/src/*"], "@mui/joy": ["./packages/mui-joy/src"], "@mui/joy/*": ["./packages/mui-joy/src/*"], + "@mui/zero-runtime/*": ["./packages/zero-runtime/src/*"], + "@mui/zero-tag-processor/*": ["./packages/zero-tag-processor/src/*"], + "@mui/zero-vite-plugin/*": ["./packages/zero-vite-plugin/src/*"], "test/*": ["./test/*"], "typescript-to-proptypes": ["./packages/typescript-to-proptypes/src"] }, diff --git a/yarn.lock b/yarn.lock index de59cf0e6fd822..08d01ad86de785 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1062,7 +1062,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-runtime@^7.22.10": +"@babel/plugin-transform-runtime@^7.22.10", "@babel/plugin-transform-runtime@^7.22.9": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.22.10.tgz#89eda6daf1d3af6f36fb368766553054c8d7cd46" integrity sha512-RchI7HePu1eu0CYNKHHHQdfenZcM4nz8rew5B1VWqeRKdcwW5aQ5HeG9eTUbWiAS1UrmHVLmoxTWHt3iLD/NhA== @@ -1151,7 +1151,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/preset-env@^7.22.10": +"@babel/preset-env@^7.22.10", "@babel/preset-env@^7.22.9": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.10.tgz#3263b9fe2c8823d191d28e61eac60a79f9ce8a0f" integrity sha512-riHpLb1drNkpLlocmSyEg4oYJIQFeXAK/d7rI6mbD0XsvoTOOweXDmQPG/ErxsEhWk3rl3Q/3F6RFQlVFS8m0A== @@ -1697,6 +1697,116 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz#d0fce5d07b0620caa282b5131c297bb60f9d87e6" integrity sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww== +"@esbuild/android-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" + integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== + +"@esbuild/android-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" + integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== + +"@esbuild/android-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" + integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== + +"@esbuild/darwin-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" + integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== + +"@esbuild/darwin-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" + integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== + +"@esbuild/freebsd-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" + integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== + +"@esbuild/freebsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" + integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== + +"@esbuild/linux-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" + integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== + +"@esbuild/linux-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" + integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== + +"@esbuild/linux-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" + integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== + +"@esbuild/linux-loong64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" + integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== + +"@esbuild/linux-mips64el@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" + integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== + +"@esbuild/linux-ppc64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" + integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== + +"@esbuild/linux-riscv64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" + integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== + +"@esbuild/linux-s390x@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" + integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== + +"@esbuild/linux-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" + integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== + +"@esbuild/netbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" + integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== + +"@esbuild/openbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" + integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== + +"@esbuild/sunos-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" + integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== + +"@esbuild/win32-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" + integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== + +"@esbuild/win32-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" + integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== + +"@esbuild/win32-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" + integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -2035,6 +2145,35 @@ yargs "16.2.0" yargs-parser "20.2.4" +"@linaria/babel-preset@^4.5.4": + version "4.5.4" + resolved "https://registry.yarnpkg.com/@linaria/babel-preset/-/babel-preset-4.5.4.tgz#2b449cd518c9bb3b26a934ea98f5288fb9d5d675" + integrity sha512-AbOTqCb7XbQGAUNQkt8YxysXsek3qTEfXwj46bYLyFu/ADZ+ypmAUcmNJRJSjI0qAoS+ZFuK2dEpuwFVYeiveQ== + dependencies: + "@babel/core" "^7.22.9" + "@babel/generator" "^7.22.9" + "@babel/helper-module-imports" "^7.22.5" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.8" + "@babel/types" "^7.22.5" + "@linaria/core" "^4.5.4" + "@linaria/logger" "^4.5.0" + "@linaria/shaker" "^4.5.3" + "@linaria/tags" "^4.5.4" + "@linaria/utils" "^4.5.3" + cosmiconfig "^8.0.0" + source-map "^0.7.3" + stylis "^3.5.4" + +"@linaria/core@^4.5.4": + version "4.5.4" + resolved "https://registry.yarnpkg.com/@linaria/core/-/core-4.5.4.tgz#1bc989199e786da9cf21b0d26e1213687f886c96" + integrity sha512-vMs/5iU0stxjfbBCxobIgY+wSQx4G8ukNwrhjPVD+6bF9QrTwi5rl0mKaCMxaGMjnfsLRiiM3i+hnWLIEYLdSg== + dependencies: + "@linaria/logger" "^4.5.0" + "@linaria/tags" "^4.5.4" + "@linaria/utils" "^4.5.3" + "@linaria/logger@^4.5.0": version "4.5.0" resolved "https://registry.yarnpkg.com/@linaria/logger/-/logger-4.5.0.tgz#e5de815ffe7806822f47a559a512b98f66acea13" @@ -2043,6 +2182,22 @@ debug "^4.1.1" picocolors "^1.0.0" +"@linaria/shaker@^4.5.3": + version "4.5.3" + resolved "https://registry.yarnpkg.com/@linaria/shaker/-/shaker-4.5.3.tgz#0f6b588f61f2f3d425287a939256acbb64269a95" + integrity sha512-UeNw8HtY43pm+D0B+kq8BrW9GsRxm11zT7Lq3Qry8sX2mapvFqXaQ7VpTFHWEdkcbv7JOxBAMial2fu+ce/zqA== + dependencies: + "@babel/core" "^7.22.9" + "@babel/generator" "^7.22.9" + "@babel/plugin-transform-modules-commonjs" "^7.22.5" + "@babel/plugin-transform-runtime" "^7.22.9" + "@babel/plugin-transform-template-literals" "^7.22.5" + "@babel/preset-env" "^7.22.9" + "@linaria/logger" "^4.5.0" + "@linaria/utils" "^4.5.3" + babel-plugin-transform-react-remove-prop-types "^0.4.24" + ts-invariant "^0.10.3" + "@linaria/tags@^4.5.4": version "4.5.4" resolved "https://registry.yarnpkg.com/@linaria/tags/-/tags-4.5.4.tgz#071ab024227433f783ea2d948904fc164731a912" @@ -2070,6 +2225,16 @@ find-up "^5.0.0" minimatch "^9.0.3" +"@linaria/vite@^4.5.4": + version "4.5.4" + resolved "https://registry.yarnpkg.com/@linaria/vite/-/vite-4.5.4.tgz#bbccbd3de67715a8b6759a578c086c1ab31ec8d2" + integrity sha512-YhaLgTAfE7xzRLJwxWjo0Ak/YOJ+kPWuOm3lrkziclsvf1bbTUHlecmvth+2KuJG8HEPReekuyDErnwIQoD6sA== + dependencies: + "@linaria/babel-preset" "^4.5.4" + "@linaria/logger" "^4.5.0" + "@linaria/utils" "^4.5.3" + "@rollup/pluginutils" "^4.1.0" + "@material-ui/types@^4.0.0": version "4.1.1" resolved "https://registry.yarnpkg.com/@material-ui/types/-/types-4.1.1.tgz#b65e002d926089970a3271213a3ad7a21b17f02b" @@ -2851,6 +3016,14 @@ "@rollup/pluginutils" "^5.0.1" magic-string "^0.27.0" +"@rollup/pluginutils@^4.1.0": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" + integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ== + dependencies: + estree-walker "^2.0.1" + picomatch "^2.2.2" + "@rollup/pluginutils@^5.0.1": version "5.0.2" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" @@ -6264,7 +6437,7 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" -cosmiconfig@^8.2.0: +cosmiconfig@^8.0.0, cosmiconfig@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== @@ -7484,6 +7657,34 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +esbuild@^0.18.10: + version "0.18.20" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" + integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== + optionalDependencies: + "@esbuild/android-arm" "0.18.20" + "@esbuild/android-arm64" "0.18.20" + "@esbuild/android-x64" "0.18.20" + "@esbuild/darwin-arm64" "0.18.20" + "@esbuild/darwin-x64" "0.18.20" + "@esbuild/freebsd-arm64" "0.18.20" + "@esbuild/freebsd-x64" "0.18.20" + "@esbuild/linux-arm" "0.18.20" + "@esbuild/linux-arm64" "0.18.20" + "@esbuild/linux-ia32" "0.18.20" + "@esbuild/linux-loong64" "0.18.20" + "@esbuild/linux-mips64el" "0.18.20" + "@esbuild/linux-ppc64" "0.18.20" + "@esbuild/linux-riscv64" "0.18.20" + "@esbuild/linux-s390x" "0.18.20" + "@esbuild/linux-x64" "0.18.20" + "@esbuild/netbsd-x64" "0.18.20" + "@esbuild/openbsd-x64" "0.18.20" + "@esbuild/sunos-x64" "0.18.20" + "@esbuild/win32-arm64" "0.18.20" + "@esbuild/win32-ia32" "0.18.20" + "@esbuild/win32-x64" "0.18.20" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -7807,7 +8008,7 @@ estree-walker@^0.6.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== -estree-walker@^2.0.2: +estree-walker@^2.0.1, 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== @@ -13147,7 +13348,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.0, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.0, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -14621,7 +14822,7 @@ rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@^3.28.1: +rollup@^3.27.1, rollup@^3.28.1: version "3.28.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.28.1.tgz#fb44aa6d5e65c7e13fd5bcfff266d0c4ea9ba433" integrity sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw== @@ -15186,6 +15387,11 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +source-map@^0.7.3: + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + sourcemap-codec@^1.4.8: version "1.4.8" resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" @@ -15664,6 +15870,11 @@ stylis@4.2.0, stylis@^4.2.0: resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51" integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw== +stylis@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" + integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== + sucrase@^3.21.0, sucrase@^3.32.0: version "3.32.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.32.0.tgz#c4a95e0f1e18b6847127258a75cf360bc568d4a7" @@ -16090,6 +16301,13 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== +ts-invariant@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.10.3.tgz#3e048ff96e91459ffca01304dbc7f61c1f642f6c" + integrity sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ== + dependencies: + tslib "^2.1.0" + ts-node@^10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -16720,6 +16938,17 @@ victory-vendor@^36.6.8: d3-time "^3.0.0" d3-timer "^3.0.1" +vite@^4.4.9: + version "4.4.9" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.4.9.tgz#1402423f1a2f8d66fd8d15e351127c7236d29d3d" + integrity sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA== + dependencies: + esbuild "^0.18.10" + postcss "^8.4.27" + rollup "^3.27.1" + optionalDependencies: + fsevents "~2.3.2" + vlq@^0.2.2: version "0.2.3" resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"