@atlaskit/adf-schema 40.8.0 → 40.8.2

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
+ ## 40.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - fde250b: Unskip parsing rules to parse content of expand and nestedExpand.
8
+
9
+ ## 40.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - f515514: [ED-24281] Add new node nesting scenario to pseudo block content element, so the validator spec gets updated
14
+
3
15
  ## 40.8.0
4
16
 
5
17
  ### Minor Changes
@@ -37,6 +37,6 @@ var _unsupportedBlock = require("../nodes/unsupportedBlock");
37
37
  * - no base heading
38
38
  * - no base expand
39
39
  */
40
- var blockContentGroup = exports.blockContentGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block_content', [_blockCard.blockCard, _paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock.use('with_no_marks'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _extension.extension.use('with_marks'), _embedCard.embedCard, _table.table, _expand.expand.use('with_no_mark'), _bodiedExtension.bodiedExtension.use('with_marks'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
40
+ var blockContentGroup = exports.blockContentGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block_content', [_blockCard.blockCard, _paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock.use('with_no_marks'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule, _panel.panel, _panel.panel.use('with_nested_blockquote'), _blockquote.blockquote, _blockquote.blockquote.use('without_nested_codeblock_or_media'), _extension.extension.use('with_marks'), _embedCard.embedCard, _table.table, _expand.expand.use('without_nested_expand'), _expand.expand.use('with_no_mark'), _bodiedExtension.bodiedExtension.use('with_marks'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
41
41
  ignore: ['pm-spec', 'json-schema']
42
42
  });
@@ -36,11 +36,11 @@ var nodeSpecOptions = {
36
36
  }, {
37
37
  context: 'expand//',
38
38
  tag: '[data-node-type="expand"]',
39
- skip: true
39
+ getAttrs: getExpandAttrs
40
40
  }, {
41
41
  context: 'nestedExpand//',
42
42
  tag: '[data-node-type="expand"]',
43
- skip: true
43
+ getAttrs: getExpandAttrs
44
44
  }, {
45
45
  tag: '[data-node-type="nestedExpand"] button',
46
46
  ignore: true
@@ -19,6 +19,14 @@ var _nodeTypes = require("../../next-schema/generated/nodeTypes");
19
19
  * @name nestedExpand_with_no_marks_node
20
20
  */
21
21
 
22
+ function getExpandAttrs(domNode) {
23
+ var dom = domNode;
24
+ return {
25
+ title: dom.getAttribute('data-title'),
26
+ __expanded: true
27
+ };
28
+ }
29
+
22
30
  /**
23
31
  * @name nestedExpand
24
32
  * @description an expand that can be nested (eg. inside table, layout).
@@ -27,7 +35,7 @@ var nestedExpand = exports.nestedExpand = (0, _nodeTypes.nestedExpand)({
27
35
  parseDOM: [{
28
36
  context: 'nestedExpand//',
29
37
  tag: '[data-node-type="nestedExpand"]',
30
- skip: true
38
+ getAttrs: getExpandAttrs
31
39
  }, {
32
40
  tag: '[data-node-type="nestedExpand"] button',
33
41
  ignore: true
@@ -36,13 +44,7 @@ var nestedExpand = exports.nestedExpand = (0, _nodeTypes.nestedExpand)({
36
44
  ignore: true
37
45
  }, {
38
46
  tag: 'div[data-node-type="nestedExpand"]',
39
- getAttrs: function getAttrs(domNode) {
40
- var dom = domNode;
41
- return {
42
- title: dom.getAttribute('data-title'),
43
- __expanded: true
44
- };
45
- }
47
+ getAttrs: getExpandAttrs
46
48
  }],
47
49
  toDOM: function toDOM(node) {
48
50
  var attrs = {
@@ -1735,7 +1735,7 @@ var confluenceUnsupportedBlock = exports.confluenceUnsupportedBlock = {
1735
1735
  }
1736
1736
  }
1737
1737
  };
1738
- var block_content = exports.block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks'];
1738
+ var block_content = exports.block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'panel_with_nested_blockquote', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks'];
1739
1739
  var layoutColumn = exports.layoutColumn = {
1740
1740
  props: {
1741
1741
  type: {
@@ -1910,7 +1910,7 @@ var doc = exports.doc = {
1910
1910
  },
1911
1911
  content: {
1912
1912
  type: 'array',
1913
- items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks', 'codeBlock_with_marks', 'layoutSection_full', 'layoutSection_with_single_column', 'multiBodiedExtension', 'expand_with_breakout_mark']],
1913
+ items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'panel_with_nested_blockquote', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks', 'codeBlock_with_marks', 'layoutSection_full', 'layoutSection_with_single_column', 'multiBodiedExtension', 'expand_with_breakout_mark']],
1914
1914
  allowUnsupportedBlock: true
1915
1915
  }
1916
1916
  }
@@ -32,6 +32,6 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
32
32
  * - no base heading
33
33
  * - no base expand
34
34
  */
35
- export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, table, expand.use('with_no_mark'), bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
35
+ export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, panel.use('with_nested_blockquote'), blockquote, blockquote.use('without_nested_codeblock_or_media'), extension.use('with_marks'), embedCard, table, expand.use('without_nested_expand'), expand.use('with_no_mark'), bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
36
36
  ignore: ['pm-spec', 'json-schema']
37
37
  });
@@ -27,11 +27,11 @@ const nodeSpecOptions = {
27
27
  }, {
28
28
  context: 'expand//',
29
29
  tag: '[data-node-type="expand"]',
30
- skip: true
30
+ getAttrs: getExpandAttrs
31
31
  }, {
32
32
  context: 'nestedExpand//',
33
33
  tag: '[data-node-type="expand"]',
34
- skip: true
34
+ getAttrs: getExpandAttrs
35
35
  }, {
36
36
  tag: '[data-node-type="nestedExpand"] button',
37
37
  ignore: true
@@ -14,6 +14,14 @@ import { nestedExpand as nestedExpandFactory } from '../../next-schema/generated
14
14
  * @name nestedExpand_with_no_marks_node
15
15
  */
16
16
 
17
+ function getExpandAttrs(domNode) {
18
+ const dom = domNode;
19
+ return {
20
+ title: dom.getAttribute('data-title'),
21
+ __expanded: true
22
+ };
23
+ }
24
+
17
25
  /**
18
26
  * @name nestedExpand
19
27
  * @description an expand that can be nested (eg. inside table, layout).
@@ -22,7 +30,7 @@ export const nestedExpand = nestedExpandFactory({
22
30
  parseDOM: [{
23
31
  context: 'nestedExpand//',
24
32
  tag: '[data-node-type="nestedExpand"]',
25
- skip: true
33
+ getAttrs: getExpandAttrs
26
34
  }, {
27
35
  tag: '[data-node-type="nestedExpand"] button',
28
36
  ignore: true
@@ -31,13 +39,7 @@ export const nestedExpand = nestedExpandFactory({
31
39
  ignore: true
32
40
  }, {
33
41
  tag: 'div[data-node-type="nestedExpand"]',
34
- getAttrs: domNode => {
35
- const dom = domNode;
36
- return {
37
- title: dom.getAttribute('data-title'),
38
- __expanded: true
39
- };
40
- }
42
+ getAttrs: getExpandAttrs
41
43
  }],
42
44
  toDOM(node) {
43
45
  const attrs = {
@@ -1728,7 +1728,7 @@ export const confluenceUnsupportedBlock = {
1728
1728
  }
1729
1729
  }
1730
1730
  };
1731
- export const block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks'];
1731
+ export const block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'panel_with_nested_blockquote', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks'];
1732
1732
  export const layoutColumn = {
1733
1733
  props: {
1734
1734
  type: {
@@ -1903,7 +1903,7 @@ export const doc = {
1903
1903
  },
1904
1904
  content: {
1905
1905
  type: 'array',
1906
- items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks', 'codeBlock_with_marks', 'layoutSection_full', 'layoutSection_with_single_column', 'multiBodiedExtension', 'expand_with_breakout_mark']],
1906
+ items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'panel_with_nested_blockquote', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks', 'codeBlock_with_marks', 'layoutSection_full', 'layoutSection_with_single_column', 'multiBodiedExtension', 'expand_with_breakout_mark']],
1907
1907
  allowUnsupportedBlock: true
1908
1908
  }
1909
1909
  }
@@ -32,6 +32,6 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
32
32
  * - no base heading
33
33
  * - no base expand
34
34
  */
35
- export var blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, table, expand.use('with_no_mark'), bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
35
+ export var blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, panel.use('with_nested_blockquote'), blockquote, blockquote.use('without_nested_codeblock_or_media'), extension.use('with_marks'), embedCard, table, expand.use('without_nested_expand'), expand.use('with_no_mark'), bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
36
36
  ignore: ['pm-spec', 'json-schema']
37
37
  });
@@ -30,11 +30,11 @@ var nodeSpecOptions = {
30
30
  }, {
31
31
  context: 'expand//',
32
32
  tag: '[data-node-type="expand"]',
33
- skip: true
33
+ getAttrs: getExpandAttrs
34
34
  }, {
35
35
  context: 'nestedExpand//',
36
36
  tag: '[data-node-type="expand"]',
37
- skip: true
37
+ getAttrs: getExpandAttrs
38
38
  }, {
39
39
  tag: '[data-node-type="nestedExpand"] button',
40
40
  ignore: true
@@ -14,6 +14,14 @@ import { nestedExpand as nestedExpandFactory } from '../../next-schema/generated
14
14
  * @name nestedExpand_with_no_marks_node
15
15
  */
16
16
 
17
+ function getExpandAttrs(domNode) {
18
+ var dom = domNode;
19
+ return {
20
+ title: dom.getAttribute('data-title'),
21
+ __expanded: true
22
+ };
23
+ }
24
+
17
25
  /**
18
26
  * @name nestedExpand
19
27
  * @description an expand that can be nested (eg. inside table, layout).
@@ -22,7 +30,7 @@ export var nestedExpand = nestedExpandFactory({
22
30
  parseDOM: [{
23
31
  context: 'nestedExpand//',
24
32
  tag: '[data-node-type="nestedExpand"]',
25
- skip: true
33
+ getAttrs: getExpandAttrs
26
34
  }, {
27
35
  tag: '[data-node-type="nestedExpand"] button',
28
36
  ignore: true
@@ -31,13 +39,7 @@ export var nestedExpand = nestedExpandFactory({
31
39
  ignore: true
32
40
  }, {
33
41
  tag: 'div[data-node-type="nestedExpand"]',
34
- getAttrs: function getAttrs(domNode) {
35
- var dom = domNode;
36
- return {
37
- title: dom.getAttribute('data-title'),
38
- __expanded: true
39
- };
40
- }
42
+ getAttrs: getExpandAttrs
41
43
  }],
42
44
  toDOM: function toDOM(node) {
43
45
  var attrs = {
@@ -1728,7 +1728,7 @@ export var confluenceUnsupportedBlock = {
1728
1728
  }
1729
1729
  }
1730
1730
  };
1731
- export var block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks'];
1731
+ export var block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'panel_with_nested_blockquote', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks'];
1732
1732
  export var layoutColumn = {
1733
1733
  props: {
1734
1734
  type: {
@@ -1903,7 +1903,7 @@ export var doc = {
1903
1903
  },
1904
1904
  content: {
1905
1905
  type: 'array',
1906
- items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks', 'codeBlock_with_marks', 'layoutSection_full', 'layoutSection_with_single_column', 'multiBodiedExtension', 'expand_with_breakout_mark']],
1906
+ items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'panel_with_nested_blockquote', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks', 'codeBlock_with_marks', 'layoutSection_full', 'layoutSection_with_single_column', 'multiBodiedExtension', 'expand_with_breakout_mark']],
1907
1907
  allowUnsupportedBlock: true
1908
1908
  }
1909
1909
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "40.8.0",
3
+ "version": "40.8.2",
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/"