@atlaskit/adf-schema 50.0.0 → 50.1.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +6 -0
  3. package/dist/cjs/next-schema/generated/nodeTypes.js +16 -2
  4. package/dist/cjs/next-schema/nodes/task.js +19 -5
  5. package/dist/cjs/schema/default-schema.js +2 -1
  6. package/dist/cjs/schema/index.js +6 -0
  7. package/dist/cjs/schema/nodes/index.js +6 -0
  8. package/dist/cjs/schema/nodes/task-item.js +26 -1
  9. package/dist/cjs/steps/types.js +5 -0
  10. package/dist/cjs/validator-schema/generated/validatorSpec.js +27 -2
  11. package/dist/es2019/index.js +1 -1
  12. package/dist/es2019/next-schema/generated/nodeTypes.js +15 -1
  13. package/dist/es2019/next-schema/nodes/task.js +15 -3
  14. package/dist/es2019/schema/default-schema.js +3 -2
  15. package/dist/es2019/schema/index.js +1 -1
  16. package/dist/es2019/schema/nodes/index.js +1 -1
  17. package/dist/es2019/schema/nodes/task-item.js +25 -1
  18. package/dist/es2019/steps/types.js +1 -0
  19. package/dist/es2019/validator-schema/generated/validatorSpec.js +26 -1
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/next-schema/generated/nodeTypes.js +15 -1
  22. package/dist/esm/next-schema/nodes/task.js +17 -4
  23. package/dist/esm/schema/default-schema.js +3 -2
  24. package/dist/esm/schema/index.js +1 -1
  25. package/dist/esm/schema/nodes/index.js +1 -1
  26. package/dist/esm/schema/nodes/task-item.js +26 -1
  27. package/dist/esm/steps/types.js +1 -0
  28. package/dist/esm/validator-schema/generated/validatorSpec.js +26 -1
  29. package/dist/json-schema/v1/stage-0.json +60 -1
  30. package/dist/types/index.d.ts +1 -1
  31. package/dist/types/next-schema/generated/nodeTypes.d.ts +12 -1
  32. package/dist/types/next-schema/groups/tableCellContentPseudoGroup.d.ts +3 -3
  33. package/dist/types/next-schema/nodes/task.d.ts +1 -0
  34. package/dist/types/schema/index.d.ts +1 -1
  35. package/dist/types/schema/nodes/index.d.ts +1 -1
  36. package/dist/types/schema/nodes/task-item.d.ts +1 -0
  37. package/dist/types/steps/override-document-step.d.ts +2 -3
  38. package/dist/types/steps/types.d.ts +96 -0
  39. package/dist/types/validator-schema/generated/validatorSpec.d.ts +26 -1
  40. package/json-schema/v1/stage-0.json +60 -1
  41. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 50.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8df84f2: EDITOR-1124 Adds `blockTaskItem` element to `taskList` which allows block content children of task items. Initially only paragraph and extension elements are allowed, as this change is to facilitate migration from TinyMCE to cloud editor in Confluence. To do so we need to support the Legacy Content Extension (LCE) in task items, with unsupported content in task items in TinyMCE simply being wrapped with the LCE and adopting `blockTaskItem` instead of `taskItem`
8
+
9
+ ## 50.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 866c567: Improve typing for overrideDocumentStepJSON
14
+
3
15
  ## 50.0.0
4
16
 
5
17
  ### Major Changes
package/dist/cjs/index.js CHANGED
@@ -351,6 +351,12 @@ Object.defineProperty(exports, "blockCardWithLocalId", {
351
351
  return _schema.blockCardWithLocalId;
352
352
  }
353
353
  });
354
+ Object.defineProperty(exports, "blockTaskItemStage0", {
355
+ enumerable: true,
356
+ get: function get() {
357
+ return _schema.blockTaskItemStage0;
358
+ }
359
+ });
354
360
  Object.defineProperty(exports, "blockquote", {
355
361
  enumerable: true,
356
362
  get: function get() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemWithNestedDecisionStage0 = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandRootOnly = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
6
+ exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemWithNestedDecisionStage0 = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandRootOnly = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockTaskItemStage0 = exports.blockCard = void 0;
7
7
  var _createPMSpecFactory = require("../../schema/createPMSpecFactory");
8
8
  /**
9
9
  * This file was automatically generated by @atlaskit/adf-schema-generator
@@ -60,6 +60,20 @@ var blockquoteLegacy = exports.blockquoteLegacy = (0, _createPMSpecFactory.creat
60
60
  selectable: true,
61
61
  defining: true
62
62
  });
63
+ var blockTaskItemStage0 = exports.blockTaskItemStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
64
+ content: '(paragraph | extension) (paragraph | extension)*',
65
+ marks: '_',
66
+ attrs: {
67
+ localId: {
68
+ default: ''
69
+ },
70
+ state: {
71
+ default: 'TODO'
72
+ }
73
+ },
74
+ selectable: false,
75
+ defining: true
76
+ });
63
77
  var bodiedExtension = exports.bodiedExtension = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
64
78
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
65
79
  marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
@@ -1271,7 +1285,7 @@ var taskItem = exports.taskItem = (0, _createPMSpecFactory.createPMNodeSpecFacto
1271
1285
  defining: true
1272
1286
  });
1273
1287
  var taskList = exports.taskList = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
1274
- content: '(taskItem | unsupportedBlock)+ (taskItem | taskList | unsupportedBlock)*',
1288
+ content: '(taskItem | unsupportedBlock | blockTaskItem)+ (taskItem | taskList | unsupportedBlock | blockTaskItem)*',
1275
1289
  marks: 'unsupportedMark unsupportedNodeAttribute',
1276
1290
  group: 'block',
1277
1291
  attrs: {
@@ -1,18 +1,25 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.taskList = exports.taskItem = void 0;
7
+ exports.taskList = exports.taskItem = exports.blockTaskItem = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
7
9
  var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
8
10
  var _inlineContentGroup = require("../groups/inlineContentGroup");
9
11
  var _inlineGroup = require("../groups/inlineGroup");
10
12
  var _unsupportedMark = require("../marks/unsupportedMark");
11
13
  var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
12
14
  var _unsupportedBlock = require("./unsupportedBlock");
15
+ var _paragraph = require("./paragraph");
16
+ var _extension = require("./extension");
17
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
19
  var taskItem = exports.taskItem = (0, _adfSchemaGenerator.adfNode)('taskItem');
14
20
  var taskList = exports.taskList = (0, _adfSchemaGenerator.adfNode)('taskList');
15
- taskItem.define({
21
+ var blockTaskItem = exports.blockTaskItem = (0, _adfSchemaGenerator.adfNode)('blockTaskItem');
22
+ var commonTaskItemProps = {
16
23
  defining: true,
17
24
  selectable: false,
18
25
  marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
@@ -27,9 +34,16 @@ taskItem.define({
27
34
  values: ['TODO', 'DONE'],
28
35
  default: 'TODO'
29
36
  }
30
- },
37
+ }
38
+ };
39
+ taskItem.define(_objectSpread(_objectSpread({}, commonTaskItemProps), {}, {
31
40
  content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup, _inlineContentGroup.inlineContentGroup))]
32
- });
41
+ }));
42
+ blockTaskItem.define(_objectSpread(_objectSpread({}, commonTaskItemProps), {}, {
43
+ contentMinItems: 1,
44
+ content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _extension.extension.use('with_marks')), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _extension.extension.use('with_marks')))],
45
+ stage0: true
46
+ }));
33
47
  taskList.define({
34
48
  defining: true,
35
49
  selectable: false,
@@ -41,5 +55,5 @@ taskList.define({
41
55
  }
42
56
  },
43
57
  contentMinItems: 1,
44
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(taskItem, _unsupportedBlock.unsupportedBlock)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(taskItem, taskList, _unsupportedBlock.unsupportedBlock))]
58
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(taskItem, _unsupportedBlock.unsupportedBlock, blockTaskItem)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(taskItem, taskList, _unsupportedBlock.unsupportedBlock, blockTaskItem))]
45
59
  });
@@ -31,7 +31,8 @@ var getSchemaBasedOnStage = exports.getSchemaBasedOnStage = (0, _memoizeOne.defa
31
31
  table: _nodes.tableWithNestedTable,
32
32
  tableRow: _nodes.tableRowWithNestedTable,
33
33
  tableCell: _nodes.tableCellWithNestedTable,
34
- tableHeader: _nodes.tableHeaderWithNestedTable
34
+ tableHeader: _nodes.tableHeaderWithNestedTable,
35
+ blockTaskItem: _nodes.blockTaskItemStage0
35
36
  };
36
37
  }
37
38
  return (0, _createSchema.createSchema)(defaultSchemaConfig);
@@ -69,6 +69,12 @@ Object.defineProperty(exports, "blockCardWithLocalId", {
69
69
  return _nodes.blockCardWithLocalId;
70
70
  }
71
71
  });
72
+ Object.defineProperty(exports, "blockTaskItemStage0", {
73
+ enumerable: true,
74
+ get: function get() {
75
+ return _nodes.blockTaskItemStage0;
76
+ }
77
+ });
72
78
  Object.defineProperty(exports, "blockquote", {
73
79
  enumerable: true,
74
80
  get: function get() {
@@ -22,6 +22,12 @@ Object.defineProperty(exports, "blockCardWithLocalId", {
22
22
  return _blockCard.blockCardWithLocalId;
23
23
  }
24
24
  });
25
+ Object.defineProperty(exports, "blockTaskItemStage0", {
26
+ enumerable: true,
27
+ get: function get() {
28
+ return _taskItem.blockTaskItemStage0;
29
+ }
30
+ });
25
31
  Object.defineProperty(exports, "blockquote", {
26
32
  enumerable: true,
27
33
  get: function get() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.taskItem = void 0;
6
+ exports.taskItem = exports.blockTaskItemStage0 = void 0;
7
7
  var _uuid = require("../../utils/uuid");
8
8
  var _nodeTypes = require("../../next-schema/generated/nodeTypes");
9
9
  /**
@@ -33,4 +33,29 @@ var taskItem = exports.taskItem = (0, _nodeTypes.taskItem)({
33
33
  };
34
34
  return ['div', attrs, 0];
35
35
  }
36
+ });
37
+ var blockTaskItemStage0 = exports.blockTaskItemStage0 = (0, _nodeTypes.blockTaskItemStage0)({
38
+ parseDOM: [{
39
+ tag: 'div[data-task-is-block]',
40
+ // Default priority is 50. We normally don't change this but since this node type is
41
+ // also used by list-item we need to make sure that we run this parser first.
42
+ priority: 100,
43
+ getAttrs: function getAttrs(dom) {
44
+ return {
45
+ localId: _uuid.uuid.generate(),
46
+ state: dom.getAttribute('data-task-state') || 'TODO'
47
+ };
48
+ }
49
+ }],
50
+ toDOM: function toDOM(node) {
51
+ var _node$attrs2 = node.attrs,
52
+ localId = _node$attrs2.localId,
53
+ state = _node$attrs2.state;
54
+ var attrs = {
55
+ 'data-task-local-id': localId || 'local-task',
56
+ 'data-task-state': state || 'TODO',
57
+ 'data-task-is-block': 'true'
58
+ };
59
+ return ['div', attrs, 0];
60
+ }
36
61
  });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.underline = exports.text_with_no_marks = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_nested_decision = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_root_only = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
6
+ exports.underline = exports.text_with_no_marks = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_nested_decision = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_root_only = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockTaskItem = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
7
7
  var alignment = exports.alignment = {
8
8
  props: {
9
9
  type: {
@@ -157,6 +157,31 @@ var blockquote = exports.blockquote = {
157
157
  }
158
158
  };
159
159
  var blockRootOnly = exports.blockRootOnly = ['multiBodiedExtension'];
160
+ var blockTaskItem = exports.blockTaskItem = {
161
+ props: {
162
+ type: {
163
+ type: 'enum',
164
+ values: ['blockTaskItem']
165
+ },
166
+ attrs: {
167
+ props: {
168
+ localId: {
169
+ type: 'string'
170
+ },
171
+ state: {
172
+ type: 'enum',
173
+ values: ['TODO', 'DONE']
174
+ }
175
+ }
176
+ },
177
+ content: {
178
+ type: 'array',
179
+ isTupleLike: true,
180
+ items: [['paragraph_with_no_marks', 'extension_with_marks'], ['paragraph_with_no_marks', 'extension_with_marks']],
181
+ minItems: 1
182
+ }
183
+ }
184
+ };
160
185
  var bodiedExtension = exports.bodiedExtension = {
161
186
  props: {
162
187
  type: {
@@ -1805,7 +1830,7 @@ var taskList = exports.taskList = {
1805
1830
  content: {
1806
1831
  type: 'array',
1807
1832
  isTupleLike: true,
1808
- items: ['taskItem', ['taskItem', 'taskList']],
1833
+ items: [['taskItem', 'blockTaskItem'], ['taskItem', 'taskList', 'blockTaskItem']],
1809
1834
  minItems: 1,
1810
1835
  allowUnsupportedBlock: true
1811
1836
  }
@@ -1,5 +1,5 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItemStage0, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './schema';
3
3
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
4
4
 
5
5
  // ADF createPMSpecFactory
@@ -54,6 +54,20 @@ export const blockquoteLegacy = createPMNodeSpecFactory({
54
54
  selectable: true,
55
55
  defining: true
56
56
  });
57
+ export const blockTaskItemStage0 = createPMNodeSpecFactory({
58
+ content: '(paragraph | extension) (paragraph | extension)*',
59
+ marks: '_',
60
+ attrs: {
61
+ localId: {
62
+ default: ''
63
+ },
64
+ state: {
65
+ default: 'TODO'
66
+ }
67
+ },
68
+ selectable: false,
69
+ defining: true
70
+ });
57
71
  export const bodiedExtension = createPMNodeSpecFactory({
58
72
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
59
73
  marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
@@ -1265,7 +1279,7 @@ export const taskItem = createPMNodeSpecFactory({
1265
1279
  defining: true
1266
1280
  });
1267
1281
  export const taskList = createPMNodeSpecFactory({
1268
- content: '(taskItem | unsupportedBlock)+ (taskItem | taskList | unsupportedBlock)*',
1282
+ content: '(taskItem | unsupportedBlock | blockTaskItem)+ (taskItem | taskList | unsupportedBlock | blockTaskItem)*',
1269
1283
  marks: 'unsupportedMark unsupportedNodeAttribute',
1270
1284
  group: 'block',
1271
1285
  attrs: {
@@ -4,9 +4,12 @@ import { inlineGroup } from '../groups/inlineGroup';
4
4
  import { unsupportedMark } from '../marks/unsupportedMark';
5
5
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
6
6
  import { unsupportedBlock } from './unsupportedBlock';
7
+ import { paragraph } from './paragraph';
8
+ import { extension } from './extension';
7
9
  export const taskItem = adfNode('taskItem');
8
10
  export const taskList = adfNode('taskList');
9
- taskItem.define({
11
+ export const blockTaskItem = adfNode('blockTaskItem');
12
+ const commonTaskItemProps = {
10
13
  defining: true,
11
14
  selectable: false,
12
15
  marks: [unsupportedMark, unsupportedNodeAttribute],
@@ -21,9 +24,18 @@ taskItem.define({
21
24
  values: ['TODO', 'DONE'],
22
25
  default: 'TODO'
23
26
  }
24
- },
27
+ }
28
+ };
29
+ taskItem.define({
30
+ ...commonTaskItemProps,
25
31
  content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
26
32
  });
33
+ blockTaskItem.define({
34
+ ...commonTaskItemProps,
35
+ contentMinItems: 1,
36
+ content: [$or(paragraph.use('with_no_marks'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), extension.use('with_marks')))],
37
+ stage0: true
38
+ });
27
39
  taskList.define({
28
40
  defining: true,
29
41
  selectable: false,
@@ -35,5 +47,5 @@ taskList.define({
35
47
  }
36
48
  },
37
49
  contentMinItems: 1,
38
- content: [$onePlus($or(taskItem, unsupportedBlock)), $zeroPlus($or(taskItem, taskList, unsupportedBlock))]
50
+ content: [$onePlus($or(taskItem, unsupportedBlock, blockTaskItem)), $zeroPlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
39
51
  });
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithDecisionStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithDecisionStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, blockTaskItemStage0 } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  const getDefaultSchemaConfig = () => {
5
5
  const defaultSchemaConfig = {
@@ -23,7 +23,8 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
23
23
  table: tableWithNestedTable,
24
24
  tableRow: tableRowWithNestedTable,
25
25
  tableCell: tableCellWithNestedTable,
26
- tableHeader: tableHeaderWithNestedTable
26
+ tableHeader: tableHeaderWithNestedTable,
27
+ blockTaskItem: blockTaskItemStage0
27
28
  };
28
29
  }
29
30
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './nodes';
1
+ export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './nodes';
2
2
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
3
  colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext } from './marks';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -27,7 +27,7 @@ export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNest
27
27
  export { decisionList, decisionListSelector } from './decision-list';
28
28
  export { decisionItem } from './decision-item';
29
29
  export { taskList, taskListSelector } from './task-list';
30
- export { taskItem } from './task-item';
30
+ export { taskItem, blockTaskItemStage0 } from './task-item';
31
31
  export { date, dateWithLocalId } from './date';
32
32
  export { placeholder, placeholderWithLocalId } from './placeholder';
33
33
  export { layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId } from './layout-section';
@@ -1,5 +1,5 @@
1
1
  import { uuid } from '../../utils/uuid';
2
- import { taskItem as taskItemFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { taskItem as taskItemFactory, blockTaskItemStage0 as blockTaskItemFactory } from '../../next-schema/generated/nodeTypes';
3
3
 
4
4
  /**
5
5
  * @name taskItem_node
@@ -27,4 +27,28 @@ export const taskItem = taskItemFactory({
27
27
  };
28
28
  return ['div', attrs, 0];
29
29
  }
30
+ });
31
+ export const blockTaskItemStage0 = blockTaskItemFactory({
32
+ parseDOM: [{
33
+ tag: 'div[data-task-is-block]',
34
+ // Default priority is 50. We normally don't change this but since this node type is
35
+ // also used by list-item we need to make sure that we run this parser first.
36
+ priority: 100,
37
+ getAttrs: dom => ({
38
+ localId: uuid.generate(),
39
+ state: dom.getAttribute('data-task-state') || 'TODO'
40
+ })
41
+ }],
42
+ toDOM(node) {
43
+ const {
44
+ localId,
45
+ state
46
+ } = node.attrs;
47
+ const attrs = {
48
+ 'data-task-local-id': localId || 'local-task',
49
+ 'data-task-state': state || 'TODO',
50
+ 'data-task-is-block': 'true'
51
+ };
52
+ return ['div', attrs, 0];
53
+ }
30
54
  });
@@ -0,0 +1 @@
1
+ export {};
@@ -151,6 +151,31 @@ export const blockquote = {
151
151
  }
152
152
  };
153
153
  export const blockRootOnly = ['multiBodiedExtension'];
154
+ export const blockTaskItem = {
155
+ props: {
156
+ type: {
157
+ type: 'enum',
158
+ values: ['blockTaskItem']
159
+ },
160
+ attrs: {
161
+ props: {
162
+ localId: {
163
+ type: 'string'
164
+ },
165
+ state: {
166
+ type: 'enum',
167
+ values: ['TODO', 'DONE']
168
+ }
169
+ }
170
+ },
171
+ content: {
172
+ type: 'array',
173
+ isTupleLike: true,
174
+ items: [['paragraph_with_no_marks', 'extension_with_marks'], ['paragraph_with_no_marks', 'extension_with_marks']],
175
+ minItems: 1
176
+ }
177
+ }
178
+ };
154
179
  export const bodiedExtension = {
155
180
  props: {
156
181
  type: {
@@ -1799,7 +1824,7 @@ export const taskList = {
1799
1824
  content: {
1800
1825
  type: 'array',
1801
1826
  isTupleLike: true,
1802
- items: ['taskItem', ['taskItem', 'taskList']],
1827
+ items: [['taskItem', 'blockTaskItem'], ['taskItem', 'taskList', 'blockTaskItem']],
1803
1828
  minItems: 1,
1804
1829
  allowUnsupportedBlock: true
1805
1830
  }
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItemStage0, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './schema';
3
3
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
4
4
 
5
5
  // ADF createPMSpecFactory
@@ -54,6 +54,20 @@ export var blockquoteLegacy = createPMNodeSpecFactory({
54
54
  selectable: true,
55
55
  defining: true
56
56
  });
57
+ export var blockTaskItemStage0 = createPMNodeSpecFactory({
58
+ content: '(paragraph | extension) (paragraph | extension)*',
59
+ marks: '_',
60
+ attrs: {
61
+ localId: {
62
+ default: ''
63
+ },
64
+ state: {
65
+ default: 'TODO'
66
+ }
67
+ },
68
+ selectable: false,
69
+ defining: true
70
+ });
57
71
  export var bodiedExtension = createPMNodeSpecFactory({
58
72
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
59
73
  marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
@@ -1265,7 +1279,7 @@ export var taskItem = createPMNodeSpecFactory({
1265
1279
  defining: true
1266
1280
  });
1267
1281
  export var taskList = createPMNodeSpecFactory({
1268
- content: '(taskItem | unsupportedBlock)+ (taskItem | taskList | unsupportedBlock)*',
1282
+ content: '(taskItem | unsupportedBlock | blockTaskItem)+ (taskItem | taskList | unsupportedBlock | blockTaskItem)*',
1269
1283
  marks: 'unsupportedMark unsupportedNodeAttribute',
1270
1284
  group: 'block',
1271
1285
  attrs: {
@@ -1,12 +1,18 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
4
  import { $onePlus, $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
5
  import { inlineContentGroup } from '../groups/inlineContentGroup';
3
6
  import { inlineGroup } from '../groups/inlineGroup';
4
7
  import { unsupportedMark } from '../marks/unsupportedMark';
5
8
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
6
9
  import { unsupportedBlock } from './unsupportedBlock';
10
+ import { paragraph } from './paragraph';
11
+ import { extension } from './extension';
7
12
  export var taskItem = adfNode('taskItem');
8
13
  export var taskList = adfNode('taskList');
9
- taskItem.define({
14
+ export var blockTaskItem = adfNode('blockTaskItem');
15
+ var commonTaskItemProps = {
10
16
  defining: true,
11
17
  selectable: false,
12
18
  marks: [unsupportedMark, unsupportedNodeAttribute],
@@ -21,9 +27,16 @@ taskItem.define({
21
27
  values: ['TODO', 'DONE'],
22
28
  default: 'TODO'
23
29
  }
24
- },
30
+ }
31
+ };
32
+ taskItem.define(_objectSpread(_objectSpread({}, commonTaskItemProps), {}, {
25
33
  content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
26
- });
34
+ }));
35
+ blockTaskItem.define(_objectSpread(_objectSpread({}, commonTaskItemProps), {}, {
36
+ contentMinItems: 1,
37
+ content: [$or(paragraph.use('with_no_marks'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), extension.use('with_marks')))],
38
+ stage0: true
39
+ }));
27
40
  taskList.define({
28
41
  defining: true,
29
42
  selectable: false,
@@ -35,5 +48,5 @@ taskList.define({
35
48
  }
36
49
  },
37
50
  contentMinItems: 1,
38
- content: [$onePlus($or(taskItem, unsupportedBlock)), $zeroPlus($or(taskItem, taskList, unsupportedBlock))]
51
+ content: [$onePlus($or(taskItem, unsupportedBlock, blockTaskItem)), $zeroPlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
39
52
  });
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithDecisionStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithDecisionStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, blockTaskItemStage0 } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
5
5
  var defaultSchemaConfig = {
@@ -24,7 +24,8 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
24
24
  table: tableWithNestedTable,
25
25
  tableRow: tableRowWithNestedTable,
26
26
  tableCell: tableCellWithNestedTable,
27
- tableHeader: tableHeaderWithNestedTable
27
+ tableHeader: tableHeaderWithNestedTable,
28
+ blockTaskItem: blockTaskItemStage0
28
29
  };
29
30
  }
30
31
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './nodes';
1
+ export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './nodes';
2
2
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
3
  colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext } from './marks';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -27,7 +27,7 @@ export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNest
27
27
  export { decisionList, decisionListSelector } from './decision-list';
28
28
  export { decisionItem } from './decision-item';
29
29
  export { taskList, taskListSelector } from './task-list';
30
- export { taskItem } from './task-item';
30
+ export { taskItem, blockTaskItemStage0 } from './task-item';
31
31
  export { date, dateWithLocalId } from './date';
32
32
  export { placeholder, placeholderWithLocalId } from './placeholder';
33
33
  export { layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId } from './layout-section';
@@ -1,5 +1,5 @@
1
1
  import { uuid } from '../../utils/uuid';
2
- import { taskItem as taskItemFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { taskItem as taskItemFactory, blockTaskItemStage0 as blockTaskItemFactory } from '../../next-schema/generated/nodeTypes';
3
3
 
4
4
  /**
5
5
  * @name taskItem_node
@@ -28,4 +28,29 @@ export var taskItem = taskItemFactory({
28
28
  };
29
29
  return ['div', attrs, 0];
30
30
  }
31
+ });
32
+ export var blockTaskItemStage0 = blockTaskItemFactory({
33
+ parseDOM: [{
34
+ tag: 'div[data-task-is-block]',
35
+ // Default priority is 50. We normally don't change this but since this node type is
36
+ // also used by list-item we need to make sure that we run this parser first.
37
+ priority: 100,
38
+ getAttrs: function getAttrs(dom) {
39
+ return {
40
+ localId: uuid.generate(),
41
+ state: dom.getAttribute('data-task-state') || 'TODO'
42
+ };
43
+ }
44
+ }],
45
+ toDOM: function toDOM(node) {
46
+ var _node$attrs2 = node.attrs,
47
+ localId = _node$attrs2.localId,
48
+ state = _node$attrs2.state;
49
+ var attrs = {
50
+ 'data-task-local-id': localId || 'local-task',
51
+ 'data-task-state': state || 'TODO',
52
+ 'data-task-is-block': 'true'
53
+ };
54
+ return ['div', attrs, 0];
55
+ }
31
56
  });
@@ -0,0 +1 @@
1
+ export {};
@@ -151,6 +151,31 @@ export var blockquote = {
151
151
  }
152
152
  };
153
153
  export var blockRootOnly = ['multiBodiedExtension'];
154
+ export var blockTaskItem = {
155
+ props: {
156
+ type: {
157
+ type: 'enum',
158
+ values: ['blockTaskItem']
159
+ },
160
+ attrs: {
161
+ props: {
162
+ localId: {
163
+ type: 'string'
164
+ },
165
+ state: {
166
+ type: 'enum',
167
+ values: ['TODO', 'DONE']
168
+ }
169
+ }
170
+ },
171
+ content: {
172
+ type: 'array',
173
+ isTupleLike: true,
174
+ items: [['paragraph_with_no_marks', 'extension_with_marks'], ['paragraph_with_no_marks', 'extension_with_marks']],
175
+ minItems: 1
176
+ }
177
+ }
178
+ };
154
179
  export var bodiedExtension = {
155
180
  props: {
156
181
  type: {
@@ -1799,7 +1824,7 @@ export var taskList = {
1799
1824
  content: {
1800
1825
  type: 'array',
1801
1826
  isTupleLike: true,
1802
- items: ['taskItem', ['taskItem', 'taskList']],
1827
+ items: [['taskItem', 'blockTaskItem'], ['taskItem', 'taskList', 'blockTaskItem']],
1803
1828
  minItems: 1,
1804
1829
  allowUnsupportedBlock: true
1805
1830
  }
@@ -282,6 +282,55 @@
282
282
  "additionalProperties": false,
283
283
  "required": ["type", "content"]
284
284
  },
285
+ "blockTaskItem_node": {
286
+ "type": "object",
287
+ "properties": {
288
+ "type": {
289
+ "enum": ["blockTaskItem"]
290
+ },
291
+ "attrs": {
292
+ "type": "object",
293
+ "properties": {
294
+ "localId": {
295
+ "type": "string"
296
+ },
297
+ "state": {
298
+ "enum": ["TODO", "DONE"]
299
+ }
300
+ },
301
+ "required": ["localId", "state"],
302
+ "additionalProperties": false
303
+ },
304
+ "content": {
305
+ "type": "array",
306
+ "items": [
307
+ {
308
+ "anyOf": [
309
+ {
310
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
311
+ },
312
+ {
313
+ "$ref": "#/definitions/extension_with_marks_node"
314
+ }
315
+ ]
316
+ },
317
+ {
318
+ "anyOf": [
319
+ {
320
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
321
+ },
322
+ {
323
+ "$ref": "#/definitions/extension_with_marks_node"
324
+ }
325
+ ]
326
+ }
327
+ ],
328
+ "minItems": 1
329
+ }
330
+ },
331
+ "additionalProperties": false,
332
+ "required": ["type", "attrs", "content"]
333
+ },
285
334
  "bodiedExtension_node": {
286
335
  "type": "object",
287
336
  "properties": {
@@ -2917,7 +2966,14 @@
2917
2966
  "type": "array",
2918
2967
  "items": [
2919
2968
  {
2920
- "$ref": "#/definitions/taskItem_node"
2969
+ "anyOf": [
2970
+ {
2971
+ "$ref": "#/definitions/taskItem_node"
2972
+ },
2973
+ {
2974
+ "$ref": "#/definitions/blockTaskItem_node"
2975
+ }
2976
+ ]
2921
2977
  },
2922
2978
  {
2923
2979
  "anyOf": [
@@ -2926,6 +2982,9 @@
2926
2982
  },
2927
2983
  {
2928
2984
  "$ref": "#/definitions/taskList_node"
2985
+ },
2986
+ {
2987
+ "$ref": "#/definitions/blockTaskItem_node"
2929
2988
  }
2930
2989
  ]
2931
2990
  }
@@ -1,6 +1,6 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
2
2
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, } from './schema';
3
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItemStage0, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, } from './schema';
4
4
  export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, MultiBodiedExtensionDefinition, ExtensionFrameDefinition, BackgroundColorDefinition, } from './schema';
5
5
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor, } from './utils';
6
6
  export type { Match, NameToEmoji } from './utils';
@@ -48,6 +48,17 @@ export interface BlockquoteLegacyDefinition {
48
48
  }
49
49
  export type BlockquoteLegacyNode = PMNode & BlockquoteLegacyDefinition;
50
50
  export declare const blockquoteLegacy: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<BlockquoteLegacyNode>) => import("prosemirror-model").NodeSpec;
51
+ export interface BlockTaskItemStage0Definition {
52
+ type: 'blockTaskItem';
53
+ content: Array<ExtensionWithMarksDefinition | ExtensionWithMarksDefinition | ParagraphWithNoMarksDefinition | ParagraphWithNoMarksDefinition>;
54
+ marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
55
+ attrs: {
56
+ localId: string;
57
+ state: 'TODO' | 'DONE';
58
+ };
59
+ }
60
+ export type BlockTaskItemStage0Node = PMNode & BlockTaskItemStage0Definition;
61
+ export declare const blockTaskItemStage0: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<BlockTaskItemStage0Node>) => import("prosemirror-model").NodeSpec;
51
62
  export interface BodiedExtensionDefinition {
52
63
  type: 'bodiedExtension';
53
64
  content: Array<BlockCardDefinition | BlockquoteDefinition | BulletListDefinition | CodeBlockDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionWithMarksDefinition | HeadingWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | PanelDefinition | ParagraphWithNoMarksDefinition | RuleDefinition | TableDefinition | TableWithNestedTableDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
@@ -896,7 +907,7 @@ export type TaskItemNode = PMNode & TaskItemDefinition;
896
907
  export declare const taskItem: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<TaskItemNode>) => import("prosemirror-model").NodeSpec;
897
908
  export interface TaskListDefinition {
898
909
  type: 'taskList';
899
- content: Array<TaskItemDefinition | TaskItemDefinition | TaskListDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
910
+ content: Array<BlockTaskItemStage0Definition | BlockTaskItemStage0Definition | TaskItemDefinition | TaskItemDefinition | TaskListDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
900
911
  marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
901
912
  attrs: {
902
913
  localId: string;
@@ -2,6 +2,9 @@ export declare const tableCellContentNodes: (import("@atlaskit/adf-schema-genera
2
2
  marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
3
3
  noMarks: false;
4
4
  noExtend: true;
5
+ }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<any, import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
6
+ marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
7
+ ignore: any[];
5
8
  }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<any, import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
6
9
  atom: false;
7
10
  ignore: any[];
@@ -53,9 +56,6 @@ export declare const tableCellContentNodes: (import("@atlaskit/adf-schema-genera
53
56
  };
54
57
  };
55
58
  };
56
- }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<any, import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
57
- marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
58
- ignore: any[];
59
59
  }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "legacy"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
60
60
  ignore: ("json-schema" | "validator-spec")[];
61
61
  content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
@@ -1,2 +1,3 @@
1
1
  export declare const taskItem: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec>;
2
2
  export declare const taskList: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec>;
3
+ export declare const blockTaskItem: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec>;
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, } from './nodes';
1
+ export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, } from './nodes';
2
2
  export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableWithNestedTableDefinition, TableRowWithNestedTableDefinition, TableCellWithNestedTableDefinition, TableHeaderWithNestedTableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
3
3
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
4
4
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
@@ -51,7 +51,7 @@ export { decisionItem } from './decision-item';
51
51
  export type { DecisionItemDefinition } from './decision-item';
52
52
  export { taskList, taskListSelector } from './task-list';
53
53
  export type { TaskListDefinition, TaskListContent } from './task-list';
54
- export { taskItem } from './task-item';
54
+ export { taskItem, blockTaskItemStage0 } from './task-item';
55
55
  export type { TaskItemDefinition } from './task-item';
56
56
  export { date, dateWithLocalId } from './date';
57
57
  export type { DateDefinition } from './date';
@@ -14,3 +14,4 @@ export interface TaskItemDefinition {
14
14
  };
15
15
  }
16
16
  export declare const taskItem: import("prosemirror-model").NodeSpec;
17
+ export declare const blockTaskItemStage0: import("prosemirror-model").NodeSpec;
@@ -1,5 +1,6 @@
1
1
  import { Step, StepResult, StepMap } from '@atlaskit/editor-prosemirror/transform';
2
2
  import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
3
+ import { ADFEntity } from './types';
3
4
  type Options = {
4
5
  nextDocument: PMNode;
5
6
  inverted?: boolean;
@@ -20,8 +21,6 @@ export declare class OverrideDocumentStep extends Step {
20
21
  export type OverrideDocumentStepJSON = {
21
22
  stepType: 'override-document';
22
23
  inverted: boolean;
23
- nextDocument: {
24
- [key: string]: any;
25
- };
24
+ nextDocument: ADFEntity;
26
25
  };
27
26
  export {};
@@ -0,0 +1,96 @@
1
+ /**
2
+ * These types are taken from adf-utils, but not imported to avoid circular dependencies.
3
+ * They can be seen here:
4
+ * https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/adf-utils/src/types/index.ts
5
+ */
6
+ /**
7
+ * Represents a mark in the Atlassian Document Format (ADF).
8
+ * Marks are used to apply formatting or metadata to content, such as bold, italic, links, etc.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const boldMark: ADFEntityMark = {
13
+ * type: 'strong'
14
+ * };
15
+ *
16
+ * const linkMark: ADFEntityMark = {
17
+ * type: 'link',
18
+ * attrs: {
19
+ * href: 'https://example.com',
20
+ * title: 'Example Link'
21
+ * }
22
+ * };
23
+ * ```
24
+ */
25
+ export interface ADFEntityMark {
26
+ /** The type of mark (e.g., 'strong', 'em', 'link', 'code', etc.) */
27
+ type: string;
28
+ /**
29
+ * Optional attributes for the mark, containing mark-specific properties.
30
+ * For example, a link mark would have 'href' and optionally 'title' attributes.
31
+ */
32
+ attrs?: {
33
+ [name: string]: any;
34
+ };
35
+ }
36
+ /**
37
+ * Represents a node or entity in the Atlassian Document Format (ADF).
38
+ * This is the core building block of ADF documents, representing elements like
39
+ * paragraphs, headings, images, tables, and other content types.
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * const paragraph: ADFEntity = {
44
+ * type: 'paragraph',
45
+ * content: [
46
+ * {
47
+ * type: 'text',
48
+ * text: 'Hello world!',
49
+ * marks: [{ type: 'strong' }]
50
+ * }
51
+ * ]
52
+ * };
53
+ *
54
+ * const heading: ADFEntity = {
55
+ * type: 'heading',
56
+ * attrs: { level: 1 },
57
+ * content: [
58
+ * {
59
+ * type: 'text',
60
+ * text: 'Document Title'
61
+ * }
62
+ * ]
63
+ * };
64
+ * ```
65
+ */
66
+ export interface ADFEntity {
67
+ /** The type of ADF node (e.g., 'doc', 'paragraph', 'heading', 'text', 'image', etc.) */
68
+ type: string;
69
+ /**
70
+ * Optional attributes for the entity, containing node-specific properties.
71
+ * For example, a heading node would have a 'level' attribute, an image would have 'src', etc.
72
+ */
73
+ attrs?: {
74
+ [name: string]: any;
75
+ };
76
+ /**
77
+ * Optional array of child entities. Used for container nodes like paragraphs, headings, etc.
78
+ * Can contain undefined values to handle cases where content might be filtered or removed.
79
+ */
80
+ content?: Array<ADFEntity | undefined>;
81
+ /**
82
+ * Optional array of marks applied to this entity.
83
+ * Marks provide formatting and metadata like bold, italic, links, etc.
84
+ */
85
+ marks?: Array<ADFEntityMark>;
86
+ /**
87
+ * Optional text content for text nodes.
88
+ * Only present on nodes of type 'text'.
89
+ */
90
+ text?: string;
91
+ /**
92
+ * Index signature to allow additional properties that may be specific to certain node types
93
+ * or used for extensions and custom functionality.
94
+ */
95
+ [key: string]: any;
96
+ }
@@ -161,6 +161,31 @@ export declare const blockquote: {
161
161
  };
162
162
  };
163
163
  export declare const blockRootOnly: string[];
164
+ export declare const blockTaskItem: {
165
+ props: {
166
+ type: {
167
+ type: string;
168
+ values: string[];
169
+ };
170
+ attrs: {
171
+ props: {
172
+ localId: {
173
+ type: string;
174
+ };
175
+ state: {
176
+ type: string;
177
+ values: string[];
178
+ };
179
+ };
180
+ };
181
+ content: {
182
+ type: string;
183
+ isTupleLike: boolean;
184
+ items: string[][];
185
+ minItems: number;
186
+ };
187
+ };
188
+ };
164
189
  export declare const bodiedExtension: {
165
190
  props: {
166
191
  type: {
@@ -1818,7 +1843,7 @@ export declare const taskList: {
1818
1843
  content: {
1819
1844
  type: string;
1820
1845
  isTupleLike: boolean;
1821
- items: (string | string[])[];
1846
+ items: string[][];
1822
1847
  minItems: number;
1823
1848
  allowUnsupportedBlock: boolean;
1824
1849
  };
@@ -282,6 +282,55 @@
282
282
  "additionalProperties": false,
283
283
  "required": ["type", "content"]
284
284
  },
285
+ "blockTaskItem_node": {
286
+ "type": "object",
287
+ "properties": {
288
+ "type": {
289
+ "enum": ["blockTaskItem"]
290
+ },
291
+ "attrs": {
292
+ "type": "object",
293
+ "properties": {
294
+ "localId": {
295
+ "type": "string"
296
+ },
297
+ "state": {
298
+ "enum": ["TODO", "DONE"]
299
+ }
300
+ },
301
+ "required": ["localId", "state"],
302
+ "additionalProperties": false
303
+ },
304
+ "content": {
305
+ "type": "array",
306
+ "items": [
307
+ {
308
+ "anyOf": [
309
+ {
310
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
311
+ },
312
+ {
313
+ "$ref": "#/definitions/extension_with_marks_node"
314
+ }
315
+ ]
316
+ },
317
+ {
318
+ "anyOf": [
319
+ {
320
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
321
+ },
322
+ {
323
+ "$ref": "#/definitions/extension_with_marks_node"
324
+ }
325
+ ]
326
+ }
327
+ ],
328
+ "minItems": 1
329
+ }
330
+ },
331
+ "additionalProperties": false,
332
+ "required": ["type", "attrs", "content"]
333
+ },
285
334
  "bodiedExtension_node": {
286
335
  "type": "object",
287
336
  "properties": {
@@ -2917,7 +2966,14 @@
2917
2966
  "type": "array",
2918
2967
  "items": [
2919
2968
  {
2920
- "$ref": "#/definitions/taskItem_node"
2969
+ "anyOf": [
2970
+ {
2971
+ "$ref": "#/definitions/taskItem_node"
2972
+ },
2973
+ {
2974
+ "$ref": "#/definitions/blockTaskItem_node"
2975
+ }
2976
+ ]
2921
2977
  },
2922
2978
  {
2923
2979
  "anyOf": [
@@ -2926,6 +2982,9 @@
2926
2982
  },
2927
2983
  {
2928
2984
  "$ref": "#/definitions/taskList_node"
2985
+ },
2986
+ {
2987
+ "$ref": "#/definitions/blockTaskItem_node"
2929
2988
  }
2930
2989
  ]
2931
2990
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "50.0.0",
3
+ "version": "50.1.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/"
@@ -48,7 +48,7 @@
48
48
  "devDependencies": {
49
49
  "@atlaskit/adf-schema-generator": "^2.1.1",
50
50
  "@atlaskit/codemod-utils": "^4.2.4",
51
- "@atlassian/adf-schema-json": "^1.32.0",
51
+ "@atlassian/adf-schema-json": "^1.33.0",
52
52
  "@babel/cli": "^7.22.9",
53
53
  "@babel/core": "^7.22.9",
54
54
  "@babel/plugin-proposal-class-properties": "^7.18.6",