@atlaskit/adf-schema 51.5.15 → 51.5.17

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 (30) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/next-schema/generated/nodeTypes.js +12 -1
  3. package/dist/cjs/next-schema/nodes/list.js +6 -2
  4. package/dist/cjs/next-schema/nodes/task.js +5 -0
  5. package/dist/cjs/schema/nodes/list-item.js +11 -1
  6. package/dist/cjs/utils/url.js +6 -1
  7. package/dist/cjs/validator-schema/generated/validatorSpec.js +13 -3
  8. package/dist/es2019/next-schema/generated/nodeTypes.js +11 -0
  9. package/dist/es2019/next-schema/nodes/list.js +6 -2
  10. package/dist/es2019/next-schema/nodes/task.js +5 -0
  11. package/dist/es2019/schema/nodes/list-item.js +8 -1
  12. package/dist/es2019/utils/url.js +6 -1
  13. package/dist/es2019/validator-schema/generated/validatorSpec.js +12 -2
  14. package/dist/esm/next-schema/generated/nodeTypes.js +11 -0
  15. package/dist/esm/next-schema/nodes/list.js +6 -2
  16. package/dist/esm/next-schema/nodes/task.js +5 -0
  17. package/dist/esm/schema/nodes/list-item.js +10 -1
  18. package/dist/esm/utils/url.js +6 -1
  19. package/dist/esm/validator-schema/generated/validatorSpec.js +12 -2
  20. package/dist/json-schema/v1/stage-0.json +57 -0
  21. package/dist/types/next-schema/generated/nodeTypes.d.ts +12 -2
  22. package/dist/types/schema/nodes/list-item.d.ts +27 -5
  23. package/dist/types/utils/url.d.ts +1 -1
  24. package/dist/types/validator-schema/generated/validatorSpec.d.ts +10 -0
  25. package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +12 -2
  26. package/dist/types-ts4.5/schema/nodes/list-item.d.ts +27 -5
  27. package/dist/types-ts4.5/utils/url.d.ts +1 -1
  28. package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +10 -0
  29. package/json-schema/v1/stage-0.json +57 -0
  30. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 51.5.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [`708ab6d0c8d6d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/708ab6d0c8d6d) -
8
+ EDITOR-5416 flexible list indentation stage 0
9
+
10
+ https://hello.atlassian.net/wiki/spaces/EDITOR/pages/6434470772/ADF+Change+94+List+indentation+flexibility
11
+
12
+ - Updated dependencies
13
+
14
+ ## 51.5.16
15
+
16
+ ### Patch Changes
17
+
18
+ - [`b56fac4df95b4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b56fac4df95b4) -
19
+ remove no-tscheck and fix safe url logic
20
+ - Updated dependencies
21
+
3
22
  ## 51.5.15
4
23
 
5
24
  ### Patch Changes
@@ -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.syncBlock = 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.bodiedSyncBlock = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = 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.syncBlock = 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.listItemFlexibleFirstChildStage0 = 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.bodiedSyncBlock = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = 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
@@ -671,6 +671,17 @@ var listItem = exports.listItem = (0, _createPMSpecFactory.createPMNodeSpecFacto
671
671
  selectable: false,
672
672
  defining: true
673
673
  });
674
+ var listItemFlexibleFirstChildStage0 = exports.listItemFlexibleFirstChildStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
675
+ content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
676
+ marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
677
+ attrs: {
678
+ localId: {
679
+ default: null
680
+ }
681
+ },
682
+ selectable: false,
683
+ defining: true
684
+ });
674
685
  var listItemWithNestedDecisionStage0 = exports.listItemWithNestedDecisionStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
675
686
  content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*',
676
687
  marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
@@ -33,6 +33,10 @@ var listItem = (0, _adfSchemaGenerator.adfNode)('listItem').define({
33
33
  content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock, _decisionList.decisionList, _extension.extension.use('with_marks')), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), bulletList, orderedList, _task.taskList, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock, _decisionList.decisionList, _extension.extension.use('with_marks')))],
34
34
  noExtend: true,
35
35
  stage0: true
36
+ }).variant('flexible_first_child', {
37
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), bulletList, orderedList, _task.taskList, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock, _extension.extension.use('with_marks')))],
38
+ noExtend: true,
39
+ stage0: true
36
40
  });
37
41
  orderedList.define({
38
42
  selectable: false,
@@ -50,12 +54,12 @@ orderedList.define({
50
54
  optional: true
51
55
  }
52
56
  },
53
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem, listItem.use('with_nested_decision')))]
57
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem, listItem.use('with_nested_decision'), listItem.use('flexible_first_child')))]
54
58
  });
55
59
  bulletList.define({
56
60
  selectable: false,
57
61
  marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
58
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem, listItem.use('with_nested_decision')))],
62
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem, listItem.use('with_nested_decision'), listItem.use('flexible_first_child')))],
59
63
  attrs: {
60
64
  localId: {
61
65
  type: 'string',
@@ -58,4 +58,9 @@ taskList.define({
58
58
  },
59
59
  contentMinItems: 1,
60
60
  content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(taskItem, _unsupportedBlock.unsupportedBlock, blockTaskItem)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(taskItem, taskList, _unsupportedBlock.unsupportedBlock, blockTaskItem))]
61
+ });
62
+ taskList.variant('flexible_first_child', {
63
+ contentMinItems: 1,
64
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(taskItem, taskList, _unsupportedBlock.unsupportedBlock, blockTaskItem))],
65
+ stage0: true
61
66
  });
@@ -1,11 +1,15 @@
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
7
  exports.listItemWithNestedDecisionAndLocalIdStage0 = exports.listItemWithLocalId = exports.listItemWithDecisionStage0 = exports.listItem = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
7
9
  var _utils = require("../../utils");
8
10
  var _nodeTypes = require("../../next-schema/generated/nodeTypes");
11
+ 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; }
12
+ 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; }
9
13
  /**
10
14
  * @name list_item
11
15
  * @description this node allows task-list to be nested inside list-item
@@ -39,7 +43,7 @@ var listItemWithLocalId = exports.listItemWithLocalId = (0, _nodeTypes.listItem)
39
43
  * @name list_item_with_decision_stage0
40
44
  * @description this node allows decisions to be nested inside list-item
41
45
  */
42
- var listItemWithDecisionStage0 = exports.listItemWithDecisionStage0 = (0, _nodeTypes.listItemWithNestedDecisionStage0)({
46
+ var listItemWithDecisionStage0Spec = (0, _nodeTypes.listItemWithNestedDecisionStage0)({
43
47
  parseDOM: [{
44
48
  tag: 'li'
45
49
  }],
@@ -47,6 +51,12 @@ var listItemWithDecisionStage0 = exports.listItemWithDecisionStage0 = (0, _nodeT
47
51
  return ['li', 0];
48
52
  }
49
53
  });
54
+
55
+ // Allow list-first content while preserving decisionList support in stage0.
56
+ var listItemStage0Content = '((paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*) | ((paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+)';
57
+ var listItemWithDecisionStage0 = exports.listItemWithDecisionStage0 = _objectSpread(_objectSpread({}, listItemWithDecisionStage0Spec), {}, {
58
+ content: listItemStage0Content
59
+ });
50
60
  var listItemWithNestedDecisionAndLocalIdStage0 = exports.listItemWithNestedDecisionAndLocalIdStage0 = (0, _nodeTypes.listItemWithNestedDecisionStage0)({
51
61
  parseDOM: [{
52
62
  tag: 'li',
@@ -10,7 +10,7 @@ exports.isRootRelative = isRootRelative;
10
10
  exports.linkifyMatch = exports.linkify = exports.isSafeUrl = void 0;
11
11
  exports.normalizeUrl = normalizeUrl;
12
12
  var _linkifyIt = _interopRequireDefault(require("linkify-it"));
13
- // @ts-nocheck
13
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
14
  /**
15
15
  * This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
16
16
  * Any changes made here should be mirrored there.
@@ -29,6 +29,11 @@ var whitelistedURLPatterns = [/^http[s\u017F]?:\/\//im, /^ftp[s\u017F]?:\/\//im,
29
29
  */
30
30
  var isSafeUrl = exports.isSafeUrl = function isSafeUrl(url) {
31
31
  var urlTrimmed = url === null || url === void 0 ? void 0 : url.trim();
32
+ if (urlTrimmed === undefined && (0, _expValEquals.expValEquals)('platform_editor_safe_url_trim_fix', 'isEnabled', true)) {
33
+ return true;
34
+ }
35
+
36
+ // remove cast to string once we remove the experiment, as urlTrimmed will never be undefined at that point
32
37
  if (urlTrimmed.length === 0) {
33
38
  return true;
34
39
  }
@@ -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.syncBlock = 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.bodiedSyncBlock = 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;
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.syncBlock = 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_flexible_first_child = 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.bodiedSyncBlock = 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: {
@@ -327,7 +327,7 @@ var bulletList = exports.bulletList = {
327
327
  },
328
328
  content: {
329
329
  type: 'array',
330
- items: [['listItem', 'listItem_with_nested_decision']],
330
+ items: [['listItem', 'listItem_with_nested_decision', 'listItem_flexible_first_child']],
331
331
  minItems: 1
332
332
  }
333
333
  }
@@ -1069,6 +1069,16 @@ var listItem = exports.listItem = {
1069
1069
  }
1070
1070
  }
1071
1071
  };
1072
+ var listItem_flexible_first_child = exports.listItem_flexible_first_child = ['listItem', {
1073
+ props: {
1074
+ content: {
1075
+ type: 'array',
1076
+ items: [['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
1077
+ minItems: 1,
1078
+ allowUnsupportedBlock: true
1079
+ }
1080
+ }
1081
+ }];
1072
1082
  var listItem_with_nested_decision = exports.listItem_with_nested_decision = ['listItem', {
1073
1083
  props: {
1074
1084
  content: {
@@ -1462,7 +1472,7 @@ var orderedList = exports.orderedList = {
1462
1472
  },
1463
1473
  content: {
1464
1474
  type: 'array',
1465
- items: [['listItem', 'listItem_with_nested_decision']],
1475
+ items: [['listItem', 'listItem_with_nested_decision', 'listItem_flexible_first_child']],
1466
1476
  minItems: 1
1467
1477
  }
1468
1478
  }
@@ -665,6 +665,17 @@ export const listItem = createPMNodeSpecFactory({
665
665
  selectable: false,
666
666
  defining: true
667
667
  });
668
+ export const listItemFlexibleFirstChildStage0 = createPMNodeSpecFactory({
669
+ content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
670
+ marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
671
+ attrs: {
672
+ localId: {
673
+ default: null
674
+ }
675
+ },
676
+ selectable: false,
677
+ defining: true
678
+ });
668
679
  export const listItemWithNestedDecisionStage0 = createPMNodeSpecFactory({
669
680
  content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*',
670
681
  marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
@@ -27,6 +27,10 @@ const listItem = adfNode('listItem').define({
27
27
  content: [$or(paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, decisionList, extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, decisionList, extension.use('with_marks')))],
28
28
  noExtend: true,
29
29
  stage0: true
30
+ }).variant('flexible_first_child', {
31
+ content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))],
32
+ noExtend: true,
33
+ stage0: true
30
34
  });
31
35
  orderedList.define({
32
36
  selectable: false,
@@ -44,12 +48,12 @@ orderedList.define({
44
48
  optional: true
45
49
  }
46
50
  },
47
- content: [$onePlus($or(listItem, listItem.use('with_nested_decision')))]
51
+ content: [$onePlus($or(listItem, listItem.use('with_nested_decision'), listItem.use('flexible_first_child')))]
48
52
  });
49
53
  bulletList.define({
50
54
  selectable: false,
51
55
  marks: [unsupportedMark, unsupportedNodeAttribute],
52
- content: [$onePlus($or(listItem, listItem.use('with_nested_decision')))],
56
+ content: [$onePlus($or(listItem, listItem.use('with_nested_decision'), listItem.use('flexible_first_child')))],
53
57
  attrs: {
54
58
  localId: {
55
59
  type: 'string',
@@ -50,4 +50,9 @@ taskList.define({
50
50
  },
51
51
  contentMinItems: 1,
52
52
  content: [$onePlus($or(taskItem, unsupportedBlock, blockTaskItem)), $zeroPlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
53
+ });
54
+ taskList.variant('flexible_first_child', {
55
+ contentMinItems: 1,
56
+ content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))],
57
+ stage0: true
53
58
  });
@@ -32,7 +32,7 @@ export const listItemWithLocalId = listItemFactory({
32
32
  * @name list_item_with_decision_stage0
33
33
  * @description this node allows decisions to be nested inside list-item
34
34
  */
35
- export const listItemWithDecisionStage0 = listItemWithNestedDecisionStage0Factory({
35
+ const listItemWithDecisionStage0Spec = listItemWithNestedDecisionStage0Factory({
36
36
  parseDOM: [{
37
37
  tag: 'li'
38
38
  }],
@@ -40,6 +40,13 @@ export const listItemWithDecisionStage0 = listItemWithNestedDecisionStage0Factor
40
40
  return ['li', 0];
41
41
  }
42
42
  });
43
+
44
+ // Allow list-first content while preserving decisionList support in stage0.
45
+ const listItemStage0Content = '((paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*) | ((paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+)';
46
+ export const listItemWithDecisionStage0 = {
47
+ ...listItemWithDecisionStage0Spec,
48
+ content: listItemStage0Content
49
+ };
43
50
  export const listItemWithNestedDecisionAndLocalIdStage0 = listItemWithNestedDecisionStage0Factory({
44
51
  parseDOM: [{
45
52
  tag: 'li',
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  /**
3
2
  * This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
4
3
  * Any changes made here should be mirrored there.
@@ -6,6 +5,7 @@
6
5
  * Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
7
6
  */
8
7
  import LinkifyIt from 'linkify-it';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
9
  const whitelistedURLPatterns = [/^https?:\/\//imu, /^ftps?:\/\//imu, /^gopher:\/\//imu, /^integrity:\/\//imu, /^file:\/\//imu, /^smb:\/\//imu, /^dynamicsnav:\/\//imu, /^jamfselfservice:\/\//imu, /^\//imu, /^mailto:/imu, /^skype:/imu, /^callto:/imu, /^facetime:/imu, /^git:/imu, /^irc6?:/imu, /^news:/imu, /^nntp:/imu, /^feed:/imu, /^cvs:/imu, /^svn:/imu, /^mvn:/imu, /^ssh:/imu, /^scp:\/\//imu, /^sftp:\/\//imu, /^itms:/imu,
10
10
  // This is not a valid notes link, but we support this pattern for backwards compatibility
11
11
  /^notes:/imu, /^notes:\/\//imu, /^hipchat:\/\//imu,
@@ -17,6 +17,11 @@ const whitelistedURLPatterns = [/^https?:\/\//imu, /^ftps?:\/\//imu, /^gopher:\/
17
17
  */
18
18
  export const isSafeUrl = url => {
19
19
  const urlTrimmed = url === null || url === void 0 ? void 0 : url.trim();
20
+ if (urlTrimmed === undefined && expValEquals('platform_editor_safe_url_trim_fix', 'isEnabled', true)) {
21
+ return true;
22
+ }
23
+
24
+ // remove cast to string once we remove the experiment, as urlTrimmed will never be undefined at that point
20
25
  if (urlTrimmed.length === 0) {
21
26
  return true;
22
27
  }
@@ -321,7 +321,7 @@ export const bulletList = {
321
321
  },
322
322
  content: {
323
323
  type: 'array',
324
- items: [['listItem', 'listItem_with_nested_decision']],
324
+ items: [['listItem', 'listItem_with_nested_decision', 'listItem_flexible_first_child']],
325
325
  minItems: 1
326
326
  }
327
327
  }
@@ -1063,6 +1063,16 @@ export const listItem = {
1063
1063
  }
1064
1064
  }
1065
1065
  };
1066
+ export const listItem_flexible_first_child = ['listItem', {
1067
+ props: {
1068
+ content: {
1069
+ type: 'array',
1070
+ items: [['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
1071
+ minItems: 1,
1072
+ allowUnsupportedBlock: true
1073
+ }
1074
+ }
1075
+ }];
1066
1076
  export const listItem_with_nested_decision = ['listItem', {
1067
1077
  props: {
1068
1078
  content: {
@@ -1456,7 +1466,7 @@ export const orderedList = {
1456
1466
  },
1457
1467
  content: {
1458
1468
  type: 'array',
1459
- items: [['listItem', 'listItem_with_nested_decision']],
1469
+ items: [['listItem', 'listItem_with_nested_decision', 'listItem_flexible_first_child']],
1460
1470
  minItems: 1
1461
1471
  }
1462
1472
  }
@@ -665,6 +665,17 @@ export var listItem = createPMNodeSpecFactory({
665
665
  selectable: false,
666
666
  defining: true
667
667
  });
668
+ export var listItemFlexibleFirstChildStage0 = createPMNodeSpecFactory({
669
+ content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
670
+ marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
671
+ attrs: {
672
+ localId: {
673
+ default: null
674
+ }
675
+ },
676
+ selectable: false,
677
+ defining: true
678
+ });
668
679
  export var listItemWithNestedDecisionStage0 = createPMNodeSpecFactory({
669
680
  content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*',
670
681
  marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
@@ -27,6 +27,10 @@ var listItem = adfNode('listItem').define({
27
27
  content: [$or(paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, decisionList, extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, decisionList, extension.use('with_marks')))],
28
28
  noExtend: true,
29
29
  stage0: true
30
+ }).variant('flexible_first_child', {
31
+ content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))],
32
+ noExtend: true,
33
+ stage0: true
30
34
  });
31
35
  orderedList.define({
32
36
  selectable: false,
@@ -44,12 +48,12 @@ orderedList.define({
44
48
  optional: true
45
49
  }
46
50
  },
47
- content: [$onePlus($or(listItem, listItem.use('with_nested_decision')))]
51
+ content: [$onePlus($or(listItem, listItem.use('with_nested_decision'), listItem.use('flexible_first_child')))]
48
52
  });
49
53
  bulletList.define({
50
54
  selectable: false,
51
55
  marks: [unsupportedMark, unsupportedNodeAttribute],
52
- content: [$onePlus($or(listItem, listItem.use('with_nested_decision')))],
56
+ content: [$onePlus($or(listItem, listItem.use('with_nested_decision'), listItem.use('flexible_first_child')))],
53
57
  attrs: {
54
58
  localId: {
55
59
  type: 'string',
@@ -51,4 +51,9 @@ taskList.define({
51
51
  },
52
52
  contentMinItems: 1,
53
53
  content: [$onePlus($or(taskItem, unsupportedBlock, blockTaskItem)), $zeroPlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
54
+ });
55
+ taskList.variant('flexible_first_child', {
56
+ contentMinItems: 1,
57
+ content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))],
58
+ stage0: true
54
59
  });
@@ -1,3 +1,6 @@
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 { uuid } from '../../utils';
2
5
  import { listItem as listItemFactory, listItemWithNestedDecisionStage0 as listItemWithNestedDecisionStage0Factory } from '../../next-schema/generated/nodeTypes';
3
6
 
@@ -34,7 +37,7 @@ export var listItemWithLocalId = listItemFactory({
34
37
  * @name list_item_with_decision_stage0
35
38
  * @description this node allows decisions to be nested inside list-item
36
39
  */
37
- export var listItemWithDecisionStage0 = listItemWithNestedDecisionStage0Factory({
40
+ var listItemWithDecisionStage0Spec = listItemWithNestedDecisionStage0Factory({
38
41
  parseDOM: [{
39
42
  tag: 'li'
40
43
  }],
@@ -42,6 +45,12 @@ export var listItemWithDecisionStage0 = listItemWithNestedDecisionStage0Factory(
42
45
  return ['li', 0];
43
46
  }
44
47
  });
48
+
49
+ // Allow list-first content while preserving decisionList support in stage0.
50
+ var listItemStage0Content = '((paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*) | ((paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+)';
51
+ export var listItemWithDecisionStage0 = _objectSpread(_objectSpread({}, listItemWithDecisionStage0Spec), {}, {
52
+ content: listItemStage0Content
53
+ });
45
54
  export var listItemWithNestedDecisionAndLocalIdStage0 = listItemWithNestedDecisionStage0Factory({
46
55
  parseDOM: [{
47
56
  tag: 'li',
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  /**
3
2
  * This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
4
3
  * Any changes made here should be mirrored there.
@@ -6,6 +5,7 @@
6
5
  * Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
7
6
  */
8
7
  import LinkifyIt from 'linkify-it';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
9
  var whitelistedURLPatterns = [/^http[s\u017F]?:\/\//im, /^ftp[s\u017F]?:\/\//im, /^gopher:\/\//im, /^integrity:\/\//im, /^file:\/\//im, /^[s\u017F]mb:\/\//im, /^dynamic[s\u017F]nav:\/\//im, /^jamf[s\u017F]elf[s\u017F]ervice:\/\//im, /^\//im, /^mailto:/im, /^[s\u017F][k\u212A]ype:/im, /^callto:/im, /^facetime:/im, /^git:/im, /^irc6?:/im, /^new[s\u017F]:/im, /^nntp:/im, /^feed:/im, /^cv[s\u017F]:/im, /^[s\u017F]vn:/im, /^mvn:/im, /^[s\u017F][s\u017F]h:/im, /^[s\u017F]cp:\/\//im, /^[s\u017F]ftp:\/\//im, /^itm[s\u017F]:/im,
10
10
  // This is not a valid notes link, but we support this pattern for backwards compatibility
11
11
  /^note[s\u017F]:/im, /^note[s\u017F]:\/\//im, /^hipchat:\/\//im,
@@ -17,6 +17,11 @@ var whitelistedURLPatterns = [/^http[s\u017F]?:\/\//im, /^ftp[s\u017F]?:\/\//im,
17
17
  */
18
18
  export var isSafeUrl = function isSafeUrl(url) {
19
19
  var urlTrimmed = url === null || url === void 0 ? void 0 : url.trim();
20
+ if (urlTrimmed === undefined && expValEquals('platform_editor_safe_url_trim_fix', 'isEnabled', true)) {
21
+ return true;
22
+ }
23
+
24
+ // remove cast to string once we remove the experiment, as urlTrimmed will never be undefined at that point
20
25
  if (urlTrimmed.length === 0) {
21
26
  return true;
22
27
  }
@@ -321,7 +321,7 @@ export var bulletList = {
321
321
  },
322
322
  content: {
323
323
  type: 'array',
324
- items: [['listItem', 'listItem_with_nested_decision']],
324
+ items: [['listItem', 'listItem_with_nested_decision', 'listItem_flexible_first_child']],
325
325
  minItems: 1
326
326
  }
327
327
  }
@@ -1063,6 +1063,16 @@ export var listItem = {
1063
1063
  }
1064
1064
  }
1065
1065
  };
1066
+ export var listItem_flexible_first_child = ['listItem', {
1067
+ props: {
1068
+ content: {
1069
+ type: 'array',
1070
+ items: [['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
1071
+ minItems: 1,
1072
+ allowUnsupportedBlock: true
1073
+ }
1074
+ }
1075
+ }];
1066
1076
  export var listItem_with_nested_decision = ['listItem', {
1067
1077
  props: {
1068
1078
  content: {
@@ -1456,7 +1466,7 @@ export var orderedList = {
1456
1466
  },
1457
1467
  content: {
1458
1468
  type: 'array',
1459
- items: [['listItem', 'listItem_with_nested_decision']],
1469
+ items: [['listItem', 'listItem_with_nested_decision', 'listItem_flexible_first_child']],
1460
1470
  minItems: 1
1461
1471
  }
1462
1472
  }
@@ -594,6 +594,9 @@
594
594
  },
595
595
  {
596
596
  "$ref": "#/definitions/listItem_with_nested_decision_node"
597
+ },
598
+ {
599
+ "$ref": "#/definitions/listItem_flexible_first_child_node"
597
600
  }
598
601
  ]
599
602
  },
@@ -1815,6 +1818,57 @@
1815
1818
  "required": ["type", "attrs"],
1816
1819
  "additionalProperties": false
1817
1820
  },
1821
+ "listItem_flexible_first_child_node": {
1822
+ "type": "object",
1823
+ "properties": {
1824
+ "type": {
1825
+ "enum": ["listItem"]
1826
+ },
1827
+ "attrs": {
1828
+ "type": "object",
1829
+ "properties": {
1830
+ "localId": {
1831
+ "type": "string"
1832
+ }
1833
+ },
1834
+ "additionalProperties": false
1835
+ },
1836
+ "content": {
1837
+ "type": "array",
1838
+ "items": {
1839
+ "anyOf": [
1840
+ {
1841
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
1842
+ },
1843
+ {
1844
+ "$ref": "#/definitions/bulletList_node"
1845
+ },
1846
+ {
1847
+ "$ref": "#/definitions/orderedList_node"
1848
+ },
1849
+ {
1850
+ "$ref": "#/definitions/taskList_node"
1851
+ },
1852
+ {
1853
+ "$ref": "#/definitions/mediaSingle_caption_node"
1854
+ },
1855
+ {
1856
+ "$ref": "#/definitions/mediaSingle_full_node"
1857
+ },
1858
+ {
1859
+ "$ref": "#/definitions/codeBlock_node"
1860
+ },
1861
+ {
1862
+ "$ref": "#/definitions/extension_with_marks_node"
1863
+ }
1864
+ ]
1865
+ },
1866
+ "minItems": 1
1867
+ }
1868
+ },
1869
+ "additionalProperties": false,
1870
+ "required": ["type", "content"]
1871
+ },
1818
1872
  "listItem_node": {
1819
1873
  "type": "object",
1820
1874
  "properties": {
@@ -2515,6 +2569,9 @@
2515
2569
  },
2516
2570
  {
2517
2571
  "$ref": "#/definitions/listItem_with_nested_decision_node"
2572
+ },
2573
+ {
2574
+ "$ref": "#/definitions/listItem_flexible_first_child_node"
2518
2575
  }
2519
2576
  ]
2520
2577
  },
@@ -101,7 +101,7 @@ export type BodiedSyncBlockNode = PMNode & BodiedSyncBlockDefinition;
101
101
  export declare const bodiedSyncBlock: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<BodiedSyncBlockNode>) => import("prosemirror-model").NodeSpec;
102
102
  export interface BulletListDefinition {
103
103
  type: 'bulletList';
104
- content: Array<ListItemDefinition | ListItemWithNestedDecisionStage0Definition>;
104
+ content: Array<ListItemDefinition | ListItemFlexibleFirstChildStage0Definition | ListItemWithNestedDecisionStage0Definition>;
105
105
  marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
106
106
  attrs: {
107
107
  localId?: string;
@@ -481,6 +481,16 @@ export interface ListItemDefinition {
481
481
  }
482
482
  export type ListItemNode = PMNode & ListItemDefinition;
483
483
  export declare const listItem: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<ListItemNode>) => import("prosemirror-model").NodeSpec;
484
+ export interface ListItemFlexibleFirstChildStage0Definition {
485
+ type: 'listItem';
486
+ content: Array<BulletListDefinition | CodeBlockDefinition | ExtensionWithMarksDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
487
+ marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
488
+ attrs: {
489
+ localId?: string;
490
+ };
491
+ }
492
+ export type ListItemFlexibleFirstChildStage0Node = PMNode & ListItemFlexibleFirstChildStage0Definition;
493
+ export declare const listItemFlexibleFirstChildStage0: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<ListItemFlexibleFirstChildStage0Node>) => import("prosemirror-model").NodeSpec;
484
494
  export interface ListItemWithNestedDecisionStage0Definition {
485
495
  type: 'listItem';
486
496
  content: Array<BulletListDefinition | CodeBlockDefinition | CodeBlockDefinition | DecisionListDefinition | DecisionListDefinition | ExtensionWithMarksDefinition | ExtensionWithMarksDefinition | MediaSingleCaptionDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithNoMarksDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
@@ -697,7 +707,7 @@ export type NestedExpandWithNoMarksNode = PMNode & NestedExpandWithNoMarksDefini
697
707
  export declare const nestedExpandWithNoMarks: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<NestedExpandWithNoMarksNode>) => import("prosemirror-model").NodeSpec;
698
708
  export interface OrderedListDefinition {
699
709
  type: 'orderedList';
700
- content: Array<ListItemDefinition | ListItemWithNestedDecisionStage0Definition>;
710
+ content: Array<ListItemDefinition | ListItemFlexibleFirstChildStage0Definition | ListItemWithNestedDecisionStage0Definition>;
701
711
  marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
702
712
  attrs: {
703
713
  order?: number;
@@ -4,9 +4,31 @@
4
4
  */
5
5
  export declare const listItem: import("prosemirror-model").NodeSpec;
6
6
  export declare const listItemWithLocalId: import("prosemirror-model").NodeSpec;
7
- /**
8
- * @name list_item_with_decision_stage0
9
- * @description this node allows decisions to be nested inside list-item
10
- */
11
- export declare const listItemWithDecisionStage0: import("prosemirror-model").NodeSpec;
7
+ export declare const listItemWithDecisionStage0: {
8
+ content: string;
9
+ marks?: string;
10
+ group?: string;
11
+ inline?: boolean;
12
+ atom?: boolean;
13
+ attrs?: {
14
+ [name: string]: import("prosemirror-model").AttributeSpec;
15
+ };
16
+ selectable?: boolean;
17
+ draggable?: boolean;
18
+ code?: boolean;
19
+ whitespace?: "pre" | "normal";
20
+ definingAsContext?: boolean;
21
+ definingForContent?: boolean;
22
+ defining?: boolean;
23
+ isolating?: boolean;
24
+ toDOM?: (node: import("prosemirror-model").Node) => import("prosemirror-model").DOMOutputSpec;
25
+ parseDOM?: readonly import("prosemirror-model").TagParseRule[];
26
+ toDebugString?: (node: import("prosemirror-model").Node) => string;
27
+ leafText?: (node: import("prosemirror-model").Node) => string;
28
+ linebreakReplacement?: boolean;
29
+ disableDropCursor?: boolean | ((view: import("prosemirror-view").EditorView, pos: {
30
+ pos: number;
31
+ inside: number;
32
+ }, event: DragEvent) => boolean);
33
+ };
12
34
  export declare const listItemWithNestedDecisionAndLocalIdStage0: import("prosemirror-model").NodeSpec;
@@ -15,7 +15,7 @@ export interface Match {
15
15
  lastIndex: number;
16
16
  length?: number;
17
17
  raw: string;
18
- schema: any;
18
+ schema: string;
19
19
  text: string;
20
20
  url: string;
21
21
  }
@@ -1075,6 +1075,16 @@ export declare const listItem: {
1075
1075
  };
1076
1076
  };
1077
1077
  };
1078
+ export declare const listItem_flexible_first_child: (string | {
1079
+ props: {
1080
+ content: {
1081
+ type: string;
1082
+ items: string[][];
1083
+ minItems: number;
1084
+ allowUnsupportedBlock: boolean;
1085
+ };
1086
+ };
1087
+ })[];
1078
1088
  export declare const listItem_with_nested_decision: (string | {
1079
1089
  props: {
1080
1090
  content: {
@@ -101,7 +101,7 @@ export type BodiedSyncBlockNode = PMNode & BodiedSyncBlockDefinition;
101
101
  export declare const bodiedSyncBlock: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<BodiedSyncBlockNode>) => import("prosemirror-model").NodeSpec;
102
102
  export interface BulletListDefinition {
103
103
  type: 'bulletList';
104
- content: Array<ListItemDefinition | ListItemWithNestedDecisionStage0Definition>;
104
+ content: Array<ListItemDefinition | ListItemFlexibleFirstChildStage0Definition | ListItemWithNestedDecisionStage0Definition>;
105
105
  marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
106
106
  attrs: {
107
107
  localId?: string;
@@ -481,6 +481,16 @@ export interface ListItemDefinition {
481
481
  }
482
482
  export type ListItemNode = PMNode & ListItemDefinition;
483
483
  export declare const listItem: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<ListItemNode>) => import("prosemirror-model").NodeSpec;
484
+ export interface ListItemFlexibleFirstChildStage0Definition {
485
+ type: 'listItem';
486
+ content: Array<BulletListDefinition | CodeBlockDefinition | ExtensionWithMarksDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
487
+ marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
488
+ attrs: {
489
+ localId?: string;
490
+ };
491
+ }
492
+ export type ListItemFlexibleFirstChildStage0Node = PMNode & ListItemFlexibleFirstChildStage0Definition;
493
+ export declare const listItemFlexibleFirstChildStage0: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<ListItemFlexibleFirstChildStage0Node>) => import("prosemirror-model").NodeSpec;
484
494
  export interface ListItemWithNestedDecisionStage0Definition {
485
495
  type: 'listItem';
486
496
  content: Array<BulletListDefinition | CodeBlockDefinition | CodeBlockDefinition | DecisionListDefinition | DecisionListDefinition | ExtensionWithMarksDefinition | ExtensionWithMarksDefinition | MediaSingleCaptionDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithNoMarksDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
@@ -697,7 +707,7 @@ export type NestedExpandWithNoMarksNode = PMNode & NestedExpandWithNoMarksDefini
697
707
  export declare const nestedExpandWithNoMarks: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<NestedExpandWithNoMarksNode>) => import("prosemirror-model").NodeSpec;
698
708
  export interface OrderedListDefinition {
699
709
  type: 'orderedList';
700
- content: Array<ListItemDefinition | ListItemWithNestedDecisionStage0Definition>;
710
+ content: Array<ListItemDefinition | ListItemFlexibleFirstChildStage0Definition | ListItemWithNestedDecisionStage0Definition>;
701
711
  marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
702
712
  attrs: {
703
713
  order?: number;
@@ -4,9 +4,31 @@
4
4
  */
5
5
  export declare const listItem: import("prosemirror-model").NodeSpec;
6
6
  export declare const listItemWithLocalId: import("prosemirror-model").NodeSpec;
7
- /**
8
- * @name list_item_with_decision_stage0
9
- * @description this node allows decisions to be nested inside list-item
10
- */
11
- export declare const listItemWithDecisionStage0: import("prosemirror-model").NodeSpec;
7
+ export declare const listItemWithDecisionStage0: {
8
+ content: string;
9
+ marks?: string;
10
+ group?: string;
11
+ inline?: boolean;
12
+ atom?: boolean;
13
+ attrs?: {
14
+ [name: string]: import("prosemirror-model").AttributeSpec;
15
+ };
16
+ selectable?: boolean;
17
+ draggable?: boolean;
18
+ code?: boolean;
19
+ whitespace?: "pre" | "normal";
20
+ definingAsContext?: boolean;
21
+ definingForContent?: boolean;
22
+ defining?: boolean;
23
+ isolating?: boolean;
24
+ toDOM?: (node: import("prosemirror-model").Node) => import("prosemirror-model").DOMOutputSpec;
25
+ parseDOM?: readonly import("prosemirror-model").TagParseRule[];
26
+ toDebugString?: (node: import("prosemirror-model").Node) => string;
27
+ leafText?: (node: import("prosemirror-model").Node) => string;
28
+ linebreakReplacement?: boolean;
29
+ disableDropCursor?: boolean | ((view: import("prosemirror-view").EditorView, pos: {
30
+ pos: number;
31
+ inside: number;
32
+ }, event: DragEvent) => boolean);
33
+ };
12
34
  export declare const listItemWithNestedDecisionAndLocalIdStage0: import("prosemirror-model").NodeSpec;
@@ -15,7 +15,7 @@ export interface Match {
15
15
  lastIndex: number;
16
16
  length?: number;
17
17
  raw: string;
18
- schema: any;
18
+ schema: string;
19
19
  text: string;
20
20
  url: string;
21
21
  }
@@ -1075,6 +1075,16 @@ export declare const listItem: {
1075
1075
  };
1076
1076
  };
1077
1077
  };
1078
+ export declare const listItem_flexible_first_child: (string | {
1079
+ props: {
1080
+ content: {
1081
+ type: string;
1082
+ items: string[][];
1083
+ minItems: number;
1084
+ allowUnsupportedBlock: boolean;
1085
+ };
1086
+ };
1087
+ })[];
1078
1088
  export declare const listItem_with_nested_decision: (string | {
1079
1089
  props: {
1080
1090
  content: {
@@ -594,6 +594,9 @@
594
594
  },
595
595
  {
596
596
  "$ref": "#/definitions/listItem_with_nested_decision_node"
597
+ },
598
+ {
599
+ "$ref": "#/definitions/listItem_flexible_first_child_node"
597
600
  }
598
601
  ]
599
602
  },
@@ -1815,6 +1818,57 @@
1815
1818
  "required": ["type", "attrs"],
1816
1819
  "additionalProperties": false
1817
1820
  },
1821
+ "listItem_flexible_first_child_node": {
1822
+ "type": "object",
1823
+ "properties": {
1824
+ "type": {
1825
+ "enum": ["listItem"]
1826
+ },
1827
+ "attrs": {
1828
+ "type": "object",
1829
+ "properties": {
1830
+ "localId": {
1831
+ "type": "string"
1832
+ }
1833
+ },
1834
+ "additionalProperties": false
1835
+ },
1836
+ "content": {
1837
+ "type": "array",
1838
+ "items": {
1839
+ "anyOf": [
1840
+ {
1841
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
1842
+ },
1843
+ {
1844
+ "$ref": "#/definitions/bulletList_node"
1845
+ },
1846
+ {
1847
+ "$ref": "#/definitions/orderedList_node"
1848
+ },
1849
+ {
1850
+ "$ref": "#/definitions/taskList_node"
1851
+ },
1852
+ {
1853
+ "$ref": "#/definitions/mediaSingle_caption_node"
1854
+ },
1855
+ {
1856
+ "$ref": "#/definitions/mediaSingle_full_node"
1857
+ },
1858
+ {
1859
+ "$ref": "#/definitions/codeBlock_node"
1860
+ },
1861
+ {
1862
+ "$ref": "#/definitions/extension_with_marks_node"
1863
+ }
1864
+ ]
1865
+ },
1866
+ "minItems": 1
1867
+ }
1868
+ },
1869
+ "additionalProperties": false,
1870
+ "required": ["type", "content"]
1871
+ },
1818
1872
  "listItem_node": {
1819
1873
  "type": "object",
1820
1874
  "properties": {
@@ -2515,6 +2569,9 @@
2515
2569
  },
2516
2570
  {
2517
2571
  "$ref": "#/definitions/listItem_with_nested_decision_node"
2572
+ },
2573
+ {
2574
+ "$ref": "#/definitions/listItem_flexible_first_child_node"
2518
2575
  }
2519
2576
  ]
2520
2577
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "51.5.15",
3
+ "version": "51.5.17",
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/"
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@atlaskit/adf-schema-generator": "^2.1.0",
44
44
  "@atlaskit/editor-prosemirror": "^7.3.0",
45
- "@atlaskit/tmp-editor-statsig": "^24.0.0",
45
+ "@atlaskit/tmp-editor-statsig": "^25.4.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "css-color-names": "0.0.4",
48
48
  "linkify-it": "^3.0.3",