@atlaskit/adf-schema 37.1.27 → 37.1.29

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.29
4
+
5
+ ### Patch Changes
6
+
7
+ - f6c953f: align extensionFrame to match ADF
8
+ - 362c287: ED-23030: adds overrides for required for table nodes
9
+
10
+ ## 37.1.28
11
+
12
+ ### Patch Changes
13
+
14
+ - 9f0af09: Fix inlineCard validator spec from DSL.
15
+
3
16
  ## 37.1.27
4
17
 
5
18
  ### Patch Changes
@@ -33,5 +33,5 @@ var extensionFrame = exports.extensionFrame = (0, _adfSchemaGenerator.adfNode)('
33
33
  selectable: false,
34
34
  marks: [_dataConsumer.dataConsumer, _fragment.fragment, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
35
35
  attrs: {},
36
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_bodiedExtension.bodiedExtension, _panel.panel, _paragraph.paragraph, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading, _codeBlock.codeBlock, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _decisionList.decisionList, _task.taskList, _table.table, _extension.extension, _blockCard.blockCard, _embedCard.embedCard, _unsupportedBlock.unsupportedBlock))]
36
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_bodiedExtension.bodiedExtension.use('with_marks'), _panel.panel, _paragraph.paragraph.use('with_no_marks'), _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _codeBlock.codeBlock.use('with_no_marks'), _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('caption'), _decisionList.decisionList, _task.taskList, _table.table, _extension.extension.use('with_marks'), _blockCard.blockCard, _embedCard.embedCard, _unsupportedBlock.unsupportedBlock))]
37
37
  });
@@ -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]
@@ -38,5 +38,13 @@ var tableCell = exports.tableCell = (0, _adfSchemaGenerator.adfNode)('tableCell'
38
38
  optional: true
39
39
  }
40
40
  },
41
- content: [_tableCellContentPseudoGroup.tableCellContentPseudoGroup]
41
+ content: [_tableCellContentPseudoGroup.tableCellContentPseudoGroup],
42
+ DANGEROUS_MANUAL_OVERRIDE: {
43
+ 'validator-spec': {
44
+ required: {
45
+ reason: '@DSLCompatibilityException - required for tableHeader validator spec',
46
+ value: ['content']
47
+ }
48
+ }
49
+ }
42
50
  });
@@ -38,5 +38,13 @@ var tableHeader = exports.tableHeader = (0, _adfSchemaGenerator.adfNode)('tableH
38
38
  optional: true
39
39
  }
40
40
  },
41
- content: [_tableCellContentPseudoGroup.tableHeaderContentPseudoGroup]
41
+ content: [_tableCellContentPseudoGroup.tableHeaderContentPseudoGroup],
42
+ DANGEROUS_MANUAL_OVERRIDE: {
43
+ 'validator-spec': {
44
+ required: {
45
+ reason: '@DSLCompatibilityException - required for tableHeader validator spec',
46
+ value: ['content']
47
+ }
48
+ }
49
+ }
42
50
  });
@@ -27,5 +27,5 @@ export const extensionFrame = adfNode('extensionFrame').define({
27
27
  selectable: false,
28
28
  marks: [dataConsumer, fragment, unsupportedNodeAttribute, unsupportedMark],
29
29
  attrs: {},
30
- content: [$onePlus($or(bodiedExtension, panel, paragraph, blockquote, orderedList, bulletList, rule, heading, codeBlock, mediaGroup, mediaSingle, decisionList, taskList, table, extension, blockCard, embedCard, unsupportedBlock))]
30
+ content: [$onePlus($or(bodiedExtension.use('with_marks'), panel, paragraph.use('with_no_marks'), blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock.use('with_no_marks'), mediaGroup, mediaSingle.use('full'), mediaSingle.use('caption'), decisionList, taskList, table, extension.use('with_marks'), blockCard, embedCard, unsupportedBlock))]
31
31
  });
@@ -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]
@@ -32,5 +32,13 @@ export const tableCell = adfNode('tableCell').define({
32
32
  optional: true
33
33
  }
34
34
  },
35
- content: [tableCellContentPseudoGroup]
35
+ content: [tableCellContentPseudoGroup],
36
+ DANGEROUS_MANUAL_OVERRIDE: {
37
+ 'validator-spec': {
38
+ required: {
39
+ reason: '@DSLCompatibilityException - required for tableHeader validator spec',
40
+ value: ['content']
41
+ }
42
+ }
43
+ }
36
44
  });
@@ -32,5 +32,13 @@ export const tableHeader = adfNode('tableHeader').define({
32
32
  optional: true
33
33
  }
34
34
  },
35
- content: [tableHeaderContentPseudoGroup]
35
+ content: [tableHeaderContentPseudoGroup],
36
+ DANGEROUS_MANUAL_OVERRIDE: {
37
+ 'validator-spec': {
38
+ required: {
39
+ reason: '@DSLCompatibilityException - required for tableHeader validator spec',
40
+ value: ['content']
41
+ }
42
+ }
43
+ }
36
44
  });
@@ -27,5 +27,5 @@ export var extensionFrame = adfNode('extensionFrame').define({
27
27
  selectable: false,
28
28
  marks: [dataConsumer, fragment, unsupportedNodeAttribute, unsupportedMark],
29
29
  attrs: {},
30
- content: [$onePlus($or(bodiedExtension, panel, paragraph, blockquote, orderedList, bulletList, rule, heading, codeBlock, mediaGroup, mediaSingle, decisionList, taskList, table, extension, blockCard, embedCard, unsupportedBlock))]
30
+ content: [$onePlus($or(bodiedExtension.use('with_marks'), panel, paragraph.use('with_no_marks'), blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock.use('with_no_marks'), mediaGroup, mediaSingle.use('full'), mediaSingle.use('caption'), decisionList, taskList, table, extension.use('with_marks'), blockCard, embedCard, unsupportedBlock))]
31
31
  });
@@ -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]
@@ -32,5 +32,13 @@ export var tableCell = adfNode('tableCell').define({
32
32
  optional: true
33
33
  }
34
34
  },
35
- content: [tableCellContentPseudoGroup]
35
+ content: [tableCellContentPseudoGroup],
36
+ DANGEROUS_MANUAL_OVERRIDE: {
37
+ 'validator-spec': {
38
+ required: {
39
+ reason: '@DSLCompatibilityException - required for tableHeader validator spec',
40
+ value: ['content']
41
+ }
42
+ }
43
+ }
36
44
  });
@@ -32,5 +32,13 @@ export var tableHeader = adfNode('tableHeader').define({
32
32
  optional: true
33
33
  }
34
34
  },
35
- content: [tableHeaderContentPseudoGroup]
35
+ content: [tableHeaderContentPseudoGroup],
36
+ DANGEROUS_MANUAL_OVERRIDE: {
37
+ 'validator-spec': {
38
+ required: {
39
+ reason: '@DSLCompatibilityException - required for tableHeader validator spec',
40
+ value: ['content']
41
+ }
42
+ }
43
+ }
36
44
  });
@@ -240,7 +240,7 @@ export type ExtensionWithMarksNode = PMNode & ExtensionWithMarksDefinition;
240
240
  export declare const extensionWithMarks: ({ parseDOM, toDOM, toDebugString }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<ExtensionWithMarksNode>) => import("prosemirror-model").NodeSpec;
241
241
  export interface ExtensionFrameDefinition {
242
242
  type: 'extensionFrame';
243
- content: Array<BlockCardDefinition | BlockquoteDefinition | BodiedExtensionDefinition | BulletListDefinition | CodeBlockDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | HeadingDefinition | MediaGroupDefinition | MediaSingleDefinition | OrderedListDefinition | PanelDefinition | ParagraphDefinition | RuleDefinition | TableDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
243
+ content: Array<BlockCardDefinition | BlockquoteDefinition | BodiedExtensionWithMarksDefinition | BulletListDefinition | CodeBlockWithNoMarksDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionWithMarksDefinition | HeadingWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | PanelDefinition | ParagraphWithNoMarksDefinition | RuleDefinition | TableDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
244
244
  marks: Array<DataConsumerMark | FragmentMark | UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
245
245
  }
246
246
  export type ExtensionFrameNode = PMNode & ExtensionFrameDefinition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "37.1.27",
3
+ "version": "37.1.29",
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,7 +9,6 @@ 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
12
  'inline_comment_marker', // doesn't exist in the output
14
13
  'layoutSection_full', // doesn't match existing spec, allowUnsupportedBlock, extra marks
15
14
  'layoutSection_with_single_column', // doesn't exist in the output