@atlaskit/adf-schema 35.0.0 → 35.1.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 +12 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/schema/create-schema.js +1 -1
- package/dist/cjs/schema/default-schema.js +3 -1
- package/dist/cjs/schema/index.js +6 -0
- package/dist/cjs/schema/nodes/blockquote.js +25 -12
- package/dist/cjs/schema/nodes/index.js +6 -0
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/schema/create-schema.js +2 -2
- package/dist/es2019/schema/default-schema.js +4 -2
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/blockquote.js +23 -11
- package/dist/es2019/schema/nodes/index.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/schema/create-schema.js +2 -2
- package/dist/esm/schema/default-schema.js +4 -2
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/blockquote.js +23 -11
- package/dist/esm/schema/nodes/index.js +1 -0
- package/dist/json-schema/v1/full.json +11 -1
- package/dist/json-schema/v1/stage-0.json +11 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/blockquote.d.ts +7 -1
- package/dist/types/schema/nodes/index.d.ts +1 -0
- package/json-schema/v1/full.json +11 -1
- package/json-schema/v1/stage-0.json +11 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 35.1.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 2023f5a: ED-20070: Added multiBodiedExtension and extensionFrame as defaultSchema customNodeSpecs for stage-0
|
8
|
+
|
9
|
+
## 35.1.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- 4eff3f6: ED-20960-list-in-quotes: Create new node blockquoteWithList which allows node nesting for list inside blockquote
|
14
|
+
|
3
15
|
## 35.0.0
|
4
16
|
|
5
17
|
### Major Changes
|
package/dist/cjs/index.js
CHANGED
@@ -333,6 +333,12 @@ Object.defineProperty(exports, "blockquote", {
|
|
333
333
|
return _schema.blockquote;
|
334
334
|
}
|
335
335
|
});
|
336
|
+
Object.defineProperty(exports, "blockquoteWithList", {
|
337
|
+
enumerable: true,
|
338
|
+
get: function get() {
|
339
|
+
return _schema.blockquoteWithList;
|
340
|
+
}
|
341
|
+
});
|
336
342
|
Object.defineProperty(exports, "bodiedExtension", {
|
337
343
|
enumerable: true,
|
338
344
|
get: function get() {
|
@@ -24,7 +24,9 @@ var getSchemaBasedOnStage = (0, _memoizeOne.default)(function () {
|
|
24
24
|
var defaultSchemaConfig = getDefaultSchemaConfig();
|
25
25
|
if (stage === 'stage0') {
|
26
26
|
defaultSchemaConfig.customNodeSpecs = {
|
27
|
-
layoutSection: _nodes.layoutSectionWithSingleColumn
|
27
|
+
layoutSection: _nodes.layoutSectionWithSingleColumn,
|
28
|
+
multiBodiedExtension: _nodes.multiBodiedExtension,
|
29
|
+
extensionFrame: _nodes.extensionFrame
|
28
30
|
};
|
29
31
|
}
|
30
32
|
return (0, _createSchema.createSchema)(defaultSchemaConfig);
|
package/dist/cjs/schema/index.js
CHANGED
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "blockquote", {
|
|
51
51
|
return _nodes.blockquote;
|
52
52
|
}
|
53
53
|
});
|
54
|
+
Object.defineProperty(exports, "blockquoteWithList", {
|
55
|
+
enumerable: true,
|
56
|
+
get: function get() {
|
57
|
+
return _nodes.blockquoteWithList;
|
58
|
+
}
|
59
|
+
});
|
54
60
|
Object.defineProperty(exports, "bodiedExtension", {
|
55
61
|
enumerable: true,
|
56
62
|
get: function get() {
|
@@ -3,21 +3,34 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.blockquote = void 0;
|
6
|
+
exports.blockquoteWithList = exports.blockquote = void 0;
|
7
7
|
/**
|
8
8
|
* @name blockquote_node
|
9
9
|
*/
|
10
10
|
|
11
|
-
var
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
11
|
+
var createBlockquoteSpec = function createBlockquoteSpec(allowList) {
|
12
|
+
var blockquoteSpec = {
|
13
|
+
group: 'block',
|
14
|
+
defining: true,
|
15
|
+
selectable: false,
|
16
|
+
parseDOM: [{
|
17
|
+
tag: 'blockquote'
|
18
|
+
}],
|
19
|
+
toDOM: function toDOM() {
|
20
|
+
return ['blockquote', 0];
|
21
|
+
}
|
22
|
+
};
|
23
|
+
if (allowList) {
|
24
|
+
blockquoteSpec.content = '(paragraph | orderedList | bulletList | unsupportedBlock)+';
|
25
|
+
} else {
|
26
|
+
blockquoteSpec.content = '(paragraph | unsupportedBlock)+';
|
21
27
|
}
|
28
|
+
return blockquoteSpec;
|
22
29
|
};
|
23
|
-
|
30
|
+
var blockquote = createBlockquoteSpec(false);
|
31
|
+
/**
|
32
|
+
* @name blockquote_with_list_node
|
33
|
+
*/
|
34
|
+
exports.blockquote = blockquote;
|
35
|
+
var blockquoteWithList = createBlockquoteSpec(true);
|
36
|
+
exports.blockquoteWithList = blockquoteWithList;
|
@@ -22,6 +22,12 @@ Object.defineProperty(exports, "blockquote", {
|
|
22
22
|
return _blockquote.blockquote;
|
23
23
|
}
|
24
24
|
});
|
25
|
+
Object.defineProperty(exports, "blockquoteWithList", {
|
26
|
+
enumerable: true,
|
27
|
+
get: function get() {
|
28
|
+
return _blockquote.blockquoteWithList;
|
29
|
+
}
|
30
|
+
});
|
25
31
|
Object.defineProperty(exports, "bodiedExtension", {
|
26
32
|
enumerable: true,
|
27
33
|
get: function get() {
|
package/dist/es2019/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
1
|
+
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
2
2
|
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension } from './schema';
|
3
3
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
3
3
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border } from './marks';
|
4
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading,
|
4
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquoteWithList, codeBlock, panel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
|
5
5
|
function addItems(builtInItems, config, customSpecs = {}) {
|
6
6
|
if (!config) {
|
7
7
|
return {};
|
@@ -72,7 +72,7 @@ const nodesInOrder = [{
|
|
72
72
|
spec: heading
|
73
73
|
}, {
|
74
74
|
name: 'blockquote',
|
75
|
-
spec:
|
75
|
+
spec: blockquoteWithList
|
76
76
|
}, {
|
77
77
|
name: 'codeBlock',
|
78
78
|
spec: codeBlock
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import { layoutSectionWithSingleColumn } from './nodes';
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension } from './nodes';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
const getDefaultSchemaConfig = () => {
|
5
5
|
const defaultSchemaConfig = {
|
@@ -15,7 +15,9 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
|
|
15
15
|
const defaultSchemaConfig = getDefaultSchemaConfig();
|
16
16
|
if (stage === 'stage0') {
|
17
17
|
defaultSchemaConfig.customNodeSpecs = {
|
18
|
-
layoutSection: layoutSectionWithSingleColumn
|
18
|
+
layoutSection: layoutSectionWithSingleColumn,
|
19
|
+
multiBodiedExtension: multiBodiedExtension,
|
20
|
+
extensionFrame: extensionFrame
|
19
21
|
};
|
20
22
|
}
|
21
23
|
return createSchema(defaultSchemaConfig);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
|
1
|
+
export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
|
2
2
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
3
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -2,15 +2,27 @@
|
|
2
2
|
* @name blockquote_node
|
3
3
|
*/
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
const createBlockquoteSpec = allowList => {
|
6
|
+
const blockquoteSpec = {
|
7
|
+
group: 'block',
|
8
|
+
defining: true,
|
9
|
+
selectable: false,
|
10
|
+
parseDOM: [{
|
11
|
+
tag: 'blockquote'
|
12
|
+
}],
|
13
|
+
toDOM() {
|
14
|
+
return ['blockquote', 0];
|
15
|
+
}
|
16
|
+
};
|
17
|
+
if (allowList) {
|
18
|
+
blockquoteSpec.content = '(paragraph | orderedList | bulletList | unsupportedBlock)+';
|
19
|
+
} else {
|
20
|
+
blockquoteSpec.content = '(paragraph | unsupportedBlock)+';
|
15
21
|
}
|
16
|
-
|
22
|
+
return blockquoteSpec;
|
23
|
+
};
|
24
|
+
export const blockquote = createBlockquoteSpec(false);
|
25
|
+
/**
|
26
|
+
* @name blockquote_with_list_node
|
27
|
+
*/
|
28
|
+
export const blockquoteWithList = createBlockquoteSpec(true);
|
@@ -4,6 +4,7 @@ export { confluenceUnsupportedBlock } from './confluence-unsupported-block';
|
|
4
4
|
export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
|
5
5
|
export { doc } from './doc';
|
6
6
|
export { blockquote } from './blockquote';
|
7
|
+
export { blockquoteWithList } from './blockquote';
|
7
8
|
export { bulletList, bulletListSelector } from './bullet-list';
|
8
9
|
export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
|
9
10
|
export { hardBreak } from './hard-break';
|
package/dist/esm/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
1
|
+
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
2
2
|
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension } from './schema';
|
3
3
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
4
4
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
5
5
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
6
6
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border } from './marks';
|
7
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading,
|
7
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquoteWithList, codeBlock, panel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
|
8
8
|
function addItems(builtInItems, config) {
|
9
9
|
var customSpecs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
10
10
|
if (!config) {
|
@@ -77,7 +77,7 @@ var nodesInOrder = [{
|
|
77
77
|
spec: heading
|
78
78
|
}, {
|
79
79
|
name: 'blockquote',
|
80
|
-
spec:
|
80
|
+
spec: blockquoteWithList
|
81
81
|
}, {
|
82
82
|
name: 'codeBlock',
|
83
83
|
spec: codeBlock
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import { layoutSectionWithSingleColumn } from './nodes';
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension } from './nodes';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
5
5
|
var defaultSchemaConfig = {
|
@@ -16,7 +16,9 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
|
|
16
16
|
var defaultSchemaConfig = getDefaultSchemaConfig();
|
17
17
|
if (stage === 'stage0') {
|
18
18
|
defaultSchemaConfig.customNodeSpecs = {
|
19
|
-
layoutSection: layoutSectionWithSingleColumn
|
19
|
+
layoutSection: layoutSectionWithSingleColumn,
|
20
|
+
multiBodiedExtension: multiBodiedExtension,
|
21
|
+
extensionFrame: extensionFrame
|
20
22
|
};
|
21
23
|
}
|
22
24
|
return createSchema(defaultSchemaConfig);
|
package/dist/esm/schema/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
|
1
|
+
export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
|
2
2
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
3
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -2,15 +2,27 @@
|
|
2
2
|
* @name blockquote_node
|
3
3
|
*/
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
var createBlockquoteSpec = function createBlockquoteSpec(allowList) {
|
6
|
+
var blockquoteSpec = {
|
7
|
+
group: 'block',
|
8
|
+
defining: true,
|
9
|
+
selectable: false,
|
10
|
+
parseDOM: [{
|
11
|
+
tag: 'blockquote'
|
12
|
+
}],
|
13
|
+
toDOM: function toDOM() {
|
14
|
+
return ['blockquote', 0];
|
15
|
+
}
|
16
|
+
};
|
17
|
+
if (allowList) {
|
18
|
+
blockquoteSpec.content = '(paragraph | orderedList | bulletList | unsupportedBlock)+';
|
19
|
+
} else {
|
20
|
+
blockquoteSpec.content = '(paragraph | unsupportedBlock)+';
|
15
21
|
}
|
16
|
-
|
22
|
+
return blockquoteSpec;
|
23
|
+
};
|
24
|
+
export var blockquote = createBlockquoteSpec(false);
|
25
|
+
/**
|
26
|
+
* @name blockquote_with_list_node
|
27
|
+
*/
|
28
|
+
export var blockquoteWithList = createBlockquoteSpec(true);
|
@@ -4,6 +4,7 @@ export { confluenceUnsupportedBlock } from './confluence-unsupported-block';
|
|
4
4
|
export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
|
5
5
|
export { doc } from './doc';
|
6
6
|
export { blockquote } from './blockquote';
|
7
|
+
export { blockquoteWithList } from './blockquote';
|
7
8
|
export { bulletList, bulletListSelector } from './bullet-list';
|
8
9
|
export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
|
9
10
|
export { hardBreak } from './hard-break';
|
@@ -1726,7 +1726,17 @@
|
|
1726
1726
|
"content": {
|
1727
1727
|
"type": "array",
|
1728
1728
|
"items": {
|
1729
|
-
"
|
1729
|
+
"anyOf": [
|
1730
|
+
{
|
1731
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
1732
|
+
},
|
1733
|
+
{
|
1734
|
+
"$ref": "#/definitions/bulletList_node"
|
1735
|
+
},
|
1736
|
+
{
|
1737
|
+
"$ref": "#/definitions/orderedList_node"
|
1738
|
+
}
|
1739
|
+
]
|
1730
1740
|
},
|
1731
1741
|
"minItems": 1
|
1732
1742
|
}
|
@@ -1726,7 +1726,17 @@
|
|
1726
1726
|
"content": {
|
1727
1727
|
"type": "array",
|
1728
1728
|
"items": {
|
1729
|
-
"
|
1729
|
+
"anyOf": [
|
1730
|
+
{
|
1731
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
1732
|
+
},
|
1733
|
+
{
|
1734
|
+
"$ref": "#/definitions/bulletList_node"
|
1735
|
+
},
|
1736
|
+
{
|
1737
|
+
"$ref": "#/definitions/orderedList_node"
|
1738
|
+
}
|
1739
|
+
]
|
1730
1740
|
},
|
1731
1741
|
"minItems": 1
|
1732
1742
|
}
|
package/dist/types/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
|
1
|
+
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
|
2
2
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
3
|
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, } from './schema';
|
4
4
|
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, MultiBodiedExtensionDefinition, ExtensionFrameDefinition, } from './schema';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, } from './nodes';
|
1
|
+
export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, } from './nodes';
|
2
2
|
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { ParagraphDefinition as Paragraph } from './paragraph';
|
3
|
+
import { OrderedListDefinition as OrderedList } from './types/list';
|
4
|
+
import { BulletListDefinition as BulletList } from './types/list';
|
3
5
|
/**
|
4
6
|
* @name blockquote_node
|
5
7
|
*/
|
@@ -9,6 +11,10 @@ export interface BlockQuoteDefinition {
|
|
9
11
|
* @minItems 1
|
10
12
|
* @allowUnsupportedBlock true
|
11
13
|
*/
|
12
|
-
content: Array<Paragraph>;
|
14
|
+
content: Array<Paragraph | OrderedList | BulletList>;
|
13
15
|
}
|
14
16
|
export declare const blockquote: NodeSpec;
|
17
|
+
/**
|
18
|
+
* @name blockquote_with_list_node
|
19
|
+
*/
|
20
|
+
export declare const blockquoteWithList: NodeSpec;
|
@@ -6,6 +6,7 @@ export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
|
|
6
6
|
export { doc } from './doc';
|
7
7
|
export type { DocNode } from './doc';
|
8
8
|
export { blockquote } from './blockquote';
|
9
|
+
export { blockquoteWithList } from './blockquote';
|
9
10
|
export type { BlockQuoteDefinition } from './blockquote';
|
10
11
|
export { bulletList, bulletListSelector } from './bullet-list';
|
11
12
|
export type { BulletListDefinition } from './types/list';
|
package/json-schema/v1/full.json
CHANGED
@@ -1726,7 +1726,17 @@
|
|
1726
1726
|
"content": {
|
1727
1727
|
"type": "array",
|
1728
1728
|
"items": {
|
1729
|
-
"
|
1729
|
+
"anyOf": [
|
1730
|
+
{
|
1731
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
1732
|
+
},
|
1733
|
+
{
|
1734
|
+
"$ref": "#/definitions/bulletList_node"
|
1735
|
+
},
|
1736
|
+
{
|
1737
|
+
"$ref": "#/definitions/orderedList_node"
|
1738
|
+
}
|
1739
|
+
]
|
1730
1740
|
},
|
1731
1741
|
"minItems": 1
|
1732
1742
|
}
|
@@ -1726,7 +1726,17 @@
|
|
1726
1726
|
"content": {
|
1727
1727
|
"type": "array",
|
1728
1728
|
"items": {
|
1729
|
-
"
|
1729
|
+
"anyOf": [
|
1730
|
+
{
|
1731
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
1732
|
+
},
|
1733
|
+
{
|
1734
|
+
"$ref": "#/definitions/bulletList_node"
|
1735
|
+
},
|
1736
|
+
{
|
1737
|
+
"$ref": "#/definitions/orderedList_node"
|
1738
|
+
}
|
1739
|
+
]
|
1730
1740
|
},
|
1731
1741
|
"minItems": 1
|
1732
1742
|
}
|
package/package.json
CHANGED