Skip to content

Commit 73eee1e

Browse files
committed
Updated BlockNote imports
1 parent 1475ef5 commit 73eee1e

File tree

4 files changed

+28
-82
lines changed

4 files changed

+28
-82
lines changed

src/frontend/apps/impress/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"dependencies": {
1818
"@ag-media/react-pdf-table": "2.0.3",
1919
"@blocknote/code-block": "0.31.1",
20-
"blocknote/core": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1736",
20+
"@blocknote/core": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1736",
2121
"@blocknote/mantine": "0.31.1",
22-
"blocknote/react": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1736",
22+
"@blocknote/react": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1736",
2323
"@blocknote/xl-docx-exporter": "0.31.1",
2424
"@blocknote/xl-pdf-exporter": "0.31.1",
2525
"@emoji-mart/data": "1.2.1",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './DocEditor';
22
export * from './custom-blocks/';
3+
export * from './custom-inline-content/';

src/frontend/apps/impress/src/features/docs/doc-editor/components/slash-menu-items/getBibliographyReactSlashMenuItems.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ import {
44
BlockSchema,
55
InlineContentSchema,
66
StyleSchema,
7+
checkBlockTypeInSchema,
8+
checkInlineContentTypeInSchema,
79
} from '@blocknote/core';
810
import { DefaultReactSuggestionItem } from '@blocknote/react';
911

12+
import { bibliographyBlockConfig, referenceInlineContentConfig } from '..';
13+
14+
1015
export const getBibliographyReactSlashMenuItems = <
1116
B extends BlockSchema,
1217
I extends InlineContentSchema,
@@ -17,12 +22,11 @@ export const getBibliographyReactSlashMenuItems = <
1722
const items: DefaultReactSuggestionItem[] = [];
1823

1924
if (
20-
// checkInlineContentTypeInSchema(
21-
// 'reference',
22-
// referenceInlineContentConfig,
23-
// editor,
24-
// )
25-
true
25+
checkInlineContentTypeInSchema(
26+
'reference',
27+
referenceInlineContentConfig,
28+
editor,
29+
)
2630
) {
2731
items.push({
2832
title: 'Reference',
@@ -34,17 +38,17 @@ export const getBibliographyReactSlashMenuItems = <
3438
editor.insertInlineContent([
3539
{
3640
type: 'reference',
37-
} as any,
41+
},
3842
]);
3943
},
4044
});
4145
}
4246

43-
// const bibliographyBlockInSchema = checkBlockTypeInSchema(
44-
// 'bibliography',
45-
// bibliographyBlockConfig,
46-
// editor,
47-
// );
47+
const bibliographyBlockInSchema = checkBlockTypeInSchema(
48+
'bibliography',
49+
bibliographyBlockConfig,
50+
editor,
51+
);
4852
let bibliographyBlockAlreadyExists = false;
4953
editor.forEachBlock((block) => {
5054
if (block.type === 'bibliography') {
@@ -54,7 +58,7 @@ export const getBibliographyReactSlashMenuItems = <
5458
return true;
5559
});
5660

57-
if (!bibliographyBlockAlreadyExists) {
61+
if (bibliographyBlockInSchema && !bibliographyBlockAlreadyExists) {
5862
items.push({
5963
title: 'Bibliography',
6064
subtext: 'Insert a bibliography block',

src/frontend/yarn.lock

Lines changed: 8 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,10 +1015,9 @@
10151015
"@shikijs/themes" "^3.2.1"
10161016
"@shikijs/types" "^3.2.1"
10171017

1018-
"@blocknote/[email protected]":
1018+
"@blocknote/[email protected]", "@blocknote/core@https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1736":
10191019
version "0.31.1"
1020-
resolved "https://registry.yarnpkg.com/@blocknote/core/-/core-0.31.1.tgz#81f16aa0b7d056fb6f934072db1bd04e2b64981a"
1021-
integrity sha512-EGRYksdz1MxgqlmLzvhjWZvwL2Q8iiWY8tbXTBcYSEMyEdxWM5t4v2lcfTuuZuz8wInMR/c7MW8ymlzoYxrBZA==
1020+
resolved "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1736#e91b45255a8ae0deef7fe7d6f4d8dad3d6d4658b"
10221021
dependencies:
10231022
"@emoji-mart/data" "^1.2.1"
10241023
"@shikijs/types" "3.2.1"
@@ -1060,9 +1059,10 @@
10601059
y-protocols "^1.0.6"
10611060
yjs "^13.6.15"
10621061

1063-
"@blocknote/core@https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@d5997ba42e85757818da855d2d5826616ed3111a":
1062+
"@blocknote/core@https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@f10e27b362ed238336cdeade7cca46aefa278860":
10641063
version "0.31.1"
1065-
resolved "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@d5997ba42e85757818da855d2d5826616ed3111a#897ece632650df1006e2413a56e6143878b96599"
1064+
uid e91b45255a8ae0deef7fe7d6f4d8dad3d6d4658b
1065+
resolved "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@f10e27b362ed238336cdeade7cca46aefa278860#e91b45255a8ae0deef7fe7d6f4d8dad3d6d4658b"
10661066
dependencies:
10671067
"@emoji-mart/data" "^1.2.1"
10681068
"@shikijs/types" "3.2.1"
@@ -1116,12 +1116,11 @@
11161116
"@mantine/utils" "^6.0.21"
11171117
react-icons "^5.2.1"
11181118

1119-
"@blocknote/[email protected]":
1119+
"@blocknote/[email protected]", "@blocknote/react@https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1736":
11201120
version "0.31.1"
1121-
resolved "https://registry.yarnpkg.com/@blocknote/react/-/react-0.31.1.tgz#f6fc384777c395f5aa0e2707e43d2bfb9219c041"
1122-
integrity sha512-S7Edl+eQjRf+2/iBHayjzOGSyjPDz4hsMbnLL8H+tl5XbE93u6KrBKkYEqU+yij6uKMounftrpxzdBY2UFgyiQ==
1121+
resolved "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1736#38c030cbcc591882c21e55c54d6cff394b782d3a"
11231122
dependencies:
1124-
"@blocknote/core" "0.31.1"
1123+
"@blocknote/core" "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@f10e27b362ed238336cdeade7cca46aefa278860"
11251124
"@emoji-mart/data" "^1.2.1"
11261125
"@floating-ui/react" "^0.26.4"
11271126
"@tiptap/core" "^2.12.0"
@@ -6542,64 +6541,6 @@ bl@^5.0.0:
65426541
inherits "^2.0.4"
65436542
readable-stream "^3.4.0"
65446543

6545-
"blocknote/core@https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1732":
6546-
version "0.31.1"
6547-
resolved "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1732#897ece632650df1006e2413a56e6143878b96599"
6548-
dependencies:
6549-
"@emoji-mart/data" "^1.2.1"
6550-
"@shikijs/types" "3.2.1"
6551-
"@tiptap/core" "^2.12.0"
6552-
"@tiptap/extension-bold" "^2.11.5"
6553-
"@tiptap/extension-code" "^2.11.5"
6554-
"@tiptap/extension-gapcursor" "^2.11.5"
6555-
"@tiptap/extension-history" "^2.11.5"
6556-
"@tiptap/extension-horizontal-rule" "^2.11.5"
6557-
"@tiptap/extension-italic" "^2.11.5"
6558-
"@tiptap/extension-link" "^2.11.5"
6559-
"@tiptap/extension-paragraph" "^2.11.5"
6560-
"@tiptap/extension-strike" "^2.11.5"
6561-
"@tiptap/extension-table-cell" "^2.11.5"
6562-
"@tiptap/extension-table-header" "^2.11.5"
6563-
"@tiptap/extension-text" "^2.11.5"
6564-
"@tiptap/extension-underline" "^2.11.5"
6565-
"@tiptap/pm" "^2.12.0"
6566-
emoji-mart "^5.6.0"
6567-
hast-util-from-dom "^5.0.1"
6568-
prosemirror-dropcursor "^1.8.1"
6569-
prosemirror-highlight "^0.13.0"
6570-
prosemirror-model "^1.25.1"
6571-
prosemirror-state "^1.4.3"
6572-
prosemirror-tables "^1.6.4"
6573-
prosemirror-transform "^1.10.4"
6574-
prosemirror-view "^1.38.1"
6575-
rehype-format "^5.0.1"
6576-
rehype-parse "^9.0.1"
6577-
rehype-remark "^10.0.0"
6578-
rehype-stringify "^10.0.1"
6579-
remark-gfm "^4.0.1"
6580-
remark-parse "^11.0.0"
6581-
remark-rehype "^11.1.1"
6582-
remark-stringify "^11.0.0"
6583-
unified "^11.0.5"
6584-
uuid "^8.3.2"
6585-
y-prosemirror "^1.3.4"
6586-
y-protocols "^1.0.6"
6587-
yjs "^13.6.15"
6588-
6589-
"blocknote/react@https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1732":
6590-
version "0.31.1"
6591-
resolved "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1732#e8b162670dd3f15ecfc355ee7322eb6dba7f04d9"
6592-
dependencies:
6593-
"@blocknote/core" "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@d5997ba42e85757818da855d2d5826616ed3111a"
6594-
"@emoji-mart/data" "^1.2.1"
6595-
"@floating-ui/react" "^0.26.4"
6596-
"@tiptap/core" "^2.12.0"
6597-
"@tiptap/pm" "^2.12.0"
6598-
"@tiptap/react" "^2.12.0"
6599-
emoji-mart "^5.6.0"
6600-
lodash.merge "^4.6.2"
6601-
react-icons "^5.2.1"
6602-
66036544
bluebird@^3.4.1:
66046545
version "3.7.2"
66056546
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"

0 commit comments

Comments
 (0)