diff --git a/package-lock.json b/package-lock.json index 74573e98ca49..dcf4ef86b9e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3070,12 +3070,18 @@ } }, "node_modules/@floating-ui/core": { - "version": "1.5.0", - "license": "MIT", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", + "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", "dependencies": { - "@floating-ui/utils": "^0.1.3" + "@floating-ui/utils": "^0.2.1" } }, + "node_modules/@floating-ui/core/node_modules/@floating-ui/utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", + "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" + }, "node_modules/@floating-ui/dom": { "version": "1.5.3", "license": "MIT", @@ -7744,132 +7750,12 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@udecode/cn": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@udecode/cn/-/cn-29.0.1.tgz", - "integrity": "sha512-U41vXvTBKU+06CiQivy4pIWB7RzfaB3DlqkQMNv8UNK164pJhM3v6P0D45kFpbU2uOSOCGpYRSo4kMp9y8RtcQ==", - "dependencies": { - "@udecode/react-utils": "29.0.1" - }, - "peerDependencies": { - "class-variance-authority": ">=0.7.0", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "tailwind-merge": ">=2.2.0" - } - }, - "node_modules/@udecode/plate": { - "version": "30.9.4", - "resolved": "https://registry.npmjs.org/@udecode/plate/-/plate-30.9.4.tgz", - "integrity": "sha512-HSI27P/sqU+4mrK7YsRGDusmDLpMjT/Gp+Mnuj70/7q1kYKBXP4yxjgEa2ikCnoNXRMsDYhUKS2EOSHfSYy9wA==", - "dependencies": { - "@udecode/plate-alignment": "30.5.3", - "@udecode/plate-autoformat": "30.5.3", - "@udecode/plate-basic-elements": "30.7.0", - "@udecode/plate-basic-marks": "30.5.3", - "@udecode/plate-block-quote": "30.5.3", - "@udecode/plate-break": "30.5.3", - "@udecode/plate-code-block": "30.7.0", - "@udecode/plate-combobox": "30.5.3", - "@udecode/plate-comments": "30.5.3", - "@udecode/plate-common": "30.4.5", - "@udecode/plate-diff": "30.9.0", - "@udecode/plate-find-replace": "30.5.3", - "@udecode/plate-floating": "30.5.3", - "@udecode/plate-font": "30.5.3", - "@udecode/plate-heading": "30.5.3", - "@udecode/plate-highlight": "30.5.3", - "@udecode/plate-horizontal-rule": "30.5.3", - "@udecode/plate-indent": "30.5.3", - "@udecode/plate-indent-list": "30.5.3", - "@udecode/plate-kbd": "30.5.3", - "@udecode/plate-line-height": "30.5.3", - "@udecode/plate-link": "30.9.4", - "@udecode/plate-list": "30.5.3", - "@udecode/plate-media": "30.5.3", - "@udecode/plate-mention": "30.5.3", - "@udecode/plate-node-id": "30.5.3", - "@udecode/plate-normalizers": "30.5.3", - "@udecode/plate-paragraph": "30.5.3", - "@udecode/plate-reset-node": "30.5.3", - "@udecode/plate-resizable": "30.5.3", - "@udecode/plate-select": "30.5.3", - "@udecode/plate-serializer-csv": "30.9.4", - "@udecode/plate-serializer-docx": "30.9.4", - "@udecode/plate-serializer-html": "30.5.3", - "@udecode/plate-serializer-md": "30.9.4", - "@udecode/plate-suggestion": "30.9.0", - "@udecode/plate-tabbable": "30.5.3", - "@udecode/plate-table": "30.9.4", - "@udecode/plate-toggle": "30.9.2", - "@udecode/plate-trailing-block": "30.5.3" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-alignment": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-alignment/-/plate-alignment-30.5.3.tgz", - "integrity": "sha512-zQK2pA5lhUsxCJtNP0eDytfAHjUzqd1znhQh6CzRgoZeALtFkEKee/v329iEv7ZdVFWGtooQoaNraq8PF8+7yg==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-autoformat": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-autoformat/-/plate-autoformat-30.5.3.tgz", - "integrity": "sha512-yvRS9Fw3eMr9djRExW8sf6BSc+BYMp0G6tCXHIXvTOfne55+WU4D8eFlrcjy94EhGGddCUS45Q/YvDALYAsTpA==", - "dependencies": { - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-basic-elements": { - "version": "30.7.0", - "resolved": "https://registry.npmjs.org/@udecode/plate-basic-elements/-/plate-basic-elements-30.7.0.tgz", - "integrity": "sha512-FYriqwvthx+3BPljePD/eVBszDyi1g1i2RMSs1PlXxqcDlXBuaUtWurWpnViJLK0hzfGagTzaOz6soEMlB5qZw==", - "dependencies": { - "@udecode/plate-block-quote": "30.5.3", - "@udecode/plate-code-block": "30.7.0", - "@udecode/plate-heading": "30.5.3", - "@udecode/plate-paragraph": "30.5.3" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, "node_modules/@udecode/plate-basic-marks": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-basic-marks/-/plate-basic-marks-30.5.3.tgz", - "integrity": "sha512-/p5WVEz20mWVg+HNrMemDLJ/n0AM2e0GZwn5NTQULXa5i9DcqqcZOXlOayXhxjG4P9/KV9nPdOttQtxti/Sr3g==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-basic-marks/-/plate-basic-marks-31.0.0.tgz", + "integrity": "sha512-yV05ohuWk7ZcVxshLQIoqRbJTCbn8hANaMR98PuOMHFajr68/Qvdn9B5MuOzLqPHyOOQ4yVBdzPNcsG6l1DuAg==", "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -7879,11 +7765,11 @@ } }, "node_modules/@udecode/plate-block-quote": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-block-quote/-/plate-block-quote-30.5.3.tgz", - "integrity": "sha512-InFQ/IaS2BFj74CaDU4V/hlbcefXG3joRBw2cH8QJgbB1t4GSBTW8ZoMDDA6L6N9edBUu8R3vQWQgfZhp303Ig==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-block-quote/-/plate-block-quote-31.0.0.tgz", + "integrity": "sha512-82gWC4uXsYvkkmtz4/mvlgAx7s6FgkUP80ZVVMJ2O9p9C6HipJs6/fvs5VWR1L8P04+leRIqi5dknm6ZzW5Epg==", "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -7893,11 +7779,11 @@ } }, "node_modules/@udecode/plate-break": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-break/-/plate-break-30.5.3.tgz", - "integrity": "sha512-MwJrHw+1qFIs6HOBoaHGV/jaj6JXj0+BzrxT7FOLvdTK5vVFWC21a+WwgOJWZBZ3NVVRpxp0PxxhwpaqtEkKRw==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-break/-/plate-break-31.0.0.tgz", + "integrity": "sha512-dt5btIRIAWVioh9/O/JX8X2UYThGw4/Aks3aRjWjRitwONmTwca9UzxKMj7W0li758Yvd2WPeBJNPIWGJ9cpYw==", "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -7906,32 +7792,20 @@ "slate-react": ">=0.99.0" } }, - "node_modules/@udecode/plate-code-block": { - "version": "30.7.0", - "resolved": "https://registry.npmjs.org/@udecode/plate-code-block/-/plate-code-block-30.7.0.tgz", - "integrity": "sha512-/wodH5+SH9eALLIiUAkcwRE2EO4eIBIe5bIoCYMToe3dwaDF4MVHwBU5jZLzi6cy9osar396CQfPmW1j63MJLQ==", - "dependencies": { - "prismjs": "^1.29.0" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-combobox": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-combobox/-/plate-combobox-30.5.3.tgz", - "integrity": "sha512-bAq3jWFEPwFwsm0NYoBz+vg6w/8NBKk3Az2x1/HOZ4vwoQNhbI6JLLPWnpTabPDDaF1hIvj9kqV+rOIbSS241g==", + "node_modules/@udecode/plate-common": { + "version": "31.3.2", + "resolved": "https://registry.npmjs.org/@udecode/plate-common/-/plate-common-31.3.2.tgz", + "integrity": "sha512-yhfFoJUlX81gOur093uDXrZu8lflm43DpcRhjHtX0pE6MiwSWIGygTNdjyXEE/MWC4/mwdeU1k94ahCXkfiffw==", "dependencies": { - "downshift": "^6.1.12" + "@udecode/plate-core": "31.3.2", + "@udecode/plate-utils": "31.3.2", + "@udecode/react-utils": "31.0.0", + "@udecode/slate": "31.0.0", + "@udecode/slate-react": "31.0.0", + "@udecode/slate-utils": "31.3.2", + "@udecode/utils": "31.0.0" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -7940,66 +7814,46 @@ "slate-react": ">=0.99.0" } }, - "node_modules/@udecode/plate-comments": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-comments/-/plate-comments-30.5.3.tgz", - "integrity": "sha512-DiepkcQ4G+TNTA86fvbuue5sva3XmETkZjYDMsBin/NMn/foiBA2O+SorK3nZ5kCCSZsFgG07UhufnRXFbkN6w==", + "node_modules/@udecode/plate-common/node_modules/@udecode/react-utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/react-utils/-/react-utils-31.0.0.tgz", + "integrity": "sha512-zvXVIOELvKeizFK9a7nCBGizH/tO7EFOl4N7YSL8fUrd6SZPIoHTNEZg5YKC3bcdB7LUoBno1BJOcWOZDHE5SA==", "dependencies": { - "lodash": "^4.17.21" + "@radix-ui/react-slot": "^1.0.2", + "@udecode/utils": "31.0.0", + "clsx": "^1.2.1" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" + "react-dom": ">=16.8.0" } }, - "node_modules/@udecode/plate-common": { - "version": "30.4.5", - "resolved": "https://registry.npmjs.org/@udecode/plate-common/-/plate-common-30.4.5.tgz", - "integrity": "sha512-p/hF7rvuEqyrxvsfgjaBswv82C/Z1/S5vNj+m33UG91cnPs5sLHbofd5qh7vRgKKfZ/uk028mNpUgemo1bFgbA==", - "dependencies": { - "@udecode/plate-core": "30.4.5", - "@udecode/plate-utils": "30.4.5", - "@udecode/react-utils": "29.0.1", - "@udecode/slate": "25.0.0", - "@udecode/slate-react": "29.0.1", - "@udecode/slate-utils": "25.0.0", - "@udecode/utils": "24.3.0" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } + "node_modules/@udecode/plate-common/node_modules/@udecode/utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/utils/-/utils-31.0.0.tgz", + "integrity": "sha512-06JTl1UAm3mzLLAx8hdMUFw4XRQG727z9JoJ9PeBnmFb9q4Cg3DdmbFnhVJMrBPWlyOwoHtPrBjnanTFeiP36Q==" }, "node_modules/@udecode/plate-core": { - "version": "30.4.5", - "resolved": "https://registry.npmjs.org/@udecode/plate-core/-/plate-core-30.4.5.tgz", - "integrity": "sha512-x/X0dCLoWFyC7wEI9hTcVMR8C/xiTkF0w9I5fyhCMg1mXz/y4DB0CMute+hYT0Wz7rqgj9DYT4v8ryrB9fEu9A==", - "dependencies": { - "@udecode/slate": "25.0.0", - "@udecode/slate-react": "29.0.1", - "@udecode/slate-utils": "25.0.0", - "@udecode/utils": "24.3.0", + "version": "31.3.2", + "resolved": "https://registry.npmjs.org/@udecode/plate-core/-/plate-core-31.3.2.tgz", + "integrity": "sha512-sBEB2vMu2KG4/KTBwyui1mBzORBm+tPg05p/mk+/Ihy/gBlxBpIyiuRUo3iRD9ZTm+sAJLZT5e3Vv8wWyu3Bfg==", + "dependencies": { + "@udecode/slate": "31.0.0", + "@udecode/slate-react": "31.0.0", + "@udecode/slate-utils": "31.3.2", + "@udecode/utils": "31.0.0", "clsx": "^1.2.1", "is-hotkey": "^0.2.0", - "jotai": "^2.6.0", - "jotai-optics": "0.3.1", + "jotai": "^2.7.1", + "jotai-optics": "0.3.2", "jotai-x": "^1.2.2", "lodash": "^4.17.21", - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "optics-ts": "2.4.1", - "react-hotkeys-hook": "^4.4.1", - "use-deep-compare": "^1.1.0", - "zustand": "^4.4.7", - "zustand-x": "^3.0.1" + "react-hotkeys-hook": "^4.5.0", + "use-deep-compare": "^1.2.1", + "zustand": "^4.5.2", + "zustand-x": "^3.0.2" }, "peerDependencies": { "react": ">=16.8.0", @@ -8010,64 +7864,21 @@ "slate-react": ">=0.99.0" } }, - "node_modules/@udecode/plate-diff": { - "version": "30.9.0", - "resolved": "https://registry.npmjs.org/@udecode/plate-diff/-/plate-diff-30.9.0.tgz", - "integrity": "sha512-FiChegLUmW4T4iFDMxBCUjExn0C1rgi4rZM57HtJ6phN3EyotPWHXgn2R7cfGhL6vBAY+4E44CS69dVyeKzkcg==", - "dependencies": { - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-find-replace": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-find-replace/-/plate-find-replace-30.5.3.tgz", - "integrity": "sha512-xmv373CgN+fuZR3ESaLS56PkNblNoXSrt5w53MV7I3ISy3vUYU2TZnuvTtn1v59HHSWIZdlIlyTySrsJT0YxdA==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } + "node_modules/@udecode/plate-core/node_modules/@udecode/utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/utils/-/utils-31.0.0.tgz", + "integrity": "sha512-06JTl1UAm3mzLLAx8hdMUFw4XRQG727z9JoJ9PeBnmFb9q4Cg3DdmbFnhVJMrBPWlyOwoHtPrBjnanTFeiP36Q==" }, "node_modules/@udecode/plate-floating": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-floating/-/plate-floating-30.5.3.tgz", - "integrity": "sha512-9KxpZdKLy45a3Z+MJqSGmuJKQrl7CrNsLyUdjKD4Iqd1DIdBwl65dGqTmgI1EycF2jUsWIrgGE3W71f7E5/JdA==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-floating/-/plate-floating-31.0.0.tgz", + "integrity": "sha512-k1KZjpGCH+x/rDCSUZ1Kd4ttPc/35Xp/T+pmI2jYQ48dlorYQPJSuJxpFE/cpBp1g8G2lLh4xbH5BTYR1bypAQ==", "dependencies": { - "@floating-ui/core": "^1.3.1", + "@floating-ui/core": "^1.6.0", "@floating-ui/react": "^0.22.3" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-font": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-font/-/plate-font-30.5.3.tgz", - "integrity": "sha512-S40ES4ihWBHF9/BscZGkQCV0b/wNtQcKdaHS6DvQ3JxnzY73XEwwvaJ19FBrPJ2U/CD+i+9SIF5do1bgW5jQuw==", - "dependencies": { - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8077,100 +7888,11 @@ } }, "node_modules/@udecode/plate-heading": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-heading/-/plate-heading-30.5.3.tgz", - "integrity": "sha512-F0SRJSXQtIw6N4AXcENyR01KNSZdflExsQnsEyjDGHZfF0x4bjCt7AeMr79ZDJ+ZAFTrOUKGR53+z2CV2G5ixg==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-highlight": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-highlight/-/plate-highlight-30.5.3.tgz", - "integrity": "sha512-20RlkxTNkJTJH+c1fE3D0wwt2WfUBKJMp97I7S0cVkWE7jv/HVzFsXsfdzQeS2Yms4tEA/ZiZQCXoRmqbHvkOw==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-horizontal-rule": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-horizontal-rule/-/plate-horizontal-rule-30.5.3.tgz", - "integrity": "sha512-qsAnS9eW/REH+fXXWUy8O27VhYOEFRMhMlXIp83dIDKP2BtXeR2JeVHdM2wa5oEo+3G7o7Qy2DS5Yg51A3wu/Q==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-indent": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-indent/-/plate-indent-30.5.3.tgz", - "integrity": "sha512-39V7egkg0Gk0z5nKveAh6gipeH12MQdtSzGphGtpLQqyMF+d+eOLsaZDJsO0XfZlkDTeonA8cDr5ZWERc9SHXQ==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-heading/-/plate-heading-31.0.0.tgz", + "integrity": "sha512-TA9hc1sydRiLykqfJ5FmdYkLNpVkMxY7u0YL1QVOTQLCXYPbJVNuQ1vUsFxsU3mmqGb/J5Xsu87kLRHSnRQR0A==", "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-indent-list": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-indent-list/-/plate-indent-list-30.5.3.tgz", - "integrity": "sha512-j9UYOdGf8Qif3X6uMaZrV1yildC9CJSrN4jpscFy5T+80g0ysnb7g6cv4R1FNBzTT6tth3FM7cXacbIuyK7DSQ==", - "dependencies": { - "@udecode/plate-indent": "30.5.3", - "@udecode/plate-list": "30.5.3", - "clsx": "^1.2.1" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-kbd": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-kbd/-/plate-kbd-30.5.3.tgz", - "integrity": "sha512-pPpNbrBAIF6mSTRzR1/WcT0xUS4g/9MmGufAdm8FpFogR6N8CVGZRylqCdx+i0IDHjKHy4mkMLDUP/HVUuWnmQ==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-line-height": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-line-height/-/plate-line-height-30.5.3.tgz", - "integrity": "sha512-8y329FUhLcEJQf11+JDs26YCAgH6qhMAEVHwvtQuZKfonHRSFabzkt13f61b2uRZ7piqz8fYWJCEXwGLaPYevA==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8180,15 +7902,15 @@ } }, "node_modules/@udecode/plate-link": { - "version": "30.9.4", - "resolved": "https://registry.npmjs.org/@udecode/plate-link/-/plate-link-30.9.4.tgz", - "integrity": "sha512-aBVOPNeI62nzzDFSCxj3NDdpn1XsmsOpcdAleG4ZrtB9o4ndTXDTN1m0NumComk7KPRFAod7NWOuo7KwNMK6JQ==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-link/-/plate-link-31.0.0.tgz", + "integrity": "sha512-607injR8Bf5Tek4LIjjcuPoDDFMq0i+3cuX1AlIsqbwqZH3gffQZ700OKhisy17bu8SD9aqAgiCfKKlHXM4cdA==", "dependencies": { - "@udecode/plate-floating": "30.5.3", - "@udecode/plate-normalizers": "30.5.3" + "@udecode/plate-floating": "31.0.0", + "@udecode/plate-normalizers": "31.0.0" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8198,66 +7920,15 @@ } }, "node_modules/@udecode/plate-list": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-list/-/plate-list-30.5.3.tgz", - "integrity": "sha512-Q6c1hE4oAZp3OkJzoeRIp+ULKcugsNx0Eh4o/yKyWJAx/DzZNPJyuuAyClA9nZMdWv96UAjvEZ75Em3BcFtTwg==", + "version": "31.1.3", + "resolved": "https://registry.npmjs.org/@udecode/plate-list/-/plate-list-31.1.3.tgz", + "integrity": "sha512-TjD5JeKsuzsdSkepgjFMDcJsB6BHdowO/ppHLxUCge74RwPVF7U97HPc7oEtx+OLsrC13gkbpZvwLHfdCy9dDQ==", "dependencies": { - "@udecode/plate-reset-node": "30.5.3", + "@udecode/plate-reset-node": "31.0.0", "lodash": "^4.17.21" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-media": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-media/-/plate-media-30.5.3.tgz", - "integrity": "sha512-cO4o+257oDMqOtgLMgFxUbFLWov+HUi8GXpd6NbUxPkoGUw24vo3or6Wni+X3DlUJQF0Do5/g9bwZlQcT1IZGw==", - "dependencies": { - "js-video-url-parser": "^0.5.1" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-mention": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-mention/-/plate-mention-30.5.3.tgz", - "integrity": "sha512-OvlgSaHT39dxSRgjS9NsEvbduNbuTWG4KLoEHFJpFgJmGwrVmcPR/AuCpHLiTlDixHVWHJjisp+/imF1eJolQQ==", - "dependencies": { - "@udecode/plate-combobox": "30.5.3" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-node-id": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-node-id/-/plate-node-id-30.5.3.tgz", - "integrity": "sha512-4Dho3kuW/SZWBA5kKzuAaupJbRVMKq8Et0LXWbV3qO5/XtCGsOVZtOaeeIldplLXvYYQp3GN/NqGF6GGdwDziQ==", - "dependencies": { - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8267,14 +7938,14 @@ } }, "node_modules/@udecode/plate-normalizers": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-normalizers/-/plate-normalizers-30.5.3.tgz", - "integrity": "sha512-jf8H5OPPLEYgaoQ0pyHZfSXwzZBxI959BxHy83Y1wvhB5Yykgc8NflNGme3ds/rMED3z90E7QOCL2h1waHNtNQ==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-normalizers/-/plate-normalizers-31.0.0.tgz", + "integrity": "sha512-4HD39jOgv5Hf8sQqXtZdQLcWYHToXGjBPFU33pYHbEBmxEN9cd5ndxRTCnoOspI9HJMkpu0OzrhUfhLvoPDP4w==", "dependencies": { "lodash": "^4.17.21" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8284,11 +7955,11 @@ } }, "node_modules/@udecode/plate-paragraph": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-paragraph/-/plate-paragraph-30.5.3.tgz", - "integrity": "sha512-vqvN6Gex1aj189C3ohuq85g6reajYqJMFb4CETGqUTifmKw0ReeJ6a8OYhNqX7v2xE+4gEBm+Z8qO3Z3CnoHqw==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-paragraph/-/plate-paragraph-31.0.0.tgz", + "integrity": "sha512-uuaksPfDhK5ShVhjZ0pbXlUgy5nKKDkXzrAfDEZJzwF1R2N0HTy2WcmNJFm+aN8ZUFbZ4MHBuUUldZc/aLuCqw==", "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8298,39 +7969,11 @@ } }, "node_modules/@udecode/plate-reset-node": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-reset-node/-/plate-reset-node-30.5.3.tgz", - "integrity": "sha512-bBUnE3uMw+jp7zAaZtagCRB9WpBZxJfLdhc1YdqwU1Hmqqy4l0GaH4/oq2QtnN8DtZnOV/PkJlus8tgsP3yzjg==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-resizable": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-resizable/-/plate-resizable-30.5.3.tgz", - "integrity": "sha512-fBsWIA8JHDCH8Q7NHkhu300rVTMM8ELcAT/MAD+FyILiLdtYNWA/o9nncjc7HRpyLvsrEKDN2PPCTizKUeaf2Q==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-select": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-select/-/plate-select-30.5.3.tgz", - "integrity": "sha512-cVWqikhiwMOBI7IQOCL/vi8HzR4lDfGnlGfeRl4nE6XqbCEmydtKsXzKbsUmxDIv0AhTPgAhWoRjYEv/S7Yoag==", + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-reset-node/-/plate-reset-node-31.0.0.tgz", + "integrity": "sha512-pIdexCNsJx21UHeHrDxeOTS2w0NfthCD5klZGiiKBkU+sd65btmyY1fEQmlVaaeqWKzYCXai2ctSlRAycBV7wA==", "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8339,83 +7982,12 @@ "slate-react": ">=0.99.0" } }, - "node_modules/@udecode/plate-serializer-csv": { - "version": "30.9.4", - "resolved": "https://registry.npmjs.org/@udecode/plate-serializer-csv/-/plate-serializer-csv-30.9.4.tgz", - "integrity": "sha512-kPiHT84/HzUsqZMLajOWYNUPnKremtvGlHrsl5vt9KwMjih7WPPHxsjimfFyE1m0vc97lPdGqDBaxFRD+lxWFA==", - "dependencies": { - "@udecode/plate-table": "30.9.4", - "papaparse": "^5.4.1" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-serializer-docx": { - "version": "30.9.4", - "resolved": "https://registry.npmjs.org/@udecode/plate-serializer-docx/-/plate-serializer-docx-30.9.4.tgz", - "integrity": "sha512-pKNc/HVOO4sOhRlSmG8Ukvyd7A2mG+3NGDGHcTtjnJOitDIb3809aMeMWZvMSCIE7bAljYu3RjAO2righw9l/Q==", - "dependencies": { - "@udecode/plate-heading": "30.5.3", - "@udecode/plate-indent": "30.5.3", - "@udecode/plate-indent-list": "30.5.3", - "@udecode/plate-media": "30.5.3", - "@udecode/plate-paragraph": "30.5.3", - "@udecode/plate-table": "30.9.4", - "validator": "^13.9.0" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-serializer-html": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-serializer-html/-/plate-serializer-html-30.5.3.tgz", - "integrity": "sha512-RESODsZPLiv5efaoOfWph+4+1JPIwNJzhSpqPK7L9TX/wO4M5W8CY9F9IXtdftpn/Xt+WOX1ApPt+7xEWeCQLA==", - "dependencies": { - "html-entities": "^2.4.0" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-serializer-md": { - "version": "30.9.4", - "resolved": "https://registry.npmjs.org/@udecode/plate-serializer-md/-/plate-serializer-md-30.9.4.tgz", - "integrity": "sha512-ah6ccXZ9oTlJ7uUeJEFeS5LCBNG1thCnrPvTmwDjoSqaFFFm/ifHAafRqsREN1vW4yqTRILCOuDVDG2ciccNXg==", - "dependencies": { - "@udecode/plate-basic-marks": "30.5.3", - "@udecode/plate-block-quote": "30.5.3", - "@udecode/plate-code-block": "30.7.0", - "@udecode/plate-heading": "30.5.3", - "@udecode/plate-horizontal-rule": "30.5.3", - "@udecode/plate-link": "30.9.4", - "@udecode/plate-list": "30.5.3", - "@udecode/plate-media": "30.5.3", - "@udecode/plate-paragraph": "30.5.3", - "remark-parse": "^9.0.0", - "unified": "^9.2.2" - }, + "node_modules/@udecode/plate-trailing-block": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/plate-trailing-block/-/plate-trailing-block-31.0.0.tgz", + "integrity": "sha512-vW4BEP3rp9wbEf1ntDcKcAN95ve6ZbO7lLgh9lUBXMVLEvbfcruamXOdMPRYAosokdPF/U+HeNqKtPhkngAMdw==", "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", + "@udecode/plate-common": ">=31.0.0", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8424,75 +7996,21 @@ "slate-react": ">=0.99.0" } }, - "node_modules/@udecode/plate-serializer-md/node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "engines": { - "node": ">=4" - } - }, - "node_modules/@udecode/plate-serializer-md/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@udecode/plate-serializer-md/node_modules/remark-parse": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", - "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", - "dependencies": { - "mdast-util-from-markdown": "^0.8.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/@udecode/plate-serializer-md/node_modules/unified": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", - "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", - "dependencies": { - "bail": "^1.0.0", - "extend": "^3.0.0", - "is-buffer": "^2.0.0", - "is-plain-obj": "^2.0.0", - "trough": "^1.0.0", - "vfile": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/@udecode/plate-suggestion": { - "version": "30.9.0", - "resolved": "https://registry.npmjs.org/@udecode/plate-suggestion/-/plate-suggestion-30.9.0.tgz", - "integrity": "sha512-Ca1el7ei+pvm1SAh6nIgUQbH4cNpoi3nfkQFvAg96V2G+Yn9dBBcHIJ6w/971hgJ7Lp7tzGaUdlwfCjjdO1J5Q==", - "dependencies": { - "@udecode/plate-diff": "30.9.0", + "node_modules/@udecode/plate-utils": { + "version": "31.3.2", + "resolved": "https://registry.npmjs.org/@udecode/plate-utils/-/plate-utils-31.3.2.tgz", + "integrity": "sha512-IedyGPqF/yrSjc1ODBSM5xZXC5yPORyqq5vFlk+uNV4khPMDer2PMGnv5se6yVQhSMdAN81gLtlFKONDKIjAjQ==", + "dependencies": { + "@udecode/plate-core": "31.3.2", + "@udecode/react-utils": "31.0.0", + "@udecode/slate": "31.0.0", + "@udecode/slate-react": "31.0.0", + "@udecode/slate-utils": "31.3.2", + "@udecode/utils": "31.0.0", + "clsx": "^1.2.1", "lodash": "^4.17.21" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", @@ -8501,103 +8019,61 @@ "slate-react": ">=0.99.0" } }, - "node_modules/@udecode/plate-tabbable": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-tabbable/-/plate-tabbable-30.5.3.tgz", - "integrity": "sha512-NJaVPOjjG20MPjbvpPmPdYZKkzMF2f7xZKdjpOPMd6SpgvtvV4Cs7iIRDONT6i/i/zyG7tmdSekEOm9Ifxg40w==", + "node_modules/@udecode/plate-utils/node_modules/@udecode/react-utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/react-utils/-/react-utils-31.0.0.tgz", + "integrity": "sha512-zvXVIOELvKeizFK9a7nCBGizH/tO7EFOl4N7YSL8fUrd6SZPIoHTNEZg5YKC3bcdB7LUoBno1BJOcWOZDHE5SA==", "dependencies": { - "tabbable": "^6.2.0" + "@radix-ui/react-slot": "^1.0.2", + "@udecode/utils": "31.0.0", + "clsx": "^1.2.1" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" + "react-dom": ">=16.8.0" } }, - "node_modules/@udecode/plate-table": { - "version": "30.9.4", - "resolved": "https://registry.npmjs.org/@udecode/plate-table/-/plate-table-30.9.4.tgz", - "integrity": "sha512-53Y2Iu4QbKuvUkuvijmG+758x+gylwdvv0g04w++k061MEjOc0JkVBbsz6Otv4h5vWTbXX2tLooTZK05NyX/Jw==", - "dependencies": { - "@udecode/plate-resizable": "30.5.3", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-react": ">=0.99.0" - } + "node_modules/@udecode/plate-utils/node_modules/@udecode/utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/utils/-/utils-31.0.0.tgz", + "integrity": "sha512-06JTl1UAm3mzLLAx8hdMUFw4XRQG727z9JoJ9PeBnmFb9q4Cg3DdmbFnhVJMrBPWlyOwoHtPrBjnanTFeiP36Q==" }, - "node_modules/@udecode/plate-toggle": { - "version": "30.9.2", - "resolved": "https://registry.npmjs.org/@udecode/plate-toggle/-/plate-toggle-30.9.2.tgz", - "integrity": "sha512-yY/JtDN+P66T9QjLoYJxIfITe3QEpjkSBCowRc0dhOIBTXlcownktmGpiSSQfbFSHAo5XSzO4JJoDodTkW/xGg==", + "node_modules/@udecode/slate": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/slate/-/slate-31.0.0.tgz", + "integrity": "sha512-VK84em/ZQYgu2PnXBLG8ON47n3DAZZL//yA3oWs4J3hTg92UTXpizNZiwk9iA+mb+xcRomwuWwpTUCyE8VI3rQ==", "dependencies": { - "@udecode/plate-indent": "30.5.3", - "@udecode/plate-node-id": "30.5.3", - "lodash": "^4.17.21" + "@udecode/utils": "31.0.0" }, "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" - } - }, - "node_modules/@udecode/plate-trailing-block": { - "version": "30.5.3", - "resolved": "https://registry.npmjs.org/@udecode/plate-trailing-block/-/plate-trailing-block-30.5.3.tgz", - "integrity": "sha512-0Vzt2cVXFlFy8gwoFxnTTW8knd7cKt4LFhETXUlVOzPQk0crRZ4s+I/oENwzUQ9v/iF5dsUQ5Tn2MTUJjCn1NQ==", - "peerDependencies": { - "@udecode/plate-common": ">=30.4.5 < 31", - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", - "slate-react": ">=0.99.0" + "slate-history": ">=0.93.0" } }, - "node_modules/@udecode/plate-utils": { - "version": "30.4.5", - "resolved": "https://registry.npmjs.org/@udecode/plate-utils/-/plate-utils-30.4.5.tgz", - "integrity": "sha512-cJ0auswNFxhv/qF9yqrIbgPa3mqxWtLtBQ/N+1zqMfEM3vzWE+4WlHpMJb/SdAC/Dvuc5zzfB26/t2IyhrZp5w==", - "dependencies": { - "@udecode/plate-core": "30.4.5", - "@udecode/react-utils": "29.0.1", - "@udecode/slate": "25.0.0", - "@udecode/slate-react": "29.0.1", - "@udecode/slate-utils": "25.0.0", - "@udecode/utils": "24.3.0", - "clsx": "^1.2.1", - "lodash": "^4.17.21" + "node_modules/@udecode/slate-react": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/slate-react/-/slate-react-31.0.0.tgz", + "integrity": "sha512-+xYLSZO7u9KrJoCY88udFVT29fp4waX0mFM+gmhd10Kfb/l5xB5yt5248PCqbkehwb93TBntODXtbQzmwNFkag==", + "dependencies": { + "@udecode/react-utils": "31.0.0", + "@udecode/slate": "31.0.0", + "@udecode/utils": "31.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0", "slate": ">=0.94.0", "slate-history": ">=0.93.0", - "slate-hyperscript": ">=0.66.0", "slate-react": ">=0.99.0" } }, - "node_modules/@udecode/react-utils": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@udecode/react-utils/-/react-utils-29.0.1.tgz", - "integrity": "sha512-+bFJFTDsWArFaC4AZFap0VdCvEbu5ZA16avj4xjjdBBho4TiHOZ7RMDliwTUetA3DOm5LG02dmZ1U4ORNC0m3w==", + "node_modules/@udecode/slate-react/node_modules/@udecode/react-utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/react-utils/-/react-utils-31.0.0.tgz", + "integrity": "sha512-zvXVIOELvKeizFK9a7nCBGizH/tO7EFOl4N7YSL8fUrd6SZPIoHTNEZg5YKC3bcdB7LUoBno1BJOcWOZDHE5SA==", "dependencies": { "@radix-ui/react-slot": "^1.0.2", - "@udecode/utils": "24.3.0", + "@udecode/utils": "31.0.0", "clsx": "^1.2.1" }, "peerDependencies": { @@ -8605,42 +8081,18 @@ "react-dom": ">=16.8.0" } }, - "node_modules/@udecode/slate": { - "version": "25.0.0", - "resolved": "https://registry.npmjs.org/@udecode/slate/-/slate-25.0.0.tgz", - "integrity": "sha512-mGb9nMDwIygLqERwJ8kTOfo3wIxMQ0xLJEPKn09jrshEIxUCyO3mYj8y/5vOMcrzj6yexOsgQ6VNX8ylS3lnIQ==", - "dependencies": { - "@udecode/utils": "24.3.0" - }, - "peerDependencies": { - "slate": ">=0.94.0", - "slate-history": ">=0.93.0" - } - }, - "node_modules/@udecode/slate-react": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@udecode/slate-react/-/slate-react-29.0.1.tgz", - "integrity": "sha512-DOiGXxfL43tVyNg0LneTQGQBW/HkF2srwIM8b0Al/x082HHfo2PP2WkFqPqTh1uGUAa2RBRh9xFKmNkKeuyWSw==", - "dependencies": { - "@udecode/react-utils": "29.0.1", - "@udecode/slate": "25.0.0", - "@udecode/utils": "24.3.0" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "slate": ">=0.94.0", - "slate-history": ">=0.93.0", - "slate-react": ">=0.99.0" - } + "node_modules/@udecode/slate-react/node_modules/@udecode/utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/utils/-/utils-31.0.0.tgz", + "integrity": "sha512-06JTl1UAm3mzLLAx8hdMUFw4XRQG727z9JoJ9PeBnmFb9q4Cg3DdmbFnhVJMrBPWlyOwoHtPrBjnanTFeiP36Q==" }, "node_modules/@udecode/slate-utils": { - "version": "25.0.0", - "resolved": "https://registry.npmjs.org/@udecode/slate-utils/-/slate-utils-25.0.0.tgz", - "integrity": "sha512-H8dECl5Tu44Nt946rkSXCJ1yzsc2R9GXSoA9oNIBmcyNo3jTHZOyG/Ocn3RGgfzAK996A43GBD/keNabJEPtQg==", + "version": "31.3.2", + "resolved": "https://registry.npmjs.org/@udecode/slate-utils/-/slate-utils-31.3.2.tgz", + "integrity": "sha512-ziQN60VItE9GHE7B8+sBnXFJ3P8bVJhfYA0TiwBtjRSoyUWIglUwCbFSBP+QsHmsNp8m+YztPavK6djjczD30Q==", "dependencies": { - "@udecode/slate": "25.0.0", - "@udecode/utils": "24.3.0", + "@udecode/slate": "31.0.0", + "@udecode/utils": "31.0.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -8648,10 +8100,15 @@ "slate-history": ">=0.93.0" } }, - "node_modules/@udecode/utils": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/@udecode/utils/-/utils-24.3.0.tgz", - "integrity": "sha512-/Y2lh/Ih1wx4zN35Ky2Z1G1/5f7cSAS7F6dkhrcbJUnDF0srTidoEIRabK+og/yIK/MCEFfOsQGetoV7Ert5hg==" + "node_modules/@udecode/slate-utils/node_modules/@udecode/utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/utils/-/utils-31.0.0.tgz", + "integrity": "sha512-06JTl1UAm3mzLLAx8hdMUFw4XRQG727z9JoJ9PeBnmFb9q4Cg3DdmbFnhVJMrBPWlyOwoHtPrBjnanTFeiP36Q==" + }, + "node_modules/@udecode/slate/node_modules/@udecode/utils": { + "version": "31.0.0", + "resolved": "https://registry.npmjs.org/@udecode/utils/-/utils-31.0.0.tgz", + "integrity": "sha512-06JTl1UAm3mzLLAx8hdMUFw4XRQG727z9JoJ9PeBnmFb9q4Cg3DdmbFnhVJMrBPWlyOwoHtPrBjnanTFeiP36Q==" }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", @@ -11830,11 +11287,6 @@ "dev": true, "license": "MIT" }, - "node_modules/compute-scroll-into-view": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz", - "integrity": "sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==" - }, "node_modules/concat-map": { "version": "0.0.1", "license": "MIT" @@ -14087,26 +13539,6 @@ "node": ">=12" } }, - "node_modules/downshift": { - "version": "6.1.12", - "resolved": "https://registry.npmjs.org/downshift/-/downshift-6.1.12.tgz", - "integrity": "sha512-7XB/iaSJVS4T8wGFT3WRXmSF1UlBHAA40DshZtkrIscIN+VC+Lh363skLxFTvJwtNgHxAMDGEHT4xsyQFWL+UA==", - "dependencies": { - "@babel/runtime": "^7.14.8", - "compute-scroll-into-view": "^1.0.17", - "prop-types": "^15.7.2", - "react-is": "^17.0.2", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "react": ">=16.12.0" - } - }, - "node_modules/downshift/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" - }, "node_modules/duplexer": { "version": "0.1.2", "license": "MIT" @@ -16856,7 +16288,10 @@ } }, "node_modules/html-entities": { - "version": "2.4.0", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", + "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", + "dev": true, "funding": [ { "type": "github", @@ -16866,8 +16301,7 @@ "type": "patreon", "url": "https://patreon.com/mdevils" } - ], - "license": "MIT" + ] }, "node_modules/html-escaper": { "version": "2.0.2", @@ -18835,9 +18269,9 @@ } }, "node_modules/jotai": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/jotai/-/jotai-2.7.1.tgz", - "integrity": "sha512-bsaTPn02nFgWNP6cBtg/htZhCu4s0wxqoklRHePp6l/vlsypR9eLn7diRliwXYWMXDpPvW/LLA2afI8vwgFFaw==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/jotai/-/jotai-2.7.2.tgz", + "integrity": "sha512-6Ft5kpNu8p93Ssf1Faoza3hYQZRIYp7rioK8MwTTFnbQKwUyZElwquPwl1h6U0uo9hC0jr+ghO3gcSjc6P35/Q==", "engines": { "node": ">=12.20.0" }, @@ -18855,9 +18289,9 @@ } }, "node_modules/jotai-optics": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/jotai-optics/-/jotai-optics-0.3.1.tgz", - "integrity": "sha512-KibUx9IneM2hGWGIYGs/v0KCxU985lg7W2c6dt5RodJCB2XPbmok8rkkLmdVk9+fKsn2shkPMi+AG8XzHgB3+w==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/jotai-optics/-/jotai-optics-0.3.2.tgz", + "integrity": "sha512-RH6SvqU5hmkVqnHmaqf9zBXvIAs4jLxkDHS4fr5ljuBKHs8+HQ02v+9hX7ahTppxx6dUb0GGUE80jQKJ0kFTLw==", "peerDependencies": { "jotai": ">=1.11.0", "optics-ts": "*" @@ -18897,11 +18331,6 @@ "version": "4.0.0", "license": "MIT" }, - "node_modules/js-video-url-parser": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/js-video-url-parser/-/js-video-url-parser-0.5.1.tgz", - "integrity": "sha512-/vwqT67k0AyIGMHAvSOt+n4JfrZWF7cPKgKswDO35yr27GfW4HtjpQVlTx6JLF45QuPm8mkzFHkZgFVnFm4x/w==" - }, "node_modules/js-yaml": { "version": "4.1.0", "license": "MIT", @@ -21607,14 +21036,15 @@ "license": "ISC" }, "node_modules/nanoid": { - "version": "3.3.6", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -26786,11 +26216,6 @@ "version": "1.0.11", "license": "(MIT AND Zlib)" }, - "node_modules/papaparse": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz", - "integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==" - }, "node_modules/parent-module": { "version": "1.0.1", "license": "MIT", @@ -27478,14 +26903,6 @@ "node": ">= 0.8" } }, - "node_modules/prismjs": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", - "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", - "engines": { - "node": ">=6" - } - }, "node_modules/proc-log": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", @@ -33154,14 +32571,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/value-equal": { "version": "1.0.1", "license": "MIT" @@ -35176,14 +34585,22 @@ "version": "3.1.0", "license": "MIT", "dependencies": { - "@udecode/cn": "^29.0.1", - "@udecode/plate": "^30.5.0", + "@udecode/plate-basic-marks": "^31.0.0", + "@udecode/plate-block-quote": "^31.0.0", + "@udecode/plate-break": "^31.0.0", + "@udecode/plate-common": "^31.0.0", + "@udecode/plate-heading": "^31.0.0", + "@udecode/plate-link": "^31.0.0", + "@udecode/plate-list": "^31.1.3", + "@udecode/plate-paragraph": "^31.0.0", + "@udecode/plate-trailing-block": "^31.0.0", "class-variance-authority": "^0.7.0", "lucide-react": "^0.331.0", "slate": "^0.102.0", "slate-history": "^0.100.0", "slate-hyperscript": "^0.100.0", - "slate-react": "^0.102.0" + "slate-react": "^0.102.0", + "unified": "^9.0.0" }, "peerDependencies": { "@emotion/react": "^11.11.1", @@ -35197,6 +34614,36 @@ "react-immutable-proptypes": "^2.1.0" } }, + "packages/decap-cms-widget-richtext/node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "packages/decap-cms-widget-richtext/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, "packages/decap-cms-widget-richtext/node_modules/slate-hyperscript": { "version": "0.100.0", "resolved": "https://registry.npmjs.org/slate-hyperscript/-/slate-hyperscript-0.100.0.tgz", @@ -35208,6 +34655,23 @@ "slate": ">=0.65.3" } }, + "packages/decap-cms-widget-richtext/node_modules/unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "packages/decap-cms-widget-select": { "version": "3.1.1", "license": "MIT", diff --git a/packages/decap-cms-widget-richtext/package.json b/packages/decap-cms-widget-richtext/package.json index d70fe69792ff..8a1fe45b8b36 100644 --- a/packages/decap-cms-widget-richtext/package.json +++ b/packages/decap-cms-widget-richtext/package.json @@ -21,14 +21,22 @@ "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward --copy-files --extensions \".js,.jsx,.ts,.tsx\"" }, "dependencies": { - "@udecode/cn": "^29.0.1", - "@udecode/plate": "^30.5.0", + "@udecode/plate-common": "^31.0.0", + "@udecode/plate-basic-marks": "^31.0.0", + "@udecode/plate-block-quote": "^31.0.0", + "@udecode/plate-break": "^31.0.0", + "@udecode/plate-heading": "^31.0.0", + "@udecode/plate-link": "^31.0.0", + "@udecode/plate-list": "^31.1.3", + "@udecode/plate-paragraph": "^31.0.0", + "@udecode/plate-trailing-block": "^31.0.0", "class-variance-authority": "^0.7.0", "lucide-react": "^0.331.0", "slate": "^0.102.0", "slate-history": "^0.100.0", "slate-hyperscript": "^0.100.0", - "slate-react": "^0.102.0" + "slate-react": "^0.102.0", + "unified": "^9.0.0" }, "peerDependencies": { "@emotion/react": "^11.11.1", diff --git a/packages/decap-cms-widget-richtext/src/RichtextControl/VisualEditor.js b/packages/decap-cms-widget-richtext/src/RichtextControl/VisualEditor.js index 6d3e41fe10ff..a74cadbee122 100644 --- a/packages/decap-cms-widget-richtext/src/RichtextControl/VisualEditor.js +++ b/packages/decap-cms-widget-richtext/src/RichtextControl/VisualEditor.js @@ -38,6 +38,7 @@ import ListElement from './components/Element/ListElement'; import { markdownToSlate, slateToMarkdown } from '../serializers'; import LinkElement from './components/Element/LinkElement'; import BlockquoteElement from './components/Element/BlockquoteElement'; +import createBlockquoteExtPlugin from './plugins/createBlockquoteExitBreak'; function visualEditorStyles({ minimal }) { return ` @@ -63,6 +64,7 @@ const emptyValue = [ ]; export default function VisualEditor({ t, field, className, isDisabled, onChange, ...props }) { + console.log('plff', createBlockquotePlugin()) const plugins = createPlugins( [ createParagraphPlugin(), @@ -73,6 +75,7 @@ export default function VisualEditor({ t, field, className, isDisabled, onChange createListPlugin(), createLinkPlugin(), createBlockquotePlugin(), + createBlockquoteExtPlugin(), createSoftBreakPlugin({ options: { rules: [ diff --git a/packages/decap-cms-widget-richtext/src/RichtextControl/components/Toolbar/BlockquoteToolbarButton.js b/packages/decap-cms-widget-richtext/src/RichtextControl/components/Toolbar/BlockquoteToolbarButton.js index 0b8f145b6f8c..08686f3adbbd 100644 --- a/packages/decap-cms-widget-richtext/src/RichtextControl/components/Toolbar/BlockquoteToolbarButton.js +++ b/packages/decap-cms-widget-richtext/src/RichtextControl/components/Toolbar/BlockquoteToolbarButton.js @@ -1,6 +1,7 @@ import React from 'react'; -import { useEditorRef, focusEditor, toggleNodeType } from '@udecode/plate-common'; +import { useEditorRef, focusEditor } from '@udecode/plate-common'; import { unwrapList } from '@udecode/plate-list'; +import { toggleWrapNodes } from '@udecode/slate-utils'; import { ELEMENT_BLOCKQUOTE } from '@udecode/plate-block-quote'; import ToolbarButton from './ToolbarButton'; @@ -10,7 +11,7 @@ function BlockquoteToolbarButton(props) { function handleClick() { unwrapList(editor); - toggleNodeType(editor, { activeType: ELEMENT_BLOCKQUOTE }); + toggleWrapNodes(editor, ELEMENT_BLOCKQUOTE); focusEditor(editor); } const pressed = false; diff --git a/packages/decap-cms-widget-richtext/src/RichtextControl/plugins/createBlockquoteExitBreak.js b/packages/decap-cms-widget-richtext/src/RichtextControl/plugins/createBlockquoteExitBreak.js new file mode 100644 index 000000000000..d649e95c9765 --- /dev/null +++ b/packages/decap-cms-widget-richtext/src/RichtextControl/plugins/createBlockquoteExitBreak.js @@ -0,0 +1,55 @@ +import { + createPluginFactory, + getBlockAbove, + isHotkey, + isAncestorEmpty, + unwrapNodes, + isFirstChild, +} from '@udecode/plate-common'; +import { ELEMENT_BLOCKQUOTE } from '@udecode/plate-block-quote'; + +export const KEY_BLOCKQUOTE_EXIT_BREAK = 'blockquoteExitBreakPlugin'; + +function isWithinBlockquote(editor, entry) { + const blockAbove = getBlockAbove(editor, { at: entry[1] }); + return blockAbove?.[0]?.type === ELEMENT_BLOCKQUOTE; +} + +function unwrap(editor) { + unwrapNodes(editor, { split: true, match: n => n.type === ELEMENT_BLOCKQUOTE }); + return true; +} + +function onKeyDownBlockquoteExitBreak(editor, { options: { rules } }) { + return event => { + if (event.defaultPrevented) return; + + const entry = getBlockAbove(editor); + if (!entry) return; + + rules.forEach(({ hotkey, isFirstParagraph }) => { + if ( + isHotkey(hotkey, event) && + isAncestorEmpty(editor, entry[0]) && + isWithinBlockquote(editor, entry) && + (!isFirstParagraph || isFirstChild(entry[1])) && + unwrap(editor) + ) { + event.preventDefault(); + event.stopPropagation(); + } + }); + }; +} + +const createBlockquoteExtPlugin = createPluginFactory({ + key: KEY_BLOCKQUOTE_EXIT_BREAK, + handlers: { + onKeyDown: onKeyDownBlockquoteExitBreak, + }, + options: { + rules: [{ hotkey: 'enter' }, { hotkey: 'backspace', isFirstParagraph: true }], + }, +}); + +export default createBlockquoteExtPlugin;