@atlaskit/adf-schema 51.5.22 → 52.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/next-schema/generated/nodeTypes.js +2 -13
- package/dist/cjs/next-schema/nodes/list.js +4 -9
- package/dist/cjs/schema/default-schema.js +1 -1
- package/dist/cjs/schema/index.js +2 -2
- package/dist/cjs/schema/nodes/index.js +2 -2
- package/dist/cjs/schema/nodes/list-item.js +10 -23
- package/dist/cjs/validator-schema/generated/validatorSpec.js +4 -15
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +1 -12
- package/dist/es2019/next-schema/nodes/list.js +4 -9
- package/dist/es2019/schema/default-schema.js +2 -2
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/schema/nodes/list-item.js +10 -19
- package/dist/es2019/validator-schema/generated/validatorSpec.js +3 -14
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +1 -12
- package/dist/esm/next-schema/nodes/list.js +4 -9
- package/dist/esm/schema/default-schema.js +2 -2
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/schema/nodes/list-item.js +10 -21
- package/dist/esm/validator-schema/generated/validatorSpec.js +3 -14
- package/dist/json-schema/v1/stage-0.json +31 -115
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +5 -15
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +1 -1
- package/dist/types/schema/nodes/list-item.d.ts +10 -30
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +1 -12
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +5 -15
- package/dist/types-ts4.5/schema/index.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/index.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/list-item.d.ts +10 -30
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +1 -12
- package/json-schema/v1/stage-0.json +31 -115
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 52.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`19274be1b1972`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/19274be1b1972) -
|
|
8
|
+
[ux] EDITOR-5417 Flexible list indentation ADF schema + validator support
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 51.5.23
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 51.5.22
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -837,10 +837,10 @@ Object.defineProperty(exports, "listItem", {
|
|
|
837
837
|
return _schema.listItem;
|
|
838
838
|
}
|
|
839
839
|
});
|
|
840
|
-
Object.defineProperty(exports, "
|
|
840
|
+
Object.defineProperty(exports, "listItemWithFlexibleFirstChildStage0", {
|
|
841
841
|
enumerable: true,
|
|
842
842
|
get: function get() {
|
|
843
|
-
return _schema.
|
|
843
|
+
return _schema.listItemWithFlexibleFirstChildStage0;
|
|
844
844
|
}
|
|
845
845
|
});
|
|
846
846
|
Object.defineProperty(exports, "listItemWithLocalId", {
|
|
@@ -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.
|
|
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.listItemWithFlexibleFirstChildStage0 = 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,7 +671,7 @@ var listItem = exports.listItem = (0, _createPMSpecFactory.createPMNodeSpecFacto
|
|
|
671
671
|
selectable: false,
|
|
672
672
|
defining: true
|
|
673
673
|
});
|
|
674
|
-
var
|
|
674
|
+
var listItemWithFlexibleFirstChildStage0 = exports.listItemWithFlexibleFirstChildStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
675
675
|
content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
|
|
676
676
|
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
677
677
|
attrs: {
|
|
@@ -682,17 +682,6 @@ var listItemFlexibleFirstChildStage0 = exports.listItemFlexibleFirstChildStage0
|
|
|
682
682
|
selectable: false,
|
|
683
683
|
defining: true
|
|
684
684
|
});
|
|
685
|
-
var listItemWithNestedDecisionStage0 = exports.listItemWithNestedDecisionStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
686
|
-
content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*',
|
|
687
|
-
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
688
|
-
attrs: {
|
|
689
|
-
localId: {
|
|
690
|
-
default: null
|
|
691
|
-
}
|
|
692
|
-
},
|
|
693
|
-
selectable: false,
|
|
694
|
-
defining: true
|
|
695
|
-
});
|
|
696
685
|
var media = exports.media = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
697
686
|
attrs: {
|
|
698
687
|
type: {
|
|
@@ -8,12 +8,11 @@ var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
|
|
8
8
|
var _unsupportedMark = require("../marks/unsupportedMark");
|
|
9
9
|
var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
|
|
10
10
|
var _codeBlock = require("./codeBlock");
|
|
11
|
+
var _extension = require("./extension");
|
|
11
12
|
var _mediaSingle = require("./mediaSingle");
|
|
12
13
|
var _paragraph = require("./paragraph");
|
|
13
14
|
var _task = require("./task");
|
|
14
15
|
var _unsupportedBlock = require("./unsupportedBlock");
|
|
15
|
-
var _decisionList = require("./decisionList");
|
|
16
|
-
var _extension = require("./extension");
|
|
17
16
|
var orderedList = exports.orderedList = (0, _adfSchemaGenerator.adfNode)('orderedList');
|
|
18
17
|
var bulletList = exports.bulletList = (0, _adfSchemaGenerator.adfNode)('bulletList');
|
|
19
18
|
var listItem = (0, _adfSchemaGenerator.adfNode)('listItem').define({
|
|
@@ -29,11 +28,7 @@ var listItem = (0, _adfSchemaGenerator.adfNode)('listItem').define({
|
|
|
29
28
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
30
29
|
contentMinItems: 1,
|
|
31
30
|
content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock, _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, _extension.extension.use('with_marks')))]
|
|
32
|
-
}).variant('
|
|
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
|
-
noExtend: true,
|
|
35
|
-
stage0: true
|
|
36
|
-
}).variant('flexible_first_child', {
|
|
31
|
+
}).variant('with_flexible_first_child', {
|
|
37
32
|
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
33
|
noExtend: true,
|
|
39
34
|
stage0: true
|
|
@@ -54,12 +49,12 @@ orderedList.define({
|
|
|
54
49
|
optional: true
|
|
55
50
|
}
|
|
56
51
|
},
|
|
57
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem, listItem.use('
|
|
52
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem, listItem.use('with_flexible_first_child')))]
|
|
58
53
|
});
|
|
59
54
|
bulletList.define({
|
|
60
55
|
selectable: false,
|
|
61
56
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
62
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem, listItem.use('
|
|
57
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem, listItem.use('with_flexible_first_child')))],
|
|
63
58
|
attrs: {
|
|
64
59
|
localId: {
|
|
65
60
|
type: 'string',
|
|
@@ -31,7 +31,7 @@ function () {
|
|
|
31
31
|
multiBodiedExtension: _nodes.multiBodiedExtension,
|
|
32
32
|
extensionFrame: _nodes.extensionFrame,
|
|
33
33
|
expand: _nodes.expandWithNestedExpand,
|
|
34
|
-
listItem: _nodes.
|
|
34
|
+
listItem: _nodes.listItemWithFlexibleFirstChildStage0,
|
|
35
35
|
table: _nodes.tableWithNestedTable,
|
|
36
36
|
tableRow: _nodes.tableRowWithNestedTable,
|
|
37
37
|
tableCell: _nodes.tableCellWithNestedTable,
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -483,10 +483,10 @@ Object.defineProperty(exports, "listItem", {
|
|
|
483
483
|
return _nodes.listItem;
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
|
-
Object.defineProperty(exports, "
|
|
486
|
+
Object.defineProperty(exports, "listItemWithFlexibleFirstChildStage0", {
|
|
487
487
|
enumerable: true,
|
|
488
488
|
get: function get() {
|
|
489
|
-
return _nodes.
|
|
489
|
+
return _nodes.listItemWithFlexibleFirstChildStage0;
|
|
490
490
|
}
|
|
491
491
|
});
|
|
492
492
|
Object.defineProperty(exports, "listItemWithLocalId", {
|
|
@@ -322,10 +322,10 @@ Object.defineProperty(exports, "listItem", {
|
|
|
322
322
|
return _listItem.listItem;
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
|
-
Object.defineProperty(exports, "
|
|
325
|
+
Object.defineProperty(exports, "listItemWithFlexibleFirstChildStage0", {
|
|
326
326
|
enumerable: true,
|
|
327
327
|
get: function get() {
|
|
328
|
-
return _listItem.
|
|
328
|
+
return _listItem.listItemWithFlexibleFirstChildStage0;
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
331
|
Object.defineProperty(exports, "listItemWithLocalId", {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _utils = require("../../utils");
|
|
6
|
+
exports.listItemWithLocalId = exports.listItemWithFlexibleFirstChildStage0 = exports.listItem = void 0;
|
|
10
7
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
|
11
|
-
|
|
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; }
|
|
8
|
+
var _utils = require("../../utils");
|
|
13
9
|
/**
|
|
14
10
|
* @name list_item
|
|
15
11
|
* @description this node allows task-list to be nested inside list-item
|
|
@@ -22,6 +18,11 @@ var listItem = exports.listItem = (0, _nodeTypes.listItem)({
|
|
|
22
18
|
return ['li', 0];
|
|
23
19
|
}
|
|
24
20
|
});
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @name list_item_with_local_id
|
|
24
|
+
* @description this node allows list items to have a localId attribute
|
|
25
|
+
*/
|
|
25
26
|
var listItemWithLocalId = exports.listItemWithLocalId = (0, _nodeTypes.listItem)({
|
|
26
27
|
parseDOM: [{
|
|
27
28
|
tag: 'li',
|
|
@@ -40,24 +41,10 @@ var listItemWithLocalId = exports.listItemWithLocalId = (0, _nodeTypes.listItem)
|
|
|
40
41
|
});
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
|
-
* @name
|
|
44
|
-
* @description
|
|
44
|
+
* @name list_item_with_flexible_first_child_stage0
|
|
45
|
+
* @description stage0 listItem with flexible first child (see EDITOR-5417)
|
|
45
46
|
*/
|
|
46
|
-
var
|
|
47
|
-
parseDOM: [{
|
|
48
|
-
tag: 'li'
|
|
49
|
-
}],
|
|
50
|
-
toDOM: function toDOM() {
|
|
51
|
-
return ['li', 0];
|
|
52
|
-
}
|
|
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
|
-
});
|
|
60
|
-
var listItemWithNestedDecisionAndLocalIdStage0 = exports.listItemWithNestedDecisionAndLocalIdStage0 = (0, _nodeTypes.listItemWithNestedDecisionStage0)({
|
|
47
|
+
var listItemWithFlexibleFirstChildStage0 = exports.listItemWithFlexibleFirstChildStage0 = (0, _nodeTypes.listItemWithFlexibleFirstChildStage0)({
|
|
61
48
|
parseDOM: [{
|
|
62
49
|
tag: 'li',
|
|
63
50
|
getAttrs: function getAttrs() {
|
|
@@ -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.
|
|
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_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', '
|
|
330
|
+
items: [['listItem', 'listItem_with_flexible_first_child']],
|
|
331
331
|
minItems: 1
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -1069,7 +1069,7 @@ var listItem = exports.listItem = {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
};
|
|
1072
|
-
var
|
|
1072
|
+
var listItem_with_flexible_first_child = exports.listItem_with_flexible_first_child = ['listItem', {
|
|
1073
1073
|
props: {
|
|
1074
1074
|
content: {
|
|
1075
1075
|
type: 'array',
|
|
@@ -1079,17 +1079,6 @@ var listItem_flexible_first_child = exports.listItem_flexible_first_child = ['li
|
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
1081
1081
|
}];
|
|
1082
|
-
var listItem_with_nested_decision = exports.listItem_with_nested_decision = ['listItem', {
|
|
1083
|
-
props: {
|
|
1084
|
-
content: {
|
|
1085
|
-
type: 'array',
|
|
1086
|
-
isTupleLike: true,
|
|
1087
|
-
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'decisionList', 'extension_with_marks'], ['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'decisionList', 'extension_with_marks']],
|
|
1088
|
-
minItems: 1,
|
|
1089
|
-
allowUnsupportedBlock: true
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
}];
|
|
1093
1082
|
var media = exports.media = {
|
|
1094
1083
|
props: {
|
|
1095
1084
|
type: {
|
|
@@ -1472,7 +1461,7 @@ var orderedList = exports.orderedList = {
|
|
|
1472
1461
|
},
|
|
1473
1462
|
content: {
|
|
1474
1463
|
type: 'array',
|
|
1475
|
-
items: [['listItem', '
|
|
1464
|
+
items: [['listItem', 'listItem_with_flexible_first_child']],
|
|
1476
1465
|
minItems: 1
|
|
1477
1466
|
}
|
|
1478
1467
|
}
|
package/dist/es2019/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
|
|
3
3
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
5
|
-
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, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem,
|
|
5
|
+
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, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithFlexibleFirstChildStage0, listItemWithLocalId, 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, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
|
|
6
6
|
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';
|
|
7
7
|
|
|
8
8
|
// ADF createPMSpecFactory
|
|
@@ -665,7 +665,7 @@ export const listItem = createPMNodeSpecFactory({
|
|
|
665
665
|
selectable: false,
|
|
666
666
|
defining: true
|
|
667
667
|
});
|
|
668
|
-
export const
|
|
668
|
+
export const listItemWithFlexibleFirstChildStage0 = createPMNodeSpecFactory({
|
|
669
669
|
content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
|
|
670
670
|
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
671
671
|
attrs: {
|
|
@@ -676,17 +676,6 @@ export const listItemFlexibleFirstChildStage0 = createPMNodeSpecFactory({
|
|
|
676
676
|
selectable: false,
|
|
677
677
|
defining: true
|
|
678
678
|
});
|
|
679
|
-
export const listItemWithNestedDecisionStage0 = createPMNodeSpecFactory({
|
|
680
|
-
content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*',
|
|
681
|
-
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
682
|
-
attrs: {
|
|
683
|
-
localId: {
|
|
684
|
-
default: null
|
|
685
|
-
}
|
|
686
|
-
},
|
|
687
|
-
selectable: false,
|
|
688
|
-
defining: true
|
|
689
|
-
});
|
|
690
679
|
export const media = createPMNodeSpecFactory({
|
|
691
680
|
attrs: {
|
|
692
681
|
type: {
|
|
@@ -2,12 +2,11 @@ import { $onePlus, $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generato
|
|
|
2
2
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
3
3
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
4
4
|
import { codeBlock } from './codeBlock';
|
|
5
|
+
import { extension } from './extension';
|
|
5
6
|
import { mediaSingle } from './mediaSingle';
|
|
6
7
|
import { paragraph } from './paragraph';
|
|
7
8
|
import { taskList } from './task';
|
|
8
9
|
import { unsupportedBlock } from './unsupportedBlock';
|
|
9
|
-
import { decisionList } from './decisionList';
|
|
10
|
-
import { extension } from './extension';
|
|
11
10
|
export const orderedList = adfNode('orderedList');
|
|
12
11
|
export const bulletList = adfNode('bulletList');
|
|
13
12
|
const listItem = adfNode('listItem').define({
|
|
@@ -23,11 +22,7 @@ const listItem = adfNode('listItem').define({
|
|
|
23
22
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
24
23
|
contentMinItems: 1,
|
|
25
24
|
content: [$or(paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))]
|
|
26
|
-
}).variant('
|
|
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
|
-
noExtend: true,
|
|
29
|
-
stage0: true
|
|
30
|
-
}).variant('flexible_first_child', {
|
|
25
|
+
}).variant('with_flexible_first_child', {
|
|
31
26
|
content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))],
|
|
32
27
|
noExtend: true,
|
|
33
28
|
stage0: true
|
|
@@ -48,12 +43,12 @@ orderedList.define({
|
|
|
48
43
|
optional: true
|
|
49
44
|
}
|
|
50
45
|
},
|
|
51
|
-
content: [$onePlus($or(listItem, listItem.use('
|
|
46
|
+
content: [$onePlus($or(listItem, listItem.use('with_flexible_first_child')))]
|
|
52
47
|
});
|
|
53
48
|
bulletList.define({
|
|
54
49
|
selectable: false,
|
|
55
50
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
56
|
-
content: [$onePlus($or(listItem, listItem.use('
|
|
51
|
+
content: [$onePlus($or(listItem, listItem.use('with_flexible_first_child')))],
|
|
57
52
|
attrs: {
|
|
58
53
|
localId: {
|
|
59
54
|
type: 'string',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable,
|
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithFlexibleFirstChildStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
4
|
const getDefaultSchemaConfig = () => {
|
|
5
5
|
const defaultSchemaConfig = {
|
|
@@ -23,7 +23,7 @@ export const getSchemaBasedOnStage = memoizeOne(
|
|
|
23
23
|
multiBodiedExtension: multiBodiedExtension,
|
|
24
24
|
extensionFrame: extensionFrame,
|
|
25
25
|
expand: expandWithNestedExpand,
|
|
26
|
-
listItem:
|
|
26
|
+
listItem: listItemWithFlexibleFirstChildStage0,
|
|
27
27
|
table: tableWithNestedTable,
|
|
28
28
|
tableRow: tableRowWithNestedTable,
|
|
29
29
|
tableCell: tableCellWithNestedTable,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
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, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem,
|
|
2
|
+
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, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithFlexibleFirstChildStage0, listItemWithLocalId, 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, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
|
4
4
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
5
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
@@ -15,7 +15,7 @@ export { paragraph } from './paragraph';
|
|
|
15
15
|
export { emoji, emojiWithLocalId } from './emoji';
|
|
16
16
|
export { image } from './image';
|
|
17
17
|
export { mention, toJSON as mentionToJSON } from './mention';
|
|
18
|
-
export { listItem,
|
|
18
|
+
export { listItem, listItemWithFlexibleFirstChildStage0, listItemWithLocalId } from './list-item';
|
|
19
19
|
export { extendedPanel, extendedPanelWithLocalId, PanelType } from './panel';
|
|
20
20
|
export { text } from './text';
|
|
21
21
|
export { default as unknownBlock } from './unknown-block';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { listItem as listItemFactory, listItemWithFlexibleFirstChildStage0 as listItemWithFlexibleFirstChildStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
1
2
|
import { uuid } from '../../utils';
|
|
2
|
-
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* @name list_item
|
|
5
6
|
* @description this node allows task-list to be nested inside list-item
|
|
@@ -12,6 +13,11 @@ export const listItem = listItemFactory({
|
|
|
12
13
|
return ['li', 0];
|
|
13
14
|
}
|
|
14
15
|
});
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @name list_item_with_local_id
|
|
19
|
+
* @description this node allows list items to have a localId attribute
|
|
20
|
+
*/
|
|
15
21
|
export const listItemWithLocalId = listItemFactory({
|
|
16
22
|
parseDOM: [{
|
|
17
23
|
tag: 'li',
|
|
@@ -28,25 +34,10 @@ export const listItemWithLocalId = listItemFactory({
|
|
|
28
34
|
});
|
|
29
35
|
|
|
30
36
|
/**
|
|
31
|
-
* @name
|
|
32
|
-
* @description
|
|
37
|
+
* @name list_item_with_flexible_first_child_stage0
|
|
38
|
+
* @description stage0 listItem with flexible first child (see EDITOR-5417)
|
|
33
39
|
*/
|
|
34
|
-
const
|
|
35
|
-
parseDOM: [{
|
|
36
|
-
tag: 'li'
|
|
37
|
-
}],
|
|
38
|
-
toDOM() {
|
|
39
|
-
return ['li', 0];
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// Allow list-first content while preserving decisionList support in stage0.
|
|
44
|
-
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)+)';
|
|
45
|
-
export const listItemWithDecisionStage0 = {
|
|
46
|
-
...listItemWithDecisionStage0Spec,
|
|
47
|
-
content: listItemStage0Content
|
|
48
|
-
};
|
|
49
|
-
export const listItemWithNestedDecisionAndLocalIdStage0 = listItemWithNestedDecisionStage0Factory({
|
|
40
|
+
export const listItemWithFlexibleFirstChildStage0 = listItemWithFlexibleFirstChildStage0Factory({
|
|
50
41
|
parseDOM: [{
|
|
51
42
|
tag: 'li',
|
|
52
43
|
getAttrs: () => ({
|
|
@@ -321,7 +321,7 @@ export const bulletList = {
|
|
|
321
321
|
},
|
|
322
322
|
content: {
|
|
323
323
|
type: 'array',
|
|
324
|
-
items: [['listItem', '
|
|
324
|
+
items: [['listItem', 'listItem_with_flexible_first_child']],
|
|
325
325
|
minItems: 1
|
|
326
326
|
}
|
|
327
327
|
}
|
|
@@ -1063,7 +1063,7 @@ export const listItem = {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
};
|
|
1066
|
-
export const
|
|
1066
|
+
export const listItem_with_flexible_first_child = ['listItem', {
|
|
1067
1067
|
props: {
|
|
1068
1068
|
content: {
|
|
1069
1069
|
type: 'array',
|
|
@@ -1073,17 +1073,6 @@ export const listItem_flexible_first_child = ['listItem', {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
1075
|
}];
|
|
1076
|
-
export const listItem_with_nested_decision = ['listItem', {
|
|
1077
|
-
props: {
|
|
1078
|
-
content: {
|
|
1079
|
-
type: 'array',
|
|
1080
|
-
isTupleLike: true,
|
|
1081
|
-
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'decisionList', 'extension_with_marks'], ['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'decisionList', 'extension_with_marks']],
|
|
1082
|
-
minItems: 1,
|
|
1083
|
-
allowUnsupportedBlock: true
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
}];
|
|
1087
1076
|
export const media = {
|
|
1088
1077
|
props: {
|
|
1089
1078
|
type: {
|
|
@@ -1466,7 +1455,7 @@ export const orderedList = {
|
|
|
1466
1455
|
},
|
|
1467
1456
|
content: {
|
|
1468
1457
|
type: 'array',
|
|
1469
|
-
items: [['listItem', '
|
|
1458
|
+
items: [['listItem', 'listItem_with_flexible_first_child']],
|
|
1470
1459
|
minItems: 1
|
|
1471
1460
|
}
|
|
1472
1461
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
|
|
3
3
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
5
|
-
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, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem,
|
|
5
|
+
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, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithFlexibleFirstChildStage0, listItemWithLocalId, 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, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
|
|
6
6
|
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';
|
|
7
7
|
|
|
8
8
|
// ADF createPMSpecFactory
|
|
@@ -665,7 +665,7 @@ export var listItem = createPMNodeSpecFactory({
|
|
|
665
665
|
selectable: false,
|
|
666
666
|
defining: true
|
|
667
667
|
});
|
|
668
|
-
export var
|
|
668
|
+
export var listItemWithFlexibleFirstChildStage0 = createPMNodeSpecFactory({
|
|
669
669
|
content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
|
|
670
670
|
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
671
671
|
attrs: {
|
|
@@ -676,17 +676,6 @@ export var listItemFlexibleFirstChildStage0 = createPMNodeSpecFactory({
|
|
|
676
676
|
selectable: false,
|
|
677
677
|
defining: true
|
|
678
678
|
});
|
|
679
|
-
export var listItemWithNestedDecisionStage0 = createPMNodeSpecFactory({
|
|
680
|
-
content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*',
|
|
681
|
-
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
682
|
-
attrs: {
|
|
683
|
-
localId: {
|
|
684
|
-
default: null
|
|
685
|
-
}
|
|
686
|
-
},
|
|
687
|
-
selectable: false,
|
|
688
|
-
defining: true
|
|
689
|
-
});
|
|
690
679
|
export var media = createPMNodeSpecFactory({
|
|
691
680
|
attrs: {
|
|
692
681
|
type: {
|
|
@@ -2,12 +2,11 @@ import { $onePlus, $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generato
|
|
|
2
2
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
3
3
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
4
4
|
import { codeBlock } from './codeBlock';
|
|
5
|
+
import { extension } from './extension';
|
|
5
6
|
import { mediaSingle } from './mediaSingle';
|
|
6
7
|
import { paragraph } from './paragraph';
|
|
7
8
|
import { taskList } from './task';
|
|
8
9
|
import { unsupportedBlock } from './unsupportedBlock';
|
|
9
|
-
import { decisionList } from './decisionList';
|
|
10
|
-
import { extension } from './extension';
|
|
11
10
|
export var orderedList = adfNode('orderedList');
|
|
12
11
|
export var bulletList = adfNode('bulletList');
|
|
13
12
|
var listItem = adfNode('listItem').define({
|
|
@@ -23,11 +22,7 @@ var listItem = adfNode('listItem').define({
|
|
|
23
22
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
24
23
|
contentMinItems: 1,
|
|
25
24
|
content: [$or(paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))]
|
|
26
|
-
}).variant('
|
|
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
|
-
noExtend: true,
|
|
29
|
-
stage0: true
|
|
30
|
-
}).variant('flexible_first_child', {
|
|
25
|
+
}).variant('with_flexible_first_child', {
|
|
31
26
|
content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))],
|
|
32
27
|
noExtend: true,
|
|
33
28
|
stage0: true
|
|
@@ -48,12 +43,12 @@ orderedList.define({
|
|
|
48
43
|
optional: true
|
|
49
44
|
}
|
|
50
45
|
},
|
|
51
|
-
content: [$onePlus($or(listItem, listItem.use('
|
|
46
|
+
content: [$onePlus($or(listItem, listItem.use('with_flexible_first_child')))]
|
|
52
47
|
});
|
|
53
48
|
bulletList.define({
|
|
54
49
|
selectable: false,
|
|
55
50
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
56
|
-
content: [$onePlus($or(listItem, listItem.use('
|
|
51
|
+
content: [$onePlus($or(listItem, listItem.use('with_flexible_first_child')))],
|
|
57
52
|
attrs: {
|
|
58
53
|
localId: {
|
|
59
54
|
type: 'string',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable,
|
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithFlexibleFirstChildStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
4
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
5
5
|
var defaultSchemaConfig = {
|
|
@@ -24,7 +24,7 @@ function () {
|
|
|
24
24
|
multiBodiedExtension: multiBodiedExtension,
|
|
25
25
|
extensionFrame: extensionFrame,
|
|
26
26
|
expand: expandWithNestedExpand,
|
|
27
|
-
listItem:
|
|
27
|
+
listItem: listItemWithFlexibleFirstChildStage0,
|
|
28
28
|
table: tableWithNestedTable,
|
|
29
29
|
tableRow: tableRowWithNestedTable,
|
|
30
30
|
tableCell: tableCellWithNestedTable,
|