@atlaskit/adf-schema 35.14.0 → 36.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/index.js +0 -12
- package/dist/cjs/schema/create-schema.js +2 -2
- package/dist/cjs/schema/index.js +0 -12
- package/dist/cjs/schema/nodes/heading.js +13 -26
- package/dist/cjs/schema/nodes/index.js +0 -12
- package/dist/cjs/schema/nodes/nested-expand.js +6 -13
- package/dist/cjs/schema/nodes/paragraph.js +3 -31
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/schema/create-schema.js +3 -3
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/heading.js +19 -20
- package/dist/es2019/schema/nodes/index.js +2 -2
- package/dist/es2019/schema/nodes/nested-expand.js +5 -12
- package/dist/es2019/schema/nodes/paragraph.js +2 -32
- package/dist/esm/index.js +1 -1
- package/dist/esm/schema/create-schema.js +3 -3
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/heading.js +13 -26
- package/dist/esm/schema/nodes/index.js +2 -2
- package/dist/esm/schema/nodes/nested-expand.js +5 -12
- package/dist/esm/schema/nodes/paragraph.js +2 -30
- package/dist/json-schema/v1/stage-0.json +0 -12
- package/dist/types/index.d.ts +1 -1
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/heading.d.ts +0 -4
- package/dist/types/schema/nodes/index.d.ts +2 -2
- package/dist/types/schema/nodes/nested-expand.d.ts +3 -6
- package/dist/types/schema/nodes/paragraph.d.ts +0 -11
- package/json-schema/v1/stage-0.json +0 -12
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 36.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 175bfe7: Reverted add optional localId attribute to paragraph and heading nodes
|
8
|
+
|
9
|
+
## 36.0.0
|
10
|
+
|
11
|
+
### Major Changes
|
12
|
+
|
13
|
+
- e83fa9b: [ED-22282] [Breaking change] A transition ProseMirror node `extendedNestedExpand` was introduced for the changes in the node nesting project. Now that it's fully rolled out, the old `nestedExpand` isn't used anymore and we can clean them up. `nestedExpand` now contains the functionality of what was the transitional `extendedNestedExpand`.
|
14
|
+
|
15
|
+
Any usage of `extendedNestedExpand` should be updated to `nestedExpand` now.
|
16
|
+
|
3
17
|
## 35.14.0
|
4
18
|
|
5
19
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
@@ -543,12 +543,6 @@ Object.defineProperty(exports, "expandToJSON", {
|
|
543
543
|
return _schema.expandToJSON;
|
544
544
|
}
|
545
545
|
});
|
546
|
-
Object.defineProperty(exports, "extendedNestedExpand", {
|
547
|
-
enumerable: true,
|
548
|
-
get: function get() {
|
549
|
-
return _schema.extendedNestedExpand;
|
550
|
-
}
|
551
|
-
});
|
552
546
|
Object.defineProperty(exports, "extendedPanel", {
|
553
547
|
enumerable: true,
|
554
548
|
get: function get() {
|
@@ -861,12 +855,6 @@ Object.defineProperty(exports, "paragraph", {
|
|
861
855
|
return _schema.paragraph;
|
862
856
|
}
|
863
857
|
});
|
864
|
-
Object.defineProperty(exports, "paragraphStage0", {
|
865
|
-
enumerable: true,
|
866
|
-
get: function get() {
|
867
|
-
return _schema.paragraphStage0;
|
868
|
-
}
|
869
|
-
});
|
870
858
|
Object.defineProperty(exports, "placeholder", {
|
871
859
|
enumerable: true,
|
872
860
|
get: function get() {
|
@@ -69,7 +69,7 @@ var nodesInOrder = [{
|
|
69
69
|
spec: _nodes.doc
|
70
70
|
}, {
|
71
71
|
name: 'paragraph',
|
72
|
-
spec: _nodes.
|
72
|
+
spec: _nodes.paragraph
|
73
73
|
}, {
|
74
74
|
name: 'text',
|
75
75
|
spec: _nodes.text
|
@@ -177,7 +177,7 @@ var nodesInOrder = [{
|
|
177
177
|
spec: _nodes.expand
|
178
178
|
}, {
|
179
179
|
name: 'nestedExpand',
|
180
|
-
spec: _nodes.
|
180
|
+
spec: _nodes.nestedExpand
|
181
181
|
}, {
|
182
182
|
name: 'extension',
|
183
183
|
spec: _nodes.extension
|
package/dist/cjs/schema/index.js
CHANGED
@@ -255,12 +255,6 @@ Object.defineProperty(exports, "expandToJSON", {
|
|
255
255
|
return _nodes.expandToJSON;
|
256
256
|
}
|
257
257
|
});
|
258
|
-
Object.defineProperty(exports, "extendedNestedExpand", {
|
259
|
-
enumerable: true,
|
260
|
-
get: function get() {
|
261
|
-
return _nodes.extendedNestedExpand;
|
262
|
-
}
|
263
|
-
});
|
264
258
|
Object.defineProperty(exports, "extendedPanel", {
|
265
259
|
enumerable: true,
|
266
260
|
get: function get() {
|
@@ -501,12 +495,6 @@ Object.defineProperty(exports, "paragraph", {
|
|
501
495
|
return _nodes.paragraph;
|
502
496
|
}
|
503
497
|
});
|
504
|
-
Object.defineProperty(exports, "paragraphStage0", {
|
505
|
-
enumerable: true,
|
506
|
-
get: function get() {
|
507
|
-
return _nodes.paragraphStage0;
|
508
|
-
}
|
509
|
-
});
|
510
498
|
Object.defineProperty(exports, "placeholder", {
|
511
499
|
enumerable: true,
|
512
500
|
get: function get() {
|
@@ -21,19 +21,10 @@ exports.heading = void 0;
|
|
21
21
|
* @name heading_with_indentation_node
|
22
22
|
*/
|
23
23
|
|
24
|
-
var _getAttrs = function getAttrs(level, domNode) {
|
25
|
-
return {
|
26
|
-
level: level,
|
27
|
-
localId: domNode.getAttribute('data-local-id') || heading.attrs.localId.default
|
28
|
-
};
|
29
|
-
};
|
30
24
|
var heading = exports.heading = {
|
31
25
|
attrs: {
|
32
26
|
level: {
|
33
27
|
default: 1
|
34
|
-
},
|
35
|
-
localId: {
|
36
|
-
default: null
|
37
28
|
}
|
38
29
|
},
|
39
30
|
content: "inline*",
|
@@ -42,40 +33,36 @@ var heading = exports.heading = {
|
|
42
33
|
selectable: false,
|
43
34
|
parseDOM: [{
|
44
35
|
tag: 'h1',
|
45
|
-
|
46
|
-
|
36
|
+
attrs: {
|
37
|
+
level: 1
|
47
38
|
}
|
48
39
|
}, {
|
49
40
|
tag: 'h2',
|
50
|
-
|
51
|
-
|
41
|
+
attrs: {
|
42
|
+
level: 2
|
52
43
|
}
|
53
44
|
}, {
|
54
45
|
tag: 'h3',
|
55
|
-
|
56
|
-
|
46
|
+
attrs: {
|
47
|
+
level: 3
|
57
48
|
}
|
58
49
|
}, {
|
59
50
|
tag: 'h4',
|
60
|
-
|
61
|
-
|
51
|
+
attrs: {
|
52
|
+
level: 4
|
62
53
|
}
|
63
54
|
}, {
|
64
55
|
tag: 'h5',
|
65
|
-
|
66
|
-
|
56
|
+
attrs: {
|
57
|
+
level: 5
|
67
58
|
}
|
68
59
|
}, {
|
69
60
|
tag: 'h6',
|
70
|
-
|
71
|
-
|
61
|
+
attrs: {
|
62
|
+
level: 6
|
72
63
|
}
|
73
64
|
}],
|
74
65
|
toDOM: function toDOM(node) {
|
75
|
-
|
76
|
-
var attrs = localId !== undefined ? {
|
77
|
-
'data-local-id': localId
|
78
|
-
} : undefined;
|
79
|
-
return ['h' + node.attrs['level'], attrs, 0];
|
66
|
+
return ['h' + node.attrs['level'], 0];
|
80
67
|
}
|
81
68
|
};
|
@@ -142,12 +142,6 @@ Object.defineProperty(exports, "expandToJSON", {
|
|
142
142
|
return _expand.toJSON;
|
143
143
|
}
|
144
144
|
});
|
145
|
-
Object.defineProperty(exports, "extendedNestedExpand", {
|
146
|
-
enumerable: true,
|
147
|
-
get: function get() {
|
148
|
-
return _nestedExpand.extendedNestedExpand;
|
149
|
-
}
|
150
|
-
});
|
151
145
|
Object.defineProperty(exports, "extendedPanel", {
|
152
146
|
enumerable: true,
|
153
147
|
get: function get() {
|
@@ -352,12 +346,6 @@ Object.defineProperty(exports, "paragraph", {
|
|
352
346
|
return _paragraph.paragraph;
|
353
347
|
}
|
354
348
|
});
|
355
|
-
Object.defineProperty(exports, "paragraphStage0", {
|
356
|
-
enumerable: true,
|
357
|
-
get: function get() {
|
358
|
-
return _paragraph.paragraphStage0;
|
359
|
-
}
|
360
|
-
});
|
361
349
|
Object.defineProperty(exports, "placeholder", {
|
362
350
|
enumerable: true,
|
363
351
|
get: function get() {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.nestedExpand =
|
6
|
+
exports.nestedExpand = void 0;
|
7
7
|
/**
|
8
8
|
* @name nestedExpand_content
|
9
9
|
* @minItems 1
|
@@ -18,7 +18,7 @@ exports.nestedExpand = exports.extendedNestedExpand = void 0;
|
|
18
18
|
* @name nestedExpand_with_no_marks_node
|
19
19
|
*/
|
20
20
|
|
21
|
-
var createNestedExpandSpec = function createNestedExpandSpec(
|
21
|
+
var createNestedExpandSpec = function createNestedExpandSpec() {
|
22
22
|
var nestedExpandSpec = {
|
23
23
|
inline: false,
|
24
24
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
@@ -61,19 +61,12 @@ var createNestedExpandSpec = function createNestedExpandSpec(isExtended) {
|
|
61
61
|
return ['div', attrs, 0];
|
62
62
|
}
|
63
63
|
};
|
64
|
-
|
65
|
-
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+';
|
66
|
-
} else {
|
67
|
-
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | unsupportedBlock)+';
|
68
|
-
}
|
64
|
+
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+';
|
69
65
|
return nestedExpandSpec;
|
70
66
|
};
|
71
|
-
var nestedExpand = exports.nestedExpand = createNestedExpandSpec(false);
|
72
67
|
|
73
68
|
/**
|
74
|
-
* @name
|
75
|
-
* @description
|
76
|
-
* Specifically, it allows codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote nodes in
|
77
|
-
* addition to content allowed inside nestedExpand
|
69
|
+
* @name nestedExpand
|
70
|
+
* @description an expand that can be nested (eg. inside table, layout).
|
78
71
|
*/
|
79
|
-
var
|
72
|
+
var nestedExpand = exports.nestedExpand = createNestedExpandSpec();
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.paragraph = void 0;
|
7
7
|
/**
|
8
8
|
* @name paragraph_node
|
9
9
|
*/
|
@@ -29,35 +29,7 @@ exports.paragraphStage0 = exports.paragraph = void 0;
|
|
29
29
|
* @name paragraph_with_indentation_node
|
30
30
|
*/
|
31
31
|
|
32
|
-
var
|
33
|
-
selectable: false,
|
34
|
-
content: 'inline*',
|
35
|
-
group: 'block',
|
36
|
-
attrs: {
|
37
|
-
localId: {
|
38
|
-
default: null
|
39
|
-
}
|
40
|
-
},
|
41
|
-
marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
42
|
-
parseDOM: [{
|
43
|
-
tag: 'p',
|
44
|
-
getAttrs: function getAttrs(domNode) {
|
45
|
-
var _paragraph$attrs;
|
46
|
-
var dom = domNode;
|
47
|
-
var attrs = {
|
48
|
-
localId: dom.getAttribute('data-local-id') || ((_paragraph$attrs = paragraph.attrs) === null || _paragraph$attrs === void 0 ? void 0 : _paragraph$attrs.localId.default)
|
49
|
-
};
|
50
|
-
return attrs;
|
51
|
-
}
|
52
|
-
}],
|
53
|
-
toDOM: function toDOM(node) {
|
54
|
-
var localId = node.attrs.localId;
|
55
|
-
var attrs = localId !== undefined ? {
|
56
|
-
'data-local-id': localId
|
57
|
-
} : undefined;
|
58
|
-
return ['p', attrs, 0];
|
59
|
-
}
|
60
|
-
};
|
32
|
+
var pDOM = ['p', 0];
|
61
33
|
var paragraph = exports.paragraph = {
|
62
34
|
selectable: false,
|
63
35
|
content: 'inline*',
|
@@ -67,6 +39,6 @@ var paragraph = exports.paragraph = {
|
|
67
39
|
tag: 'p'
|
68
40
|
}],
|
69
41
|
toDOM: function toDOM() {
|
70
|
-
return
|
42
|
+
return pDOM;
|
71
43
|
}
|
72
44
|
};
|
package/dist/es2019/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
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
|
-
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, 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, backgroundColor, backgroundColorPalette } 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, backgroundColor } from './marks';
|
4
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc,
|
4
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItemWithTask, heading, blockquoteWithList, codeBlock, extendedPanel, 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 {};
|
@@ -54,7 +54,7 @@ const nodesInOrder = [{
|
|
54
54
|
spec: doc
|
55
55
|
}, {
|
56
56
|
name: 'paragraph',
|
57
|
-
spec:
|
57
|
+
spec: paragraph
|
58
58
|
}, {
|
59
59
|
name: 'text',
|
60
60
|
spec: text
|
@@ -162,7 +162,7 @@ const nodesInOrder = [{
|
|
162
162
|
spec: expand
|
163
163
|
}, {
|
164
164
|
name: 'nestedExpand',
|
165
|
-
spec:
|
165
|
+
spec: nestedExpand
|
166
166
|
}, {
|
167
167
|
name: 'extension',
|
168
168
|
spec: extension
|
@@ -1,4 +1,4 @@
|
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, 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, backgroundColor, backgroundColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -15,17 +15,10 @@
|
|
15
15
|
* @name heading_with_indentation_node
|
16
16
|
*/
|
17
17
|
|
18
|
-
const getAttrs = (level, domNode) => ({
|
19
|
-
level,
|
20
|
-
localId: domNode.getAttribute('data-local-id') || heading.attrs.localId.default
|
21
|
-
});
|
22
18
|
export const heading = {
|
23
19
|
attrs: {
|
24
20
|
level: {
|
25
21
|
default: 1
|
26
|
-
},
|
27
|
-
localId: {
|
28
|
-
default: null
|
29
22
|
}
|
30
23
|
},
|
31
24
|
content: `inline*`,
|
@@ -34,30 +27,36 @@ export const heading = {
|
|
34
27
|
selectable: false,
|
35
28
|
parseDOM: [{
|
36
29
|
tag: 'h1',
|
37
|
-
|
30
|
+
attrs: {
|
31
|
+
level: 1
|
32
|
+
}
|
38
33
|
}, {
|
39
34
|
tag: 'h2',
|
40
|
-
|
35
|
+
attrs: {
|
36
|
+
level: 2
|
37
|
+
}
|
41
38
|
}, {
|
42
39
|
tag: 'h3',
|
43
|
-
|
40
|
+
attrs: {
|
41
|
+
level: 3
|
42
|
+
}
|
44
43
|
}, {
|
45
44
|
tag: 'h4',
|
46
|
-
|
45
|
+
attrs: {
|
46
|
+
level: 4
|
47
|
+
}
|
47
48
|
}, {
|
48
49
|
tag: 'h5',
|
49
|
-
|
50
|
+
attrs: {
|
51
|
+
level: 5
|
52
|
+
}
|
50
53
|
}, {
|
51
54
|
tag: 'h6',
|
52
|
-
|
55
|
+
attrs: {
|
56
|
+
level: 6
|
57
|
+
}
|
53
58
|
}],
|
54
59
|
toDOM(node) {
|
55
|
-
|
56
|
-
localId
|
57
|
-
} = node.attrs;
|
58
|
-
const attrs = localId !== undefined ? {
|
59
|
-
'data-local-id': localId
|
60
|
-
} : undefined;
|
61
|
-
return ['h' + node.attrs['level'], attrs, 0];
|
60
|
+
return ['h' + node.attrs['level'], 0];
|
62
61
|
}
|
63
62
|
};
|
@@ -11,7 +11,7 @@ export { hardBreak } from './hard-break';
|
|
11
11
|
export { heading } from './heading';
|
12
12
|
export { rule } from './rule';
|
13
13
|
export { orderedList, orderedListSelector, orderedListWithOrder } from './ordered-list';
|
14
|
-
export { paragraph
|
14
|
+
export { paragraph } from './paragraph';
|
15
15
|
export { emoji } from './emoji';
|
16
16
|
export { image } from './image';
|
17
17
|
export { mention, toJSON as mentionToJSON } from './mention';
|
@@ -38,7 +38,7 @@ export { blockCard } from './block-card';
|
|
38
38
|
export { unsupportedBlock } from './unsupported-block';
|
39
39
|
export { unsupportedInline } from './unsupported-inline';
|
40
40
|
export { status } from './status';
|
41
|
-
export { nestedExpand
|
41
|
+
export { nestedExpand } from './nested-expand';
|
42
42
|
export { embedCard } from './embed-card';
|
43
43
|
// Extensions
|
44
44
|
export { extension } from './extension';
|
@@ -12,7 +12,7 @@
|
|
12
12
|
* @name nestedExpand_with_no_marks_node
|
13
13
|
*/
|
14
14
|
|
15
|
-
const createNestedExpandSpec =
|
15
|
+
const createNestedExpandSpec = () => {
|
16
16
|
const nestedExpandSpec = {
|
17
17
|
inline: false,
|
18
18
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
@@ -55,19 +55,12 @@ const createNestedExpandSpec = isExtended => {
|
|
55
55
|
return ['div', attrs, 0];
|
56
56
|
}
|
57
57
|
};
|
58
|
-
|
59
|
-
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+';
|
60
|
-
} else {
|
61
|
-
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | unsupportedBlock)+';
|
62
|
-
}
|
58
|
+
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+';
|
63
59
|
return nestedExpandSpec;
|
64
60
|
};
|
65
|
-
export const nestedExpand = createNestedExpandSpec(false);
|
66
61
|
|
67
62
|
/**
|
68
|
-
* @name
|
69
|
-
* @description
|
70
|
-
* Specifically, it allows codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote nodes in
|
71
|
-
* addition to content allowed inside nestedExpand
|
63
|
+
* @name nestedExpand
|
64
|
+
* @description an expand that can be nested (eg. inside table, layout).
|
72
65
|
*/
|
73
|
-
export const
|
66
|
+
export const nestedExpand = createNestedExpandSpec();
|
@@ -23,37 +23,7 @@
|
|
23
23
|
* @name paragraph_with_indentation_node
|
24
24
|
*/
|
25
25
|
|
26
|
-
|
27
|
-
selectable: false,
|
28
|
-
content: 'inline*',
|
29
|
-
group: 'block',
|
30
|
-
attrs: {
|
31
|
-
localId: {
|
32
|
-
default: null
|
33
|
-
}
|
34
|
-
},
|
35
|
-
marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
36
|
-
parseDOM: [{
|
37
|
-
tag: 'p',
|
38
|
-
getAttrs: domNode => {
|
39
|
-
var _paragraph$attrs;
|
40
|
-
const dom = domNode;
|
41
|
-
const attrs = {
|
42
|
-
localId: dom.getAttribute('data-local-id') || ((_paragraph$attrs = paragraph.attrs) === null || _paragraph$attrs === void 0 ? void 0 : _paragraph$attrs.localId.default)
|
43
|
-
};
|
44
|
-
return attrs;
|
45
|
-
}
|
46
|
-
}],
|
47
|
-
toDOM(node) {
|
48
|
-
const {
|
49
|
-
localId
|
50
|
-
} = node.attrs;
|
51
|
-
const attrs = localId !== undefined ? {
|
52
|
-
'data-local-id': localId
|
53
|
-
} : undefined;
|
54
|
-
return ['p', attrs, 0];
|
55
|
-
}
|
56
|
-
};
|
26
|
+
const pDOM = ['p', 0];
|
57
27
|
export const paragraph = {
|
58
28
|
selectable: false,
|
59
29
|
content: 'inline*',
|
@@ -63,6 +33,6 @@ export const paragraph = {
|
|
63
33
|
tag: 'p'
|
64
34
|
}],
|
65
35
|
toDOM() {
|
66
|
-
return
|
36
|
+
return pDOM;
|
67
37
|
}
|
68
38
|
};
|
package/dist/esm/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
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
|
-
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, 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, backgroundColor, backgroundColorPalette } 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, backgroundColor } from './marks';
|
7
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc,
|
7
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItemWithTask, heading, blockquoteWithList, codeBlock, extendedPanel, 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) {
|
@@ -59,7 +59,7 @@ var nodesInOrder = [{
|
|
59
59
|
spec: doc
|
60
60
|
}, {
|
61
61
|
name: 'paragraph',
|
62
|
-
spec:
|
62
|
+
spec: paragraph
|
63
63
|
}, {
|
64
64
|
name: 'text',
|
65
65
|
spec: text
|
@@ -167,7 +167,7 @@ var nodesInOrder = [{
|
|
167
167
|
spec: expand
|
168
168
|
}, {
|
169
169
|
name: 'nestedExpand',
|
170
|
-
spec:
|
170
|
+
spec: nestedExpand
|
171
171
|
}, {
|
172
172
|
name: 'extension',
|
173
173
|
spec: extension
|
package/dist/esm/schema/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, 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, backgroundColor, backgroundColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -15,19 +15,10 @@
|
|
15
15
|
* @name heading_with_indentation_node
|
16
16
|
*/
|
17
17
|
|
18
|
-
var _getAttrs = function getAttrs(level, domNode) {
|
19
|
-
return {
|
20
|
-
level: level,
|
21
|
-
localId: domNode.getAttribute('data-local-id') || heading.attrs.localId.default
|
22
|
-
};
|
23
|
-
};
|
24
18
|
export var heading = {
|
25
19
|
attrs: {
|
26
20
|
level: {
|
27
21
|
default: 1
|
28
|
-
},
|
29
|
-
localId: {
|
30
|
-
default: null
|
31
22
|
}
|
32
23
|
},
|
33
24
|
content: "inline*",
|
@@ -36,40 +27,36 @@ export var heading = {
|
|
36
27
|
selectable: false,
|
37
28
|
parseDOM: [{
|
38
29
|
tag: 'h1',
|
39
|
-
|
40
|
-
|
30
|
+
attrs: {
|
31
|
+
level: 1
|
41
32
|
}
|
42
33
|
}, {
|
43
34
|
tag: 'h2',
|
44
|
-
|
45
|
-
|
35
|
+
attrs: {
|
36
|
+
level: 2
|
46
37
|
}
|
47
38
|
}, {
|
48
39
|
tag: 'h3',
|
49
|
-
|
50
|
-
|
40
|
+
attrs: {
|
41
|
+
level: 3
|
51
42
|
}
|
52
43
|
}, {
|
53
44
|
tag: 'h4',
|
54
|
-
|
55
|
-
|
45
|
+
attrs: {
|
46
|
+
level: 4
|
56
47
|
}
|
57
48
|
}, {
|
58
49
|
tag: 'h5',
|
59
|
-
|
60
|
-
|
50
|
+
attrs: {
|
51
|
+
level: 5
|
61
52
|
}
|
62
53
|
}, {
|
63
54
|
tag: 'h6',
|
64
|
-
|
65
|
-
|
55
|
+
attrs: {
|
56
|
+
level: 6
|
66
57
|
}
|
67
58
|
}],
|
68
59
|
toDOM: function toDOM(node) {
|
69
|
-
|
70
|
-
var attrs = localId !== undefined ? {
|
71
|
-
'data-local-id': localId
|
72
|
-
} : undefined;
|
73
|
-
return ['h' + node.attrs['level'], attrs, 0];
|
60
|
+
return ['h' + node.attrs['level'], 0];
|
74
61
|
}
|
75
62
|
};
|
@@ -11,7 +11,7 @@ export { hardBreak } from './hard-break';
|
|
11
11
|
export { heading } from './heading';
|
12
12
|
export { rule } from './rule';
|
13
13
|
export { orderedList, orderedListSelector, orderedListWithOrder } from './ordered-list';
|
14
|
-
export { paragraph
|
14
|
+
export { paragraph } from './paragraph';
|
15
15
|
export { emoji } from './emoji';
|
16
16
|
export { image } from './image';
|
17
17
|
export { mention, toJSON as mentionToJSON } from './mention';
|
@@ -38,7 +38,7 @@ export { blockCard } from './block-card';
|
|
38
38
|
export { unsupportedBlock } from './unsupported-block';
|
39
39
|
export { unsupportedInline } from './unsupported-inline';
|
40
40
|
export { status } from './status';
|
41
|
-
export { nestedExpand
|
41
|
+
export { nestedExpand } from './nested-expand';
|
42
42
|
export { embedCard } from './embed-card';
|
43
43
|
// Extensions
|
44
44
|
export { extension } from './extension';
|
@@ -12,7 +12,7 @@
|
|
12
12
|
* @name nestedExpand_with_no_marks_node
|
13
13
|
*/
|
14
14
|
|
15
|
-
var createNestedExpandSpec = function createNestedExpandSpec(
|
15
|
+
var createNestedExpandSpec = function createNestedExpandSpec() {
|
16
16
|
var nestedExpandSpec = {
|
17
17
|
inline: false,
|
18
18
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
@@ -55,19 +55,12 @@ var createNestedExpandSpec = function createNestedExpandSpec(isExtended) {
|
|
55
55
|
return ['div', attrs, 0];
|
56
56
|
}
|
57
57
|
};
|
58
|
-
|
59
|
-
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+';
|
60
|
-
} else {
|
61
|
-
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | unsupportedBlock)+';
|
62
|
-
}
|
58
|
+
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+';
|
63
59
|
return nestedExpandSpec;
|
64
60
|
};
|
65
|
-
export var nestedExpand = createNestedExpandSpec(false);
|
66
61
|
|
67
62
|
/**
|
68
|
-
* @name
|
69
|
-
* @description
|
70
|
-
* Specifically, it allows codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote nodes in
|
71
|
-
* addition to content allowed inside nestedExpand
|
63
|
+
* @name nestedExpand
|
64
|
+
* @description an expand that can be nested (eg. inside table, layout).
|
72
65
|
*/
|
73
|
-
export var
|
66
|
+
export var nestedExpand = createNestedExpandSpec();
|
@@ -23,35 +23,7 @@
|
|
23
23
|
* @name paragraph_with_indentation_node
|
24
24
|
*/
|
25
25
|
|
26
|
-
|
27
|
-
selectable: false,
|
28
|
-
content: 'inline*',
|
29
|
-
group: 'block',
|
30
|
-
attrs: {
|
31
|
-
localId: {
|
32
|
-
default: null
|
33
|
-
}
|
34
|
-
},
|
35
|
-
marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
36
|
-
parseDOM: [{
|
37
|
-
tag: 'p',
|
38
|
-
getAttrs: function getAttrs(domNode) {
|
39
|
-
var _paragraph$attrs;
|
40
|
-
var dom = domNode;
|
41
|
-
var attrs = {
|
42
|
-
localId: dom.getAttribute('data-local-id') || ((_paragraph$attrs = paragraph.attrs) === null || _paragraph$attrs === void 0 ? void 0 : _paragraph$attrs.localId.default)
|
43
|
-
};
|
44
|
-
return attrs;
|
45
|
-
}
|
46
|
-
}],
|
47
|
-
toDOM: function toDOM(node) {
|
48
|
-
var localId = node.attrs.localId;
|
49
|
-
var attrs = localId !== undefined ? {
|
50
|
-
'data-local-id': localId
|
51
|
-
} : undefined;
|
52
|
-
return ['p', attrs, 0];
|
53
|
-
}
|
54
|
-
};
|
26
|
+
var pDOM = ['p', 0];
|
55
27
|
export var paragraph = {
|
56
28
|
selectable: false,
|
57
29
|
content: 'inline*',
|
@@ -61,6 +33,6 @@ export var paragraph = {
|
|
61
33
|
tag: 'p'
|
62
34
|
}],
|
63
35
|
toDOM: function toDOM() {
|
64
|
-
return
|
36
|
+
return pDOM;
|
65
37
|
}
|
66
38
|
};
|
@@ -1232,15 +1232,6 @@
|
|
1232
1232
|
"$ref": "#/definitions/inline_node"
|
1233
1233
|
}
|
1234
1234
|
},
|
1235
|
-
"attrs": {
|
1236
|
-
"type": "object",
|
1237
|
-
"properties": {
|
1238
|
-
"localId": {
|
1239
|
-
"type": "string"
|
1240
|
-
}
|
1241
|
-
},
|
1242
|
-
"additionalProperties": false
|
1243
|
-
},
|
1244
1235
|
"marks": {
|
1245
1236
|
"type": "array"
|
1246
1237
|
}
|
@@ -1720,9 +1711,6 @@
|
|
1720
1711
|
"type": "number",
|
1721
1712
|
"minimum": 1,
|
1722
1713
|
"maximum": 6
|
1723
|
-
},
|
1724
|
-
"localId": {
|
1725
|
-
"type": "string"
|
1726
1714
|
}
|
1727
1715
|
},
|
1728
1716
|
"required": [
|
package/dist/types/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
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
|
-
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, 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, backgroundColor, backgroundColorPalette, } 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, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, MultiBodiedExtensionDefinition, ExtensionFrameDefinition, BackgroundColorDefinition, } from './schema';
|
5
5
|
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';
|
6
6
|
export type { Match, NameToEmoji } from './utils';
|
@@ -1,4 +1,4 @@
|
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
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, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, 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, TableDisplayMode, 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. */
|
@@ -20,7 +20,7 @@ export { rule } from './rule';
|
|
20
20
|
export type { RuleDefinition } from './rule';
|
21
21
|
export { orderedList, orderedListSelector, orderedListWithOrder, } from './ordered-list';
|
22
22
|
export type { OrderedListDefinition } from './types/list';
|
23
|
-
export { paragraph
|
23
|
+
export { paragraph } from './paragraph';
|
24
24
|
export type { ParagraphDefinition, ParagraphBaseDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, } from './paragraph';
|
25
25
|
export { emoji } from './emoji';
|
26
26
|
export type { EmojiAttributes, EmojiDefinition } from './emoji';
|
@@ -70,7 +70,7 @@ export { unsupportedBlock } from './unsupported-block';
|
|
70
70
|
export { unsupportedInline } from './unsupported-inline';
|
71
71
|
export { status } from './status';
|
72
72
|
export type { StatusDefinition } from './status';
|
73
|
-
export { nestedExpand
|
73
|
+
export { nestedExpand } from './nested-expand';
|
74
74
|
export type { NestedExpandDefinition } from './nested-expand';
|
75
75
|
export type { NoMark } from './types/mark';
|
76
76
|
export type { MarksObject } from './types/mark';
|
@@ -31,11 +31,8 @@ export interface NestedExpandBaseDefinition {
|
|
31
31
|
* @name nestedExpand_with_no_marks_node
|
32
32
|
*/
|
33
33
|
export type NestedExpandDefinition = NestedExpandBaseDefinition & NoMark;
|
34
|
-
export declare const nestedExpand: NodeSpec;
|
35
34
|
/**
|
36
|
-
* @name
|
37
|
-
* @description
|
38
|
-
* Specifically, it allows codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote nodes in
|
39
|
-
* addition to content allowed inside nestedExpand
|
35
|
+
* @name nestedExpand
|
36
|
+
* @description an expand that can be nested (eg. inside table, layout).
|
40
37
|
*/
|
41
|
-
export declare const
|
38
|
+
export declare const nestedExpand: NodeSpec;
|
@@ -2,12 +2,6 @@ import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { AlignmentMarkDefinition, IndentationMarkDefinition } from '../marks';
|
3
3
|
import { MarksObject, NoMark } from './types/mark';
|
4
4
|
import { Inline } from './types/inline-content';
|
5
|
-
export interface ParagraphAttributes {
|
6
|
-
/**
|
7
|
-
* @stage 0
|
8
|
-
*/
|
9
|
-
localId?: string;
|
10
|
-
}
|
11
5
|
/**
|
12
6
|
* @name paragraph_node
|
13
7
|
*/
|
@@ -17,10 +11,6 @@ export interface ParagraphBaseDefinition {
|
|
17
11
|
* @allowUnsupportedInline true
|
18
12
|
*/
|
19
13
|
content?: Array<Inline>;
|
20
|
-
/**
|
21
|
-
* @stage 0
|
22
|
-
*/
|
23
|
-
attrs?: ParagraphAttributes;
|
24
14
|
marks?: Array<any>;
|
25
15
|
}
|
26
16
|
/**
|
@@ -44,5 +34,4 @@ export type ParagraphWithAlignmentDefinition = ParagraphBaseDefinition & MarksOb
|
|
44
34
|
*/
|
45
35
|
export type ParagraphWithIndentationDefinition = ParagraphBaseDefinition & MarksObject<IndentationMarkDefinition>;
|
46
36
|
export type ParagraphWithMarksDefinition = ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition;
|
47
|
-
export declare const paragraphStage0: NodeSpec;
|
48
37
|
export declare const paragraph: NodeSpec;
|
@@ -1232,15 +1232,6 @@
|
|
1232
1232
|
"$ref": "#/definitions/inline_node"
|
1233
1233
|
}
|
1234
1234
|
},
|
1235
|
-
"attrs": {
|
1236
|
-
"type": "object",
|
1237
|
-
"properties": {
|
1238
|
-
"localId": {
|
1239
|
-
"type": "string"
|
1240
|
-
}
|
1241
|
-
},
|
1242
|
-
"additionalProperties": false
|
1243
|
-
},
|
1244
1235
|
"marks": {
|
1245
1236
|
"type": "array"
|
1246
1237
|
}
|
@@ -1720,9 +1711,6 @@
|
|
1720
1711
|
"type": "number",
|
1721
1712
|
"minimum": 1,
|
1722
1713
|
"maximum": 6
|
1723
|
-
},
|
1724
|
-
"localId": {
|
1725
|
-
"type": "string"
|
1726
1714
|
}
|
1727
1715
|
},
|
1728
1716
|
"required": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "
|
3
|
+
"version": "36.1.0",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"memoize-one": "^6.0.0"
|
42
42
|
},
|
43
43
|
"devDependencies": {
|
44
|
-
"@atlassian/adf-schema-json": "^1.
|
44
|
+
"@atlassian/adf-schema-json": "^1.12.0",
|
45
45
|
"@babel/cli": "^7.22.9",
|
46
46
|
"@babel/core": "^7.22.9",
|
47
47
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|