@manuscripts/body-editor 2.0.13 → 2.0.14-JSR

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.
@@ -807,8 +807,8 @@ const createAndFillTableElement = (state, tableConfig) => {
807
807
  tableRows.push(createRow('table_cell'));
808
808
  }
809
809
  return nodes.table_element.createChecked({}, [
810
- nodes.table.create({}, tableRows),
811
810
  createAndFillFigcaptionElement(state),
811
+ nodes.table.create({}, tableRows),
812
812
  nodes.listing.create(),
813
813
  ]);
814
814
  };
@@ -64,7 +64,7 @@ exports.default = (props) => {
64
64
  (0, sections_1.default)(),
65
65
  (0, toc_1.default)(),
66
66
  (0, bibliography_1.default)(props),
67
- (0, objects_1.default)(props),
67
+ (0, objects_1.default)(),
68
68
  (0, affiliations_1.default)(),
69
69
  (0, comments_1.default)(),
70
70
  (0, paragraphs_1.default)(),
@@ -21,15 +21,15 @@ const prosemirror_model_1 = require("prosemirror-model");
21
21
  const prosemirror_state_1 = require("prosemirror-state");
22
22
  const prosemirror_view_1 = require("prosemirror-view");
23
23
  exports.objectsKey = new prosemirror_state_1.PluginKey('objects');
24
- exports.default = (props) => {
24
+ exports.default = () => {
25
25
  return new prosemirror_state_1.Plugin({
26
26
  key: exports.objectsKey,
27
27
  state: {
28
28
  init: (config, state) => {
29
- return (0, transform_1.buildTargets)(prosemirror_model_1.Fragment.from(state.doc.content), props.getManuscript());
29
+ return (0, transform_1.buildTargets)(prosemirror_model_1.Fragment.from(state.doc.content));
30
30
  },
31
31
  apply: (tr) => {
32
- return (0, transform_1.buildTargets)(prosemirror_model_1.Fragment.from(tr.doc.content), props.getManuscript());
32
+ return (0, transform_1.buildTargets)(prosemirror_model_1.Fragment.from(tr.doc.content));
33
33
  },
34
34
  },
35
35
  props: {
@@ -75,7 +75,6 @@ exports.defaultEditorProps = {
75
75
  download: () => { },
76
76
  },
77
77
  getCapabilities: () => (0, style_guide_1.getAllPermitted)(),
78
- getManuscript: () => exports.TEST_DATA.MANUSCRIPT,
79
78
  cslProps: {
80
79
  style: '',
81
80
  locale: '',
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MATHJAX_VERSION = exports.VERSION = void 0;
4
- exports.VERSION = '2.0.13';
4
+ exports.VERSION = '2.0.14-JSR';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -768,8 +768,8 @@ export const createAndFillTableElement = (state, tableConfig) => {
768
768
  tableRows.push(createRow('table_cell'));
769
769
  }
770
770
  return nodes.table_element.createChecked({}, [
771
- nodes.table.create({}, tableRows),
772
771
  createAndFillFigcaptionElement(state),
772
+ nodes.table.create({}, tableRows),
773
773
  nodes.listing.create(),
774
774
  ]);
775
775
  };
@@ -59,7 +59,7 @@ export default (props) => {
59
59
  sections(),
60
60
  toc(),
61
61
  bibliography(props),
62
- objects(props),
62
+ objects(),
63
63
  affiliations(),
64
64
  comments(),
65
65
  paragraphs(),
@@ -18,15 +18,15 @@ import { Fragment } from 'prosemirror-model';
18
18
  import { Plugin, PluginKey } from 'prosemirror-state';
19
19
  import { Decoration, DecorationSet } from 'prosemirror-view';
20
20
  export const objectsKey = new PluginKey('objects');
21
- export default (props) => {
21
+ export default () => {
22
22
  return new Plugin({
23
23
  key: objectsKey,
24
24
  state: {
25
25
  init: (config, state) => {
26
- return buildTargets(Fragment.from(state.doc.content), props.getManuscript());
26
+ return buildTargets(Fragment.from(state.doc.content));
27
27
  },
28
28
  apply: (tr) => {
29
- return buildTargets(Fragment.from(tr.doc.content), props.getManuscript());
29
+ return buildTargets(Fragment.from(tr.doc.content));
30
30
  },
31
31
  },
32
32
  props: {
@@ -69,7 +69,6 @@ export const defaultEditorProps = {
69
69
  download: () => { },
70
70
  },
71
71
  getCapabilities: () => getAllPermitted(),
72
- getManuscript: () => TEST_DATA.MANUSCRIPT,
73
72
  cslProps: {
74
73
  style: '',
75
74
  locale: '',
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.0.13';
1
+ export const VERSION = '2.0.14-JSR';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -13,12 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Manuscript } from '@manuscripts/json-schema';
17
16
  import { Capabilities } from '@manuscripts/style-guide';
18
17
  import { ManuscriptEditorView, ManuscriptNode } from '@manuscripts/transform';
19
18
  import React from 'react';
20
19
  export interface ManuscriptOutlineProps {
21
- manuscript: Manuscript;
22
20
  doc: ManuscriptNode | null;
23
21
  can?: Capabilities;
24
22
  view?: ManuscriptEditorView;
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import 'prosemirror-view/style/prosemirror.css';
17
- import { Manuscript, UserProfile } from '@manuscripts/json-schema';
17
+ import { UserProfile } from '@manuscripts/json-schema';
18
18
  import { Capabilities } from '@manuscripts/style-guide';
19
19
  import { ManuscriptNode } from '@manuscripts/transform';
20
20
  import { EditorState } from 'prosemirror-state';
@@ -37,7 +37,6 @@ export interface EditorProps {
37
37
  getCurrentUser: () => UserProfile;
38
38
  projectID: string;
39
39
  doc: ManuscriptNode;
40
- getManuscript: () => Manuscript;
41
40
  getFiles: () => FileAttachment[];
42
41
  fileManagement: FileManagement;
43
42
  popper: PopperManager;
@@ -13,12 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Manuscript } from '@manuscripts/json-schema';
17
16
  import { Target } from '@manuscripts/transform';
18
17
  import { Plugin, PluginKey } from 'prosemirror-state';
19
18
  export declare const objectsKey: PluginKey<Map<string, Target>>;
20
- interface Props {
21
- getManuscript: () => Manuscript;
22
- }
23
- declare const _default: (props: Props) => Plugin<Map<string, Target>>;
19
+ declare const _default: () => Plugin<Map<string, Target>>;
24
20
  export default _default;
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.0.13";
1
+ export declare const VERSION = "2.0.14-JSR";
2
2
  export declare const MATHJAX_VERSION = "3.2.2";
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": "2.0.13",
4
+ "version": "2.0.14-JSR",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -32,9 +32,9 @@
32
32
  "@iarna/word-count": "^1.1.2",
33
33
  "@manuscripts/json-schema": "2.2.10",
34
34
  "@manuscripts/library": "1.3.10",
35
- "@manuscripts/style-guide": "2.0.2",
35
+ "@manuscripts/style-guide": "2.0.3",
36
36
  "@manuscripts/track-changes-plugin": "1.7.17",
37
- "@manuscripts/transform": "2.3.21",
37
+ "@manuscripts/transform": "2.3.22-JSR",
38
38
  "@popperjs/core": "^2.11.8",
39
39
  "astrocite-eutils": "^0.16.4",
40
40
  "codemirror": "^5.58.1",
package/styles/Editor.css CHANGED
@@ -296,6 +296,10 @@
296
296
  word-wrap: break-word;
297
297
  }
298
298
 
299
+ .ProseMirror .block-table_element figcaption {
300
+ text-align: left;
301
+ }
302
+
299
303
  .ProseMirror .caption-title:not(.empty-node) {
300
304
  font-weight: bold;
301
305
  }
@@ -316,6 +320,14 @@
316
320
  content: 'Caption...';
317
321
  }
318
322
 
323
+ .ProseMirror .block-table_element .caption-description.empty-node::before {
324
+ content: 'Table caption';
325
+ }
326
+
327
+ .ProseMirror .block-table_element .caption-title.empty-node::before {
328
+ content: 'Table title';
329
+ }
330
+
319
331
  .ProseMirror .suppress-caption .caption-description {
320
332
  display: none;
321
333
  }