@atlaskit/adf-schema 37.1.33 → 37.1.35

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,18 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 37.1.35
4
+
5
+ ### Patch Changes
6
+
7
+ - 9132a0c: Fix media and mediaInline nodes with the validator spec.
8
+ - 20fadb8: align codeBlock node to existing validator spec
9
+
10
+ ## 37.1.34
11
+
12
+ ### Patch Changes
13
+
14
+ - 526f86e: ED-23030: Overrides layoutSection_full for validator spec
15
+
3
16
  ## 37.1.33
4
17
 
5
18
  ### Patch Changes
@@ -27,7 +27,28 @@ var codeBlock = exports.codeBlock = (0, _adfSchemaGenerator.adfNode)('codeBlock'
27
27
  optional: true
28
28
  }
29
29
  },
30
- content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_text.text, _unsupportedInline.unsupportedInline))]
30
+ content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_text.text, _unsupportedInline.unsupportedInline))],
31
+ DANGEROUS_MANUAL_OVERRIDE: {
32
+ 'validator-spec': {
33
+ 'props.attrs.props.uniqueId': {
34
+ remove: true,
35
+ reason: '@DSLCompatibilityException - uniqueId is missing in the existing validator spec'
36
+ },
37
+ 'props.content.items': {
38
+ value: [['text', {
39
+ props: {
40
+ marks: {
41
+ items: [],
42
+ maxItems: 0,
43
+ optional: true,
44
+ type: 'array'
45
+ }
46
+ }
47
+ }]],
48
+ reason: '@DSLCompatibilityException - text variant is inlined, which is not supported by current transformation'
49
+ }
50
+ }
51
+ }
31
52
  }).variant('with_marks', {
32
53
  marks: [_breakout.breakout, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
33
54
  ignore: ['pm-spec']
@@ -34,5 +34,16 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
34
34
  }).variant('full', {
35
35
  marks: [_breakout.breakout, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
36
36
  content: [(0, _adfSchemaGenerator.$range)(2, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))],
37
- ignore: []
37
+ ignore: [],
38
+ DANGEROUS_MANUAL_OVERRIDE: {
39
+ 'validator-spec': {
40
+ 'props.type': {
41
+ value: {
42
+ type: 'enum',
43
+ values: ['layoutSection']
44
+ },
45
+ reason: '@DSLCompatibilityException - mismatch for layoutSection'
46
+ }
47
+ }
48
+ }
38
49
  });
@@ -111,5 +111,13 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
111
111
  default: null
112
112
  }
113
113
  }]
114
+ },
115
+ DANGEROUS_MANUAL_OVERRIDE: {
116
+ 'validator-spec': {
117
+ 'props.attrs[1].props.url.optional': {
118
+ remove: true,
119
+ reason: '@DSLCompatibilityException - mismatch for validator spec as optional is not specified'
120
+ }
121
+ }
114
122
  }
115
123
  });
@@ -92,6 +92,18 @@ var mediaInline = exports.mediaInline = (0, _adfSchemaGenerator.adfNode)('mediaI
92
92
  type: 'boolean',
93
93
  optional: true,
94
94
  default: false
95
+ },
96
+ data: {
97
+ type: 'object',
98
+ optional: true
99
+ }
100
+ },
101
+ DANGEROUS_MANUAL_OVERRIDE: {
102
+ 'validator-spec': {
103
+ 'props.attrs.props.url': {
104
+ remove: true,
105
+ reason: '@DSLCompatibilityException - url is not specified on the validator spec (but it probably should be)'
106
+ }
95
107
  }
96
108
  }
97
109
  });
@@ -21,7 +21,28 @@ export const codeBlock = adfNode('codeBlock').define({
21
21
  optional: true
22
22
  }
23
23
  },
24
- content: [$zeroPlus($or(text, unsupportedInline))]
24
+ content: [$zeroPlus($or(text, unsupportedInline))],
25
+ DANGEROUS_MANUAL_OVERRIDE: {
26
+ 'validator-spec': {
27
+ 'props.attrs.props.uniqueId': {
28
+ remove: true,
29
+ reason: '@DSLCompatibilityException - uniqueId is missing in the existing validator spec'
30
+ },
31
+ 'props.content.items': {
32
+ value: [['text', {
33
+ props: {
34
+ marks: {
35
+ items: [],
36
+ maxItems: 0,
37
+ optional: true,
38
+ type: 'array'
39
+ }
40
+ }
41
+ }]],
42
+ reason: '@DSLCompatibilityException - text variant is inlined, which is not supported by current transformation'
43
+ }
44
+ }
45
+ }
25
46
  }).variant('with_marks', {
26
47
  marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
27
48
  ignore: ['pm-spec']
@@ -28,5 +28,16 @@ export const layoutSection = adfNode('layoutSection').define({
28
28
  }).variant('full', {
29
29
  marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
30
30
  content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))],
31
- ignore: []
31
+ ignore: [],
32
+ DANGEROUS_MANUAL_OVERRIDE: {
33
+ 'validator-spec': {
34
+ 'props.type': {
35
+ value: {
36
+ type: 'enum',
37
+ values: ['layoutSection']
38
+ },
39
+ reason: '@DSLCompatibilityException - mismatch for layoutSection'
40
+ }
41
+ }
42
+ }
32
43
  });
@@ -105,5 +105,13 @@ export const media = adfNode('media').define({
105
105
  default: null
106
106
  }
107
107
  }]
108
+ },
109
+ DANGEROUS_MANUAL_OVERRIDE: {
110
+ 'validator-spec': {
111
+ 'props.attrs[1].props.url.optional': {
112
+ remove: true,
113
+ reason: '@DSLCompatibilityException - mismatch for validator spec as optional is not specified'
114
+ }
115
+ }
108
116
  }
109
117
  });
@@ -86,6 +86,18 @@ export const mediaInline = adfNode('mediaInline').define({
86
86
  type: 'boolean',
87
87
  optional: true,
88
88
  default: false
89
+ },
90
+ data: {
91
+ type: 'object',
92
+ optional: true
93
+ }
94
+ },
95
+ DANGEROUS_MANUAL_OVERRIDE: {
96
+ 'validator-spec': {
97
+ 'props.attrs.props.url': {
98
+ remove: true,
99
+ reason: '@DSLCompatibilityException - url is not specified on the validator spec (but it probably should be)'
100
+ }
89
101
  }
90
102
  }
91
103
  });
@@ -21,7 +21,28 @@ export var codeBlock = adfNode('codeBlock').define({
21
21
  optional: true
22
22
  }
23
23
  },
24
- content: [$zeroPlus($or(text, unsupportedInline))]
24
+ content: [$zeroPlus($or(text, unsupportedInline))],
25
+ DANGEROUS_MANUAL_OVERRIDE: {
26
+ 'validator-spec': {
27
+ 'props.attrs.props.uniqueId': {
28
+ remove: true,
29
+ reason: '@DSLCompatibilityException - uniqueId is missing in the existing validator spec'
30
+ },
31
+ 'props.content.items': {
32
+ value: [['text', {
33
+ props: {
34
+ marks: {
35
+ items: [],
36
+ maxItems: 0,
37
+ optional: true,
38
+ type: 'array'
39
+ }
40
+ }
41
+ }]],
42
+ reason: '@DSLCompatibilityException - text variant is inlined, which is not supported by current transformation'
43
+ }
44
+ }
45
+ }
25
46
  }).variant('with_marks', {
26
47
  marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
27
48
  ignore: ['pm-spec']
@@ -28,5 +28,16 @@ export var layoutSection = adfNode('layoutSection').define({
28
28
  }).variant('full', {
29
29
  marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
30
30
  content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))],
31
- ignore: []
31
+ ignore: [],
32
+ DANGEROUS_MANUAL_OVERRIDE: {
33
+ 'validator-spec': {
34
+ 'props.type': {
35
+ value: {
36
+ type: 'enum',
37
+ values: ['layoutSection']
38
+ },
39
+ reason: '@DSLCompatibilityException - mismatch for layoutSection'
40
+ }
41
+ }
42
+ }
32
43
  });
@@ -105,5 +105,13 @@ export var media = adfNode('media').define({
105
105
  default: null
106
106
  }
107
107
  }]
108
+ },
109
+ DANGEROUS_MANUAL_OVERRIDE: {
110
+ 'validator-spec': {
111
+ 'props.attrs[1].props.url.optional': {
112
+ remove: true,
113
+ reason: '@DSLCompatibilityException - mismatch for validator spec as optional is not specified'
114
+ }
115
+ }
108
116
  }
109
117
  });
@@ -86,6 +86,18 @@ export var mediaInline = adfNode('mediaInline').define({
86
86
  type: 'boolean',
87
87
  optional: true,
88
88
  default: false
89
+ },
90
+ data: {
91
+ type: 'object',
92
+ optional: true
93
+ }
94
+ },
95
+ DANGEROUS_MANUAL_OVERRIDE: {
96
+ 'validator-spec': {
97
+ 'props.attrs.props.url': {
98
+ remove: true,
99
+ reason: '@DSLCompatibilityException - url is not specified on the validator spec (but it probably should be)'
100
+ }
89
101
  }
90
102
  }
91
103
  });
@@ -444,6 +444,7 @@ export interface MediaInlineDefinition {
444
444
  __contextId?: string;
445
445
  __mediaTraceId?: string;
446
446
  __external?: boolean;
447
+ data?: Record<string, unknown>;
447
448
  };
448
449
  }
449
450
  export type MediaInlineNode = PMNode & MediaInlineDefinition;
@@ -34,4 +34,15 @@ export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/
34
34
  marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
35
35
  content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
36
36
  ignore: any[];
37
+ DANGEROUS_MANUAL_OVERRIDE: {
38
+ 'validator-spec': {
39
+ 'props.type': {
40
+ value: {
41
+ type: string;
42
+ values: string[];
43
+ };
44
+ reason: string;
45
+ };
46
+ };
47
+ };
37
48
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "37.1.33",
3
+ "version": "37.1.35",
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,12 +4,8 @@ import adfNode from '../../../src/next-schema/full-schema.adf';
4
4
 
5
5
  const newSpecs = sortNestedArrays(adfToValidatorSpec(adfNode));
6
6
  const SKIP_LIST = [
7
- 'codeBlock', // doesn't match existing spec
8
7
  'inline_comment_marker', // doesn't exist in the output
9
- 'layoutSection_full', // doesn't match existing spec, allowUnsupportedBlock, extra marks
10
8
  'layoutSection_with_single_column', // doesn't exist in the output
11
- 'media', // doesn't match existing spec
12
- 'mediaInline', // doesn't match existing spec
13
9
  'multiBodiedExtension', // doesn't match existing spec
14
10
  'nestedExpand', // doesn't match existing spec
15
11
  'tableCell', // doesn't match existing spec