Skip to content

Commit 5d77c9e

Browse files
feat: bump deps; syntaxes now optional; katex now peer dep
1 parent 89df767 commit 5d77c9e

File tree

5 files changed

+62
-23
lines changed

5 files changed

+62
-23
lines changed

components/Footer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const FooterImpl: React.FC = () => {
3939
href='#'
4040
role='button'
4141
onClick={onToggleDarkMode}
42+
title='Toggle dark mode'
4243
>
4344
{darkMode.value ? <IoMoonSharp /> : <IoSunnyOutline />}
4445
</a>

components/NotionPage.tsx

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,45 @@ import styles from './styles.module.css'
4141
// -----------------------------------------------------------------------------
4242

4343
const Code = dynamic(() =>
44-
import('react-notion-x/build/third-party/code').then((m) => m.Code)
44+
import('react-notion-x/build/third-party/code').then(async (m) => {
45+
// add / remove any prism syntaxes here
46+
await Promise.all([
47+
import('prismjs/components/prism-markup-templating.js'),
48+
import('prismjs/components/prism-markup.js'),
49+
import('prismjs/components/prism-bash.js'),
50+
import('prismjs/components/prism-c.js'),
51+
import('prismjs/components/prism-cpp.js'),
52+
import('prismjs/components/prism-csharp.js'),
53+
import('prismjs/components/prism-docker.js'),
54+
import('prismjs/components/prism-java.js'),
55+
import('prismjs/components/prism-js-templates.js'),
56+
import('prismjs/components/prism-coffeescript.js'),
57+
import('prismjs/components/prism-diff.js'),
58+
import('prismjs/components/prism-git.js'),
59+
import('prismjs/components/prism-go.js'),
60+
import('prismjs/components/prism-graphql.js'),
61+
import('prismjs/components/prism-handlebars.js'),
62+
import('prismjs/components/prism-less.js'),
63+
import('prismjs/components/prism-makefile.js'),
64+
import('prismjs/components/prism-markdown.js'),
65+
import('prismjs/components/prism-objectivec.js'),
66+
import('prismjs/components/prism-ocaml.js'),
67+
import('prismjs/components/prism-python.js'),
68+
import('prismjs/components/prism-reason.js'),
69+
import('prismjs/components/prism-rust.js'),
70+
import('prismjs/components/prism-sass.js'),
71+
import('prismjs/components/prism-scss.js'),
72+
import('prismjs/components/prism-solidity.js'),
73+
import('prismjs/components/prism-sql.js'),
74+
import('prismjs/components/prism-stylus.js'),
75+
import('prismjs/components/prism-swift.js'),
76+
import('prismjs/components/prism-wasm.js'),
77+
import('prismjs/components/prism-yaml.js')
78+
])
79+
return m.Code
80+
})
4581
)
82+
4683
const Collection = dynamic(() =>
4784
import('react-notion-x/build/third-party/collection').then(
4885
(m) => m.Collection

components/NotionPageHeader.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const NotionPageHeader: React.FC<{
6565
<div
6666
className={cs('breadcrumb', 'button')}
6767
role='button'
68+
aria-command-name='Toggle dark mode'
6869
onClick={darkMode.toggle}
6970
>
7071
{hasMounted && darkMode.value ? (

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,21 @@
3535
"fathom-client": "^3.4.1",
3636
"got": "^12.0.3",
3737
"isomorphic-unfetch": "^3.1.0",
38+
"katex": "^0.15.3",
3839
"lqip-modern": "^1.2.0",
3940
"next": "^12.1.1",
4041
"next-api-og-image": "^2.2.1",
4142
"node-fetch": "^2.6.1",
42-
"notion-client": "^6.9.2",
43+
"notion-client": "^6.9.3-6.10.0-alpha.0.0",
4344
"notion-types": "^6.7.0",
44-
"notion-utils": "^6.9.2",
45+
"notion-utils": "^6.9.3-6.10.0-alpha.0.0",
4546
"p-map": "^5.3.0",
4647
"p-memoize": "^6.0.1",
4748
"posthog-js": "^1.20.2",
4849
"react": "^17.0.2",
4950
"react-body-classname": "^1.3.1",
5051
"react-dom": "^17.0.2",
51-
"react-notion-x": "^6.9.2",
52+
"react-notion-x": "^6.9.3-6.10.0-alpha.0.0",
5253
"react-static-tweets": "^0.7.2",
5354
"react-use": "^17.3.2",
5455
"static-tweets": "^0.7.2"

yarn.lock

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,10 +2520,10 @@ jsonfile@^5.0.0:
25202520
array-includes "^3.1.3"
25212521
object.assign "^4.1.2"
25222522

2523-
katex@^0.13.18:
2524-
version "0.13.24"
2525-
resolved "https://registry.npmjs.org/katex/-/katex-0.13.24.tgz"
2526-
integrity sha512-jZxYuKCma3VS5UuxOx/rFV1QyGSl3Uy/i0kTJF3HgQ5xMinCQVF8Zd4bMY/9aI9b9A2pjIBOsjSSm68ykTAr8w==
2523+
katex@^0.15.3:
2524+
version "0.15.3"
2525+
resolved "https://registry.yarnpkg.com/katex/-/katex-0.15.3.tgz#08781a7ed26800b20380d959d1ffcd62bca0ec14"
2526+
integrity sha512-Al6V7RJsmjklT9QItyHWGaQCt+NYTle1bZwB1e9MR/tLoIT1MXaHy9UpfGSB7eaqDgjjqqRxQOaQGrALCrEyBQ==
25272527
dependencies:
25282528
commander "^8.0.0"
25292529

@@ -2928,25 +2928,25 @@ normalize-url@^7.0.3:
29282928
resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-7.0.3.tgz"
29292929
integrity sha512-RiCOdwdPnzvwcBFJE4iI1ss3dMVRIrEzFpn8ftje6iBfzBInqlnRrNhxcLwBEKjPPXQKzm1Ptlxtaiv9wdcj5w==
29302930

2931-
notion-client@^6.9.2:
2932-
version "6.9.2"
2933-
resolved "https://registry.yarnpkg.com/notion-client/-/notion-client-6.9.2.tgz#789b3e5ba5be3a75dc7013212db9b9abe53fc3e6"
2934-
integrity sha512-VMuaXbd/du83r+4gKRdIgeePduWZMSYfISr8FM9gePdRFt2HoSsWQC1cxqX+V/S3N7xkUFSWbHJcJkWcDpSx+g==
2931+
notion-client@^6.9.3-6.10.0-alpha.0.0:
2932+
version "6.9.3-6.10.0-alpha.0.0"
2933+
resolved "https://registry.yarnpkg.com/notion-client/-/notion-client-6.9.3-6.10.0-alpha.0.0.tgz#b82b95733ae4bc543d25e4341d98a5b57f795fba"
2934+
integrity sha512-Zq+7TxavVYuZ4+zUqlqeIEENkfM64b1u0MBNQSgKuHW9typCqQBckxnYwm2gydOHgBdrEp1nFWOugE8kXU+Nrg==
29352935
dependencies:
29362936
got "^11.8.1"
29372937
notion-types "^6.7.0"
2938-
notion-utils "^6.9.2"
2938+
notion-utils "^6.9.3-6.10.0-alpha.0.0"
29392939
p-map "^5.3.0"
29402940

29412941
notion-types@^6.7.0:
29422942
version "6.7.0"
29432943
resolved "https://registry.yarnpkg.com/notion-types/-/notion-types-6.7.0.tgz#f5ccb8ef701389b2bf52e5561bd31bc60c49ccdf"
29442944
integrity sha512-j7O6juQDOPgAinELMMpvVn0c8Vgr+Dhqm7UTTnhILnBhbOtQKaIYPCNKA4AJw/OPzzy1iEJ6KrthTEkPbQYEeg==
29452945

2946-
notion-utils@^6.9.2:
2947-
version "6.9.2"
2948-
resolved "https://registry.yarnpkg.com/notion-utils/-/notion-utils-6.9.2.tgz#d295a10fcef28a1b75bd8e8dd4bb319554eb0719"
2949-
integrity sha512-bk2lbxARjZawqLjnmjH4uICHQAKFOTuu1j842ZC5XYq1DKZtatwZamTc4wwWQ9yQHyDAsY03cV9EQisUOnZLvQ==
2946+
notion-utils@^6.9.3-6.10.0-alpha.0.0:
2947+
version "6.9.3-6.10.0-alpha.0.0"
2948+
resolved "https://registry.yarnpkg.com/notion-utils/-/notion-utils-6.9.3-6.10.0-alpha.0.0.tgz#d8515de8fae473a7163e7feb85a33355f18c7933"
2949+
integrity sha512-uBJYy2JzMVWLy1UvnaEsmZPlM32B8zxWx9rAmMTmcszblYrTCU9CZJCA0h/gyYiI7hmYfDEXDEgpFo/4kkpEtQ==
29502950
dependencies:
29512951
is-url-superb "^6.1.0"
29522952
mem "^9.0.2"
@@ -3511,17 +3511,16 @@ react-modal@^3.14.3:
35113511
react-lifecycles-compat "^3.0.0"
35123512
warning "^4.0.3"
35133513

3514-
react-notion-x@^6.9.2:
3515-
version "6.9.2"
3516-
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-6.9.2.tgz#463a07d701cbbbf27d7b0cb245af861b546d5a07"
3517-
integrity sha512-2AqaGCYIw6wZa4KLg+HkPC00n99L+cJjcts6f51QuWTS0gsAd6m2Va3qHzpkkFIRBL+e82TK1fXAnvcI1/jvfA==
3514+
react-notion-x@^6.9.3-6.10.0-alpha.0.0:
3515+
version "6.9.3-6.10.0-alpha.0.0"
3516+
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-6.9.3-6.10.0-alpha.0.0.tgz#d83f3618a220db712bb8bed4af03bf7d10d95f5e"
3517+
integrity sha512-JI/KfqIX4+1Q644HEU13CUix5u+LeOWTPbr2q8x/PeoULhise89A68QSN/j34kQvBw+zVZThc8/As1BN5Wgj6A==
35183518
dependencies:
35193519
"@matejmazur/react-katex" "^3.1.3"
35203520
"@radix-ui/react-dropdown-menu" "^0.1.6"
3521-
katex "^0.13.18"
35223521
medium-zoom "^1.0.6"
35233522
notion-types "^6.7.0"
3524-
notion-utils "^6.9.2"
3523+
notion-utils "^6.9.3-6.10.0-alpha.0.0"
35253524
prismjs "^1.27.0"
35263525
react-fast-compare "^3.2.0"
35273526
react-hotkeys-hook "^3.0.3"

0 commit comments

Comments
 (0)