@blocknote/core 0.31.1 → 0.32.0-hackdays.0
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 +6 -6
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +15 -7
- package/dist/blocknote.js.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +1 -1
- package/src/api/nodeConversions/blockToNode.ts +6 -2
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +22 -12
- package/types/src/api/blockManipulation/selections/selection.test.d.ts +1 -0
- package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.d.ts +5 -0
- package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.d.ts +1 -0
- package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +17 -0
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/blocknote.js
CHANGED
|
@@ -1420,9 +1420,9 @@ function Ut(e, n, t, o) {
|
|
|
1420
1420
|
if (!c)
|
|
1421
1421
|
throw new Error(`style ${i} not found in styleSchema`);
|
|
1422
1422
|
if (c.propSchema === "boolean")
|
|
1423
|
-
r.push(n.mark(i));
|
|
1423
|
+
a && r.push(n.mark(i));
|
|
1424
1424
|
else if (c.propSchema === "string")
|
|
1425
|
-
r.push(n.mark(i, { stringValue: a }));
|
|
1425
|
+
a && r.push(n.mark(i, { stringValue: a }));
|
|
1426
1426
|
else
|
|
1427
1427
|
throw new j(c.propSchema);
|
|
1428
1428
|
}
|
|
@@ -6955,11 +6955,19 @@ class Ia extends L {
|
|
|
6955
6955
|
},
|
|
6956
6956
|
props: {
|
|
6957
6957
|
handleTextInput(r, s, i, a) {
|
|
6958
|
-
|
|
6959
|
-
r.state.
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6958
|
+
if (s === i) {
|
|
6959
|
+
const c = r.state.doc;
|
|
6960
|
+
for (const l of o) {
|
|
6961
|
+
const d = l.length > 1 ? c.textBetween(s - l.length, s) + a : a;
|
|
6962
|
+
if (l === d)
|
|
6963
|
+
return r.dispatch(r.state.tr.insertText(a)), r.dispatch(
|
|
6964
|
+
r.state.tr.setMeta(me, {
|
|
6965
|
+
triggerCharacter: d
|
|
6966
|
+
}).scrollIntoView()
|
|
6967
|
+
), !0;
|
|
6968
|
+
}
|
|
6969
|
+
}
|
|
6970
|
+
return !1;
|
|
6963
6971
|
},
|
|
6964
6972
|
// Setup decorator on the currently active suggestion.
|
|
6965
6973
|
decorations(r) {
|