@manuscripts/transform 4.3.38 → 4.3.40
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/README.md +3 -3
- package/dist/cjs/schema/migration/migration-scripts/4.3.35.js +21 -0
- package/dist/cjs/schema/migration/migration-scripts/index.js +2 -0
- package/dist/cjs/schema/nodes/blockquote_element.js +1 -1
- package/dist/cjs/schema/nodes/pullquote_element.js +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/schema/migration/migration-scripts/4.3.35.js +19 -0
- package/dist/es/schema/migration/migration-scripts/index.js +2 -0
- package/dist/es/schema/nodes/blockquote_element.js +1 -1
- package/dist/es/schema/nodes/pullquote_element.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/types/schema/migration/migration-scripts/4.3.35.d.ts +8 -0
- package/dist/types/schema/migration/migration-scripts/index.d.ts +2 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@ It provides a way to import/export [Manuscript JSON Schema](https://gitlab.com/m
|
|
|
6
6
|
|
|
7
7
|
# Components
|
|
8
8
|
|
|
9
|
-
**Decoder**: converts Manuscript JSON Schema to ProseMirror Model.
|
|
9
|
+
**Decoder**: converts Manuscript JSON Schema to ProseMirror Model.
|
|
10
10
|
|
|
11
|
-
**Encoder**: converts ProseMirror Model to Manuscript JSON Schema.
|
|
11
|
+
**Encoder**: converts ProseMirror Model to Manuscript JSON Schema.
|
|
12
12
|
|
|
13
13
|
**ManuscriptNode**: a Manuscript definition of a ProseMirror Node which hold a ProseMirror fragment containing zero or more child nodes, for example a section node or a figure node.
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ It provides a way to import/export [Manuscript JSON Schema](https://gitlab.com/m
|
|
|
18
18
|
|
|
19
19
|
**JATSExporter**: converts Manuscript JSON Schema to JATS XML via ProseMirror Model.
|
|
20
20
|
|
|
21
|
-
**JATSImporter** converts JATS XML to Manuscript JSON Schema via ProseMirror Model.
|
|
21
|
+
**JATSImporter** converts JATS XML to Manuscript JSON Schema via ProseMirror Model.
|
|
22
22
|
|
|
23
23
|
# Usage
|
|
24
24
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class Migration4335 {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.fromVersion = '4.3.34';
|
|
6
|
+
this.toVersion = '4.3.35';
|
|
7
|
+
}
|
|
8
|
+
migrateNode(node) {
|
|
9
|
+
if (node.type === 'pullquote_element' ||
|
|
10
|
+
node.type === 'blockquote_element') {
|
|
11
|
+
return {
|
|
12
|
+
...node,
|
|
13
|
+
content: (node.content ?? []).map((child) => child.type === 'paragraph'
|
|
14
|
+
? { ...child, type: 'text_block' }
|
|
15
|
+
: child),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return node;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = Migration4335;
|
|
@@ -31,6 +31,7 @@ const _4_2_13_1 = __importDefault(require("./4.2.13"));
|
|
|
31
31
|
const _4_2_15_1 = __importDefault(require("./4.2.15"));
|
|
32
32
|
const _4_3_23_1 = __importDefault(require("./4.3.23"));
|
|
33
33
|
const _4_3_34_1 = __importDefault(require("./4.3.34"));
|
|
34
|
+
const _4_3_35_1 = __importDefault(require("./4.3.35"));
|
|
34
35
|
const migrations = [
|
|
35
36
|
new _1_2_5_1.default(),
|
|
36
37
|
new _2_3_22_1.default(),
|
|
@@ -45,5 +46,6 @@ const migrations = [
|
|
|
45
46
|
new _4_2_15_1.default(),
|
|
46
47
|
new _4_3_23_1.default(),
|
|
47
48
|
new _4_3_34_1.default(),
|
|
49
|
+
new _4_3_35_1.default(),
|
|
48
50
|
];
|
|
49
51
|
exports.default = migrations;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isBlockquoteElement = exports.blockquoteElement = void 0;
|
|
19
19
|
exports.blockquoteElement = {
|
|
20
|
-
content: '
|
|
20
|
+
content: 'text_block+ attribution',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
placeholder: { default: '' },
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isPullquoteElement = exports.pullquoteElement = void 0;
|
|
19
19
|
exports.pullquoteElement = {
|
|
20
|
-
content: 'quote_image?
|
|
20
|
+
content: 'quote_image? text_block+ attribution',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
placeholder: { default: '' },
|
package/dist/cjs/version.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class Migration4335 {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.fromVersion = '4.3.34';
|
|
4
|
+
this.toVersion = '4.3.35';
|
|
5
|
+
}
|
|
6
|
+
migrateNode(node) {
|
|
7
|
+
if (node.type === 'pullquote_element' ||
|
|
8
|
+
node.type === 'blockquote_element') {
|
|
9
|
+
return {
|
|
10
|
+
...node,
|
|
11
|
+
content: (node.content ?? []).map((child) => child.type === 'paragraph'
|
|
12
|
+
? { ...child, type: 'text_block' }
|
|
13
|
+
: child),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return node;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export default Migration4335;
|
|
@@ -26,6 +26,7 @@ import Migration4213 from './4.2.13';
|
|
|
26
26
|
import Migration4215 from './4.2.15';
|
|
27
27
|
import Migration4323 from './4.3.23';
|
|
28
28
|
import Migration4334 from './4.3.34';
|
|
29
|
+
import Migration4335 from './4.3.35';
|
|
29
30
|
const migrations = [
|
|
30
31
|
new Migration125(),
|
|
31
32
|
new Migration2322(),
|
|
@@ -40,5 +41,6 @@ const migrations = [
|
|
|
40
41
|
new Migration4215(),
|
|
41
42
|
new Migration4323(),
|
|
42
43
|
new Migration4334(),
|
|
44
|
+
new Migration4335(),
|
|
43
45
|
];
|
|
44
46
|
export default migrations;
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "4.3.
|
|
1
|
+
export const VERSION = "4.3.40";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JSONProsemirrorNode } from '../../../types';
|
|
2
|
+
import { MigrationScript } from '../migration-script';
|
|
3
|
+
declare class Migration4335 implements MigrationScript {
|
|
4
|
+
fromVersion: string;
|
|
5
|
+
toVersion: string;
|
|
6
|
+
migrateNode(node: JSONProsemirrorNode): JSONProsemirrorNode;
|
|
7
|
+
}
|
|
8
|
+
export default Migration4335;
|
|
@@ -26,5 +26,6 @@ import Migration4213 from './4.2.13';
|
|
|
26
26
|
import Migration4215 from './4.2.15';
|
|
27
27
|
import Migration4323 from './4.3.23';
|
|
28
28
|
import Migration4334 from './4.3.34';
|
|
29
|
-
|
|
29
|
+
import Migration4335 from './4.3.35';
|
|
30
|
+
declare const migrations: (Migration125 | Migration2322 | Migration3012 | Migration3021 | Migration3030 | Migration3031 | Migration3041 | Migration3055 | Migration3056 | Migration4213 | Migration4215 | Migration4323 | Migration4334 | Migration4335)[];
|
|
30
31
|
export default migrations;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.3.
|
|
1
|
+
export declare const VERSION = "4.3.40";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/transform",
|
|
3
3
|
"description": "ProseMirror transformer for Manuscripts applications",
|
|
4
|
-
"version": "4.3.
|
|
4
|
+
"version": "4.3.40",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|