@atlaskit/adf-schema 44.2.1 → 44.4.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 +12 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +2 -1
- package/dist/cjs/next-schema/nodes/heading.js +2 -16
- package/dist/cjs/next-schema/nodes/layoutSection.js +3 -48
- package/dist/cjs/next-schema/nodes/paragraph.js +1 -13
- package/dist/cjs/validator-schema/generated/validatorSpec.js +6 -11
- package/dist/es2019/next-schema/generated/nodeTypes.js +2 -1
- package/dist/es2019/next-schema/nodes/heading.js +2 -16
- package/dist/es2019/next-schema/nodes/layoutSection.js +3 -48
- package/dist/es2019/next-schema/nodes/paragraph.js +1 -13
- package/dist/es2019/validator-schema/generated/validatorSpec.js +6 -11
- package/dist/esm/next-schema/generated/nodeTypes.js +2 -1
- package/dist/esm/next-schema/nodes/heading.js +2 -16
- package/dist/esm/next-schema/nodes/layoutSection.js +3 -48
- package/dist/esm/next-schema/nodes/paragraph.js +1 -13
- package/dist/esm/validator-schema/generated/validatorSpec.js +6 -11
- package/dist/types/next-schema/generated/nodeTypes.d.ts +2 -1
- package/dist/types/next-schema/nodes/layoutSection.d.ts +1 -32
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +5 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 44.4.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- bd599ae: Give heading marks in pm-spec
|
8
|
+
|
9
|
+
## 44.3.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- 7705aa3: remove layoutSection overrides for validator spec
|
14
|
+
|
3
15
|
## 44.2.1
|
4
16
|
|
5
17
|
### Patch Changes
|
@@ -407,6 +407,7 @@ var hardBreak = exports.hardBreak = (0, _createPMSpecFactory.createPMNodeSpecFac
|
|
407
407
|
});
|
408
408
|
var heading = exports.heading = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
409
409
|
content: 'inline*',
|
410
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
410
411
|
group: 'block',
|
411
412
|
attrs: {
|
412
413
|
level: {
|
@@ -558,7 +559,7 @@ var layoutColumn = exports.layoutColumn = (0, _createPMSpecFactory.createPMNodeS
|
|
558
559
|
isolating: true
|
559
560
|
});
|
560
561
|
var layoutSection = exports.layoutSection = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
561
|
-
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*
|
562
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*',
|
562
563
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
563
564
|
isolating: true
|
564
565
|
});
|
@@ -13,9 +13,7 @@ var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
|
|
13
13
|
var heading = exports.heading = (0, _adfSchemaGenerator.adfNode)('heading').define({
|
14
14
|
defining: true,
|
15
15
|
selectable: false,
|
16
|
-
|
17
|
-
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
18
|
-
// marks: [unsupportedMark, unsupportedNodeAttribute],
|
16
|
+
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
19
17
|
hasEmptyMarks: true,
|
20
18
|
attrs: {
|
21
19
|
level: {
|
@@ -30,19 +28,7 @@ var heading = exports.heading = (0, _adfSchemaGenerator.adfNode)('heading').defi
|
|
30
28
|
default: null
|
31
29
|
}
|
32
30
|
},
|
33
|
-
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup, _inlineContentGroup.inlineContentGroup))]
|
34
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
35
|
-
'validator-spec': {
|
36
|
-
'props.marks': {
|
37
|
-
value: {
|
38
|
-
type: 'array',
|
39
|
-
items: [],
|
40
|
-
optional: true
|
41
|
-
},
|
42
|
-
reason: 'In old types, some nodes have marks: Array<any>, which is not possible to represent in new DSL'
|
43
|
-
}
|
44
|
-
}
|
45
|
-
}
|
31
|
+
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup, _inlineContentGroup.inlineContentGroup))]
|
46
32
|
}).variant('with_alignment', {
|
47
33
|
marks: [_alignmentAndIndentation.alignment, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
48
34
|
content: [],
|
@@ -13,25 +13,11 @@ var _unsupportedBlock = require("./unsupportedBlock");
|
|
13
13
|
var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('layoutSection').define({
|
14
14
|
isolating: true,
|
15
15
|
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
16
|
-
content: [(0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock)]
|
17
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
18
|
-
'pm-spec': {
|
19
|
-
content: {
|
20
|
-
value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
21
|
-
reason: "The content expression is not correct or redundant around 'unsupportedBlock* | 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."
|
22
|
-
}
|
23
|
-
},
|
24
|
-
'validator-spec': {
|
25
|
-
'props.content.allowUnsupportedBlock': {
|
26
|
-
remove: true,
|
27
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
16
|
+
content: [(0, _adfSchemaGenerator.$range)(1, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_unsupportedBlock.unsupportedBlock))]
|
31
17
|
}).variant('with_single_column', {
|
32
18
|
stage0: true,
|
19
|
+
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
33
20
|
content: [(0, _adfSchemaGenerator.$range)(1, 5, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_unsupportedBlock.unsupportedBlock))],
|
34
|
-
ignore: [],
|
35
21
|
attrs: {
|
36
22
|
columnRuleStyle: {
|
37
23
|
type: 'enum',
|
@@ -39,39 +25,8 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
|
|
39
25
|
default: null,
|
40
26
|
optional: true
|
41
27
|
}
|
42
|
-
},
|
43
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
44
|
-
'validator-spec': {
|
45
|
-
'props.type': {
|
46
|
-
value: {
|
47
|
-
type: 'enum',
|
48
|
-
values: ['layoutSection']
|
49
|
-
},
|
50
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
51
|
-
},
|
52
|
-
'props.marks': {
|
53
|
-
value: {
|
54
|
-
items: ['breakout'],
|
55
|
-
optional: true,
|
56
|
-
type: 'array'
|
57
|
-
},
|
58
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
59
|
-
}
|
60
|
-
}
|
61
28
|
}
|
62
29
|
}).variant('full', {
|
63
30
|
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
64
|
-
content: [(0, _adfSchemaGenerator.$range)(2, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))]
|
65
|
-
ignore: [],
|
66
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
67
|
-
'validator-spec': {
|
68
|
-
'props.type': {
|
69
|
-
value: {
|
70
|
-
type: 'enum',
|
71
|
-
values: ['layoutSection']
|
72
|
-
},
|
73
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
31
|
+
content: [(0, _adfSchemaGenerator.$range)(2, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))]
|
77
32
|
});
|
@@ -21,19 +21,7 @@ var paragraph = exports.paragraph = (0, _adfSchemaGenerator.adfNode)('paragraph'
|
|
21
21
|
selectable: false,
|
22
22
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
23
23
|
hasEmptyMarks: true,
|
24
|
-
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup, _inlineContentGroup.inlineContentGroup))]
|
25
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
26
|
-
'validator-spec': {
|
27
|
-
'props.marks': {
|
28
|
-
value: {
|
29
|
-
type: 'array',
|
30
|
-
items: [],
|
31
|
-
optional: true
|
32
|
-
},
|
33
|
-
reason: 'NoMark type used in old schema had a hack maxItems: 0 to mark nodes that should not have any marks. This is not possible to represent in new DSL.'
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
24
|
+
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup, _inlineContentGroup.inlineContentGroup))]
|
37
25
|
}).variant('with_alignment', {
|
38
26
|
marks: [_alignmentAndIndentation.alignment, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
39
27
|
content: [],
|
@@ -1603,7 +1603,10 @@ var layoutSection = exports.layoutSection = {
|
|
1603
1603
|
},
|
1604
1604
|
content: {
|
1605
1605
|
type: 'array',
|
1606
|
-
items: ['layoutColumn']
|
1606
|
+
items: ['layoutColumn'],
|
1607
|
+
minItems: 1,
|
1608
|
+
maxItems: 3,
|
1609
|
+
allowUnsupportedBlock: true
|
1607
1610
|
},
|
1608
1611
|
marks: {
|
1609
1612
|
type: 'array',
|
@@ -1631,14 +1634,10 @@ var layoutSection_with_single_column = exports.layoutSection_with_single_column
|
|
1631
1634
|
maxItems: 5,
|
1632
1635
|
allowUnsupportedBlock: true
|
1633
1636
|
},
|
1634
|
-
type: {
|
1635
|
-
type: 'enum',
|
1636
|
-
values: ['layoutSection']
|
1637
|
-
},
|
1638
1637
|
marks: {
|
1639
|
-
|
1638
|
+
type: 'array',
|
1640
1639
|
optional: true,
|
1641
|
-
|
1640
|
+
items: ['breakout']
|
1642
1641
|
}
|
1643
1642
|
}
|
1644
1643
|
}];
|
@@ -1655,10 +1654,6 @@ var layoutSection_full = exports.layoutSection_full = ['layoutSection', {
|
|
1655
1654
|
type: 'array',
|
1656
1655
|
optional: true,
|
1657
1656
|
items: ['breakout']
|
1658
|
-
},
|
1659
|
-
type: {
|
1660
|
-
type: 'enum',
|
1661
|
-
values: ['layoutSection']
|
1662
1657
|
}
|
1663
1658
|
}
|
1664
1659
|
}];
|
@@ -401,6 +401,7 @@ export const hardBreak = createPMNodeSpecFactory({
|
|
401
401
|
});
|
402
402
|
export const heading = createPMNodeSpecFactory({
|
403
403
|
content: 'inline*',
|
404
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
404
405
|
group: 'block',
|
405
406
|
attrs: {
|
406
407
|
level: {
|
@@ -552,7 +553,7 @@ export const layoutColumn = createPMNodeSpecFactory({
|
|
552
553
|
isolating: true
|
553
554
|
});
|
554
555
|
export const layoutSection = createPMNodeSpecFactory({
|
555
|
-
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*
|
556
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*',
|
556
557
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
557
558
|
isolating: true
|
558
559
|
});
|
@@ -7,9 +7,7 @@ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
7
7
|
export const heading = adfNode('heading').define({
|
8
8
|
defining: true,
|
9
9
|
selectable: false,
|
10
|
-
|
11
|
-
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
12
|
-
// marks: [unsupportedMark, unsupportedNodeAttribute],
|
10
|
+
marks: [unsupportedMark, unsupportedNodeAttribute],
|
13
11
|
hasEmptyMarks: true,
|
14
12
|
attrs: {
|
15
13
|
level: {
|
@@ -24,19 +22,7 @@ export const heading = adfNode('heading').define({
|
|
24
22
|
default: null
|
25
23
|
}
|
26
24
|
},
|
27
|
-
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
28
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
29
|
-
'validator-spec': {
|
30
|
-
'props.marks': {
|
31
|
-
value: {
|
32
|
-
type: 'array',
|
33
|
-
items: [],
|
34
|
-
optional: true
|
35
|
-
},
|
36
|
-
reason: 'In old types, some nodes have marks: Array<any>, which is not possible to represent in new DSL'
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
25
|
+
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
40
26
|
}).variant('with_alignment', {
|
41
27
|
marks: [alignment, unsupportedMark, unsupportedNodeAttribute],
|
42
28
|
content: [],
|
@@ -7,25 +7,11 @@ import { unsupportedBlock } from './unsupportedBlock';
|
|
7
7
|
export const layoutSection = adfNode('layoutSection').define({
|
8
8
|
isolating: true,
|
9
9
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
10
|
-
content: [$or(layoutColumn, unsupportedBlock)]
|
11
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
12
|
-
'pm-spec': {
|
13
|
-
content: {
|
14
|
-
value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
15
|
-
reason: `The content expression is not correct or redundant around 'unsupportedBlock* | 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.`
|
16
|
-
}
|
17
|
-
},
|
18
|
-
'validator-spec': {
|
19
|
-
'props.content.allowUnsupportedBlock': {
|
20
|
-
remove: true,
|
21
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
10
|
+
content: [$range(1, 3, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))]
|
25
11
|
}).variant('with_single_column', {
|
26
12
|
stage0: true,
|
13
|
+
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
27
14
|
content: [$range(1, 5, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))],
|
28
|
-
ignore: [],
|
29
15
|
attrs: {
|
30
16
|
columnRuleStyle: {
|
31
17
|
type: 'enum',
|
@@ -33,39 +19,8 @@ export const layoutSection = adfNode('layoutSection').define({
|
|
33
19
|
default: null,
|
34
20
|
optional: true
|
35
21
|
}
|
36
|
-
},
|
37
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
38
|
-
'validator-spec': {
|
39
|
-
'props.type': {
|
40
|
-
value: {
|
41
|
-
type: 'enum',
|
42
|
-
values: ['layoutSection']
|
43
|
-
},
|
44
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
45
|
-
},
|
46
|
-
'props.marks': {
|
47
|
-
value: {
|
48
|
-
items: ['breakout'],
|
49
|
-
optional: true,
|
50
|
-
type: 'array'
|
51
|
-
},
|
52
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
53
|
-
}
|
54
|
-
}
|
55
22
|
}
|
56
23
|
}).variant('full', {
|
57
24
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
58
|
-
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))]
|
59
|
-
ignore: [],
|
60
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
61
|
-
'validator-spec': {
|
62
|
-
'props.type': {
|
63
|
-
value: {
|
64
|
-
type: 'enum',
|
65
|
-
values: ['layoutSection']
|
66
|
-
},
|
67
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
|
68
|
-
}
|
69
|
-
}
|
70
|
-
}
|
25
|
+
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))]
|
71
26
|
});
|
@@ -15,19 +15,7 @@ export const paragraph = adfNode('paragraph').define({
|
|
15
15
|
selectable: false,
|
16
16
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
17
17
|
hasEmptyMarks: true,
|
18
|
-
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
19
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
20
|
-
'validator-spec': {
|
21
|
-
'props.marks': {
|
22
|
-
value: {
|
23
|
-
type: 'array',
|
24
|
-
items: [],
|
25
|
-
optional: true
|
26
|
-
},
|
27
|
-
reason: 'NoMark type used in old schema had a hack maxItems: 0 to mark nodes that should not have any marks. This is not possible to represent in new DSL.'
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
18
|
+
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
31
19
|
}).variant('with_alignment', {
|
32
20
|
marks: [alignment, unsupportedMark, unsupportedNodeAttribute],
|
33
21
|
content: [],
|
@@ -1597,7 +1597,10 @@ export const layoutSection = {
|
|
1597
1597
|
},
|
1598
1598
|
content: {
|
1599
1599
|
type: 'array',
|
1600
|
-
items: ['layoutColumn']
|
1600
|
+
items: ['layoutColumn'],
|
1601
|
+
minItems: 1,
|
1602
|
+
maxItems: 3,
|
1603
|
+
allowUnsupportedBlock: true
|
1601
1604
|
},
|
1602
1605
|
marks: {
|
1603
1606
|
type: 'array',
|
@@ -1625,14 +1628,10 @@ export const layoutSection_with_single_column = ['layoutSection', {
|
|
1625
1628
|
maxItems: 5,
|
1626
1629
|
allowUnsupportedBlock: true
|
1627
1630
|
},
|
1628
|
-
type: {
|
1629
|
-
type: 'enum',
|
1630
|
-
values: ['layoutSection']
|
1631
|
-
},
|
1632
1631
|
marks: {
|
1633
|
-
|
1632
|
+
type: 'array',
|
1634
1633
|
optional: true,
|
1635
|
-
|
1634
|
+
items: ['breakout']
|
1636
1635
|
}
|
1637
1636
|
}
|
1638
1637
|
}];
|
@@ -1649,10 +1648,6 @@ export const layoutSection_full = ['layoutSection', {
|
|
1649
1648
|
type: 'array',
|
1650
1649
|
optional: true,
|
1651
1650
|
items: ['breakout']
|
1652
|
-
},
|
1653
|
-
type: {
|
1654
|
-
type: 'enum',
|
1655
|
-
values: ['layoutSection']
|
1656
1651
|
}
|
1657
1652
|
}
|
1658
1653
|
}];
|
@@ -401,6 +401,7 @@ export var hardBreak = createPMNodeSpecFactory({
|
|
401
401
|
});
|
402
402
|
export var heading = createPMNodeSpecFactory({
|
403
403
|
content: 'inline*',
|
404
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
404
405
|
group: 'block',
|
405
406
|
attrs: {
|
406
407
|
level: {
|
@@ -552,7 +553,7 @@ export var layoutColumn = createPMNodeSpecFactory({
|
|
552
553
|
isolating: true
|
553
554
|
});
|
554
555
|
export var layoutSection = createPMNodeSpecFactory({
|
555
|
-
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*
|
556
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock*',
|
556
557
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
557
558
|
isolating: true
|
558
559
|
});
|
@@ -7,9 +7,7 @@ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
7
7
|
export var heading = adfNode('heading').define({
|
8
8
|
defining: true,
|
9
9
|
selectable: false,
|
10
|
-
|
11
|
-
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
12
|
-
// marks: [unsupportedMark, unsupportedNodeAttribute],
|
10
|
+
marks: [unsupportedMark, unsupportedNodeAttribute],
|
13
11
|
hasEmptyMarks: true,
|
14
12
|
attrs: {
|
15
13
|
level: {
|
@@ -24,19 +22,7 @@ export var heading = adfNode('heading').define({
|
|
24
22
|
default: null
|
25
23
|
}
|
26
24
|
},
|
27
|
-
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
28
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
29
|
-
'validator-spec': {
|
30
|
-
'props.marks': {
|
31
|
-
value: {
|
32
|
-
type: 'array',
|
33
|
-
items: [],
|
34
|
-
optional: true
|
35
|
-
},
|
36
|
-
reason: 'In old types, some nodes have marks: Array<any>, which is not possible to represent in new DSL'
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
25
|
+
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
40
26
|
}).variant('with_alignment', {
|
41
27
|
marks: [alignment, unsupportedMark, unsupportedNodeAttribute],
|
42
28
|
content: [],
|
@@ -7,25 +7,11 @@ import { unsupportedBlock } from './unsupportedBlock';
|
|
7
7
|
export var layoutSection = adfNode('layoutSection').define({
|
8
8
|
isolating: true,
|
9
9
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
10
|
-
content: [$or(layoutColumn, unsupportedBlock)]
|
11
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
12
|
-
'pm-spec': {
|
13
|
-
content: {
|
14
|
-
value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
15
|
-
reason: "The content expression is not correct or redundant around 'unsupportedBlock* | 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."
|
16
|
-
}
|
17
|
-
},
|
18
|
-
'validator-spec': {
|
19
|
-
'props.content.allowUnsupportedBlock': {
|
20
|
-
remove: true,
|
21
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection'
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
10
|
+
content: [$range(1, 3, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))]
|
25
11
|
}).variant('with_single_column', {
|
26
12
|
stage0: true,
|
13
|
+
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
27
14
|
content: [$range(1, 5, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))],
|
28
|
-
ignore: [],
|
29
15
|
attrs: {
|
30
16
|
columnRuleStyle: {
|
31
17
|
type: 'enum',
|
@@ -33,39 +19,8 @@ export var layoutSection = adfNode('layoutSection').define({
|
|
33
19
|
default: null,
|
34
20
|
optional: true
|
35
21
|
}
|
36
|
-
},
|
37
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
38
|
-
'validator-spec': {
|
39
|
-
'props.type': {
|
40
|
-
value: {
|
41
|
-
type: 'enum',
|
42
|
-
values: ['layoutSection']
|
43
|
-
},
|
44
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
45
|
-
},
|
46
|
-
'props.marks': {
|
47
|
-
value: {
|
48
|
-
items: ['breakout'],
|
49
|
-
optional: true,
|
50
|
-
type: 'array'
|
51
|
-
},
|
52
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
|
53
|
-
}
|
54
|
-
}
|
55
22
|
}
|
56
23
|
}).variant('full', {
|
57
24
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
58
|
-
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))]
|
59
|
-
ignore: [],
|
60
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
61
|
-
'validator-spec': {
|
62
|
-
'props.type': {
|
63
|
-
value: {
|
64
|
-
type: 'enum',
|
65
|
-
values: ['layoutSection']
|
66
|
-
},
|
67
|
-
reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
|
68
|
-
}
|
69
|
-
}
|
70
|
-
}
|
25
|
+
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))]
|
71
26
|
});
|
@@ -15,19 +15,7 @@ export var paragraph = adfNode('paragraph').define({
|
|
15
15
|
selectable: false,
|
16
16
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
17
17
|
hasEmptyMarks: true,
|
18
|
-
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
19
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
20
|
-
'validator-spec': {
|
21
|
-
'props.marks': {
|
22
|
-
value: {
|
23
|
-
type: 'array',
|
24
|
-
items: [],
|
25
|
-
optional: true
|
26
|
-
},
|
27
|
-
reason: 'NoMark type used in old schema had a hack maxItems: 0 to mark nodes that should not have any marks. This is not possible to represent in new DSL.'
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
18
|
+
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
31
19
|
}).variant('with_alignment', {
|
32
20
|
marks: [alignment, unsupportedMark, unsupportedNodeAttribute],
|
33
21
|
content: [],
|
@@ -1597,7 +1597,10 @@ export var layoutSection = {
|
|
1597
1597
|
},
|
1598
1598
|
content: {
|
1599
1599
|
type: 'array',
|
1600
|
-
items: ['layoutColumn']
|
1600
|
+
items: ['layoutColumn'],
|
1601
|
+
minItems: 1,
|
1602
|
+
maxItems: 3,
|
1603
|
+
allowUnsupportedBlock: true
|
1601
1604
|
},
|
1602
1605
|
marks: {
|
1603
1606
|
type: 'array',
|
@@ -1625,14 +1628,10 @@ export var layoutSection_with_single_column = ['layoutSection', {
|
|
1625
1628
|
maxItems: 5,
|
1626
1629
|
allowUnsupportedBlock: true
|
1627
1630
|
},
|
1628
|
-
type: {
|
1629
|
-
type: 'enum',
|
1630
|
-
values: ['layoutSection']
|
1631
|
-
},
|
1632
1631
|
marks: {
|
1633
|
-
|
1632
|
+
type: 'array',
|
1634
1633
|
optional: true,
|
1635
|
-
|
1634
|
+
items: ['breakout']
|
1636
1635
|
}
|
1637
1636
|
}
|
1638
1637
|
}];
|
@@ -1649,10 +1648,6 @@ export var layoutSection_full = ['layoutSection', {
|
|
1649
1648
|
type: 'array',
|
1650
1649
|
optional: true,
|
1651
1650
|
items: ['breakout']
|
1652
|
-
},
|
1653
|
-
type: {
|
1654
|
-
type: 'enum',
|
1655
|
-
values: ['layoutSection']
|
1656
1651
|
}
|
1657
1652
|
}
|
1658
1653
|
}];
|
@@ -295,6 +295,7 @@ export declare const hardBreak: ({ parseDOM, toDOM, toDebugString }: import("../
|
|
295
295
|
export interface HeadingDefinition {
|
296
296
|
type: 'heading';
|
297
297
|
content: Array<InlineDefinition>;
|
298
|
+
marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
298
299
|
attrs: {
|
299
300
|
level: number;
|
300
301
|
localId?: string;
|
@@ -405,7 +406,7 @@ export type LayoutColumnNode = PMNode & LayoutColumnDefinition;
|
|
405
406
|
export declare const layoutColumn: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<LayoutColumnNode>) => import("prosemirror-model").NodeSpec;
|
406
407
|
export interface LayoutSectionDefinition {
|
407
408
|
type: 'layoutSection';
|
408
|
-
content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition>;
|
409
|
+
content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
409
410
|
marks: Array<BreakoutMark | UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
410
411
|
}
|
411
412
|
export type LayoutSectionNode = PMNode & LayoutSectionDefinition;
|
@@ -1,7 +1,7 @@
|
|
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
|
+
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
3
4
|
content: (import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentZeroOrMoreSpec | import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec)[];
|
4
|
-
ignore: any[];
|
5
5
|
attrs: {
|
6
6
|
columnRuleStyle: {
|
7
7
|
type: "enum";
|
@@ -10,38 +10,7 @@ export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/
|
|
10
10
|
optional: true;
|
11
11
|
};
|
12
12
|
};
|
13
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
14
|
-
'validator-spec': {
|
15
|
-
'props.type': {
|
16
|
-
value: {
|
17
|
-
type: string;
|
18
|
-
values: string[];
|
19
|
-
};
|
20
|
-
reason: string;
|
21
|
-
};
|
22
|
-
'props.marks': {
|
23
|
-
value: {
|
24
|
-
items: string[];
|
25
|
-
optional: boolean;
|
26
|
-
type: string;
|
27
|
-
};
|
28
|
-
reason: string;
|
29
|
-
};
|
30
|
-
};
|
31
|
-
};
|
32
13
|
} & {
|
33
14
|
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
34
15
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
|
35
|
-
ignore: any[];
|
36
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
37
|
-
'validator-spec': {
|
38
|
-
'props.type': {
|
39
|
-
value: {
|
40
|
-
type: string;
|
41
|
-
values: string[];
|
42
|
-
};
|
43
|
-
reason: string;
|
44
|
-
};
|
45
|
-
};
|
46
|
-
};
|
47
16
|
}>;
|
@@ -1617,6 +1617,9 @@ export declare const layoutSection: {
|
|
1617
1617
|
content: {
|
1618
1618
|
type: string;
|
1619
1619
|
items: string[];
|
1620
|
+
minItems: number;
|
1621
|
+
maxItems: number;
|
1622
|
+
allowUnsupportedBlock: boolean;
|
1620
1623
|
};
|
1621
1624
|
marks: {
|
1622
1625
|
type: string;
|
@@ -1644,14 +1647,10 @@ export declare const layoutSection_with_single_column: (string | {
|
|
1644
1647
|
maxItems: number;
|
1645
1648
|
allowUnsupportedBlock: boolean;
|
1646
1649
|
};
|
1647
|
-
type: {
|
1648
|
-
type: string;
|
1649
|
-
values: string[];
|
1650
|
-
};
|
1651
1650
|
marks: {
|
1652
|
-
items: string[];
|
1653
|
-
optional: boolean;
|
1654
1651
|
type: string;
|
1652
|
+
optional: boolean;
|
1653
|
+
items: string[];
|
1655
1654
|
};
|
1656
1655
|
};
|
1657
1656
|
})[];
|
@@ -1669,10 +1668,6 @@ export declare const layoutSection_full: (string | {
|
|
1669
1668
|
optional: boolean;
|
1670
1669
|
items: string[];
|
1671
1670
|
};
|
1672
|
-
type: {
|
1673
|
-
type: string;
|
1674
|
-
values: string[];
|
1675
|
-
};
|
1676
1671
|
};
|
1677
1672
|
})[];
|
1678
1673
|
export declare const extensionFrame: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "44.
|
3
|
+
"version": "44.4.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.24.0",
|
49
|
-
"@atlaskit/adf-schema-generator": "^1.
|
49
|
+
"@atlaskit/adf-schema-generator": "^1.37.0",
|
50
50
|
"@atlaskit/codemod-utils": "^4.2.4",
|
51
51
|
"@babel/cli": "^7.22.9",
|
52
52
|
"@babel/core": "^7.22.9",
|