@manuscripts/body-editor 1.7.8-LEAN-3377-0 → 1.7.8
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/cjs/assets.js +1 -17
- package/dist/cjs/plugins/footnotes/index.js +2 -22
- package/dist/es/assets.js +0 -16
- package/dist/es/plugins/footnotes/index.js +1 -20
- package/dist/types/assets.d.ts +0 -1
- package/dist/types/plugins/footnotes/index.d.ts +0 -1
- package/package.json +2 -2
- package/styles/Editor.css +1 -13
- package/dist/cjs/plugins/footnotes/footnotes-utils.js +0 -30
- package/dist/es/plugins/footnotes/footnotes-utils.js +0 -26
- package/dist/types/plugins/footnotes/footnotes-utils.d.ts +0 -17
package/dist/cjs/assets.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.editAttrsTrackingIcon = exports.commentIcon = exports.editIcon = void 0;
|
|
19
19
|
exports.editIcon = `
|
|
20
20
|
<svg
|
|
21
21
|
width="14"
|
|
@@ -102,19 +102,3 @@ exports.editAttrsTrackingIcon = `
|
|
|
102
102
|
/>
|
|
103
103
|
</svg>
|
|
104
104
|
`;
|
|
105
|
-
exports.alertIcon = `
|
|
106
|
-
<svg
|
|
107
|
-
width="12"
|
|
108
|
-
height="12"
|
|
109
|
-
viewBox="0 0 12 12"
|
|
110
|
-
fill="none"
|
|
111
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
112
|
-
>
|
|
113
|
-
<path
|
|
114
|
-
fill-rule="evenodd"
|
|
115
|
-
clip-rule="evenodd"
|
|
116
|
-
d="M6 12C2.68629 12 1.18852e-06 9.31371 1.47821e-06 6C1.7679e-06 2.68629 2.68629 1.39444e-07 6 4.29138e-07C9.31371 7.18831e-07 12 2.68629 12 6C12 9.31371 9.31371 12 6 12ZM6.74998 2.99996L6.75 6.37462C6.75 6.78819 6.41522 7.12243 6.00166 7.12334C5.58681 7.12426 5.25001 6.78821 5.25001 6.37335L5.25 3.00082C5.25 2.58629 5.58629 2.25037 6.00082 2.25083C6.4147 2.25128 6.74998 2.58607 6.74998 2.99996ZM6.75 8.99263C6.75 9.46884 6.47288 9.75 5.99853 9.75C5.52419 9.75 5.25 9.47179 5.25 8.99558C5.25 8.51937 5.52421 8.25 5.99855 8.25C6.47289 8.25 6.75 8.51642 6.75 8.99263Z"
|
|
117
|
-
fill="#FE8F1F"
|
|
118
|
-
/>
|
|
119
|
-
</svg>
|
|
120
|
-
`;
|
|
@@ -15,16 +15,14 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.buildPluginState = exports.footnotesKey = void 0;
|
|
19
19
|
const transform_1 = require("@manuscripts/transform");
|
|
20
20
|
const lodash_1 = require("lodash");
|
|
21
21
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
22
22
|
const prosemirror_utils_1 = require("prosemirror-utils");
|
|
23
23
|
const prosemirror_view_1 = require("prosemirror-view");
|
|
24
|
-
const assets_1 = require("../../assets");
|
|
25
24
|
const utils_1 = require("../../lib/utils");
|
|
26
25
|
const placeholder_1 = require("../placeholder");
|
|
27
|
-
const footnotes_utils_1 = require("./footnotes-utils");
|
|
28
26
|
exports.footnotesKey = new prosemirror_state_1.PluginKey('footnotes');
|
|
29
27
|
const buildPluginState = (doc) => {
|
|
30
28
|
const nodes = [];
|
|
@@ -61,13 +59,6 @@ const labelWidget = (label, id) => (view) => {
|
|
|
61
59
|
});
|
|
62
60
|
return element;
|
|
63
61
|
};
|
|
64
|
-
const uncitedFootnoteWidget = () => () => {
|
|
65
|
-
const element = document.createElement('span');
|
|
66
|
-
element.className = 'unctied-table-footnote';
|
|
67
|
-
element.innerHTML = assets_1.alertIcon;
|
|
68
|
-
return element;
|
|
69
|
-
};
|
|
70
|
-
exports.uncitedFootnoteWidget = uncitedFootnoteWidget;
|
|
71
62
|
exports.default = () => {
|
|
72
63
|
return new prosemirror_state_1.Plugin({
|
|
73
64
|
key: exports.footnotesKey,
|
|
@@ -110,8 +101,7 @@ exports.default = () => {
|
|
|
110
101
|
}
|
|
111
102
|
}
|
|
112
103
|
const { labels } = exports.footnotesKey.getState(state);
|
|
113
|
-
|
|
114
|
-
state.doc.descendants((node, pos, parent) => {
|
|
104
|
+
state.doc.descendants((node, pos) => {
|
|
115
105
|
var _a;
|
|
116
106
|
if ((0, transform_1.isFootnoteNode)(node)) {
|
|
117
107
|
const id = node.attrs.id;
|
|
@@ -126,21 +116,11 @@ exports.default = () => {
|
|
|
126
116
|
if (!((_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.textContent)) {
|
|
127
117
|
decorations.push(prosemirror_view_1.Decoration.widget(pos + 2, (0, placeholder_1.placeholderWidget)('Add new note here')));
|
|
128
118
|
}
|
|
129
|
-
if (tableInlineFootnoteIds &&
|
|
130
|
-
!tableInlineFootnoteIds.has(node.attrs.id)) {
|
|
131
|
-
decorations.push(prosemirror_view_1.Decoration.widget(pos + node.nodeSize - 1, (0, exports.uncitedFootnoteWidget)()));
|
|
132
|
-
}
|
|
133
119
|
}
|
|
134
120
|
if (node.type === transform_1.schema.nodes.footnotes_element) {
|
|
135
121
|
decorations.push(prosemirror_view_1.Decoration.node(pos, pos + node.nodeSize, {
|
|
136
122
|
class: 'footnote-element',
|
|
137
123
|
}));
|
|
138
|
-
if ((parent === null || parent === void 0 ? void 0 : parent.type) === transform_1.schema.nodes.table_element_footer) {
|
|
139
|
-
tableInlineFootnoteIds = (0, footnotes_utils_1.findTableInlineFootnoteIds)(state.doc.resolve(pos));
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
tableInlineFootnoteIds = undefined;
|
|
143
|
-
}
|
|
144
124
|
}
|
|
145
125
|
});
|
|
146
126
|
return prosemirror_view_1.DecorationSet.create(state.doc, decorations);
|
package/dist/es/assets.js
CHANGED
|
@@ -99,19 +99,3 @@ export const editAttrsTrackingIcon = `
|
|
|
99
99
|
/>
|
|
100
100
|
</svg>
|
|
101
101
|
`;
|
|
102
|
-
export const alertIcon = `
|
|
103
|
-
<svg
|
|
104
|
-
width="12"
|
|
105
|
-
height="12"
|
|
106
|
-
viewBox="0 0 12 12"
|
|
107
|
-
fill="none"
|
|
108
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
109
|
-
>
|
|
110
|
-
<path
|
|
111
|
-
fill-rule="evenodd"
|
|
112
|
-
clip-rule="evenodd"
|
|
113
|
-
d="M6 12C2.68629 12 1.18852e-06 9.31371 1.47821e-06 6C1.7679e-06 2.68629 2.68629 1.39444e-07 6 4.29138e-07C9.31371 7.18831e-07 12 2.68629 12 6C12 9.31371 9.31371 12 6 12ZM6.74998 2.99996L6.75 6.37462C6.75 6.78819 6.41522 7.12243 6.00166 7.12334C5.58681 7.12426 5.25001 6.78821 5.25001 6.37335L5.25 3.00082C5.25 2.58629 5.58629 2.25037 6.00082 2.25083C6.4147 2.25128 6.74998 2.58607 6.74998 2.99996ZM6.75 8.99263C6.75 9.46884 6.47288 9.75 5.99853 9.75C5.52419 9.75 5.25 9.47179 5.25 8.99558C5.25 8.51937 5.52421 8.25 5.99855 8.25C6.47289 8.25 6.75 8.51642 6.75 8.99263Z"
|
|
114
|
-
fill="#FE8F1F"
|
|
115
|
-
/>
|
|
116
|
-
</svg>
|
|
117
|
-
`;
|
|
@@ -18,10 +18,8 @@ import { isEqual } from 'lodash';
|
|
|
18
18
|
import { NodeSelection, Plugin, PluginKey } from 'prosemirror-state';
|
|
19
19
|
import { hasParentNodeOfType } from 'prosemirror-utils';
|
|
20
20
|
import { Decoration, DecorationSet } from 'prosemirror-view';
|
|
21
|
-
import { alertIcon } from '../../assets';
|
|
22
21
|
import { findParentNodeWithIdValue } from '../../lib/utils';
|
|
23
22
|
import { placeholderWidget } from '../placeholder';
|
|
24
|
-
import { findTableInlineFootnoteIds } from './footnotes-utils';
|
|
25
23
|
export const footnotesKey = new PluginKey('footnotes');
|
|
26
24
|
export const buildPluginState = (doc) => {
|
|
27
25
|
const nodes = [];
|
|
@@ -57,12 +55,6 @@ const labelWidget = (label, id) => (view) => {
|
|
|
57
55
|
});
|
|
58
56
|
return element;
|
|
59
57
|
};
|
|
60
|
-
export const uncitedFootnoteWidget = () => () => {
|
|
61
|
-
const element = document.createElement('span');
|
|
62
|
-
element.className = 'unctied-table-footnote';
|
|
63
|
-
element.innerHTML = alertIcon;
|
|
64
|
-
return element;
|
|
65
|
-
};
|
|
66
58
|
export default () => {
|
|
67
59
|
return new Plugin({
|
|
68
60
|
key: footnotesKey,
|
|
@@ -105,8 +97,7 @@ export default () => {
|
|
|
105
97
|
}
|
|
106
98
|
}
|
|
107
99
|
const { labels } = footnotesKey.getState(state);
|
|
108
|
-
|
|
109
|
-
state.doc.descendants((node, pos, parent) => {
|
|
100
|
+
state.doc.descendants((node, pos) => {
|
|
110
101
|
var _a;
|
|
111
102
|
if (isFootnoteNode(node)) {
|
|
112
103
|
const id = node.attrs.id;
|
|
@@ -121,21 +112,11 @@ export default () => {
|
|
|
121
112
|
if (!((_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.textContent)) {
|
|
122
113
|
decorations.push(Decoration.widget(pos + 2, placeholderWidget('Add new note here')));
|
|
123
114
|
}
|
|
124
|
-
if (tableInlineFootnoteIds &&
|
|
125
|
-
!tableInlineFootnoteIds.has(node.attrs.id)) {
|
|
126
|
-
decorations.push(Decoration.widget(pos + node.nodeSize - 1, uncitedFootnoteWidget()));
|
|
127
|
-
}
|
|
128
115
|
}
|
|
129
116
|
if (node.type === schema.nodes.footnotes_element) {
|
|
130
117
|
decorations.push(Decoration.node(pos, pos + node.nodeSize, {
|
|
131
118
|
class: 'footnote-element',
|
|
132
119
|
}));
|
|
133
|
-
if ((parent === null || parent === void 0 ? void 0 : parent.type) === schema.nodes.table_element_footer) {
|
|
134
|
-
tableInlineFootnoteIds = findTableInlineFootnoteIds(state.doc.resolve(pos));
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
tableInlineFootnoteIds = undefined;
|
|
138
|
-
}
|
|
139
120
|
}
|
|
140
121
|
});
|
|
141
122
|
return DecorationSet.create(state.doc, decorations);
|
package/dist/types/assets.d.ts
CHANGED
|
@@ -16,4 +16,3 @@
|
|
|
16
16
|
export declare const editIcon = "\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.706 2.33624L11.553 5.19824L4.345 12.4422L1.498 9.58124L8.706 2.33624V2.33624ZM13.714 1.64624L12.444 0.37024C12.3273 0.253047 12.1886 0.160056 12.0359 0.0966039C11.8831 0.0331518 11.7194 0.000488281 11.554 0.000488281C11.3886 0.000488281 11.2249 0.0331518 11.0721 0.0966039C10.9194 0.160056 10.7807 0.253047 10.664 0.37024L9.447 1.59224L12.295 4.45424L13.715 3.02824C13.8976 2.84462 14.0001 2.59619 14.0001 2.33724C14.0001 2.07829 13.8976 1.82986 13.715 1.64624H13.714ZM0.00800253 13.6032C-0.00418388 13.6571 -0.00246802 13.7131 0.0129883 13.7661C0.0284447 13.819 0.0571327 13.8672 0.096349 13.906C0.135565 13.9448 0.184019 13.973 0.237143 13.9879C0.290268 14.0028 0.346315 14.004 0.400003 13.9912L3.573 13.2172L0.727003 10.3552L0.0070026 13.6032H0.00800253Z\"\n fill=\"#6E6E6E\"\n />\n </svg>\n";
|
|
17
17
|
export declare const commentIcon = "\n<svg\n width=\"20\"\n height=\"15\"\n viewBox=\"0 0 20 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7.94841 4.18311C7.98238 3.9602 8 3.73191 8 3.49951C8 3.22073 7.97465 2.94787 7.92613 2.68311H13.5C14.8854 2.68311 16.25 3.6425 16.25 5.09977V9.02453L19.1086 12.9949C19.2731 13.2233 19.2958 13.5245 19.1675 13.775C19.0392 14.0255 18.7814 14.1831 18.5 14.1831H5.5C4.11463 14.1831 2.75 13.2237 2.75 11.7664V7.93729C2.9939 7.97821 3.24446 7.99951 3.5 7.99951C3.75553 7.99951 4.00609 7.97821 4.25 7.93729V11.7664C4.25 12.1508 4.67537 12.6831 5.5 12.6831H17.0358L14.8913 9.70467C14.7994 9.57703 14.75 9.42372 14.75 9.26644V5.09977C14.75 4.71538 14.3246 4.18311 13.5 4.18311H7.94841Z\"\n fill=\"#FFBD26\"\n />\n <path\n d=\"M11.5 6.99951H8.5\"\n stroke=\"#FFBD26\"\n stroke-width=\"1.5\"\n stroke-miterlimit=\"10\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M12 9.99951H7\"\n stroke=\"#FFBD26\"\n stroke-width=\"1.5\"\n stroke-miterlimit=\"10\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M3.5 1L3.5 6\"\n stroke=\"#FFBD26\"\n stroke-width=\"1.5\"\n stroke-miterlimit=\"10\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 3.5L1 3.5\"\n stroke=\"#FFBD26\"\n stroke-width=\"1.5\"\n stroke-miterlimit=\"10\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n";
|
|
18
18
|
export declare const editAttrsTrackingIcon = "\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12 2L14 4L9 9L6 10L7 7L12 2Z\"\n stroke=\"#353535\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M13 10V11.5C13 12.328 12.328 13 11.5 13H4.5C3.672 13 3 12.328 3 11.5V4.5C3 3.672 3.672 3 4.5 3H6\"\n stroke=\"#353535\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n";
|
|
19
|
-
export declare const alertIcon = "\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M6 12C2.68629 12 1.18852e-06 9.31371 1.47821e-06 6C1.7679e-06 2.68629 2.68629 1.39444e-07 6 4.29138e-07C9.31371 7.18831e-07 12 2.68629 12 6C12 9.31371 9.31371 12 6 12ZM6.74998 2.99996L6.75 6.37462C6.75 6.78819 6.41522 7.12243 6.00166 7.12334C5.58681 7.12426 5.25001 6.78821 5.25001 6.37335L5.25 3.00082C5.25 2.58629 5.58629 2.25037 6.00082 2.25083C6.4147 2.25128 6.74998 2.58607 6.74998 2.99996ZM6.75 8.99263C6.75 9.46884 6.47288 9.75 5.99853 9.75C5.52419 9.75 5.25 9.47179 5.25 8.99558C5.25 8.51937 5.52421 8.25 5.99855 8.25C6.47289 8.25 6.75 8.51642 6.75 8.99263Z\"\n fill=\"#FE8F1F\"\n />\n </svg>\n";
|
|
@@ -21,6 +21,5 @@ interface PluginState {
|
|
|
21
21
|
}
|
|
22
22
|
export declare const footnotesKey: PluginKey<PluginState>;
|
|
23
23
|
export declare const buildPluginState: (doc: ManuscriptNode) => PluginState;
|
|
24
|
-
export declare const uncitedFootnoteWidget: () => () => HTMLSpanElement;
|
|
25
24
|
declare const _default: () => Plugin<PluginState>;
|
|
26
25
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/body-editor",
|
|
3
3
|
"description": "Prosemirror components for editing and viewing manuscripts",
|
|
4
|
-
"version": "1.7.8
|
|
4
|
+
"version": "1.7.8",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -109,4 +109,4 @@
|
|
|
109
109
|
"resolutions": {
|
|
110
110
|
"@types/react": "^17.0.2"
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
package/styles/Editor.css
CHANGED
|
@@ -955,7 +955,7 @@
|
|
|
955
955
|
counter-reset: table_footnote;
|
|
956
956
|
}
|
|
957
957
|
|
|
958
|
-
.ProseMirror .table-footer .footnote-element
|
|
958
|
+
.ProseMirror .table-footer .footnote-element p::before {
|
|
959
959
|
counter-increment: table_footnote;
|
|
960
960
|
content: counter(table_footnote);
|
|
961
961
|
display: inline-block;
|
|
@@ -998,18 +998,6 @@
|
|
|
998
998
|
cursor: pointer;
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
|
-
.ProseMirror .footnote-element > div:has(.unctied-table-footnote) {
|
|
1002
|
-
position: relative;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
.ProseMirror .unctied-table-footnote {
|
|
1006
|
-
display: flex;
|
|
1007
|
-
position: absolute;
|
|
1008
|
-
margin-right: 4px;
|
|
1009
|
-
top: 10%;
|
|
1010
|
-
right: 100%;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
1001
|
.graphical-abstract .listing {
|
|
1014
1002
|
display: none;
|
|
1015
1003
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* © 2024 Atypon Systems LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.findTableInlineFootnoteIds = void 0;
|
|
19
|
-
const transform_1 = require("@manuscripts/transform");
|
|
20
|
-
const prosemirror_utils_1 = require("prosemirror-utils");
|
|
21
|
-
const findTableInlineFootnoteIds = ($pos) => {
|
|
22
|
-
var _a;
|
|
23
|
-
const tableElement = (_a = (0, prosemirror_utils_1.findParentNodeClosestToPos)($pos, (node) => node.type === transform_1.schema.nodes.table_element)) === null || _a === void 0 ? void 0 : _a.node.firstChild;
|
|
24
|
-
return new Set(tableElement
|
|
25
|
-
? (0, prosemirror_utils_1.findChildren)(tableElement, (node) => node.type === transform_1.schema.nodes.inline_footnote)
|
|
26
|
-
.map(({ node }) => node.attrs.rids)
|
|
27
|
-
.flat()
|
|
28
|
-
: []);
|
|
29
|
-
};
|
|
30
|
-
exports.findTableInlineFootnoteIds = findTableInlineFootnoteIds;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2024 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { schema } from '@manuscripts/transform';
|
|
17
|
-
import { findChildren, findParentNodeClosestToPos } from 'prosemirror-utils';
|
|
18
|
-
export const findTableInlineFootnoteIds = ($pos) => {
|
|
19
|
-
var _a;
|
|
20
|
-
const tableElement = (_a = findParentNodeClosestToPos($pos, (node) => node.type === schema.nodes.table_element)) === null || _a === void 0 ? void 0 : _a.node.firstChild;
|
|
21
|
-
return new Set(tableElement
|
|
22
|
-
? findChildren(tableElement, (node) => node.type === schema.nodes.inline_footnote)
|
|
23
|
-
.map(({ node }) => node.attrs.rids)
|
|
24
|
-
.flat()
|
|
25
|
-
: []);
|
|
26
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2024 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { ResolvedPos } from 'prosemirror-model';
|
|
17
|
-
export declare const findTableInlineFootnoteIds: ($pos: ResolvedPos) => Set<string>;
|