File tree Expand file tree Collapse file tree 8 files changed +14
-9
lines changed
docs/components/pages/landing/hero Expand file tree Collapse file tree 8 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 22 BlockNoteSchema ,
33 combineByGroup ,
44 filterSuggestionItems ,
5- locales ,
65 uploadToTmpFilesDotOrg_DEV_ONLY ,
76} from "@blocknote/core" ;
7+ import * as locales from "@blocknote/core/locales" ;
88import "@blocknote/core/fonts/inter.css" ;
99import {
1010 getDefaultReactSlashMenuItems ,
Original file line number Diff line number Diff line change 22 BlockNoteSchema ,
33 combineByGroup ,
44 filterSuggestionItems ,
5- locales ,
65} from "@blocknote/core" ;
6+ import * as locales from "@blocknote/core/locales" ;
77import "@blocknote/core/fonts/inter.css" ;
88import { BlockNoteView } from "@blocknote/mantine" ;
99import "@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 " ;
22import "@blocknote/core/fonts/inter.css" ;
33import { BlockNoteView } from "@blocknote/mantine" ;
44import "@blocknote/mantine/style.css" ;
@@ -12,7 +12,7 @@ export default function App() {
1212 // Passes the Dutch (NL) dictionary to the editor instance.
1313 // You can also provide your own dictionary here to customize the strings used in the editor,
1414 // or submit a Pull Request to add support for your language of your choice
15- dictionary : locales . nl ,
15+ dictionary : nl ,
1616 // dictionary: locales[lang as keyof typeof locales], // Use the language from the i18n library dynamically
1717 } ) ;
1818
Original file line number Diff line number Diff line change 1- import { locales } from "@blocknote/core" ;
1+ import { en } from "@blocknote/core/locales " ;
22import "@blocknote/core/fonts/inter.css" ;
33import { BlockNoteView } from "@blocknote/mantine" ;
44import "@blocknote/mantine/style.css" ;
55import { useCreateBlockNote } from "@blocknote/react" ;
66
77export default function App ( ) {
88 // We use the English, default dictionary
9- const locale = locales [ "en" ] ;
9+ const locale = en ;
1010
1111 // Creates a new editor instance.
1212 const editor = useCreateBlockNote ( {
Original file line number Diff line number Diff line change 4949 "types" : " ./types/src/comments/index.d.ts" ,
5050 "import" : " ./dist/comments.js" ,
5151 "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"
5257 }
5358 },
5459 "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" ;
21export * from "./api/blockManipulation/commands/updateBlock/updateBlock.js" ;
32export * from "./api/exporters/html/externalHTMLExporter.js" ;
43export * from "./api/exporters/html/internalHTMLSerializer.js" ;
@@ -57,7 +56,6 @@ export * from "./util/table.js";
5756export * from "./util/string.js" ;
5857export * from "./util/typescript.js" ;
5958export { UnreachableCaseError , assertEmpty } from "./util/typescript.js" ;
60- export { locales } ;
6159
6260// for testing from react (TODO: move):
6361export * from "./api/nodeConversions/blockToNode.js" ;
@@ -69,4 +67,3 @@ export * from "./extensions/UniqueID/UniqueID.js";
6967export * from "./api/exporters/markdown/markdownExporter.js" ;
7068export * from "./api/parsers/html/parseHTML.js" ;
7169export * from "./api/parsers/markdown/parseMarkdown.js" ;
72-
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export default defineConfig({
1919 entry : {
2020 blocknote : path . resolve ( __dirname , "src/index.ts" ) ,
2121 comments : path . resolve ( __dirname , "src/comments/index.ts" ) ,
22+ locales : path . resolve ( __dirname , "src/i18n/index.ts" ) ,
2223 } ,
2324 name : "blocknote" ,
2425 formats : [ "es" , "cjs" ] ,
You can’t perform that action at this time.
0 commit comments