@blocknote/core 0.25.1 → 0.25.2
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/dist/blocknote.cjs +3 -3
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +30 -36
- package/dist/blocknote.js.map +1 -1
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/api/nodeConversions/nodeToBlock.ts +2 -2
- package/src/comments/threadstore/ThreadStore.ts +1 -1
- package/src/editor/BlockNoteEditor.ts +0 -6
- package/src/extensions/Comments/CommentMark.ts +0 -1
- package/src/extensions/Comments/CommentsPlugin.ts +3 -1
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +1 -3
- package/types/src/blocks/CodeBlockContent/shiki.bundle.d.ts +82 -0
- package/types/src/comments/threadstore/ThreadStore.d.ts +1 -1
package/dist/blocknote.js
CHANGED
|
@@ -6909,7 +6909,7 @@ function ve(e, o) {
|
|
|
6909
6909
|
});
|
|
6910
6910
|
}
|
|
6911
6911
|
function qt(e, o, t) {
|
|
6912
|
-
var r;
|
|
6912
|
+
var r, a;
|
|
6913
6913
|
const i = {
|
|
6914
6914
|
type: "tableContent",
|
|
6915
6915
|
columnWidths: [],
|
|
@@ -6917,37 +6917,37 @@ function qt(e, o, t) {
|
|
|
6917
6917
|
headerCols: void 0,
|
|
6918
6918
|
rows: []
|
|
6919
6919
|
}, n = [];
|
|
6920
|
-
e.content.forEach((
|
|
6921
|
-
const
|
|
6920
|
+
e.content.forEach((s, l, d) => {
|
|
6921
|
+
const c = {
|
|
6922
6922
|
cells: []
|
|
6923
6923
|
};
|
|
6924
|
-
|
|
6925
|
-
let
|
|
6926
|
-
|
|
6927
|
-
}),
|
|
6924
|
+
d === 0 && s.content.forEach((u) => {
|
|
6925
|
+
let m = u.attrs.colwidth;
|
|
6926
|
+
m == null && (m = new Array(u.attrs.colspan ?? 1).fill(void 0)), i.columnWidths.push(...m);
|
|
6927
|
+
}), c.cells = s.content.content.map((u, m) => (n[d] || (n[d] = []), n[d][m] = u.type.name === "tableHeader", {
|
|
6928
6928
|
type: "tableCell",
|
|
6929
|
-
content:
|
|
6930
|
-
(
|
|
6931
|
-
).reduce((
|
|
6932
|
-
if (!
|
|
6933
|
-
return
|
|
6934
|
-
const
|
|
6935
|
-
return X(
|
|
6936
|
-
` +
|
|
6929
|
+
content: u.content.content.map(
|
|
6930
|
+
(g) => Ae(g, o, t)
|
|
6931
|
+
).reduce((g, f) => {
|
|
6932
|
+
if (!g.length)
|
|
6933
|
+
return f;
|
|
6934
|
+
const b = g[g.length - 1], k = f[0];
|
|
6935
|
+
return X(b) && X(k) && JSON.stringify(b.styles) === JSON.stringify(k.styles) ? (b.text += `
|
|
6936
|
+
` + k.text, g.push(...f.slice(1)), g) : (g.push(...f), g);
|
|
6937
6937
|
}, []),
|
|
6938
6938
|
props: {
|
|
6939
|
-
colspan:
|
|
6940
|
-
rowspan:
|
|
6941
|
-
backgroundColor:
|
|
6942
|
-
textColor:
|
|
6943
|
-
textAlignment:
|
|
6939
|
+
colspan: u.attrs.colspan,
|
|
6940
|
+
rowspan: u.attrs.rowspan,
|
|
6941
|
+
backgroundColor: u.attrs.backgroundColor,
|
|
6942
|
+
textColor: u.attrs.textColor,
|
|
6943
|
+
textAlignment: u.attrs.textAlignment
|
|
6944
6944
|
}
|
|
6945
|
-
})), i.rows.push(
|
|
6945
|
+
})), i.rows.push(c);
|
|
6946
6946
|
});
|
|
6947
|
-
for (let
|
|
6948
|
-
n[
|
|
6949
|
-
for (let
|
|
6950
|
-
n.every((
|
|
6947
|
+
for (let s = 0; s < n.length; s++)
|
|
6948
|
+
(r = n[s]) != null && r.every((l) => l) && (i.headerRows = (i.headerRows ?? 0) + 1);
|
|
6949
|
+
for (let s = 0; s < ((a = n[0]) == null ? void 0 : a.length); s++)
|
|
6950
|
+
n != null && n.every((l) => l[s]) && (i.headerCols = (i.headerCols ?? 0) + 1);
|
|
6951
6951
|
return i;
|
|
6952
6952
|
}
|
|
6953
6953
|
function Ae(e, o, t) {
|
|
@@ -11084,8 +11084,6 @@ const Mt = () => {
|
|
|
11084
11084
|
excludes: "",
|
|
11085
11085
|
inclusive: !1,
|
|
11086
11086
|
keepOnSplit: !0,
|
|
11087
|
-
group: "blocknoteIgnore",
|
|
11088
|
-
// ignore in blocknote json
|
|
11089
11087
|
addAttributes() {
|
|
11090
11088
|
return {
|
|
11091
11089
|
// orphans are marks that currently don't have an active thread. It could be
|
|
@@ -11345,7 +11343,8 @@ class va extends W {
|
|
|
11345
11343
|
head: r.head,
|
|
11346
11344
|
anchor: r.anchor
|
|
11347
11345
|
},
|
|
11348
|
-
yjs: Li(a.binding, n.state)
|
|
11346
|
+
yjs: a ? Li(a.binding, n.state) : void 0
|
|
11347
|
+
// if we're not using yjs
|
|
11349
11348
|
};
|
|
11350
11349
|
await this.threadStore.addThreadToDocument({
|
|
11351
11350
|
threadId: i.id,
|
|
@@ -13068,9 +13067,7 @@ class ts {
|
|
|
13068
13067
|
(h) => h.tagName === "TD" || h.tagName === "TH"
|
|
13069
13068
|
);
|
|
13070
13069
|
if (i.length === 0)
|
|
13071
|
-
|
|
13072
|
-
"Could not find table cell element that the mouse cursor is hovering over."
|
|
13073
|
-
);
|
|
13070
|
+
return;
|
|
13074
13071
|
const n = i[0];
|
|
13075
13072
|
let r = !1;
|
|
13076
13073
|
const a = Ee(n.parentElement), s = Ee(n), l = this.state.draggingState.draggedCellOrientation === "row" ? this.state.rowIndex : this.state.colIndex, c = (this.state.draggingState.draggedCellOrientation === "row" ? a : s) !== l;
|
|
@@ -14037,12 +14034,9 @@ class Ro extends W {
|
|
|
14037
14034
|
}
|
|
14038
14035
|
this.resolveFileUrl = n.resolveFileUrl, this.headless = n._headless;
|
|
14039
14036
|
const r = "collaboration" in this.extensions || "liveblocksExtension" in this.extensions;
|
|
14040
|
-
|
|
14037
|
+
r && n.initialContent && console.warn(
|
|
14041
14038
|
"When using Collaboration, initialContent might cause conflicts, because changes should come from the collaboration provider"
|
|
14042
|
-
)
|
|
14043
|
-
throw new Error(
|
|
14044
|
-
"Comments are only supported when collaboration is enabled, please set the collaboration option"
|
|
14045
|
-
);
|
|
14039
|
+
);
|
|
14046
14040
|
const a = n.initialContent || (r ? [
|
|
14047
14041
|
{
|
|
14048
14042
|
type: "paragraph",
|