Skip to content

Commit 59bfb11

Browse files
committed
Merge branch 'main' into new-releases
# Conflicts: # examples/editor/package.json # examples/vanilla/package.json # lerna.json # package-lock.json # packages/core/package.json # packages/react/package.json # packages/website/package.json
2 parents 51407af + fe25c15 commit 59bfb11

File tree

230 files changed

+13015
-16729
lines changed

Some content is hidden

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

230 files changed

+13015
-16729
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: yousefed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
<what's going wrong!?>
12+
13+
**To Reproduce**
14+
<links to a sandbox or clear steps to reproduce are super helpful!>
15+
16+
**Misc**
17+
- Node version:
18+
- Package manager:
19+
- Browser:
20+
- [ ] I'm a [sponsor](https://github.com/sponsors/YousefED) and would appreciate if you could look into this sooner than later 💖
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-node@v2
2020
with:
21-
node-version: "16.x"
21+
node-version: "18.x"
2222

2323
- name: Cache node modules
2424
uses: actions/cache@v2

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@ yarn-error.log*
2929
.vercel
3030
test-results/
3131
playwright-report/
32-
release
32+
release
33+
/test-results/
34+
/playwright-report/
35+
/playwright/.cache/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16
1+
v18.16.0

examples/editor/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@blocknote/example-editor",
33
"private": true,
4-
"version": "0.6.2",
4+
"version": "0.8.0",
55
"scripts": {
66
"dev": "vite",
77
"build": "tsc && vite build",
88
"preview": "vite preview",
99
"lint": "eslint src --max-warnings 0"
1010
},
1111
"dependencies": {
12-
"@blocknote/core": "^0.6.2",
13-
"@blocknote/react": "^0.6.2",
12+
"@blocknote/core": "^0.8.0",
13+
"@blocknote/react": "^0.8.0",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"
1616
},
@@ -20,7 +20,7 @@
2020
"@vitejs/plugin-react": "^3.1.0",
2121
"eslint": "^8.10.0",
2222
"eslint-config-react-app": "^7.0.0",
23-
"typescript": "^4.5.4",
23+
"typescript": "^5.0.4",
2424
"vite": "^4.1.2",
2525
"vite-plugin-eslint": "^1.8.1"
2626
},

examples/vanilla/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"name": "@blocknote/example-vanilla",
33
"private": true,
4-
"version": "0.6.2",
4+
"version": "0.8.0",
55
"scripts": {
66
"dev": "vite",
77
"build": "tsc && vite build",
88
"preview": "vite preview",
99
"lint": "eslint src --max-warnings 0"
1010
},
1111
"dependencies": {
12-
"@blocknote/core": "^0.6.2"
12+
"@blocknote/core": "^0.8.0"
1313
},
1414
"devDependencies": {
1515
"eslint": "^8.10.0",
1616
"eslint-config-react-app": "^7.0.0",
17-
"typescript": "^4.5.4",
17+
"typescript": "^5.0.4",
1818
"vite": "^4.1.2",
1919
"vite-plugin-eslint": "^1.8.1"
2020
},

examples/vanilla/src/ui/blockSideMenuFactory.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import { BlockSideMenuFactory } from "@blocknote/core";
1+
import { BlockSideMenuFactory, DefaultBlockSchema } from "@blocknote/core";
22
import { createButton } from "./util";
33

44
/**
55
* This menu is drawn next to a block, when it's hovered over
66
* It renders a drag handle and + button to create a new block
77
*/
8-
export const blockSideMenuFactory: BlockSideMenuFactory = (staticParams) => {
8+
export const blockSideMenuFactory: BlockSideMenuFactory<DefaultBlockSchema> = (
9+
staticParams
10+
) => {
911
const container = document.createElement("div");
1012
container.style.background = "gray";
1113
container.style.position = "absolute";

examples/vanilla/src/ui/formattingToolbarFactory.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { FormattingToolbarFactory } from "@blocknote/core";
1+
import { DefaultBlockSchema, FormattingToolbarFactory } from "@blocknote/core";
22
import { createButton } from "./util";
33

44
/**
55
* This menu is drawn when a piece of text is selected. We can use it to change formatting options
66
* such as bold, italic, indentation, etc.
77
*/
8-
export const formattingToolbarFactory: FormattingToolbarFactory = (
9-
staticParams
10-
) => {
8+
export const formattingToolbarFactory: FormattingToolbarFactory<
9+
DefaultBlockSchema
10+
> = (staticParams) => {
1111
const container = document.createElement("div");
1212
container.style.background = "gray";
1313
container.style.position = "absolute";
@@ -35,7 +35,9 @@ export const formattingToolbarFactory: FormattingToolbarFactory = (
3535
}
3636

3737
boldBtn.text =
38-
"bold" in staticParams.editor.getActiveStyles() ? "unset bold" : "set bold";
38+
"bold" in staticParams.editor.getActiveStyles()
39+
? "unset bold"
40+
: "set bold";
3941
container.style.top = params.referenceRect.y + "px";
4042
container.style.left = params.referenceRect.x + "px";
4143
},

0 commit comments

Comments
 (0)