@blocknote/core 0.35.0 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +7 -25
- package/dist/blocknote.cjs +8 -8
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +1592 -1458
- package/dist/blocknote.js.map +1 -1
- package/dist/{en-Dx9fwHD4.js → en-CvDoFvhc.js} +4 -1
- package/dist/en-CvDoFvhc.js.map +1 -0
- package/dist/{en-CsgPjHa4.cjs → en-ub2yVBX0.cjs} +2 -2
- package/dist/en-ub2yVBX0.cjs.map +1 -0
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +62 -2
- package/dist/locales.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +17 -16
- package/src/api/__snapshots__/blocks-moved-down-twice-in-same-parent.json +44 -0
- package/src/api/__snapshots__/blocks-moved-insert-changes-sibling-order.json +26 -0
- package/src/api/__snapshots__/blocks-moved-nested-sibling-reorder.json +180 -0
- package/src/api/__snapshots__/blocks-moved-up-down-in-same-parent.json +44 -0
- package/src/api/__snapshots__/blocks-moved-up-down-in-same-transaction.json +44 -0
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +132 -4
- package/src/api/clipboard/toClipboard/copyExtension.ts +2 -0
- package/src/api/{nodeUtil.test.ts → getBlocksChangedByTransaction.test.ts} +117 -1
- package/src/api/getBlocksChangedByTransaction.ts +422 -0
- package/src/api/nodeUtil.ts +0 -250
- package/src/blocks/ImageBlockContent/parseImageElement.ts +2 -1
- package/src/blocks/TableBlockContent/TableBlockContent.ts +31 -4
- package/src/blocks/ToggleWrapper/createToggleWrapper.ts +2 -1
- package/src/editor/BlockNoteEditor.ts +1 -1
- package/src/editor/editor.css +8 -17
- package/src/extensions/BlockChange/BlockChangePlugin.ts +4 -2
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +53 -1
- package/src/extensions/SideMenu/SideMenuPlugin.ts +6 -15
- package/src/i18n/locales/ar.ts +3 -0
- package/src/i18n/locales/de.ts +4 -0
- package/src/i18n/locales/en.ts +3 -0
- package/src/i18n/locales/es.ts +3 -0
- package/src/i18n/locales/fr.ts +3 -0
- package/src/i18n/locales/he.ts +3 -0
- package/src/i18n/locales/hr.ts +3 -0
- package/src/i18n/locales/is.ts +3 -0
- package/src/i18n/locales/it.ts +3 -0
- package/src/i18n/locales/ja.ts +3 -0
- package/src/i18n/locales/ko.ts +4 -1
- package/src/i18n/locales/nl.ts +3 -0
- package/src/i18n/locales/no.ts +3 -0
- package/src/i18n/locales/pl.ts +4 -0
- package/src/i18n/locales/pt.ts +3 -0
- package/src/i18n/locales/ru.ts +3 -0
- package/src/i18n/locales/sk.ts +3 -0
- package/src/i18n/locales/uk.ts +3 -0
- package/src/i18n/locales/vi.ts +3 -0
- package/src/i18n/locales/zh-tw.ts +3 -0
- package/src/i18n/locales/zh.ts +3 -0
- package/src/index.ts +1 -0
- package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +16 -3
- package/types/src/api/getBlocksChangedByTransaction.d.ts +63 -0
- package/types/src/api/nodeUtil.d.ts +0 -63
- package/types/src/blocks/ImageBlockContent/parseImageElement.d.ts +1 -0
- package/types/src/editor/BlockNoteEditor.d.ts +1 -1
- package/types/src/extensions/BlockChange/BlockChangePlugin.d.ts +1 -1
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +2 -2
- package/types/src/i18n/locales/en.d.ts +3 -0
- package/types/src/i18n/locales/sk.d.ts +3 -0
- package/types/src/index.d.ts +1 -0
- package/types/src/schema/inlineContent/internal.d.ts +1 -1
- package/dist/en-CsgPjHa4.cjs.map +0 -1
- package/dist/en-Dx9fwHD4.js.map +0 -1
- /package/types/src/api/{nodeUtil.test.d.ts → getBlocksChangedByTransaction.test.d.ts} +0 -0
package/LICENSE
CHANGED
|
@@ -370,4 +370,4 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
|
|
|
370
370
|
---------------------------------------------------------
|
|
371
371
|
|
|
372
372
|
This Source Code Form is "Incompatible With Secondary Licenses", as
|
|
373
|
-
defined by the Mozilla Public License, v. 2.0.
|
|
373
|
+
defined by the Mozilla Public License, v. 2.0.
|
package/README.md
CHANGED
|
@@ -9,16 +9,12 @@ Welcome to BlockNote! The open source Block-Based
|
|
|
9
9
|
React rich text editor. Easily add a modern text editing experience to your app.
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a href="https://discord.gg/Qc2QTTH5dF"><img alt="Discord" src="https://img.shields.io/badge/Chat on discord%20-%237289DA.svg?&style=for-the-badge&logo=discord&logoColor=white"/></a>
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
12
|
<p align="center">
|
|
17
13
|
<a href="https://www.blocknotejs.org">
|
|
18
14
|
Homepage
|
|
19
|
-
</a> - <a href="https://www.blocknotejs.org/docs
|
|
15
|
+
</a> - <a href="https://www.blocknotejs.org/docs">
|
|
20
16
|
Documentation
|
|
21
|
-
</a> - <a href="https://www.blocknotejs.org/docs/
|
|
17
|
+
</a> - <a href="https://www.blocknotejs.org/docs/getting-started">
|
|
22
18
|
Quickstart
|
|
23
19
|
</a>- <a href="https://www.blocknotejs.org/examples">
|
|
24
20
|
Examples
|
|
@@ -48,8 +44,6 @@ function App() {
|
|
|
48
44
|
|
|
49
45
|
`@blocknote/react` comes with a fully styled UI that makes it an instant, polished editor ready to use in your app.
|
|
50
46
|
|
|
51
|
-
If you prefer to create your own UI components (menus), or don't want to use React, you can use `@blocknote/core` (_advanced_, [see docs](https://www.blocknotejs.org/docs/vanilla-js)).
|
|
52
|
-
|
|
53
47
|
# Features
|
|
54
48
|
|
|
55
49
|
BlockNote comes with a number of features and components to make it easy to embed a high-quality block-based editor in your app:
|
|
@@ -84,31 +78,19 @@ BlockNote comes with a number of features and components to make it easy to embe
|
|
|
84
78
|
|
|
85
79
|
# Feedback 🙋♂️🙋♀️
|
|
86
80
|
|
|
87
|
-
We'd love to hear your thoughts and see your experiments, so [come and say hi on Discord](https://discord.gg/Qc2QTTH5dF)
|
|
81
|
+
We'd love to hear your thoughts and see your experiments, so [come and say hi on Discord](https://discord.gg/Qc2QTTH5dF).
|
|
88
82
|
|
|
89
83
|
# Contributing 🙌
|
|
90
84
|
|
|
91
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for more info and guidance on how to run the project (TLDR: just use `
|
|
92
|
-
|
|
93
|
-
Directory structure:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
blocknote
|
|
97
|
-
├── packages/core - The core of the editor
|
|
98
|
-
├── packages/react - The main library for use in React apps
|
|
99
|
-
├── packages/mantine - Mantine (default) implementation of BlockNote UI
|
|
100
|
-
├── packages/ariakit - AriaKit implementation of BlockNote UI
|
|
101
|
-
├── packages/shadcn - ShadCN / Tailwind / Radix implementation of BlockNote UI
|
|
102
|
-
├── examples - Example apps
|
|
103
|
-
├── playground - App to browse the example apps (https://playground.blocknotejs.org)
|
|
104
|
-
└── tests - Playwright end to end tests
|
|
105
|
-
```
|
|
85
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for more info and guidance on how to run the project (TLDR: just use `pnpm start`).
|
|
106
86
|
|
|
107
87
|
The codebase is automatically tested using Vitest and Playwright.
|
|
108
88
|
|
|
109
89
|
# License 📃
|
|
110
90
|
|
|
111
|
-
BlockNote is licensed under the [MPL
|
|
91
|
+
BlockNote is 100% Open Source Software. The majority of BlockNote is licensed under the [MPL-2.0 license](LICENSE-MPL.txt), which allows you to use BlockNote in commercial (and closed-source) applications. If you make changes to the BlockNote source files, you're expected to publish these changes so the wider community can benefit as well. [Learn more](https://fossa.com/blog/open-source-software-licenses-101-mozilla-public-license-2-0/).
|
|
92
|
+
|
|
93
|
+
The XL packages (source code in the `packages/xl-*` directories and published in NPM as `@blocknote/xl-*`) are licensed under the GPL-3.0. If you cannot comply with this license and want to use the XL libraries, you'll need a commercial license. Refer to [our website](https://www.blocknotejs.org/pricing) for more information.
|
|
112
94
|
|
|
113
95
|
# Credits ❤️
|
|
114
96
|
|