@atlaskit/adf-schema 51.3.1 → 51.4.0

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
+ ## 51.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b76eeec: EDITOR-2752 update BodiedSyncBlockDefinition to be an isolating node
8
+
9
+ ## 51.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - fbb3b5f: EDITOR-2443 Fix order of node types under bodied sync block to ensure paragraph is first
14
+
3
15
  ## 51.3.1
4
16
 
5
17
  ### Patch Changes
@@ -130,7 +130,7 @@ var bodiedExtensionWithMarks = exports.bodiedExtensionWithMarks = (0, _createPMS
130
130
  isolating: true
131
131
  });
132
132
  var bodiedSyncBlockStage0 = exports.bodiedSyncBlockStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
133
- content: '(blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | paragraph | rule | table | taskList | unsupportedBlock)+',
133
+ content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | rule | table | taskList | unsupportedBlock)+',
134
134
  marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation breakout link fragment',
135
135
  attrs: {
136
136
  resourceId: {
@@ -140,7 +140,8 @@ var bodiedSyncBlockStage0 = exports.bodiedSyncBlockStage0 = (0, _createPMSpecFac
140
140
  default: ''
141
141
  }
142
142
  },
143
- selectable: true
143
+ selectable: true,
144
+ isolating: true
144
145
  });
145
146
  var bulletList = exports.bulletList = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
146
147
  content: 'listItem+',
@@ -29,6 +29,7 @@ var _layoutSection = require("./layoutSection");
29
29
  var bodiedSyncBlock = exports.bodiedSyncBlock = (0, _adfSchemaGenerator.adfNode)('bodiedSyncBlock').define({
30
30
  stage0: true,
31
31
  selectable: true,
32
+ isolating: true,
32
33
  marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
33
34
  attrs: {
34
35
  resourceId: {
@@ -40,7 +41,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = (0, _adfSchemaGenerator.adfNode)
40
41
  default: ''
41
42
  }
42
43
  },
43
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockCard.blockCard, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _list.bulletList, _codeBlock.codeBlock, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _decisionList.decisionList, _embedCard.embedCard, _expand.expand, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _layoutSection.layoutSection, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _list.orderedList, _panel.panel, _paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _rule.rule, _tableNodes.table,
44
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _blockCard.blockCard, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _list.bulletList, _codeBlock.codeBlock, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _decisionList.decisionList, _embedCard.embedCard, _expand.expand, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _layoutSection.layoutSection, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _list.orderedList, _panel.panel, _rule.rule, _tableNodes.table,
44
45
  // @ts-expect-error - types don't deal well with circular references for the variant
45
46
  _tableNodes.table.use('with_nested_table'), _task.taskList, _unsupportedBlock.unsupportedBlock))]
46
47
  });
@@ -258,7 +258,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = {
258
258
  },
259
259
  content: {
260
260
  type: 'array',
261
- items: [['blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'rule', 'table', 'taskList']],
261
+ items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'rule', 'table', 'taskList']],
262
262
  minItems: 1,
263
263
  allowUnsupportedBlock: true
264
264
  },
@@ -124,7 +124,7 @@ export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
124
124
  isolating: true
125
125
  });
126
126
  export const bodiedSyncBlockStage0 = createPMNodeSpecFactory({
127
- content: '(blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | paragraph | rule | table | taskList | unsupportedBlock)+',
127
+ content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | rule | table | taskList | unsupportedBlock)+',
128
128
  marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation breakout link fragment',
129
129
  attrs: {
130
130
  resourceId: {
@@ -134,7 +134,8 @@ export const bodiedSyncBlockStage0 = createPMNodeSpecFactory({
134
134
  default: ''
135
135
  }
136
136
  },
137
- selectable: true
137
+ selectable: true,
138
+ isolating: true
138
139
  });
139
140
  export const bulletList = createPMNodeSpecFactory({
140
141
  content: 'listItem+',
@@ -23,6 +23,7 @@ import { layoutSection } from './layoutSection';
23
23
  export const bodiedSyncBlock = adfNode('bodiedSyncBlock').define({
24
24
  stage0: true,
25
25
  selectable: true,
26
+ isolating: true,
26
27
  marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
27
28
  attrs: {
28
29
  resourceId: {
@@ -34,7 +35,7 @@ export const bodiedSyncBlock = adfNode('bodiedSyncBlock').define({
34
35
  default: ''
35
36
  }
36
37
  },
37
- content: [$onePlus($or(blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), rule, table,
38
+ content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, rule, table,
38
39
  // @ts-expect-error - types don't deal well with circular references for the variant
39
40
  table.use('with_nested_table'), taskList, unsupportedBlock))]
40
41
  });
@@ -252,7 +252,7 @@ export const bodiedSyncBlock = {
252
252
  },
253
253
  content: {
254
254
  type: 'array',
255
- items: [['blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'rule', 'table', 'taskList']],
255
+ items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'rule', 'table', 'taskList']],
256
256
  minItems: 1,
257
257
  allowUnsupportedBlock: true
258
258
  },
@@ -124,7 +124,7 @@ export var bodiedExtensionWithMarks = createPMNodeSpecFactory({
124
124
  isolating: true
125
125
  });
126
126
  export var bodiedSyncBlockStage0 = createPMNodeSpecFactory({
127
- content: '(blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | paragraph | rule | table | taskList | unsupportedBlock)+',
127
+ content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | rule | table | taskList | unsupportedBlock)+',
128
128
  marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation breakout link fragment',
129
129
  attrs: {
130
130
  resourceId: {
@@ -134,7 +134,8 @@ export var bodiedSyncBlockStage0 = createPMNodeSpecFactory({
134
134
  default: ''
135
135
  }
136
136
  },
137
- selectable: true
137
+ selectable: true,
138
+ isolating: true
138
139
  });
139
140
  export var bulletList = createPMNodeSpecFactory({
140
141
  content: 'listItem+',
@@ -23,6 +23,7 @@ import { layoutSection } from './layoutSection';
23
23
  export var bodiedSyncBlock = adfNode('bodiedSyncBlock').define({
24
24
  stage0: true,
25
25
  selectable: true,
26
+ isolating: true,
26
27
  marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
27
28
  attrs: {
28
29
  resourceId: {
@@ -34,7 +35,7 @@ export var bodiedSyncBlock = adfNode('bodiedSyncBlock').define({
34
35
  default: ''
35
36
  }
36
37
  },
37
- content: [$onePlus($or(blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), rule, table,
38
+ content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, rule, table,
38
39
  // @ts-expect-error - types don't deal well with circular references for the variant
39
40
  table.use('with_nested_table'), taskList, unsupportedBlock))]
40
41
  });
@@ -252,7 +252,7 @@ export var bodiedSyncBlock = {
252
252
  },
253
253
  content: {
254
254
  type: 'array',
255
- items: [['blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'rule', 'table', 'taskList']],
255
+ items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'rule', 'table', 'taskList']],
256
256
  minItems: 1,
257
257
  allowUnsupportedBlock: true
258
258
  },
@@ -432,6 +432,18 @@
432
432
  "type": "array",
433
433
  "items": {
434
434
  "anyOf": [
435
+ {
436
+ "$ref": "#/definitions/paragraph_node"
437
+ },
438
+ {
439
+ "$ref": "#/definitions/paragraph_with_alignment_node"
440
+ },
441
+ {
442
+ "$ref": "#/definitions/paragraph_with_indentation_node"
443
+ },
444
+ {
445
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
446
+ },
435
447
  {
436
448
  "$ref": "#/definitions/blockCard_node"
437
449
  },
@@ -486,18 +498,6 @@
486
498
  {
487
499
  "$ref": "#/definitions/panel_node"
488
500
  },
489
- {
490
- "$ref": "#/definitions/paragraph_node"
491
- },
492
- {
493
- "$ref": "#/definitions/paragraph_with_alignment_node"
494
- },
495
- {
496
- "$ref": "#/definitions/paragraph_with_indentation_node"
497
- },
498
- {
499
- "$ref": "#/definitions/paragraph_with_no_marks_node"
500
- },
501
501
  {
502
502
  "$ref": "#/definitions/rule_node"
503
503
  },
@@ -39,6 +39,6 @@ export interface BodiedSyncBlockDefinition {
39
39
  * @minItems 1
40
40
  * @allowUnsupportedBlock true
41
41
  */
42
- content: Array<BlockCard | Blockquote | BulletList | CodeBlock | DecisionList | EmbedCard | Expand | Heading | HeadingWithMarks | LayoutSection | MediaGroup | MediaSingle | OrderedList | Panel | Paragraph | ParagraphWithMarks | Rule | Table | TaskList>;
42
+ content: Array<Paragraph | ParagraphWithMarks | BlockCard | Blockquote | BulletList | CodeBlock | DecisionList | EmbedCard | Expand | Heading | HeadingWithMarks | LayoutSection | MediaGroup | MediaSingle | OrderedList | Panel | Rule | Table | TaskList>;
43
43
  }
44
44
  export declare const bodiedSyncBlock: import("prosemirror-model").NodeSpec;
@@ -432,6 +432,18 @@
432
432
  "type": "array",
433
433
  "items": {
434
434
  "anyOf": [
435
+ {
436
+ "$ref": "#/definitions/paragraph_node"
437
+ },
438
+ {
439
+ "$ref": "#/definitions/paragraph_with_alignment_node"
440
+ },
441
+ {
442
+ "$ref": "#/definitions/paragraph_with_indentation_node"
443
+ },
444
+ {
445
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
446
+ },
435
447
  {
436
448
  "$ref": "#/definitions/blockCard_node"
437
449
  },
@@ -486,18 +498,6 @@
486
498
  {
487
499
  "$ref": "#/definitions/panel_node"
488
500
  },
489
- {
490
- "$ref": "#/definitions/paragraph_node"
491
- },
492
- {
493
- "$ref": "#/definitions/paragraph_with_alignment_node"
494
- },
495
- {
496
- "$ref": "#/definitions/paragraph_with_indentation_node"
497
- },
498
- {
499
- "$ref": "#/definitions/paragraph_with_no_marks_node"
500
- },
501
501
  {
502
502
  "$ref": "#/definitions/rule_node"
503
503
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "51.3.1",
3
+ "version": "51.4.0",
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/"