Skip to content

Commit 023cdbe

Browse files
Merge branch 'main' into support-h4-h6
2 parents c4ba1bc + 28edc69 commit 023cdbe

File tree

42 files changed

+172
-68
lines changed

Some content is hidden

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

42 files changed

+172
-68
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
## 0.31.3 (2025-06-18)
2+
3+
### 🩹 Fixes
4+
5+
- AI generation with empty document ([#1740](https://github.com/TypeCellOS/BlockNote/pull/1740))
6+
- do not send a welcome email if magic link was used on an account older than a minute ago ([db88fe4aa](https://github.com/TypeCellOS/BlockNote/commit/db88fe4aa))
7+
- AI system messages should always be at start of prompt ([#1741](https://github.com/TypeCellOS/BlockNote/pull/1741))
8+
- Selection clicking editor padding ([#1717](https://github.com/TypeCellOS/BlockNote/pull/1717))
9+
- preserve marks across a shift+enter #1672 ([#1743](https://github.com/TypeCellOS/BlockNote/pull/1743), [#1672](https://github.com/TypeCellOS/BlockNote/issues/1672))
10+
- **ai:** undo-redo after accepting/rejecting changes will undo as expected ([#1752](https://github.com/TypeCellOS/BlockNote/pull/1752))
11+
- **locales:** add translations for some comment strings ([#1764](https://github.com/TypeCellOS/BlockNote/pull/1764))
12+
- **website:** log in bug fixes ([#1742](https://github.com/TypeCellOS/BlockNote/pull/1742))
13+
14+
### ❤️ Thank You
15+
16+
- Matthew Lipski @matthewlipski
17+
- Nick Perez
18+
- Nick the Sick
19+
- Vinicius Fernandes @ViniCleFer
20+
- Yousef
21+
122
## 0.31.2 (2025-06-05)
223

324
### 🩹 Fixes

packages/ariakit/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"directory": "packages/ariakit"
1212
},
1313
"license": "MPL-2.0",
14-
"version": "0.31.2",
14+
"version": "0.31.3",
1515
"files": [
1616
"dist",
1717
"types",
@@ -57,8 +57,8 @@
5757
},
5858
"dependencies": {
5959
"@ariakit/react": "^0.4.3",
60-
"@blocknote/core": "0.31.2",
61-
"@blocknote/react": "0.31.2"
60+
"@blocknote/core": "0.31.3",
61+
"@blocknote/react": "0.31.3"
6262
},
6363
"devDependencies": {
6464
"@types/react": "^18.0.25",

packages/ariakit/src/comments/Comment.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { Group as AriakitGroup } from "@ariakit/react";
22

33
import { assertEmpty } from "@blocknote/core";
4-
import { ComponentProps, useFocusWithin } from "@blocknote/react";
4+
import {
5+
ComponentProps,
6+
useDictionary,
7+
useFocusWithin,
8+
} from "@blocknote/react";
59
import { forwardRef, useState } from "react";
610

711
const AuthorInfo = forwardRef<
@@ -12,6 +16,7 @@ const AuthorInfo = forwardRef<
1216
>
1317
>((props, _ref) => {
1418
const { authorInfo, timeString, edited, ...rest } = props;
19+
const dict = useDictionary();
1520

1621
assertEmpty(rest, false);
1722

@@ -34,7 +39,7 @@ const AuthorInfo = forwardRef<
3439
<div className={"bn-ak-username"}>
3540
{authorInfo.username}
3641
<span>
37-
{timeString} {edited && "(edited)"}
42+
{timeString} {edited && `(${dict.comments.edited})`}
3843
</span>
3944
</div>
4045
</AriakitGroup>

packages/code-block/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"directory": "packages/code-block"
1010
},
1111
"license": "MPL-2.0",
12-
"version": "0.31.2",
12+
"version": "0.31.3",
1313
"files": [
1414
"dist",
1515
"types",
@@ -49,7 +49,7 @@
4949
"test-watch": "vitest watch"
5050
},
5151
"dependencies": {
52-
"@blocknote/core": "0.31.2",
52+
"@blocknote/core": "0.31.3",
5353
"@shikijs/core": "^3.2.1",
5454
"@shikijs/engine-javascript": "^3.2.1",
5555
"@shikijs/langs-precompiled": "^3.2.1",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"directory": "packages/core"
1212
},
1313
"license": "MPL-2.0",
14-
"version": "0.31.2",
14+
"version": "0.31.3",
1515
"files": [
1616
"dist",
1717
"types",

packages/core/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ export const KeyboardShortcutsExtension = Extension.create<{
434434
]);
435435

436436
const handleEnter = (withShift = false) => {
437-
return this.editor.commands.first(({ commands }) => [
437+
return this.editor.commands.first(({ commands, tr }) => [
438438
// Removes a level of nesting if the block is empty & indented, while the selection is also empty & at the start
439439
// of the block.
440440
() =>
@@ -486,9 +486,21 @@ export const KeyboardShortcutsExtension = Extension.create<{
486486
// both enter and shift+enter.
487487
blockHardBreakShortcut === "enter"
488488
) {
489-
return commands.insertContent({
490-
type: "hardBreak",
491-
});
489+
const marks =
490+
tr.storedMarks ||
491+
tr.selection.$head
492+
.marks()
493+
.filter((m) =>
494+
this.editor.extensionManager.splittableMarks.includes(
495+
m.type.name,
496+
),
497+
);
498+
499+
tr.insert(
500+
tr.selection.head,
501+
tr.doc.type.schema.nodes.hardBreak.create(),
502+
).ensureMarks(marks);
503+
return true;
492504
}
493505

494506
return false;

packages/core/src/i18n/locales/ar.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ export const ar: Dictionary = {
338338
},
339339
},
340340
comments: {
341+
edited: "تم التحرير",
342+
save_button_text: "حفظ",
343+
cancel_button_text: "إلغاء",
341344
actions: {
342345
add_reaction: "أضف تفاعلًا",
343346
resolve: "حل",

packages/core/src/i18n/locales/de.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ export const de: Dictionary = {
352352
},
353353
},
354354
comments: {
355+
edited: "bearbeitet",
356+
save_button_text: "Speichern",
357+
cancel_button_text: "Abbrechen",
355358
actions: {
356359
add_reaction: "Reaktion hinzufügen",
357360
resolve: "Lösen",

packages/core/src/i18n/locales/en.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ export const en = {
353353
},
354354
},
355355
comments: {
356+
edited: "edited",
357+
save_button_text: "Save",
358+
cancel_button_text: "Cancel",
356359
actions: {
357360
add_reaction: "Add reaction",
358361
resolve: "Resolve",

packages/core/src/i18n/locales/es.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ export const es: Dictionary = {
351351
},
352352
},
353353
comments: {
354+
edited: "editado",
355+
save_button_text: "Guardar",
356+
cancel_button_text: "Cancelar",
354357
actions: {
355358
add_reaction: "Agregar reacción",
356359
resolve: "Resolver",

0 commit comments

Comments
 (0)