@modusoperandi/licit 1.1.3 → 1.1.5
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/EMMarkSpec.js +30 -6
- package/EMMarkSpec.js.flow +30 -5
- package/EditorMarks.js +4 -2
- package/EditorMarks.js.flow +3 -0
- package/FontSizeMarkSpec.js +36 -21
- package/FontSizeMarkSpec.js.flow +32 -27
- package/FontTypeMarkSpec.js +33 -17
- package/FontTypeMarkSpec.js.flow +28 -15
- package/MarkNames.js +2 -1
- package/MarkNames.js.flow +1 -0
- package/OverrideMarkSpec.js +54 -0
- package/OverrideMarkSpec.js.flow +49 -0
- package/ParagraphNodeSpec.js +12 -3
- package/ParagraphNodeSpec.js.flow +25 -14
- package/StrikeMarkSpec.js +14 -7
- package/StrikeMarkSpec.js.flow +10 -7
- package/StrongMarkSpec.js +28 -15
- package/StrongMarkSpec.js.flow +26 -12
- package/TextColorMarkSpec.js +20 -10
- package/TextColorMarkSpec.js.flow +12 -7
- package/TextHighlightMarkSpec.js +21 -8
- package/TextHighlightMarkSpec.js.flow +16 -7
- package/TextSubMarkSpec.js +20 -4
- package/TextSubMarkSpec.js.flow +14 -6
- package/TextSuperMarkSpec.js +19 -4
- package/TextSuperMarkSpec.js.flow +14 -6
- package/TextUnderlineMarkSpec.js +15 -12
- package/TextUnderlineMarkSpec.js.flow +10 -13
- package/bom.xml +4167 -4144
- package/buildEditorPlugins.js +0 -1
- package/buildEditorPlugins.js.flow +7 -8
- package/package.json +5 -5
- package/styles.css +8 -6
- package/ui/ListItemNodeView.js +4 -0
- package/ui/ListItemNodeView.js.flow +5 -2
- package/ui/ListTypeMenu.js +6 -0
- package/ui/ListTypeMenu.js.flow +9 -0
- package/ui/TableCellMenu.js +0 -1
- package/ui/TableCellMenu.js.flow +1 -1
- package/ui/czi-editor.css +3 -4
- package/ui/czi-link-tooltip.css +1 -1
- package/ui/czi-table.css +0 -1
- package/ui/czi-vars.css +44 -1
package/buildEditorPlugins.js
CHANGED
|
@@ -20,7 +20,6 @@ import SelectionPlaceholderPlugin from './SelectionPlaceholderPlugin.js';
|
|
|
20
20
|
import TablePlugins from './TablePlugins.js';
|
|
21
21
|
import buildInputRules from './buildInputRules.js';
|
|
22
22
|
import createEditorKeyMap from './createEditorKeyMap.js';
|
|
23
|
-
|
|
24
23
|
// Creates the default plugin for the editor.
|
|
25
24
|
var DefaultEditorPlugins = /*#__PURE__*/function () {
|
|
26
25
|
function DefaultEditorPlugins(schema) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
import {baseKeymap} from 'prosemirror-commands';
|
|
3
|
-
import {dropCursor} from 'prosemirror-dropcursor';
|
|
4
|
-
import {gapCursor} from 'prosemirror-gapcursor';
|
|
5
|
-
import {history} from 'prosemirror-history';
|
|
6
|
-
import {keymap} from 'prosemirror-keymap';
|
|
7
|
-
import {Schema} from 'prosemirror-model';
|
|
8
|
-
import {Plugin, PluginKey} from 'prosemirror-state';
|
|
2
|
+
import { baseKeymap } from 'prosemirror-commands';
|
|
3
|
+
import { dropCursor } from 'prosemirror-dropcursor';
|
|
4
|
+
import { gapCursor } from 'prosemirror-gapcursor';
|
|
5
|
+
import { history } from 'prosemirror-history';
|
|
6
|
+
import { keymap } from 'prosemirror-keymap';
|
|
7
|
+
import { Schema } from 'prosemirror-model';
|
|
8
|
+
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
9
9
|
import ContentPlaceholderPlugin from './ContentPlaceholderPlugin.js';
|
|
10
10
|
import CursorPlaceholderPlugin from './CursorPlaceholderPlugin.js';
|
|
11
11
|
import EditorPageLayoutPlugin from './EditorPageLayoutPlugin.js';
|
|
@@ -14,7 +14,6 @@ import SelectionPlaceholderPlugin from './SelectionPlaceholderPlugin.js';
|
|
|
14
14
|
import TablePlugins from './TablePlugins.js';
|
|
15
15
|
import buildInputRules from './buildInputRules.js';
|
|
16
16
|
import createEditorKeyMap from './createEditorKeyMap.js';
|
|
17
|
-
|
|
18
17
|
// Creates the default plugin for the editor.
|
|
19
18
|
export default class DefaultEditorPlugins {
|
|
20
19
|
plugins: Array<Plugin>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modusoperandi/licit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"subversion": "1",
|
|
@@ -71,14 +71,14 @@
|
|
|
71
71
|
"@babel/preset-env": "^7.19.4",
|
|
72
72
|
"@babel/preset-flow": "^7.10.4",
|
|
73
73
|
"@babel/preset-react": "^7.18.6",
|
|
74
|
-
"@cyclonedx/cyclonedx-npm": "^
|
|
74
|
+
"@cyclonedx/cyclonedx-npm": "^2.0.0",
|
|
75
75
|
"babel-jest": "^29.2.0",
|
|
76
|
-
"babel-loader": "^
|
|
76
|
+
"babel-loader": "^10.0.0",
|
|
77
77
|
"babel-plugin-flow-react-proptypes": "^26.0.0",
|
|
78
78
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
79
79
|
"body-parser": "^1.19.0",
|
|
80
80
|
"clean-webpack-plugin": "^4.0.0",
|
|
81
|
-
"copy-webpack-plugin": "^
|
|
81
|
+
"copy-webpack-plugin": "^13.0.0",
|
|
82
82
|
"copyfiles": "^2.4.1",
|
|
83
83
|
"cors": "^2.8.5",
|
|
84
84
|
"css-loader": "^7.1.1",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"exports-loader": "^5.0.0",
|
|
91
91
|
"express": "^4.17.1",
|
|
92
92
|
"file-loader": "^6.2.0",
|
|
93
|
-
"flow-bin": "^0.
|
|
93
|
+
"flow-bin": "^0.263.0",
|
|
94
94
|
"flow-copy-source": "^2.0.9",
|
|
95
95
|
"flow-typed": "^4.0.0",
|
|
96
96
|
"flow-webpack-plugin": "^1.2.0",
|
package/styles.css
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
@import './ui/czi-indent.css';
|
|
4
4
|
@import './ui/czi-list.css';
|
|
5
5
|
@import './ui/czi-table.css';
|
|
6
|
-
@import '~@modusoperandi/licit-ui-commands/styles.css';
|
|
7
6
|
@import './ui/czi-bookmark-view.css';
|
|
8
7
|
@import './ui/czi-body-layout-editor.css';
|
|
9
8
|
@import './ui/czi-cursor-placeholder.css';
|
|
@@ -31,13 +30,16 @@
|
|
|
31
30
|
@import './ui/czi-table-cell-menu.css';
|
|
32
31
|
@import './ui/czi-table-grid-size-editor.css';
|
|
33
32
|
@import './client/licit.css';
|
|
34
|
-
|
|
35
|
-
/* [FS] IRAD-1061 2020-09-19 */
|
|
33
|
+
@import '@modusoperandi/licit-ui-commands/styles.css';
|
|
36
34
|
|
|
37
35
|
/* Now loaded locally, so that it work in closed network as well. */
|
|
38
36
|
@import './ui/fonts.css';
|
|
39
37
|
@import './ui/icon-font.css';
|
|
40
|
-
@import '
|
|
41
|
-
@import '
|
|
42
|
-
@import '
|
|
38
|
+
@import 'prosemirror-gapcursor/style/gapcursor.css';
|
|
39
|
+
@import 'prosemirror-view/style/prosemirror.css';
|
|
40
|
+
@import 'react-tooltip/dist/react-tooltip.css';
|
|
43
41
|
@import './ui/listType.css';
|
|
42
|
+
|
|
43
|
+
.ProseMirror {
|
|
44
|
+
content-visibility: auto /* (browser) Only render visable content */
|
|
45
|
+
}
|
package/ui/ListItemNodeView.js
CHANGED
|
@@ -23,6 +23,7 @@ var ListItemNodeView = /*#__PURE__*/function () {
|
|
|
23
23
|
_defineProperty(this, "_nodeUpdated", void 0);
|
|
24
24
|
var dom = document.createElement('li');
|
|
25
25
|
this.dom = dom;
|
|
26
|
+
this._editorView = editorView;
|
|
26
27
|
this.contentDOM = dom;
|
|
27
28
|
this._updateDOM(node);
|
|
28
29
|
}
|
|
@@ -49,6 +50,9 @@ var ListItemNodeView = /*#__PURE__*/function () {
|
|
|
49
50
|
// This resolves the styles for the counter by examines the marks for the
|
|
50
51
|
// first text node of the list item.
|
|
51
52
|
var marks = initialContent && initialContent.isText && initialContent.textContent ? initialContent.marks : null;
|
|
53
|
+
if (!marks) {
|
|
54
|
+
marks = this._editorView.state.tr.storedMarks;
|
|
55
|
+
}
|
|
52
56
|
var cssColor;
|
|
53
57
|
var cssFontSize;
|
|
54
58
|
var cssText = '';
|
|
@@ -25,6 +25,7 @@ class ListItemNodeView {
|
|
|
25
25
|
) {
|
|
26
26
|
const dom = document.createElement('li');
|
|
27
27
|
this.dom = dom;
|
|
28
|
+
this._editorView = editorView;
|
|
28
29
|
this.contentDOM = dom;
|
|
29
30
|
this._updateDOM(node);
|
|
30
31
|
}
|
|
@@ -49,11 +50,13 @@ class ListItemNodeView {
|
|
|
49
50
|
|
|
50
51
|
// This resolves the styles for the counter by examines the marks for the
|
|
51
52
|
// first text node of the list item.
|
|
52
|
-
|
|
53
|
+
let marks =
|
|
53
54
|
initialContent && initialContent.isText && initialContent.textContent
|
|
54
55
|
? initialContent.marks
|
|
55
56
|
: null;
|
|
56
|
-
|
|
57
|
+
if (!marks) {
|
|
58
|
+
marks = this._editorView.state.tr.storedMarks;
|
|
59
|
+
}
|
|
57
60
|
let cssColor;
|
|
58
61
|
let cssFontSize;
|
|
59
62
|
let cssText = '';
|
package/ui/ListTypeMenu.js
CHANGED
|
@@ -70,6 +70,9 @@ var ListTypeMenu = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
70
70
|
onClick: function onClick(e) {
|
|
71
71
|
return _this2._onUIEnter(command, e);
|
|
72
72
|
},
|
|
73
|
+
onMouseDown: preventEventDefault,
|
|
74
|
+
onMouseEnter: preventEventDefault,
|
|
75
|
+
onMouseUp: preventEventDefault,
|
|
73
76
|
value: command
|
|
74
77
|
}, command.label));
|
|
75
78
|
});
|
|
@@ -80,4 +83,7 @@ var ListTypeMenu = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
80
83
|
}
|
|
81
84
|
}]);
|
|
82
85
|
}(React.PureComponent);
|
|
86
|
+
export function preventEventDefault(e) {
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
}
|
|
83
89
|
export default ListTypeMenu;
|
package/ui/ListTypeMenu.js.flow
CHANGED
|
@@ -42,6 +42,9 @@ class ListTypeMenu extends React.PureComponent<any, any> {
|
|
|
42
42
|
id={label}
|
|
43
43
|
key={label}
|
|
44
44
|
onClick={(e) => this._onUIEnter(command, e)}
|
|
45
|
+
onMouseDown={preventEventDefault}
|
|
46
|
+
onMouseEnter={preventEventDefault}
|
|
47
|
+
onMouseUp={preventEventDefault}
|
|
45
48
|
value={command}
|
|
46
49
|
>
|
|
47
50
|
{command.label}
|
|
@@ -66,4 +69,10 @@ class ListTypeMenu extends React.PureComponent<any, any> {
|
|
|
66
69
|
};
|
|
67
70
|
}
|
|
68
71
|
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
export function preventEventDefault(e: React.SyntheticEvent): void {
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
}
|
|
77
|
+
|
|
69
78
|
export default ListTypeMenu;
|
package/ui/TableCellMenu.js
CHANGED
|
@@ -12,7 +12,6 @@ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf
|
|
|
12
12
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
import { EditorState, PluginView } from 'prosemirror-state';
|
|
16
15
|
import { EditorView } from 'prosemirror-view';
|
|
17
16
|
import { Node } from 'prosemirror-model';
|
|
18
17
|
import * as React from 'react';
|
package/ui/TableCellMenu.js.flow
CHANGED
package/ui/czi-editor.css
CHANGED
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
.ProseMirror {
|
|
16
16
|
background: var(--czi-content-body-background-color);
|
|
17
17
|
border-radius: 1px;
|
|
18
|
-
box-shadow:
|
|
18
|
+
box-shadow:
|
|
19
|
+
0 3px 6px rgba(0, 0, 0, 0.16),
|
|
20
|
+
0 3px 6px rgba(0, 0, 0, 0.23);
|
|
19
21
|
box-sizing: border-box;
|
|
20
22
|
color: var(--czi-content-font-color);
|
|
21
23
|
font-family: var(--czi-content-font-family);
|
|
@@ -126,9 +128,6 @@
|
|
|
126
128
|
line-height: var(--czi-content-line-height);
|
|
127
129
|
margin: 0;
|
|
128
130
|
}
|
|
129
|
-
.prosemirror-editor-wrapper.readOnly a {
|
|
130
|
-
pointer-events: none; /* Disable interaction */
|
|
131
|
-
}
|
|
132
131
|
|
|
133
132
|
.ProseMirror a:link,
|
|
134
133
|
.ProseMirror a:visited,
|
package/ui/czi-link-tooltip.css
CHANGED
package/ui/czi-table.css
CHANGED
package/ui/czi-vars.css
CHANGED
|
@@ -1,2 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
:root {
|
|
2
|
+
--czi-blockquote-background-color: rgb(0 0 0 / 5%);
|
|
3
|
+
--czi-blockquote-border: solid 8px rgb(0 0 0 / 60%);
|
|
4
|
+
--czi-blockquote-color: #555;
|
|
5
|
+
--czi-blockquote-font-family: "Open Sans";
|
|
6
|
+
--czi-border-blue: solid 1px #5882eb;
|
|
7
|
+
--czi-border-grey: solid 1px #ccc;
|
|
8
|
+
--czi-border-red: solid 1px #f00;
|
|
9
|
+
--czi-button-hover-background-color: rgb(0 0 0 / 50%);
|
|
10
|
+
--czi-button-radius: 5px;
|
|
11
|
+
--czi-button-text-color: #666;
|
|
12
|
+
--czi-color-grey-200: rgb(0 0 0 / 46%);
|
|
13
|
+
--czi-font-family: helvetica;
|
|
14
|
+
--czi-font-size-small: 12px;
|
|
15
|
+
--czi-font-size: 13px;
|
|
16
|
+
--czi-link-color: rgb(0 0 238);
|
|
17
|
+
--czi-overlay-radius: 3px;
|
|
18
|
+
--czi-overlay-shadow: 0 1px 2px rgb(0 0 0 / 46%);
|
|
19
|
+
--czi-page-background-color: #e6e6e6;
|
|
20
|
+
--czi-placeholder-text-color: #dedede;
|
|
21
|
+
--czi-selection-highlight-color-dark: rgb(152 204 253 / 80%);
|
|
22
|
+
--czi-selection-highlight-color: rgb(152 204 253 / 40%);
|
|
23
|
+
--czi-table-header-background-color: rgb(0 0 0 / 5%);
|
|
24
|
+
--czi-table-border-color: #000;
|
|
25
|
+
--czi-doc-padding-default: 14.5mm;
|
|
26
|
+
--czi-doc-width-us-letter-portrait: 216mm;
|
|
27
|
+
--czi-doc-width-us-letter-landscape: 279mm;
|
|
28
|
+
--czi-doc-width-a4-portrait: 210mm;
|
|
29
|
+
--czi-doc-width-a4-landscape: 297mm;
|
|
30
|
+
--czi-doc-width-us-desktop-screen-4-3: 120vh;
|
|
31
|
+
--czi-doc-width-us-desktop-screen-16-9: 142vh;
|
|
2
32
|
|
|
33
|
+
/* content styles */
|
|
34
|
+
--czi-content-body-background-color: #fff;
|
|
35
|
+
--czi-content-font-color: #000;
|
|
36
|
+
--czi-content-font-family: arial;
|
|
37
|
+
--czi-content-font-size-h1: 18px;
|
|
38
|
+
--czi-content-font-size-h2: 16px;
|
|
39
|
+
--czi-content-font-size-h3: 13px;
|
|
40
|
+
--czi-content-font-size: 11pt;
|
|
41
|
+
|
|
42
|
+
/* This maps to the default line spacing value of 1.5 in Google Doc */
|
|
43
|
+
--czi-content-line-height: 138%;
|
|
44
|
+
--czi-content-link-color: rgb(0 0 238);
|
|
45
|
+
}
|