@atlaskit/adf-schema 37.1.39 → 37.1.40

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 37.1.40
4
+
5
+ ### Patch Changes
6
+
7
+ - f78fc78: enable validator spec support for layoutSection_with_single_column
8
+ - d131854: Align nested expand node with validator spec
9
+
3
10
  ## 37.1.39
4
11
 
5
12
  ### Patch Changes
@@ -30,7 +30,26 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
30
30
  }
31
31
  }).variant('with_single_column', {
32
32
  content: [(0, _adfSchemaGenerator.$range)(1, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))],
33
- ignore: ['json-schema']
33
+ ignore: ['json-schema'],
34
+ DANGEROUS_MANUAL_OVERRIDE: {
35
+ 'validator-spec': {
36
+ 'props.type': {
37
+ value: {
38
+ type: 'enum',
39
+ values: ['layoutSection']
40
+ },
41
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
42
+ },
43
+ 'props.marks': {
44
+ value: {
45
+ items: ['breakout'],
46
+ optional: true,
47
+ type: 'array'
48
+ },
49
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
50
+ }
51
+ }
52
+ }
34
53
  }).variant('full', {
35
54
  marks: [_breakout.breakout, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
36
55
  content: [(0, _adfSchemaGenerator.$range)(2, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))],
@@ -42,7 +61,7 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
42
61
  type: 'enum',
43
62
  values: ['layoutSection']
44
63
  },
45
- reason: '@DSLCompatibilityException - mismatch for layoutSection'
64
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
46
65
  }
47
66
  }
48
67
  }
@@ -35,7 +35,23 @@ var nestedExpand = exports.nestedExpand = (0, _adfSchemaGenerator.adfNode)('nest
35
35
  optional: true
36
36
  }
37
37
  },
38
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_codeBlock.codeBlock.use('with_no_marks'), _paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _unsupportedBlock.unsupportedBlock))]
38
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_codeBlock.codeBlock.use('with_no_marks'), _paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _unsupportedBlock.unsupportedBlock))],
39
+ DANGEROUS_MANUAL_OVERRIDE: {
40
+ 'validator-spec': {
41
+ 'props.attrs.optional': {
42
+ remove: true,
43
+ reason: '@DSLCompatibilityException - mismatch with DSL'
44
+ },
45
+ 'props.content': {
46
+ value: 'nestedExpand_content',
47
+ reason: '@DSLCompatibilityException - mismatch with DSL'
48
+ },
49
+ required: {
50
+ reason: '@DSLCompatibilityException - required for nestedExpand validator spec',
51
+ value: ['content']
52
+ }
53
+ }
54
+ }
39
55
  }).variant('content', {
40
56
  ignore: ['pm-spec', 'validator-spec']
41
57
  }).variant('with_no_marks', {
@@ -24,7 +24,26 @@ export const layoutSection = adfNode('layoutSection').define({
24
24
  }
25
25
  }).variant('with_single_column', {
26
26
  content: [$range(1, 3, $or(layoutColumn, unsupportedBlock))],
27
- ignore: ['json-schema']
27
+ ignore: ['json-schema'],
28
+ DANGEROUS_MANUAL_OVERRIDE: {
29
+ 'validator-spec': {
30
+ 'props.type': {
31
+ value: {
32
+ type: 'enum',
33
+ values: ['layoutSection']
34
+ },
35
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
36
+ },
37
+ 'props.marks': {
38
+ value: {
39
+ items: ['breakout'],
40
+ optional: true,
41
+ type: 'array'
42
+ },
43
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
44
+ }
45
+ }
46
+ }
28
47
  }).variant('full', {
29
48
  marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
30
49
  content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))],
@@ -36,7 +55,7 @@ export const layoutSection = adfNode('layoutSection').define({
36
55
  type: 'enum',
37
56
  values: ['layoutSection']
38
57
  },
39
- reason: '@DSLCompatibilityException - mismatch for layoutSection'
58
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
40
59
  }
41
60
  }
42
61
  }
@@ -29,7 +29,23 @@ export const nestedExpand = adfNode('nestedExpand').define({
29
29
  optional: true
30
30
  }
31
31
  },
32
- content: [$onePlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote, unsupportedBlock))]
32
+ content: [$onePlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote, unsupportedBlock))],
33
+ DANGEROUS_MANUAL_OVERRIDE: {
34
+ 'validator-spec': {
35
+ 'props.attrs.optional': {
36
+ remove: true,
37
+ reason: '@DSLCompatibilityException - mismatch with DSL'
38
+ },
39
+ 'props.content': {
40
+ value: 'nestedExpand_content',
41
+ reason: '@DSLCompatibilityException - mismatch with DSL'
42
+ },
43
+ required: {
44
+ reason: '@DSLCompatibilityException - required for nestedExpand validator spec',
45
+ value: ['content']
46
+ }
47
+ }
48
+ }
33
49
  }).variant('content', {
34
50
  ignore: ['pm-spec', 'validator-spec']
35
51
  }).variant('with_no_marks', {
@@ -24,7 +24,26 @@ export var layoutSection = adfNode('layoutSection').define({
24
24
  }
25
25
  }).variant('with_single_column', {
26
26
  content: [$range(1, 3, $or(layoutColumn, unsupportedBlock))],
27
- ignore: ['json-schema']
27
+ ignore: ['json-schema'],
28
+ DANGEROUS_MANUAL_OVERRIDE: {
29
+ 'validator-spec': {
30
+ 'props.type': {
31
+ value: {
32
+ type: 'enum',
33
+ values: ['layoutSection']
34
+ },
35
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
36
+ },
37
+ 'props.marks': {
38
+ value: {
39
+ items: ['breakout'],
40
+ optional: true,
41
+ type: 'array'
42
+ },
43
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_with_single_column'
44
+ }
45
+ }
46
+ }
28
47
  }).variant('full', {
29
48
  marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
30
49
  content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))],
@@ -36,7 +55,7 @@ export var layoutSection = adfNode('layoutSection').define({
36
55
  type: 'enum',
37
56
  values: ['layoutSection']
38
57
  },
39
- reason: '@DSLCompatibilityException - mismatch for layoutSection'
58
+ reason: '@DSLCompatibilityException - mismatch for layoutSection_full'
40
59
  }
41
60
  }
42
61
  }
@@ -29,7 +29,23 @@ export var nestedExpand = adfNode('nestedExpand').define({
29
29
  optional: true
30
30
  }
31
31
  },
32
- content: [$onePlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote, unsupportedBlock))]
32
+ content: [$onePlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote, unsupportedBlock))],
33
+ DANGEROUS_MANUAL_OVERRIDE: {
34
+ 'validator-spec': {
35
+ 'props.attrs.optional': {
36
+ remove: true,
37
+ reason: '@DSLCompatibilityException - mismatch with DSL'
38
+ },
39
+ 'props.content': {
40
+ value: 'nestedExpand_content',
41
+ reason: '@DSLCompatibilityException - mismatch with DSL'
42
+ },
43
+ required: {
44
+ reason: '@DSLCompatibilityException - required for nestedExpand validator spec',
45
+ value: ['content']
46
+ }
47
+ }
48
+ }
33
49
  }).variant('content', {
34
50
  ignore: ['pm-spec', 'validator-spec']
35
51
  }).variant('with_no_marks', {
@@ -30,6 +30,25 @@ export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/
30
30
  } & {
31
31
  content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
32
32
  ignore: "json-schema"[];
33
+ DANGEROUS_MANUAL_OVERRIDE: {
34
+ 'validator-spec': {
35
+ 'props.type': {
36
+ value: {
37
+ type: string;
38
+ values: string[];
39
+ };
40
+ reason: string;
41
+ };
42
+ 'props.marks': {
43
+ value: {
44
+ items: string[];
45
+ optional: boolean;
46
+ type: string;
47
+ };
48
+ reason: string;
49
+ };
50
+ };
51
+ };
33
52
  } & {
34
53
  marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
35
54
  content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "37.1.39",
3
+ "version": "37.1.40",
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/"
@@ -4,9 +4,6 @@ import adfNode from '../../../src/next-schema/full-schema.adf';
4
4
 
5
5
  const newSpecs = sortNestedArrays(adfToValidatorSpec(adfNode));
6
6
  const SKIP_LIST = [
7
- 'layoutSection_with_single_column', // doesn't exist in the output
8
- 'nestedExpand', // doesn't match existing spec
9
-
10
7
  'atomic_inline', // doesn't exist in the output, not even used anywhere...
11
8
  'nestedExpand_content', // doesn't exist in the output, completely different format from other groups
12
9
  'tableCell_content', // doesn't exist in the output, completely different format from other groups