@manuscripts/transform 2.3.17 → 2.3.19-LEAN-3577-test
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/__tests__/data/project-dump.json +825 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/schema/migration/migrate.js +50 -0
- package/dist/cjs/schema/migration/migration-script.js +17 -0
- package/dist/cjs/schema/migration/migration-scripts/1.2.5.js +30 -0
- package/dist/cjs/schema/migration/migration-scripts/index.js +23 -0
- package/dist/cjs/schema/nodes/equation_element.js +0 -1
- package/dist/cjs/schema/nodes/figure_element.js +0 -1
- package/dist/cjs/schema/nodes/footnote.js +0 -1
- package/dist/cjs/schema/nodes/inline_equation.js +0 -1
- package/dist/cjs/schema/nodes/keyword.js +0 -1
- package/dist/cjs/schema/nodes/listing.js +0 -1
- package/dist/cjs/schema/nodes/listing_element.js +0 -1
- package/dist/cjs/schema/nodes/paragraph.js +0 -1
- package/dist/cjs/schema/nodes/section.js +0 -1
- package/dist/cjs/schema/nodes/table_element.js +0 -1
- package/dist/cjs/transformer/__tests__/__helpers__/doc.js +37 -0
- package/dist/cjs/transformer/decode.js +0 -13
- package/dist/cjs/transformer/index.js +3 -0
- package/dist/cjs/version.js +1 -1
- package/dist/es/__tests__/data/project-dump.json +825 -0
- package/dist/es/index.js +1 -0
- package/dist/es/schema/migration/migrate.js +42 -0
- package/dist/es/schema/migration/migration-script.js +16 -0
- package/dist/es/schema/migration/migration-scripts/1.2.5.js +28 -0
- package/dist/es/schema/migration/migration-scripts/index.js +18 -0
- package/dist/es/schema/nodes/equation_element.js +0 -1
- package/dist/es/schema/nodes/figure_element.js +0 -1
- package/dist/es/schema/nodes/footnote.js +0 -1
- package/dist/es/schema/nodes/inline_equation.js +0 -1
- package/dist/es/schema/nodes/keyword.js +0 -1
- package/dist/es/schema/nodes/listing.js +0 -1
- package/dist/es/schema/nodes/listing_element.js +0 -1
- package/dist/es/schema/nodes/paragraph.js +0 -1
- package/dist/es/schema/nodes/section.js +0 -1
- package/dist/es/schema/nodes/table_element.js +0 -1
- package/dist/es/transformer/__tests__/__helpers__/doc.js +29 -0
- package/dist/es/transformer/decode.js +0 -13
- package/dist/es/transformer/index.js +1 -0
- package/dist/es/version.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/schema/migration/migrate.d.ts +15 -0
- package/dist/types/schema/migration/migration-script.d.ts +21 -0
- package/dist/types/schema/migration/migration-scripts/1.2.5.d.ts +23 -0
- package/dist/types/schema/migration/migration-scripts/index.d.ts +18 -0
- package/dist/types/schema/nodes/equation_element.d.ts +0 -2
- package/dist/types/schema/nodes/figure_element.d.ts +0 -2
- package/dist/types/schema/nodes/footnote.d.ts +0 -2
- package/dist/types/schema/nodes/inline_equation.d.ts +0 -2
- package/dist/types/schema/nodes/keyword.d.ts +0 -2
- package/dist/types/schema/nodes/listing.d.ts +0 -2
- package/dist/types/schema/nodes/listing_element.d.ts +0 -2
- package/dist/types/schema/nodes/paragraph.d.ts +0 -2
- package/dist/types/schema/nodes/section.d.ts +0 -2
- package/dist/types/schema/nodes/table_element.d.ts +0 -2
- package/dist/types/transformer/__tests__/__helpers__/doc.d.ts +18 -0
- package/dist/types/transformer/index.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +6 -3
package/dist/es/index.js
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cloneDeep } from 'lodash';
|
|
2
|
+
import semver from 'semver';
|
|
3
|
+
import { schema } from '..';
|
|
4
|
+
import migrationScripts from './migration-scripts';
|
|
5
|
+
export default function migrate(oldDoc, migrationScript) {
|
|
6
|
+
function migrateNode(node) {
|
|
7
|
+
const migrated = migrationScript(node, oldDoc);
|
|
8
|
+
if (migrated.content) {
|
|
9
|
+
migrated.content = migrated.content.map((m) => migrateNode(m));
|
|
10
|
+
}
|
|
11
|
+
return migrated;
|
|
12
|
+
}
|
|
13
|
+
return migrateNode(oldDoc);
|
|
14
|
+
}
|
|
15
|
+
export function migrateFor(oldDoc, baseVersion) {
|
|
16
|
+
const migrationScripts = ensureVersionAscOrder();
|
|
17
|
+
let migratedDoc = cloneDeep(oldDoc);
|
|
18
|
+
for (let i = 0; i < migrationScripts.length; i++) {
|
|
19
|
+
const script = migrationScripts[i];
|
|
20
|
+
if (semver.lt(script.fromVersion, baseVersion)) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
console.log('Migrating doc with script to version ' + script.toVersion);
|
|
24
|
+
migratedDoc = migrate(migratedDoc, script.migrateNode);
|
|
25
|
+
}
|
|
26
|
+
return testDoc(migratedDoc, baseVersion);
|
|
27
|
+
}
|
|
28
|
+
const ensureVersionAscOrder = () => migrationScripts.sort((a, b) => semver.compare(a.toVersion, b.toVersion));
|
|
29
|
+
function testDoc(doc, fromVersion) {
|
|
30
|
+
try {
|
|
31
|
+
const resultDoc = schema.nodeFromJSON(doc);
|
|
32
|
+
resultDoc.check();
|
|
33
|
+
return resultDoc;
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
const error = 'Migration application from version ' +
|
|
37
|
+
fromVersion +
|
|
38
|
+
' did not produce a valid document with ' +
|
|
39
|
+
e;
|
|
40
|
+
throw new Error(error);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
class Migration125 {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.fromVersion = '1.2.3';
|
|
19
|
+
this.toVersion = '1.2.4';
|
|
20
|
+
}
|
|
21
|
+
migrateNode(node, doc) {
|
|
22
|
+
if (node.type === 'paragraph') {
|
|
23
|
+
return Object.assign(Object.assign({}, node), { attrs: Object.assign(Object.assign({}, node.attrs), { someNewFanctAttribute: 'example-value' }) });
|
|
24
|
+
}
|
|
25
|
+
return node;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export default Migration125;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import Migration125 from './1.2.5';
|
|
17
|
+
const migrations = [new Migration125()];
|
|
18
|
+
export default migrations;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import projectDump from '../../../__tests__/data/project-dump.json';
|
|
17
|
+
import { Decoder } from '../../decode';
|
|
18
|
+
export const createTestModelMap = () => {
|
|
19
|
+
const modelMap = new Map();
|
|
20
|
+
for (const component of projectDump.data) {
|
|
21
|
+
modelMap.set(component._id, component);
|
|
22
|
+
}
|
|
23
|
+
return modelMap;
|
|
24
|
+
};
|
|
25
|
+
export const createTestDoc = () => {
|
|
26
|
+
const modelMap = createTestModelMap();
|
|
27
|
+
const decoder = new Decoder(modelMap);
|
|
28
|
+
return decoder.createArticleNode();
|
|
29
|
+
};
|
|
@@ -213,7 +213,6 @@ export class Decoder {
|
|
|
213
213
|
page: model.page,
|
|
214
214
|
title: model.title,
|
|
215
215
|
literal: model.literal,
|
|
216
|
-
comments: comments.map((c) => c.attrs.id),
|
|
217
216
|
});
|
|
218
217
|
},
|
|
219
218
|
[ExtraObjectTypes.PlaceholderElement]: (data) => {
|
|
@@ -231,7 +230,6 @@ export class Decoder {
|
|
|
231
230
|
contentType: model.contentType,
|
|
232
231
|
src: model.src,
|
|
233
232
|
position: model.position,
|
|
234
|
-
comments: comments.map((c) => c.attrs.id),
|
|
235
233
|
});
|
|
236
234
|
},
|
|
237
235
|
[ObjectTypes.FigureElement]: (data) => {
|
|
@@ -282,7 +280,6 @@ export class Decoder {
|
|
|
282
280
|
suppressTitle: Boolean(model.suppressTitle === undefined ? true : model.suppressTitle),
|
|
283
281
|
attribution: model.attribution,
|
|
284
282
|
alternatives: model.alternatives,
|
|
285
|
-
comments: comments.map((c) => c.attrs.id),
|
|
286
283
|
}, content);
|
|
287
284
|
},
|
|
288
285
|
[ObjectTypes.Equation]: (data) => {
|
|
@@ -329,7 +326,6 @@ export class Decoder {
|
|
|
329
326
|
topNode: schema.nodes.footnote.create({
|
|
330
327
|
id: model._id,
|
|
331
328
|
kind: model.kind,
|
|
332
|
-
comments: comments.map((c) => c.attrs.id),
|
|
333
329
|
}),
|
|
334
330
|
});
|
|
335
331
|
footnotesOfKind.push(footnote);
|
|
@@ -350,7 +346,6 @@ export class Decoder {
|
|
|
350
346
|
topNode: schema.nodes.footnote.create({
|
|
351
347
|
id: footnoteModel._id,
|
|
352
348
|
kind: footnoteModel.kind,
|
|
353
|
-
comments: comments.map((c) => c.attrs.id),
|
|
354
349
|
}),
|
|
355
350
|
});
|
|
356
351
|
},
|
|
@@ -372,7 +367,6 @@ export class Decoder {
|
|
|
372
367
|
return schema.nodes.keyword_group.create({
|
|
373
368
|
id: keywordGroup._id,
|
|
374
369
|
type: keywordGroup.type,
|
|
375
|
-
comments: comments.map((c) => c.attrs.id),
|
|
376
370
|
}, keywords);
|
|
377
371
|
},
|
|
378
372
|
[ObjectTypes.Keyword]: (data) => {
|
|
@@ -382,7 +376,6 @@ export class Decoder {
|
|
|
382
376
|
return schema.nodes.keyword.create({
|
|
383
377
|
id: keyword._id,
|
|
384
378
|
contents: keyword.name,
|
|
385
|
-
comments: comments.map((c) => c.attrs.id),
|
|
386
379
|
}, schema.text(keyword.name));
|
|
387
380
|
},
|
|
388
381
|
[ObjectTypes.ListElement]: (data) => {
|
|
@@ -396,7 +389,6 @@ export class Decoder {
|
|
|
396
389
|
id: model._id,
|
|
397
390
|
listStyleType: model.listStyleType || 'order',
|
|
398
391
|
paragraphStyle: model.paragraphStyle,
|
|
399
|
-
comments: comments.map((c) => c.attrs.id),
|
|
400
392
|
}),
|
|
401
393
|
});
|
|
402
394
|
case 'ul':
|
|
@@ -420,7 +412,6 @@ export class Decoder {
|
|
|
420
412
|
contents: model.contents,
|
|
421
413
|
language: model.language,
|
|
422
414
|
languageKey: model.languageKey,
|
|
423
|
-
comments: comments.map((c) => c.attrs.id),
|
|
424
415
|
});
|
|
425
416
|
},
|
|
426
417
|
[ObjectTypes.ListingElement]: (data) => {
|
|
@@ -446,7 +437,6 @@ export class Decoder {
|
|
|
446
437
|
id: model._id,
|
|
447
438
|
suppressCaption: model.suppressCaption,
|
|
448
439
|
suppressTitle: Boolean(model.suppressTitle === undefined ? true : model.suppressTitle),
|
|
449
|
-
comments: comments.map((c) => c.attrs.id),
|
|
450
440
|
}, [listing, figcaption]);
|
|
451
441
|
},
|
|
452
442
|
[ObjectTypes.MissingFigure]: (data) => {
|
|
@@ -465,7 +455,6 @@ export class Decoder {
|
|
|
465
455
|
id: model._id,
|
|
466
456
|
paragraphStyle: model.paragraphStyle,
|
|
467
457
|
placeholder: model.placeholderInnerHTML,
|
|
468
|
-
comments: comments.map((c) => c.attrs.id),
|
|
469
458
|
}),
|
|
470
459
|
});
|
|
471
460
|
},
|
|
@@ -594,7 +583,6 @@ export class Decoder {
|
|
|
594
583
|
titleSuppressed: model.titleSuppressed,
|
|
595
584
|
pageBreakStyle: model.pageBreakStyle,
|
|
596
585
|
generatedLabel: model.generatedLabel,
|
|
597
|
-
comments: comments.map((c) => c.attrs.id),
|
|
598
586
|
}, content);
|
|
599
587
|
if (!sectionNode) {
|
|
600
588
|
console.error(model);
|
|
@@ -639,7 +627,6 @@ export class Decoder {
|
|
|
639
627
|
suppressHeader: model.suppressHeader,
|
|
640
628
|
tableStyle: model.tableStyle,
|
|
641
629
|
paragraphStyle: model.paragraphStyle,
|
|
642
|
-
comments: comments.map((c) => c.attrs.id),
|
|
643
630
|
}, content);
|
|
644
631
|
},
|
|
645
632
|
[ObjectTypes.TOCElement]: (data) => {
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.3.
|
|
1
|
+
export const VERSION = "2.3.19-LEAN-3577-test";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MigrationScript } from './migration-script';
|
|
2
|
+
export type JSONNode = {
|
|
3
|
+
type: string;
|
|
4
|
+
attrs: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
content?: JSONNode[];
|
|
8
|
+
text?: string;
|
|
9
|
+
marks?: Array<{
|
|
10
|
+
type: string;
|
|
11
|
+
attrs?: Record<string, any>;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
export default function migrate(oldDoc: JSONNode, migrationScript: MigrationScript['migrateNode']): JSONNode;
|
|
15
|
+
export declare function migrateFor(oldDoc: JSONNode, baseVersion: string): import("prosemirror-model").Node;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { JSONNode } from './migrate';
|
|
17
|
+
export interface MigrationScript {
|
|
18
|
+
fromVersion: string;
|
|
19
|
+
toVersion: string;
|
|
20
|
+
migrateNode: (node: JSONNode, doc: JSONNode) => JSONNode;
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { JSONNode } from '../migrate';
|
|
17
|
+
import { MigrationScript } from '../migration-script';
|
|
18
|
+
declare class Migration125 implements MigrationScript {
|
|
19
|
+
fromVersion: string;
|
|
20
|
+
toVersion: string;
|
|
21
|
+
migrateNode(node: JSONNode, doc: JSONNode): JSONNode;
|
|
22
|
+
}
|
|
23
|
+
export default Migration125;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import Migration125 from './1.2.5';
|
|
17
|
+
declare const migrations: Migration125[];
|
|
18
|
+
export default migrations;
|
|
@@ -15,11 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
label: string;
|
|
22
|
-
comments?: CommentNode[];
|
|
23
21
|
}
|
|
24
22
|
export interface EquationElementNode extends ManuscriptNode {
|
|
25
23
|
attrs: Attrs;
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
import { AttributionNode } from './attribution';
|
|
19
|
-
import { CommentNode } from './comment';
|
|
20
19
|
interface Attrs {
|
|
21
20
|
columns: number;
|
|
22
21
|
figureLayout: string;
|
|
@@ -34,7 +33,6 @@ interface Attrs {
|
|
|
34
33
|
src: string;
|
|
35
34
|
type?: string;
|
|
36
35
|
}[];
|
|
37
|
-
comments?: CommentNode[];
|
|
38
36
|
}
|
|
39
37
|
export interface FigureElementNode extends ManuscriptNode {
|
|
40
38
|
attrs: Attrs;
|
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
type Kind = 'footnote' | 'endnote';
|
|
20
19
|
interface Attrs {
|
|
21
20
|
id: string;
|
|
22
21
|
kind: Kind;
|
|
23
22
|
paragraphStyle?: string;
|
|
24
23
|
placeholder?: string;
|
|
25
|
-
comments?: CommentNode[];
|
|
26
24
|
}
|
|
27
25
|
export interface FootnoteNode extends ManuscriptNode {
|
|
28
26
|
attrs: Attrs;
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
contents: string;
|
|
22
21
|
format: string;
|
|
23
|
-
comments?: CommentNode[];
|
|
24
22
|
}
|
|
25
23
|
export interface InlineEquationNode extends ManuscriptNode {
|
|
26
24
|
attrs: Attrs;
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
|
-
comments?: CommentNode[];
|
|
22
20
|
}
|
|
23
21
|
export interface KeywordNode extends ManuscriptNode {
|
|
24
22
|
attrs: Attrs;
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
contents: string;
|
|
@@ -23,7 +22,6 @@ interface Attrs {
|
|
|
23
22
|
languageKey: string;
|
|
24
23
|
isExpanded: boolean;
|
|
25
24
|
isExecuting: boolean;
|
|
26
|
-
comments?: CommentNode[];
|
|
27
25
|
}
|
|
28
26
|
export interface ListingNode extends ManuscriptNode {
|
|
29
27
|
attrs: Attrs;
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
suppressCaption: boolean;
|
|
22
21
|
suppressTitle?: boolean;
|
|
23
|
-
comments?: CommentNode[];
|
|
24
22
|
}
|
|
25
23
|
export interface ListingElementNode extends ManuscriptNode {
|
|
26
24
|
attrs: Attrs;
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
paragraphStyle: string;
|
|
22
21
|
placeholder: string;
|
|
23
|
-
comments?: CommentNode[];
|
|
24
22
|
}
|
|
25
23
|
export interface ParagraphNode extends ManuscriptNode {
|
|
26
24
|
attrs: Attrs;
|
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
category?: string;
|
|
22
21
|
titleSuppressed: boolean;
|
|
23
22
|
generatedLabel: boolean;
|
|
24
23
|
pageBreakStyle?: number;
|
|
25
|
-
comments?: CommentNode[];
|
|
26
24
|
}
|
|
27
25
|
export interface SectionNode extends ManuscriptNode {
|
|
28
26
|
attrs: Attrs;
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
paragraphStyle: string;
|
|
@@ -26,7 +25,6 @@ interface Attrs {
|
|
|
26
25
|
suppressFooter: boolean;
|
|
27
26
|
suppressHeader: boolean;
|
|
28
27
|
expandListing: boolean;
|
|
29
|
-
comments?: CommentNode[];
|
|
30
28
|
}
|
|
31
29
|
export interface TableElementNode extends ManuscriptNode {
|
|
32
30
|
attrs: Attrs;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Model } from '@manuscripts/json-schema';
|
|
17
|
+
export declare const createTestModelMap: () => Map<string, Model>;
|
|
18
|
+
export declare const createTestDoc: () => import("prosemirror-model").Node;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.3.
|
|
1
|
+
export declare const VERSION = "2.3.19-LEAN-3577-test";
|