@atlaskit/adf-schema 37.1.26 → 37.1.28

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,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 37.1.28
4
+
5
+ ### Patch Changes
6
+
7
+ - 9f0af09: Fix inlineCard validator spec from DSL.
8
+
9
+ ## 37.1.27
10
+
11
+ ### Patch Changes
12
+
13
+ - 8d8dd32: Fix exception to layoutSection node for validator spec from DSL.
14
+
3
15
  ## 37.1.26
4
16
 
5
17
  ### Patch Changes
@@ -17,7 +17,8 @@ var inlineCard = exports.inlineCard = (0, _adfSchemaGenerator.adfNode)('inlineCa
17
17
  anyOf: [{
18
18
  url: {
19
19
  type: 'string',
20
- default: null
20
+ default: null,
21
+ validatorFn: 'safeUrl'
21
22
  }
22
23
  }, {
23
24
  data: {
@@ -25,6 +26,18 @@ var inlineCard = exports.inlineCard = (0, _adfSchemaGenerator.adfNode)('inlineCa
25
26
  default: null
26
27
  }
27
28
  }]
29
+ },
30
+ DANGEROUS_MANUAL_OVERRIDE: {
31
+ 'validator-spec': {
32
+ 'props.marks': {
33
+ reason: '@DSLCompatibilityException - Annotation mark is in variant, but not full schema. However this has been added for compatibility with current validator.',
34
+ value: {
35
+ items: ['annotation'],
36
+ optional: true,
37
+ type: 'array'
38
+ }
39
+ }
40
+ }
28
41
  }
29
42
  }).variant('with_annotation', {
30
43
  marks: [_annotation.annotation, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark]
@@ -20,6 +20,12 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
20
20
  value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
21
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
22
  }
23
+ },
24
+ 'validator-spec': {
25
+ 'props.content.allowUnsupportedBlock': {
26
+ remove: true,
27
+ reason: '@DSLCompatibilityException - mismatch for layoutSection'
28
+ }
23
29
  }
24
30
  }
25
31
  }).variant('full', {
@@ -11,7 +11,8 @@ export const inlineCard = adfNode('inlineCard').define({
11
11
  anyOf: [{
12
12
  url: {
13
13
  type: 'string',
14
- default: null
14
+ default: null,
15
+ validatorFn: 'safeUrl'
15
16
  }
16
17
  }, {
17
18
  data: {
@@ -19,6 +20,18 @@ export const inlineCard = adfNode('inlineCard').define({
19
20
  default: null
20
21
  }
21
22
  }]
23
+ },
24
+ DANGEROUS_MANUAL_OVERRIDE: {
25
+ 'validator-spec': {
26
+ 'props.marks': {
27
+ reason: '@DSLCompatibilityException - Annotation mark is in variant, but not full schema. However this has been added for compatibility with current validator.',
28
+ value: {
29
+ items: ['annotation'],
30
+ optional: true,
31
+ type: 'array'
32
+ }
33
+ }
34
+ }
22
35
  }
23
36
  }).variant('with_annotation', {
24
37
  marks: [annotation, unsupportedNodeAttribute, unsupportedMark]
@@ -14,6 +14,12 @@ export const layoutSection = adfNode('layoutSection').define({
14
14
  value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
15
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
16
  }
17
+ },
18
+ 'validator-spec': {
19
+ 'props.content.allowUnsupportedBlock': {
20
+ remove: true,
21
+ reason: '@DSLCompatibilityException - mismatch for layoutSection'
22
+ }
17
23
  }
18
24
  }
19
25
  }).variant('full', {
@@ -11,7 +11,8 @@ export var inlineCard = adfNode('inlineCard').define({
11
11
  anyOf: [{
12
12
  url: {
13
13
  type: 'string',
14
- default: null
14
+ default: null,
15
+ validatorFn: 'safeUrl'
15
16
  }
16
17
  }, {
17
18
  data: {
@@ -19,6 +20,18 @@ export var inlineCard = adfNode('inlineCard').define({
19
20
  default: null
20
21
  }
21
22
  }]
23
+ },
24
+ DANGEROUS_MANUAL_OVERRIDE: {
25
+ 'validator-spec': {
26
+ 'props.marks': {
27
+ reason: '@DSLCompatibilityException - Annotation mark is in variant, but not full schema. However this has been added for compatibility with current validator.',
28
+ value: {
29
+ items: ['annotation'],
30
+ optional: true,
31
+ type: 'array'
32
+ }
33
+ }
34
+ }
22
35
  }
23
36
  }).variant('with_annotation', {
24
37
  marks: [annotation, unsupportedNodeAttribute, unsupportedMark]
@@ -14,6 +14,12 @@ export var layoutSection = adfNode('layoutSection').define({
14
14
  value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
15
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
16
  }
17
+ },
18
+ 'validator-spec': {
19
+ 'props.content.allowUnsupportedBlock': {
20
+ remove: true,
21
+ reason: '@DSLCompatibilityException - mismatch for layoutSection'
22
+ }
17
23
  }
18
24
  }
19
25
  }).variant('full', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "37.1.26",
3
+ "version": "37.1.28",
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/"
@@ -9,10 +9,7 @@ const SKIP_LIST = [
9
9
  'doc', // doesn't match existing spec, need to flatten groups
10
10
  'expand', // doesn't match existing spec
11
11
  'extensionFrame', // doesn't match existing spec
12
- 'inlineCard', // doesn't match existing spec
13
- 'inlineExtension', // doesn't exist in the output
14
12
  'inline_comment_marker', // doesn't exist in the output
15
- 'layoutSection', // doesn't match existing spec, maxItem/minItem, extra marks
16
13
  'layoutSection_full', // doesn't match existing spec, allowUnsupportedBlock, extra marks
17
14
  'layoutSection_with_single_column', // doesn't exist in the output
18
15
  'media', // doesn't match existing spec