@atlaskit/adf-schema 52.6.6 → 52.7.1
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 +22 -0
- package/dist/cjs/index.js +0 -12
- package/dist/cjs/next-schema/generated/nodeTypes.js +2 -24
- package/dist/cjs/next-schema/nodes/list.js +3 -7
- package/dist/cjs/next-schema/nodes/task.js +2 -7
- package/dist/cjs/schema/default-schema.js +0 -2
- package/dist/cjs/schema/index.js +0 -12
- package/dist/cjs/schema/nodes/index.js +0 -12
- package/dist/cjs/schema/nodes/list-item.js +1 -24
- package/dist/cjs/schema/nodes/task-list.js +3 -13
- package/dist/cjs/validator-schema/generated/validatorSpec.js +5 -27
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +1 -23
- package/dist/es2019/next-schema/nodes/list.js +5 -9
- package/dist/es2019/next-schema/nodes/task.js +1 -6
- package/dist/es2019/schema/default-schema.js +1 -3
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +2 -2
- package/dist/es2019/schema/nodes/list-item.js +1 -22
- package/dist/es2019/schema/nodes/task-list.js +3 -10
- package/dist/es2019/validator-schema/generated/validatorSpec.js +4 -26
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +1 -23
- package/dist/esm/next-schema/nodes/list.js +5 -9
- package/dist/esm/next-schema/nodes/task.js +1 -6
- package/dist/esm/schema/default-schema.js +1 -3
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +2 -2
- package/dist/esm/schema/nodes/list-item.js +1 -24
- package/dist/esm/schema/nodes/task-list.js +3 -12
- package/dist/esm/validator-schema/generated/validatorSpec.js +4 -26
- package/dist/json-schema/v1/full.json +41 -74
- package/dist/json-schema/v1/stage-0.json +15 -153
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +4 -24
- package/dist/types/next-schema/nodes/task.d.ts +1 -9
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +2 -2
- package/dist/types/schema/nodes/list-item.d.ts +0 -7
- package/dist/types/schema/nodes/task-list.d.ts +2 -4
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +2 -24
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +4 -24
- package/dist/types-ts4.5/next-schema/nodes/task.d.ts +1 -9
- package/dist/types-ts4.5/schema/index.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/index.d.ts +2 -2
- package/dist/types-ts4.5/schema/nodes/list-item.d.ts +0 -7
- package/dist/types-ts4.5/schema/nodes/task-list.d.ts +2 -4
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +2 -24
- package/json-schema/v1/full.json +41 -74
- package/json-schema/v1/stage-0.json +15 -153
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 52.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 52.7.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`9ea3b02135766`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ea3b02135766) -
|
|
14
|
+
EDITOR-5613: Remove flexible list variants and consolidate into base list types.
|
|
15
|
+
|
|
16
|
+
The `listItem` and `taskList` node specs now natively support the flexible content model (allowing
|
|
17
|
+
lists as first child of listItem, and nested taskLists without requiring taskItem first). The
|
|
18
|
+
separate `listItemWithFlexibleFirstChildStage0` and `taskListWithFlexibleFirstChildStage0`
|
|
19
|
+
variants have been removed from public exports — the flexible behavior is now the default for all
|
|
20
|
+
schema stages. Consumers importing these removed exports should switch to `listItem` / `taskList`.
|
|
21
|
+
|
|
22
|
+
This is a schema simplification: the flexible content spec is a strict superset of the old
|
|
23
|
+
restrictive spec, so all previously valid content remains valid.
|
|
24
|
+
|
|
3
25
|
## 52.6.6
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -843,12 +843,6 @@ Object.defineProperty(exports, "listItem", {
|
|
|
843
843
|
return _schema.listItem;
|
|
844
844
|
}
|
|
845
845
|
});
|
|
846
|
-
Object.defineProperty(exports, "listItemWithFlexibleFirstChildStage0", {
|
|
847
|
-
enumerable: true,
|
|
848
|
-
get: function get() {
|
|
849
|
-
return _schema.listItemWithFlexibleFirstChildStage0;
|
|
850
|
-
}
|
|
851
|
-
});
|
|
852
846
|
Object.defineProperty(exports, "listItemWithLocalId", {
|
|
853
847
|
enumerable: true,
|
|
854
848
|
get: function get() {
|
|
@@ -1233,12 +1227,6 @@ Object.defineProperty(exports, "taskListSelector", {
|
|
|
1233
1227
|
return _schema.taskListSelector;
|
|
1234
1228
|
}
|
|
1235
1229
|
});
|
|
1236
|
-
Object.defineProperty(exports, "taskListWithFlexibleFirstChildStage0", {
|
|
1237
|
-
enumerable: true,
|
|
1238
|
-
get: function get() {
|
|
1239
|
-
return _schema.taskListWithFlexibleFirstChildStage0;
|
|
1240
|
-
}
|
|
1241
|
-
});
|
|
1242
1230
|
Object.defineProperty(exports, "text", {
|
|
1243
1231
|
enumerable: true,
|
|
1244
1232
|
get: function get() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.
|
|
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.paragraphWithFontSizeStage0 = exports.paragraphWithFontSizeAndIndentationStage0 = exports.paragraphWithFontSizeAndAlignmentStage0 = 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.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
|
|
@@ -661,17 +661,6 @@ var layoutSectionWithSingleColumnStage0 = exports.layoutSectionWithSingleColumnS
|
|
|
661
661
|
isolating: true
|
|
662
662
|
});
|
|
663
663
|
var listItem = exports.listItem = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
664
|
-
content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)*',
|
|
665
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
666
|
-
attrs: {
|
|
667
|
-
localId: {
|
|
668
|
-
default: null
|
|
669
|
-
}
|
|
670
|
-
},
|
|
671
|
-
selectable: false,
|
|
672
|
-
defining: true
|
|
673
|
-
});
|
|
674
|
-
var listItemWithFlexibleFirstChildStage0 = exports.listItemWithFlexibleFirstChildStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
675
664
|
content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
|
|
676
665
|
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
677
666
|
attrs: {
|
|
@@ -1336,20 +1325,9 @@ var taskItem = exports.taskItem = (0, _createPMSpecFactory.createPMNodeSpecFacto
|
|
|
1336
1325
|
defining: true
|
|
1337
1326
|
});
|
|
1338
1327
|
var taskList = exports.taskList = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1339
|
-
content: '(taskItem | unsupportedBlock | blockTaskItem)+ (taskItem | taskList | unsupportedBlock | blockTaskItem)*',
|
|
1340
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
1341
|
-
group: 'block',
|
|
1342
|
-
attrs: {
|
|
1343
|
-
localId: {
|
|
1344
|
-
default: ''
|
|
1345
|
-
}
|
|
1346
|
-
},
|
|
1347
|
-
selectable: false,
|
|
1348
|
-
defining: true
|
|
1349
|
-
});
|
|
1350
|
-
var taskListWithFlexibleFirstChildStage0 = exports.taskListWithFlexibleFirstChildStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1351
1328
|
content: '(taskItem | taskList | unsupportedBlock | blockTaskItem)+',
|
|
1352
1329
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
1330
|
+
group: 'block',
|
|
1353
1331
|
attrs: {
|
|
1354
1332
|
localId: {
|
|
1355
1333
|
default: ''
|
|
@@ -27,11 +27,7 @@ var listItem = (0, _adfSchemaGenerator.adfNode)('listItem').define({
|
|
|
27
27
|
},
|
|
28
28
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
29
29
|
contentMinItems: 1,
|
|
30
|
-
content: [(0, _adfSchemaGenerator.$
|
|
31
|
-
}).variant('with_flexible_first_child', {
|
|
32
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_font_size'), _paragraph.paragraph.use('with_no_marks'), bulletList, orderedList, _task.taskList, _task.taskListWithFlexibleFirstChild.use('with_flexible_first_child'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock, _extension.extension.use('with_marks')))],
|
|
33
|
-
noExtend: true,
|
|
34
|
-
stage0: true
|
|
30
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_font_size'), _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')))]
|
|
35
31
|
});
|
|
36
32
|
orderedList.define({
|
|
37
33
|
selectable: false,
|
|
@@ -49,12 +45,12 @@ orderedList.define({
|
|
|
49
45
|
optional: true
|
|
50
46
|
}
|
|
51
47
|
},
|
|
52
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem
|
|
48
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem))]
|
|
53
49
|
});
|
|
54
50
|
bulletList.define({
|
|
55
51
|
selectable: false,
|
|
56
52
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
57
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem
|
|
53
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(listItem))],
|
|
58
54
|
attrs: {
|
|
59
55
|
localId: {
|
|
60
56
|
type: 'string',
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.taskList = exports.taskItem = exports.blockTaskItem = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
|
10
10
|
var _inlineContentGroup = require("../groups/inlineContentGroup");
|
|
@@ -57,10 +57,5 @@ taskList.define({
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
contentMinItems: 1,
|
|
60
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(taskItem,
|
|
61
|
-
});
|
|
62
|
-
var taskListWithFlexibleFirstChild = exports.taskListWithFlexibleFirstChild = taskList.variant('with_flexible_first_child', {
|
|
63
|
-
contentMinItems: 1,
|
|
64
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(taskItem, taskList, _unsupportedBlock.unsupportedBlock, blockTaskItem))],
|
|
65
|
-
stage0: true
|
|
60
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(taskItem, taskList, _unsupportedBlock.unsupportedBlock, blockTaskItem))]
|
|
66
61
|
});
|
|
@@ -32,8 +32,6 @@ function () {
|
|
|
32
32
|
multiBodiedExtension: _nodes.multiBodiedExtension,
|
|
33
33
|
extensionFrame: _nodes.extensionFrame,
|
|
34
34
|
expand: _nodes.expandWithNestedExpand,
|
|
35
|
-
listItem: _nodes.listItemWithFlexibleFirstChildStage0,
|
|
36
|
-
taskList: _nodes.taskListWithFlexibleFirstChildStage0,
|
|
37
35
|
table: _nodes.tableWithNestedTable,
|
|
38
36
|
tableRow: _nodes.tableRowWithNestedTable,
|
|
39
37
|
tableCell: _nodes.tableCellWithNestedTable,
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -489,12 +489,6 @@ Object.defineProperty(exports, "listItem", {
|
|
|
489
489
|
return _nodes.listItem;
|
|
490
490
|
}
|
|
491
491
|
});
|
|
492
|
-
Object.defineProperty(exports, "listItemWithFlexibleFirstChildStage0", {
|
|
493
|
-
enumerable: true,
|
|
494
|
-
get: function get() {
|
|
495
|
-
return _nodes.listItemWithFlexibleFirstChildStage0;
|
|
496
|
-
}
|
|
497
|
-
});
|
|
498
492
|
Object.defineProperty(exports, "listItemWithLocalId", {
|
|
499
493
|
enumerable: true,
|
|
500
494
|
get: function get() {
|
|
@@ -861,12 +855,6 @@ Object.defineProperty(exports, "taskListSelector", {
|
|
|
861
855
|
return _nodes.taskListSelector;
|
|
862
856
|
}
|
|
863
857
|
});
|
|
864
|
-
Object.defineProperty(exports, "taskListWithFlexibleFirstChildStage0", {
|
|
865
|
-
enumerable: true,
|
|
866
|
-
get: function get() {
|
|
867
|
-
return _nodes.taskListWithFlexibleFirstChildStage0;
|
|
868
|
-
}
|
|
869
|
-
});
|
|
870
858
|
Object.defineProperty(exports, "text", {
|
|
871
859
|
enumerable: true,
|
|
872
860
|
get: function get() {
|
|
@@ -322,12 +322,6 @@ Object.defineProperty(exports, "listItem", {
|
|
|
322
322
|
return _listItem.listItem;
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
|
-
Object.defineProperty(exports, "listItemWithFlexibleFirstChildStage0", {
|
|
326
|
-
enumerable: true,
|
|
327
|
-
get: function get() {
|
|
328
|
-
return _listItem.listItemWithFlexibleFirstChildStage0;
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
325
|
Object.defineProperty(exports, "listItemWithLocalId", {
|
|
332
326
|
enumerable: true,
|
|
333
327
|
get: function get() {
|
|
@@ -670,12 +664,6 @@ Object.defineProperty(exports, "taskListSelector", {
|
|
|
670
664
|
return _taskList.taskListSelector;
|
|
671
665
|
}
|
|
672
666
|
});
|
|
673
|
-
Object.defineProperty(exports, "taskListWithFlexibleFirstChildStage0", {
|
|
674
|
-
enumerable: true,
|
|
675
|
-
get: function get() {
|
|
676
|
-
return _taskList.taskListWithFlexibleFirstChildStage0;
|
|
677
|
-
}
|
|
678
|
-
});
|
|
679
667
|
Object.defineProperty(exports, "text", {
|
|
680
668
|
enumerable: true,
|
|
681
669
|
get: function get() {
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.listItemWithLocalId = exports.
|
|
6
|
+
exports.listItemWithLocalId = exports.listItem = void 0;
|
|
7
7
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
|
8
8
|
var _utils = require("../../utils");
|
|
9
9
|
/**
|
|
10
10
|
* @name list_item
|
|
11
|
-
* @description this node allows task-list to be nested inside list-item
|
|
12
11
|
*/
|
|
13
12
|
var listItem = exports.listItem = (0, _nodeTypes.listItem)({
|
|
14
13
|
parseDOM: [{
|
|
@@ -21,7 +20,6 @@ var listItem = exports.listItem = (0, _nodeTypes.listItem)({
|
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* @name list_item_with_local_id
|
|
24
|
-
* @description this node allows list items to have a localId attribute
|
|
25
23
|
*/
|
|
26
24
|
var listItemWithLocalId = exports.listItemWithLocalId = (0, _nodeTypes.listItem)({
|
|
27
25
|
parseDOM: [{
|
|
@@ -38,25 +36,4 @@ var listItemWithLocalId = exports.listItemWithLocalId = (0, _nodeTypes.listItem)
|
|
|
38
36
|
'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
|
|
39
37
|
}, 0];
|
|
40
38
|
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @name list_item_with_flexible_first_child_stage0
|
|
45
|
-
* @description stage0 listItem with flexible first child (see EDITOR-5417)
|
|
46
|
-
*/
|
|
47
|
-
var listItemWithFlexibleFirstChildStage0 = exports.listItemWithFlexibleFirstChildStage0 = (0, _nodeTypes.listItemWithFlexibleFirstChildStage0)({
|
|
48
|
-
parseDOM: [{
|
|
49
|
-
tag: 'li',
|
|
50
|
-
getAttrs: function getAttrs() {
|
|
51
|
-
return {
|
|
52
|
-
localId: _utils.uuid.generate()
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}],
|
|
56
|
-
toDOM: function toDOM(node) {
|
|
57
|
-
var _node$attrs2;
|
|
58
|
-
return ['li', {
|
|
59
|
-
'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.localId) || undefined
|
|
60
|
-
}, 0];
|
|
61
|
-
}
|
|
62
39
|
});
|
|
@@ -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"));
|
|
6
|
+
exports.taskListSelector = exports.taskList = void 0;
|
|
9
7
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
|
10
8
|
var _uuid = require("../../utils/uuid");
|
|
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; }
|
|
13
9
|
/**
|
|
14
10
|
* @name taskList_node
|
|
15
11
|
*/
|
|
@@ -38,14 +34,8 @@ var taskListParseDOMAndToDOM = {
|
|
|
38
34
|
return ['div', attrs, 0];
|
|
39
35
|
}
|
|
40
36
|
};
|
|
41
|
-
var taskList = exports.taskList = (0, _nodeTypes.taskList)(taskListParseDOMAndToDOM);
|
|
42
|
-
var taskListWithFlexibleFirstChild = (0, _nodeTypes.taskListWithFlexibleFirstChildStage0)(taskListParseDOMAndToDOM);
|
|
43
37
|
|
|
44
38
|
/**
|
|
45
|
-
* @name
|
|
46
|
-
* @description stage0 taskList with flexible first child content (see EDITOR-5417)
|
|
39
|
+
* @name taskList
|
|
47
40
|
*/
|
|
48
|
-
var
|
|
49
|
-
// Generated spec omits PM group; keep taskList in block content for doc validation.
|
|
50
|
-
group: 'block'
|
|
51
|
-
});
|
|
41
|
+
var taskList = exports.taskList = (0, _nodeTypes.taskList)(taskListParseDOMAndToDOM);
|
|
@@ -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.
|
|
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_font_size_and_indentation = exports.paragraph_with_font_size_and_alignment = exports.paragraph_with_font_size = 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 = 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.fontSize = 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: [
|
|
330
|
+
items: ['listItem'],
|
|
331
331
|
minItems: 1
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -1078,23 +1078,12 @@ var listItem = exports.listItem = {
|
|
|
1078
1078
|
},
|
|
1079
1079
|
content: {
|
|
1080
1080
|
type: 'array',
|
|
1081
|
-
|
|
1082
|
-
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks'], ['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1081
|
+
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1083
1082
|
minItems: 1,
|
|
1084
1083
|
allowUnsupportedBlock: true
|
|
1085
1084
|
}
|
|
1086
1085
|
}
|
|
1087
1086
|
};
|
|
1088
|
-
var listItem_with_flexible_first_child = exports.listItem_with_flexible_first_child = ['listItem', {
|
|
1089
|
-
props: {
|
|
1090
|
-
content: {
|
|
1091
|
-
type: 'array',
|
|
1092
|
-
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'taskList_with_flexible_first_child', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1093
|
-
minItems: 1,
|
|
1094
|
-
allowUnsupportedBlock: true
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
}];
|
|
1098
1087
|
var media = exports.media = {
|
|
1099
1088
|
props: {
|
|
1100
1089
|
type: {
|
|
@@ -1477,7 +1466,7 @@ var orderedList = exports.orderedList = {
|
|
|
1477
1466
|
},
|
|
1478
1467
|
content: {
|
|
1479
1468
|
type: 'array',
|
|
1480
|
-
items: [
|
|
1469
|
+
items: ['listItem'],
|
|
1481
1470
|
minItems: 1
|
|
1482
1471
|
}
|
|
1483
1472
|
}
|
|
@@ -1921,17 +1910,6 @@ var taskList = exports.taskList = {
|
|
|
1921
1910
|
}
|
|
1922
1911
|
}
|
|
1923
1912
|
},
|
|
1924
|
-
content: {
|
|
1925
|
-
type: 'array',
|
|
1926
|
-
isTupleLike: true,
|
|
1927
|
-
items: [['taskItem', 'blockTaskItem'], ['taskItem', 'taskList', 'blockTaskItem']],
|
|
1928
|
-
minItems: 1,
|
|
1929
|
-
allowUnsupportedBlock: true
|
|
1930
|
-
}
|
|
1931
|
-
}
|
|
1932
|
-
};
|
|
1933
|
-
var taskList_with_flexible_first_child = exports.taskList_with_flexible_first_child = ['taskList', {
|
|
1934
|
-
props: {
|
|
1935
1913
|
content: {
|
|
1936
1914
|
type: 'array',
|
|
1937
1915
|
items: [['taskItem', 'taskList', 'blockTaskItem']],
|
|
@@ -1939,7 +1917,7 @@ var taskList_with_flexible_first_child = exports.taskList_with_flexible_first_ch
|
|
|
1939
1917
|
allowUnsupportedBlock: true
|
|
1940
1918
|
}
|
|
1941
1919
|
}
|
|
1942
|
-
}
|
|
1920
|
+
};
|
|
1943
1921
|
var text = exports.text = {
|
|
1944
1922
|
props: {
|
|
1945
1923
|
type: {
|
package/dist/es2019/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, fontSize, 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, 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
|
|
@@ -655,17 +655,6 @@ export const layoutSectionWithSingleColumnStage0 = createPMNodeSpecFactory({
|
|
|
655
655
|
isolating: true
|
|
656
656
|
});
|
|
657
657
|
export const listItem = createPMNodeSpecFactory({
|
|
658
|
-
content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)*',
|
|
659
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
660
|
-
attrs: {
|
|
661
|
-
localId: {
|
|
662
|
-
default: null
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
selectable: false,
|
|
666
|
-
defining: true
|
|
667
|
-
});
|
|
668
|
-
export const listItemWithFlexibleFirstChildStage0 = createPMNodeSpecFactory({
|
|
669
658
|
content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
|
|
670
659
|
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
671
660
|
attrs: {
|
|
@@ -1330,20 +1319,9 @@ export const taskItem = createPMNodeSpecFactory({
|
|
|
1330
1319
|
defining: true
|
|
1331
1320
|
});
|
|
1332
1321
|
export const taskList = createPMNodeSpecFactory({
|
|
1333
|
-
content: '(taskItem | unsupportedBlock | blockTaskItem)+ (taskItem | taskList | unsupportedBlock | blockTaskItem)*',
|
|
1334
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
1335
|
-
group: 'block',
|
|
1336
|
-
attrs: {
|
|
1337
|
-
localId: {
|
|
1338
|
-
default: ''
|
|
1339
|
-
}
|
|
1340
|
-
},
|
|
1341
|
-
selectable: false,
|
|
1342
|
-
defining: true
|
|
1343
|
-
});
|
|
1344
|
-
export const taskListWithFlexibleFirstChildStage0 = createPMNodeSpecFactory({
|
|
1345
1322
|
content: '(taskItem | taskList | unsupportedBlock | blockTaskItem)+',
|
|
1346
1323
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
1324
|
+
group: 'block',
|
|
1347
1325
|
attrs: {
|
|
1348
1326
|
localId: {
|
|
1349
1327
|
default: ''
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $onePlus, $or,
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
2
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
3
3
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
4
4
|
import { codeBlock } from './codeBlock';
|
|
5
5
|
import { extension } from './extension';
|
|
6
6
|
import { mediaSingle } from './mediaSingle';
|
|
7
7
|
import { paragraph } from './paragraph';
|
|
8
|
-
import { taskList
|
|
8
|
+
import { taskList } from './task';
|
|
9
9
|
import { unsupportedBlock } from './unsupportedBlock';
|
|
10
10
|
export const orderedList = adfNode('orderedList');
|
|
11
11
|
export const bulletList = adfNode('bulletList');
|
|
@@ -21,11 +21,7 @@ const listItem = adfNode('listItem').define({
|
|
|
21
21
|
},
|
|
22
22
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
23
23
|
contentMinItems: 1,
|
|
24
|
-
content: [$
|
|
25
|
-
}).variant('with_flexible_first_child', {
|
|
26
|
-
content: [$onePlus($or(paragraph.use('with_font_size'), paragraph.use('with_no_marks'), bulletList, orderedList, taskList, taskListWithFlexibleFirstChild.use('with_flexible_first_child'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))],
|
|
27
|
-
noExtend: true,
|
|
28
|
-
stage0: true
|
|
24
|
+
content: [$onePlus($or(paragraph.use('with_font_size'), paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))]
|
|
29
25
|
});
|
|
30
26
|
orderedList.define({
|
|
31
27
|
selectable: false,
|
|
@@ -43,12 +39,12 @@ orderedList.define({
|
|
|
43
39
|
optional: true
|
|
44
40
|
}
|
|
45
41
|
},
|
|
46
|
-
content: [$onePlus($or(listItem
|
|
42
|
+
content: [$onePlus($or(listItem))]
|
|
47
43
|
});
|
|
48
44
|
bulletList.define({
|
|
49
45
|
selectable: false,
|
|
50
46
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
51
|
-
content: [$onePlus($or(listItem
|
|
47
|
+
content: [$onePlus($or(listItem))],
|
|
52
48
|
attrs: {
|
|
53
49
|
localId: {
|
|
54
50
|
type: 'string',
|
|
@@ -49,10 +49,5 @@ taskList.define({
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
contentMinItems: 1,
|
|
52
|
-
content: [$onePlus($or(taskItem,
|
|
53
|
-
});
|
|
54
|
-
export const taskListWithFlexibleFirstChild = taskList.variant('with_flexible_first_child', {
|
|
55
|
-
contentMinItems: 1,
|
|
56
|
-
content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))],
|
|
57
|
-
stage0: true
|
|
52
|
+
content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
|
|
58
53
|
});
|
|
@@ -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, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
4
|
import { fontSize } from './marks/font-size';
|
|
5
5
|
const getDefaultSchemaConfig = () => {
|
|
@@ -24,8 +24,6 @@ export const getSchemaBasedOnStage = memoizeOne(
|
|
|
24
24
|
multiBodiedExtension: multiBodiedExtension,
|
|
25
25
|
extensionFrame: extensionFrame,
|
|
26
26
|
expand: expandWithNestedExpand,
|
|
27
|
-
listItem: listItemWithFlexibleFirstChildStage0,
|
|
28
|
-
taskList: taskListWithFlexibleFirstChildStage0,
|
|
29
27
|
table: tableWithNestedTable,
|
|
30
28
|
tableRow: tableRowWithNestedTable,
|
|
31
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, 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, fontSize, 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, 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';
|
|
@@ -27,7 +27,7 @@ export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWi
|
|
|
27
27
|
export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
|
28
28
|
export { decisionList, decisionListSelector } from './decision-list';
|
|
29
29
|
export { decisionItem } from './decision-item';
|
|
30
|
-
export { taskList, taskListSelector
|
|
30
|
+
export { taskList, taskListSelector } from './task-list';
|
|
31
31
|
export { taskItem, blockTaskItem } from './task-item';
|
|
32
32
|
export { date, dateWithLocalId } from './date';
|
|
33
33
|
export { placeholder, placeholderWithLocalId } from './placeholder';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { listItem as listItemFactory
|
|
1
|
+
import { listItem as listItemFactory } from '../../next-schema/generated/nodeTypes';
|
|
2
2
|
import { uuid } from '../../utils';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @name list_item
|
|
6
|
-
* @description this node allows task-list to be nested inside list-item
|
|
7
6
|
*/
|
|
8
7
|
export const listItem = listItemFactory({
|
|
9
8
|
parseDOM: [{
|
|
@@ -16,7 +15,6 @@ export const listItem = listItemFactory({
|
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* @name list_item_with_local_id
|
|
19
|
-
* @description this node allows list items to have a localId attribute
|
|
20
18
|
*/
|
|
21
19
|
export const listItemWithLocalId = listItemFactory({
|
|
22
20
|
parseDOM: [{
|
|
@@ -31,23 +29,4 @@ export const listItemWithLocalId = listItemFactory({
|
|
|
31
29
|
'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
|
|
32
30
|
}, 0];
|
|
33
31
|
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @name list_item_with_flexible_first_child_stage0
|
|
38
|
-
* @description stage0 listItem with flexible first child (see EDITOR-5417)
|
|
39
|
-
*/
|
|
40
|
-
export const listItemWithFlexibleFirstChildStage0 = listItemWithFlexibleFirstChildStage0Factory({
|
|
41
|
-
parseDOM: [{
|
|
42
|
-
tag: 'li',
|
|
43
|
-
getAttrs: () => ({
|
|
44
|
-
localId: uuid.generate()
|
|
45
|
-
})
|
|
46
|
-
}],
|
|
47
|
-
toDOM(node) {
|
|
48
|
-
var _node$attrs2;
|
|
49
|
-
return ['li', {
|
|
50
|
-
'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.localId) || undefined
|
|
51
|
-
}, 0];
|
|
52
|
-
}
|
|
53
32
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { taskList as taskListFactory
|
|
1
|
+
import { taskList as taskListFactory } from '../../next-schema/generated/nodeTypes';
|
|
2
2
|
import { uuid } from '../../utils/uuid';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -29,15 +29,8 @@ const taskListParseDOMAndToDOM = {
|
|
|
29
29
|
return ['div', attrs, 0];
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
export const taskList = taskListFactory(taskListParseDOMAndToDOM);
|
|
33
|
-
const taskListWithFlexibleFirstChild = taskListWithFlexibleFirstChildStage0Factory(taskListParseDOMAndToDOM);
|
|
34
32
|
|
|
35
33
|
/**
|
|
36
|
-
* @name
|
|
37
|
-
* @description stage0 taskList with flexible first child content (see EDITOR-5417)
|
|
34
|
+
* @name taskList
|
|
38
35
|
*/
|
|
39
|
-
export const
|
|
40
|
-
...taskListWithFlexibleFirstChild,
|
|
41
|
-
// Generated spec omits PM group; keep taskList in block content for doc validation.
|
|
42
|
-
group: 'block'
|
|
43
|
-
};
|
|
36
|
+
export const taskList = taskListFactory(taskListParseDOMAndToDOM);
|