@bigbinary/neeto-editor 1.47.32 → 1.47.34
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/Editor.js +22 -273
- package/dist/Editor.js.map +1 -1
- package/dist/FormikEditor.js +1 -1
- package/dist/Menu.js +1 -1
- package/dist/{chunk-zoKBhh5D.js → chunk-airIORki.js} +2 -53
- package/dist/{chunk-zoKBhh5D.js.map → chunk-airIORki.js.map} +1 -1
- package/dist/cjs/Editor.cjs.js +22 -273
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/FormikEditor.cjs.js +1 -1
- package/dist/cjs/Menu.cjs.js +1 -1
- package/dist/cjs/{chunk-D44ZMvgb.cjs.js → chunk-BCoa9xCZ.cjs.js} +1 -57
- package/dist/cjs/{chunk-D44ZMvgb.cjs.js.map → chunk-BCoa9xCZ.cjs.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -2
|
@@ -10,7 +10,7 @@ var Editor = require('./Editor.cjs.js');
|
|
|
10
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
require('@babel/runtime/helpers/toConsumableArray');
|
|
12
12
|
require('@babel/runtime/helpers/slicedToArray');
|
|
13
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-BCoa9xCZ.cjs.js');
|
|
14
14
|
require('./chunk-vQvjPR2x.cjs.js');
|
|
15
15
|
require('i18next');
|
|
16
16
|
require('@bigbinary/neeto-icons/TextH1');
|
package/dist/cjs/Menu.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ require('@babel/runtime/helpers/toConsumableArray');
|
|
|
5
5
|
require('@babel/runtime/helpers/slicedToArray');
|
|
6
6
|
require('react');
|
|
7
7
|
require('ramda');
|
|
8
|
-
var Menu = require('./chunk-
|
|
8
|
+
var Menu = require('./chunk-BCoa9xCZ.cjs.js');
|
|
9
9
|
require('./chunk-IbrhD0V3.cjs.js');
|
|
10
10
|
require('react/jsx-runtime');
|
|
11
11
|
require('./chunk-vQvjPR2x.cjs.js');
|
|
@@ -12288,30 +12288,6 @@ function getMarksBetween(from, to, doc) {
|
|
|
12288
12288
|
return marks;
|
|
12289
12289
|
}
|
|
12290
12290
|
|
|
12291
|
-
/**
|
|
12292
|
-
* Finds the first node of a given type or name in the current selection.
|
|
12293
|
-
* @param state The editor state.
|
|
12294
|
-
* @param typeOrName The node type or name.
|
|
12295
|
-
* @param pos The position to start searching from.
|
|
12296
|
-
* @param maxDepth The maximum depth to search.
|
|
12297
|
-
* @returns The node and the depth as an array.
|
|
12298
|
-
*/
|
|
12299
|
-
const getNodeAtPosition = (state, typeOrName, pos, maxDepth = 20) => {
|
|
12300
|
-
const $pos = state.doc.resolve(pos);
|
|
12301
|
-
let currentDepth = maxDepth;
|
|
12302
|
-
let node = null;
|
|
12303
|
-
while (currentDepth > 0 && node === null) {
|
|
12304
|
-
const currentNode = $pos.node(currentDepth);
|
|
12305
|
-
if ((currentNode === null || currentNode === void 0 ? void 0 : currentNode.type.name) === typeOrName) {
|
|
12306
|
-
node = currentNode;
|
|
12307
|
-
}
|
|
12308
|
-
else {
|
|
12309
|
-
currentDepth -= 1;
|
|
12310
|
-
}
|
|
12311
|
-
}
|
|
12312
|
-
return [node, currentDepth];
|
|
12313
|
-
};
|
|
12314
|
-
|
|
12315
12291
|
/**
|
|
12316
12292
|
* Return attributes of an extension that should be splitted by keepOnSplit flag
|
|
12317
12293
|
* @param extensionAttributes Array of extension attributes
|
|
@@ -12409,33 +12385,6 @@ function isActive(state, name, attributes = {}) {
|
|
|
12409
12385
|
return false;
|
|
12410
12386
|
}
|
|
12411
12387
|
|
|
12412
|
-
const isAtEndOfNode = (state, nodeType) => {
|
|
12413
|
-
const { $from, $to, $anchor } = state.selection;
|
|
12414
|
-
if (nodeType) {
|
|
12415
|
-
const parentNode = findParentNode(node => node.type.name === nodeType)(state.selection);
|
|
12416
|
-
if (!parentNode) {
|
|
12417
|
-
return false;
|
|
12418
|
-
}
|
|
12419
|
-
const $parentPos = state.doc.resolve(parentNode.pos + 1);
|
|
12420
|
-
if ($anchor.pos + 1 === $parentPos.end()) {
|
|
12421
|
-
return true;
|
|
12422
|
-
}
|
|
12423
|
-
return false;
|
|
12424
|
-
}
|
|
12425
|
-
if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) {
|
|
12426
|
-
return false;
|
|
12427
|
-
}
|
|
12428
|
-
return true;
|
|
12429
|
-
};
|
|
12430
|
-
|
|
12431
|
-
const isAtStartOfNode = (state) => {
|
|
12432
|
-
const { $from, $to } = state.selection;
|
|
12433
|
-
if ($from.parentOffset > 0 || $from.pos !== $to.pos) {
|
|
12434
|
-
return false;
|
|
12435
|
-
}
|
|
12436
|
-
return true;
|
|
12437
|
-
};
|
|
12438
|
-
|
|
12439
12388
|
function isList(name, extensions) {
|
|
12440
12389
|
const { nodeExtensions } = splitExtensions(extensions);
|
|
12441
12390
|
const extension = nodeExtensions.find(item => item.name === name);
|
|
@@ -19869,12 +19818,7 @@ exports.getMarkAttributes = getMarkAttributes;
|
|
|
19869
19818
|
exports.getMarkRange = getMarkRange;
|
|
19870
19819
|
exports.getMarkType = getMarkType;
|
|
19871
19820
|
exports.getMarksBetween = getMarksBetween;
|
|
19872
|
-
exports.getNodeAtPosition = getNodeAtPosition;
|
|
19873
|
-
exports.getNodeType = getNodeType;
|
|
19874
19821
|
exports.highlightFocussedNode = highlightFocussedNode;
|
|
19875
|
-
exports.isAtEndOfNode = isAtEndOfNode;
|
|
19876
|
-
exports.isAtStartOfNode = isAtStartOfNode;
|
|
19877
|
-
exports.isNodeActive = isNodeActive;
|
|
19878
19822
|
exports.isNodeSelection = isNodeSelection;
|
|
19879
19823
|
exports.keydownHandler = keydownHandler;
|
|
19880
19824
|
exports.markInputRule = markInputRule;
|
|
@@ -19886,4 +19830,4 @@ exports.textblockTypeInputRule = textblockTypeInputRule;
|
|
|
19886
19830
|
exports.useEditor = useEditor;
|
|
19887
19831
|
exports.useEditorState = useEditorState$1;
|
|
19888
19832
|
exports.wrappingInputRule = wrappingInputRule;
|
|
19889
|
-
//# sourceMappingURL=chunk-
|
|
19833
|
+
//# sourceMappingURL=chunk-BCoa9xCZ.cjs.js.map
|