Setup Emotion

This commit is contained in:
Nathan Bierema 2023-12-10 22:32:51 -05:00
parent b54bc75cbb
commit 89143bad15
6 changed files with 40 additions and 17 deletions

View File

@ -2,7 +2,8 @@
"presets": [ "presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }], ["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react", "@babel/preset-react",
"@babel/preset-typescript" "@babel/preset-typescript",
"@emotion/babel-preset-css-prop"
], ],
"plugins": ["@babel/plugin-transform-runtime"] "plugins": ["@babel/plugin-transform-runtime"]
} }

View File

@ -2,7 +2,8 @@
"presets": [ "presets": [
["@babel/preset-env", { "targets": "defaults" }], ["@babel/preset-env", { "targets": "defaults" }],
"@babel/preset-react", "@babel/preset-react",
"@babel/preset-typescript" "@babel/preset-typescript",
"@emotion/babel-preset-css-prop"
], ],
"plugins": ["@babel/plugin-transform-runtime"] "plugins": ["@babel/plugin-transform-runtime"]
} }

View File

@ -29,6 +29,7 @@
"@babel/preset-env": "^7.23.5", "@babel/preset-env": "^7.23.5",
"@babel/preset-react": "^7.23.3", "@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3", "@babel/preset-typescript": "^7.23.3",
"@emotion/react": "^11.11.1",
"@types/base16": "^1.0.5", "@types/base16": "^1.0.5",
"@types/lodash.shuffle": "^4.2.9", "@types/lodash.shuffle": "^4.2.9",
"@types/node": "^20.10.4", "@types/node": "^20.10.4",

View File

@ -62,6 +62,8 @@
"@babel/preset-env": "^7.23.5", "@babel/preset-env": "^7.23.5",
"@babel/preset-react": "^7.23.3", "@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3", "@babel/preset-typescript": "^7.23.3",
"@emotion/babel-preset-css-prop": "^11.11.0",
"@emotion/react": "^11.11.1",
"@redux-devtools/core": "^3.14.0", "@redux-devtools/core": "^3.14.0",
"@types/dateformat": "^5.0.2", "@types/dateformat": "^5.0.2",
"@types/hex-rgba": "^1.0.3", "@types/hex-rgba": "^1.0.3",
@ -80,6 +82,7 @@
"typescript": "~5.2.2" "typescript": "~5.2.2"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/react": "^11.0.0",
"@redux-devtools/core": "^3.0.0", "@redux-devtools/core": "^3.0.0",
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0",

View File

@ -2,7 +2,8 @@
"extends": "../../tsconfig.react.base.json", "extends": "../../tsconfig.react.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "lib/types", "outDir": "lib/types",
"resolveJsonModule": true "resolveJsonModule": true,
"jsxImportSource": "@emotion/react"
}, },
"include": ["src"] "include": ["src"]
} }

View File

@ -1648,6 +1648,12 @@ importers:
'@babel/preset-typescript': '@babel/preset-typescript':
specifier: ^7.23.3 specifier: ^7.23.3
version: 7.23.3(@babel/core@7.23.5) version: 7.23.3(@babel/core@7.23.5)
'@emotion/babel-preset-css-prop':
specifier: ^11.11.0
version: 11.11.0(@babel/core@7.23.5)
'@emotion/react':
specifier: ^11.11.1
version: 11.11.1(@types/react@18.2.43)(react@18.2.0)
'@redux-devtools/core': '@redux-devtools/core':
specifier: ^3.14.0 specifier: ^3.14.0
version: link:../redux-devtools version: link:../redux-devtools
@ -2138,6 +2144,9 @@ importers:
'@babel/preset-typescript': '@babel/preset-typescript':
specifier: ^7.23.3 specifier: ^7.23.3
version: 7.23.3(@babel/core@7.23.5) version: 7.23.3(@babel/core@7.23.5)
'@emotion/react':
specifier: ^11.11.1
version: 11.11.1(@types/react@18.2.43)(react@18.2.0)
'@types/base16': '@types/base16':
specifier: ^1.0.5 specifier: ^1.0.5
version: 1.0.5 version: 1.0.5
@ -6429,6 +6438,15 @@ packages:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
/@emotion/babel-plugin-jsx-pragmatic@0.2.1(@babel/core@7.23.5):
resolution: {integrity: sha512-xy1SlgEJygAAIvIuC2idkGKJYa6v5iwoyILkvNKgk347bV+IImXrUat5Z86EmLGyWhEoTplVT9EHqTnHZG4HFw==}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.23.5
'@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.23.5)
dev: true
/@emotion/babel-plugin@11.11.0: /@emotion/babel-plugin@11.11.0:
resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==}
dependencies: dependencies:
@ -6443,7 +6461,18 @@ packages:
find-root: 1.1.0 find-root: 1.1.0
source-map: 0.5.7 source-map: 0.5.7
stylis: 4.2.0 stylis: 4.2.0
dev: false
/@emotion/babel-preset-css-prop@11.11.0(@babel/core@7.23.5):
resolution: {integrity: sha512-+1Cba68IyBeltWzvbBSXcBWqP2eKQuQcSUpIu3ma4pOUeRol4EvwWrYS2Rv51aIVqg066fLB+Z9O/8NKR7uUlQ==}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.23.5
'@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.23.5)
'@babel/runtime': 7.23.5
'@emotion/babel-plugin': 11.11.0
'@emotion/babel-plugin-jsx-pragmatic': 0.2.1(@babel/core@7.23.5)
dev: true
/@emotion/cache@11.11.0: /@emotion/cache@11.11.0:
resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==} resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==}
@ -6453,11 +6482,9 @@ packages:
'@emotion/utils': 1.2.1 '@emotion/utils': 1.2.1
'@emotion/weak-memoize': 0.3.1 '@emotion/weak-memoize': 0.3.1
stylis: 4.2.0 stylis: 4.2.0
dev: false
/@emotion/hash@0.9.1: /@emotion/hash@0.9.1:
resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==}
dev: false
/@emotion/is-prop-valid@0.8.8: /@emotion/is-prop-valid@0.8.8:
resolution: {integrity: sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==} resolution: {integrity: sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==}
@ -6500,7 +6527,6 @@ packages:
'@types/react': 18.2.43 '@types/react': 18.2.43
hoist-non-react-statics: 3.3.2 hoist-non-react-statics: 3.3.2
react: 18.2.0 react: 18.2.0
dev: false
/@emotion/serialize@1.1.2: /@emotion/serialize@1.1.2:
resolution: {integrity: sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==} resolution: {integrity: sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==}
@ -6510,11 +6536,9 @@ packages:
'@emotion/unitless': 0.8.1 '@emotion/unitless': 0.8.1
'@emotion/utils': 1.2.1 '@emotion/utils': 1.2.1
csstype: 3.1.2 csstype: 3.1.2
dev: false
/@emotion/sheet@1.2.2: /@emotion/sheet@1.2.2:
resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==}
dev: false
/@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.2.43)(react@18.2.0): /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.2.43)(react@18.2.0):
resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==}
@ -6545,7 +6569,6 @@ packages:
/@emotion/unitless@0.8.1: /@emotion/unitless@0.8.1:
resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==}
dev: false
/@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@18.2.0): /@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@18.2.0):
resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==}
@ -6556,11 +6579,9 @@ packages:
/@emotion/utils@1.2.1: /@emotion/utils@1.2.1:
resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==}
dev: false
/@emotion/weak-memoize@0.3.1: /@emotion/weak-memoize@0.3.1:
resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==}
dev: false
/@esbuild/android-arm64@0.18.20: /@esbuild/android-arm64@0.18.20:
resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}
@ -11565,7 +11586,6 @@ packages:
'@babel/runtime': 7.23.5 '@babel/runtime': 7.23.5
cosmiconfig: 7.1.0 cosmiconfig: 7.1.0
resolve: 1.22.8 resolve: 1.22.8
dev: false
/babel-plugin-polyfill-corejs2@0.4.6(@babel/core@7.23.5): /babel-plugin-polyfill-corejs2@0.4.6(@babel/core@7.23.5):
resolution: {integrity: sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==} resolution: {integrity: sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==}
@ -12371,7 +12391,6 @@ packages:
/convert-source-map@1.9.0: /convert-source-map@1.9.0:
resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==}
dev: false
/convert-source-map@2.0.0: /convert-source-map@2.0.0:
resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
@ -14279,7 +14298,6 @@ packages:
/find-root@1.1.0: /find-root@1.1.0:
resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==}
dev: false
/find-up@3.0.0: /find-up@3.0.0:
resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==}
@ -19835,7 +19853,6 @@ packages:
/source-map@0.5.7: /source-map@0.5.7:
resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: false
/source-map@0.6.1: /source-map@0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
@ -20280,7 +20297,6 @@ packages:
/stylis@4.2.0: /stylis@4.2.0:
resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==}
dev: false
/sumchecker@3.0.1: /sumchecker@3.0.1:
resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==} resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==}