diff --git a/components/lib/getThemeProps.ts b/components/lib/getThemeProps.ts index e31cace4325f..29d119afb2b7 100644 --- a/components/lib/getThemeProps.ts +++ b/components/lib/getThemeProps.ts @@ -1,27 +1,48 @@ -export const defaultCSSThemeProps = { +type ThemeT = { name: string; color_mode: string } + +const defaultCSSThemeProps = { colorMode: 'auto', // light, dark, auto - nightScheme: 'dark', - dayScheme: 'light', + nightTheme: 'dark', + dayTheme: 'light', } -export const defaultThemeProps = { + +export const defaultComponentThemeProps = { colorMode: 'auto', // day, night, auto - nightScheme: 'dark', - dayScheme: 'light', + nightTheme: 'dark', + dayTheme: 'light', } -const cssColorModeToJs: Record = { +const cssColorModeToComponentColorMode: Record = { auto: 'auto', light: 'day', dark: 'night', } +const supportedThemes = ['light', 'dark', 'dark_dimmed'] + +/* + * Our version of primer/css is out of date, so we can only support known themes. + * For the least jarring experience possible, we fallback to the color_mode (light / dark) if provided by the theme, otherwise our own defaults + */ +function getSupportedTheme(theme: ThemeT | undefined, fallbackTheme: string) { + if (!theme) { + return fallbackTheme + } + + return supportedThemes.includes(theme.name) ? theme.name : theme.color_mode +} + +/* + * Returns theme props for consumption by either primer/css or primer/components + * based on the cookie and/or fallback values + */ export function getThemeProps(req: any, mode?: 'css') { let cookieValue: { color_mode?: 'auto' | 'light' | 'dark' - dark_theme?: { name: string } - light_theme?: { name: string } + dark_theme?: ThemeT + light_theme?: ThemeT } = {} - const defaultProps = mode === 'css' ? defaultCSSThemeProps : defaultThemeProps + const defaultThemeProps = mode === 'css' ? defaultCSSThemeProps : defaultComponentThemeProps if (req.cookies?.color_mode) { try { @@ -31,12 +52,16 @@ export function getThemeProps(req: any, mode?: 'css') { } } + // The cookie value is a primer/css color_mode. sometimes we need to convert that to a primer/components compatible version + const colorMode = + (mode === 'css' + ? cookieValue.color_mode + : cssColorModeToComponentColorMode[cookieValue.color_mode || '']) || + defaultThemeProps.colorMode + return { - // the cookie uses primer/css color_mode, sometimes we need to convert that to a primer/components compatible version - colorMode: - (mode === 'css' ? cookieValue.color_mode : cssColorModeToJs[cookieValue.color_mode || '']) || - defaultProps.colorMode, - nightScheme: cookieValue.dark_theme?.name || defaultProps.nightScheme, - dayScheme: cookieValue.light_theme?.name || defaultProps.dayScheme, + colorMode, + nightTheme: getSupportedTheme(cookieValue.dark_theme, defaultThemeProps.nightTheme), + dayTheme: getSupportedTheme(cookieValue.light_theme, defaultThemeProps.dayTheme), } } diff --git a/lib/search/indexes/github-docs-2.22-cn-records.json.br b/lib/search/indexes/github-docs-2.22-cn-records.json.br index 22b6ba54a59f..8e074a7d6ea9 100644 --- a/lib/search/indexes/github-docs-2.22-cn-records.json.br +++ b/lib/search/indexes/github-docs-2.22-cn-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc8ba79ef09d70a0640da2c03dd505a6f4eadb501286c4fc83d584623e25f1e7 -size 571185 +oid sha256:014552abd86a12c1603dc591ef629dd2db8b2210a14187183ee7a981f7ca9feb +size 571120 diff --git a/lib/search/indexes/github-docs-2.22-cn.json.br b/lib/search/indexes/github-docs-2.22-cn.json.br index 3e66bdaf8b08..6a98c5fd4e90 100644 --- a/lib/search/indexes/github-docs-2.22-cn.json.br +++ b/lib/search/indexes/github-docs-2.22-cn.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4780d1354e5c55497a6b95dd48e4534ec7a0f315a05c1bd24153204d442fea47 -size 1082204 +oid sha256:8c6a0a0d47a7127fb340d2498fbdb71cc8f56005b6b70815ca3ffbb0c3e17f3c +size 1082718 diff --git a/lib/search/indexes/github-docs-2.22-de-records.json.br b/lib/search/indexes/github-docs-2.22-de-records.json.br index 5ae39a95e02d..1cc0583fea79 100644 --- a/lib/search/indexes/github-docs-2.22-de-records.json.br +++ b/lib/search/indexes/github-docs-2.22-de-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04ef84408b7c0fabc6cb5a3ef083c7007c331c8f0ccddae14b75fc1ca732a373 -size 532926 +oid sha256:93b5a97f802bf39995692d1fba3b74941ff159364ba0076f81848c830590b36f +size 532765 diff --git a/lib/search/indexes/github-docs-2.22-de.json.br b/lib/search/indexes/github-docs-2.22-de.json.br index 4c6eb8ed2483..e5ef9e1e6b7d 100644 --- a/lib/search/indexes/github-docs-2.22-de.json.br +++ b/lib/search/indexes/github-docs-2.22-de.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46f4b084945f46cf684b42e6da1670b5b14d5f8ec6990dbe45f779b296f23049 -size 2459900 +oid sha256:787d4508e4f1068ba1bba67e5bda82c10273200c6a8d50e38e67f817650fc9b2 +size 2459773 diff --git a/lib/search/indexes/github-docs-2.22-en-records.json.br b/lib/search/indexes/github-docs-2.22-en-records.json.br index b9b00cabf045..bca26ec65884 100644 --- a/lib/search/indexes/github-docs-2.22-en-records.json.br +++ b/lib/search/indexes/github-docs-2.22-en-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3319d9a3a93641d3238ed2bf75e0e70ea17a8b6ecdb834556aab23ad6c7d09f -size 743212 +oid sha256:4dbc0c8231fe1d6ba14b33840d5c89ed2e5925bbf88968c0b718be4c76d1b74a +size 743037 diff --git a/lib/search/indexes/github-docs-2.22-en.json.br b/lib/search/indexes/github-docs-2.22-en.json.br index d464330d287e..d83af30b5961 100644 --- a/lib/search/indexes/github-docs-2.22-en.json.br +++ b/lib/search/indexes/github-docs-2.22-en.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80750077a9a4eb18042f6c7d53e3485402b4dab1eb955ce21c04cd356175503a -size 3632892 +oid sha256:4cfbfd9f8082a0b8ca16f22ca4a03dbbc0bd162c7f506a3cfb09a8a53df07da7 +size 3632906 diff --git a/lib/search/indexes/github-docs-2.22-es-records.json.br b/lib/search/indexes/github-docs-2.22-es-records.json.br index 6f8fe3077468..3973bc47c3dd 100644 --- a/lib/search/indexes/github-docs-2.22-es-records.json.br +++ b/lib/search/indexes/github-docs-2.22-es-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b64e2ffd2d60dc10ac6970921783cd9dfcb9b9b6d022498cc2eae12f724b0387 -size 344237 +oid sha256:8480471d688e0491e011c67e29f649d9bafb85d105d888d1e77e276b31c4cfbe +size 343908 diff --git a/lib/search/indexes/github-docs-2.22-es.json.br b/lib/search/indexes/github-docs-2.22-es.json.br index 7b024ef968a6..94dac983ad42 100644 --- a/lib/search/indexes/github-docs-2.22-es.json.br +++ b/lib/search/indexes/github-docs-2.22-es.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bd9e92deb9e05a99c0365bf8e7fb19ccf98172a23f09ec5d8afaa65483a74211 -size 1418521 +oid sha256:814b06d4ffcd1fefef9763c89629c2054ecf9afb0ebe2cd8ac374163ec14e943 +size 1417355 diff --git a/lib/search/indexes/github-docs-2.22-ja-records.json.br b/lib/search/indexes/github-docs-2.22-ja-records.json.br index 1b411f992b1c..e4972f50c211 100644 --- a/lib/search/indexes/github-docs-2.22-ja-records.json.br +++ b/lib/search/indexes/github-docs-2.22-ja-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c81cc978f0b4765449a355f68bda499a035dcab3f29fc4025fc36833e8cb5581 -size 594635 +oid sha256:7b38a28f38c9496469b955530be85a6c7453535d3f6860d137d9b5b376ca6a8e +size 594496 diff --git a/lib/search/indexes/github-docs-2.22-ja.json.br b/lib/search/indexes/github-docs-2.22-ja.json.br index 0cbf9ce3e27e..06a1caf56a22 100644 --- a/lib/search/indexes/github-docs-2.22-ja.json.br +++ b/lib/search/indexes/github-docs-2.22-ja.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1b6569f32cb60e43662df195039433434b5e7e43cae644dc098e9ab52d246e3 -size 3329108 +oid sha256:e5892496c3351fa78e734154bd472a0ae2a6d695b8f335bf523a2fe1208ac0b1 +size 3327523 diff --git a/lib/search/indexes/github-docs-2.22-pt-records.json.br b/lib/search/indexes/github-docs-2.22-pt-records.json.br index 1acb6e676ae7..3c0bdcb65765 100644 --- a/lib/search/indexes/github-docs-2.22-pt-records.json.br +++ b/lib/search/indexes/github-docs-2.22-pt-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56e2857f35b91a2ea33a7e3aa825f48d1b9a88b2656e33af172972a9b909eb10 -size 507890 +oid sha256:4358f98cbc34f459c60da48039ff477181edfc8d98b202a747142283be6847ae +size 508019 diff --git a/lib/search/indexes/github-docs-2.22-pt.json.br b/lib/search/indexes/github-docs-2.22-pt.json.br index 877839d044e4..9c02e32fe934 100644 --- a/lib/search/indexes/github-docs-2.22-pt.json.br +++ b/lib/search/indexes/github-docs-2.22-pt.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cbe78b5fb1fc1dea3a5eef1b1369ea2c69f6822c963ffa5c56d50f09879d9968 -size 2216744 +oid sha256:9f3b9b20c073113b58c5a61990e2c4a9f6504ac4bcb7bd7e35d7b625a3c347c6 +size 2216073 diff --git a/lib/search/indexes/github-docs-3.0-cn-records.json.br b/lib/search/indexes/github-docs-3.0-cn-records.json.br index 75174dacd9c1..fe413b1e0721 100644 --- a/lib/search/indexes/github-docs-3.0-cn-records.json.br +++ b/lib/search/indexes/github-docs-3.0-cn-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c308b10e2d19c2089d02c6fb746c475e81ba11a992c6bf9f3650d2ddfed39e1f -size 589258 +oid sha256:2865aa77fe4982050faf1fb2b5f539e5ff923db2055f452217da7118d95119d8 +size 589500 diff --git a/lib/search/indexes/github-docs-3.0-cn.json.br b/lib/search/indexes/github-docs-3.0-cn.json.br index e78b373d3b10..378fa9bcbfe8 100644 --- a/lib/search/indexes/github-docs-3.0-cn.json.br +++ b/lib/search/indexes/github-docs-3.0-cn.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2466cf13dcb8ed065bba7db74ecd664361c4c0b0d3d00112602c65822ec97be4 -size 1119610 +oid sha256:10e03f50893ad1113324b4f45b556e37525ec7f0d1af11e204864fe92e3190be +size 1119965 diff --git a/lib/search/indexes/github-docs-3.0-de-records.json.br b/lib/search/indexes/github-docs-3.0-de-records.json.br index b227f4718194..96cf9c31d3ce 100644 --- a/lib/search/indexes/github-docs-3.0-de-records.json.br +++ b/lib/search/indexes/github-docs-3.0-de-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a31f04431cd7675dee726dc1a7e612b1a1fb79d332cdc7a8f2177da0cfd5be7 -size 554667 +oid sha256:5eec30ae5f5cca269dce5b0ff2c2a5f6779fb20446e08e034f53742aa5d7ed7f +size 554357 diff --git a/lib/search/indexes/github-docs-3.0-de.json.br b/lib/search/indexes/github-docs-3.0-de.json.br index 28394a1b51e2..08fb7ceabcad 100644 --- a/lib/search/indexes/github-docs-3.0-de.json.br +++ b/lib/search/indexes/github-docs-3.0-de.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:410432c0f526266f79d97731c4988ef06ced31b12ee927c81003c87b2f514672 -size 2568485 +oid sha256:30ee74ddb55e8bc73a25404bd45823937f8e0a104c1a7b520d2a9695bd7519d5 +size 2567129 diff --git a/lib/search/indexes/github-docs-3.0-en-records.json.br b/lib/search/indexes/github-docs-3.0-en-records.json.br index c13dca1b6935..76f0f88f1ebc 100644 --- a/lib/search/indexes/github-docs-3.0-en-records.json.br +++ b/lib/search/indexes/github-docs-3.0-en-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81998e0f9c48d67da7029a3141fecf3b84b013b0551da75d2428c1827339edec -size 768434 +oid sha256:050f2e6b0c6c244d33648555a0d83a930eb29d4bd017657da5ce1cff77586974 +size 767553 diff --git a/lib/search/indexes/github-docs-3.0-en.json.br b/lib/search/indexes/github-docs-3.0-en.json.br index 0fb2a06510ca..40b76e970c44 100644 --- a/lib/search/indexes/github-docs-3.0-en.json.br +++ b/lib/search/indexes/github-docs-3.0-en.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b44c59330891cfc0a65c874053f1e5fb778190000c50e4a9b9d84492ffd0d7ed -size 3769497 +oid sha256:3d9cee3f6ec1ff72d5054c143466cbee082a92ba1da952e5fc145955a50dedd6 +size 3765492 diff --git a/lib/search/indexes/github-docs-3.0-es-records.json.br b/lib/search/indexes/github-docs-3.0-es-records.json.br index 1e02dcd7f475..648e0099b095 100644 --- a/lib/search/indexes/github-docs-3.0-es-records.json.br +++ b/lib/search/indexes/github-docs-3.0-es-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60a93d87a9ee2a000627d5a52fb5dbbabc8b6e566301c4ccf4535b081804ad21 -size 342477 +oid sha256:31d1940106cde979e2ee3d8a341a5b84030f7c3967b2178ced45e5e4dbb07c24 +size 342352 diff --git a/lib/search/indexes/github-docs-3.0-es.json.br b/lib/search/indexes/github-docs-3.0-es.json.br index 28e9ef08948b..15eeaa13d6cc 100644 --- a/lib/search/indexes/github-docs-3.0-es.json.br +++ b/lib/search/indexes/github-docs-3.0-es.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6609d335f8599e765da0741f4fe938d4ee3d20f130f47c6c81d28434c3c989f9 -size 1407507 +oid sha256:b79875e0d6eebaace031bf042f38cb30dbcfd111e4b58216ec512297b9a37d95 +size 1407271 diff --git a/lib/search/indexes/github-docs-3.0-ja-records.json.br b/lib/search/indexes/github-docs-3.0-ja-records.json.br index f267ecc96a44..86e6c842cba1 100644 --- a/lib/search/indexes/github-docs-3.0-ja-records.json.br +++ b/lib/search/indexes/github-docs-3.0-ja-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26d4aae02ed48e34ff2bd62a2d7acde6f2bbdc814564d08980358bab6e4984d0 -size 615977 +oid sha256:98708a3877e5641085b4aa562fe309d34f1c9276970948e65c46f89a1ddfdc67 +size 616392 diff --git a/lib/search/indexes/github-docs-3.0-ja.json.br b/lib/search/indexes/github-docs-3.0-ja.json.br index 8459925a12a4..eada39c66e0e 100644 --- a/lib/search/indexes/github-docs-3.0-ja.json.br +++ b/lib/search/indexes/github-docs-3.0-ja.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:311d365c7a4aad47003e4ab8cbb084af3654906425ef983c71878c51f1a3fed5 -size 3455311 +oid sha256:dccf38c297004be991fe457d37d67b45aa4745b08dc1a5c38776aeae681df286 +size 3456125 diff --git a/lib/search/indexes/github-docs-3.0-pt-records.json.br b/lib/search/indexes/github-docs-3.0-pt-records.json.br index 3380164779a6..65afa11ec0bf 100644 --- a/lib/search/indexes/github-docs-3.0-pt-records.json.br +++ b/lib/search/indexes/github-docs-3.0-pt-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55c4bd7d188784fe6b5a66117f166b31e2bab53594b2cb2fc4bc66f9b628f58b -size 530390 +oid sha256:72529f2ab5fd17bd22783196c23187cb3450ccd0b6cbfbfbc545aba7d9ef1459 +size 530134 diff --git a/lib/search/indexes/github-docs-3.0-pt.json.br b/lib/search/indexes/github-docs-3.0-pt.json.br index 37bfababbfe0..e1d44eb83ce4 100644 --- a/lib/search/indexes/github-docs-3.0-pt.json.br +++ b/lib/search/indexes/github-docs-3.0-pt.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d3310d52fc723ff0418ea99dd1ea34aed60ff13100da4a9717e45dbc9e969e1 -size 2307530 +oid sha256:fcc98be1e99a0f76607487db6d3fec7c22ca9a1d5368efe7ccd310d9d21e7c76 +size 2307241 diff --git a/lib/search/indexes/github-docs-3.1-cn-records.json.br b/lib/search/indexes/github-docs-3.1-cn-records.json.br index 04b0c4923281..a152b9193521 100644 --- a/lib/search/indexes/github-docs-3.1-cn-records.json.br +++ b/lib/search/indexes/github-docs-3.1-cn-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11f93264662f6f4f4ab3bc7534a544cfe2e4486d8813528e7c63beb66591c8f3 -size 600211 +oid sha256:046802d599e08d05670d81c436aff0eacff4b2e333f6f47a1837978f169e6345 +size 600267 diff --git a/lib/search/indexes/github-docs-3.1-cn.json.br b/lib/search/indexes/github-docs-3.1-cn.json.br index da7b40c95271..b2c95fa433c2 100644 --- a/lib/search/indexes/github-docs-3.1-cn.json.br +++ b/lib/search/indexes/github-docs-3.1-cn.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bad714db56b78fb37b2190bb6662bb1eb111cd58ba873441e914d4b85e0bf0d0 -size 1138027 +oid sha256:e60b7d67a5289f1bda9ab6ef0d60f722dfa343a81c4c8dcbbe50c9b89713e55c +size 1137306 diff --git a/lib/search/indexes/github-docs-3.1-de-records.json.br b/lib/search/indexes/github-docs-3.1-de-records.json.br index 7ce7d76b92e0..f43d3a760cf8 100644 --- a/lib/search/indexes/github-docs-3.1-de-records.json.br +++ b/lib/search/indexes/github-docs-3.1-de-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b38d624fdad839c29f219247a9d36bc5d7c24c5cb8a564d5dd9b3a1bb7f03fc5 -size 562934 +oid sha256:d1420a7e185fc55a89264caad3f4a2bb4c7a82ac153f6e8f334f2644662b6519 +size 562465 diff --git a/lib/search/indexes/github-docs-3.1-de.json.br b/lib/search/indexes/github-docs-3.1-de.json.br index 8cf3300943ea..a852fe5688aa 100644 --- a/lib/search/indexes/github-docs-3.1-de.json.br +++ b/lib/search/indexes/github-docs-3.1-de.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3a7df6738743415800918eb038e0dad16a693bb8b0e1ba48b1b3351daa5d7e9 -size 2621571 +oid sha256:208b495a3e88555c616384d51ea28c2ea28ba57a95fbff9b682e075653a44e12 +size 2619230 diff --git a/lib/search/indexes/github-docs-3.1-en-records.json.br b/lib/search/indexes/github-docs-3.1-en-records.json.br index fc553d5eaeb2..ee03bb0823b9 100644 --- a/lib/search/indexes/github-docs-3.1-en-records.json.br +++ b/lib/search/indexes/github-docs-3.1-en-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81d78ce8e7b827a9a137592110807fd44bdac1514bb2cdd1c50814f352d036ba -size 782330 +oid sha256:6f2260b0551bfdd5a6a3d3aac44d03370ae2a4558d2ad66ab248039984ef9755 +size 782503 diff --git a/lib/search/indexes/github-docs-3.1-en.json.br b/lib/search/indexes/github-docs-3.1-en.json.br index a1023cba3ded..90e36a4e287d 100644 --- a/lib/search/indexes/github-docs-3.1-en.json.br +++ b/lib/search/indexes/github-docs-3.1-en.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6de03c7190d46fb93a2d0f6fb37a81bec1a2414fc4bf30c978b98e292134bd24 -size 3847946 +oid sha256:c88fd1ce3d33c6f5d104ef81b30f931b47f69a09b859dfb38555f68e77b35c2a +size 3847901 diff --git a/lib/search/indexes/github-docs-3.1-es-records.json.br b/lib/search/indexes/github-docs-3.1-es-records.json.br index 7f7863c1dcb7..408b3f406e7b 100644 --- a/lib/search/indexes/github-docs-3.1-es-records.json.br +++ b/lib/search/indexes/github-docs-3.1-es-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5cb0417d4459c32f86a3ce71c6b7d8c3f8e0c2f87a02305d3f0526c6d3d29fdb -size 343386 +oid sha256:b3fb7446d2b35ffd39c1a295993f7549fca7f9405b1a923b2a20c915263a7550 +size 343353 diff --git a/lib/search/indexes/github-docs-3.1-es.json.br b/lib/search/indexes/github-docs-3.1-es.json.br index 3b491aa880fa..27ed78cdc1a8 100644 --- a/lib/search/indexes/github-docs-3.1-es.json.br +++ b/lib/search/indexes/github-docs-3.1-es.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e13284d5f5654b8c807cb2095aa5475466f0393a71732a598594caf9da1e9f00 -size 1412588 +oid sha256:eddc45431c0c28873749d59519ff8555f73916b10ecc3549bfd29955d463cf6b +size 1411885 diff --git a/lib/search/indexes/github-docs-3.1-ja-records.json.br b/lib/search/indexes/github-docs-3.1-ja-records.json.br index c01975e40549..683f0c6b41c2 100644 --- a/lib/search/indexes/github-docs-3.1-ja-records.json.br +++ b/lib/search/indexes/github-docs-3.1-ja-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:475248030acc591e4caecd3f7d51410f6d06e02e0e07749d0575c8fb6367b21b -size 626572 +oid sha256:d10a208ee249fc8c9e536ecbb97d05528df763a2b074dc45bb4b5914809a608d +size 626402 diff --git a/lib/search/indexes/github-docs-3.1-ja.json.br b/lib/search/indexes/github-docs-3.1-ja.json.br index 2527dda14fa6..b184af8939c7 100644 --- a/lib/search/indexes/github-docs-3.1-ja.json.br +++ b/lib/search/indexes/github-docs-3.1-ja.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c00d8b5f41238cd1b55412f442551adf6e9db922d410b7761f770c677730edba -size 3520929 +oid sha256:1fdb0e110073a8a0f638f4cf96bbdcaba9170bf75c72f63259bb0cb8209fb778 +size 3519852 diff --git a/lib/search/indexes/github-docs-3.1-pt-records.json.br b/lib/search/indexes/github-docs-3.1-pt-records.json.br index 09f5e511ecf4..35ad81044d33 100644 --- a/lib/search/indexes/github-docs-3.1-pt-records.json.br +++ b/lib/search/indexes/github-docs-3.1-pt-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03e51bf0d2391395a97204b07d76f912c35893f6315ce8398b7ea1324b3637f6 -size 539925 +oid sha256:3eed18723a33e5b5c51c418dbe6711f6c7b3032fb7a315399d8509795d1e1cf4 +size 539384 diff --git a/lib/search/indexes/github-docs-3.1-pt.json.br b/lib/search/indexes/github-docs-3.1-pt.json.br index 1a8eef3fe417..cdf361a99378 100644 --- a/lib/search/indexes/github-docs-3.1-pt.json.br +++ b/lib/search/indexes/github-docs-3.1-pt.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:604a22dfe88d40d82777f1e0c72898d9b453f4eff17508db2b9d09151b0d8b33 -size 2355807 +oid sha256:4e0b00be8ac637573e7be43d6b79f88dd464abd3512c88d204a7d0b80f21ea4a +size 2354310 diff --git a/lib/search/indexes/github-docs-dotcom-cn-records.json.br b/lib/search/indexes/github-docs-dotcom-cn-records.json.br index af820b8f88c4..242dc36a61ed 100644 --- a/lib/search/indexes/github-docs-dotcom-cn-records.json.br +++ b/lib/search/indexes/github-docs-dotcom-cn-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:925c7c1425f5cf93df64ea126e606ad4be666a971b7ffe522638b907d517b24f -size 782956 +oid sha256:dfb629a7519ffa427ea215736be3c8502b46f0d8fd5fccf555eb0de99dcb0e67 +size 783446 diff --git a/lib/search/indexes/github-docs-dotcom-cn.json.br b/lib/search/indexes/github-docs-dotcom-cn.json.br index bf25de12b1fc..986e5d13ac8f 100644 --- a/lib/search/indexes/github-docs-dotcom-cn.json.br +++ b/lib/search/indexes/github-docs-dotcom-cn.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f5621605fb43f75cbd23fc305acb7fd984643e7f8eefa3db26486e4385f9d3dd -size 1288465 +oid sha256:61c96bdbe169cd89d934ba6be5e414f4748ae3d2b78abc47f0e8a1c2a35d6213 +size 1289289 diff --git a/lib/search/indexes/github-docs-dotcom-de-records.json.br b/lib/search/indexes/github-docs-dotcom-de-records.json.br index 7ee10f8375d0..fe75cf69683c 100644 --- a/lib/search/indexes/github-docs-dotcom-de-records.json.br +++ b/lib/search/indexes/github-docs-dotcom-de-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef96323982fbf4f3060934ed2d76f74650482326aa1b2272e92cc36969f4f6b3 -size 718938 +oid sha256:f493b6c70a004a4beae04685b25ce3b5aeb2a536cd6c3b2eda494ffc6c61e43e +size 719408 diff --git a/lib/search/indexes/github-docs-dotcom-de.json.br b/lib/search/indexes/github-docs-dotcom-de.json.br index b3425283c2bc..94218ce66bd0 100644 --- a/lib/search/indexes/github-docs-dotcom-de.json.br +++ b/lib/search/indexes/github-docs-dotcom-de.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60008f685d2e24eae86d3a04a3ca67a98c61f82085ab87edd78da55c85b72e1d -size 3323117 +oid sha256:0f0d4e5943dc7d279fe2972a38f984f45e14345b62ce80cde113a4ee26ad94a5 +size 3324489 diff --git a/lib/search/indexes/github-docs-dotcom-en-records.json.br b/lib/search/indexes/github-docs-dotcom-en-records.json.br index b8c52d351575..c4b378412dc8 100644 --- a/lib/search/indexes/github-docs-dotcom-en-records.json.br +++ b/lib/search/indexes/github-docs-dotcom-en-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35c03edf18084018608cd228a69e446a570454624cc0fd816ecfb12b584a0fc5 -size 1050578 +oid sha256:4f27e0d5ddbb90601f43a5bd893703a34519ecb74902597727e97a75f1c69e03 +size 1050835 diff --git a/lib/search/indexes/github-docs-dotcom-en.json.br b/lib/search/indexes/github-docs-dotcom-en.json.br index 2f6eb18fa1a3..cf88e8ec4e0c 100644 --- a/lib/search/indexes/github-docs-dotcom-en.json.br +++ b/lib/search/indexes/github-docs-dotcom-en.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5369e51d52cdb0ee2d86a7491213802e5dd9d5d8d1e7ce17b0af5b2983e768a4 -size 5084508 +oid sha256:a5cada1e24cfd99f7b6c9028ee5bec9316b473d999e4b3c8dbae84616f927ee3 +size 5085071 diff --git a/lib/search/indexes/github-docs-dotcom-es-records.json.br b/lib/search/indexes/github-docs-dotcom-es-records.json.br index d1c472faad61..69fce7a66e92 100644 --- a/lib/search/indexes/github-docs-dotcom-es-records.json.br +++ b/lib/search/indexes/github-docs-dotcom-es-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab931ef78433dc26ffe2e1cae92fa140990e877090538253774ab135c5b0cc63 -size 370000 +oid sha256:74a88ad1ec06a9afc499bb16fb92add028f0e0d56cd9ec78ac90fe8b7b9be04d +size 370063 diff --git a/lib/search/indexes/github-docs-dotcom-es.json.br b/lib/search/indexes/github-docs-dotcom-es.json.br index 334bf063cf71..b168b25caaef 100644 --- a/lib/search/indexes/github-docs-dotcom-es.json.br +++ b/lib/search/indexes/github-docs-dotcom-es.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e5b660fa55f19dec19131a7ef8325d18737f6d272b53754d5a4ef5bd9050164 -size 1437130 +oid sha256:55a7f0963e8bb16f18aaa08d54d3a9a36a5acdfa13b2aee707c745861d148a03 +size 1437105 diff --git a/lib/search/indexes/github-docs-dotcom-ja-records.json.br b/lib/search/indexes/github-docs-dotcom-ja-records.json.br index b489ce48de1c..36ffc2fa4d7e 100644 --- a/lib/search/indexes/github-docs-dotcom-ja-records.json.br +++ b/lib/search/indexes/github-docs-dotcom-ja-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c653daee0785445b58f7cb37cad3c7f5f37ff0e1a104470c07b94511e92e85d5 -size 812542 +oid sha256:3295cfb24c8d515e887b3adc6b562ffefc5372c19d5016ff8da95c9bf4bd7b53 +size 812556 diff --git a/lib/search/indexes/github-docs-dotcom-ja.json.br b/lib/search/indexes/github-docs-dotcom-ja.json.br index a8a7ae041aff..e03da361967e 100644 --- a/lib/search/indexes/github-docs-dotcom-ja.json.br +++ b/lib/search/indexes/github-docs-dotcom-ja.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1baabf3771de8ff1c986b140413d0ddc61464158cd6d8a757cf0153559a06a03 -size 4444535 +oid sha256:f3abb148dd5fcaecce138808cda9219983a366bc4bd78df6d1b1980af84eb97b +size 4446705 diff --git a/lib/search/indexes/github-docs-dotcom-pt-records.json.br b/lib/search/indexes/github-docs-dotcom-pt-records.json.br index b4b3fda8ba9e..c2a63d2bd5b5 100644 --- a/lib/search/indexes/github-docs-dotcom-pt-records.json.br +++ b/lib/search/indexes/github-docs-dotcom-pt-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0885511fce22923729bfa2451e1216c6aafd170f024501075c03f4b596156294 -size 694508 +oid sha256:233e3ca7a363a85838ca65fd153a255b3937842814ab772cab9a3f6e69d2f910 +size 694423 diff --git a/lib/search/indexes/github-docs-dotcom-pt.json.br b/lib/search/indexes/github-docs-dotcom-pt.json.br index 6cdad769597c..073971a7a3c7 100644 --- a/lib/search/indexes/github-docs-dotcom-pt.json.br +++ b/lib/search/indexes/github-docs-dotcom-pt.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5daf1bdd49b232983f8f48ffb8d73764670b17d1f1f87f3c90dc4d11805c4eb3 -size 2963500 +oid sha256:1b0e04885a3a654b8a62e763c4461096b1446c60f27e89ce8700182835bf4016 +size 2963710 diff --git a/lib/search/indexes/github-docs-ghae-cn-records.json.br b/lib/search/indexes/github-docs-ghae-cn-records.json.br index 4e6de4bd3561..8778eac9e00f 100644 --- a/lib/search/indexes/github-docs-ghae-cn-records.json.br +++ b/lib/search/indexes/github-docs-ghae-cn-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed9a3a1ae5c7569504913421e6d46c890a07fbe649ada108c67d9d19a210e4f2 -size 469341 +oid sha256:fabc36467c30cdae6d674bf6c105f0168deeecf366424c03c49a4fd87a0693ca +size 469224 diff --git a/lib/search/indexes/github-docs-ghae-cn.json.br b/lib/search/indexes/github-docs-ghae-cn.json.br index 4008429a5dea..e5b83f604b98 100644 --- a/lib/search/indexes/github-docs-ghae-cn.json.br +++ b/lib/search/indexes/github-docs-ghae-cn.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c8863bebcbcc25b2e690773dcec8af029ffaf97a01f3189f37316fffc0058c1 -size 897803 +oid sha256:8a336c9a9fd40fe1eac5eefacf04365b7c1bbfa95e1ae2269dd934a49633fbb7 +size 898432 diff --git a/lib/search/indexes/github-docs-ghae-de-records.json.br b/lib/search/indexes/github-docs-ghae-de-records.json.br index 5523001fae7c..4ce06876521e 100644 --- a/lib/search/indexes/github-docs-ghae-de-records.json.br +++ b/lib/search/indexes/github-docs-ghae-de-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c0d0341ce6cb45dc33d3ab628f2f2bee67630e40a2998c72181e02f68f34b8d -size 445493 +oid sha256:b8e19b63800e64e3c08fe7e45798daa046ef10923e3d28d92d0eebb64fddbb21 +size 445315 diff --git a/lib/search/indexes/github-docs-ghae-de.json.br b/lib/search/indexes/github-docs-ghae-de.json.br index 78d298dfc3c8..5c5b7d3069a8 100644 --- a/lib/search/indexes/github-docs-ghae-de.json.br +++ b/lib/search/indexes/github-docs-ghae-de.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e80a46a5c12e42715ef98cd0913712eceeb266af8138eede04060cca9f1ad421 -size 2033071 +oid sha256:5599c6aa030f8695c9a2259f3261515e5423f28c6055814f100af2e07c99f738 +size 2032696 diff --git a/lib/search/indexes/github-docs-ghae-en-records.json.br b/lib/search/indexes/github-docs-ghae-en-records.json.br index 971378621ef9..e38006fd7cd1 100644 --- a/lib/search/indexes/github-docs-ghae-en-records.json.br +++ b/lib/search/indexes/github-docs-ghae-en-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b9ae00dd349b744037e57e493f238dc7ce3abec81d0a1f9433e1539f6cb91a5 -size 626523 +oid sha256:9a3b485422d0f69fba805cc1d3dbc426e2d41b4099bf1b052ddf829da967ca8f +size 626246 diff --git a/lib/search/indexes/github-docs-ghae-en.json.br b/lib/search/indexes/github-docs-ghae-en.json.br index 96ba6f3a5ae2..3e7b32a7dfca 100644 --- a/lib/search/indexes/github-docs-ghae-en.json.br +++ b/lib/search/indexes/github-docs-ghae-en.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be95f4ca611284c4ed44bca7729f1716a9ad4aea2f876c8c8112824ba08432a9 -size 2972989 +oid sha256:7fc74cf008d697fa19a4f15042ee21073764bd6501773cd7dfc3e98d480fc351 +size 2972420 diff --git a/lib/search/indexes/github-docs-ghae-es-records.json.br b/lib/search/indexes/github-docs-ghae-es-records.json.br index f60bc3159746..5cf924bb19a8 100644 --- a/lib/search/indexes/github-docs-ghae-es-records.json.br +++ b/lib/search/indexes/github-docs-ghae-es-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27e286d7f4c88cb500e8d0d843a61af7edd5514b433f88a2ba253c6884686969 -size 256018 +oid sha256:df2ebff03be318e79da7b8c9c905ad3bd3345bb4de1a78f02d0354545357c81c +size 256051 diff --git a/lib/search/indexes/github-docs-ghae-es.json.br b/lib/search/indexes/github-docs-ghae-es.json.br index eefc86b3f53e..cb41905ca964 100644 --- a/lib/search/indexes/github-docs-ghae-es.json.br +++ b/lib/search/indexes/github-docs-ghae-es.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6ae50bd37f61bcfaaebdb04eee50167bcb51244753f51bb9da4a5e47691415b -size 1022937 +oid sha256:c434d8b505917e4f1ed88c41bf4a124218532784ad81db59525c91592ec3a02c +size 1022670 diff --git a/lib/search/indexes/github-docs-ghae-ja-records.json.br b/lib/search/indexes/github-docs-ghae-ja-records.json.br index 5b083170808c..ce3409e414d8 100644 --- a/lib/search/indexes/github-docs-ghae-ja-records.json.br +++ b/lib/search/indexes/github-docs-ghae-ja-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eaa470a4d3e92958d0db21f90895a9b13a089682607f2a6a80bf403ac0a3cd2f -size 490785 +oid sha256:10bdacbeb2eac62c10a35d7d240fe487c288dc373bf66c3aaefd2dae0af16a3c +size 490976 diff --git a/lib/search/indexes/github-docs-ghae-ja.json.br b/lib/search/indexes/github-docs-ghae-ja.json.br index 6a71619d3b04..36c411965df5 100644 --- a/lib/search/indexes/github-docs-ghae-ja.json.br +++ b/lib/search/indexes/github-docs-ghae-ja.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3572d0199aed60a7acb43a9a059d83bdc3624bb3f8d0a7053854e3fcc77b5933 -size 2681916 +oid sha256:54654c07396e016c1bf2c6fd70c7ea800f3f5826f4ccb5223bcbc1a829af94c0 +size 2681795 diff --git a/lib/search/indexes/github-docs-ghae-pt-records.json.br b/lib/search/indexes/github-docs-ghae-pt-records.json.br index d49e94594bdf..ed0da3e4686c 100644 --- a/lib/search/indexes/github-docs-ghae-pt-records.json.br +++ b/lib/search/indexes/github-docs-ghae-pt-records.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6657e3e07036bbdc53db7ef84ea06749036d2475cd7787c9bf8ffba4c1666d83 -size 427940 +oid sha256:cdcae7b93645b66f95f292f66ba4f0dd21c07cf410c6904fa9de96ac1bba00db +size 428040 diff --git a/lib/search/indexes/github-docs-ghae-pt.json.br b/lib/search/indexes/github-docs-ghae-pt.json.br index 249a4ea5dd90..1b1154edc21b 100644 --- a/lib/search/indexes/github-docs-ghae-pt.json.br +++ b/lib/search/indexes/github-docs-ghae-pt.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ffbb4ebdc55f8d26bd6dc6259b2241f2b6c498a6dc7e2f5021367523eacef9af -size 1824105 +oid sha256:9ab909f95a9e3b3cef99d31b9e2e80517411278e78a4b5e84334cd2b89fe37e9 +size 1822276 diff --git a/pages/_app.tsx b/pages/_app.tsx index 9887822b7e90..5e3954718329 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -3,7 +3,7 @@ import App from 'next/app' import type { AppProps, AppContext } from 'next/app' import Head from 'next/head' import { useTheme, ThemeProvider } from '@primer/components' -import { defaultThemeProps, getThemeProps } from 'components/lib/getThemeProps' +import { defaultComponentThemeProps, getThemeProps } from 'components/lib/getThemeProps' import '../stylesheets/index.scss' @@ -13,7 +13,7 @@ import { LanguagesContext, LanguagesContextT } from 'components/context/Language type MyAppProps = AppProps & { csrfToken: string - themeProps: typeof defaultThemeProps + themeProps: typeof defaultComponentThemeProps languagesContext: LanguagesContextT } const MyApp = ({ Component, pageProps, csrfToken, themeProps, languagesContext }: MyAppProps) => { @@ -43,7 +43,7 @@ const MyApp = ({ Component, pageProps, csrfToken, themeProps, languagesContext } - + @@ -67,7 +67,7 @@ MyApp.getInitialProps = async (appContext: AppContext) => { } } -const SetTheme = ({ themeProps }: { themeProps: typeof defaultThemeProps }) => { +const SetTheme = ({ themeProps }: { themeProps: typeof defaultComponentThemeProps }) => { // Cause primer/components to re-evaluate the 'auto' color mode on client side render const { setColorMode } = useTheme() useEffect(() => { diff --git a/pages/_document.tsx b/pages/_document.tsx index 94274e9eb544..9dc7388c4c8c 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -32,15 +32,11 @@ export default class MyDocument extends Document { } render() { - const { colorMode, nightScheme, dayScheme } = (this.props as any).cssThemeProps + const { colorMode, nightTheme, dayTheme } = (this.props as any).cssThemeProps return ( - +