@manuscripts/body-editor 3.2.32 → 3.2.33
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/components/views/FigureDropdown.js +44 -4
- package/dist/cjs/versions.js +1 -1
- package/dist/cjs/views/ReactSubView.js +1 -1
- package/dist/cjs/views/figure_editable.js +18 -23
- package/dist/es/components/views/FigureDropdown.js +21 -4
- package/dist/es/versions.js +1 -1
- package/dist/es/views/ReactSubView.js +1 -1
- package/dist/es/views/figure_editable.js +18 -23
- package/dist/types/components/views/FigureDropdown.d.ts +6 -1
- package/dist/types/versions.d.ts +1 -1
- package/dist/types/views/ReactSubView.d.ts +1 -3
- package/dist/types/views/figure_editable.d.ts +1 -0
- package/package.json +1 -1
- package/styles/AdvancedEditor.css +34 -22
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.FigureOptions = void 0;
|
|
7
30
|
const style_guide_1 = require("@manuscripts/style-guide");
|
|
8
|
-
const react_1 =
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
9
32
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
33
|
const files_1 = require("../../lib/files");
|
|
11
34
|
function getSupplements(getFiles, getDoc, groupFiles) {
|
|
@@ -16,14 +39,31 @@ function getSupplements(getFiles, getDoc, groupFiles) {
|
|
|
16
39
|
function getOtherFiles(getFiles, getDoc, groupFiles) {
|
|
17
40
|
return groupFiles(getDoc(), getFiles()).others.filter((f) => (0, style_guide_1.isImageFile)(f.name));
|
|
18
41
|
}
|
|
19
|
-
const FigureOptions = ({ can, getDoc, getFiles, onDownload, onUpload, onDetach, onReplace, onDelete, }) => {
|
|
42
|
+
const FigureOptions = ({ can, getDoc, getFiles, onDownload, onUpload, onDetach, onReplace, onDelete, hasSiblings, container, }) => {
|
|
20
43
|
const { isOpen, toggleOpen, wrapperRef } = (0, style_guide_1.useDropdown)();
|
|
21
44
|
const showDownload = onDownload && can.downloadFiles;
|
|
22
45
|
const showUpload = onUpload && can.uploadFile;
|
|
23
46
|
const showDetach = onDetach && can.detachFile;
|
|
24
47
|
const showReplace = onReplace && can.replaceFile;
|
|
25
48
|
const replaceBtnText = onDownload ? 'Replace' : 'Choose file';
|
|
26
|
-
const showDelete =
|
|
49
|
+
const showDelete = () => {
|
|
50
|
+
if (!hasSiblings()) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (onDelete && can.detachFile) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
};
|
|
58
|
+
(0, react_1.useEffect)(() => {
|
|
59
|
+
const activeClass = 'figure-dropdown-active';
|
|
60
|
+
if (isOpen) {
|
|
61
|
+
container.classList.add(activeClass);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
container.classList.remove(activeClass);
|
|
65
|
+
}
|
|
66
|
+
}, [isOpen, container.classList]);
|
|
27
67
|
const groupFiles = (0, files_1.memoGroupFiles)();
|
|
28
68
|
return (react_1.default.createElement(DropdownWrapper, { ref: wrapperRef },
|
|
29
69
|
react_1.default.createElement(OptionsButton, { className: 'options-button', onClick: toggleOpen },
|
|
@@ -41,7 +81,7 @@ const FigureOptions = ({ can, getDoc, getFiles, onDownload, onUpload, onDetach,
|
|
|
41
81
|
" Upload new...")) }),
|
|
42
82
|
react_1.default.createElement(ListItemButton, { onClick: onDownload, disabled: !showDownload }, "Download"),
|
|
43
83
|
react_1.default.createElement(ListItemButton, { onClick: onDetach, disabled: !showDetach }, "Detach"),
|
|
44
|
-
showDelete && (react_1.default.createElement(ListItemButton, { onClick: onDelete }, "Delete"))))));
|
|
84
|
+
showDelete() && (react_1.default.createElement(ListItemButton, { onClick: onDelete }, "Delete"))))));
|
|
45
85
|
};
|
|
46
86
|
exports.FigureOptions = FigureOptions;
|
|
47
87
|
const NestedDropdown = ({ parentToggleOpen, buttonText, disabled, list, moveLeft }) => {
|
package/dist/cjs/versions.js
CHANGED
|
@@ -39,7 +39,7 @@ function createSubView(props, Component, componentProps, node, getPos, view, cla
|
|
|
39
39
|
view.dispatch(tr);
|
|
40
40
|
};
|
|
41
41
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: props.theme },
|
|
42
|
-
react_1.default.createElement(Component, { nodeAttrs: node.attrs, setNodeAttrs: setNodeAttrs, viewProps: { node, view, getPos }, ...props, ...componentProps })));
|
|
42
|
+
react_1.default.createElement(Component, { nodeAttrs: node.attrs, setNodeAttrs: setNodeAttrs, viewProps: { node, view, getPos }, container: container, ...props, ...componentProps })));
|
|
43
43
|
};
|
|
44
44
|
const root = (0, client_1.createRoot)(container);
|
|
45
45
|
root.render(react_1.default.createElement(Wrapped, null));
|
|
@@ -278,6 +278,16 @@ class FigureEditableView extends figure_1.FigureView {
|
|
|
278
278
|
this.container.appendChild(dragHandle);
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
+
countFigures() {
|
|
282
|
+
const parent = (0, prosemirror_utils_1.findParentNodeOfTypeClosestToPos)(this.view.state.doc.resolve(this.getPos()), transform_1.schema.nodes.figure_element);
|
|
283
|
+
let count = 0;
|
|
284
|
+
parent?.node.descendants((node) => {
|
|
285
|
+
if (node.type === transform_1.schema.nodes.figure && !(0, track_changes_utils_1.isDeleted)(node)) {
|
|
286
|
+
count++;
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
return count;
|
|
290
|
+
}
|
|
281
291
|
manageReactTools() {
|
|
282
292
|
let handleDownload;
|
|
283
293
|
let handleUpload;
|
|
@@ -323,30 +333,12 @@ class FigureEditableView extends figure_1.FigureView {
|
|
|
323
333
|
handleUpload = (0, figure_uploader_1.figureUploader)(this.upload);
|
|
324
334
|
}
|
|
325
335
|
if (can.detachFile) {
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
count++;
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
return count;
|
|
336
|
+
handleDelete = () => {
|
|
337
|
+
const pos = this.getPos();
|
|
338
|
+
const tr = this.view.state.tr;
|
|
339
|
+
tr.delete(pos, pos + this.node.nodeSize);
|
|
340
|
+
this.view.dispatch(tr);
|
|
335
341
|
};
|
|
336
|
-
const figureCount = countFigures();
|
|
337
|
-
handleDelete =
|
|
338
|
-
figureCount > 1
|
|
339
|
-
? () => {
|
|
340
|
-
const currentCount = countFigures();
|
|
341
|
-
const pos = this.getPos();
|
|
342
|
-
if (currentCount <= 1) {
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
const tr = this.view.state.tr;
|
|
346
|
-
tr.delete(pos, pos + this.node.nodeSize);
|
|
347
|
-
this.view.dispatch(tr);
|
|
348
|
-
}
|
|
349
|
-
: undefined;
|
|
350
342
|
}
|
|
351
343
|
this.reactTools?.remove();
|
|
352
344
|
if (this.props.dispatch && this.props.theme) {
|
|
@@ -359,6 +351,9 @@ class FigureEditableView extends figure_1.FigureView {
|
|
|
359
351
|
onDetach: handleDetach,
|
|
360
352
|
onReplace: handleReplace,
|
|
361
353
|
onDelete: handleDelete,
|
|
354
|
+
hasSiblings: () => {
|
|
355
|
+
return this.countFigures() > 1;
|
|
356
|
+
},
|
|
362
357
|
};
|
|
363
358
|
this.reactTools = (0, ReactSubView_1.default)(this.props, FigureDropdown_1.FigureOptions, componentProps, this.node, this.getPos, this.view);
|
|
364
359
|
this.dom.insertBefore(this.reactTools, this.dom.firstChild);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DotsIcon, DropdownList, getFileIcon, IconButton, IconTextButton, isImageFile, TriangleCollapsedIcon, UploadIcon, useDropdown, } from '@manuscripts/style-guide';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { memoGroupFiles, } from '../../lib/files';
|
|
5
5
|
function getSupplements(getFiles, getDoc, groupFiles) {
|
|
@@ -10,14 +10,31 @@ function getSupplements(getFiles, getDoc, groupFiles) {
|
|
|
10
10
|
function getOtherFiles(getFiles, getDoc, groupFiles) {
|
|
11
11
|
return groupFiles(getDoc(), getFiles()).others.filter((f) => isImageFile(f.name));
|
|
12
12
|
}
|
|
13
|
-
export const FigureOptions = ({ can, getDoc, getFiles, onDownload, onUpload, onDetach, onReplace, onDelete, }) => {
|
|
13
|
+
export const FigureOptions = ({ can, getDoc, getFiles, onDownload, onUpload, onDetach, onReplace, onDelete, hasSiblings, container, }) => {
|
|
14
14
|
const { isOpen, toggleOpen, wrapperRef } = useDropdown();
|
|
15
15
|
const showDownload = onDownload && can.downloadFiles;
|
|
16
16
|
const showUpload = onUpload && can.uploadFile;
|
|
17
17
|
const showDetach = onDetach && can.detachFile;
|
|
18
18
|
const showReplace = onReplace && can.replaceFile;
|
|
19
19
|
const replaceBtnText = onDownload ? 'Replace' : 'Choose file';
|
|
20
|
-
const showDelete =
|
|
20
|
+
const showDelete = () => {
|
|
21
|
+
if (!hasSiblings()) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (onDelete && can.detachFile) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
};
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
const activeClass = 'figure-dropdown-active';
|
|
31
|
+
if (isOpen) {
|
|
32
|
+
container.classList.add(activeClass);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
container.classList.remove(activeClass);
|
|
36
|
+
}
|
|
37
|
+
}, [isOpen, container.classList]);
|
|
21
38
|
const groupFiles = memoGroupFiles();
|
|
22
39
|
return (React.createElement(DropdownWrapper, { ref: wrapperRef },
|
|
23
40
|
React.createElement(OptionsButton, { className: 'options-button', onClick: toggleOpen },
|
|
@@ -35,7 +52,7 @@ export const FigureOptions = ({ can, getDoc, getFiles, onDownload, onUpload, onD
|
|
|
35
52
|
" Upload new...")) }),
|
|
36
53
|
React.createElement(ListItemButton, { onClick: onDownload, disabled: !showDownload }, "Download"),
|
|
37
54
|
React.createElement(ListItemButton, { onClick: onDetach, disabled: !showDetach }, "Detach"),
|
|
38
|
-
showDelete && (React.createElement(ListItemButton, { onClick: onDelete }, "Delete"))))));
|
|
55
|
+
showDelete() && (React.createElement(ListItemButton, { onClick: onDelete }, "Delete"))))));
|
|
39
56
|
};
|
|
40
57
|
const NestedDropdown = ({ parentToggleOpen, buttonText, disabled, list, moveLeft }) => {
|
|
41
58
|
const { isOpen, toggleOpen, wrapperRef } = useDropdown();
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.2.
|
|
1
|
+
export const VERSION = '3.2.33';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
|
@@ -34,7 +34,7 @@ function createSubView(props, Component, componentProps, node, getPos, view, cla
|
|
|
34
34
|
view.dispatch(tr);
|
|
35
35
|
};
|
|
36
36
|
return (React.createElement(ThemeProvider, { theme: props.theme },
|
|
37
|
-
React.createElement(Component, { nodeAttrs: node.attrs, setNodeAttrs: setNodeAttrs, viewProps: { node, view, getPos }, ...props, ...componentProps })));
|
|
37
|
+
React.createElement(Component, { nodeAttrs: node.attrs, setNodeAttrs: setNodeAttrs, viewProps: { node, view, getPos }, container: container, ...props, ...componentProps })));
|
|
38
38
|
};
|
|
39
39
|
const root = createRoot(container);
|
|
40
40
|
root.render(React.createElement(Wrapped, null));
|
|
@@ -272,6 +272,16 @@ export class FigureEditableView extends FigureView {
|
|
|
272
272
|
this.container.appendChild(dragHandle);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
+
countFigures() {
|
|
276
|
+
const parent = findParentNodeOfTypeClosestToPos(this.view.state.doc.resolve(this.getPos()), schema.nodes.figure_element);
|
|
277
|
+
let count = 0;
|
|
278
|
+
parent?.node.descendants((node) => {
|
|
279
|
+
if (node.type === schema.nodes.figure && !isDeleted(node)) {
|
|
280
|
+
count++;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
return count;
|
|
284
|
+
}
|
|
275
285
|
manageReactTools() {
|
|
276
286
|
let handleDownload;
|
|
277
287
|
let handleUpload;
|
|
@@ -317,30 +327,12 @@ export class FigureEditableView extends FigureView {
|
|
|
317
327
|
handleUpload = figureUploader(this.upload);
|
|
318
328
|
}
|
|
319
329
|
if (can.detachFile) {
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
count++;
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
return count;
|
|
330
|
+
handleDelete = () => {
|
|
331
|
+
const pos = this.getPos();
|
|
332
|
+
const tr = this.view.state.tr;
|
|
333
|
+
tr.delete(pos, pos + this.node.nodeSize);
|
|
334
|
+
this.view.dispatch(tr);
|
|
329
335
|
};
|
|
330
|
-
const figureCount = countFigures();
|
|
331
|
-
handleDelete =
|
|
332
|
-
figureCount > 1
|
|
333
|
-
? () => {
|
|
334
|
-
const currentCount = countFigures();
|
|
335
|
-
const pos = this.getPos();
|
|
336
|
-
if (currentCount <= 1) {
|
|
337
|
-
return;
|
|
338
|
-
}
|
|
339
|
-
const tr = this.view.state.tr;
|
|
340
|
-
tr.delete(pos, pos + this.node.nodeSize);
|
|
341
|
-
this.view.dispatch(tr);
|
|
342
|
-
}
|
|
343
|
-
: undefined;
|
|
344
336
|
}
|
|
345
337
|
this.reactTools?.remove();
|
|
346
338
|
if (this.props.dispatch && this.props.theme) {
|
|
@@ -353,6 +345,9 @@ export class FigureEditableView extends FigureView {
|
|
|
353
345
|
onDetach: handleDetach,
|
|
354
346
|
onReplace: handleReplace,
|
|
355
347
|
onDelete: handleDelete,
|
|
348
|
+
hasSiblings: () => {
|
|
349
|
+
return this.countFigures() > 1;
|
|
350
|
+
},
|
|
356
351
|
};
|
|
357
352
|
this.reactTools = ReactSubView(this.props, FigureOptions, componentProps, this.node, this.getPos, this.view);
|
|
358
353
|
this.dom.insertBefore(this.reactTools, this.dom.firstChild);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Capabilities } from '@manuscripts/style-guide';
|
|
2
|
+
import { FigureNode } from '@manuscripts/transform';
|
|
2
3
|
import { Node as ManuscriptNode } from 'prosemirror-model';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import { FileAttachment } from '../../lib/files';
|
|
6
|
+
import { ReactViewComponentProps } from '../../views/ReactSubView';
|
|
5
7
|
export interface FigureDropdownProps {
|
|
6
8
|
can: Capabilities;
|
|
7
9
|
getFiles: () => FileAttachment[];
|
|
@@ -13,10 +15,13 @@ export interface FigureOptionsProps extends FigureDropdownProps {
|
|
|
13
15
|
onReplace?: (file: FileAttachment, isSupplement?: boolean) => void;
|
|
14
16
|
getDoc: () => ManuscriptNode;
|
|
15
17
|
onDelete?: () => void;
|
|
18
|
+
hasSiblings: () => boolean;
|
|
16
19
|
}
|
|
17
20
|
export interface FigureElementOptionsProps extends FigureDropdownProps {
|
|
18
21
|
onAdd: (file: FileAttachment) => Promise<void>;
|
|
19
22
|
onUpload: () => void;
|
|
20
23
|
hasUploadedImage: boolean;
|
|
21
24
|
}
|
|
22
|
-
|
|
25
|
+
type WrappedProps = FigureOptionsProps & ReactViewComponentProps<FigureNode>;
|
|
26
|
+
export declare const FigureOptions: React.FC<WrappedProps>;
|
|
27
|
+
export {};
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.2.
|
|
1
|
+
export declare const VERSION = "3.2.33";
|
|
2
2
|
export declare const MATHJAX_VERSION = "3.2.2";
|
|
@@ -15,19 +15,17 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ManuscriptEditorView, ManuscriptNode } from '@manuscripts/transform';
|
|
17
17
|
import React from 'react';
|
|
18
|
-
import { Dispatch } from '../commands';
|
|
19
18
|
import { EditorProps } from '../configs/ManuscriptsEditor';
|
|
20
19
|
import { Trackable } from '../types';
|
|
21
20
|
export interface ReactViewComponentProps<NodeT extends ManuscriptNode> {
|
|
22
21
|
nodeAttrs: NodeT['attrs'];
|
|
23
22
|
setNodeAttrs: (nextAttrs: Partial<NodeT['attrs']>) => void;
|
|
24
|
-
contentDOM?: HTMLElement | null;
|
|
25
23
|
viewProps: {
|
|
26
24
|
view: ManuscriptEditorView;
|
|
27
25
|
getPos: () => number;
|
|
28
26
|
node: ManuscriptNode | Trackable<ManuscriptNode>;
|
|
29
27
|
};
|
|
30
|
-
|
|
28
|
+
container: HTMLDivElement;
|
|
31
29
|
}
|
|
32
30
|
declare function createSubView<T extends Trackable<ManuscriptNode>>(props: EditorProps, Component: React.FC<any>, componentProps: object, node: T, getPos: () => number, view: ManuscriptEditorView, classNames?: string[]): HTMLDivElement;
|
|
33
31
|
export default createSubView;
|
|
@@ -28,6 +28,7 @@ export declare class FigureEditableView extends FigureView {
|
|
|
28
28
|
upload: (file: File) => Promise<void>;
|
|
29
29
|
updateContents(): void;
|
|
30
30
|
protected addTools(): void;
|
|
31
|
+
countFigures(): number;
|
|
31
32
|
private manageReactTools;
|
|
32
33
|
protected setSrc: (src: string) => void;
|
|
33
34
|
private createUnsupportedFormat;
|
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": "3.2.
|
|
4
|
+
"version": "3.2.33",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
align-items: center;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
.ProseMirror
|
|
161
|
+
.ProseMirror .figure-images-container .figure-image-container {
|
|
162
162
|
position: relative;
|
|
163
163
|
margin-bottom: 30px;
|
|
164
164
|
}
|
|
@@ -172,18 +172,17 @@
|
|
|
172
172
|
cursor: pointer;
|
|
173
173
|
position: absolute;
|
|
174
174
|
border-radius: 50%;
|
|
175
|
-
background-color: #
|
|
175
|
+
background-color: #6e6e6e;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
.ProseMirror .block-figure_element .add-figure-button.disabled {
|
|
179
|
-
background-color: #
|
|
179
|
+
background-color: #e2e2e2 !important;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
.ProseMirror .block-figure_element .add-figure-button svg path {
|
|
183
|
-
fill: #
|
|
183
|
+
fill: #ffffff !important;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
|
|
187
186
|
.ProseMirror .figure-block:hover .options-button {
|
|
188
187
|
visibility: visible;
|
|
189
188
|
}
|
|
@@ -283,7 +282,6 @@
|
|
|
283
282
|
text-align: left;
|
|
284
283
|
}
|
|
285
284
|
|
|
286
|
-
|
|
287
285
|
.ProseMirror .figure-block > figcaption .figure-label {
|
|
288
286
|
display: initial !important;
|
|
289
287
|
}
|
|
@@ -448,6 +446,10 @@
|
|
|
448
446
|
z-index: 3;
|
|
449
447
|
}
|
|
450
448
|
|
|
449
|
+
.tools-panel.figure-dropdown-active {
|
|
450
|
+
z-index: 4;
|
|
451
|
+
}
|
|
452
|
+
|
|
451
453
|
.tools-panel button svg {
|
|
452
454
|
max-width: 16px;
|
|
453
455
|
}
|
|
@@ -810,7 +812,7 @@ span.comment-marker {
|
|
|
810
812
|
}
|
|
811
813
|
|
|
812
814
|
.ProseMirror .inconsistency-highlight {
|
|
813
|
-
border: 1px solid #f35143!important;
|
|
815
|
+
border: 1px solid #f35143 !important;
|
|
814
816
|
background: #fff1f0;
|
|
815
817
|
border-radius: 4px;
|
|
816
818
|
box-sizing: border-box;
|
|
@@ -820,7 +822,7 @@ span.comment-marker {
|
|
|
820
822
|
.ProseMirror .inconsistency-highlight.selected-suggestion,
|
|
821
823
|
.ProseMirror .inconsistency-highlight.footnote-marker-selected,
|
|
822
824
|
.ProseMirror .inconsistency-highlight.ProseMirror-selectednode {
|
|
823
|
-
border: 2px solid #f35143!important;
|
|
825
|
+
border: 2px solid #f35143 !important;
|
|
824
826
|
background: #fff1f0;
|
|
825
827
|
}
|
|
826
828
|
|
|
@@ -990,17 +992,22 @@ figure.block:has(.equation.selected-suggestion) {
|
|
|
990
992
|
.tracking-visible
|
|
991
993
|
.ProseMirror
|
|
992
994
|
[data-track-status='pending'][data-track-op='delete']
|
|
993
|
-
.block,
|
|
994
|
-
|
|
995
|
-
|
|
995
|
+
.block,
|
|
996
|
+
.tracking-visible
|
|
997
|
+
.ProseMirror
|
|
998
|
+
.figure-block
|
|
999
|
+
figure[data-track-status='pending'].deleted
|
|
1000
|
+
img {
|
|
996
1001
|
box-shadow: inset 3px 0 0 var(--deleted-color);
|
|
997
1002
|
}
|
|
998
1003
|
|
|
999
1004
|
.tracking-visible
|
|
1000
|
-
.ProseMirror
|
|
1001
|
-
|
|
1005
|
+
.ProseMirror
|
|
1006
|
+
.figure-block
|
|
1007
|
+
figure[data-track-status='pending'].deleted
|
|
1008
|
+
img {
|
|
1002
1009
|
padding-left: 3px;
|
|
1003
|
-
|
|
1010
|
+
}
|
|
1004
1011
|
|
|
1005
1012
|
.selected-suggestion[data-track-status='pending'][data-track-op='delete']
|
|
1006
1013
|
.block,
|
|
@@ -1019,7 +1026,8 @@ figure.block:has(.equation.selected-suggestion) {
|
|
|
1019
1026
|
.tracking-visible
|
|
1020
1027
|
.ProseMirror
|
|
1021
1028
|
[data-track-op='node_split'][data-track-status='pending']
|
|
1022
|
-
.block,
|
|
1029
|
+
.block,
|
|
1030
|
+
.tracking-visible
|
|
1023
1031
|
.selected-suggestion[data-track-op='move'][data-track-status='pending']
|
|
1024
1032
|
.block , .block:has(figure.selected-suggestion, [data-track-op='move'][data-track-status='pending']){
|
|
1025
1033
|
box-shadow: inset 3px 0 0 var(--updated-border-color) ;
|
|
@@ -1030,9 +1038,10 @@ figure.block:has(.equation.selected-suggestion) {
|
|
|
1030
1038
|
.tracking-visible
|
|
1031
1039
|
.block:has(figure.selected-suggestion[data-track-op='set_attrs']),
|
|
1032
1040
|
.tracking-visible .selected-suggestion[data-track-op='node_split'] .block,
|
|
1033
|
-
.tracking-visible figure.block:has(.equation.set_attrs.selected-suggestion),
|
|
1034
|
-
.
|
|
1035
|
-
.
|
|
1041
|
+
.tracking-visible figure.block:has(.equation.set_attrs.selected-suggestion),
|
|
1042
|
+
.tracking-visible
|
|
1043
|
+
.selected-suggestion[data-track-op='move'][data-track-status='pending']
|
|
1044
|
+
.block {
|
|
1036
1045
|
box-shadow: inset 6px 0 0 var(--updated-border-color),
|
|
1037
1046
|
inset 9px 0 0 var(--updated-bg-color) !important;
|
|
1038
1047
|
animation: fadeOutBackground 3s forwards;
|
|
@@ -1052,7 +1061,6 @@ figure.block:has(.equation.selected-suggestion) {
|
|
|
1052
1061
|
display: none !important;
|
|
1053
1062
|
}
|
|
1054
1063
|
|
|
1055
|
-
|
|
1056
1064
|
.citation-wrapper {
|
|
1057
1065
|
position: relative;
|
|
1058
1066
|
}
|
|
@@ -1107,13 +1115,17 @@ figure.block:has(.equation.selected-suggestion) {
|
|
|
1107
1115
|
}
|
|
1108
1116
|
|
|
1109
1117
|
/* Needed for the snapshot comparison */
|
|
1110
|
-
.tracking-visible
|
|
1118
|
+
.tracking-visible
|
|
1119
|
+
.block-list
|
|
1120
|
+
[data-track-op='insert'][data-track-status='pending'] {
|
|
1111
1121
|
background: var(--inserted-pending-bg-color);
|
|
1112
1122
|
color: var(--inserted-pending-color);
|
|
1113
1123
|
text-decoration: underline;
|
|
1114
1124
|
}
|
|
1115
1125
|
/* Needed for the snapshot comparison */
|
|
1116
|
-
.tracking-visible
|
|
1126
|
+
.tracking-visible
|
|
1127
|
+
.block-list
|
|
1128
|
+
[data-track-op='delete'][data-track-status='pending'] {
|
|
1117
1129
|
background: var(--deleted-pending-bg-color);
|
|
1118
1130
|
color: var(--deleted-color);
|
|
1119
1131
|
text-decoration: line-through;
|
|
@@ -1615,4 +1627,4 @@ th:hover > .table-context-menu-button,
|
|
|
1615
1627
|
.ProseMirror .block-image_element .block:focus-visible,
|
|
1616
1628
|
.ProseMirror .block-figure_element .block:focus-visible {
|
|
1617
1629
|
outline: none;
|
|
1618
|
-
}
|
|
1630
|
+
}
|