From 07e25dc9b6e512c95e115dd7e2380cddf37d0632 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 1 Nov 2024 00:58:47 -0500 Subject: [PATCH] fix --- components/HeroHeader.tsx | 3 +- components/NotionPage.tsx | 5 +- package.json | 9 +-- pages/_app.tsx | 5 -- pnpm-lock.yaml | 112 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+), 14 deletions(-) diff --git a/components/HeroHeader.tsx b/components/HeroHeader.tsx index 8297dd278b..3ee28b68e3 100644 --- a/components/HeroHeader.tsx +++ b/components/HeroHeader.tsx @@ -1,7 +1,6 @@ -import React, { Component } from 'react' - import raf from 'raf' import random from 'random' +import React, { Component } from 'react' import FluidAnimation from 'react-fluid-animation' const exp = random.exponential() diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx index 38c9a92644..57724528c3 100644 --- a/components/NotionPage.tsx +++ b/components/NotionPage.tsx @@ -3,9 +3,7 @@ import dynamic from 'next/dynamic' import Image from 'next/legacy/image' import Link from 'next/link' import { useRouter } from 'next/router' -import * as React from 'react' - -import { PageBlock } from 'notion-types' +import { type PageBlock } from 'notion-types' import { formatDate, getBlockTitle, @@ -13,6 +11,7 @@ import { normalizeTitle, parsePageId } from 'notion-utils' +import * as React from 'react' import BodyClassName from 'react-body-classname' import { type NotionComponents, NotionRenderer } from 'react-notion-x' import TweetEmbed from 'react-tweet-embed' diff --git a/package.json b/package.json index 07140e47bb..1ffc79cb4c 100644 --- a/package.json +++ b/package.json @@ -50,13 +50,13 @@ "p-memoize": "^7.1.1", "posthog-js": "^1.20.2", "prismjs": "^1.29.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-notion-x": "^7.0.1", "raf": "^3.4.1", - "random": "^3.0.6", + "random": "^5.1.1", + "react": "^18.2.0", "react-body-classname": "^1.3.1", + "react-dom": "^18.2.0", "react-fluid-animation": "^1.0.1", + "react-notion-x": "^7.0.1", "react-tweet-embed": "^2.0.0", "react-use": "^17.4.2", "rss": "^1.2.2" @@ -66,6 +66,7 @@ "@next/bundle-analyzer": "^15.0.2", "@types/lodash.omit": "^4.5.6", "@types/node": "^22.8.6", + "@types/raf": "^3.4.3", "@types/react": "^18.0.21", "cross-env": "^7.0.2", "eslint": "^8.57.1", diff --git a/pages/_app.tsx b/pages/_app.tsx index ad57eaf2c5..4d07130488 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -3,19 +3,14 @@ // used for code syntax highlighting (optional) import 'prismjs/themes/prism-coy.css' - // core styles shared by all of react-notion-x (required) import 'react-notion-x/src/styles.css' - // global styles shared across the entire site import 'styles/global.css' - // this might be better for dark mode // import 'prismjs/themes/prism-okaidia.css' - // global style overrides for notion import 'styles/notion.css' - // global style overrides for prism theme (optional) import 'styles/prism-theme.css' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f3290c0f8..1c460d5da0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: ky: specifier: ^1.7.2 version: 1.7.2 + lodash.omit: + specifier: ^4.5.0 + version: 4.5.0 lqip-modern: specifier: ^2.1.0 version: 2.1.0 @@ -65,6 +68,12 @@ importers: prismjs: specifier: ^1.29.0 version: 1.29.0 + raf: + specifier: ^3.4.1 + version: 3.4.1 + random: + specifier: ^5.1.1 + version: 5.1.1 react: specifier: ^18.2.0 version: 18.3.1 @@ -74,6 +83,9 @@ importers: react-dom: specifier: ^18.2.0 version: 18.3.1(react@18.3.1) + react-fluid-animation: + specifier: ^1.0.1 + version: 1.0.1(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-notion-x: specifier: ^7.0.1 version: 7.0.1(@babel/runtime@7.26.0)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -93,9 +105,15 @@ importers: '@next/bundle-analyzer': specifier: ^15.0.2 version: 15.0.2 + '@types/lodash.omit': + specifier: ^4.5.6 + version: 4.5.9 '@types/node': specifier: ^22.8.6 version: 22.8.6 + '@types/raf': + specifier: ^3.4.3 + version: 3.4.3 '@types/react': specifier: ^18.0.21 version: 18.3.12 @@ -420,6 +438,12 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + '@types/lodash.omit@4.5.9': + resolution: {integrity: sha512-zuAVFLUPJMOzsw6yawshsYGgq2hWUHtsZgeXHZmSFhaQQFC6EQ021uDKHkSjOpNhSvtNSU9165/o3o/Q51GpTw==} + + '@types/lodash@4.17.13': + resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==} + '@types/node@22.8.6': resolution: {integrity: sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==} @@ -429,6 +453,9 @@ packages: '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} + '@types/raf@3.4.3': + resolution: {integrity: sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==} + '@types/react@18.3.12': resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} @@ -618,6 +645,9 @@ packages: resolution: {integrity: sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==} engines: {node: '>= 0.4'} + batch-processor@1.0.0: + resolution: {integrity: sha512-xoLQD8gmmR32MeuBHgH0Tzd5PuSZx71ZsbhVxOCRbgktZEPe4SQy7s9Z50uPp0F/f7iw2XmkHN2xkgbMfckMDA==} + brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -853,6 +883,9 @@ packages: electron-to-chromium@1.5.50: resolution: {integrity: sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw==} + element-resize-detector@1.2.4: + resolution: {integrity: sha512-Fl5Ftk6WwXE0wqCgNoseKWndjzZlDCwuPTcoVZfCP9R3EHQF8qUtr3YUPNETegRBOKqQKPW3n4kiIWngGi8tKg==} + emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -1521,6 +1554,9 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.omit@4.5.0: + resolution: {integrity: sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==} + loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -1856,6 +1892,9 @@ packages: resolution: {integrity: sha512-MbkAjpwka/dMHaCfQ75RY1FXX3IewBVu6NGZOcxerRFlaBiIkZmUoR0jotX5VUzYZEXAGzSFtknWs5xRKliXPA==} engines: {node: '>=18'} + performance-now@2.1.0: + resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1912,6 +1951,13 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + raf@3.4.1: + resolution: {integrity: sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==} + + random@5.1.1: + resolution: {integrity: sha512-iidvORUvXY1ItoYxO0eduHCKl22QV0G6460vRHe862dUagJKPhRyjUGwK8ioOCG4NRuFvExHFpqMngsnr2miwA==} + engines: {node: '>=18'} + react-body-classname@1.3.1: resolution: {integrity: sha512-PxskbhmoV8kzIyspjiIc/smQkyyBOQHeUsrh1oj9CC5O1Kg/4gvHWPKsYGWEIq0X51TtCT941u/ulM1dTZ/bOw==} @@ -1923,6 +1969,14 @@ packages: react-fast-compare@3.2.2: resolution: {integrity: sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==} + react-fluid-animation@1.0.1: + resolution: {integrity: sha512-+6Ld/cPmpCqkBCcf8Ch0yAbSwB+qWCHem+SkAestxWbqFDyhdX5waIaNemREq1owD5h3iAxqQfA+7XDPFYyaVA==} + engines: {node: '>=8', npm: '>=5'} + peerDependencies: + prop-types: ^15.5.4 + react: ^15.0.0 || ^16.0.0 + react-dom: ^15.0.0 || ^16.0.0 + react-hotkeys-hook@4.5.1: resolution: {integrity: sha512-scAEJOh3Irm0g95NIn6+tQVf/OICCjsQsC9NBHfQws/Vxw4sfq1tDQut5fhTEvPraXhu/sHxRd9lOtxzyYuNAg==} peerDependencies: @@ -1982,6 +2036,12 @@ packages: peerDependencies: react: ^16.3.0 || ^17.0.0 || ^18.0.0 + react-sizeme@2.6.12: + resolution: {integrity: sha512-tL4sCgfmvapYRZ1FO2VmBmjPVzzqgHA7kI8lSJ6JS6L78jXFNRdOZFpXyK6P1NBZvKPPCZxReNgzZNUajAerZw==} + peerDependencies: + react: ^0.14.0 || ^15.0.0-0 || ^16.0.0 + react-dom: ^0.14.0 || ^15.0.0-0 || ^16.0.0 + react-tweet-embed@2.0.0: resolution: {integrity: sha512-g2kfPjSRTOKeJtaQF5EMuSTmp/q8I0qdDs/pZ2qLXZjCWExDT/JgjxSlyM65NyNzsz8072PDpvlO/sIXwwVpdQ==} peerDependencies: @@ -2139,6 +2199,9 @@ packages: resolution: {integrity: sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==} engines: {node: '>=6.9'} + shallowequal@1.1.0: + resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} + sharp@0.33.5: resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -2304,6 +2367,10 @@ packages: text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + throttle-debounce@2.3.0: + resolution: {integrity: sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ==} + engines: {node: '>=8'} + throttle-debounce@3.0.1: resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==} engines: {node: '>=10'} @@ -2783,6 +2850,12 @@ snapshots: '@types/json5@0.0.29': {} + '@types/lodash.omit@4.5.9': + dependencies: + '@types/lodash': 4.17.13 + + '@types/lodash@4.17.13': {} + '@types/node@22.8.6': dependencies: undici-types: 6.19.8 @@ -2791,6 +2864,8 @@ snapshots: '@types/prop-types@15.7.13': {} + '@types/raf@3.4.3': {} + '@types/react@18.3.12': dependencies: '@types/prop-types': 15.7.13 @@ -3025,6 +3100,8 @@ snapshots: base64-js@0.0.8: {} + batch-processor@1.0.0: {} + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 @@ -3248,6 +3325,10 @@ snapshots: electron-to-chromium@1.5.50: {} + element-resize-detector@1.2.4: + dependencies: + batch-processor: 1.0.0 + emoji-regex@10.4.0: {} emoji-regex@8.0.0: @@ -4055,6 +4136,8 @@ snapshots: lodash.merge@4.6.2: {} + lodash.omit@4.5.0: {} + loose-envify@1.4.0: dependencies: js-tokens: 4.0.0 @@ -4389,6 +4472,8 @@ snapshots: - encoding - supports-color + performance-now@2.1.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -4432,6 +4517,12 @@ snapshots: queue-microtask@1.2.3: {} + raf@3.4.1: + dependencies: + performance-now: 2.1.0 + + random@5.1.1: {} + react-body-classname@1.3.1(react@18.3.1): dependencies: prop-types: 15.8.1 @@ -4447,6 +4538,14 @@ snapshots: react-fast-compare@3.2.2: {} + react-fluid-animation@1.0.1(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + prop-types: 15.8.1 + raf: 3.4.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-sizeme: 2.6.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react-hotkeys-hook@4.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: react: 18.3.1 @@ -4528,6 +4627,15 @@ snapshots: dependencies: react: 18.3.1 + react-sizeme@2.6.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + element-resize-detector: 1.2.4 + invariant: 2.2.4 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + shallowequal: 1.1.0 + throttle-debounce: 2.3.0 + react-tweet-embed@2.0.0(react@18.3.1): dependencies: react: 18.3.1 @@ -4721,6 +4829,8 @@ snapshots: set-harmonic-interval@1.0.1: {} + shallowequal@1.1.0: {} + sharp@0.33.5: dependencies: color: 4.2.3 @@ -4926,6 +5036,8 @@ snapshots: text-table@0.2.0: {} + throttle-debounce@2.3.0: {} + throttle-debounce@3.0.1: {} tiny-inflate@1.0.3: {}