@tiptap/core 3.16.0 → 3.17.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/dist/index.cjs +13 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/NodePos.ts +8 -3
- package/src/lib/ResizableNodeView.ts +2 -2
- package/src/utilities/index.ts +1 -0
- package/src/utilities/isFirefox.ts +11 -0
package/dist/index.cjs
CHANGED
|
@@ -97,6 +97,7 @@ __export(index_exports, {
|
|
|
97
97
|
isAtStartOfNode: () => isAtStartOfNode,
|
|
98
98
|
isEmptyObject: () => isEmptyObject,
|
|
99
99
|
isExtensionRulesEnabled: () => isExtensionRulesEnabled,
|
|
100
|
+
isFirefox: () => isFirefox,
|
|
100
101
|
isFunction: () => isFunction,
|
|
101
102
|
isList: () => isList,
|
|
102
103
|
isMacOS: () => isMacOS,
|
|
@@ -4453,19 +4454,20 @@ var NodePos = class _NodePos {
|
|
|
4453
4454
|
this.node.content.forEach((node, offset) => {
|
|
4454
4455
|
const isBlock = node.isBlock && !node.isTextblock;
|
|
4455
4456
|
const isNonTextAtom = node.isAtom && !node.isText;
|
|
4457
|
+
const isInline = node.isInline;
|
|
4456
4458
|
const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1);
|
|
4457
4459
|
if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {
|
|
4458
4460
|
return;
|
|
4459
4461
|
}
|
|
4460
4462
|
const $pos = this.resolvedPos.doc.resolve(targetPos);
|
|
4461
|
-
if (!isBlock && $pos.depth <= this.depth) {
|
|
4463
|
+
if (!isBlock && !isInline && $pos.depth <= this.depth) {
|
|
4462
4464
|
return;
|
|
4463
4465
|
}
|
|
4464
|
-
const childNodePos = new _NodePos($pos, this.editor, isBlock, isBlock ? node : null);
|
|
4466
|
+
const childNodePos = new _NodePos($pos, this.editor, isBlock, isBlock || isInline ? node : null);
|
|
4465
4467
|
if (isBlock) {
|
|
4466
4468
|
childNodePos.actualDepth = this.depth + 1;
|
|
4467
4469
|
}
|
|
4468
|
-
children.push(
|
|
4470
|
+
children.push(childNodePos);
|
|
4469
4471
|
});
|
|
4470
4472
|
return children;
|
|
4471
4473
|
}
|
|
@@ -5541,7 +5543,8 @@ var ResizableNodeView = class {
|
|
|
5541
5543
|
return this.container;
|
|
5542
5544
|
}
|
|
5543
5545
|
get contentDOM() {
|
|
5544
|
-
|
|
5546
|
+
var _a;
|
|
5547
|
+
return (_a = this.contentElement) != null ? _a : null;
|
|
5545
5548
|
}
|
|
5546
5549
|
handleEditorUpdate() {
|
|
5547
5550
|
const isEditable = this.editor.isEditable;
|
|
@@ -5963,6 +5966,11 @@ function escapeForRegEx(string) {
|
|
|
5963
5966
|
return string.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
5964
5967
|
}
|
|
5965
5968
|
|
|
5969
|
+
// src/utilities/isFirefox.ts
|
|
5970
|
+
function isFirefox() {
|
|
5971
|
+
return typeof navigator !== "undefined" ? /Firefox/.test(navigator.userAgent) : false;
|
|
5972
|
+
}
|
|
5973
|
+
|
|
5966
5974
|
// src/utilities/isString.ts
|
|
5967
5975
|
function isString(value) {
|
|
5968
5976
|
return typeof value === "string";
|
|
@@ -6959,6 +6967,7 @@ var Tracker = class {
|
|
|
6959
6967
|
isAtStartOfNode,
|
|
6960
6968
|
isEmptyObject,
|
|
6961
6969
|
isExtensionRulesEnabled,
|
|
6970
|
+
isFirefox,
|
|
6962
6971
|
isFunction,
|
|
6963
6972
|
isList,
|
|
6964
6973
|
isMacOS,
|