@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
|
@@ -321,7 +321,7 @@ export const bulletList = {
|
|
|
321
321
|
},
|
|
322
322
|
content: {
|
|
323
323
|
type: 'array',
|
|
324
|
-
items: [
|
|
324
|
+
items: ['listItem'],
|
|
325
325
|
minItems: 1
|
|
326
326
|
}
|
|
327
327
|
}
|
|
@@ -1072,23 +1072,12 @@ export const listItem = {
|
|
|
1072
1072
|
},
|
|
1073
1073
|
content: {
|
|
1074
1074
|
type: 'array',
|
|
1075
|
-
|
|
1076
|
-
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']],
|
|
1075
|
+
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1077
1076
|
minItems: 1,
|
|
1078
1077
|
allowUnsupportedBlock: true
|
|
1079
1078
|
}
|
|
1080
1079
|
}
|
|
1081
1080
|
};
|
|
1082
|
-
export const listItem_with_flexible_first_child = ['listItem', {
|
|
1083
|
-
props: {
|
|
1084
|
-
content: {
|
|
1085
|
-
type: 'array',
|
|
1086
|
-
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']],
|
|
1087
|
-
minItems: 1,
|
|
1088
|
-
allowUnsupportedBlock: true
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
}];
|
|
1092
1081
|
export const media = {
|
|
1093
1082
|
props: {
|
|
1094
1083
|
type: {
|
|
@@ -1471,7 +1460,7 @@ export const orderedList = {
|
|
|
1471
1460
|
},
|
|
1472
1461
|
content: {
|
|
1473
1462
|
type: 'array',
|
|
1474
|
-
items: [
|
|
1463
|
+
items: ['listItem'],
|
|
1475
1464
|
minItems: 1
|
|
1476
1465
|
}
|
|
1477
1466
|
}
|
|
@@ -1915,17 +1904,6 @@ export const taskList = {
|
|
|
1915
1904
|
}
|
|
1916
1905
|
}
|
|
1917
1906
|
},
|
|
1918
|
-
content: {
|
|
1919
|
-
type: 'array',
|
|
1920
|
-
isTupleLike: true,
|
|
1921
|
-
items: [['taskItem', 'blockTaskItem'], ['taskItem', 'taskList', 'blockTaskItem']],
|
|
1922
|
-
minItems: 1,
|
|
1923
|
-
allowUnsupportedBlock: true
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
};
|
|
1927
|
-
export const taskList_with_flexible_first_child = ['taskList', {
|
|
1928
|
-
props: {
|
|
1929
1907
|
content: {
|
|
1930
1908
|
type: 'array',
|
|
1931
1909
|
items: [['taskItem', 'taskList', 'blockTaskItem']],
|
|
@@ -1933,7 +1911,7 @@ export const taskList_with_flexible_first_child = ['taskList', {
|
|
|
1933
1911
|
allowUnsupportedBlock: true
|
|
1934
1912
|
}
|
|
1935
1913
|
}
|
|
1936
|
-
}
|
|
1914
|
+
};
|
|
1937
1915
|
export const text = {
|
|
1938
1916
|
props: {
|
|
1939
1917
|
type: {
|
package/dist/esm/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 var layoutSectionWithSingleColumnStage0 = createPMNodeSpecFactory({
|
|
|
655
655
|
isolating: true
|
|
656
656
|
});
|
|
657
657
|
export var 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 var 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 var taskItem = createPMNodeSpecFactory({
|
|
|
1330
1319
|
defining: true
|
|
1331
1320
|
});
|
|
1332
1321
|
export var 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 var 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 var orderedList = adfNode('orderedList');
|
|
11
11
|
export var bulletList = adfNode('bulletList');
|
|
@@ -21,11 +21,7 @@ var 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',
|
|
@@ -50,10 +50,5 @@ taskList.define({
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
contentMinItems: 1,
|
|
53
|
-
content: [$onePlus($or(taskItem,
|
|
54
|
-
});
|
|
55
|
-
export var taskListWithFlexibleFirstChild = taskList.variant('with_flexible_first_child', {
|
|
56
|
-
contentMinItems: 1,
|
|
57
|
-
content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))],
|
|
58
|
-
stage0: true
|
|
53
|
+
content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
|
|
59
54
|
});
|
|
@@ -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
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
@@ -25,8 +25,6 @@ function () {
|
|
|
25
25
|
multiBodiedExtension: multiBodiedExtension,
|
|
26
26
|
extensionFrame: extensionFrame,
|
|
27
27
|
expand: expandWithNestedExpand,
|
|
28
|
-
listItem: listItemWithFlexibleFirstChildStage0,
|
|
29
|
-
taskList: taskListWithFlexibleFirstChildStage0,
|
|
30
28
|
table: tableWithNestedTable,
|
|
31
29
|
tableRow: tableRowWithNestedTable,
|
|
32
30
|
tableCell: tableCellWithNestedTable,
|
package/dist/esm/schema/index.js
CHANGED
|
@@ -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 var listItem = listItemFactory({
|
|
9
8
|
parseDOM: [{
|
|
@@ -16,7 +15,6 @@ export var 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 var listItemWithLocalId = listItemFactory({
|
|
22
20
|
parseDOM: [{
|
|
@@ -33,25 +31,4 @@ export var listItemWithLocalId = listItemFactory({
|
|
|
33
31
|
'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
|
|
34
32
|
}, 0];
|
|
35
33
|
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @name list_item_with_flexible_first_child_stage0
|
|
40
|
-
* @description stage0 listItem with flexible first child (see EDITOR-5417)
|
|
41
|
-
*/
|
|
42
|
-
export var listItemWithFlexibleFirstChildStage0 = listItemWithFlexibleFirstChildStage0Factory({
|
|
43
|
-
parseDOM: [{
|
|
44
|
-
tag: 'li',
|
|
45
|
-
getAttrs: function getAttrs() {
|
|
46
|
-
return {
|
|
47
|
-
localId: uuid.generate()
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}],
|
|
51
|
-
toDOM: function toDOM(node) {
|
|
52
|
-
var _node$attrs2;
|
|
53
|
-
return ['li', {
|
|
54
|
-
'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
|
|
55
|
-
}, 0];
|
|
56
|
-
}
|
|
57
34
|
});
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { taskList as taskListFactory, taskListWithFlexibleFirstChildStage0 as taskListWithFlexibleFirstChildStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
1
|
+
import { taskList as taskListFactory } from '../../next-schema/generated/nodeTypes';
|
|
5
2
|
import { uuid } from '../../utils/uuid';
|
|
6
3
|
|
|
7
4
|
/**
|
|
@@ -32,14 +29,8 @@ var taskListParseDOMAndToDOM = {
|
|
|
32
29
|
return ['div', attrs, 0];
|
|
33
30
|
}
|
|
34
31
|
};
|
|
35
|
-
export var taskList = taskListFactory(taskListParseDOMAndToDOM);
|
|
36
|
-
var taskListWithFlexibleFirstChild = taskListWithFlexibleFirstChildStage0Factory(taskListParseDOMAndToDOM);
|
|
37
32
|
|
|
38
33
|
/**
|
|
39
|
-
* @name
|
|
40
|
-
* @description stage0 taskList with flexible first child content (see EDITOR-5417)
|
|
34
|
+
* @name taskList
|
|
41
35
|
*/
|
|
42
|
-
export var
|
|
43
|
-
// Generated spec omits PM group; keep taskList in block content for doc validation.
|
|
44
|
-
group: 'block'
|
|
45
|
-
});
|
|
36
|
+
export var taskList = taskListFactory(taskListParseDOMAndToDOM);
|
|
@@ -321,7 +321,7 @@ export var bulletList = {
|
|
|
321
321
|
},
|
|
322
322
|
content: {
|
|
323
323
|
type: 'array',
|
|
324
|
-
items: [
|
|
324
|
+
items: ['listItem'],
|
|
325
325
|
minItems: 1
|
|
326
326
|
}
|
|
327
327
|
}
|
|
@@ -1072,23 +1072,12 @@ export var listItem = {
|
|
|
1072
1072
|
},
|
|
1073
1073
|
content: {
|
|
1074
1074
|
type: 'array',
|
|
1075
|
-
|
|
1076
|
-
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']],
|
|
1075
|
+
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1077
1076
|
minItems: 1,
|
|
1078
1077
|
allowUnsupportedBlock: true
|
|
1079
1078
|
}
|
|
1080
1079
|
}
|
|
1081
1080
|
};
|
|
1082
|
-
export var listItem_with_flexible_first_child = ['listItem', {
|
|
1083
|
-
props: {
|
|
1084
|
-
content: {
|
|
1085
|
-
type: 'array',
|
|
1086
|
-
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']],
|
|
1087
|
-
minItems: 1,
|
|
1088
|
-
allowUnsupportedBlock: true
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
}];
|
|
1092
1081
|
export var media = {
|
|
1093
1082
|
props: {
|
|
1094
1083
|
type: {
|
|
@@ -1471,7 +1460,7 @@ export var orderedList = {
|
|
|
1471
1460
|
},
|
|
1472
1461
|
content: {
|
|
1473
1462
|
type: 'array',
|
|
1474
|
-
items: [
|
|
1463
|
+
items: ['listItem'],
|
|
1475
1464
|
minItems: 1
|
|
1476
1465
|
}
|
|
1477
1466
|
}
|
|
@@ -1915,17 +1904,6 @@ export var taskList = {
|
|
|
1915
1904
|
}
|
|
1916
1905
|
}
|
|
1917
1906
|
},
|
|
1918
|
-
content: {
|
|
1919
|
-
type: 'array',
|
|
1920
|
-
isTupleLike: true,
|
|
1921
|
-
items: [['taskItem', 'blockTaskItem'], ['taskItem', 'taskList', 'blockTaskItem']],
|
|
1922
|
-
minItems: 1,
|
|
1923
|
-
allowUnsupportedBlock: true
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
};
|
|
1927
|
-
export var taskList_with_flexible_first_child = ['taskList', {
|
|
1928
|
-
props: {
|
|
1929
1907
|
content: {
|
|
1930
1908
|
type: 'array',
|
|
1931
1909
|
items: [['taskItem', 'taskList', 'blockTaskItem']],
|
|
@@ -1933,7 +1911,7 @@ export var taskList_with_flexible_first_child = ['taskList', {
|
|
|
1933
1911
|
allowUnsupportedBlock: true
|
|
1934
1912
|
}
|
|
1935
1913
|
}
|
|
1936
|
-
}
|
|
1914
|
+
};
|
|
1937
1915
|
export var text = {
|
|
1938
1916
|
props: {
|
|
1939
1917
|
type: {
|
|
@@ -1677,55 +1677,34 @@
|
|
|
1677
1677
|
},
|
|
1678
1678
|
"content": {
|
|
1679
1679
|
"type": "array",
|
|
1680
|
-
"items":
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
{
|
|
1709
|
-
"$ref": "#/definitions/orderedList_node"
|
|
1710
|
-
},
|
|
1711
|
-
{
|
|
1712
|
-
"$ref": "#/definitions/taskList_node"
|
|
1713
|
-
},
|
|
1714
|
-
{
|
|
1715
|
-
"$ref": "#/definitions/mediaSingle_caption_node"
|
|
1716
|
-
},
|
|
1717
|
-
{
|
|
1718
|
-
"$ref": "#/definitions/mediaSingle_full_node"
|
|
1719
|
-
},
|
|
1720
|
-
{
|
|
1721
|
-
"$ref": "#/definitions/codeBlock_node"
|
|
1722
|
-
},
|
|
1723
|
-
{
|
|
1724
|
-
"$ref": "#/definitions/extension_with_marks_node"
|
|
1725
|
-
}
|
|
1726
|
-
]
|
|
1727
|
-
}
|
|
1728
|
-
],
|
|
1680
|
+
"items": {
|
|
1681
|
+
"anyOf": [
|
|
1682
|
+
{
|
|
1683
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
"$ref": "#/definitions/bulletList_node"
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
"$ref": "#/definitions/orderedList_node"
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
"$ref": "#/definitions/taskList_node"
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
"$ref": "#/definitions/mediaSingle_caption_node"
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"$ref": "#/definitions/mediaSingle_full_node"
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"$ref": "#/definitions/codeBlock_node"
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
"$ref": "#/definitions/extension_with_marks_node"
|
|
1705
|
+
}
|
|
1706
|
+
]
|
|
1707
|
+
},
|
|
1729
1708
|
"minItems": 1
|
|
1730
1709
|
}
|
|
1731
1710
|
},
|
|
@@ -2825,31 +2804,19 @@
|
|
|
2825
2804
|
},
|
|
2826
2805
|
"content": {
|
|
2827
2806
|
"type": "array",
|
|
2828
|
-
"items":
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
{
|
|
2842
|
-
"$ref": "#/definitions/taskItem_node"
|
|
2843
|
-
},
|
|
2844
|
-
{
|
|
2845
|
-
"$ref": "#/definitions/taskList_node"
|
|
2846
|
-
},
|
|
2847
|
-
{
|
|
2848
|
-
"$ref": "#/definitions/blockTaskItem_node"
|
|
2849
|
-
}
|
|
2850
|
-
]
|
|
2851
|
-
}
|
|
2852
|
-
],
|
|
2807
|
+
"items": {
|
|
2808
|
+
"anyOf": [
|
|
2809
|
+
{
|
|
2810
|
+
"$ref": "#/definitions/taskItem_node"
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
"$ref": "#/definitions/taskList_node"
|
|
2814
|
+
},
|
|
2815
|
+
{
|
|
2816
|
+
"$ref": "#/definitions/blockTaskItem_node"
|
|
2817
|
+
}
|
|
2818
|
+
]
|
|
2819
|
+
},
|
|
2853
2820
|
"minItems": 1
|
|
2854
2821
|
}
|
|
2855
2822
|
},
|