@atlaskit/adf-schema 42.3.1 → 42.5.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 +13 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +5 -0
- package/dist/cjs/next-schema/nodes/caption.js +1 -13
- package/dist/cjs/next-schema/nodes/layoutSection.js +1 -7
- package/dist/cjs/validator-schema/generated/validatorSpec.js +2 -2
- package/dist/es2019/next-schema/generated/nodeTypes.js +5 -0
- package/dist/es2019/next-schema/nodes/caption.js +1 -13
- package/dist/es2019/next-schema/nodes/layoutSection.js +2 -8
- package/dist/es2019/validator-schema/generated/validatorSpec.js +2 -2
- package/dist/esm/next-schema/generated/nodeTypes.js +5 -0
- package/dist/esm/next-schema/nodes/caption.js +1 -13
- package/dist/esm/next-schema/nodes/layoutSection.js +2 -8
- package/dist/esm/validator-schema/generated/validatorSpec.js +2 -2
- package/dist/json-schema/v1/full.json +2 -3
- package/dist/json-schema/v1/stage-0.json +2 -3
- package/dist/types/next-schema/generated/nodeTypes.d.ts +1 -1
- package/dist/types/next-schema/nodes/layoutSection.d.ts +1 -7
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +1 -1
- package/json-schema/v1/full.json +2 -3
- package/json-schema/v1/stage-0.json +2 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 42.5.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 82af32e: Remove exception for minItems=0 from caption node, aligning JSON schema and Validator Spec with PM Spec
|
8
|
+
|
9
|
+
## 42.4.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- 6114d78: add attr.text to hr, in order to match it with json schema spec
|
14
|
+
- 844e6bd: Filter out empty content groups in json and validator spec and improve min and max item calculation
|
15
|
+
|
3
16
|
## 42.3.1
|
4
17
|
|
5
18
|
### Patch Changes
|
@@ -397,6 +397,11 @@ var extensionFrameStage0 = exports.extensionFrameStage0 = (0, _createPMSpecFacto
|
|
397
397
|
var hardBreak = exports.hardBreak = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
398
398
|
group: 'inline',
|
399
399
|
inline: true,
|
400
|
+
attrs: {
|
401
|
+
text: {
|
402
|
+
default: '\n'
|
403
|
+
}
|
404
|
+
},
|
400
405
|
selectable: false,
|
401
406
|
linebreakReplacement: true
|
402
407
|
});
|
@@ -21,17 +21,5 @@ var caption = exports.caption = (0, _adfSchemaGenerator.adfNode)('caption').defi
|
|
21
21
|
selectable: false,
|
22
22
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
23
23
|
allowAnyChildMark: true,
|
24
|
-
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_hardBreak.hardBreak, _mention.mention, _emoji.emoji, _date.date, _placeholder.placeholder, _inlineCard.inlineCard, _status.status, _text.text.use('formatted'), _text.text.use('code_inline'), _unsupportedInline.unsupportedInline))]
|
25
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
26
|
-
'validator-spec': {
|
27
|
-
'props.content.optional': {
|
28
|
-
reason: '@DSLCompatibilityException - mismatch for caption',
|
29
|
-
remove: true
|
30
|
-
},
|
31
|
-
'props.content.minItems': {
|
32
|
-
reason: '@DSLCompatibilityException - mismatch for caption',
|
33
|
-
value: 0
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
24
|
+
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_hardBreak.hardBreak, _mention.mention, _emoji.emoji, _date.date, _placeholder.placeholder, _inlineCard.inlineCard, _status.status, _text.text.use('formatted'), _text.text.use('code_inline'), _unsupportedInline.unsupportedInline))]
|
37
25
|
});
|
@@ -30,7 +30,7 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
|
|
30
30
|
}
|
31
31
|
}).variant('with_single_column', {
|
32
32
|
stage0: true,
|
33
|
-
content: [(0, _adfSchemaGenerator.$range)(1, 5, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))],
|
33
|
+
content: [(0, _adfSchemaGenerator.$range)(1, 5, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_unsupportedBlock.unsupportedBlock))],
|
34
34
|
ignore: [],
|
35
35
|
attrs: {
|
36
36
|
columnRuleStyle: {
|
@@ -41,12 +41,6 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
|
|
41
41
|
}
|
42
42
|
},
|
43
43
|
DANGEROUS_MANUAL_OVERRIDE: {
|
44
|
-
'pm-spec': {
|
45
|
-
content: {
|
46
|
-
value: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
|
47
|
-
reason: "The content expression is not correct or redundant around 'unsupportedBlock*'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM."
|
48
|
-
}
|
49
|
-
},
|
50
44
|
'validator-spec': {
|
51
45
|
'props.type': {
|
52
46
|
value: {
|
@@ -669,8 +669,8 @@ var caption = exports.caption = {
|
|
669
669
|
content: {
|
670
670
|
type: 'array',
|
671
671
|
items: [['hardBreak', 'mention', 'emoji', 'date', 'placeholder', 'inlineCard', 'status', 'text_formatted', 'text_code_inline']],
|
672
|
-
|
673
|
-
|
672
|
+
optional: true,
|
673
|
+
allowUnsupportedInline: true
|
674
674
|
}
|
675
675
|
}
|
676
676
|
};
|
@@ -391,6 +391,11 @@ export const extensionFrameStage0 = createPMNodeSpecFactory({
|
|
391
391
|
export const hardBreak = createPMNodeSpecFactory({
|
392
392
|
group: 'inline',
|
393
393
|
inline: true,
|
394
|
+
attrs: {
|
395
|
+
text: {
|
396
|
+
default: '\n'
|
397
|
+
}
|
398
|
+
},
|
394
399
|
selectable: false,
|
395
400
|
linebreakReplacement: true
|
396
401
|
});
|
@@ -15,17 +15,5 @@ export const caption = adfNode('caption').define({
|
|
15
15
|
selectable: false,
|
16
16
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
17
17
|
allowAnyChildMark: true,
|
18
|
-
content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))]
|
19
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
20
|
-
'validator-spec': {
|
21
|
-
'props.content.optional': {
|
22
|
-
reason: '@DSLCompatibilityException - mismatch for caption',
|
23
|
-
remove: true
|
24
|
-
},
|
25
|
-
'props.content.minItems': {
|
26
|
-
reason: '@DSLCompatibilityException - mismatch for caption',
|
27
|
-
value: 0
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
18
|
+
content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))]
|
31
19
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { $or, $range, adfNode } from '@atlaskit/adf-schema-generator';
|
1
|
+
import { $or, $range, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { breakout } from '../marks/breakout';
|
3
3
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
4
4
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
@@ -24,7 +24,7 @@ export const layoutSection = adfNode('layoutSection').define({
|
|
24
24
|
}
|
25
25
|
}).variant('with_single_column', {
|
26
26
|
stage0: true,
|
27
|
-
content: [$range(1, 5, $or(layoutColumn, unsupportedBlock))],
|
27
|
+
content: [$range(1, 5, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))],
|
28
28
|
ignore: [],
|
29
29
|
attrs: {
|
30
30
|
columnRuleStyle: {
|
@@ -35,12 +35,6 @@ export const layoutSection = adfNode('layoutSection').define({
|
|
35
35
|
}
|
36
36
|
},
|
37
37
|
DANGEROUS_MANUAL_OVERRIDE: {
|
38
|
-
'pm-spec': {
|
39
|
-
content: {
|
40
|
-
value: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
|
41
|
-
reason: `The content expression is not correct or redundant around 'unsupportedBlock*'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM.`
|
42
|
-
}
|
43
|
-
},
|
44
38
|
'validator-spec': {
|
45
39
|
'props.type': {
|
46
40
|
value: {
|
@@ -663,8 +663,8 @@ export const caption = {
|
|
663
663
|
content: {
|
664
664
|
type: 'array',
|
665
665
|
items: [['hardBreak', 'mention', 'emoji', 'date', 'placeholder', 'inlineCard', 'status', 'text_formatted', 'text_code_inline']],
|
666
|
-
|
667
|
-
|
666
|
+
optional: true,
|
667
|
+
allowUnsupportedInline: true
|
668
668
|
}
|
669
669
|
}
|
670
670
|
};
|
@@ -391,6 +391,11 @@ export var extensionFrameStage0 = createPMNodeSpecFactory({
|
|
391
391
|
export var hardBreak = createPMNodeSpecFactory({
|
392
392
|
group: 'inline',
|
393
393
|
inline: true,
|
394
|
+
attrs: {
|
395
|
+
text: {
|
396
|
+
default: '\n'
|
397
|
+
}
|
398
|
+
},
|
394
399
|
selectable: false,
|
395
400
|
linebreakReplacement: true
|
396
401
|
});
|
@@ -15,17 +15,5 @@ export var caption = adfNode('caption').define({
|
|
15
15
|
selectable: false,
|
16
16
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
17
17
|
allowAnyChildMark: true,
|
18
|
-
content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))]
|
19
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
20
|
-
'validator-spec': {
|
21
|
-
'props.content.optional': {
|
22
|
-
reason: '@DSLCompatibilityException - mismatch for caption',
|
23
|
-
remove: true
|
24
|
-
},
|
25
|
-
'props.content.minItems': {
|
26
|
-
reason: '@DSLCompatibilityException - mismatch for caption',
|
27
|
-
value: 0
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
18
|
+
content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))]
|
31
19
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { $or, $range, adfNode } from '@atlaskit/adf-schema-generator';
|
1
|
+
import { $or, $range, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { breakout } from '../marks/breakout';
|
3
3
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
4
4
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
@@ -24,7 +24,7 @@ export var layoutSection = adfNode('layoutSection').define({
|
|
24
24
|
}
|
25
25
|
}).variant('with_single_column', {
|
26
26
|
stage0: true,
|
27
|
-
content: [$range(1, 5, $or(layoutColumn, unsupportedBlock))],
|
27
|
+
content: [$range(1, 5, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))],
|
28
28
|
ignore: [],
|
29
29
|
attrs: {
|
30
30
|
columnRuleStyle: {
|
@@ -35,12 +35,6 @@ export var layoutSection = adfNode('layoutSection').define({
|
|
35
35
|
}
|
36
36
|
},
|
37
37
|
DANGEROUS_MANUAL_OVERRIDE: {
|
38
|
-
'pm-spec': {
|
39
|
-
content: {
|
40
|
-
value: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
|
41
|
-
reason: "The content expression is not correct or redundant around 'unsupportedBlock*'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM."
|
42
|
-
}
|
43
|
-
},
|
44
38
|
'validator-spec': {
|
45
39
|
'props.type': {
|
46
40
|
value: {
|
@@ -663,8 +663,8 @@ export var caption = {
|
|
663
663
|
content: {
|
664
664
|
type: 'array',
|
665
665
|
items: [['hardBreak', 'mention', 'emoji', 'date', 'placeholder', 'inlineCard', 'status', 'text_formatted', 'text_code_inline']],
|
666
|
-
|
667
|
-
|
666
|
+
optional: true,
|
667
|
+
allowUnsupportedInline: true
|
668
668
|
}
|
669
669
|
}
|
670
670
|
};
|
@@ -840,12 +840,11 @@
|
|
840
840
|
"$ref": "#/definitions/code_inline_node"
|
841
841
|
}
|
842
842
|
]
|
843
|
-
}
|
844
|
-
"minItems": 0
|
843
|
+
}
|
845
844
|
}
|
846
845
|
},
|
847
846
|
"additionalProperties": false,
|
848
|
-
"required": ["type"
|
847
|
+
"required": ["type"]
|
849
848
|
},
|
850
849
|
"mediaSingle_caption_node": {
|
851
850
|
"allOf": [
|
@@ -870,12 +870,11 @@
|
|
870
870
|
"$ref": "#/definitions/code_inline_node"
|
871
871
|
}
|
872
872
|
]
|
873
|
-
}
|
874
|
-
"minItems": 0
|
873
|
+
}
|
875
874
|
}
|
876
875
|
},
|
877
876
|
"additionalProperties": false,
|
878
|
-
"required": ["type"
|
877
|
+
"required": ["type"]
|
879
878
|
},
|
880
879
|
"mediaSingle_caption_node": {
|
881
880
|
"allOf": [
|
@@ -419,7 +419,7 @@ export type LayoutSectionFullNode = PMNode & LayoutSectionFullDefinition;
|
|
419
419
|
export declare const layoutSectionFull: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<LayoutSectionFullNode>) => import("prosemirror-model").NodeSpec;
|
420
420
|
export interface LayoutSectionWithSingleColumnStage0Definition {
|
421
421
|
type: 'layoutSection';
|
422
|
-
content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition>;
|
422
|
+
content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
423
423
|
marks: Array<BreakoutMark | UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
424
424
|
attrs: {
|
425
425
|
columnRuleStyle?: 'solid';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_single_column", "full"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
|
2
2
|
stage0: true;
|
3
|
-
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
|
3
|
+
content: (import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentZeroOrMoreSpec | import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec)[];
|
4
4
|
ignore: any[];
|
5
5
|
attrs: {
|
6
6
|
columnRuleStyle: {
|
@@ -11,12 +11,6 @@ export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/
|
|
11
11
|
};
|
12
12
|
};
|
13
13
|
DANGEROUS_MANUAL_OVERRIDE: {
|
14
|
-
'pm-spec': {
|
15
|
-
content: {
|
16
|
-
value: string;
|
17
|
-
reason: string;
|
18
|
-
};
|
19
|
-
};
|
20
14
|
'validator-spec': {
|
21
15
|
'props.type': {
|
22
16
|
value: {
|
package/json-schema/v1/full.json
CHANGED
@@ -840,12 +840,11 @@
|
|
840
840
|
"$ref": "#/definitions/code_inline_node"
|
841
841
|
}
|
842
842
|
]
|
843
|
-
}
|
844
|
-
"minItems": 0
|
843
|
+
}
|
845
844
|
}
|
846
845
|
},
|
847
846
|
"additionalProperties": false,
|
848
|
-
"required": ["type"
|
847
|
+
"required": ["type"]
|
849
848
|
},
|
850
849
|
"mediaSingle_caption_node": {
|
851
850
|
"allOf": [
|
@@ -870,12 +870,11 @@
|
|
870
870
|
"$ref": "#/definitions/code_inline_node"
|
871
871
|
}
|
872
872
|
]
|
873
|
-
}
|
874
|
-
"minItems": 0
|
873
|
+
}
|
875
874
|
}
|
876
875
|
},
|
877
876
|
"additionalProperties": false,
|
878
|
-
"required": ["type"
|
877
|
+
"required": ["type"]
|
879
878
|
},
|
880
879
|
"mediaSingle_caption_node": {
|
881
880
|
"allOf": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "42.
|
3
|
+
"version": "42.5.0",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -46,7 +46,7 @@
|
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
48
|
"@atlassian/adf-schema-json": "^1.22.0",
|
49
|
-
"@atlaskit/adf-schema-generator": "^1.
|
49
|
+
"@atlaskit/adf-schema-generator": "^1.35.0",
|
50
50
|
"@atlaskit/codemod-utils": "^4.2.4",
|
51
51
|
"@babel/cli": "^7.22.9",
|
52
52
|
"@babel/core": "^7.22.9",
|