File tree 8 files changed +14
-9
lines changed
docs/components/pages/landing/hero
8 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 2
2
BlockNoteSchema ,
3
3
combineByGroup ,
4
4
filterSuggestionItems ,
5
- locales ,
6
5
uploadToTmpFilesDotOrg_DEV_ONLY ,
7
6
} from "@blocknote/core" ;
7
+ import * as locales from "@blocknote/core/locales" ;
8
8
import "@blocknote/core/fonts/inter.css" ;
9
9
import {
10
10
getDefaultReactSlashMenuItems ,
Original file line number Diff line number Diff line change 2
2
BlockNoteSchema ,
3
3
combineByGroup ,
4
4
filterSuggestionItems ,
5
- locales ,
6
5
} from "@blocknote/core" ;
6
+ import * as locales from "@blocknote/core/locales" ;
7
7
import "@blocknote/core/fonts/inter.css" ;
8
8
import { BlockNoteView } from "@blocknote/mantine" ;
9
9
import "@blocknote/mantine/style.css" ;
Original file line number Diff line number Diff line change 1
- import { locales } from "@blocknote/core" ;
1
+ import { nl } from "@blocknote/core/locales " ;
2
2
import "@blocknote/core/fonts/inter.css" ;
3
3
import { BlockNoteView } from "@blocknote/mantine" ;
4
4
import "@blocknote/mantine/style.css" ;
@@ -12,7 +12,7 @@ export default function App() {
12
12
// Passes the Dutch (NL) dictionary to the editor instance.
13
13
// You can also provide your own dictionary here to customize the strings used in the editor,
14
14
// or submit a Pull Request to add support for your language of your choice
15
- dictionary : locales . nl ,
15
+ dictionary : nl ,
16
16
// dictionary: locales[lang as keyof typeof locales], // Use the language from the i18n library dynamically
17
17
} ) ;
18
18
Original file line number Diff line number Diff line change 1
- import { locales } from "@blocknote/core" ;
1
+ import { en } from "@blocknote/core/locales " ;
2
2
import "@blocknote/core/fonts/inter.css" ;
3
3
import { BlockNoteView } from "@blocknote/mantine" ;
4
4
import "@blocknote/mantine/style.css" ;
5
5
import { useCreateBlockNote } from "@blocknote/react" ;
6
6
7
7
export default function App ( ) {
8
8
// We use the English, default dictionary
9
- const locale = locales [ "en" ] ;
9
+ const locale = en ;
10
10
11
11
// Creates a new editor instance.
12
12
const editor = useCreateBlockNote ( {
Original file line number Diff line number Diff line change 49
49
"types" : " ./types/src/comments/index.d.ts" ,
50
50
"import" : " ./dist/comments.js" ,
51
51
"require" : " ./dist/comments.cjs"
52
+ },
53
+ "./locales" : {
54
+ "types" : " ./types/src/i18n/index.d.ts" ,
55
+ "import" : " ./dist/locales.js" ,
56
+ "require" : " ./dist/locales.cjs"
52
57
}
53
58
},
54
59
"scripts" : {
Original file line number Diff line number Diff line change
1
+ export * from "./locales/index.js" ;
2
+ export * from "./dictionary.js" ;
Original file line number Diff line number Diff line change 1
- import * as locales from "./i18n/locales/index.js" ;
2
1
export * from "./api/blockManipulation/commands/updateBlock/updateBlock.js" ;
3
2
export * from "./api/exporters/html/externalHTMLExporter.js" ;
4
3
export * from "./api/exporters/html/internalHTMLSerializer.js" ;
@@ -57,7 +56,6 @@ export * from "./util/table.js";
57
56
export * from "./util/string.js" ;
58
57
export * from "./util/typescript.js" ;
59
58
export { UnreachableCaseError , assertEmpty } from "./util/typescript.js" ;
60
- export { locales } ;
61
59
62
60
// for testing from react (TODO: move):
63
61
export * from "./api/nodeConversions/blockToNode.js" ;
@@ -69,4 +67,3 @@ export * from "./extensions/UniqueID/UniqueID.js";
69
67
export * from "./api/exporters/markdown/markdownExporter.js" ;
70
68
export * from "./api/parsers/html/parseHTML.js" ;
71
69
export * from "./api/parsers/markdown/parseMarkdown.js" ;
72
-
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export default defineConfig({
19
19
entry : {
20
20
blocknote : path . resolve ( __dirname , "src/index.ts" ) ,
21
21
comments : path . resolve ( __dirname , "src/comments/index.ts" ) ,
22
+ locales : path . resolve ( __dirname , "src/i18n/index.ts" ) ,
22
23
} ,
23
24
name : "blocknote" ,
24
25
formats : [ "es" , "cjs" ] ,
You can’t perform that action at this time.
0 commit comments