@manuscripts/body-editor 2.0.1 → 2.0.2-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.
@@ -62,7 +62,7 @@ exports.default = (props) => {
62
62
  (0, sections_1.default)(),
63
63
  (0, toc_1.default)(),
64
64
  (0, bibliography_1.default)(props),
65
- (0, objects_1.default)(props),
65
+ (0, objects_1.default)(),
66
66
  (0, affiliations_1.default)(),
67
67
  (0, comments_1.default)(),
68
68
  (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.1';
4
+ exports.VERSION = '2.0.2-JSR';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -57,7 +57,7 @@ export default (props) => {
57
57
  sections(),
58
58
  toc(),
59
59
  bibliography(props),
60
- objects(props),
60
+ objects(),
61
61
  affiliations(),
62
62
  comments(),
63
63
  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.1';
1
+ export const VERSION = '2.0.2-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.1";
1
+ export declare const VERSION = "2.0.2-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.1",
4
+ "version": "2.0.2-JSR",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -15,10 +15,11 @@
15
15
  "build": "concurrently 'yarn:build:*'",
16
16
  "build:cjs": "tsc --outDir dist/cjs --module commonjs --project tsconfig.build.json",
17
17
  "build:es": "tsc --outDir dist/es --declarationDir dist/types --declaration --project tsconfig.build.json",
18
- "dev": "concurrently 'yarn:build:* --watch'",
18
+ "dev": "yarn dependencies-versions && concurrently 'yarn:build:* --watch'",
19
19
  "lint": "eslint src --ext .ts,.tsx --max-warnings=0",
20
20
  "lint:fix": "eslint src --fix --ext .ts,.tsx --max-warnings=0",
21
- "prebuild": "rimraf dist && node versions.mjs > src/versions.ts",
21
+ "prebuild": "rimraf dist && yarn dependencies-versions",
22
+ "dependencies-versions": "node versions.mjs > src/versions.ts",
22
23
  "prettier": "prettier --write 'src/**/*.{ts,tsx}'",
23
24
  "prepare": "husky install",
24
25
  "preversion": "concurrently 'yarn:typecheck' 'yarn:lint' 'yarn:test'",
@@ -32,8 +33,8 @@
32
33
  "@manuscripts/json-schema": "2.2.10",
33
34
  "@manuscripts/library": "1.3.10",
34
35
  "@manuscripts/style-guide": "2.0.0",
35
- "@manuscripts/track-changes-plugin": "1.7.14",
36
- "@manuscripts/transform": "2.3.21",
36
+ "@manuscripts/track-changes-plugin": "1.7.15",
37
+ "@manuscripts/transform": "2.3.21-JSR",
37
38
  "@popperjs/core": "^2.11.8",
38
39
  "astrocite-eutils": "^0.16.4",
39
40
  "codemirror": "^5.58.1",
@@ -111,5 +112,8 @@
111
112
  "resolutions": {
112
113
  "@types/react": "^18.3.1",
113
114
  "prosemirror-tables": "^1.3.5"
115
+ },
116
+ "engines": {
117
+ "node": ">=20.16.0"
114
118
  }
115
- }
119
+ }