@atlaskit/adf-schema 33.1.3 → 33.2.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 33.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e545688: ED-20068: Updated ADF schema and PM schema for MBE
8
+
9
+ ## 33.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - e958e89: ED-20043: Adding Multi-bodied Extension to enable Nested Bodied Macros (NBM)
14
+
3
15
  ## 33.1.3
4
16
 
5
17
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -531,6 +531,12 @@ Object.defineProperty(exports, "extension", {
531
531
  return _schema.extension;
532
532
  }
533
533
  });
534
+ Object.defineProperty(exports, "extensionFrame", {
535
+ enumerable: true,
536
+ get: function get() {
537
+ return _schema.extensionFrame;
538
+ }
539
+ });
534
540
  Object.defineProperty(exports, "fragment", {
535
541
  enumerable: true,
536
542
  get: function get() {
@@ -759,6 +765,12 @@ Object.defineProperty(exports, "mentionToJSON", {
759
765
  return _schema.mentionToJSON;
760
766
  }
761
767
  });
768
+ Object.defineProperty(exports, "multiBodiedExtension", {
769
+ enumerable: true,
770
+ get: function get() {
771
+ return _schema.multiBodiedExtension;
772
+ }
773
+ });
762
774
  Object.defineProperty(exports, "nestedExpand", {
763
775
  enumerable: true,
764
776
  get: function get() {
@@ -187,6 +187,12 @@ var nodesInOrder = [{
187
187
  }, {
188
188
  name: 'bodiedExtension',
189
189
  spec: _nodes.bodiedExtension
190
+ }, {
191
+ name: 'multiBodiedExtension',
192
+ spec: _nodes.multiBodiedExtension
193
+ }, {
194
+ name: 'extensionFrame',
195
+ spec: _nodes.extensionFrame
190
196
  }, {
191
197
  name: 'inlineCard',
192
198
  spec: _nodes.inlineCard
@@ -243,6 +243,12 @@ Object.defineProperty(exports, "extension", {
243
243
  return _nodes.extension;
244
244
  }
245
245
  });
246
+ Object.defineProperty(exports, "extensionFrame", {
247
+ enumerable: true,
248
+ get: function get() {
249
+ return _nodes.extensionFrame;
250
+ }
251
+ });
246
252
  Object.defineProperty(exports, "fragment", {
247
253
  enumerable: true,
248
254
  get: function get() {
@@ -417,6 +423,12 @@ Object.defineProperty(exports, "mentionToJSON", {
417
423
  return _nodes.mentionToJSON;
418
424
  }
419
425
  });
426
+ Object.defineProperty(exports, "multiBodiedExtension", {
427
+ enumerable: true,
428
+ get: function get() {
429
+ return _nodes.multiBodiedExtension;
430
+ }
431
+ });
420
432
  Object.defineProperty(exports, "nestedExpand", {
421
433
  enumerable: true,
422
434
  get: function get() {
@@ -9,7 +9,7 @@ exports.doc = void 0;
9
9
  */
10
10
 
11
11
  var doc = {
12
- content: '(block|layoutSection)+',
12
+ content: '(block|layoutSection|blockRootOnly)+',
13
13
  marks: 'alignment breakout dataConsumer fragment indentation unsupportedMark unsupportedNodeAttribute'
14
14
  };
15
15
  exports.doc = doc;
@@ -142,6 +142,12 @@ Object.defineProperty(exports, "extension", {
142
142
  return _extension.extension;
143
143
  }
144
144
  });
145
+ Object.defineProperty(exports, "extensionFrame", {
146
+ enumerable: true,
147
+ get: function get() {
148
+ return _multiBodiedExtension.extensionFrame;
149
+ }
150
+ });
145
151
  Object.defineProperty(exports, "getCellAttrs", {
146
152
  enumerable: true,
147
153
  get: function get() {
@@ -280,6 +286,12 @@ Object.defineProperty(exports, "mentionToJSON", {
280
286
  return _mention.toJSON;
281
287
  }
282
288
  });
289
+ Object.defineProperty(exports, "multiBodiedExtension", {
290
+ enumerable: true,
291
+ get: function get() {
292
+ return _multiBodiedExtension.multiBodiedExtension;
293
+ }
294
+ });
283
295
  Object.defineProperty(exports, "nestedExpand", {
284
296
  enumerable: true,
285
297
  get: function get() {
@@ -502,9 +514,6 @@ var _decisionList = require("./decision-list");
502
514
  var _decisionItem = require("./decision-item");
503
515
  var _taskList = require("./task-list");
504
516
  var _taskItem = require("./task-item");
505
- var _extension = require("./extension");
506
- var _inlineExtension = require("./inline-extension");
507
- var _bodiedExtension = require("./bodied-extension");
508
517
  var _date = require("./date");
509
518
  var _placeholder = require("./placeholder");
510
519
  var _layoutSection = require("./layout-section");
@@ -515,4 +524,8 @@ var _unsupportedBlock = require("./unsupported-block");
515
524
  var _unsupportedInline = require("./unsupported-inline");
516
525
  var _status = require("./status");
517
526
  var _nestedExpand = require("./nested-expand");
518
- var _embedCard = require("./embed-card");
527
+ var _embedCard = require("./embed-card");
528
+ var _extension = require("./extension");
529
+ var _inlineExtension = require("./inline-extension");
530
+ var _bodiedExtension = require("./bodied-extension");
531
+ var _multiBodiedExtension = require("./multi-bodied-extension");
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.multiBodiedExtension = exports.extensionFrame = void 0;
7
+ var _extensions = require("../../utils/extensions");
8
+ /**
9
+ * @stage 0
10
+ * @name extensionFrame_node
11
+ * @description Wraps the block content
12
+ */
13
+
14
+ /**
15
+ * @returns NodeSpec for ExtensionFrameDefinition
16
+ */
17
+ var extensionFrame = {
18
+ type: 'extensionFrame',
19
+ content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | bodiedExtension | unsupportedBlock | blockCard | embedCard)+',
20
+ isolating: true,
21
+ definingAsContext: false,
22
+ definingForContent: true,
23
+ selectable: true,
24
+ attrs: {},
25
+ parseDOM: [{
26
+ context: 'extensionFrame//',
27
+ tag: 'div[data-extension-frame]',
28
+ skip: true
29
+ }, {
30
+ tag: 'div[data-extension-frame]'
31
+ }],
32
+ toDOM: function toDOM() {
33
+ var attrs = {
34
+ 'data-extension-frame': 'true'
35
+ };
36
+ return ['div', attrs, 0];
37
+ }
38
+ };
39
+
40
+ /**
41
+ * @stage 0
42
+ * @name multiBodiedExtension_node
43
+ * @description Wraps multiple extensionFrame objects.
44
+ */
45
+ exports.extensionFrame = extensionFrame;
46
+ /**
47
+ * @returns NodeSpec for MultiBodiedExtensionDefinition
48
+ */
49
+ var createMultiBodiedExtensionNodeSpec = function createMultiBodiedExtensionNodeSpec() {
50
+ var nodeSpec = {
51
+ inline: false,
52
+ group: 'blockRootOnly',
53
+ content: 'extensionFrame+',
54
+ block: true,
55
+ definingAsContext: true,
56
+ selectable: true,
57
+ attrs: {
58
+ extensionKey: {
59
+ default: ''
60
+ },
61
+ extensionType: {
62
+ default: ''
63
+ },
64
+ maxFrames: {
65
+ default: 5
66
+ },
67
+ parameters: {
68
+ default: null
69
+ },
70
+ text: {
71
+ default: null
72
+ },
73
+ layout: {
74
+ default: 'default'
75
+ },
76
+ localId: {
77
+ default: null
78
+ }
79
+ },
80
+ parseDOM: [{
81
+ context: 'multiBodiedExtension//',
82
+ tag: '[data-node-type="multi-bodied-extension"]',
83
+ skip: true
84
+ }, {
85
+ tag: '[data-node-type="multi-bodied-extension"]',
86
+ getAttrs: function getAttrs(domNode) {
87
+ return (0, _extensions.getExtensionAttrs)(domNode);
88
+ }
89
+ }],
90
+ toDOM: function toDOM(node) {
91
+ var attrs = {
92
+ 'data-node-type': 'multi-bodied-extension',
93
+ 'data-extension-type': node.attrs.extensionType,
94
+ 'data-extension-key': node.attrs.extensionKey,
95
+ 'data-text': node.attrs.text,
96
+ 'data-parameters': JSON.stringify(node.attrs.parameters),
97
+ 'data-layout': node.attrs.layout,
98
+ 'data-local-id:': node.attrs.localId
99
+ };
100
+ return ['div', attrs, 0];
101
+ }
102
+ };
103
+ return nodeSpec;
104
+ };
105
+ var multiBodiedExtension = createMultiBodiedExtensionNodeSpec();
106
+ exports.multiBodiedExtension = multiBodiedExtension;
@@ -1,3 +1,3 @@
1
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. */
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 } from './schema';
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 } 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, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
4
+ import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquote, 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 {};
@@ -172,6 +172,12 @@ const nodesInOrder = [{
172
172
  }, {
173
173
  name: 'bodiedExtension',
174
174
  spec: bodiedExtension
175
+ }, {
176
+ name: 'multiBodiedExtension',
177
+ spec: multiBodiedExtension
178
+ }, {
179
+ name: 'extensionFrame',
180
+ spec: extensionFrame
175
181
  }, {
176
182
  name: 'inlineCard',
177
183
  spec: inlineCard
@@ -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 } from './nodes';
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';
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';
@@ -3,6 +3,6 @@
3
3
  */
4
4
 
5
5
  export const doc = {
6
- content: '(block|layoutSection)+',
6
+ content: '(block|layoutSection|blockRootOnly)+',
7
7
  marks: 'alignment breakout dataConsumer fragment indentation unsupportedMark unsupportedNodeAttribute'
8
8
  };
@@ -28,9 +28,6 @@ export { decisionList, decisionListSelector } from './decision-list';
28
28
  export { decisionItem } from './decision-item';
29
29
  export { taskList, taskListSelector } from './task-list';
30
30
  export { taskItem } from './task-item';
31
- export { extension } from './extension';
32
- export { inlineExtension } from './inline-extension';
33
- export { bodiedExtension } from './bodied-extension';
34
31
  export { date } from './date';
35
32
  export { placeholder } from './placeholder';
36
33
  export { layoutSection, layoutSectionWithSingleColumn } from './layout-section';
@@ -41,4 +38,9 @@ export { unsupportedBlock } from './unsupported-block';
41
38
  export { unsupportedInline } from './unsupported-inline';
42
39
  export { status } from './status';
43
40
  export { nestedExpand } from './nested-expand';
44
- export { embedCard } from './embed-card';
41
+ export { embedCard } from './embed-card';
42
+ // Extensions
43
+ export { extension } from './extension';
44
+ export { inlineExtension } from './inline-extension';
45
+ export { bodiedExtension } from './bodied-extension';
46
+ export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
@@ -0,0 +1,98 @@
1
+ import { getExtensionAttrs } from '../../utils/extensions';
2
+
3
+ /**
4
+ * @stage 0
5
+ * @name extensionFrame_node
6
+ * @description Wraps the block content
7
+ */
8
+
9
+ /**
10
+ * @returns NodeSpec for ExtensionFrameDefinition
11
+ */
12
+ export const extensionFrame = {
13
+ type: 'extensionFrame',
14
+ content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | bodiedExtension | unsupportedBlock | blockCard | embedCard)+',
15
+ isolating: true,
16
+ definingAsContext: false,
17
+ definingForContent: true,
18
+ selectable: true,
19
+ attrs: {},
20
+ parseDOM: [{
21
+ context: 'extensionFrame//',
22
+ tag: 'div[data-extension-frame]',
23
+ skip: true
24
+ }, {
25
+ tag: 'div[data-extension-frame]'
26
+ }],
27
+ toDOM() {
28
+ const attrs = {
29
+ 'data-extension-frame': 'true'
30
+ };
31
+ return ['div', attrs, 0];
32
+ }
33
+ };
34
+
35
+ /**
36
+ * @stage 0
37
+ * @name multiBodiedExtension_node
38
+ * @description Wraps multiple extensionFrame objects.
39
+ */
40
+
41
+ /**
42
+ * @returns NodeSpec for MultiBodiedExtensionDefinition
43
+ */
44
+ const createMultiBodiedExtensionNodeSpec = () => {
45
+ const nodeSpec = {
46
+ inline: false,
47
+ group: 'blockRootOnly',
48
+ content: 'extensionFrame+',
49
+ block: true,
50
+ definingAsContext: true,
51
+ selectable: true,
52
+ attrs: {
53
+ extensionKey: {
54
+ default: ''
55
+ },
56
+ extensionType: {
57
+ default: ''
58
+ },
59
+ maxFrames: {
60
+ default: 5
61
+ },
62
+ parameters: {
63
+ default: null
64
+ },
65
+ text: {
66
+ default: null
67
+ },
68
+ layout: {
69
+ default: 'default'
70
+ },
71
+ localId: {
72
+ default: null
73
+ }
74
+ },
75
+ parseDOM: [{
76
+ context: 'multiBodiedExtension//',
77
+ tag: '[data-node-type="multi-bodied-extension"]',
78
+ skip: true
79
+ }, {
80
+ tag: '[data-node-type="multi-bodied-extension"]',
81
+ getAttrs: domNode => getExtensionAttrs(domNode)
82
+ }],
83
+ toDOM(node) {
84
+ const attrs = {
85
+ 'data-node-type': 'multi-bodied-extension',
86
+ 'data-extension-type': node.attrs.extensionType,
87
+ 'data-extension-key': node.attrs.extensionKey,
88
+ 'data-text': node.attrs.text,
89
+ 'data-parameters': JSON.stringify(node.attrs.parameters),
90
+ 'data-layout': node.attrs.layout,
91
+ 'data-local-id:': node.attrs.localId
92
+ };
93
+ return ['div', attrs, 0];
94
+ }
95
+ };
96
+ return nodeSpec;
97
+ };
98
+ export const multiBodiedExtension = createMultiBodiedExtensionNodeSpec();
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
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. */
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 } from './schema';
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 } 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, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
7
+ import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquote, 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) {
@@ -177,6 +177,12 @@ var nodesInOrder = [{
177
177
  }, {
178
178
  name: 'bodiedExtension',
179
179
  spec: bodiedExtension
180
+ }, {
181
+ name: 'multiBodiedExtension',
182
+ spec: multiBodiedExtension
183
+ }, {
184
+ name: 'extensionFrame',
185
+ spec: extensionFrame
180
186
  }, {
181
187
  name: 'inlineCard',
182
188
  spec: inlineCard
@@ -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 } from './nodes';
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';
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';
@@ -3,6 +3,6 @@
3
3
  */
4
4
 
5
5
  export var doc = {
6
- content: '(block|layoutSection)+',
6
+ content: '(block|layoutSection|blockRootOnly)+',
7
7
  marks: 'alignment breakout dataConsumer fragment indentation unsupportedMark unsupportedNodeAttribute'
8
8
  };
@@ -28,9 +28,6 @@ export { decisionList, decisionListSelector } from './decision-list';
28
28
  export { decisionItem } from './decision-item';
29
29
  export { taskList, taskListSelector } from './task-list';
30
30
  export { taskItem } from './task-item';
31
- export { extension } from './extension';
32
- export { inlineExtension } from './inline-extension';
33
- export { bodiedExtension } from './bodied-extension';
34
31
  export { date } from './date';
35
32
  export { placeholder } from './placeholder';
36
33
  export { layoutSection, layoutSectionWithSingleColumn } from './layout-section';
@@ -41,4 +38,9 @@ export { unsupportedBlock } from './unsupported-block';
41
38
  export { unsupportedInline } from './unsupported-inline';
42
39
  export { status } from './status';
43
40
  export { nestedExpand } from './nested-expand';
44
- export { embedCard } from './embed-card';
41
+ export { embedCard } from './embed-card';
42
+ // Extensions
43
+ export { extension } from './extension';
44
+ export { inlineExtension } from './inline-extension';
45
+ export { bodiedExtension } from './bodied-extension';
46
+ export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
@@ -0,0 +1,100 @@
1
+ import { getExtensionAttrs } from '../../utils/extensions';
2
+
3
+ /**
4
+ * @stage 0
5
+ * @name extensionFrame_node
6
+ * @description Wraps the block content
7
+ */
8
+
9
+ /**
10
+ * @returns NodeSpec for ExtensionFrameDefinition
11
+ */
12
+ export var extensionFrame = {
13
+ type: 'extensionFrame',
14
+ content: '(panel | paragraph | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | bodiedExtension | unsupportedBlock | blockCard | embedCard)+',
15
+ isolating: true,
16
+ definingAsContext: false,
17
+ definingForContent: true,
18
+ selectable: true,
19
+ attrs: {},
20
+ parseDOM: [{
21
+ context: 'extensionFrame//',
22
+ tag: 'div[data-extension-frame]',
23
+ skip: true
24
+ }, {
25
+ tag: 'div[data-extension-frame]'
26
+ }],
27
+ toDOM: function toDOM() {
28
+ var attrs = {
29
+ 'data-extension-frame': 'true'
30
+ };
31
+ return ['div', attrs, 0];
32
+ }
33
+ };
34
+
35
+ /**
36
+ * @stage 0
37
+ * @name multiBodiedExtension_node
38
+ * @description Wraps multiple extensionFrame objects.
39
+ */
40
+
41
+ /**
42
+ * @returns NodeSpec for MultiBodiedExtensionDefinition
43
+ */
44
+ var createMultiBodiedExtensionNodeSpec = function createMultiBodiedExtensionNodeSpec() {
45
+ var nodeSpec = {
46
+ inline: false,
47
+ group: 'blockRootOnly',
48
+ content: 'extensionFrame+',
49
+ block: true,
50
+ definingAsContext: true,
51
+ selectable: true,
52
+ attrs: {
53
+ extensionKey: {
54
+ default: ''
55
+ },
56
+ extensionType: {
57
+ default: ''
58
+ },
59
+ maxFrames: {
60
+ default: 5
61
+ },
62
+ parameters: {
63
+ default: null
64
+ },
65
+ text: {
66
+ default: null
67
+ },
68
+ layout: {
69
+ default: 'default'
70
+ },
71
+ localId: {
72
+ default: null
73
+ }
74
+ },
75
+ parseDOM: [{
76
+ context: 'multiBodiedExtension//',
77
+ tag: '[data-node-type="multi-bodied-extension"]',
78
+ skip: true
79
+ }, {
80
+ tag: '[data-node-type="multi-bodied-extension"]',
81
+ getAttrs: function getAttrs(domNode) {
82
+ return getExtensionAttrs(domNode);
83
+ }
84
+ }],
85
+ toDOM: function toDOM(node) {
86
+ var attrs = {
87
+ 'data-node-type': 'multi-bodied-extension',
88
+ 'data-extension-type': node.attrs.extensionType,
89
+ 'data-extension-key': node.attrs.extensionKey,
90
+ 'data-text': node.attrs.text,
91
+ 'data-parameters': JSON.stringify(node.attrs.parameters),
92
+ 'data-layout': node.attrs.layout,
93
+ 'data-local-id:': node.attrs.localId
94
+ };
95
+ return ['div', attrs, 0];
96
+ }
97
+ };
98
+ return nodeSpec;
99
+ };
100
+ export var multiBodiedExtension = createMultiBodiedExtensionNodeSpec();
@@ -2764,6 +2764,145 @@
2764
2764
  }
2765
2765
  ]
2766
2766
  },
2767
+ "extensionFrame_node": {
2768
+ "type": "object",
2769
+ "properties": {
2770
+ "type": {
2771
+ "enum": [
2772
+ "extensionFrame"
2773
+ ]
2774
+ },
2775
+ "content": {
2776
+ "type": "array",
2777
+ "items": {
2778
+ "anyOf": [
2779
+ {
2780
+ "$ref": "#/definitions/codeBlock_with_no_marks_node"
2781
+ },
2782
+ {
2783
+ "$ref": "#/definitions/blockCard_node"
2784
+ },
2785
+ {
2786
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
2787
+ },
2788
+ {
2789
+ "$ref": "#/definitions/mediaSingle_caption_node"
2790
+ },
2791
+ {
2792
+ "$ref": "#/definitions/mediaSingle_full_node"
2793
+ },
2794
+ {
2795
+ "$ref": "#/definitions/bulletList_node"
2796
+ },
2797
+ {
2798
+ "$ref": "#/definitions/orderedList_node"
2799
+ },
2800
+ {
2801
+ "$ref": "#/definitions/heading_with_no_marks_node"
2802
+ },
2803
+ {
2804
+ "$ref": "#/definitions/panel_node"
2805
+ },
2806
+ {
2807
+ "$ref": "#/definitions/blockquote_node"
2808
+ },
2809
+ {
2810
+ "$ref": "#/definitions/rule_node"
2811
+ },
2812
+ {
2813
+ "$ref": "#/definitions/mediaGroup_node"
2814
+ },
2815
+ {
2816
+ "$ref": "#/definitions/decisionList_node"
2817
+ },
2818
+ {
2819
+ "$ref": "#/definitions/taskList_node"
2820
+ },
2821
+ {
2822
+ "$ref": "#/definitions/extension_with_marks_node"
2823
+ },
2824
+ {
2825
+ "$ref": "#/definitions/embedCard_node"
2826
+ },
2827
+ {
2828
+ "$ref": "#/definitions/table_node"
2829
+ },
2830
+ {
2831
+ "$ref": "#/definitions/bodiedExtension_with_marks_node"
2832
+ }
2833
+ ]
2834
+ },
2835
+ "minItems": 1
2836
+ }
2837
+ },
2838
+ "required": [
2839
+ "type",
2840
+ "content"
2841
+ ],
2842
+ "additionalProperties": false
2843
+ },
2844
+ "multiBodiedExtension_node": {
2845
+ "type": "object",
2846
+ "properties": {
2847
+ "type": {
2848
+ "enum": [
2849
+ "multiBodiedExtension"
2850
+ ]
2851
+ },
2852
+ "attrs": {
2853
+ "type": "object",
2854
+ "properties": {
2855
+ "maxFrames": {
2856
+ "type": "number",
2857
+ "default": 5
2858
+ },
2859
+ "extensionKey": {
2860
+ "type": "string",
2861
+ "minLength": 1
2862
+ },
2863
+ "extensionType": {
2864
+ "type": "string",
2865
+ "minLength": 1
2866
+ },
2867
+ "parameters": {},
2868
+ "text": {
2869
+ "type": "string"
2870
+ },
2871
+ "layout": {
2872
+ "enum": [
2873
+ "wide",
2874
+ "full-width",
2875
+ "default"
2876
+ ]
2877
+ },
2878
+ "localId": {
2879
+ "type": "string",
2880
+ "minLength": 1
2881
+ }
2882
+ },
2883
+ "additionalProperties": false,
2884
+ "required": [
2885
+ "extensionKey",
2886
+ "extensionType"
2887
+ ]
2888
+ },
2889
+ "marks": {
2890
+ "type": "array"
2891
+ },
2892
+ "content": {
2893
+ "type": "array",
2894
+ "items": {
2895
+ "$ref": "#/definitions/extensionFrame_node"
2896
+ }
2897
+ }
2898
+ },
2899
+ "required": [
2900
+ "type",
2901
+ "attrs",
2902
+ "content"
2903
+ ],
2904
+ "additionalProperties": false
2905
+ },
2767
2906
  "doc_node": {
2768
2907
  "type": "object",
2769
2908
  "properties": {
@@ -2861,6 +3000,9 @@
2861
3000
  },
2862
3001
  {
2863
3002
  "$ref": "#/definitions/layoutSection_with_single_column_node"
3003
+ },
3004
+ {
3005
+ "$ref": "#/definitions/multiBodiedExtension_node"
2864
3006
  }
2865
3007
  ]
2866
3008
  }
@@ -1,6 +1,6 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, 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, 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, } from './schema';
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, } 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, } from './utils';
6
6
  export type { Match, NameToEmoji } from './utils';
@@ -1,5 +1,5 @@
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, } from './nodes';
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, } from './nodes';
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';
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. */
5
5
  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,6 +4,7 @@ import { ExpandWithBreakoutDefinition as ExpandWithBreakout } from './expand';
4
4
  import { LayoutSectionDefinition as LayoutSection } from './layout-section';
5
5
  import { ParagraphWithIndentationDefinition } from './paragraph';
6
6
  import { BlockContent } from './types/block-content';
7
+ import { MultiBodiedExtensionDefinition as MultiBodiedExtension } from './multi-bodied-extension';
7
8
  /**
8
9
  * @name doc_node
9
10
  */
@@ -13,6 +14,6 @@ export interface DocNode {
13
14
  /**
14
15
  * @allowUnsupportedBlock true
15
16
  */
16
- content: Array<BlockContent | LayoutSection | CodeBlockWithMarks | ExpandWithBreakout | ParagraphWithIndentationDefinition>;
17
+ content: Array<BlockContent | LayoutSection | CodeBlockWithMarks | ExpandWithBreakout | ParagraphWithIndentationDefinition | MultiBodiedExtension>;
17
18
  }
18
19
  export declare const doc: NodeSpec;
@@ -53,12 +53,6 @@ export { taskList, taskListSelector } from './task-list';
53
53
  export type { TaskListDefinition, TaskListContent } from './task-list';
54
54
  export { taskItem } from './task-item';
55
55
  export type { TaskItemDefinition } from './task-item';
56
- export { extension } from './extension';
57
- export type { ExtensionDefinition } from './extension';
58
- export { inlineExtension } from './inline-extension';
59
- export type { InlineExtensionDefinition } from './inline-extension';
60
- export { bodiedExtension } from './bodied-extension';
61
- export type { BodiedExtensionDefinition } from './bodied-extension';
62
56
  export { date } from './date';
63
57
  export type { DateDefinition } from './date';
64
58
  export { placeholder } from './placeholder';
@@ -91,3 +85,11 @@ export type { Layout as ExtensionLayout } from './types/extensions';
91
85
  export { embedCard } from './embed-card';
92
86
  export type { EmbedCardDefinition, EmbedCardAttributes } from './embed-card';
93
87
  export type { RichMediaAttributes, ExtendedMediaAttributes, Layout as RichMediaLayout, } from './types/rich-media-common';
88
+ export { extension } from './extension';
89
+ export type { ExtensionDefinition } from './extension';
90
+ export { inlineExtension } from './inline-extension';
91
+ export type { InlineExtensionDefinition } from './inline-extension';
92
+ export { bodiedExtension } from './bodied-extension';
93
+ export type { BodiedExtensionDefinition } from './bodied-extension';
94
+ export type { ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './multi-bodied-extension';
95
+ export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
@@ -0,0 +1,50 @@
1
+ import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ import { MultiBodiedExtensionAttributes } from './types/extensions';
3
+ import { BodiedExtensionDefinition as BodiedExtension } from './bodied-extension';
4
+ import { PanelDefinition as Panel } from './panel';
5
+ import { ParagraphDefinition as Paragraph } from './paragraph';
6
+ import { BlockQuoteDefinition as Blockquote } from './blockquote';
7
+ import { OrderedListDefinition as OrderedList } from './types/list';
8
+ import { BulletListDefinition as BulletList } from './types/list';
9
+ import { RuleDefinition as Rule } from './rule';
10
+ import { HeadingDefinition as Heading } from './heading';
11
+ import { CodeBlockDefinition as CodeBlock } from './code-block';
12
+ import { MediaGroupDefinition as MediaGroup } from './media-group';
13
+ import { MediaSingleDefinition as MediaSingle } from './media-single';
14
+ import { DecisionListDefinition as DecisionList } from './decision-list';
15
+ import { TaskListDefinition as TaskList } from './task-list';
16
+ import { TableDefinition as Table } from './tableNodes';
17
+ import { ExtensionDefinition as Extension } from './extension';
18
+ import { BlockCardDefinition as BlockCard } from './block-card';
19
+ import { EmbedCardDefinition as EmbedCard } from './embed-card';
20
+ /**
21
+ * @stage 0
22
+ * @name extensionFrame_node
23
+ * @description Wraps the block content
24
+ */
25
+ export interface ExtensionFrameDefinition {
26
+ type: 'extensionFrame';
27
+ /**
28
+ * @minItems 1
29
+ */
30
+ content: Array<BodiedExtension | Panel | Paragraph | Blockquote | OrderedList | BulletList | Rule | Heading | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Table | Extension | BlockCard | EmbedCard>;
31
+ }
32
+ /**
33
+ * @returns NodeSpec for ExtensionFrameDefinition
34
+ */
35
+ export declare const extensionFrame: NodeSpec;
36
+ /**
37
+ * @stage 0
38
+ * @name multiBodiedExtension_node
39
+ * @description Wraps multiple extensionFrame objects.
40
+ */
41
+ export interface MultiBodiedExtensionDefinition {
42
+ type: 'multiBodiedExtension';
43
+ attrs: MultiBodiedExtensionAttributes;
44
+ marks?: Array<any>;
45
+ /**
46
+ * @minLength 1
47
+ */
48
+ content: Array<ExtensionFrameDefinition>;
49
+ }
50
+ export declare const multiBodiedExtension: NodeSpec;
@@ -32,3 +32,9 @@ export interface InlineExtensionAttributes {
32
32
  */
33
33
  localId?: string;
34
34
  }
35
+ export interface MultiBodiedExtensionAttributes extends ExtensionAttributes {
36
+ /**
37
+ * @default 5
38
+ */
39
+ maxFrames?: number;
40
+ }
@@ -2764,6 +2764,145 @@
2764
2764
  }
2765
2765
  ]
2766
2766
  },
2767
+ "extensionFrame_node": {
2768
+ "type": "object",
2769
+ "properties": {
2770
+ "type": {
2771
+ "enum": [
2772
+ "extensionFrame"
2773
+ ]
2774
+ },
2775
+ "content": {
2776
+ "type": "array",
2777
+ "items": {
2778
+ "anyOf": [
2779
+ {
2780
+ "$ref": "#/definitions/codeBlock_with_no_marks_node"
2781
+ },
2782
+ {
2783
+ "$ref": "#/definitions/blockCard_node"
2784
+ },
2785
+ {
2786
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
2787
+ },
2788
+ {
2789
+ "$ref": "#/definitions/mediaSingle_caption_node"
2790
+ },
2791
+ {
2792
+ "$ref": "#/definitions/mediaSingle_full_node"
2793
+ },
2794
+ {
2795
+ "$ref": "#/definitions/bulletList_node"
2796
+ },
2797
+ {
2798
+ "$ref": "#/definitions/orderedList_node"
2799
+ },
2800
+ {
2801
+ "$ref": "#/definitions/heading_with_no_marks_node"
2802
+ },
2803
+ {
2804
+ "$ref": "#/definitions/panel_node"
2805
+ },
2806
+ {
2807
+ "$ref": "#/definitions/blockquote_node"
2808
+ },
2809
+ {
2810
+ "$ref": "#/definitions/rule_node"
2811
+ },
2812
+ {
2813
+ "$ref": "#/definitions/mediaGroup_node"
2814
+ },
2815
+ {
2816
+ "$ref": "#/definitions/decisionList_node"
2817
+ },
2818
+ {
2819
+ "$ref": "#/definitions/taskList_node"
2820
+ },
2821
+ {
2822
+ "$ref": "#/definitions/extension_with_marks_node"
2823
+ },
2824
+ {
2825
+ "$ref": "#/definitions/embedCard_node"
2826
+ },
2827
+ {
2828
+ "$ref": "#/definitions/table_node"
2829
+ },
2830
+ {
2831
+ "$ref": "#/definitions/bodiedExtension_with_marks_node"
2832
+ }
2833
+ ]
2834
+ },
2835
+ "minItems": 1
2836
+ }
2837
+ },
2838
+ "required": [
2839
+ "type",
2840
+ "content"
2841
+ ],
2842
+ "additionalProperties": false
2843
+ },
2844
+ "multiBodiedExtension_node": {
2845
+ "type": "object",
2846
+ "properties": {
2847
+ "type": {
2848
+ "enum": [
2849
+ "multiBodiedExtension"
2850
+ ]
2851
+ },
2852
+ "attrs": {
2853
+ "type": "object",
2854
+ "properties": {
2855
+ "maxFrames": {
2856
+ "type": "number",
2857
+ "default": 5
2858
+ },
2859
+ "extensionKey": {
2860
+ "type": "string",
2861
+ "minLength": 1
2862
+ },
2863
+ "extensionType": {
2864
+ "type": "string",
2865
+ "minLength": 1
2866
+ },
2867
+ "parameters": {},
2868
+ "text": {
2869
+ "type": "string"
2870
+ },
2871
+ "layout": {
2872
+ "enum": [
2873
+ "wide",
2874
+ "full-width",
2875
+ "default"
2876
+ ]
2877
+ },
2878
+ "localId": {
2879
+ "type": "string",
2880
+ "minLength": 1
2881
+ }
2882
+ },
2883
+ "additionalProperties": false,
2884
+ "required": [
2885
+ "extensionKey",
2886
+ "extensionType"
2887
+ ]
2888
+ },
2889
+ "marks": {
2890
+ "type": "array"
2891
+ },
2892
+ "content": {
2893
+ "type": "array",
2894
+ "items": {
2895
+ "$ref": "#/definitions/extensionFrame_node"
2896
+ }
2897
+ }
2898
+ },
2899
+ "required": [
2900
+ "type",
2901
+ "attrs",
2902
+ "content"
2903
+ ],
2904
+ "additionalProperties": false
2905
+ },
2767
2906
  "doc_node": {
2768
2907
  "type": "object",
2769
2908
  "properties": {
@@ -2861,6 +3000,9 @@
2861
3000
  },
2862
3001
  {
2863
3002
  "$ref": "#/definitions/layoutSection_with_single_column_node"
3003
+ },
3004
+ {
3005
+ "$ref": "#/definitions/multiBodiedExtension_node"
2864
3006
  }
2865
3007
  ]
2866
3008
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "33.1.3",
3
+ "version": "33.2.1",
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/"