@atlaskit/editor-json-transformer 9.0.2 → 9.2.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 +18 -0
- package/dist/cjs/entry-points/main.js +12 -0
- package/dist/cjs/index.js +7 -32
- package/dist/cjs/main.js +34 -0
- package/dist/es2019/entry-points/main.js +2 -0
- package/dist/es2019/index.js +1 -27
- package/dist/es2019/main.js +26 -0
- package/dist/esm/entry-points/main.js +2 -0
- package/dist/esm/index.js +1 -28
- package/dist/esm/main.js +27 -0
- package/dist/types/entry-points/main.d.ts +1 -0
- package/dist/types/index.d.ts +1 -8
- package/dist/types/main.d.ts +8 -0
- package/main/package.json +8 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-json-transformer
|
|
2
2
|
|
|
3
|
+
## 9.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`51c33ef5349b6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51c33ef5349b6) -
|
|
8
|
+
Enable compatibility with React 19.2.0
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 9.1.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`05b85944df003`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/05b85944df003) -
|
|
19
|
+
Autofix: add explicit package exports (barrel removal)
|
|
20
|
+
|
|
3
21
|
## 9.0.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "isJSONDocNode", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _main.isJSONDocNode;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _main = require("../main");
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -16,41 +15,17 @@ Object.defineProperty(exports, "SchemaStage", {
|
|
|
16
15
|
return _jsonTransformer.SchemaStage;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
|
-
exports
|
|
18
|
+
Object.defineProperty(exports, "isJSONDocNode", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _main.isJSONDocNode;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
20
24
|
Object.defineProperty(exports, "nodeToJSON", {
|
|
21
25
|
enumerable: true,
|
|
22
26
|
get: function get() {
|
|
23
27
|
return _jsonTransformer.toJSON;
|
|
24
28
|
}
|
|
25
29
|
});
|
|
26
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
27
30
|
var _jsonTransformer = require("./jsonTransformer");
|
|
28
|
-
|
|
29
|
-
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Quick type guard to check if a value is a valid JSONDocNode
|
|
33
|
-
* This is only a basic structural check, does not validate the entire object nor the schema.
|
|
34
|
-
* @param value - The value to check
|
|
35
|
-
* @returns true if the value is a valid JSONDocNode structure
|
|
36
|
-
*/
|
|
37
|
-
function isJSONDocNode(value) {
|
|
38
|
-
if (!value || (0, _typeof2.default)(value) !== 'object') {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
var doc = value;
|
|
42
|
-
|
|
43
|
-
// Check required properties
|
|
44
|
-
if (doc.type !== 'doc') {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
if (!Array.isArray(doc.content)) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Version is optional but if present should be a number
|
|
52
|
-
if (doc.version !== undefined && typeof doc.version !== 'number') {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
31
|
+
var _main = require("./entry-points/main");
|
package/dist/cjs/main.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.isJSONDocNode = isJSONDocNode;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
+
/**
|
|
10
|
+
* Quick type guard to check if a value is a valid JSONDocNode
|
|
11
|
+
* This is only a basic structural check, does not validate the entire object nor the schema.
|
|
12
|
+
* @param value - The value to check
|
|
13
|
+
* @returns true if the value is a valid JSONDocNode structure
|
|
14
|
+
*/
|
|
15
|
+
function isJSONDocNode(value) {
|
|
16
|
+
if (!value || (0, _typeof2.default)(value) !== 'object') {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
var doc = value;
|
|
20
|
+
|
|
21
|
+
// Check required properties
|
|
22
|
+
if (doc.type !== 'doc') {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (!Array.isArray(doc.content)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Version is optional but if present should be a number
|
|
30
|
+
if (doc.version !== undefined && typeof doc.version !== 'number') {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
}
|
package/dist/es2019/index.js
CHANGED
|
@@ -2,30 +2,4 @@
|
|
|
2
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
3
|
|
|
4
4
|
export { JSONTransformer, SchemaStage, toJSON as nodeToJSON } from './jsonTransformer';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Quick type guard to check if a value is a valid JSONDocNode
|
|
8
|
-
* This is only a basic structural check, does not validate the entire object nor the schema.
|
|
9
|
-
* @param value - The value to check
|
|
10
|
-
* @returns true if the value is a valid JSONDocNode structure
|
|
11
|
-
*/
|
|
12
|
-
export function isJSONDocNode(value) {
|
|
13
|
-
if (!value || typeof value !== 'object') {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
const doc = value;
|
|
17
|
-
|
|
18
|
-
// Check required properties
|
|
19
|
-
if (doc.type !== 'doc') {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
if (!Array.isArray(doc.content)) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Version is optional but if present should be a number
|
|
27
|
-
if (doc.version !== undefined && typeof doc.version !== 'number') {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
5
|
+
export { isJSONDocNode } from './entry-points/main';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quick type guard to check if a value is a valid JSONDocNode
|
|
3
|
+
* This is only a basic structural check, does not validate the entire object nor the schema.
|
|
4
|
+
* @param value - The value to check
|
|
5
|
+
* @returns true if the value is a valid JSONDocNode structure
|
|
6
|
+
*/
|
|
7
|
+
export function isJSONDocNode(value) {
|
|
8
|
+
if (!value || typeof value !== 'object') {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const doc = value;
|
|
12
|
+
|
|
13
|
+
// Check required properties
|
|
14
|
+
if (doc.type !== 'doc') {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
if (!Array.isArray(doc.content)) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Version is optional but if present should be a number
|
|
22
|
+
if (doc.version !== undefined && typeof doc.version !== 'number') {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
1
|
// Disable no-re-export rule for entry point files
|
|
3
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
4
3
|
|
|
5
4
|
export { JSONTransformer, SchemaStage, toJSON as nodeToJSON } from './jsonTransformer';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Quick type guard to check if a value is a valid JSONDocNode
|
|
9
|
-
* This is only a basic structural check, does not validate the entire object nor the schema.
|
|
10
|
-
* @param value - The value to check
|
|
11
|
-
* @returns true if the value is a valid JSONDocNode structure
|
|
12
|
-
*/
|
|
13
|
-
export function isJSONDocNode(value) {
|
|
14
|
-
if (!value || _typeof(value) !== 'object') {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
var doc = value;
|
|
18
|
-
|
|
19
|
-
// Check required properties
|
|
20
|
-
if (doc.type !== 'doc') {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
if (!Array.isArray(doc.content)) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Version is optional but if present should be a number
|
|
28
|
-
if (doc.version !== undefined && typeof doc.version !== 'number') {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
5
|
+
export { isJSONDocNode } from './entry-points/main';
|
package/dist/esm/main.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
/**
|
|
3
|
+
* Quick type guard to check if a value is a valid JSONDocNode
|
|
4
|
+
* This is only a basic structural check, does not validate the entire object nor the schema.
|
|
5
|
+
* @param value - The value to check
|
|
6
|
+
* @returns true if the value is a valid JSONDocNode structure
|
|
7
|
+
*/
|
|
8
|
+
export function isJSONDocNode(value) {
|
|
9
|
+
if (!value || _typeof(value) !== 'object') {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
var doc = value;
|
|
13
|
+
|
|
14
|
+
// Check required properties
|
|
15
|
+
if (doc.type !== 'doc') {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
if (!Array.isArray(doc.content)) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Version is optional but if present should be a number
|
|
23
|
+
if (doc.version !== undefined && typeof doc.version !== 'number') {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isJSONDocNode } from '../main';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import type { JSONDocNode } from './types';
|
|
2
1
|
export type { JSONDocNode, JSONNode } from './types';
|
|
3
2
|
export { JSONTransformer, SchemaStage, toJSON as nodeToJSON } from './jsonTransformer';
|
|
4
|
-
|
|
5
|
-
* Quick type guard to check if a value is a valid JSONDocNode
|
|
6
|
-
* This is only a basic structural check, does not validate the entire object nor the schema.
|
|
7
|
-
* @param value - The value to check
|
|
8
|
-
* @returns true if the value is a valid JSONDocNode structure
|
|
9
|
-
*/
|
|
10
|
-
export declare function isJSONDocNode(value: unknown): value is JSONDocNode;
|
|
3
|
+
export { isJSONDocNode } from './entry-points/main';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { JSONDocNode } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Quick type guard to check if a value is a valid JSONDocNode
|
|
4
|
+
* This is only a basic structural check, does not validate the entire object nor the schema.
|
|
5
|
+
* @param value - The value to check
|
|
6
|
+
* @returns true if the value is a valid JSONDocNode structure
|
|
7
|
+
*/
|
|
8
|
+
export declare function isJSONDocNode(value: unknown): value is JSONDocNode;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-json-transformer/main",
|
|
3
|
+
"main": "../dist/cjs/entry-points/main.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/main.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/main.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/entry-points/main.d.ts"
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-json-transformer",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "JSON transformer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/adf-schema": "^56.
|
|
25
|
-
"@atlaskit/adf-utils": "^20.
|
|
24
|
+
"@atlaskit/adf-schema": "^56.2.0",
|
|
25
|
+
"@atlaskit/adf-utils": "^20.4.0",
|
|
26
26
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
27
27
|
"@babel/runtime": "^7.0.0",
|
|
28
28
|
"lodash": "^4.17.21"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@atlassian/a11y-jest-testing": "^0.13.0",
|
|
32
32
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
33
|
-
"react": "^
|
|
33
|
+
"react": "^19.2.0"
|
|
34
34
|
},
|
|
35
35
|
"techstack": {
|
|
36
36
|
"@atlassian/frontend": {
|