@modusoperandi/licit 1.1.4 → 1.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modusoperandi/licit",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "subversion": "1",
@@ -78,7 +78,7 @@
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": "^12.0.2",
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.261.2",
93
+ "flow-bin": "^0.265.3",
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,14 @@
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';
33
+ @import '@modusoperandi/licit-ui-commands/styles.css';
34
34
 
35
35
  /* Now loaded locally, so that it work in closed network as well. */
36
36
  @import './ui/fonts.css';
37
37
  @import './ui/icon-font.css';
38
- @import '~prosemirror-gapcursor/style/gapcursor.css';
39
- @import '~prosemirror-view/style/prosemirror.css';
40
- @import '~react-tooltip/dist/react-tooltip.css';
38
+ @import 'prosemirror-gapcursor/style/gapcursor.css';
39
+ @import 'prosemirror-view/style/prosemirror.css';
40
+ @import 'react-tooltip/dist/react-tooltip.css';
41
41
  @import './ui/listType.css';
42
42
 
43
43
  .ProseMirror {
@@ -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
- const marks =
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 = '';
@@ -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';
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import { EditorState, PluginView } from 'prosemirror-state';
2
+ import type { EditorState, PluginView } from 'prosemirror-state';
3
3
  import { EditorView } from 'prosemirror-view';
4
4
  import { Node } from 'prosemirror-model';
5
5
  import * as React from 'react';
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: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
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,
@@ -1,4 +1,4 @@
1
- @import '~@modusoperandi/licit-ui-commands/ui/czi-custom-button.css';
1
+ @import '@modusoperandi/licit-ui-commands/ui/czi-custom-button.css';
2
2
  @import './czi-vars.css';
3
3
 
4
4
  .czi-link-tooltip {
package/ui/czi-table.css CHANGED
@@ -9,7 +9,6 @@
9
9
  height: 12px;
10
10
  }
11
11
  .ProseMirror table {
12
- border: 1px solid var(--czi-table-border-color);
13
12
  border-collapse:collapse;
14
13
  border-spacing: 0;
15
14
  border: none;
package/ui/czi-vars.css CHANGED
@@ -1,2 +1,45 @@
1
- @import '~@modusoperandi/licit-ui-commands/ui/czi-vars.css';
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
+ }