@atlaskit/adf-utils 14.2.0 → 15.0.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 +42 -0
- package/dist/cjs/builders/marks/fragment.js +19 -0
- package/dist/cjs/builders/nodes/mention.js +2 -2
- package/dist/cjs/builders/utils/create-text-nodes.js +1 -1
- package/dist/cjs/builders/utils/is-duplicate-mark.js +1 -1
- package/dist/cjs/builders.js +128 -120
- package/dist/cjs/index.js +49 -41
- package/dist/cjs/scrub/default-node-replacements.js +2 -2
- package/dist/cjs/scrub/scrub-adf.js +2 -2
- package/dist/cjs/scrub/scrub-content.js +3 -3
- package/dist/cjs/transforms/text-link-code-transform.js +58 -0
- package/dist/cjs/traverse/traverse.js +3 -3
- package/dist/cjs/traverse.js +4 -4
- package/dist/cjs/validator/rules.js +13 -0
- package/dist/cjs/validator/specs/atomic_inline.js +1 -1
- package/dist/cjs/validator/specs/blockCard.js +2 -1
- package/dist/cjs/validator/specs/block_content.js +1 -1
- package/dist/cjs/validator/specs/bodiedExtension_with_marks.js +1 -1
- package/dist/cjs/validator/specs/doc.js +1 -1
- package/dist/cjs/validator/specs/embedCard.js +2 -1
- package/dist/cjs/validator/specs/extension_with_marks.js +1 -1
- package/dist/cjs/validator/specs/fragment.js +27 -0
- package/dist/cjs/validator/specs/index.js +170 -170
- package/dist/cjs/validator/specs/inline.js +1 -1
- package/dist/cjs/validator/specs/inlineCard.js +2 -1
- package/dist/cjs/validator/specs/inlineExtension_with_marks.js +1 -1
- package/dist/cjs/validator/specs/layoutSection.js +4 -7
- package/dist/cjs/validator/specs/layoutSection_full.js +27 -0
- package/dist/cjs/validator/specs/layoutSection_with_single_column.js +27 -0
- package/dist/cjs/validator/specs/link.js +2 -1
- package/dist/cjs/validator/specs/non_nestable_block_content.js +1 -1
- package/dist/cjs/validator/specs/panel.js +8 -0
- package/dist/cjs/validator/specs/table.js +5 -0
- package/dist/cjs/validator/specs/tableCell_content.js +1 -1
- package/dist/cjs/validator/utils.js +1 -1
- package/dist/cjs/validator/validator.js +27 -19
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/builders/marks/fragment.js +7 -0
- package/dist/es2019/builders.js +2 -1
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/transforms/text-link-code-transform.js +37 -0
- package/dist/es2019/validator/rules.js +4 -0
- package/dist/es2019/validator/specs/atomic_inline.js +1 -1
- package/dist/es2019/validator/specs/blockCard.js +2 -1
- package/dist/es2019/validator/specs/block_content.js +1 -1
- package/dist/es2019/validator/specs/bodiedExtension_with_marks.js +1 -1
- package/dist/es2019/validator/specs/doc.js +1 -1
- package/dist/es2019/validator/specs/embedCard.js +2 -1
- package/dist/es2019/validator/specs/extension_with_marks.js +1 -1
- package/dist/es2019/validator/specs/fragment.js +20 -0
- package/dist/es2019/validator/specs/index.js +3 -3
- package/dist/es2019/validator/specs/inline.js +1 -1
- package/dist/es2019/validator/specs/inlineCard.js +2 -1
- package/dist/es2019/validator/specs/inlineExtension_with_marks.js +1 -1
- package/dist/es2019/validator/specs/layoutSection.js +4 -7
- package/dist/es2019/validator/specs/layoutSection_full.js +20 -0
- package/dist/es2019/validator/specs/layoutSection_with_single_column.js +20 -0
- package/dist/es2019/validator/specs/link.js +2 -1
- package/dist/es2019/validator/specs/non_nestable_block_content.js +1 -1
- package/dist/es2019/validator/specs/panel.js +8 -0
- package/dist/es2019/validator/specs/table.js +5 -0
- package/dist/es2019/validator/specs/tableCell_content.js +1 -1
- package/dist/es2019/validator/validator.js +19 -16
- package/dist/es2019/version.json +1 -1
- package/dist/esm/builders/marks/fragment.js +9 -0
- package/dist/esm/builders/nodes/mention.js +2 -2
- package/dist/esm/builders.js +2 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/scrub/default-node-replacements.js +2 -2
- package/dist/esm/scrub/scrub-adf.js +2 -2
- package/dist/esm/scrub/scrub-content.js +2 -2
- package/dist/esm/transforms/text-link-code-transform.js +47 -0
- package/dist/esm/traverse/traverse.js +2 -2
- package/dist/esm/validator/rules.js +4 -0
- package/dist/esm/validator/specs/atomic_inline.js +1 -1
- package/dist/esm/validator/specs/blockCard.js +2 -1
- package/dist/esm/validator/specs/block_content.js +1 -1
- package/dist/esm/validator/specs/bodiedExtension_with_marks.js +1 -1
- package/dist/esm/validator/specs/doc.js +1 -1
- package/dist/esm/validator/specs/embedCard.js +2 -1
- package/dist/esm/validator/specs/extension_with_marks.js +1 -1
- package/dist/esm/validator/specs/fragment.js +20 -0
- package/dist/esm/validator/specs/index.js +3 -3
- package/dist/esm/validator/specs/inline.js +1 -1
- package/dist/esm/validator/specs/inlineCard.js +2 -1
- package/dist/esm/validator/specs/inlineExtension_with_marks.js +1 -1
- package/dist/esm/validator/specs/layoutSection.js +4 -7
- package/dist/esm/validator/specs/layoutSection_full.js +20 -0
- package/dist/esm/validator/specs/layoutSection_with_single_column.js +20 -0
- package/dist/esm/validator/specs/link.js +2 -1
- package/dist/esm/validator/specs/non_nestable_block_content.js +1 -1
- package/dist/esm/validator/specs/panel.js +8 -0
- package/dist/esm/validator/specs/table.js +5 -0
- package/dist/esm/validator/specs/tableCell_content.js +1 -1
- package/dist/esm/validator/validator.js +25 -19
- package/dist/esm/version.json +1 -1
- package/dist/types/builders/marks/breakout.d.ts +1 -1
- package/dist/types/builders/marks/fragment.d.ts +3 -0
- package/dist/types/builders.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/transforms/text-link-code-transform.d.ts +5 -0
- package/dist/types/types/validatorTypes.d.ts +1 -0
- package/dist/types/validator/rules.d.ts +3 -0
- package/dist/types/validator/specs/blockCard.d.ts +1 -0
- package/dist/types/validator/specs/bodiedExtension_with_marks.d.ts +1 -1
- package/dist/types/validator/specs/embedCard.d.ts +1 -0
- package/dist/types/validator/specs/extension_with_marks.d.ts +1 -1
- package/dist/types/validator/specs/fragment.d.ts +21 -0
- package/dist/types/validator/specs/index.d.ts +3 -3
- package/dist/types/validator/specs/inlineCard.d.ts +1 -0
- package/dist/types/validator/specs/inlineExtension_with_marks.d.ts +1 -1
- package/dist/types/validator/specs/layoutSection.d.ts +3 -6
- package/dist/types/validator/specs/layoutSection_full.d.ts +21 -0
- package/dist/types/validator/specs/layoutSection_with_single_column.d.ts +21 -0
- package/dist/types/validator/specs/link.d.ts +1 -0
- package/dist/types/validator/specs/panel.d.ts +8 -0
- package/dist/types/validator/specs/table.d.ts +5 -0
- package/package.json +6 -3
- package/dist/cjs/validator/specs/bodiedExtension_with_no_marks.js +0 -17
- package/dist/cjs/validator/specs/extension_with_no_marks.js +0 -17
- package/dist/cjs/validator/specs/inlineExtension_with_no_marks.js +0 -17
- package/dist/es2019/validator/specs/bodiedExtension_with_no_marks.js +0 -10
- package/dist/es2019/validator/specs/extension_with_no_marks.js +0 -10
- package/dist/es2019/validator/specs/inlineExtension_with_no_marks.js +0 -10
- package/dist/esm/validator/specs/bodiedExtension_with_no_marks.js +0 -10
- package/dist/esm/validator/specs/extension_with_no_marks.js +0 -10
- package/dist/esm/validator/specs/inlineExtension_with_no_marks.js +0 -10
- package/dist/types/validator/specs/bodiedExtension_with_no_marks.d.ts +0 -11
- package/dist/types/validator/specs/extension_with_no_marks.d.ts +0 -11
- package/dist/types/validator/specs/inlineExtension_with_no_marks.d.ts +0 -11
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
props: {
|
|
3
|
+
type: {
|
|
4
|
+
type: string;
|
|
5
|
+
values: string[];
|
|
6
|
+
};
|
|
7
|
+
attrs: {
|
|
8
|
+
props: {
|
|
9
|
+
localId: {
|
|
10
|
+
type: string;
|
|
11
|
+
minLength: number;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: string;
|
|
15
|
+
optional: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -12,11 +12,11 @@ export { default as alignment } from './alignment';
|
|
|
12
12
|
export { default as indentation } from './indentation';
|
|
13
13
|
export { default as annotation } from './annotation';
|
|
14
14
|
export { default as dataConsumer } from './dataConsumer';
|
|
15
|
+
export { default as fragment } from './fragment';
|
|
15
16
|
export { default as hardBreak } from './hardBreak';
|
|
16
17
|
export { default as mention } from './mention';
|
|
17
18
|
export { default as emoji } from './emoji';
|
|
18
19
|
export { default as inlineExtension } from './inlineExtension';
|
|
19
|
-
export { default as inlineExtension_with_no_marks } from './inlineExtension_with_no_marks';
|
|
20
20
|
export { default as inlineExtension_with_marks } from './inlineExtension_with_marks';
|
|
21
21
|
export { default as date } from './date';
|
|
22
22
|
export { default as placeholder } from './placeholder';
|
|
@@ -58,7 +58,6 @@ export { default as decisionList } from './decisionList';
|
|
|
58
58
|
export { default as taskItem } from './taskItem';
|
|
59
59
|
export { default as taskList } from './taskList';
|
|
60
60
|
export { default as extension } from './extension';
|
|
61
|
-
export { default as extension_with_no_marks } from './extension_with_no_marks';
|
|
62
61
|
export { default as extension_with_marks } from './extension_with_marks';
|
|
63
62
|
export { default as embedCard } from './embedCard';
|
|
64
63
|
export { default as nestedExpand_content } from './nestedExpand_content';
|
|
@@ -74,9 +73,10 @@ export { default as expand } from './expand';
|
|
|
74
73
|
export { default as expand_with_no_mark } from './expand_with_no_mark';
|
|
75
74
|
export { default as expand_with_breakout_mark } from './expand_with_breakout_mark';
|
|
76
75
|
export { default as bodiedExtension } from './bodiedExtension';
|
|
77
|
-
export { default as bodiedExtension_with_no_marks } from './bodiedExtension_with_no_marks';
|
|
78
76
|
export { default as bodiedExtension_with_marks } from './bodiedExtension_with_marks';
|
|
79
77
|
export { default as block_content } from './block_content';
|
|
80
78
|
export { default as layoutColumn } from './layoutColumn';
|
|
81
79
|
export { default as layoutSection } from './layoutSection';
|
|
80
|
+
export { default as layoutSection_full } from './layoutSection_full';
|
|
81
|
+
export { default as layoutSection_with_single_column } from './layoutSection_with_single_column';
|
|
82
82
|
export { default as doc } from './doc';
|
|
@@ -4,17 +4,14 @@ declare const _default: {
|
|
|
4
4
|
type: string;
|
|
5
5
|
values: string[];
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
marks: {
|
|
8
8
|
type: string;
|
|
9
9
|
items: string[];
|
|
10
|
-
|
|
11
|
-
maxItems: number;
|
|
12
|
-
allowUnsupportedBlock: boolean;
|
|
10
|
+
optional: boolean;
|
|
13
11
|
};
|
|
14
|
-
|
|
12
|
+
content: {
|
|
15
13
|
type: string;
|
|
16
14
|
items: string[];
|
|
17
|
-
optional: boolean;
|
|
18
15
|
};
|
|
19
16
|
};
|
|
20
17
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: (string | {
|
|
2
|
+
props: {
|
|
3
|
+
type: {
|
|
4
|
+
type: string;
|
|
5
|
+
values: string[];
|
|
6
|
+
};
|
|
7
|
+
marks: {
|
|
8
|
+
type: string;
|
|
9
|
+
items: string[];
|
|
10
|
+
optional: boolean;
|
|
11
|
+
};
|
|
12
|
+
content: {
|
|
13
|
+
type: string;
|
|
14
|
+
items: string[];
|
|
15
|
+
minItems: number;
|
|
16
|
+
maxItems: number;
|
|
17
|
+
allowUnsupportedBlock: boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
})[];
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: (string | {
|
|
2
|
+
props: {
|
|
3
|
+
type: {
|
|
4
|
+
type: string;
|
|
5
|
+
values: string[];
|
|
6
|
+
};
|
|
7
|
+
marks: {
|
|
8
|
+
type: string;
|
|
9
|
+
items: string[];
|
|
10
|
+
optional: boolean;
|
|
11
|
+
};
|
|
12
|
+
content: {
|
|
13
|
+
type: string;
|
|
14
|
+
items: string[];
|
|
15
|
+
minItems: number;
|
|
16
|
+
maxItems: number;
|
|
17
|
+
allowUnsupportedBlock: boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
})[];
|
|
21
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "Set of utilities to traverse, modify and create ADF documents.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"generate:spec": "rm -rf ./src/validator/specs/ && ../json-schema-generator/bin.js --outDir=./src/validator/specs/ --mode=Spec --stage=0 ./src/validator/entry.ts"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^
|
|
27
|
+
"@atlaskit/adf-schema": "^21.0.0",
|
|
28
28
|
"@babel/runtime": "^7.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@atlaskit/docs": "*",
|
|
32
|
-
"@atlaskit/json-schema-generator": "^3.
|
|
32
|
+
"@atlaskit/json-schema-generator": "^3.2.0",
|
|
33
33
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
34
34
|
"react": "^16.8.0",
|
|
35
35
|
"typescript": "3.9.6",
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"circular-dependencies": [
|
|
41
41
|
"file-level"
|
|
42
42
|
]
|
|
43
|
+
},
|
|
44
|
+
"@repo/internal": {
|
|
45
|
+
"deprecation": "no-deprecated-imports"
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = ['bodiedExtension', {
|
|
8
|
-
props: {
|
|
9
|
-
marks: {
|
|
10
|
-
type: 'array',
|
|
11
|
-
items: [],
|
|
12
|
-
maxItems: 0,
|
|
13
|
-
optional: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}];
|
|
17
|
-
exports.default = _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = ['extension', {
|
|
8
|
-
props: {
|
|
9
|
-
marks: {
|
|
10
|
-
type: 'array',
|
|
11
|
-
items: [],
|
|
12
|
-
maxItems: 0,
|
|
13
|
-
optional: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}];
|
|
17
|
-
exports.default = _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = ['inlineExtension', {
|
|
8
|
-
props: {
|
|
9
|
-
marks: {
|
|
10
|
-
type: 'array',
|
|
11
|
-
items: [],
|
|
12
|
-
maxItems: 0,
|
|
13
|
-
optional: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}];
|
|
17
|
-
exports.default = _default;
|