@atlaskit/editor-json-transformer 8.13.2 → 8.15.0
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 +1651 -1633
- package/afm-jira/tsconfig.json +24 -0
- package/docs/0-intro.tsx +7 -7
- package/package.json +69 -70
- package/report.api.md +23 -22
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.jira.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__editor-json-transformer/app",
|
|
7
|
+
"composite": true,
|
|
8
|
+
"rootDir": "../"
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*"
|
|
18
|
+
],
|
|
19
|
+
"references": [
|
|
20
|
+
{
|
|
21
|
+
"path": "../../adf-utils/afm-jira/tsconfig.json"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
package/docs/0-intro.tsx
CHANGED
|
@@ -16,11 +16,11 @@ This transformer allows encoding ProseMirror Node in JSON format.
|
|
|
16
16
|
serializer.encode(editorContent);`}
|
|
17
17
|
|
|
18
18
|
${(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
<Example
|
|
20
|
+
packageName="@atlaskit/editor-json-transformer"
|
|
21
|
+
Component={require('../examples/0-json-transformer').default}
|
|
22
|
+
title="Json Transformer"
|
|
23
|
+
source={require('!!raw-loader!../examples/0-json-transformer')}
|
|
24
|
+
/>
|
|
25
|
+
)}
|
|
26
26
|
`;
|
package/package.json
CHANGED
|
@@ -1,71 +1,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
2
|
+
"name": "@atlaskit/editor-json-transformer",
|
|
3
|
+
"version": "8.15.0",
|
|
4
|
+
"description": "JSON transformer",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
|
+
"author": "Atlassian Pty Ltd",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"module:es2019": "dist/es2019/index.js",
|
|
14
|
+
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"atlaskit:src": "src/index.ts",
|
|
25
|
+
"atlassian": {
|
|
26
|
+
"team": "Editor: ADF",
|
|
27
|
+
"inPublicMirror": true,
|
|
28
|
+
"releaseModel": "continuous",
|
|
29
|
+
"productPushConsumption": [
|
|
30
|
+
"jira"
|
|
31
|
+
],
|
|
32
|
+
"website": {
|
|
33
|
+
"name": "Editor Json Transformer"
|
|
34
|
+
},
|
|
35
|
+
"runReact18": false
|
|
36
|
+
},
|
|
37
|
+
"af:exports": {
|
|
38
|
+
".": "./src/index.ts",
|
|
39
|
+
"./markOverrideRules": "./src/markOverrideRules.ts",
|
|
40
|
+
"./sanitize": "./src/sanitize.ts",
|
|
41
|
+
"./types": "./src/types.ts"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@atlaskit/adf-schema": "^38.0.0",
|
|
45
|
+
"@atlaskit/adf-utils": "^19.4.0",
|
|
46
|
+
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
47
|
+
"@babel/runtime": "^7.0.0",
|
|
48
|
+
"lodash": "^4.17.21"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@atlaskit/editor-plugin-background-color": "^1.3.0",
|
|
52
|
+
"@atlaskit/editor-plugin-highlight": "1.10.1",
|
|
53
|
+
"react": "^16.8.0",
|
|
54
|
+
"typescript": "~5.4.2"
|
|
55
|
+
},
|
|
56
|
+
"techstack": {
|
|
57
|
+
"@atlassian/frontend": {
|
|
58
|
+
"import-structure": "atlassian-conventions"
|
|
59
|
+
},
|
|
60
|
+
"@repo/internal": {
|
|
61
|
+
"deprecation": "no-deprecated-imports",
|
|
62
|
+
"design-tokens": [
|
|
63
|
+
"color"
|
|
64
|
+
],
|
|
65
|
+
"styling": [
|
|
66
|
+
"emotion"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/editor-json-transformer"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -19,43 +20,43 @@ import type { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
|
19
20
|
|
|
20
21
|
// @public (undocumented)
|
|
21
22
|
export type JSONDocNode = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
version: number;
|
|
24
|
+
type: 'doc';
|
|
25
|
+
content: JSONNode[];
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
// @public (undocumented)
|
|
28
29
|
export type JSONNode = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
type: string;
|
|
31
|
+
attrs?: object;
|
|
32
|
+
content?: Array<JSONNode | undefined>;
|
|
33
|
+
marks?: any[];
|
|
34
|
+
text?: string;
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
// @public (undocumented)
|
|
37
38
|
export class JSONTransformer implements Transformer_2<JSONDocNode> {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
// (undocumented)
|
|
40
|
+
encode(node: Node_2): JSONDocNode;
|
|
41
|
+
encodeNode(node: Node_2): JSONNode;
|
|
42
|
+
// (undocumented)
|
|
43
|
+
parse(content: JSONDocNode, stage?: SchemaStage): Node_2;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
// @public (undocumented)
|
|
46
47
|
export enum SchemaStage {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
// (undocumented)
|
|
49
|
+
FINAL = 'final',
|
|
50
|
+
// (undocumented)
|
|
51
|
+
STAGE_0 = 'stage0',
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
// @public (undocumented)
|
|
54
55
|
interface Transformer_2<T> {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
// (undocumented)
|
|
57
|
+
encode(node: Node_2): T;
|
|
58
|
+
// (undocumented)
|
|
59
|
+
parse(content: T): Node_2;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
// (No @packageDocumentation comment for this package)
|