Skip to content

Commit

Permalink
Merge pull request #600 from TypeCellOS/separate-font
Browse files Browse the repository at this point in the history
separate inter font
  • Loading branch information
YousefED authored Mar 5, 2024
2 parents 98a65e9 + 2fde96e commit 3e18130
Show file tree
Hide file tree
Showing 61 changed files with 45 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ See our homepage @ [https://www.blocknotejs.org](https://www.blocknotejs.org/) o

```typescript
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/core/fonts/inter.css";
import "@blocknote/react/style.css";

function App() {
Expand Down
1 change: 1 addition & 0 deletions docs/components/pages/landing/hero/Demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useCallback, useMemo, useState } from "react";
Expand Down
1 change: 1 addition & 0 deletions docs/pages/docs/advanced/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Make sure to use BlockNote in a [Client Component](https://nextjs.org/docs/getti
```typescript jsx
"use client"; // this registers <Editor> as a Client Component
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/core/fonts/inter.css";
import "@blocknote/react/style.css";

// Our <Editor> component we can reuse later
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ With the `useCreateBlockNote` hook, we can create a new editor instance, then us

<Example name="basic/minimal" />

We also import `@blocknote/react/style.css` to add default styling for the editor.
We also import `@blocknote/react/style.css` to add default styling for the editor and the `Inter` font that BlockNote exports (optional).

<Callout type="warning" emoji={""}>
<strong>Next.js usage (or other server-side React frameworks)</strong>
Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/01-minimal/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/02-block-objects/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Block } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useState } from "react";
Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/03-all-blocks/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/05-block-manipulation/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/06-file-uploading/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/07-saving-loading/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Block, BlockNoteEditor, PartialBlock } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useEffect, useMemo, useState } from "react";
Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/testing/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/02-ui-components/01-ui-elements-remove/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BasicTextStyleButton,
BlockNoteView,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { BlockNoteSchema, defaultBlockSpecs } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
BlockTypeDropdownItem,
blockTypeDropdownItems,
FormattingToolbar,
FormattingToolbarController,
blockTypeDropdownItems,
useCreateBlockNote,
} from "@blocknote/react";
import "@blocknote/react/style.css";
Expand Down
1 change: 1 addition & 0 deletions examples/02-ui-components/04-side-menu-buttons/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
DragHandleButton,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockColorsItem,
BlockNoteView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
filterSuggestionItems,
PartialBlock,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
DefaultReactSuggestionItem,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
DefaultReactSuggestionItem,
Expand Down
1 change: 1 addition & 0 deletions examples/02-ui-components/08-custom-ui/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { filterSuggestionItems } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
getDefaultReactSlashMenuItems,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
HyperlinkToolbar,
Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/01-theming-dom-attributes/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/02-changing-font/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/03-theming-css/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/04-theming-css-variables/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/05-theming-css-variables-code/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
darkDefaultTheme,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { ChangeEvent, useCallback, useEffect } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { ChangeEvent, useCallback, useEffect } from "react";
Expand Down
1 change: 1 addition & 0 deletions examples/05-custom-schema/01-alert-block/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
filterSuggestionItems,
insertOrUpdateBlock,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
SuggestionMenuController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
defaultInlineContentSpecs,
filterSuggestionItems,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
DefaultReactSuggestionItem,
Expand Down
1 change: 1 addition & 0 deletions examples/05-custom-schema/03-font-style/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BlockNoteSchema, defaultStyleSpecs } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BasicTextStyleButton,
BlockNoteView,
Expand Down
1 change: 1 addition & 0 deletions examples/05-custom-schema/react-custom-blocks/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
defaultBlockSpecs,
defaultProps,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
createReactBlockSpec,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BlockNoteSchema, defaultInlineContentSpecs } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
createReactInlineContentSpec,
Expand Down
1 change: 1 addition & 0 deletions examples/05-custom-schema/react-custom-styles/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BlockNoteSchema, defaultStyleSpecs } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
createReactStyleSpec,
Expand Down
1 change: 1 addition & 0 deletions examples/06-collaboration/01-partykit/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import YPartyKitProvider from "y-partykit/provider";
Expand Down
1 change: 1 addition & 0 deletions examples/06-collaboration/02-liveblocks/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { createClient } from "@liveblocks/client";
Expand Down
1 change: 1 addition & 0 deletions examples/vanilla-js/react-vanilla-custom-blocks/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
defaultBlockSpecs,
defaultProps,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
createInlineContentSpec,
defaultInlineContentSpecs,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/vanilla-js/react-vanilla-custom-styles/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
createStyleSpec,
defaultStyleSpecs,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
FormattingToolbar,
Expand Down
4 changes: 4 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
"./style.css": {
"import": "./dist/style.css",
"require": "./dist/style.css"
},
"./fonts/inter.css": {
"import": "./src/fonts/inter.css",
"require": "./src/fonts/inter.css"
}
},
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/editor/editor.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import url("../assets/fonts-inter.css");
@import url("prosemirror-tables/style/tables.css");

.bn-editor {
Expand Down
File renamed without changes.

0 comments on commit 3e18130

Please sign in to comment.