@manuscripts/article-editor 4.13.40 → 4.13.42
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/setupTests.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*!
|
|
3
|
-
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the
|
|
3
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
4
4
|
*
|
|
5
|
-
* Software distributed under the License is distributed on an
|
|
5
|
+
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
6
6
|
*
|
|
7
7
|
* The Original Code is manuscripts-frontend.
|
|
8
8
|
*
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
const uuid_1 = require("uuid");
|
|
15
|
+
const vitest_1 = require("vitest");
|
|
15
16
|
process.env.MANUSCRIPTS_API_URL = 'https://127.0.0.1/';
|
|
16
17
|
const supportedCommands = [];
|
|
17
18
|
Object.defineProperty(document, 'queryCommandSupported', {
|
|
@@ -22,19 +23,19 @@ Object.defineProperty(document, 'execCommand', {
|
|
|
22
23
|
});
|
|
23
24
|
if (!window.URL.createObjectURL) {
|
|
24
25
|
Object.defineProperty(window.URL, 'createObjectURL', {
|
|
25
|
-
value:
|
|
26
|
+
value: vitest_1.vi.fn(() => 'blob:https://localhost/' + (0, uuid_1.v4)()),
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
if (!window.matchMedia) {
|
|
29
30
|
Object.defineProperty(window, 'matchMedia', {
|
|
30
|
-
value:
|
|
31
|
+
value: vitest_1.vi.fn((media) => ({
|
|
31
32
|
matches: false,
|
|
32
33
|
media,
|
|
33
|
-
addListener:
|
|
34
|
-
removeListener:
|
|
34
|
+
addListener: vitest_1.vi.fn(),
|
|
35
|
+
removeListener: vitest_1.vi.fn(),
|
|
35
36
|
})),
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
// @ts-ignore
|
|
39
|
-
global.fetch =
|
|
40
|
+
global.fetch = vitest_1.vi.fn(() => Promise.resolve());
|
|
40
41
|
//# sourceMappingURL=setupTests.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAEH,+BAAiC;
|
|
1
|
+
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAEH,+BAAiC;AACjC,mCAA2B;AAE3B,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAG,oBAAoB,CAAA;AAEtD,MAAM,iBAAiB,GAAa,EAAE,CAAA;AAEtC,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,uBAAuB,EAAE;IACvD,KAAK,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC;CACxD,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE;IAC7C,KAAK,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC;CACxD,CAAC,CAAA;AAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;IAChC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,iBAAiB,EAAE;QACnD,KAAK,EAAE,WAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,yBAAyB,GAAG,IAAA,SAAI,GAAE,CAAC;KACvD,CAAC,CAAA;AACJ,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IACvB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE;QAC1C,KAAK,EAAE,WAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACvB,OAAO,EAAE,KAAK;YACd,KAAK;YACL,WAAW,EAAE,WAAE,CAAC,EAAE,EAAE;YACpB,cAAc,EAAE,WAAE,CAAC,EAAE,EAAE;SACxB,CAAC,CAAC;KACJ,CAAC,CAAA;AACJ,CAAC;AAED,aAAa;AACb,MAAM,CAAC,KAAK,GAAG,WAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA"}
|
package/dist/es/setupTests.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
3
|
*
|
|
4
|
-
* Software distributed under the License is distributed on an
|
|
4
|
+
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
5
|
*
|
|
6
6
|
* The Original Code is manuscripts-frontend.
|
|
7
7
|
*
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
12
|
import { v4 as uuid } from 'uuid';
|
|
13
|
+
import { vi } from 'vitest';
|
|
13
14
|
process.env.MANUSCRIPTS_API_URL = 'https://127.0.0.1/';
|
|
14
15
|
const supportedCommands = [];
|
|
15
16
|
Object.defineProperty(document, 'queryCommandSupported', {
|
|
@@ -20,19 +21,19 @@ Object.defineProperty(document, 'execCommand', {
|
|
|
20
21
|
});
|
|
21
22
|
if (!window.URL.createObjectURL) {
|
|
22
23
|
Object.defineProperty(window.URL, 'createObjectURL', {
|
|
23
|
-
value:
|
|
24
|
+
value: vi.fn(() => 'blob:https://localhost/' + uuid()),
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
if (!window.matchMedia) {
|
|
27
28
|
Object.defineProperty(window, 'matchMedia', {
|
|
28
|
-
value:
|
|
29
|
+
value: vi.fn((media) => ({
|
|
29
30
|
matches: false,
|
|
30
31
|
media,
|
|
31
|
-
addListener:
|
|
32
|
-
removeListener:
|
|
32
|
+
addListener: vi.fn(),
|
|
33
|
+
removeListener: vi.fn(),
|
|
33
34
|
})),
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
// @ts-ignore
|
|
37
|
-
global.fetch =
|
|
38
|
+
global.fetch = vi.fn(() => Promise.resolve());
|
|
38
39
|
//# sourceMappingURL=setupTests.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAA;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;A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 (the
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
3
|
*
|
|
4
|
-
* Software distributed under the License is distributed on an
|
|
4
|
+
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
5
|
*
|
|
6
6
|
* The Original Code is manuscripts-frontend.
|
|
7
7
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/article-editor",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.42",
|
|
4
4
|
"license": "CPAL-1.0",
|
|
5
5
|
"description": "React components for editing and viewing manuscripts",
|
|
6
6
|
"repository": "github:Atypon-OpenSource/manuscripts-article-editor",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build": "npm-run-all --parallel build:*",
|
|
21
21
|
"build:cjs": "tsc --outDir dist/cjs --module commonjs",
|
|
22
22
|
"build:es": "tsc --outDir dist/es --declarationDir dist/types --declaration",
|
|
23
|
-
"test": "TZ=UTC
|
|
23
|
+
"test": "TZ=UTC vitest run",
|
|
24
24
|
"lint": "eslint src types --ext .ts,.tsx --max-warnings 0",
|
|
25
25
|
"lint:fix": "eslint src types --ext .ts,.tsx --max-warnings 0 --fix",
|
|
26
26
|
"typecheck": "tsc --noEmit",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@fontsource/pt-sans": "5.2.5",
|
|
36
36
|
"@fontsource/pt-serif": "5.2.5",
|
|
37
37
|
"@headlessui/react": "2.2.3",
|
|
38
|
-
"@manuscripts/body-editor": "3.12.
|
|
39
|
-
"@manuscripts/style-guide": "3.5.
|
|
40
|
-
"@manuscripts/track-changes-plugin": "2.3.
|
|
41
|
-
"@manuscripts/transform": "4.3.
|
|
38
|
+
"@manuscripts/body-editor": "3.12.47",
|
|
39
|
+
"@manuscripts/style-guide": "3.5.22",
|
|
40
|
+
"@manuscripts/track-changes-plugin": "2.3.11",
|
|
41
|
+
"@manuscripts/transform": "4.3.44",
|
|
42
42
|
"@popperjs/core": "2.11.8",
|
|
43
43
|
"axios": "1.11.0",
|
|
44
44
|
"date-fns": "4.1.0",
|
|
@@ -65,16 +65,13 @@
|
|
|
65
65
|
"uuid": "9.0.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@
|
|
69
|
-
"@babel/preset-env": "7.23.8",
|
|
70
|
-
"@babel/preset-react": "7.27.1",
|
|
71
|
-
"@babel/preset-typescript": "7.23.3",
|
|
68
|
+
"@vitest/coverage-v8": "4.1.6",
|
|
72
69
|
"@eslint/eslintrc": "3.3.1",
|
|
73
70
|
"@eslint/js": "9.39.1",
|
|
74
71
|
"@manuscripts/eslint-config": "0.5.1",
|
|
75
72
|
"@types/diff-match-patch": "^1.0.36",
|
|
76
73
|
"@types/csl": "npm:csl-json@v0.1.0",
|
|
77
|
-
"
|
|
74
|
+
"jsdom": "26.0.0",
|
|
78
75
|
"@types/lodash": "4.17.16",
|
|
79
76
|
"@types/node": "20.17.46",
|
|
80
77
|
"@types/react": "19.2.3",
|
|
@@ -84,13 +81,12 @@
|
|
|
84
81
|
"@types/uuid": "9.0.8",
|
|
85
82
|
"@typescript-eslint/eslint-plugin": "8.46.4",
|
|
86
83
|
"@typescript-eslint/parser": "8.46.4",
|
|
87
|
-
"
|
|
84
|
+
"vitest": "4.1.6",
|
|
88
85
|
"eslint": "9.39.1",
|
|
89
86
|
"eslint-config-prettier": "10.1.8",
|
|
90
87
|
"eslint-plugin-diff": "2.0.3",
|
|
91
88
|
"eslint-plugin-header": "3.1.1",
|
|
92
89
|
"eslint-plugin-import": "2.32.0",
|
|
93
|
-
"eslint-plugin-jest": "29.1.0",
|
|
94
90
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
95
91
|
"eslint-plugin-mdx": "3.6.2",
|
|
96
92
|
"eslint-plugin-node": "11.1.0",
|
|
@@ -100,8 +96,6 @@
|
|
|
100
96
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
101
97
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
102
98
|
"husky": "8.0.3",
|
|
103
|
-
"jest": "30.0.5",
|
|
104
|
-
"jest-environment-jsdom": "30.0.5",
|
|
105
99
|
"npm-run-all": "4.1.5",
|
|
106
100
|
"prettier": "3.6.2",
|
|
107
101
|
"react-dnd-test-backend": "16.0.1",
|