@manuscripts/transform 2.3.19 → 2.3.20

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.
@@ -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
+ };
@@ -33,3 +33,4 @@ export * from './section-category';
33
33
  export * from './serializer';
34
34
  export * from './timestamp';
35
35
  export * from './update-identifiers';
36
+ export { createTestDoc } from './__tests__/__helpers__/doc';
@@ -1 +1 @@
1
- export const VERSION = "2.3.19";
1
+ export const VERSION = "2.3.20";
@@ -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;
@@ -33,3 +33,4 @@ export * from './section-category';
33
33
  export * from './serializer';
34
34
  export * from './timestamp';
35
35
  export * from './update-identifiers';
36
+ export { createTestDoc } from './__tests__/__helpers__/doc';
@@ -1 +1 @@
1
- export declare const VERSION = "2.3.19";
1
+ export declare const VERSION = "2.3.20";
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": "2.3.19",
4
+ "version": "2.3.20",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -79,4 +79,4 @@
79
79
  "rimraf": "^3.0.2",
80
80
  "typescript": "^4.0.5"
81
81
  }
82
- }
82
+ }