Skip to content

Commit b909c73

Browse files
committed
feat: fumadocs
1 parent 86675ec commit b909c73

File tree

173 files changed

+9563
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+9563
-421
lines changed

examples/.eslintrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
extends: ["../.eslintrc.js"],
3+
rules: {
4+
"import/extensions": "off",
5+
},
6+
};

examples/03-ui-components/02-formatting-toolbar-buttons/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
useCreateBlockNote,
1717
} from "@blocknote/react";
1818

19-
import { BlueButton } from "./BlueButton.js";
19+
import { BlueButton } from "./BlueButton";
2020

2121
export default function App() {
2222
// Creates a new editor instance.

examples/03-ui-components/03-formatting-toolbar-block-type-items/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from "@blocknote/react";
1212

1313
import { RiAlertFill } from "react-icons/ri";
14-
import { Alert } from "./Alert.js";
14+
import { Alert } from "./Alert";
1515

1616
// Our schema with block specs, which contain the configs and implementations for
1717
// blocks that we want our editor to use.

examples/03-ui-components/04-side-menu-buttons/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
useCreateBlockNote,
99
} from "@blocknote/react";
1010

11-
import { RemoveBlockButton } from "./RemoveBlockButton.js";
11+
import { RemoveBlockButton } from "./RemoveBlockButton";
1212

1313
export default function App() {
1414
// Creates a new editor instance.

examples/03-ui-components/05-side-menu-drag-handle-items/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
useCreateBlockNote,
1212
} from "@blocknote/react";
1313

14-
import { ResetBlockTypeItem } from "./ResetBlockTypeItem.js";
14+
import { ResetBlockTypeItem } from "./ResetBlockTypeItem";
1515

1616
// To avoid rendering issues, it's good practice to define your custom drag
1717
// handle menu in a separate component, instead of inline within the `sideMenu`

examples/03-ui-components/10-suggestion-menus-grid-mentions/src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
useCreateBlockNote,
1313
} from "@blocknote/react";
1414

15-
import { Mention } from "./Mention.js";
15+
import { Mention } from "./Mention";
1616

1717
// Our schema with inline content specs, which contain the configs and
1818
// implementations for inline content that we want our editor to use.
@@ -27,7 +27,7 @@ const schema = BlockNoteSchema.create({
2727

2828
// Function which gets all users for the mentions menu.
2929
const getMentionMenuItems = (
30-
editor: typeof schema.BlockNoteEditor
30+
editor: typeof schema.BlockNoteEditor,
3131
): DefaultReactGridSuggestionItem[] => {
3232
const users = ["Steve", "Bob", "Joe", "Mike"];
3333

@@ -95,7 +95,7 @@ export function App() {
9595
...item,
9696
title: item.id,
9797
})),
98-
query
98+
query,
9999
) as DefaultReactGridSuggestionItem[]
100100
}
101101
columns={2}

examples/03-ui-components/11-uppy-file-panel/src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
useCreateBlockNote,
1010
} from "@blocknote/react";
1111

12-
import { FileReplaceButton } from "./FileReplaceButton.js";
13-
import { uploadFile, UppyFilePanel } from "./UppyFilePanel.js";
12+
import { FileReplaceButton } from "./FileReplaceButton";
13+
import { uploadFile, UppyFilePanel } from "./UppyFilePanel";
1414

1515
export default function App() {
1616
// Creates a new editor instance.
@@ -44,7 +44,7 @@ export default function App() {
4444
items.splice(
4545
items.findIndex((c) => c.key === "replaceFileButton"),
4646
1,
47-
<FileReplaceButton key={"fileReplaceButton"} />
47+
<FileReplaceButton key={"fileReplaceButton"} />,
4848
);
4949

5050
return <FormattingToolbar {...props}>{items}</FormattingToolbar>;

examples/03-ui-components/11-uppy-file-panel/src/FileReplaceButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { useEffect, useState } from "react";
1414

1515
import { RiImageEditFill } from "react-icons/ri";
1616

17-
import { UppyFilePanel } from "./UppyFilePanel.js";
17+
import { UppyFilePanel } from "./UppyFilePanel";
1818

1919
// Copied with minor changes from:
2020
// https://github.com/TypeCellOS/BlockNote/blob/main/packages/react/src/components/FormattingToolbar/DefaultButtons/FileReplaceButton.tsx

examples/03-ui-components/13-custom-ui/src/App.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import "@blocknote/react/style.css";
1111
import { createTheme, ThemeProvider, useMediaQuery } from "@mui/material";
1212
import { useMemo } from "react";
1313

14-
import { schema } from "./schema.js";
15-
import { CustomMUIFormattingToolbar } from "./MUIFormattingToolbar.js";
16-
import { CustomMUISideMenu } from "./MUISideMenu.js";
17-
import { MUISuggestionMenu } from "./MUISuggestionMenu.js";
14+
import { schema } from "./schema";
15+
import { CustomMUIFormattingToolbar } from "./MUIFormattingToolbar";
16+
import { CustomMUISideMenu } from "./MUISideMenu";
17+
import { MUISuggestionMenu } from "./MUISuggestionMenu";
1818

1919
import "./style.css";
2020

@@ -42,7 +42,7 @@ export default function App() {
4242
mode: prefersDarkMode ? "dark" : "light",
4343
},
4444
}),
45-
[prefersDarkMode]
45+
[prefersDarkMode],
4646
);
4747

4848
// Renders the editor instance.
@@ -76,9 +76,9 @@ export default function App() {
7676
getItems={async (query) =>
7777
filterSuggestionItems(
7878
getDefaultReactSlashMenuItems(editor).filter(
79-
(item) => item.title !== "Emoji"
79+
(item) => item.title !== "Emoji",
8080
),
81-
query
81+
query,
8282
)
8383
}
8484
suggestionMenuComponent={MUISuggestionMenu}

examples/03-ui-components/13-custom-ui/src/MUIFormattingToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
ReactNode,
4343
} from "react";
4444

45-
import { TextBlockSchema } from "./schema.js";
45+
import { TextBlockSchema } from "./schema";
4646

4747
// This replaces the generic Mantine `ToolbarSelect` component with a simplified
4848
// MUI version:

0 commit comments

Comments
 (0)