Skip to content

Commit 0b7549f

Browse files
committed
Merge branch 'main' into multi-char-suggestions
2 parents a8687d7 + db88fe4 commit 0b7549f

File tree

302 files changed

+1785
-2006
lines changed

Some content is hidden

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

302 files changed

+1785
-2006
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 0.31.2 (2025-06-05)
2+
3+
### 🩹 Fixes
4+
5+
- re-release ([0bc546e18](https://github.com/TypeCellOS/BlockNote/commit/0bc546e18))
6+
- ignore falsy values in boolean prop schema ([#1730](https://github.com/TypeCellOS/BlockNote/pull/1730))
7+
8+
### ❤️ Thank You
9+
10+
- Nick Perez
11+
- Nick the Sick
12+
113
## 0.31.1 (2025-05-23)
214

315
### 🩹 Fixes

docs/auth.ts

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -223,25 +223,34 @@ export const auth = betterAuth({
223223
// webhooks have to be publicly accessible
224224
// ngrok http http://localhost:3000
225225
secret: process.env.POLAR_WEBHOOK_SECRET as string,
226-
onSubscriptionUpdated: async (payload) => {
227-
const authContext = await auth.$context;
228-
const userId = payload.data.customer.externalId;
229-
if (!userId) {
230-
return;
231-
}
232-
if (payload.data.status === "active") {
233-
const productId = payload.data.product.id;
234-
const planType = Object.values(PRODUCTS).find(
235-
(p) => p.id === productId,
236-
)?.slug;
237-
await authContext.internalAdapter.updateUser(userId, {
238-
planType,
239-
});
240-
} else {
241-
// No active subscription, so we need to remove the plan type
242-
await authContext.internalAdapter.updateUser(userId, {
243-
planType: null,
244-
});
226+
async onPayload(payload) {
227+
switch (payload.type) {
228+
case "subscription.active":
229+
case "subscription.canceled":
230+
case "subscription.updated":
231+
case "subscription.revoked":
232+
case "subscription.created":
233+
case "subscription.uncanceled": {
234+
const authContext = await auth.$context;
235+
const userId = payload.data.customer.externalId;
236+
if (!userId) {
237+
return;
238+
}
239+
if (payload.data.status === "active") {
240+
const productId = payload.data.product.id;
241+
const planType = Object.values(PRODUCTS).find(
242+
(p) => p.id === productId,
243+
)?.slug;
244+
await authContext.internalAdapter.updateUser(userId, {
245+
planType,
246+
});
247+
} else {
248+
// No active subscription, so we need to remove the plan type
249+
await authContext.internalAdapter.updateUser(userId, {
250+
planType: null,
251+
});
252+
}
253+
}
245254
}
246255
},
247256
},
@@ -262,6 +271,15 @@ export const auth = betterAuth({
262271
// After verifying email, send them a welcome email
263272
const newSession = ctx.context.newSession;
264273
if (newSession) {
274+
const oneMinuteAgo = new Date(Date.now() - 60 * 1000);
275+
if (
276+
ctx.path === "/magic-link/verify" &&
277+
newSession.user.createdAt < oneMinuteAgo
278+
) {
279+
// magic link is for an account that was created more than a minute ago, so just a normal sign in
280+
// no need to send welcome email
281+
return false;
282+
}
265283
await sendEmail({
266284
to: newSession.user.email,
267285
template: "welcome",

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.1",
14+
"version": "0.31.2",
1515
"files": [
1616
"dist",
1717
"types",
@@ -57,8 +57,8 @@
5757
},
5858
"dependencies": {
5959
"@ariakit/react": "^0.4.3",
60-
"@blocknote/core": "0.31.1",
61-
"@blocknote/react": "0.31.1"
60+
"@blocknote/core": "0.31.2",
61+
"@blocknote/react": "0.31.2"
6262
},
6363
"devDependencies": {
6464
"@types/react": "^18.0.25",

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.1",
12+
"version": "0.31.2",
1313
"files": [
1414
"dist",
1515
"types",
@@ -49,7 +49,7 @@
4949
"test-watch": "vitest watch"
5050
},
5151
"dependencies": {
52-
"@blocknote/core": "0.31.1",
52+
"@blocknote/core": "0.31.2",
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.1",
14+
"version": "0.31.2",
1515
"files": [
1616
"dist",
1717
"types",

packages/dev-scripts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"directory": "packages/dev-scripts"
99
},
1010
"license": "MPL-2.0",
11-
"version": "0.31.1",
11+
"version": "0.31.2",
1212
"description": "",
1313
"type": "module",
1414
"scripts": {

packages/mantine/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"directory": "packages/mantine"
1212
},
1313
"license": "MPL-2.0",
14-
"version": "0.31.1",
14+
"version": "0.31.2",
1515
"files": [
1616
"dist",
1717
"types",
@@ -56,8 +56,8 @@
5656
"clean": "rimraf dist && rimraf types"
5757
},
5858
"dependencies": {
59-
"@blocknote/core": "0.31.1",
60-
"@blocknote/react": "0.31.1",
59+
"@blocknote/core": "0.31.2",
60+
"@blocknote/react": "0.31.2",
6161
"@mantine/core": "^7.10.1",
6262
"@mantine/hooks": "^7.10.1",
6363
"@mantine/utils": "^6.0.21",

packages/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"directory": "packages/react"
1212
},
1313
"license": "MPL-2.0",
14-
"version": "0.31.1",
14+
"version": "0.31.2",
1515
"files": [
1616
"dist",
1717
"types",
@@ -58,7 +58,7 @@
5858
"clean": "rimraf dist && rimraf types"
5959
},
6060
"dependencies": {
61-
"@blocknote/core": "0.31.1",
61+
"@blocknote/core": "0.31.2",
6262
"@emoji-mart/data": "^1.2.1",
6363
"@floating-ui/react": "^0.26.4",
6464
"@tiptap/core": "^2.12.0",

packages/server-util/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"directory": "packages/server-util"
1212
},
1313
"license": "MPL-2.0",
14-
"version": "0.31.1",
14+
"version": "0.31.2",
1515
"files": [
1616
"dist",
1717
"types",
@@ -56,8 +56,8 @@
5656
"test-watch": "vitest watch"
5757
},
5858
"dependencies": {
59-
"@blocknote/core": "0.31.1",
60-
"@blocknote/react": "0.31.1",
59+
"@blocknote/core": "0.31.2",
60+
"@blocknote/react": "0.31.2",
6161
"@tiptap/core": "^2.12.0",
6262
"@tiptap/pm": "^2.12.0",
6363
"jsdom": "^25.0.1",

packages/shadcn/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"directory": "packages/shadcn"
1212
},
1313
"license": "MPL-2.0",
14-
"version": "0.31.1",
14+
"version": "0.31.2",
1515
"files": [
1616
"dist",
1717
"types",
@@ -56,8 +56,8 @@
5656
"clean": "rimraf dist && rimraf types"
5757
},
5858
"dependencies": {
59-
"@blocknote/core": "0.31.1",
60-
"@blocknote/react": "0.31.1",
59+
"@blocknote/core": "0.31.2",
60+
"@blocknote/react": "0.31.2",
6161
"@hookform/resolvers": "^3.6.0",
6262
"@radix-ui/react-avatar": "^1.1.3",
6363
"@radix-ui/react-dropdown-menu": "^2.0.6",

packages/xl-ai-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"homepage": "https://github.com/TypeCellOS/BlockNote",
44
"private": true,
55
"license": "AGPL-3.0 OR PROPRIETARY",
6-
"version": "0.31.1",
6+
"version": "0.31.2",
77
"files": [
88
"dist",
99
"types",

packages/xl-ai/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"directory": "packages/xl-ai"
1212
},
1313
"license": "AGPL-3.0 OR PROPRIETARY",
14-
"version": "0.31.1",
14+
"version": "0.31.2",
1515
"files": [
1616
"dist",
1717
"types",
@@ -68,10 +68,10 @@
6868
"@ai-sdk/mistral": "^1.2.8",
6969
"@ai-sdk/openai": "^1.3.22",
7070
"@ai-sdk/openai-compatible": "^0.2.14",
71-
"@blocknote/core": "0.31.1",
72-
"@blocknote/mantine": "0.31.1",
71+
"@blocknote/core": "0.31.2",
72+
"@blocknote/mantine": "0.31.2",
7373
"@blocknote/prosemirror-suggest-changes": "^0.1.3",
74-
"@blocknote/react": "0.31.1",
74+
"@blocknote/react": "0.31.2",
7575
"@floating-ui/react": "^0.26.4",
7676
"@tiptap/core": "^2.12.0",
7777
"ai": "^4.3.15",

packages/xl-ai/src/api/LLMRequest.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ export async function doLLMRequest(
152152
: editor.getTextCursorPosition().block;
153153

154154
const deleteCursorBlock: string | undefined =
155-
cursorBlock && deleteEmptyCursorBlock && isEmptyParagraph(cursorBlock)
155+
cursorBlock &&
156+
deleteEmptyCursorBlock &&
157+
isEmptyParagraph(cursorBlock) &&
158+
editor.document.length > 1
156159
? cursorBlock.id
157160
: undefined;
158161

packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/Add heading (h1) and code block_1_112bacb4ae22459e8e8b87c510a5a1ab.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a list (end)_1_fd2cdf7edb597b5eee87ae1b4c9d8a9e.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)