diff --git a/docs/app/portal/page.tsx b/docs/app/portal/page.tsx deleted file mode 100644 index c93f41baff..0000000000 --- a/docs/app/portal/page.tsx +++ /dev/null @@ -1,19 +0,0 @@ -"use client"; - -import { useSession } from "@/util/auth-client"; - -// Just shows session info -export default function Me() { - const { data: session } = useSession(); - - if (!session) { - return
Not authenticated
; - } - - return ( -
-

Welcome {session.user.name}

-
{JSON.stringify(session, null, 2)}
-
- ); -} diff --git a/docs/components/pages/thanks/index.tsx b/docs/components/pages/thanks/index.tsx deleted file mode 100644 index b30478a231..0000000000 --- a/docs/components/pages/thanks/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export function Thanks() { - return
Thanks
; -} diff --git a/examples/.eslintrc.js b/examples/.eslintrc.js new file mode 100644 index 0000000000..c78910b8b6 --- /dev/null +++ b/examples/.eslintrc.js @@ -0,0 +1,6 @@ +module.exports = { + extends: ["../.eslintrc.js"], + rules: { + "import/extensions": "off", + }, +}; diff --git a/examples/01-basic/01-minimal/main.tsx b/examples/01-basic/01-minimal/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/01-minimal/main.tsx +++ b/examples/01-basic/01-minimal/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/01-minimal/App.tsx b/examples/01-basic/01-minimal/src/App.tsx similarity index 100% rename from examples/01-basic/01-minimal/App.tsx rename to examples/01-basic/01-minimal/src/App.tsx diff --git a/examples/01-basic/02-block-objects/main.tsx b/examples/01-basic/02-block-objects/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/02-block-objects/main.tsx +++ b/examples/01-basic/02-block-objects/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/02-block-objects/App.tsx b/examples/01-basic/02-block-objects/src/App.tsx similarity index 100% rename from examples/01-basic/02-block-objects/App.tsx rename to examples/01-basic/02-block-objects/src/App.tsx diff --git a/examples/01-basic/02-block-objects/styles.css b/examples/01-basic/02-block-objects/src/styles.css similarity index 100% rename from examples/01-basic/02-block-objects/styles.css rename to examples/01-basic/02-block-objects/src/styles.css diff --git a/examples/01-basic/03-multi-column/main.tsx b/examples/01-basic/03-multi-column/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/03-multi-column/main.tsx +++ b/examples/01-basic/03-multi-column/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/03-multi-column/App.tsx b/examples/01-basic/03-multi-column/src/App.tsx similarity index 100% rename from examples/01-basic/03-multi-column/App.tsx rename to examples/01-basic/03-multi-column/src/App.tsx diff --git a/examples/01-basic/04-default-blocks/main.tsx b/examples/01-basic/04-default-blocks/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/04-default-blocks/main.tsx +++ b/examples/01-basic/04-default-blocks/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/04-default-blocks/App.tsx b/examples/01-basic/04-default-blocks/src/App.tsx similarity index 100% rename from examples/01-basic/04-default-blocks/App.tsx rename to examples/01-basic/04-default-blocks/src/App.tsx diff --git a/examples/01-basic/05-removing-default-blocks/main.tsx b/examples/01-basic/05-removing-default-blocks/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/05-removing-default-blocks/main.tsx +++ b/examples/01-basic/05-removing-default-blocks/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/05-removing-default-blocks/App.tsx b/examples/01-basic/05-removing-default-blocks/src/App.tsx similarity index 100% rename from examples/01-basic/05-removing-default-blocks/App.tsx rename to examples/01-basic/05-removing-default-blocks/src/App.tsx diff --git a/examples/01-basic/06-block-manipulation/main.tsx b/examples/01-basic/06-block-manipulation/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/06-block-manipulation/main.tsx +++ b/examples/01-basic/06-block-manipulation/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/06-block-manipulation/App.tsx b/examples/01-basic/06-block-manipulation/src/App.tsx similarity index 100% rename from examples/01-basic/06-block-manipulation/App.tsx rename to examples/01-basic/06-block-manipulation/src/App.tsx diff --git a/examples/01-basic/06-block-manipulation/styles.css b/examples/01-basic/06-block-manipulation/src/styles.css similarity index 100% rename from examples/01-basic/06-block-manipulation/styles.css rename to examples/01-basic/06-block-manipulation/src/styles.css diff --git a/examples/01-basic/07-selection-blocks/main.tsx b/examples/01-basic/07-selection-blocks/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/07-selection-blocks/main.tsx +++ b/examples/01-basic/07-selection-blocks/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/07-selection-blocks/App.tsx b/examples/01-basic/07-selection-blocks/src/App.tsx similarity index 100% rename from examples/01-basic/07-selection-blocks/App.tsx rename to examples/01-basic/07-selection-blocks/src/App.tsx diff --git a/examples/01-basic/07-selection-blocks/styles.css b/examples/01-basic/07-selection-blocks/src/styles.css similarity index 100% rename from examples/01-basic/07-selection-blocks/styles.css rename to examples/01-basic/07-selection-blocks/src/styles.css diff --git a/examples/01-basic/08-ariakit/main.tsx b/examples/01-basic/08-ariakit/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/08-ariakit/main.tsx +++ b/examples/01-basic/08-ariakit/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/08-ariakit/App.tsx b/examples/01-basic/08-ariakit/src/App.tsx similarity index 100% rename from examples/01-basic/08-ariakit/App.tsx rename to examples/01-basic/08-ariakit/src/App.tsx diff --git a/examples/01-basic/09-shadcn/main.tsx b/examples/01-basic/09-shadcn/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/09-shadcn/main.tsx +++ b/examples/01-basic/09-shadcn/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/09-shadcn/App.tsx b/examples/01-basic/09-shadcn/src/App.tsx similarity index 100% rename from examples/01-basic/09-shadcn/App.tsx rename to examples/01-basic/09-shadcn/src/App.tsx diff --git a/examples/01-basic/10-localization/main.tsx b/examples/01-basic/10-localization/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/10-localization/main.tsx +++ b/examples/01-basic/10-localization/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/10-localization/App.tsx b/examples/01-basic/10-localization/src/App.tsx similarity index 100% rename from examples/01-basic/10-localization/App.tsx rename to examples/01-basic/10-localization/src/App.tsx diff --git a/examples/01-basic/11-custom-placeholder/main.tsx b/examples/01-basic/11-custom-placeholder/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/11-custom-placeholder/main.tsx +++ b/examples/01-basic/11-custom-placeholder/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/11-custom-placeholder/App.tsx b/examples/01-basic/11-custom-placeholder/src/App.tsx similarity index 100% rename from examples/01-basic/11-custom-placeholder/App.tsx rename to examples/01-basic/11-custom-placeholder/src/App.tsx diff --git a/examples/01-basic/12-multi-editor/main.tsx b/examples/01-basic/12-multi-editor/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/12-multi-editor/main.tsx +++ b/examples/01-basic/12-multi-editor/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/12-multi-editor/App.tsx b/examples/01-basic/12-multi-editor/src/App.tsx similarity index 100% rename from examples/01-basic/12-multi-editor/App.tsx rename to examples/01-basic/12-multi-editor/src/App.tsx diff --git a/examples/01-basic/13-custom-paste-handler/main.tsx b/examples/01-basic/13-custom-paste-handler/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/13-custom-paste-handler/main.tsx +++ b/examples/01-basic/13-custom-paste-handler/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/13-custom-paste-handler/App.tsx b/examples/01-basic/13-custom-paste-handler/src/App.tsx similarity index 100% rename from examples/01-basic/13-custom-paste-handler/App.tsx rename to examples/01-basic/13-custom-paste-handler/src/App.tsx diff --git a/examples/01-basic/13-custom-paste-handler/styles.css b/examples/01-basic/13-custom-paste-handler/src/styles.css similarity index 100% rename from examples/01-basic/13-custom-paste-handler/styles.css rename to examples/01-basic/13-custom-paste-handler/src/styles.css diff --git a/examples/01-basic/testing/main.tsx b/examples/01-basic/testing/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/01-basic/testing/main.tsx +++ b/examples/01-basic/testing/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/01-basic/testing/App.tsx b/examples/01-basic/testing/src/App.tsx similarity index 100% rename from examples/01-basic/testing/App.tsx rename to examples/01-basic/testing/src/App.tsx diff --git a/examples/02-backend/01-file-uploading/main.tsx b/examples/02-backend/01-file-uploading/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/02-backend/01-file-uploading/main.tsx +++ b/examples/02-backend/01-file-uploading/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/02-backend/01-file-uploading/App.tsx b/examples/02-backend/01-file-uploading/src/App.tsx similarity index 100% rename from examples/02-backend/01-file-uploading/App.tsx rename to examples/02-backend/01-file-uploading/src/App.tsx diff --git a/examples/02-backend/02-saving-loading/main.tsx b/examples/02-backend/02-saving-loading/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/02-backend/02-saving-loading/main.tsx +++ b/examples/02-backend/02-saving-loading/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/02-backend/02-saving-loading/App.tsx b/examples/02-backend/02-saving-loading/src/App.tsx similarity index 100% rename from examples/02-backend/02-saving-loading/App.tsx rename to examples/02-backend/02-saving-loading/src/App.tsx diff --git a/examples/02-backend/03-s3/main.tsx b/examples/02-backend/03-s3/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/02-backend/03-s3/main.tsx +++ b/examples/02-backend/03-s3/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/02-backend/03-s3/App.tsx b/examples/02-backend/03-s3/src/App.tsx similarity index 100% rename from examples/02-backend/03-s3/App.tsx rename to examples/02-backend/03-s3/src/App.tsx diff --git a/examples/02-backend/04-rendering-static-documents/main.tsx b/examples/02-backend/04-rendering-static-documents/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/02-backend/04-rendering-static-documents/main.tsx +++ b/examples/02-backend/04-rendering-static-documents/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/02-backend/04-rendering-static-documents/App.tsx b/examples/02-backend/04-rendering-static-documents/src/App.tsx similarity index 100% rename from examples/02-backend/04-rendering-static-documents/App.tsx rename to examples/02-backend/04-rendering-static-documents/src/App.tsx diff --git a/examples/03-ui-components/01-ui-elements-remove/main.tsx b/examples/03-ui-components/01-ui-elements-remove/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/01-ui-elements-remove/main.tsx +++ b/examples/03-ui-components/01-ui-elements-remove/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/01-ui-elements-remove/App.tsx b/examples/03-ui-components/01-ui-elements-remove/src/App.tsx similarity index 100% rename from examples/03-ui-components/01-ui-elements-remove/App.tsx rename to examples/03-ui-components/01-ui-elements-remove/src/App.tsx diff --git a/examples/03-ui-components/02-formatting-toolbar-buttons/main.tsx b/examples/03-ui-components/02-formatting-toolbar-buttons/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/02-formatting-toolbar-buttons/main.tsx +++ b/examples/03-ui-components/02-formatting-toolbar-buttons/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/02-formatting-toolbar-buttons/App.tsx b/examples/03-ui-components/02-formatting-toolbar-buttons/src/App.tsx similarity index 98% rename from examples/03-ui-components/02-formatting-toolbar-buttons/App.tsx rename to examples/03-ui-components/02-formatting-toolbar-buttons/src/App.tsx index aa8e5b9f92..92c4b48073 100644 --- a/examples/03-ui-components/02-formatting-toolbar-buttons/App.tsx +++ b/examples/03-ui-components/02-formatting-toolbar-buttons/src/App.tsx @@ -16,7 +16,7 @@ import { useCreateBlockNote, } from "@blocknote/react"; -import { BlueButton } from "./BlueButton.js"; +import { BlueButton } from "./BlueButton"; export default function App() { // Creates a new editor instance. diff --git a/examples/03-ui-components/02-formatting-toolbar-buttons/BlueButton.tsx b/examples/03-ui-components/02-formatting-toolbar-buttons/src/BlueButton.tsx similarity index 100% rename from examples/03-ui-components/02-formatting-toolbar-buttons/BlueButton.tsx rename to examples/03-ui-components/02-formatting-toolbar-buttons/src/BlueButton.tsx diff --git a/examples/03-ui-components/03-formatting-toolbar-block-type-items/main.tsx b/examples/03-ui-components/03-formatting-toolbar-block-type-items/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/03-formatting-toolbar-block-type-items/main.tsx +++ b/examples/03-ui-components/03-formatting-toolbar-block-type-items/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/03-formatting-toolbar-block-type-items/Alert.tsx b/examples/03-ui-components/03-formatting-toolbar-block-type-items/src/Alert.tsx similarity index 100% rename from examples/03-ui-components/03-formatting-toolbar-block-type-items/Alert.tsx rename to examples/03-ui-components/03-formatting-toolbar-block-type-items/src/Alert.tsx diff --git a/examples/03-ui-components/03-formatting-toolbar-block-type-items/App.tsx b/examples/03-ui-components/03-formatting-toolbar-block-type-items/src/App.tsx similarity index 98% rename from examples/03-ui-components/03-formatting-toolbar-block-type-items/App.tsx rename to examples/03-ui-components/03-formatting-toolbar-block-type-items/src/App.tsx index e46bbeb631..299a942376 100644 --- a/examples/03-ui-components/03-formatting-toolbar-block-type-items/App.tsx +++ b/examples/03-ui-components/03-formatting-toolbar-block-type-items/src/App.tsx @@ -11,7 +11,7 @@ import { } from "@blocknote/react"; import { RiAlertFill } from "react-icons/ri"; -import { Alert } from "./Alert.js"; +import { Alert } from "./Alert"; // Our schema with block specs, which contain the configs and implementations for // blocks that we want our editor to use. diff --git a/examples/03-ui-components/03-formatting-toolbar-block-type-items/styles.css b/examples/03-ui-components/03-formatting-toolbar-block-type-items/src/styles.css similarity index 100% rename from examples/03-ui-components/03-formatting-toolbar-block-type-items/styles.css rename to examples/03-ui-components/03-formatting-toolbar-block-type-items/src/styles.css diff --git a/examples/03-ui-components/04-side-menu-buttons/main.tsx b/examples/03-ui-components/04-side-menu-buttons/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/04-side-menu-buttons/main.tsx +++ b/examples/03-ui-components/04-side-menu-buttons/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/04-side-menu-buttons/App.tsx b/examples/03-ui-components/04-side-menu-buttons/src/App.tsx similarity index 94% rename from examples/03-ui-components/04-side-menu-buttons/App.tsx rename to examples/03-ui-components/04-side-menu-buttons/src/App.tsx index 445b2daba9..8661c08baa 100644 --- a/examples/03-ui-components/04-side-menu-buttons/App.tsx +++ b/examples/03-ui-components/04-side-menu-buttons/src/App.tsx @@ -8,7 +8,7 @@ import { useCreateBlockNote, } from "@blocknote/react"; -import { RemoveBlockButton } from "./RemoveBlockButton.js"; +import { RemoveBlockButton } from "./RemoveBlockButton"; export default function App() { // Creates a new editor instance. diff --git a/examples/03-ui-components/04-side-menu-buttons/RemoveBlockButton.tsx b/examples/03-ui-components/04-side-menu-buttons/src/RemoveBlockButton.tsx similarity index 100% rename from examples/03-ui-components/04-side-menu-buttons/RemoveBlockButton.tsx rename to examples/03-ui-components/04-side-menu-buttons/src/RemoveBlockButton.tsx diff --git a/examples/03-ui-components/05-side-menu-drag-handle-items/main.tsx b/examples/03-ui-components/05-side-menu-drag-handle-items/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/05-side-menu-drag-handle-items/main.tsx +++ b/examples/03-ui-components/05-side-menu-drag-handle-items/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/05-side-menu-drag-handle-items/App.tsx b/examples/03-ui-components/05-side-menu-drag-handle-items/src/App.tsx similarity index 96% rename from examples/03-ui-components/05-side-menu-drag-handle-items/App.tsx rename to examples/03-ui-components/05-side-menu-drag-handle-items/src/App.tsx index d469349206..88d82aad2d 100644 --- a/examples/03-ui-components/05-side-menu-drag-handle-items/App.tsx +++ b/examples/03-ui-components/05-side-menu-drag-handle-items/src/App.tsx @@ -11,7 +11,7 @@ import { useCreateBlockNote, } from "@blocknote/react"; -import { ResetBlockTypeItem } from "./ResetBlockTypeItem.js"; +import { ResetBlockTypeItem } from "./ResetBlockTypeItem"; // To avoid rendering issues, it's good practice to define your custom drag // handle menu in a separate component, instead of inline within the `sideMenu` diff --git a/examples/03-ui-components/05-side-menu-drag-handle-items/ResetBlockTypeItem.tsx b/examples/03-ui-components/05-side-menu-drag-handle-items/src/ResetBlockTypeItem.tsx similarity index 100% rename from examples/03-ui-components/05-side-menu-drag-handle-items/ResetBlockTypeItem.tsx rename to examples/03-ui-components/05-side-menu-drag-handle-items/src/ResetBlockTypeItem.tsx diff --git a/examples/03-ui-components/06-suggestion-menus-slash-menu-items/main.tsx b/examples/03-ui-components/06-suggestion-menus-slash-menu-items/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/06-suggestion-menus-slash-menu-items/main.tsx +++ b/examples/03-ui-components/06-suggestion-menus-slash-menu-items/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/06-suggestion-menus-slash-menu-items/App.tsx b/examples/03-ui-components/06-suggestion-menus-slash-menu-items/src/App.tsx similarity index 100% rename from examples/03-ui-components/06-suggestion-menus-slash-menu-items/App.tsx rename to examples/03-ui-components/06-suggestion-menus-slash-menu-items/src/App.tsx diff --git a/examples/03-ui-components/07-suggestion-menus-slash-menu-component/main.tsx b/examples/03-ui-components/07-suggestion-menus-slash-menu-component/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/07-suggestion-menus-slash-menu-component/main.tsx +++ b/examples/03-ui-components/07-suggestion-menus-slash-menu-component/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/07-suggestion-menus-slash-menu-component/App.tsx b/examples/03-ui-components/07-suggestion-menus-slash-menu-component/src/App.tsx similarity index 100% rename from examples/03-ui-components/07-suggestion-menus-slash-menu-component/App.tsx rename to examples/03-ui-components/07-suggestion-menus-slash-menu-component/src/App.tsx diff --git a/examples/03-ui-components/07-suggestion-menus-slash-menu-component/styles.css b/examples/03-ui-components/07-suggestion-menus-slash-menu-component/src/styles.css similarity index 100% rename from examples/03-ui-components/07-suggestion-menus-slash-menu-component/styles.css rename to examples/03-ui-components/07-suggestion-menus-slash-menu-component/src/styles.css diff --git a/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/main.tsx b/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/main.tsx +++ b/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/App.tsx b/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/src/App.tsx similarity index 100% rename from examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/App.tsx rename to examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/src/App.tsx diff --git a/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/main.tsx b/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/main.tsx +++ b/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/App.tsx b/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/src/App.tsx similarity index 100% rename from examples/03-ui-components/09-suggestion-menus-emoji-picker-component/App.tsx rename to examples/03-ui-components/09-suggestion-menus-emoji-picker-component/src/App.tsx diff --git a/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/styles.css b/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/src/styles.css similarity index 100% rename from examples/03-ui-components/09-suggestion-menus-emoji-picker-component/styles.css rename to examples/03-ui-components/09-suggestion-menus-emoji-picker-component/src/styles.css diff --git a/examples/03-ui-components/10-suggestion-menus-grid-mentions/main.tsx b/examples/03-ui-components/10-suggestion-menus-grid-mentions/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/10-suggestion-menus-grid-mentions/main.tsx +++ b/examples/03-ui-components/10-suggestion-menus-grid-mentions/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/10-suggestion-menus-grid-mentions/App.tsx b/examples/03-ui-components/10-suggestion-menus-grid-mentions/src/App.tsx similarity index 98% rename from examples/03-ui-components/10-suggestion-menus-grid-mentions/App.tsx rename to examples/03-ui-components/10-suggestion-menus-grid-mentions/src/App.tsx index 38c62d9730..333c645135 100644 --- a/examples/03-ui-components/10-suggestion-menus-grid-mentions/App.tsx +++ b/examples/03-ui-components/10-suggestion-menus-grid-mentions/src/App.tsx @@ -12,7 +12,7 @@ import { useCreateBlockNote, } from "@blocknote/react"; -import { Mention } from "./Mention.js"; +import { Mention } from "./Mention"; // Our schema with inline content specs, which contain the configs and // implementations for inline content that we want our editor to use. diff --git a/examples/03-ui-components/10-suggestion-menus-grid-mentions/Mention.tsx b/examples/03-ui-components/10-suggestion-menus-grid-mentions/src/Mention.tsx similarity index 100% rename from examples/03-ui-components/10-suggestion-menus-grid-mentions/Mention.tsx rename to examples/03-ui-components/10-suggestion-menus-grid-mentions/src/Mention.tsx diff --git a/examples/03-ui-components/11-uppy-file-panel/main.tsx b/examples/03-ui-components/11-uppy-file-panel/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/11-uppy-file-panel/main.tsx +++ b/examples/03-ui-components/11-uppy-file-panel/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/11-uppy-file-panel/App.tsx b/examples/03-ui-components/11-uppy-file-panel/src/App.tsx similarity index 92% rename from examples/03-ui-components/11-uppy-file-panel/App.tsx rename to examples/03-ui-components/11-uppy-file-panel/src/App.tsx index 466c5e024c..8f4ed37a5b 100644 --- a/examples/03-ui-components/11-uppy-file-panel/App.tsx +++ b/examples/03-ui-components/11-uppy-file-panel/src/App.tsx @@ -9,8 +9,8 @@ import { useCreateBlockNote, } from "@blocknote/react"; -import { FileReplaceButton } from "./FileReplaceButton.js"; -import { uploadFile, UppyFilePanel } from "./UppyFilePanel.js"; +import { FileReplaceButton } from "./FileReplaceButton"; +import { uploadFile, UppyFilePanel } from "./UppyFilePanel"; export default function App() { // Creates a new editor instance. diff --git a/examples/03-ui-components/11-uppy-file-panel/FileReplaceButton.tsx b/examples/03-ui-components/11-uppy-file-panel/src/FileReplaceButton.tsx similarity index 97% rename from examples/03-ui-components/11-uppy-file-panel/FileReplaceButton.tsx rename to examples/03-ui-components/11-uppy-file-panel/src/FileReplaceButton.tsx index e498b374cf..48e32a2b01 100644 --- a/examples/03-ui-components/11-uppy-file-panel/FileReplaceButton.tsx +++ b/examples/03-ui-components/11-uppy-file-panel/src/FileReplaceButton.tsx @@ -14,7 +14,7 @@ import { useEffect, useState } from "react"; import { RiImageEditFill } from "react-icons/ri"; -import { UppyFilePanel } from "./UppyFilePanel.js"; +import { UppyFilePanel } from "./UppyFilePanel"; // Copied with minor changes from: // https://github.com/TypeCellOS/BlockNote/blob/main/packages/react/src/components/FormattingToolbar/DefaultButtons/FileReplaceButton.tsx diff --git a/examples/03-ui-components/11-uppy-file-panel/UppyFilePanel.tsx b/examples/03-ui-components/11-uppy-file-panel/src/UppyFilePanel.tsx similarity index 100% rename from examples/03-ui-components/11-uppy-file-panel/UppyFilePanel.tsx rename to examples/03-ui-components/11-uppy-file-panel/src/UppyFilePanel.tsx diff --git a/examples/03-ui-components/12-static-formatting-toolbar/main.tsx b/examples/03-ui-components/12-static-formatting-toolbar/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/12-static-formatting-toolbar/main.tsx +++ b/examples/03-ui-components/12-static-formatting-toolbar/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/12-static-formatting-toolbar/App.tsx b/examples/03-ui-components/12-static-formatting-toolbar/src/App.tsx similarity index 100% rename from examples/03-ui-components/12-static-formatting-toolbar/App.tsx rename to examples/03-ui-components/12-static-formatting-toolbar/src/App.tsx diff --git a/examples/03-ui-components/12-static-formatting-toolbar/style.css b/examples/03-ui-components/12-static-formatting-toolbar/src/style.css similarity index 100% rename from examples/03-ui-components/12-static-formatting-toolbar/style.css rename to examples/03-ui-components/12-static-formatting-toolbar/src/style.css diff --git a/examples/03-ui-components/13-custom-ui/main.tsx b/examples/03-ui-components/13-custom-ui/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/13-custom-ui/main.tsx +++ b/examples/03-ui-components/13-custom-ui/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/13-custom-ui/App.tsx b/examples/03-ui-components/13-custom-ui/src/App.tsx similarity index 94% rename from examples/03-ui-components/13-custom-ui/App.tsx rename to examples/03-ui-components/13-custom-ui/src/App.tsx index d35ee2380a..4fe6427ded 100644 --- a/examples/03-ui-components/13-custom-ui/App.tsx +++ b/examples/03-ui-components/13-custom-ui/src/App.tsx @@ -11,10 +11,10 @@ import "@blocknote/react/style.css"; import { createTheme, ThemeProvider, useMediaQuery } from "@mui/material"; import { useMemo } from "react"; -import { schema } from "./schema.js"; -import { CustomMUIFormattingToolbar } from "./MUIFormattingToolbar.js"; -import { CustomMUISideMenu } from "./MUISideMenu.js"; -import { MUISuggestionMenu } from "./MUISuggestionMenu.js"; +import { schema } from "./schema"; +import { CustomMUIFormattingToolbar } from "./MUIFormattingToolbar"; +import { CustomMUISideMenu } from "./MUISideMenu"; +import { MUISuggestionMenu } from "./MUISuggestionMenu"; import "./style.css"; diff --git a/examples/03-ui-components/13-custom-ui/MUIFormattingToolbar.tsx b/examples/03-ui-components/13-custom-ui/src/MUIFormattingToolbar.tsx similarity index 99% rename from examples/03-ui-components/13-custom-ui/MUIFormattingToolbar.tsx rename to examples/03-ui-components/13-custom-ui/src/MUIFormattingToolbar.tsx index d1afb85a52..1abb598933 100644 --- a/examples/03-ui-components/13-custom-ui/MUIFormattingToolbar.tsx +++ b/examples/03-ui-components/13-custom-ui/src/MUIFormattingToolbar.tsx @@ -42,7 +42,7 @@ import { ReactNode, } from "react"; -import { TextBlockSchema } from "./schema.js"; +import { TextBlockSchema } from "./schema"; // This replaces the generic Mantine `ToolbarSelect` component with a simplified // MUI version: diff --git a/examples/03-ui-components/13-custom-ui/MUISideMenu.tsx b/examples/03-ui-components/13-custom-ui/src/MUISideMenu.tsx similarity index 99% rename from examples/03-ui-components/13-custom-ui/MUISideMenu.tsx rename to examples/03-ui-components/13-custom-ui/src/MUISideMenu.tsx index cafd4628a6..8f42580c1f 100644 --- a/examples/03-ui-components/13-custom-ui/MUISideMenu.tsx +++ b/examples/03-ui-components/13-custom-ui/src/MUISideMenu.tsx @@ -11,7 +11,7 @@ import { } from "@mui/material"; import { MouseEvent, ReactNode, useCallback, useMemo, useState } from "react"; -import { TextBlockSchema } from "./schema.js"; +import { TextBlockSchema } from "./schema"; // This replaces the default `RemoveBlockItem` component with a simplified // MUI version: diff --git a/examples/03-ui-components/13-custom-ui/MUISuggestionMenu.tsx b/examples/03-ui-components/13-custom-ui/src/MUISuggestionMenu.tsx similarity index 99% rename from examples/03-ui-components/13-custom-ui/MUISuggestionMenu.tsx rename to examples/03-ui-components/13-custom-ui/src/MUISuggestionMenu.tsx index 9532992ec8..13b7efedf1 100644 --- a/examples/03-ui-components/13-custom-ui/MUISuggestionMenu.tsx +++ b/examples/03-ui-components/13-custom-ui/src/MUISuggestionMenu.tsx @@ -16,7 +16,7 @@ import { } from "@mui/material"; import { useEffect, useMemo, useRef } from "react"; -import { TextBlockSchema } from "./schema.js"; +import { TextBlockSchema } from "./schema"; // If you want to change the items in a Suggestion Menu, like the Slash Menu, // you don't need to modify any of the components in this file. Instead, you diff --git a/examples/03-ui-components/13-custom-ui/schema.ts b/examples/03-ui-components/13-custom-ui/src/schema.ts similarity index 100% rename from examples/03-ui-components/13-custom-ui/schema.ts rename to examples/03-ui-components/13-custom-ui/src/schema.ts diff --git a/examples/03-ui-components/13-custom-ui/style.css b/examples/03-ui-components/13-custom-ui/src/style.css similarity index 100% rename from examples/03-ui-components/13-custom-ui/style.css rename to examples/03-ui-components/13-custom-ui/src/style.css diff --git a/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/main.tsx b/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/main.tsx +++ b/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/App.tsx b/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/src/App.tsx similarity index 100% rename from examples/03-ui-components/14-experimental-mobile-formatting-toolbar/App.tsx rename to examples/03-ui-components/14-experimental-mobile-formatting-toolbar/src/App.tsx diff --git a/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/style.css b/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/src/style.css similarity index 100% rename from examples/03-ui-components/14-experimental-mobile-formatting-toolbar/style.css rename to examples/03-ui-components/14-experimental-mobile-formatting-toolbar/src/style.css diff --git a/examples/03-ui-components/15-advanced-tables/main.tsx b/examples/03-ui-components/15-advanced-tables/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/15-advanced-tables/main.tsx +++ b/examples/03-ui-components/15-advanced-tables/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/15-advanced-tables/App.tsx b/examples/03-ui-components/15-advanced-tables/src/App.tsx similarity index 100% rename from examples/03-ui-components/15-advanced-tables/App.tsx rename to examples/03-ui-components/15-advanced-tables/src/App.tsx diff --git a/examples/03-ui-components/link-toolbar-buttons/main.tsx b/examples/03-ui-components/link-toolbar-buttons/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/03-ui-components/link-toolbar-buttons/main.tsx +++ b/examples/03-ui-components/link-toolbar-buttons/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/03-ui-components/link-toolbar-buttons/AlertButton.tsx b/examples/03-ui-components/link-toolbar-buttons/src/AlertButton.tsx similarity index 100% rename from examples/03-ui-components/link-toolbar-buttons/AlertButton.tsx rename to examples/03-ui-components/link-toolbar-buttons/src/AlertButton.tsx diff --git a/examples/03-ui-components/link-toolbar-buttons/App.tsx b/examples/03-ui-components/link-toolbar-buttons/src/App.tsx similarity index 96% rename from examples/03-ui-components/link-toolbar-buttons/App.tsx rename to examples/03-ui-components/link-toolbar-buttons/src/App.tsx index 27a3fdb1e8..23e9902f85 100644 --- a/examples/03-ui-components/link-toolbar-buttons/App.tsx +++ b/examples/03-ui-components/link-toolbar-buttons/src/App.tsx @@ -7,7 +7,7 @@ import { useCreateBlockNote, } from "@blocknote/react"; -import { AlertButton } from "./AlertButton.js"; +import { AlertButton } from "./AlertButton"; export default function App() { // Creates a new editor instance. diff --git a/examples/04-theming/01-theming-dom-attributes/main.tsx b/examples/04-theming/01-theming-dom-attributes/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/04-theming/01-theming-dom-attributes/main.tsx +++ b/examples/04-theming/01-theming-dom-attributes/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/04-theming/01-theming-dom-attributes/App.tsx b/examples/04-theming/01-theming-dom-attributes/src/App.tsx similarity index 100% rename from examples/04-theming/01-theming-dom-attributes/App.tsx rename to examples/04-theming/01-theming-dom-attributes/src/App.tsx diff --git a/examples/04-theming/01-theming-dom-attributes/styles.css b/examples/04-theming/01-theming-dom-attributes/src/styles.css similarity index 100% rename from examples/04-theming/01-theming-dom-attributes/styles.css rename to examples/04-theming/01-theming-dom-attributes/src/styles.css diff --git a/examples/04-theming/02-changing-font/main.tsx b/examples/04-theming/02-changing-font/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/04-theming/02-changing-font/main.tsx +++ b/examples/04-theming/02-changing-font/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/04-theming/02-changing-font/App.tsx b/examples/04-theming/02-changing-font/src/App.tsx similarity index 100% rename from examples/04-theming/02-changing-font/App.tsx rename to examples/04-theming/02-changing-font/src/App.tsx diff --git a/examples/04-theming/02-changing-font/styles.css b/examples/04-theming/02-changing-font/src/styles.css similarity index 100% rename from examples/04-theming/02-changing-font/styles.css rename to examples/04-theming/02-changing-font/src/styles.css diff --git a/examples/04-theming/03-theming-css/main.tsx b/examples/04-theming/03-theming-css/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/04-theming/03-theming-css/main.tsx +++ b/examples/04-theming/03-theming-css/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/04-theming/03-theming-css/App.tsx b/examples/04-theming/03-theming-css/src/App.tsx similarity index 100% rename from examples/04-theming/03-theming-css/App.tsx rename to examples/04-theming/03-theming-css/src/App.tsx diff --git a/examples/04-theming/03-theming-css/styles.css b/examples/04-theming/03-theming-css/src/styles.css similarity index 100% rename from examples/04-theming/03-theming-css/styles.css rename to examples/04-theming/03-theming-css/src/styles.css diff --git a/examples/04-theming/04-theming-css-variables/main.tsx b/examples/04-theming/04-theming-css-variables/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/04-theming/04-theming-css-variables/main.tsx +++ b/examples/04-theming/04-theming-css-variables/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/04-theming/04-theming-css-variables/App.tsx b/examples/04-theming/04-theming-css-variables/src/App.tsx similarity index 100% rename from examples/04-theming/04-theming-css-variables/App.tsx rename to examples/04-theming/04-theming-css-variables/src/App.tsx diff --git a/examples/04-theming/04-theming-css-variables/styles.css b/examples/04-theming/04-theming-css-variables/src/styles.css similarity index 100% rename from examples/04-theming/04-theming-css-variables/styles.css rename to examples/04-theming/04-theming-css-variables/src/styles.css diff --git a/examples/04-theming/05-theming-css-variables-code/main.tsx b/examples/04-theming/05-theming-css-variables-code/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/04-theming/05-theming-css-variables-code/main.tsx +++ b/examples/04-theming/05-theming-css-variables-code/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/04-theming/05-theming-css-variables-code/App.tsx b/examples/04-theming/05-theming-css-variables-code/src/App.tsx similarity index 100% rename from examples/04-theming/05-theming-css-variables-code/App.tsx rename to examples/04-theming/05-theming-css-variables-code/src/App.tsx diff --git a/examples/04-theming/06-code-block/main.tsx b/examples/04-theming/06-code-block/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/04-theming/06-code-block/main.tsx +++ b/examples/04-theming/06-code-block/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/04-theming/06-code-block/App.tsx b/examples/04-theming/06-code-block/src/App.tsx similarity index 100% rename from examples/04-theming/06-code-block/App.tsx rename to examples/04-theming/06-code-block/src/App.tsx diff --git a/examples/04-theming/07-custom-code-block/README.md b/examples/04-theming/07-custom-code-block/README.md index 5401f022e7..016adf56e5 100644 --- a/examples/04-theming/07-custom-code-block/README.md +++ b/examples/04-theming/07-custom-code-block/README.md @@ -17,7 +17,7 @@ This will generate a `shiki.bundle.ts` file that you can use to create a syntax Like this: ```ts -import { createHighlighter } from "./shiki.bundle.js"; +import { createHighlighter } from "./shiki.bundle"; export default function App() { // Creates a new editor instance. diff --git a/examples/04-theming/07-custom-code-block/main.tsx b/examples/04-theming/07-custom-code-block/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/04-theming/07-custom-code-block/main.tsx +++ b/examples/04-theming/07-custom-code-block/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/04-theming/07-custom-code-block/App.tsx b/examples/04-theming/07-custom-code-block/src/App.tsx similarity index 97% rename from examples/04-theming/07-custom-code-block/App.tsx rename to examples/04-theming/07-custom-code-block/src/App.tsx index d6677aa707..e237854175 100644 --- a/examples/04-theming/07-custom-code-block/App.tsx +++ b/examples/04-theming/07-custom-code-block/src/App.tsx @@ -3,7 +3,7 @@ import { BlockNoteView } from "@blocknote/mantine"; import "@blocknote/mantine/style.css"; import { useCreateBlockNote } from "@blocknote/react"; // Bundle created from `npx shiki-codegen --langs typescript,javascript,react --themes light-plus,dark-plus --engine javascript --precompiled ./shiki.bundle.ts` -import { createHighlighter } from "./shiki.bundle.js"; +import { createHighlighter } from "./shiki.bundle"; export default function App() { // Creates a new editor instance. diff --git a/examples/04-theming/07-custom-code-block/shiki.bundle.ts b/examples/04-theming/07-custom-code-block/src/shiki.bundle.ts similarity index 100% rename from examples/04-theming/07-custom-code-block/shiki.bundle.ts rename to examples/04-theming/07-custom-code-block/src/shiki.bundle.ts diff --git a/examples/05-interoperability/01-converting-blocks-to-html/main.tsx b/examples/05-interoperability/01-converting-blocks-to-html/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/05-interoperability/01-converting-blocks-to-html/main.tsx +++ b/examples/05-interoperability/01-converting-blocks-to-html/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/05-interoperability/01-converting-blocks-to-html/App.tsx b/examples/05-interoperability/01-converting-blocks-to-html/src/App.tsx similarity index 100% rename from examples/05-interoperability/01-converting-blocks-to-html/App.tsx rename to examples/05-interoperability/01-converting-blocks-to-html/src/App.tsx diff --git a/examples/05-interoperability/01-converting-blocks-to-html/styles.css b/examples/05-interoperability/01-converting-blocks-to-html/src/styles.css similarity index 100% rename from examples/05-interoperability/01-converting-blocks-to-html/styles.css rename to examples/05-interoperability/01-converting-blocks-to-html/src/styles.css diff --git a/examples/05-interoperability/02-converting-blocks-from-html/main.tsx b/examples/05-interoperability/02-converting-blocks-from-html/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/05-interoperability/02-converting-blocks-from-html/main.tsx +++ b/examples/05-interoperability/02-converting-blocks-from-html/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/05-interoperability/02-converting-blocks-from-html/App.tsx b/examples/05-interoperability/02-converting-blocks-from-html/src/App.tsx similarity index 100% rename from examples/05-interoperability/02-converting-blocks-from-html/App.tsx rename to examples/05-interoperability/02-converting-blocks-from-html/src/App.tsx diff --git a/examples/05-interoperability/02-converting-blocks-from-html/styles.css b/examples/05-interoperability/02-converting-blocks-from-html/src/styles.css similarity index 100% rename from examples/05-interoperability/02-converting-blocks-from-html/styles.css rename to examples/05-interoperability/02-converting-blocks-from-html/src/styles.css diff --git a/examples/05-interoperability/03-converting-blocks-to-md/main.tsx b/examples/05-interoperability/03-converting-blocks-to-md/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/05-interoperability/03-converting-blocks-to-md/main.tsx +++ b/examples/05-interoperability/03-converting-blocks-to-md/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/05-interoperability/03-converting-blocks-to-md/App.tsx b/examples/05-interoperability/03-converting-blocks-to-md/src/App.tsx similarity index 100% rename from examples/05-interoperability/03-converting-blocks-to-md/App.tsx rename to examples/05-interoperability/03-converting-blocks-to-md/src/App.tsx diff --git a/examples/05-interoperability/03-converting-blocks-to-md/styles.css b/examples/05-interoperability/03-converting-blocks-to-md/src/styles.css similarity index 100% rename from examples/05-interoperability/03-converting-blocks-to-md/styles.css rename to examples/05-interoperability/03-converting-blocks-to-md/src/styles.css diff --git a/examples/05-interoperability/04-converting-blocks-from-md/main.tsx b/examples/05-interoperability/04-converting-blocks-from-md/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/05-interoperability/04-converting-blocks-from-md/main.tsx +++ b/examples/05-interoperability/04-converting-blocks-from-md/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/05-interoperability/04-converting-blocks-from-md/App.tsx b/examples/05-interoperability/04-converting-blocks-from-md/src/App.tsx similarity index 100% rename from examples/05-interoperability/04-converting-blocks-from-md/App.tsx rename to examples/05-interoperability/04-converting-blocks-from-md/src/App.tsx diff --git a/examples/05-interoperability/04-converting-blocks-from-md/styles.css b/examples/05-interoperability/04-converting-blocks-from-md/src/styles.css similarity index 100% rename from examples/05-interoperability/04-converting-blocks-from-md/styles.css rename to examples/05-interoperability/04-converting-blocks-from-md/src/styles.css diff --git a/examples/05-interoperability/05-converting-blocks-to-pdf/main.tsx b/examples/05-interoperability/05-converting-blocks-to-pdf/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/05-interoperability/05-converting-blocks-to-pdf/main.tsx +++ b/examples/05-interoperability/05-converting-blocks-to-pdf/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/05-interoperability/05-converting-blocks-to-pdf/App.tsx b/examples/05-interoperability/05-converting-blocks-to-pdf/src/App.tsx similarity index 100% rename from examples/05-interoperability/05-converting-blocks-to-pdf/App.tsx rename to examples/05-interoperability/05-converting-blocks-to-pdf/src/App.tsx diff --git a/examples/05-interoperability/05-converting-blocks-to-pdf/styles.css b/examples/05-interoperability/05-converting-blocks-to-pdf/src/styles.css similarity index 100% rename from examples/05-interoperability/05-converting-blocks-to-pdf/styles.css rename to examples/05-interoperability/05-converting-blocks-to-pdf/src/styles.css diff --git a/examples/05-interoperability/06-converting-blocks-to-docx/main.tsx b/examples/05-interoperability/06-converting-blocks-to-docx/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/05-interoperability/06-converting-blocks-to-docx/main.tsx +++ b/examples/05-interoperability/06-converting-blocks-to-docx/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/05-interoperability/06-converting-blocks-to-docx/App.tsx b/examples/05-interoperability/06-converting-blocks-to-docx/src/App.tsx similarity index 100% rename from examples/05-interoperability/06-converting-blocks-to-docx/App.tsx rename to examples/05-interoperability/06-converting-blocks-to-docx/src/App.tsx diff --git a/examples/05-interoperability/06-converting-blocks-to-docx/styles.css b/examples/05-interoperability/06-converting-blocks-to-docx/src/styles.css similarity index 100% rename from examples/05-interoperability/06-converting-blocks-to-docx/styles.css rename to examples/05-interoperability/06-converting-blocks-to-docx/src/styles.css diff --git a/examples/05-interoperability/07-converting-blocks-to-odt/main.tsx b/examples/05-interoperability/07-converting-blocks-to-odt/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/05-interoperability/07-converting-blocks-to-odt/main.tsx +++ b/examples/05-interoperability/07-converting-blocks-to-odt/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/05-interoperability/07-converting-blocks-to-odt/App.tsx b/examples/05-interoperability/07-converting-blocks-to-odt/src/App.tsx similarity index 100% rename from examples/05-interoperability/07-converting-blocks-to-odt/App.tsx rename to examples/05-interoperability/07-converting-blocks-to-odt/src/App.tsx diff --git a/examples/05-interoperability/07-converting-blocks-to-odt/styles.css b/examples/05-interoperability/07-converting-blocks-to-odt/src/styles.css similarity index 100% rename from examples/05-interoperability/07-converting-blocks-to-odt/styles.css rename to examples/05-interoperability/07-converting-blocks-to-odt/src/styles.css diff --git a/examples/06-custom-schema/01-alert-block/main.tsx b/examples/06-custom-schema/01-alert-block/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/06-custom-schema/01-alert-block/main.tsx +++ b/examples/06-custom-schema/01-alert-block/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/06-custom-schema/01-alert-block/Alert.tsx b/examples/06-custom-schema/01-alert-block/src/Alert.tsx similarity index 100% rename from examples/06-custom-schema/01-alert-block/Alert.tsx rename to examples/06-custom-schema/01-alert-block/src/Alert.tsx diff --git a/examples/06-custom-schema/01-alert-block/App.tsx b/examples/06-custom-schema/01-alert-block/src/App.tsx similarity index 96% rename from examples/06-custom-schema/01-alert-block/App.tsx rename to examples/06-custom-schema/01-alert-block/src/App.tsx index f6e8ba15c3..16950d9ecc 100644 --- a/examples/06-custom-schema/01-alert-block/App.tsx +++ b/examples/06-custom-schema/01-alert-block/src/App.tsx @@ -4,7 +4,7 @@ import { BlockNoteView } from "@blocknote/mantine"; import "@blocknote/mantine/style.css"; import { useCreateBlockNote } from "@blocknote/react"; -import { Alert } from "./Alert.js"; +import { Alert } from "./Alert"; // Our schema with block specs, which contain the configs and implementations for // blocks that we want our editor to use. diff --git a/examples/06-custom-schema/01-alert-block/styles.css b/examples/06-custom-schema/01-alert-block/src/styles.css similarity index 100% rename from examples/06-custom-schema/01-alert-block/styles.css rename to examples/06-custom-schema/01-alert-block/src/styles.css diff --git a/examples/06-custom-schema/02-suggestion-menus-mentions/main.tsx b/examples/06-custom-schema/02-suggestion-menus-mentions/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/06-custom-schema/02-suggestion-menus-mentions/main.tsx +++ b/examples/06-custom-schema/02-suggestion-menus-mentions/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/06-custom-schema/02-suggestion-menus-mentions/App.tsx b/examples/06-custom-schema/02-suggestion-menus-mentions/src/App.tsx similarity index 98% rename from examples/06-custom-schema/02-suggestion-menus-mentions/App.tsx rename to examples/06-custom-schema/02-suggestion-menus-mentions/src/App.tsx index 599950419b..82bbccdf59 100644 --- a/examples/06-custom-schema/02-suggestion-menus-mentions/App.tsx +++ b/examples/06-custom-schema/02-suggestion-menus-mentions/src/App.tsx @@ -12,7 +12,7 @@ import { useCreateBlockNote, } from "@blocknote/react"; -import { Mention } from "./Mention.js"; +import { Mention } from "./Mention"; // Our schema with inline content specs, which contain the configs and // implementations for inline content that we want our editor to use. diff --git a/examples/06-custom-schema/02-suggestion-menus-mentions/Mention.tsx b/examples/06-custom-schema/02-suggestion-menus-mentions/src/Mention.tsx similarity index 100% rename from examples/06-custom-schema/02-suggestion-menus-mentions/Mention.tsx rename to examples/06-custom-schema/02-suggestion-menus-mentions/src/Mention.tsx diff --git a/examples/06-custom-schema/03-font-style/main.tsx b/examples/06-custom-schema/03-font-style/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/06-custom-schema/03-font-style/main.tsx +++ b/examples/06-custom-schema/03-font-style/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/06-custom-schema/03-font-style/App.tsx b/examples/06-custom-schema/03-font-style/src/App.tsx similarity index 99% rename from examples/06-custom-schema/03-font-style/App.tsx rename to examples/06-custom-schema/03-font-style/src/App.tsx index ecd08a6846..4cae9935b1 100644 --- a/examples/06-custom-schema/03-font-style/App.tsx +++ b/examples/06-custom-schema/03-font-style/src/App.tsx @@ -21,7 +21,7 @@ import { import { RiText } from "react-icons/ri"; -import { Font } from "./Font.js"; +import { Font } from "./Font"; // Our schema with style specs, which contain the configs and implementations for styles // that we want our editor to use. diff --git a/examples/06-custom-schema/03-font-style/Font.tsx b/examples/06-custom-schema/03-font-style/src/Font.tsx similarity index 100% rename from examples/06-custom-schema/03-font-style/Font.tsx rename to examples/06-custom-schema/03-font-style/src/Font.tsx diff --git a/examples/06-custom-schema/04-pdf-file-block/main.tsx b/examples/06-custom-schema/04-pdf-file-block/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/06-custom-schema/04-pdf-file-block/main.tsx +++ b/examples/06-custom-schema/04-pdf-file-block/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/06-custom-schema/04-pdf-file-block/App.tsx b/examples/06-custom-schema/04-pdf-file-block/src/App.tsx similarity index 98% rename from examples/06-custom-schema/04-pdf-file-block/App.tsx rename to examples/06-custom-schema/04-pdf-file-block/src/App.tsx index 94b3567cbe..e202bf469b 100644 --- a/examples/06-custom-schema/04-pdf-file-block/App.tsx +++ b/examples/06-custom-schema/04-pdf-file-block/src/App.tsx @@ -15,7 +15,7 @@ import { import { RiFilePdfFill } from "react-icons/ri"; -import { PDF } from "./PDF.js"; +import { PDF } from "./PDF"; // Our schema with block specs, which contain the configs and implementations for blocks // that we want our editor to use. diff --git a/examples/06-custom-schema/04-pdf-file-block/PDF.tsx b/examples/06-custom-schema/04-pdf-file-block/src/PDF.tsx similarity index 100% rename from examples/06-custom-schema/04-pdf-file-block/PDF.tsx rename to examples/06-custom-schema/04-pdf-file-block/src/PDF.tsx diff --git a/examples/06-custom-schema/04-pdf-file-block/styles.css b/examples/06-custom-schema/04-pdf-file-block/src/styles.css similarity index 100% rename from examples/06-custom-schema/04-pdf-file-block/styles.css rename to examples/06-custom-schema/04-pdf-file-block/src/styles.css diff --git a/examples/06-custom-schema/05-alert-block-full-ux/main.tsx b/examples/06-custom-schema/05-alert-block-full-ux/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/06-custom-schema/05-alert-block-full-ux/main.tsx +++ b/examples/06-custom-schema/05-alert-block-full-ux/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/06-custom-schema/05-alert-block-full-ux/Alert.tsx b/examples/06-custom-schema/05-alert-block-full-ux/src/Alert.tsx similarity index 100% rename from examples/06-custom-schema/05-alert-block-full-ux/Alert.tsx rename to examples/06-custom-schema/05-alert-block-full-ux/src/Alert.tsx diff --git a/examples/06-custom-schema/05-alert-block-full-ux/App.tsx b/examples/06-custom-schema/05-alert-block-full-ux/src/App.tsx similarity index 99% rename from examples/06-custom-schema/05-alert-block-full-ux/App.tsx rename to examples/06-custom-schema/05-alert-block-full-ux/src/App.tsx index 9e72f9904a..a3a2969d36 100644 --- a/examples/06-custom-schema/05-alert-block-full-ux/App.tsx +++ b/examples/06-custom-schema/05-alert-block-full-ux/src/App.tsx @@ -18,7 +18,7 @@ import { } from "@blocknote/react"; import { RiAlertFill } from "react-icons/ri"; -import { Alert } from "./Alert.js"; +import { Alert } from "./Alert"; // Our schema with block specs, which contain the configs and implementations for // blocks that we want our editor to use. diff --git a/examples/06-custom-schema/05-alert-block-full-ux/styles.css b/examples/06-custom-schema/05-alert-block-full-ux/src/styles.css similarity index 100% rename from examples/06-custom-schema/05-alert-block-full-ux/styles.css rename to examples/06-custom-schema/05-alert-block-full-ux/src/styles.css diff --git a/examples/06-custom-schema/react-custom-blocks/main.tsx b/examples/06-custom-schema/react-custom-blocks/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/06-custom-schema/react-custom-blocks/main.tsx +++ b/examples/06-custom-schema/react-custom-blocks/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/06-custom-schema/react-custom-blocks/App.tsx b/examples/06-custom-schema/react-custom-blocks/src/App.tsx similarity index 100% rename from examples/06-custom-schema/react-custom-blocks/App.tsx rename to examples/06-custom-schema/react-custom-blocks/src/App.tsx diff --git a/examples/06-custom-schema/react-custom-blocks/styles.css b/examples/06-custom-schema/react-custom-blocks/src/styles.css similarity index 100% rename from examples/06-custom-schema/react-custom-blocks/styles.css rename to examples/06-custom-schema/react-custom-blocks/src/styles.css diff --git a/examples/06-custom-schema/react-custom-inline-content/main.tsx b/examples/06-custom-schema/react-custom-inline-content/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/06-custom-schema/react-custom-inline-content/main.tsx +++ b/examples/06-custom-schema/react-custom-inline-content/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/06-custom-schema/react-custom-inline-content/App.tsx b/examples/06-custom-schema/react-custom-inline-content/src/App.tsx similarity index 100% rename from examples/06-custom-schema/react-custom-inline-content/App.tsx rename to examples/06-custom-schema/react-custom-inline-content/src/App.tsx diff --git a/examples/06-custom-schema/react-custom-styles/main.tsx b/examples/06-custom-schema/react-custom-styles/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/06-custom-schema/react-custom-styles/main.tsx +++ b/examples/06-custom-schema/react-custom-styles/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/06-custom-schema/react-custom-styles/App.tsx b/examples/06-custom-schema/react-custom-styles/src/App.tsx similarity index 100% rename from examples/06-custom-schema/react-custom-styles/App.tsx rename to examples/06-custom-schema/react-custom-styles/src/App.tsx diff --git a/examples/07-collaboration/01-partykit/main.tsx b/examples/07-collaboration/01-partykit/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/07-collaboration/01-partykit/main.tsx +++ b/examples/07-collaboration/01-partykit/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/07-collaboration/01-partykit/App.tsx b/examples/07-collaboration/01-partykit/src/App.tsx similarity index 100% rename from examples/07-collaboration/01-partykit/App.tsx rename to examples/07-collaboration/01-partykit/src/App.tsx diff --git a/examples/07-collaboration/02-liveblocks/main.tsx b/examples/07-collaboration/02-liveblocks/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/07-collaboration/02-liveblocks/main.tsx +++ b/examples/07-collaboration/02-liveblocks/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/07-collaboration/02-liveblocks/App.tsx b/examples/07-collaboration/02-liveblocks/src/App.tsx similarity index 95% rename from examples/07-collaboration/02-liveblocks/App.tsx rename to examples/07-collaboration/02-liveblocks/src/App.tsx index 00083b961f..e523e79dd2 100644 --- a/examples/07-collaboration/02-liveblocks/App.tsx +++ b/examples/07-collaboration/02-liveblocks/src/App.tsx @@ -9,7 +9,7 @@ import "@liveblocks/react-ui/styles.css"; import "@liveblocks/react-ui/styles/dark/media-query.css"; import "@liveblocks/react-tiptap/styles.css"; -import { Editor } from "./Editor.js"; +import { Editor } from "./Editor"; import "./globals.css"; import "./styles.css"; diff --git a/examples/07-collaboration/02-liveblocks/Editor.tsx b/examples/07-collaboration/02-liveblocks/src/Editor.tsx similarity index 93% rename from examples/07-collaboration/02-liveblocks/Editor.tsx rename to examples/07-collaboration/02-liveblocks/src/Editor.tsx index ac78050fa9..2c6da47379 100644 --- a/examples/07-collaboration/02-liveblocks/Editor.tsx +++ b/examples/07-collaboration/02-liveblocks/src/Editor.tsx @@ -4,7 +4,7 @@ import { BlockNoteView } from "@blocknote/mantine"; import "@blocknote/mantine/style.css"; import { useCreateBlockNoteWithLiveblocks } from "@liveblocks/react-blocknote"; -import { Threads } from "./Threads.js"; +import { Threads } from "./Threads"; export function Editor() { const editor = useCreateBlockNoteWithLiveblocks( diff --git a/examples/07-collaboration/02-liveblocks/Threads.tsx b/examples/07-collaboration/02-liveblocks/src/Threads.tsx similarity index 100% rename from examples/07-collaboration/02-liveblocks/Threads.tsx rename to examples/07-collaboration/02-liveblocks/src/Threads.tsx diff --git a/examples/07-collaboration/02-liveblocks/globals.css b/examples/07-collaboration/02-liveblocks/src/globals.css similarity index 100% rename from examples/07-collaboration/02-liveblocks/globals.css rename to examples/07-collaboration/02-liveblocks/src/globals.css diff --git a/examples/07-collaboration/02-liveblocks/styles.css b/examples/07-collaboration/02-liveblocks/src/styles.css similarity index 100% rename from examples/07-collaboration/02-liveblocks/styles.css rename to examples/07-collaboration/02-liveblocks/src/styles.css diff --git a/examples/07-collaboration/03-y-sweet/main.tsx b/examples/07-collaboration/03-y-sweet/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/07-collaboration/03-y-sweet/main.tsx +++ b/examples/07-collaboration/03-y-sweet/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/07-collaboration/03-y-sweet/App.tsx b/examples/07-collaboration/03-y-sweet/src/App.tsx similarity index 100% rename from examples/07-collaboration/03-y-sweet/App.tsx rename to examples/07-collaboration/03-y-sweet/src/App.tsx diff --git a/examples/07-collaboration/04-comments/main.tsx b/examples/07-collaboration/04-comments/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/07-collaboration/04-comments/main.tsx +++ b/examples/07-collaboration/04-comments/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/07-collaboration/04-comments/App.tsx b/examples/07-collaboration/04-comments/src/App.tsx similarity index 98% rename from examples/07-collaboration/04-comments/App.tsx rename to examples/07-collaboration/04-comments/src/App.tsx index 7b3c98de9d..bd11b2539e 100644 --- a/examples/07-collaboration/04-comments/App.tsx +++ b/examples/07-collaboration/04-comments/src/App.tsx @@ -10,8 +10,8 @@ import { useCreateBlockNote } from "@blocknote/react"; import { YDocProvider, useYDoc, useYjsProvider } from "@y-sweet/react"; import { useMemo, useState } from "react"; -import { SettingsSelect } from "./SettingsSelect.js"; -import { HARDCODED_USERS, MyUserType, getRandomColor } from "./userdata.js"; +import { SettingsSelect } from "./SettingsSelect"; +import { HARDCODED_USERS, MyUserType, getRandomColor } from "./userdata"; import "./style.css"; diff --git a/examples/07-collaboration/04-comments/SettingsSelect.tsx b/examples/07-collaboration/04-comments/src/SettingsSelect.tsx similarity index 100% rename from examples/07-collaboration/04-comments/SettingsSelect.tsx rename to examples/07-collaboration/04-comments/src/SettingsSelect.tsx diff --git a/examples/07-collaboration/04-comments/style.css b/examples/07-collaboration/04-comments/src/style.css similarity index 100% rename from examples/07-collaboration/04-comments/style.css rename to examples/07-collaboration/04-comments/src/style.css diff --git a/examples/07-collaboration/04-comments/userdata.ts b/examples/07-collaboration/04-comments/src/userdata.ts similarity index 100% rename from examples/07-collaboration/04-comments/userdata.ts rename to examples/07-collaboration/04-comments/src/userdata.ts diff --git a/examples/07-collaboration/05-comments-with-sidebar/main.tsx b/examples/07-collaboration/05-comments-with-sidebar/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/07-collaboration/05-comments-with-sidebar/main.tsx +++ b/examples/07-collaboration/05-comments-with-sidebar/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/07-collaboration/05-comments-with-sidebar/App.tsx b/examples/07-collaboration/05-comments-with-sidebar/src/App.tsx similarity index 99% rename from examples/07-collaboration/05-comments-with-sidebar/App.tsx rename to examples/07-collaboration/05-comments-with-sidebar/src/App.tsx index 8089a292e7..ed7bf38473 100644 --- a/examples/07-collaboration/05-comments-with-sidebar/App.tsx +++ b/examples/07-collaboration/05-comments-with-sidebar/src/App.tsx @@ -15,8 +15,8 @@ import { import { YDocProvider, useYDoc, useYjsProvider } from "@y-sweet/react"; import { useMemo, useState } from "react"; -import { SettingsSelect } from "./SettingsSelect.js"; -import { HARDCODED_USERS, MyUserType, getRandomColor } from "./userdata.js"; +import { SettingsSelect } from "./SettingsSelect"; +import { HARDCODED_USERS, MyUserType, getRandomColor } from "./userdata"; import "./style.css"; diff --git a/examples/07-collaboration/05-comments-with-sidebar/SettingsSelect.tsx b/examples/07-collaboration/05-comments-with-sidebar/src/SettingsSelect.tsx similarity index 100% rename from examples/07-collaboration/05-comments-with-sidebar/SettingsSelect.tsx rename to examples/07-collaboration/05-comments-with-sidebar/src/SettingsSelect.tsx diff --git a/examples/07-collaboration/05-comments-with-sidebar/style.css b/examples/07-collaboration/05-comments-with-sidebar/src/style.css similarity index 100% rename from examples/07-collaboration/05-comments-with-sidebar/style.css rename to examples/07-collaboration/05-comments-with-sidebar/src/style.css diff --git a/examples/07-collaboration/05-comments-with-sidebar/userdata.ts b/examples/07-collaboration/05-comments-with-sidebar/src/userdata.ts similarity index 100% rename from examples/07-collaboration/05-comments-with-sidebar/userdata.ts rename to examples/07-collaboration/05-comments-with-sidebar/src/userdata.ts diff --git a/examples/07-collaboration/06-ghost-writer/main.tsx b/examples/07-collaboration/06-ghost-writer/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/07-collaboration/06-ghost-writer/main.tsx +++ b/examples/07-collaboration/06-ghost-writer/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/07-collaboration/06-ghost-writer/App.tsx b/examples/07-collaboration/06-ghost-writer/src/App.tsx similarity index 100% rename from examples/07-collaboration/06-ghost-writer/App.tsx rename to examples/07-collaboration/06-ghost-writer/src/App.tsx diff --git a/examples/07-collaboration/06-ghost-writer/styles.css b/examples/07-collaboration/06-ghost-writer/src/styles.css similarity index 100% rename from examples/07-collaboration/06-ghost-writer/styles.css rename to examples/07-collaboration/06-ghost-writer/src/styles.css diff --git a/examples/07-collaboration/07-forking/main.tsx b/examples/07-collaboration/07-forking/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/07-collaboration/07-forking/main.tsx +++ b/examples/07-collaboration/07-forking/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/07-collaboration/07-forking/App.tsx b/examples/07-collaboration/07-forking/src/App.tsx similarity index 100% rename from examples/07-collaboration/07-forking/App.tsx rename to examples/07-collaboration/07-forking/src/App.tsx diff --git a/examples/08-extensions/01-tiptap-arrow-conversion/main.tsx b/examples/08-extensions/01-tiptap-arrow-conversion/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/08-extensions/01-tiptap-arrow-conversion/main.tsx +++ b/examples/08-extensions/01-tiptap-arrow-conversion/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/08-extensions/01-tiptap-arrow-conversion/App.tsx b/examples/08-extensions/01-tiptap-arrow-conversion/src/App.tsx similarity index 98% rename from examples/08-extensions/01-tiptap-arrow-conversion/App.tsx rename to examples/08-extensions/01-tiptap-arrow-conversion/src/App.tsx index dfe1bb6e71..3fbe199ec4 100644 --- a/examples/08-extensions/01-tiptap-arrow-conversion/App.tsx +++ b/examples/08-extensions/01-tiptap-arrow-conversion/src/App.tsx @@ -3,7 +3,7 @@ import { useCreateBlockNote } from "@blocknote/react"; import { BlockNoteView } from "@blocknote/mantine"; import "@blocknote/mantine/style.css"; -import { ArrowConversionExtension } from "./ArrowConversionExtension.js"; +import { ArrowConversionExtension } from "./ArrowConversionExtension"; export default function App() { // Creates a new editor instance. diff --git a/examples/08-extensions/01-tiptap-arrow-conversion/ArrowConversionExtension.ts b/examples/08-extensions/01-tiptap-arrow-conversion/src/ArrowConversionExtension.ts similarity index 100% rename from examples/08-extensions/01-tiptap-arrow-conversion/ArrowConversionExtension.ts rename to examples/08-extensions/01-tiptap-arrow-conversion/src/ArrowConversionExtension.ts diff --git a/examples/09-ai/01-minimal/main.tsx b/examples/09-ai/01-minimal/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/09-ai/01-minimal/main.tsx +++ b/examples/09-ai/01-minimal/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/09-ai/01-minimal/App.tsx b/examples/09-ai/01-minimal/src/App.tsx similarity index 99% rename from examples/09-ai/01-minimal/App.tsx rename to examples/09-ai/01-minimal/src/App.tsx index 3305386186..9f56576e67 100644 --- a/examples/09-ai/01-minimal/App.tsx +++ b/examples/09-ai/01-minimal/src/App.tsx @@ -21,7 +21,8 @@ import { } from "@blocknote/xl-ai"; import { en as aiEn } from "@blocknote/xl-ai/locales"; import "@blocknote/xl-ai/style.css"; -import { getEnv } from "./getEnv.js"; + +import { getEnv } from "./getEnv"; // Optional: proxy requests through the `@blocknote/xl-ai-server` proxy server // so that we don't have to expose our API keys to the client diff --git a/examples/09-ai/01-minimal/getEnv.ts b/examples/09-ai/01-minimal/src/getEnv.ts similarity index 100% rename from examples/09-ai/01-minimal/getEnv.ts rename to examples/09-ai/01-minimal/src/getEnv.ts diff --git a/examples/09-ai/02-playground/main.tsx b/examples/09-ai/02-playground/main.tsx index 6284417d60..677c7f7eed 100644 --- a/examples/09-ai/02-playground/main.tsx +++ b/examples/09-ai/02-playground/main.tsx @@ -1,7 +1,7 @@ // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY import React from "react"; import { createRoot } from "react-dom/client"; -import App from "./App.jsx"; +import App from "./src/App.jsx"; const root = createRoot(document.getElementById("root")!); root.render( diff --git a/examples/09-ai/02-playground/App.tsx b/examples/09-ai/02-playground/src/App.tsx similarity index 98% rename from examples/09-ai/02-playground/App.tsx rename to examples/09-ai/02-playground/src/App.tsx index ba165abb0b..44321e3cf6 100644 --- a/examples/09-ai/02-playground/App.tsx +++ b/examples/09-ai/02-playground/src/App.tsx @@ -7,7 +7,6 @@ import { BlockNoteEditor, filterSuggestionItems } from "@blocknote/core"; import "@blocknote/core/fonts/inter.css"; import { en } from "@blocknote/core/locales"; import { BlockNoteView } from "@blocknote/mantine"; -import "@mantine/core/styles.css"; import "@blocknote/mantine/style.css"; import { FormattingToolbar, @@ -29,13 +28,14 @@ import { import { en as aiEn } from "@blocknote/xl-ai/locales"; import "@blocknote/xl-ai/style.css"; import { Fieldset, MantineProvider, Switch } from "@mantine/core"; - +import "@mantine/core/styles.css"; import { LanguageModelV1 } from "ai"; import { useEffect, useMemo, useState } from "react"; import { useStore } from "zustand"; -import { BasicAutocomplete } from "./AutoComplete.js"; -import RadioGroupComponent from "./components/RadioGroupComponent.js"; -import { getEnv } from "./getEnv.js"; + +import { BasicAutocomplete } from "./AutoComplete"; +import RadioGroupComponent from "./components/RadioGroupComponent"; +import { getEnv } from "./getEnv"; // Optional: proxy requests through the `@blocknote/xl-ai-server` proxy server // so that we don't have to expose our API keys to the client const client = createBlockNoteAIClient({ diff --git a/examples/09-ai/02-playground/AutoComplete.tsx b/examples/09-ai/02-playground/src/AutoComplete.tsx similarity index 95% rename from examples/09-ai/02-playground/AutoComplete.tsx rename to examples/09-ai/02-playground/src/AutoComplete.tsx index 8503c91f1d..ffa968d811 100644 --- a/examples/09-ai/02-playground/AutoComplete.tsx +++ b/examples/09-ai/02-playground/src/AutoComplete.tsx @@ -1,5 +1,5 @@ import { Combobox, TextInput, useCombobox } from "@mantine/core"; -import { AI_MODELS } from "./data/aimodels.js"; +import { AI_MODELS } from "./data/aimodels"; // https://mantine.dev/combobox/?e=BasicAutocomplete // This is used for the AI Model selector in the example @@ -31,7 +31,8 @@ export function BasicAutocomplete(props: { combobox.closeDropdown(); }} store={combobox} - withinPortal={false}> + withinPortal={false} + > = ({ {items.map((item) => ( - // TODO: doesn't work well with our mantive version or styles + // TODO: doesn't work well with our mantine version or styles // + +You'll need something like [ngrok](https://ngrok.com/) to expose your local server to the internet. + +```bash +ngrok http http://localhost:3000 +``` + +You'll need the webhook to point to ngrok like so: + +``` +https://0000-00-00-000-00.ngrok-free.app/api/auth/polar/webhooks +``` + +With this webhook pointing to your local server, you should be able to test payments. + +### Email sending + +Note, this is not required, if email sending is not configured, the app will log the email it would send to the console. Often this is more convenient for development. + +To test email sending, you can set the following environment variables: + +```bash +SMTP_HOST= +SMTP_USER= +SMTP_PASS= +SMTP_PORT= +SMTP_SECURE=false +``` + +When configured, you'll be able to send emails to the email address you've configured. + +To setup with protonmail, you'll need to go to and create a new SMTP submission token. + +You'll need to set the following environment variables: + +```bash +SMTP_HOST=smtp.protonmail.com +SMTP_USER=my.email@protonmail.com +SMTP_PASS=my-smtp-token +SMTP_PORT=587 +SMTP_SECURE=false +``` diff --git a/fumadocs/README.md b/fumadocs/README.md new file mode 100644 index 0000000000..ec0577e219 --- /dev/null +++ b/fumadocs/README.md @@ -0,0 +1,21 @@ +# BlockNote Docs + +This is the code for the [BlockNote documentation website](https://www.blocknotejs.org). + +If you're looking to work on BlockNote itself, check the [`packages`](/packages/) folder. + +## Getting Started + +First, run `npm run build` in the repository root. + +Next, run the development server: + +```bash +npm run dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +## Merging + +Open a pull request to the [BlockNote GitHub repo](https://github.com/TypeCellOS/BlockNote). Pull requests will automatically be deployed to a preview environment. diff --git a/fumadocs/app/(home)/community/Community.tsx b/fumadocs/app/(home)/community/Community.tsx new file mode 100644 index 0000000000..f17a69c923 --- /dev/null +++ b/fumadocs/app/(home)/community/Community.tsx @@ -0,0 +1,20 @@ +import { FC } from "react"; +import { Contributors } from "@/app/(home)/community/Contributors"; +import { Section } from "@/components/Section"; +import { Sponsors } from "@/app/(home)/community/Sponsors"; +import { SectionIntro } from "@/components/Headings"; + +export const Community: FC = () => ( +
+
+ + + +
+
+); diff --git a/fumadocs/app/(home)/community/Contributors.tsx b/fumadocs/app/(home)/community/Contributors.tsx new file mode 100644 index 0000000000..0b15e9c90e --- /dev/null +++ b/fumadocs/app/(home)/community/Contributors.tsx @@ -0,0 +1,132 @@ +import Image from "next/image"; +import Link from "next/link"; +import { RiDiscordFill, RiGithubFill } from "react-icons/ri"; +import { SectionSubHeader } from "@/components/Headings"; +import { JoinButton } from "@/app/(home)/community/JoinButton"; +import { FadeIn } from "@/components/FadeIn"; + +// TODO: Use GitHub API +function fetchContributors(): { username: string; avatarUrl: string }[] { + return [ + { + username: "YousefED", + avatarUrl: "https://avatars.githubusercontent.com/u/368857?v=4", + }, + { + username: "17Amir17", + avatarUrl: "https://avatars.githubusercontent.com/u/36531255?v=4", + }, + { + username: "matthewlipski", + avatarUrl: "https://avatars.githubusercontent.com/u/50169049?v=4", + }, + { + username: "GuySerfaty", + avatarUrl: "https://avatars.githubusercontent.com/u/17720782?v=4", + }, + { + username: "tomeryp", + avatarUrl: "https://avatars.githubusercontent.com/u/4117403?v=4", + }, + { + username: "horacioh", + avatarUrl: "https://avatars.githubusercontent.com/u/725120?v=4", + }, + { + username: "i-am-chitti", + avatarUrl: "https://avatars.githubusercontent.com/u/60139930?v=4", + }, + { + username: "DAlperin", + avatarUrl: "https://avatars.githubusercontent.com/u/16063713?v=4", + }, + { + username: "tensor-tian", + avatarUrl: "https://avatars.githubusercontent.com/u/101185214?v=4", + }, + { + username: "sudarshanshenoy", + avatarUrl: "https://avatars.githubusercontent.com/u/13462896?v=4", + }, + { + username: "cuire", + avatarUrl: "https://avatars.githubusercontent.com/u/81014305?v=4", + }, + { + username: "fogle", + avatarUrl: "https://avatars.githubusercontent.com/u/39360?v=4", + }, + { + username: "richmengsix", + avatarUrl: "https://avatars.githubusercontent.com/u/2321921?v=4", + }, + { + username: "PhilipWillms", + avatarUrl: "https://avatars.githubusercontent.com/u/44462043?v=4", + }, + { + username: "niclas-j", + avatarUrl: "https://avatars.githubusercontent.com/u/35239311?v=4", + }, + { + username: "danlgz", + avatarUrl: "https://avatars.githubusercontent.com/u/26347085?v=4", + }, + { + username: "CTNicholas", + avatarUrl: "https://avatars.githubusercontent.com/u/33033422?v=4", + }, + { + username: "charlesfrisbee", + avatarUrl: "https://avatars.githubusercontent.com/u/32081962?v=4", + }, + ]; +} + +export const Contributors = () => ( +
+ + Contributors + + + {fetchContributors().map((contributor) => ( + // + + {`${contributor.username} + + // + ))} + + + } + linkTitle={"See our repository"} + linkUrl={"https://github.com/TypeCellOS/BlockNote"} + /> + } + linkTitle={"Join our Server"} + linkUrl={"https://discord.gg/Qc2QTTH5dF"} + /> + +
+); diff --git a/fumadocs/app/(home)/community/JoinButton.tsx b/fumadocs/app/(home)/community/JoinButton.tsx new file mode 100644 index 0000000000..ec1ce485c3 --- /dev/null +++ b/fumadocs/app/(home)/community/JoinButton.tsx @@ -0,0 +1,56 @@ +import Link from "next/link"; +import { ReactNode } from "react"; + +export const JoinButton = (props: { + text: string; + subtext: string; + icon: ReactNode; + linkTitle: string; + linkUrl: string; +}) => { + return ( +
+
{props.icon}
+
+

+ {props.text} +

+

{props.subtext}

+
+ + {props.linkTitle + " "} + + + + +
+ ); +}; diff --git a/fumadocs/app/(home)/community/SponsorCard.tsx b/fumadocs/app/(home)/community/SponsorCard.tsx new file mode 100644 index 0000000000..eaaa2ce8ea --- /dev/null +++ b/fumadocs/app/(home)/community/SponsorCard.tsx @@ -0,0 +1,32 @@ +import ThemedImage from "@/components/ThemedImage"; +import Image from "next/image"; + +export type SponsorCardProps = { + name: string; + logo: { + light: Parameters[0]["src"]; + dark: Parameters[0]["src"]; + }; + link: string; + tagline?: string; +}; + +export function SponsorCard(props: SponsorCardProps) { + return ( + + + {props.tagline && ( +
+ {props.tagline} +
+ )} +
+ ); +} diff --git a/fumadocs/app/(home)/community/Sponsors.tsx b/fumadocs/app/(home)/community/Sponsors.tsx new file mode 100644 index 0000000000..1dcf1cbb05 --- /dev/null +++ b/fumadocs/app/(home)/community/Sponsors.tsx @@ -0,0 +1,143 @@ +import { + SponsorCard, + SponsorCardProps, +} from "@/app/(home)/community/SponsorCard"; +import { FadeIn } from "@/components/FadeIn"; +import { SectionSubHeader } from "@/components/Headings"; + +import agree from "@/public/img/sponsors/agree.png"; +import atuin from "@/public/img/sponsors/atuin.png"; +import capitolDark from "@/public/img/sponsors/capitolDark.svg"; +import capitolLight from "@/public/img/sponsors/capitolLight.svg"; +import deepOrigin from "@/public/img/sponsors/deepOrigin.svg"; +import dinumDark from "@/public/img/sponsors/dinumDark.svg"; +import dinumLight from "@/public/img/sponsors/dinumLight.svg"; +import fermatDark from "@/public/img/sponsors/fermatDark.svg"; +import fermatLight from "@/public/img/sponsors/fermatLight.svg"; +import nlnetDark from "@/public/img/sponsors/nlnetDark.svg"; +import nlnetLight from "@/public/img/sponsors/nlnetLight.svg"; +import notePlanDark from "@/public/img/sponsors/notePlanDark.png"; +import notePlanLight from "@/public/img/sponsors/notePlanLight.png"; +import poggioDark from "@/public/img/sponsors/poggioDark.svg"; +import poggioLight from "@/public/img/sponsors/poggioLight.svg"; +import twentyDark from "@/public/img/sponsors/twentyDark.png"; +import twentyLight from "@/public/img/sponsors/twentyLight.png"; +import typeCellDark from "@/public/img/sponsors/typeCellDark.svg"; +import typeCellLight from "@/public/img/sponsors/typeCellLight.svg"; +import zendis from "@/public/img/sponsors/zendis.svg"; + +export const sponsorsCardData: SponsorCardProps[] = [ + { + logo: { + light: agree, + dark: agree, + }, + name: "Agree", + link: "https://agree.com/", + }, + { + logo: { + light: atuin, + dark: atuin, + }, + name: "Atuin", + link: "https://atuin.sh/", + }, + { + logo: { + light: capitolLight, + dark: capitolDark, + }, + name: "Capitol", + link: "https://www.capitol.ai/", + }, + { + logo: { + light: deepOrigin, + dark: deepOrigin, + }, + name: "Deep Origin", + link: "https://www.deeporigin.com/", + }, + { + logo: { + light: dinumLight, + dark: dinumDark, + }, + name: "DINUM", + link: "https://www.numerique.gouv.fr/dinum/", + }, + { + logo: { + light: fermatLight, + dark: fermatDark, + }, + name: "Fermat", + link: "https://fermat.app/", + }, + { + logo: { + light: nlnetLight, + dark: nlnetDark, + }, + name: "NLNet", + link: "https://nlnet.nl/", + }, + { + logo: { + light: notePlanLight, + dark: notePlanDark, + }, + name: "NotePlan", + link: "https://noteplan.co/", + tagline: "Apple Top Notes Apps", + }, + { + logo: { + light: poggioLight, + dark: poggioDark, + }, + name: "Poggio", + link: "https://poggio.io/", + }, + { + logo: { + light: twentyLight, + dark: twentyDark, + }, + name: "Twenty", + link: "https://twenty.com/", + tagline: "YC S23", + }, + { + logo: { + light: typeCellLight, + dark: typeCellDark, + }, + name: "TypeCell", + link: "https://www.typecell.org/", + }, + { + logo: { + light: zendis, + dark: zendis, + }, + name: "ZenDiS", + link: "https://zendis.de/", + }, +]; + +export function Sponsors() { + return ( +
+ + Sponsors & users + + + {sponsorsCardData.map((sponsor) => ( + + ))} + +
+ ); +} diff --git a/fumadocs/app/(home)/faq/FAQ.tsx b/fumadocs/app/(home)/faq/FAQ.tsx new file mode 100644 index 0000000000..f4fe21e0c1 --- /dev/null +++ b/fumadocs/app/(home)/faq/FAQ.tsx @@ -0,0 +1,65 @@ +import { SectionIntro } from "@/components/Headings"; +import { Section } from "@/components/Section"; +import Link from "next/link"; + +const faqs = [ + { + id: 1, + question: "Isn't it easier to use a Headless editor framework?", + answer: `There are a number of really powerful headless text editor frameworks available. In fact, BlockNote is built on Prosemirror and TipTap. + However, even when using a headless library, it takes several months and requires deep expertise to build a fully-featured editor with a polished UI that your users expect.`, + }, + { + id: 2, + question: "Is BlockNote ready for production use?", + answer: `BlockNote is used by several companies in production. Also, we didn't reinvent the wheel. The core editor is built on top of Prosemirror - a battle tested framework that powers software from Atlassian, Gitlab, the New York Times, and many others.`, + }, + { + id: 3, + question: "Can I add my own extensions to BlockNote?", + answer: `BlockNote comes with lot of functionality out-of-the-box, but we understand that every use case is different. You can easily customize the built-in UI Components, or create your own custom Blocks, Inline Content, and Styles. + If you want to go even further, you can extend the core editor with additional Prosemirror or TipTap plugins.`, + }, + { + id: 4, + question: "Is BlockNote really free?", + answer: `100% of BlockNote is open source. While the library is free, we offer paid consultancy and support services to help sustain BlockNote. + If you are using BlockNote in a commercial project, we encourage to sign up for BlockNote Pro!`, + }, +]; + +export function FAQ() { + return ( +
+
+ + More questions? Reach out to our team. + + } + /> + + {/*

+ Frequently asked questions +

+

+ More questions? Reach out to our team. +

*/} +
+ {faqs.map((faq) => ( +
+
+ {faq.question} +
+
+ {faq.answer} +
+
+ ))} +
+
+
+ ); +} diff --git a/fumadocs/app/(home)/features/FeatureCard.tsx b/fumadocs/app/(home)/features/FeatureCard.tsx new file mode 100644 index 0000000000..5fa2b855bb --- /dev/null +++ b/fumadocs/app/(home)/features/FeatureCard.tsx @@ -0,0 +1,50 @@ +import ThemedImage from "@/components/ThemedImage"; +import Image from "next/image"; +import { IconType } from "react-icons"; + +export type FeatureCardProps = { + title: string; + description: string; + icon: IconType; + thumbnail?: { + light: Parameters[0]["src"]; + dark: Parameters[0]["src"]; + }; +}; + +export function FeatureCard(props: FeatureCardProps) { + const Icon = props.icon; + + return ( +
+ {props.thumbnail && ( +
+ +
+ )} +
+
+ +
+
+
+ {props.title} +
+
+ {props.description} +
+
+
+
+ ); +} diff --git a/fumadocs/app/(home)/features/Features.tsx b/fumadocs/app/(home)/features/Features.tsx new file mode 100644 index 0000000000..713e274739 --- /dev/null +++ b/fumadocs/app/(home)/features/Features.tsx @@ -0,0 +1,127 @@ +import { + RiMenuAddFill, + RiPaintBrushFill, + RiTeamFill, + RiIndentIncrease, + RiSettings3Fill, +} from "react-icons/ri"; +import { + BiLogoTypescript, + BiLogoJavascript, + BiLogoMarkdown, + BiSolidWrench, +} from "react-icons/bi"; +import { Section } from "@/components/Section"; +import { + FeatureCard, + FeatureCardProps, +} from "@/app/(home)/features/FeatureCard"; +import { FadeIn } from "@/components/FadeIn"; +import { SectionIntro } from "@/components/Headings"; + +import worksOutOfTheBoxLight from "@/public/img/features/works_out_of_the_box_light.gif"; +import worksOutOfTheBoxDark from "@/public/img/features/works_out_of_the_box_dark.gif"; +import blockBasedDesignLight from "@/public/img/features/block_based_design_light.gif"; +import blockBasedDesignDark from "@/public/img/features/block_based_design_dark.gif"; +import collaborationLight from "@/public/img/features/collaboration_light.gif"; +import collaborationDark from "@/public/img/features/collaboration_dark.gif"; + +export const featuresCardData: FeatureCardProps[] = [ + { + title: "Works out of the box", + description: + "Built-in components like menus and toolbars instantly provide a familiar, Notion-style user experience - but are also fully customizable.", + icon: RiSettings3Fill, + thumbnail: { + light: worksOutOfTheBoxLight, + dark: worksOutOfTheBoxDark, + }, + }, + { + title: "Block-based design", + description: + "Drag, drop, or nest blocks. The block-based design enables users to create beautiful docs and unlocks a powerful API for engineers.", + icon: RiIndentIncrease, + thumbnail: { + light: blockBasedDesignLight, + dark: blockBasedDesignDark, + }, + }, + { + title: "Collaboration", + description: + "Craft beautiful multiplayer experiences with support for real-time collaboration.", + icon: RiTeamFill, + thumbnail: { + light: collaborationLight, + dark: collaborationDark, + }, + }, + { + title: "Extensibility", + description: + "Want to go next level? Extend the editor with custom blocks, schemas, and plugins.", + icon: RiMenuAddFill, + }, + { + title: "First-class Typescript support", + description: + "Get full type safety and autocompletion even when extending your editor with custom blocks and schemas.", + icon: BiLogoTypescript, + }, + { + title: "Theming", + description: + "Customize the look and feel of your editor to match your brand. Built-in support for light & dark modes.", + icon: RiPaintBrushFill, + }, + { + title: "Markdown & HTML", + description: + "Convert documents from BlockNote JSON to and from Markdown and HTML.", + icon: BiLogoMarkdown, + }, + { + title: "Prosemirror based", + description: + "Builds on top of the battle-tested Prosemirror, but without the steep learning curve.", + icon: BiSolidWrench, + }, + { + title: "Vanilla JS", + description: + "Not using React? BlockNote also works with vanilla JS for use with other frameworks.", + icon: BiLogoJavascript, + }, +]; + +export function Features() { + return ( +
+
+ + + {featuresCardData.map((feature) => ( + + ))} + {/*

...and more: (TODO)

+
    +
  • Helpful Placeholders
  • +
  • Smooth Animations
  • +
  • Image Uploads
  • +
  • Resizable Tables
  • +
*/} +
+
+
+ ); +} diff --git a/fumadocs/app/(home)/hero/Demo.tsx b/fumadocs/app/(home)/hero/Demo.tsx new file mode 100644 index 0000000000..b2c6fd4be2 --- /dev/null +++ b/fumadocs/app/(home)/hero/Demo.tsx @@ -0,0 +1,32 @@ +"use client"; + +import dynamic from "next/dynamic"; +import ThemedImage from "@/components/ThemedImage"; +import tryHereImageDark from "@/public/img/assets/try.dark.svg"; +import tryHereImageLight from "@/public/img/assets/try.svg"; + +function TryHereImage() { + return ( + + ); +} + +const DemoEditor = dynamic(() => import("@/app/(home)/hero/DemoEditor"), { + ssr: false, +}); + +export function Demo() { + return ( +
+
+
+ +
+ +
+ ); +} diff --git a/fumadocs/app/(home)/hero/DemoEditor.tsx b/fumadocs/app/(home)/hero/DemoEditor.tsx new file mode 100644 index 0000000000..3712a843ce --- /dev/null +++ b/fumadocs/app/(home)/hero/DemoEditor.tsx @@ -0,0 +1,143 @@ +import { + BlockNoteSchema, + combineByGroup, + filterSuggestionItems, + uploadToTmpFilesDotOrg_DEV_ONLY, +} from "@blocknote/core"; +import * as locales from "@blocknote/core/locales"; +import "@blocknote/core/fonts/inter.css"; +import { + getDefaultReactSlashMenuItems, + SuggestionMenuController, + useCreateBlockNote, +} from "@blocknote/react"; +import { BlockNoteView } from "@blocknote/mantine"; +import { + getMultiColumnSlashMenuItems, + locales as multiColumnLocales, + multiColumnDropCursor, + withMultiColumn, +} from "@blocknote/xl-multi-column"; +import "@blocknote/mantine/style.css"; +import { useTheme } from "next-themes"; +import { useCallback, useMemo, useState } from "react"; +import YPartyKitProvider from "y-partykit/provider"; +import * as Y from "yjs"; + +const colors = [ + "#958DF1", + "#F98181", + "#FBBC88", + "#FAF594", + "#70CFF8", + "#94FADB", + "#B9F18D", +]; +const names = [ + "Lorem Ipsumovich", + "Typy McTypeface", + "Collabo Rative", + "Edito Von Editz", + "Wordsworth Writywrite", + "Docu D. Mentor", + "Scrivener Scribblesworth", + "Digi Penman", + "Ernest Wordway", + "Sir Typalot", + "Comic Sans-Serif", + "Miss Spellcheck", + "Bullet Liston", + "Autonomy Backspace", + "Ctrl Zedson", +]; + +const getRandomElement = (list: any[]) => + list[Math.floor(Math.random() * list.length)]; + +const getRandomColor = () => getRandomElement(colors); +const getRandomName = () => getRandomElement(names); + +function getUTCDateYYYYMMDD() { + const now = new Date(); + const year = now.getUTCFullYear(); + const month = now.getUTCMonth() + 1; // January is 0 + const day = now.getUTCDate(); + + // Add leading zeros to month and day if needed + const formattedMonth = month < 10 ? `0${month}` : `${month}`; + const formattedDay = day < 10 ? `0${day}` : `${day}`; + + return `${year}${formattedMonth}${formattedDay}`; +} + +export default function DemoEditor() { + const { resolvedTheme } = useTheme(); + + const [doc, provider] = useMemo(() => { + const doc = new Y.Doc(); + const provider = new YPartyKitProvider( + "blocknote.yousefed.partykit.dev", + // "127.0.0.1:1999", // (dev server) + "homepage-" + getUTCDateYYYYMMDD(), + doc, + ); + return [doc, provider]; + }, []); + + const editor = useCreateBlockNote( + { + dictionary: { + ...locales.en, + multi_column: multiColumnLocales.en, + }, + schema: withMultiColumn(BlockNoteSchema.create()), + dropCursor: multiColumnDropCursor, + collaboration: { + provider, + fragment: doc.getXmlFragment("blocknote"), + user: { + name: getRandomName(), + color: getRandomColor(), + }, + }, + uploadFile: uploadToTmpFilesDotOrg_DEV_ONLY, + }, + [], + ); + + const [warningShown, setWarningShown] = useState(false); + + const focus = useCallback(() => { + if (!warningShown) { + alert( + "Text you enter in this demo is displayed publicly on the internet to show multiplayer features. Be kind :)", + ); + setWarningShown(true); + } + }, [warningShown]); + + const getSlashMenuItems = useMemo(() => { + return async (query: string) => + filterSuggestionItems( + combineByGroup( + getDefaultReactSlashMenuItems(editor), + getMultiColumnSlashMenuItems(editor), + ), + query, + ); + }, [editor]); + + return ( + + + + ); +} diff --git a/fumadocs/app/(home)/hero/Hero.tsx b/fumadocs/app/(home)/hero/Hero.tsx new file mode 100644 index 0000000000..69bf537563 --- /dev/null +++ b/fumadocs/app/(home)/hero/Hero.tsx @@ -0,0 +1,22 @@ +import { Section } from "@/components/Section"; +import { Text } from "@/app/(home)/hero/Text"; +import { Demo } from "@/app/(home)/hero/Demo"; +import { FadeIn } from "@/components/FadeIn"; + +import "./styles.css"; + +export function Hero() { + return ( +
+ + + + +
+ ); +} diff --git a/fumadocs/app/(home)/hero/Text.tsx b/fumadocs/app/(home)/hero/Text.tsx new file mode 100644 index 0000000000..6f6aa8fd06 --- /dev/null +++ b/fumadocs/app/(home)/hero/Text.tsx @@ -0,0 +1,25 @@ +import { HeroText, SectionSubtext } from "@/components/Headings"; +import CTAButton from "@/components/CTAButton"; + +export function Text() { + return ( +
+
+ + The open source +
+ Block-Based +
+ rich text editor +
+ + A beautiful text editor that just works. Easily add an editor to your + app that users will love. Customize it with your own functionality like + custom blocks or AI tooling. + + + Get Started + +
+ ); +} diff --git a/fumadocs/app/(home)/hero/styles.css b/fumadocs/app/(home)/hero/styles.css new file mode 100644 index 0000000000..191d2d2bf4 --- /dev/null +++ b/fumadocs/app/(home)/hero/styles.css @@ -0,0 +1,23 @@ +.hero-demo { + @media only screen and (hover: none) and (pointer: coarse) { + display: none; /* disable on mobile */ + } +} + +.hero-demo .bn-container, +.hero-demo .bn-editor { + height: 100%; +} + +.hero-demo .bn-editor { + overflow: auto; + min-height: 100%; + /* Removes focus outline */ + box-shadow: none !important; + padding-block: 1rem; +} + +.hero-demo a { + color: revert; + text-decoration: revert; +} diff --git a/fumadocs/app/(home)/layout.tsx b/fumadocs/app/(home)/layout.tsx new file mode 100644 index 0000000000..235258e8c5 --- /dev/null +++ b/fumadocs/app/(home)/layout.tsx @@ -0,0 +1,13 @@ +import type { ReactNode } from "react"; +import { HomeLayout } from "fumadocs-ui/layouts/home"; +import { baseOptions } from "@/app/layout.config"; +import { Footer } from "@/components/Footer"; + +export default function Layout({ children }: { children: ReactNode }) { + return ( + <> + {children} +