@atlaskit/editor-json-transformer 8.8.1 → 8.8.2
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/CHANGELOG.md +6 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +9 -5
- package/report.api.md +20 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-json-transformer
|
|
2
2
|
|
|
3
|
+
## 8.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fbbfaba77c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fbbfaba77c9) - ED-13997 Fixed unhandled exception in encodeNode function
|
|
8
|
+
|
|
3
9
|
## 8.8.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -112,7 +112,7 @@ var toJSON = function toJSON(node) {
|
|
|
112
112
|
obj.attrs = (0, _adfSchema.toJSONTableHeader)(node).attrs;
|
|
113
113
|
} else if (isExpand(node) || isNestedExpand(node)) {
|
|
114
114
|
obj.attrs = (0, _adfSchema.expandToJSON)(node).attrs;
|
|
115
|
-
} else if (Object.keys(node.attrs).length) {
|
|
115
|
+
} else if (node.attrs && Object.keys(node.attrs).length) {
|
|
116
116
|
obj.attrs = node.attrs;
|
|
117
117
|
}
|
|
118
118
|
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/index.js
CHANGED
|
@@ -83,7 +83,7 @@ const toJSON = node => {
|
|
|
83
83
|
obj.attrs = toJSONTableHeader(node).attrs;
|
|
84
84
|
} else if (isExpand(node) || isNestedExpand(node)) {
|
|
85
85
|
obj.attrs = expandToJSON(node).attrs;
|
|
86
|
-
} else if (Object.keys(node.attrs).length) {
|
|
86
|
+
} else if (node.attrs && Object.keys(node.attrs).length) {
|
|
87
87
|
obj.attrs = node.attrs;
|
|
88
88
|
}
|
|
89
89
|
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -96,7 +96,7 @@ var toJSON = function toJSON(node) {
|
|
|
96
96
|
obj.attrs = toJSONTableHeader(node).attrs;
|
|
97
97
|
} else if (isExpand(node) || isNestedExpand(node)) {
|
|
98
98
|
obj.attrs = expandToJSON(node).attrs;
|
|
99
|
-
} else if (Object.keys(node.attrs).length) {
|
|
99
|
+
} else if (node.attrs && Object.keys(node.attrs).length) {
|
|
100
100
|
obj.attrs = node.attrs;
|
|
101
101
|
}
|
|
102
102
|
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-json-transformer",
|
|
3
|
-
"version": "8.8.
|
|
3
|
+
"version": "8.8.2",
|
|
4
4
|
"description": "JSON transformer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
">=4.0 <4.5": {
|
|
17
17
|
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
18
|
+
"dist/types-ts4.0/*",
|
|
19
|
+
"dist/types-ts4.0/index.d.ts"
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
},
|
|
@@ -45,9 +46,9 @@
|
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@atlaskit/docs": "*",
|
|
47
48
|
"@atlaskit/editor-bitbucket-transformer": "^7.2.0",
|
|
48
|
-
"@atlaskit/editor-common": "^
|
|
49
|
+
"@atlaskit/editor-common": "^70.2.0",
|
|
49
50
|
"@atlaskit/editor-confluence-transformer": "^8.1.0",
|
|
50
|
-
"@atlaskit/editor-core": "^
|
|
51
|
+
"@atlaskit/editor-core": "^175.0.0",
|
|
51
52
|
"@atlaskit/editor-jira-transformer": "^8.2.0",
|
|
52
53
|
"@atlaskit/editor-markdown-transformer": "^4.1.0",
|
|
53
54
|
"@atlaskit/editor-test-helpers": "^17.2.0",
|
|
@@ -67,7 +68,10 @@
|
|
|
67
68
|
},
|
|
68
69
|
"@repo/internal": {
|
|
69
70
|
"deprecation": "no-deprecated-imports",
|
|
70
|
-
"theming": "tokens"
|
|
71
|
+
"theming": "tokens",
|
|
72
|
+
"styling": [
|
|
73
|
+
"emotion"
|
|
74
|
+
]
|
|
71
75
|
}
|
|
72
76
|
},
|
|
73
77
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
package/report.api.md
CHANGED
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
4
|
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
10
|
+
|
|
5
11
|
```ts
|
|
6
12
|
import { Node as Node_2 } from 'prosemirror-model';
|
|
7
13
|
|
|
8
|
-
|
|
14
|
+
// @public (undocumented)
|
|
15
|
+
export type JSONDocNode = {
|
|
9
16
|
version: number;
|
|
10
17
|
type: 'doc';
|
|
11
18
|
content: JSONNode[];
|
|
12
19
|
};
|
|
13
20
|
|
|
14
|
-
|
|
21
|
+
// @public (undocumented)
|
|
22
|
+
export type JSONNode = {
|
|
15
23
|
type: string;
|
|
16
24
|
attrs?: object;
|
|
17
25
|
content?: Array<JSONNode | undefined>;
|
|
@@ -19,20 +27,22 @@ export declare type JSONNode = {
|
|
|
19
27
|
text?: string;
|
|
20
28
|
};
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
// @public (undocumented)
|
|
31
|
+
export class JSONTransformer implements Transformer_2<JSONDocNode> {
|
|
32
|
+
// (undocumented)
|
|
23
33
|
encode(node: Node_2): JSONDocNode;
|
|
24
|
-
private internalParse;
|
|
25
|
-
parse(content: JSONDocNode): Node_2;
|
|
26
|
-
/**
|
|
27
|
-
* This method is used to encode a single node
|
|
28
|
-
*/
|
|
29
34
|
encodeNode(node: Node_2): JSONNode;
|
|
35
|
+
// (undocumented)
|
|
36
|
+
parse(content: JSONDocNode): Node_2;
|
|
30
37
|
}
|
|
31
38
|
|
|
32
|
-
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
interface Transformer_2<T> {
|
|
41
|
+
// (undocumented)
|
|
33
42
|
encode(node: Node_2): T;
|
|
43
|
+
// (undocumented)
|
|
34
44
|
parse(content: T): Node_2;
|
|
35
45
|
}
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
// (No @packageDocumentation comment for this package)
|
|
38
48
|
```
|