⬆️(frontend) bump to react 19.0.0
Last version of Blocknotes is compatible with React 19.0.0, it seems even necessary to bump the version of React to 19.0.0. We bump the version of React to 19.0.0 and remove the react packages from renovate list of ignored dependencies.
This commit is contained in:
@@ -15,14 +15,10 @@
|
|||||||
"matchManagers": ["npm"],
|
"matchManagers": ["npm"],
|
||||||
"matchPackageNames": [
|
"matchPackageNames": [
|
||||||
"@openfun/cunningham-react",
|
"@openfun/cunningham-react",
|
||||||
"@types/react",
|
|
||||||
"@types/react-dom",
|
|
||||||
"eslint",
|
"eslint",
|
||||||
"fetch-mock",
|
"fetch-mock",
|
||||||
"node",
|
"node",
|
||||||
"node-fetch",
|
"node-fetch",
|
||||||
"react",
|
|
||||||
"react-dom",
|
|
||||||
"workbox-webpack-plugin"
|
"workbox-webpack-plugin"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
"@types/lodash": "4.17.16",
|
"@types/lodash": "4.17.16",
|
||||||
"@types/luxon": "3.4.2",
|
"@types/luxon": "3.4.2",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/react": "18.3.12",
|
"@types/react": "*",
|
||||||
"@types/react-dom": "*",
|
"@types/react-dom": "*",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"dotenv": "16.4.7",
|
"dotenv": "16.4.7",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ComponentPropsWithRef, ReactHTML } from 'react';
|
import { ComponentPropsWithRef, HTMLElementType } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { CSSProperties, RuleSet } from 'styled-components/dist/types';
|
import { CSSProperties, RuleSet } from 'styled-components/dist/types';
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
import { hideEffect, showEffect } from './Effect';
|
import { hideEffect, showEffect } from './Effect';
|
||||||
|
|
||||||
export interface BoxProps {
|
export interface BoxProps {
|
||||||
as?: keyof ReactHTML;
|
as?: HTMLElementType;
|
||||||
$align?: CSSProperties['alignItems'];
|
$align?: CSSProperties['alignItems'];
|
||||||
$background?: CSSProperties['background'];
|
$background?: CSSProperties['background'];
|
||||||
$color?: CSSProperties['color'];
|
$color?: CSSProperties['color'];
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
import {
|
import { CSSProperties, ComponentPropsWithRef, forwardRef } from 'react';
|
||||||
CSSProperties,
|
|
||||||
ComponentPropsWithRef,
|
|
||||||
ReactHTML,
|
|
||||||
forwardRef,
|
|
||||||
} from 'react';
|
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { tokens } from '@/cunningham';
|
import { tokens } from '@/cunningham';
|
||||||
@@ -14,10 +9,7 @@ const { sizes } = tokens.themes.default.theme.font;
|
|||||||
type TextSizes = keyof typeof sizes;
|
type TextSizes = keyof typeof sizes;
|
||||||
|
|
||||||
export interface TextProps extends BoxProps {
|
export interface TextProps extends BoxProps {
|
||||||
as?: keyof Pick<
|
as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
||||||
ReactHTML,
|
|
||||||
'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
|
|
||||||
>;
|
|
||||||
$elipsis?: boolean;
|
$elipsis?: boolean;
|
||||||
$isMaterialIcon?: boolean;
|
$isMaterialIcon?: boolean;
|
||||||
$weight?: CSSProperties['fontWeight'];
|
$weight?: CSSProperties['fontWeight'];
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
getFormattingToolbarItems,
|
getFormattingToolbarItems,
|
||||||
useDictionary,
|
useDictionary,
|
||||||
} from '@blocknote/react';
|
} from '@blocknote/react';
|
||||||
import React, { useCallback, useMemo, useState } from 'react';
|
import React, { JSX, useCallback, useMemo, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { getQuoteFormattingToolbarItems } from '../custom-blocks';
|
import { getQuoteFormattingToolbarItems } from '../custom-blocks';
|
||||||
@@ -27,7 +27,11 @@ export const BlockNoteToolbar = () => {
|
|||||||
getQuoteFormattingToolbarItems(t),
|
getQuoteFormattingToolbarItems(t),
|
||||||
]);
|
]);
|
||||||
const fileDownloadButtonIndex = toolbarItems.findIndex(
|
const fileDownloadButtonIndex = toolbarItems.findIndex(
|
||||||
(item) => item.key === 'fileDownloadButton',
|
(item) =>
|
||||||
|
typeof item === 'object' &&
|
||||||
|
item !== null &&
|
||||||
|
'key' in item &&
|
||||||
|
(item as { key: string }).key === 'fileDownloadButton',
|
||||||
);
|
);
|
||||||
if (fileDownloadButtonIndex !== -1) {
|
if (fileDownloadButtonIndex !== -1) {
|
||||||
toolbarItems.splice(
|
toolbarItems.splice(
|
||||||
@@ -43,7 +47,7 @@ export const BlockNoteToolbar = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return toolbarItems;
|
return toolbarItems as JSX.Element[];
|
||||||
}, [dict, t]);
|
}, [dict, t]);
|
||||||
|
|
||||||
const formattingToolbar = useCallback(() => {
|
const formattingToolbar = useCallback(() => {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const useSaveDoc = (docId: string, doc: Y.Doc, canSave: boolean) => {
|
|||||||
});
|
});
|
||||||
}, [doc, docId, updateDoc]);
|
}, [doc, docId, updateDoc]);
|
||||||
|
|
||||||
const timeout = useRef<NodeJS.Timeout>();
|
const timeout = useRef<NodeJS.Timeout | null>(null);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -101,7 +101,10 @@ const useSaveDoc = (docId: string, doc: Y.Doc, canSave: boolean) => {
|
|||||||
router.events.on('routeChangeStart', onSave);
|
router.events.on('routeChangeStart', onSave);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
clearTimeout(timeout.current);
|
if (timeout.current) {
|
||||||
|
clearTimeout(timeout.current);
|
||||||
|
}
|
||||||
|
|
||||||
removeEventListener('beforeunload', onSave);
|
removeEventListener('beforeunload', onSave);
|
||||||
router.events.off('routeChangeStart', onSave);
|
router.events.off('routeChangeStart', onSave);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,12 +34,13 @@
|
|||||||
"@blocknote/xl-docx-exporter": "0.23.2-hotfix.0",
|
"@blocknote/xl-docx-exporter": "0.23.2-hotfix.0",
|
||||||
"@blocknote/xl-pdf-exporter": "0.23.2-hotfix.0",
|
"@blocknote/xl-pdf-exporter": "0.23.2-hotfix.0",
|
||||||
"@types/node": "22.13.9",
|
"@types/node": "22.13.9",
|
||||||
"@types/react-dom": "18.3.1",
|
"@types/react": "19.0.0",
|
||||||
|
"@types/react-dom": "19.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "8.26.0",
|
"@typescript-eslint/eslint-plugin": "8.26.0",
|
||||||
"@typescript-eslint/parser": "8.26.0",
|
"@typescript-eslint/parser": "8.26.0",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.0",
|
||||||
"react": "18.3.1",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.3.1",
|
"react-dom": "19.0.0",
|
||||||
"typescript": "5.8.2",
|
"typescript": "5.8.2",
|
||||||
"yjs": "13.6.23"
|
"yjs": "13.6.23"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5122,11 +5122,6 @@
|
|||||||
pg-protocol "*"
|
pg-protocol "*"
|
||||||
pg-types "^2.2.0"
|
pg-types "^2.2.0"
|
||||||
|
|
||||||
"@types/prop-types@*":
|
|
||||||
version "15.7.14"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.14.tgz#1433419d73b2a7ebfc6918dcefd2ec0d5cd698f2"
|
|
||||||
integrity sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==
|
|
||||||
|
|
||||||
"@types/qs@*":
|
"@types/qs@*":
|
||||||
version "6.9.18"
|
version "6.9.18"
|
||||||
resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.18.tgz#877292caa91f7c1b213032b34626505b746624c2"
|
resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.18.tgz#877292caa91f7c1b213032b34626505b746624c2"
|
||||||
@@ -5137,10 +5132,10 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb"
|
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb"
|
||||||
integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==
|
integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==
|
||||||
|
|
||||||
"@types/react-dom@*", "@types/react-dom@18.3.1":
|
"@types/react-dom@*", "@types/react-dom@19.0.0":
|
||||||
version "18.3.1"
|
version "19.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.1.tgz#1e4654c08a9cdcfb6594c780ac59b55aad42fe07"
|
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.0.0.tgz#e7f5d618a080486eaf9952246dbf59eaa2c64130"
|
||||||
integrity sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==
|
integrity sha512-1KfiQKsH1o00p9m5ag12axHQSb3FOU9H20UTrujVSkNhuCrRHiQWFqgEnTNK5ZNfnzZv8UWrnXVqCmCF9fgY3w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/react" "*"
|
"@types/react" "*"
|
||||||
|
|
||||||
@@ -5156,21 +5151,13 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.12.tgz#b5d76568485b02a307238270bfe96cb51ee2a044"
|
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.12.tgz#b5d76568485b02a307238270bfe96cb51ee2a044"
|
||||||
integrity sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==
|
integrity sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==
|
||||||
|
|
||||||
"@types/react@*":
|
"@types/react@*", "@types/react@19.0.0":
|
||||||
version "19.0.8"
|
version "19.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.8.tgz#7098e6159f2a61e4f4cef2c1223c044a9bec590e"
|
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.0.tgz#fbbb53ce223f4e2b750ad5dd09580b2c43522bbf"
|
||||||
integrity sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==
|
integrity sha512-MY3oPudxvMYyesqs/kW1Bh8y9VqSmf+tzqw3ae8a9DZW68pUe3zAdHeI1jc6iAysuRdACnVknHP8AhwD4/dxtg==
|
||||||
dependencies:
|
dependencies:
|
||||||
csstype "^3.0.2"
|
csstype "^3.0.2"
|
||||||
|
|
||||||
"@types/react@18.3.12":
|
|
||||||
version "18.3.12"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.12.tgz#99419f182ccd69151813b7ee24b792fe08774f60"
|
|
||||||
integrity sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==
|
|
||||||
dependencies:
|
|
||||||
"@types/prop-types" "*"
|
|
||||||
csstype "^3.0.2"
|
|
||||||
|
|
||||||
"@types/resolve@1.20.2":
|
"@types/resolve@1.20.2":
|
||||||
version "1.20.2"
|
version "1.20.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975"
|
resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975"
|
||||||
@@ -9989,7 +9976,7 @@ longest-streak@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-3.1.0.tgz#62fa67cd958742a1574af9f39866364102d90cd4"
|
resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-3.1.0.tgz#62fa67cd958742a1574af9f39866364102d90cd4"
|
||||||
integrity sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==
|
integrity sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==
|
||||||
|
|
||||||
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
|
loose-envify@^1.0.0, loose-envify@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||||
@@ -11870,13 +11857,12 @@ react-aria@^3.34.2, react-aria@^3.37.0:
|
|||||||
"@react-aria/visually-hidden" "^3.8.19"
|
"@react-aria/visually-hidden" "^3.8.19"
|
||||||
"@react-types/shared" "^3.27.0"
|
"@react-types/shared" "^3.27.0"
|
||||||
|
|
||||||
react-dom@*, react-dom@18.3.1:
|
react-dom@*, react-dom@18.3.1, react-dom@19.0.0:
|
||||||
version "18.3.1"
|
version "19.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
|
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57"
|
||||||
integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==
|
integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
loose-envify "^1.1.0"
|
scheduler "^0.25.0"
|
||||||
scheduler "^0.23.2"
|
|
||||||
|
|
||||||
react-i18next@15.4.1:
|
react-i18next@15.4.1:
|
||||||
version "15.4.1"
|
version "15.4.1"
|
||||||
@@ -12057,12 +12043,10 @@ react-transition-group@^4.3.0:
|
|||||||
loose-envify "^1.4.0"
|
loose-envify "^1.4.0"
|
||||||
prop-types "^15.6.2"
|
prop-types "^15.6.2"
|
||||||
|
|
||||||
react@*, react@18.3.1:
|
react@*, react@18.3.1, react@19.0.0:
|
||||||
version "18.3.1"
|
version "19.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
|
resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd"
|
||||||
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==
|
integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==
|
||||||
dependencies:
|
|
||||||
loose-envify "^1.1.0"
|
|
||||||
|
|
||||||
readable-stream@^3.4.0:
|
readable-stream@^3.4.0:
|
||||||
version "3.6.2"
|
version "3.6.2"
|
||||||
@@ -12514,12 +12498,10 @@ scheduler@0.25.0-rc-603e6108-20241029:
|
|||||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0-rc-603e6108-20241029.tgz#684dd96647e104d23e0d29a37f18937daf82df19"
|
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0-rc-603e6108-20241029.tgz#684dd96647e104d23e0d29a37f18937daf82df19"
|
||||||
integrity sha512-pFwF6H1XrSdYYNLfOcGlM28/j8CGLu8IvdrxqhjWULe2bPcKiKW4CV+OWqR/9fT52mywx65l7ysNkjLKBda7eA==
|
integrity sha512-pFwF6H1XrSdYYNLfOcGlM28/j8CGLu8IvdrxqhjWULe2bPcKiKW4CV+OWqR/9fT52mywx65l7ysNkjLKBda7eA==
|
||||||
|
|
||||||
scheduler@^0.23.2:
|
scheduler@^0.25.0:
|
||||||
version "0.23.2"
|
version "0.25.0"
|
||||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
|
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015"
|
||||||
integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==
|
integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==
|
||||||
dependencies:
|
|
||||||
loose-envify "^1.1.0"
|
|
||||||
|
|
||||||
schema-utils@^4.3.0:
|
schema-utils@^4.3.0:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user