@atlaskit/adf-schema 56.4.1 → 56.5.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 +18 -0
- package/dist/cjs/entry-points/bodied-extension.js +6 -0
- package/dist/cjs/entry-points/extension.js +6 -0
- package/dist/cjs/entry-points/multi-bodied-extension.js +6 -0
- package/dist/cjs/entry-points/schema-bodied-extension.js +6 -0
- package/dist/cjs/entry-points/schema-extension.js +6 -0
- package/dist/cjs/entry-points/schema-multi-bodied-extension.js +6 -0
- package/dist/cjs/entry-points/schema-next-nodeTypes.js +18 -0
- package/dist/cjs/next-schema/full-schema.adf.js +4 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +79 -2
- package/dist/cjs/next-schema/nodes/bodiedExtension.js +6 -0
- package/dist/cjs/next-schema/nodes/extension.js +6 -0
- package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +8 -0
- package/dist/cjs/schema/default-schema.js +3 -1
- package/dist/cjs/schema/index.js +18 -0
- package/dist/cjs/schema/nodes/bodied-extension.js +12 -1
- package/dist/cjs/schema/nodes/extension.js +12 -1
- package/dist/cjs/schema/nodes/index.js +18 -0
- package/dist/cjs/schema/nodes/multi-bodied-extension.js +14 -1
- package/dist/cjs/validator-schema/generated/validatorSpec.js +29 -2
- package/dist/es2019/entry-points/bodied-extension.js +1 -1
- package/dist/es2019/entry-points/extension.js +1 -1
- package/dist/es2019/entry-points/multi-bodied-extension.js +1 -1
- package/dist/es2019/entry-points/schema-bodied-extension.js +1 -1
- package/dist/es2019/entry-points/schema-extension.js +1 -1
- package/dist/es2019/entry-points/schema-multi-bodied-extension.js +1 -1
- package/dist/es2019/entry-points/schema-next-nodeTypes.js +1 -1
- package/dist/es2019/next-schema/full-schema.adf.js +4 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +78 -1
- package/dist/es2019/next-schema/nodes/bodiedExtension.js +6 -0
- package/dist/es2019/next-schema/nodes/extension.js +6 -0
- package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +8 -0
- package/dist/es2019/schema/default-schema.js +4 -2
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/bodied-extension.js +9 -1
- package/dist/es2019/schema/nodes/extension.js +9 -1
- package/dist/es2019/schema/nodes/index.js +3 -3
- package/dist/es2019/schema/nodes/multi-bodied-extension.js +11 -1
- package/dist/es2019/validator-schema/generated/validatorSpec.js +28 -1
- package/dist/esm/entry-points/bodied-extension.js +1 -1
- package/dist/esm/entry-points/extension.js +1 -1
- package/dist/esm/entry-points/multi-bodied-extension.js +1 -1
- package/dist/esm/entry-points/schema-bodied-extension.js +1 -1
- package/dist/esm/entry-points/schema-extension.js +1 -1
- package/dist/esm/entry-points/schema-multi-bodied-extension.js +1 -1
- package/dist/esm/entry-points/schema-next-nodeTypes.js +1 -1
- package/dist/esm/next-schema/full-schema.adf.js +4 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +78 -1
- package/dist/esm/next-schema/nodes/bodiedExtension.js +6 -0
- package/dist/esm/next-schema/nodes/extension.js +6 -0
- package/dist/esm/next-schema/nodes/multiBodiedExtension.js +8 -0
- package/dist/esm/schema/default-schema.js +4 -2
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/bodied-extension.js +10 -0
- package/dist/esm/schema/nodes/extension.js +10 -0
- package/dist/esm/schema/nodes/index.js +3 -3
- package/dist/esm/schema/nodes/multi-bodied-extension.js +12 -0
- package/dist/esm/validator-schema/generated/validatorSpec.js +28 -1
- package/dist/json-schema/v1/stage-0.json +124 -0
- package/dist/types/entry-points/bodied-extension.d.ts +2 -2
- package/dist/types/entry-points/extension.d.ts +2 -2
- package/dist/types/entry-points/multi-bodied-extension.d.ts +2 -2
- package/dist/types/entry-points/schema-bodied-extension.d.ts +2 -2
- package/dist/types/entry-points/schema-extension.d.ts +2 -2
- package/dist/types/entry-points/schema-multi-bodied-extension.d.ts +2 -2
- package/dist/types/entry-points/schema-next-nodeTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +45 -1
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +2 -1
- package/dist/types/next-schema/nodes/extension.d.ts +2 -1
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +1 -1
- package/dist/types/schema/index.d.ts +2 -2
- package/dist/types/schema/nodes/bodied-extension.d.ts +6 -0
- package/dist/types/schema/nodes/doc.d.ts +4 -2
- package/dist/types/schema/nodes/extension.d.ts +6 -0
- package/dist/types/schema/nodes/index.d.ts +6 -6
- package/dist/types/schema/nodes/multi-bodied-extension.d.ts +9 -0
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +27 -0
- package/json-schema/v1/stage-0.json +124 -0
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { blockCard, blockquote, blockquoteLegacy, blockTaskItem, bodiedExtension, bodiedExtensionWithMarks, bodiedSyncBlock, bulletList, caption, codeBlock, codeBlockRootOnly, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, date, dateStage0, decisionItem, decisionList, doc, embedCard, emoji, emojiStage0, expand, expandRootOnly, extension, extensionWithMarks, extensionFrameStage0, hardBreak, heading, headingWithAlignment, headingWithIndentation, headingWithNoMarks, image, inlineCard, inlineCardStage0, inlineExtension, inlineExtensionWithMarks, layoutColumn, layoutColumn as layoutColumnStage0, layoutSection, layoutSectionFull, layoutSectionWithSingleColumnStage0, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mediaSingleWidthType, mention, mentionStage0, multiBodiedExtensionStage0, nestedExpand, nestedExpandWithNoMarks, orderedList, panel, panelRootOnlyStage0, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, ruleRootOnlyStage0, status, statusStage0, syncBlock, table, tableWithNestedTable, tableCell, tableCell as tableCellStage0, tableCellWithNestedTable, tableCellWithNestedTable as tableCellWithNestedTableStage0, tableHeader, tableHeader as tableHeaderStage0, tableHeaderWithNestedTable, tableHeaderWithNestedTable as tableHeaderWithNestedTableStage0, tableRow, tableRowWithNestedTable, taskItem, taskList, text, textCodeInline, textFormatted, textWithNoMarks, unsupportedBlock, unsupportedInline } from '../next-schema/generated/nodeTypes';
|
|
2
|
+
export { blockCard, blockquote, blockquoteLegacy, blockTaskItem, bodiedExtension, bodiedExtensionRootOnlyStage0, bodiedExtensionWithMarks, bodiedSyncBlock, bulletList, caption, codeBlock, codeBlockRootOnly, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, date, dateStage0, decisionItem, decisionList, doc, embedCard, emoji, emojiStage0, expand, expandRootOnly, extension, extensionRootOnlyStage0, extensionWithMarks, extensionFrameStage0, hardBreak, heading, headingWithAlignment, headingWithIndentation, headingWithNoMarks, image, inlineCard, inlineCardStage0, inlineExtension, inlineExtensionWithMarks, layoutColumn, layoutColumn as layoutColumnStage0, layoutSection, layoutSectionFull, layoutSectionWithSingleColumnStage0, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mediaSingleWidthType, mention, mentionStage0, multiBodiedExtensionStage0, multiBodiedExtensionRootOnlyStage0, nestedExpand, nestedExpandWithNoMarks, orderedList, panel, panelRootOnlyStage0, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, ruleRootOnlyStage0, status, statusStage0, syncBlock, table, tableWithNestedTable, tableCell, tableCell as tableCellStage0, tableCellWithNestedTable, tableCellWithNestedTable as tableCellWithNestedTableStage0, tableHeader, tableHeader as tableHeaderStage0, tableHeaderWithNestedTable, tableHeaderWithNestedTable as tableHeaderWithNestedTableStage0, tableRow, tableRowWithNestedTable, taskItem, taskList, text, textCodeInline, textFormatted, textWithNoMarks, unsupportedBlock, unsupportedInline } from '../next-schema/generated/nodeTypes';
|
|
@@ -7,6 +7,9 @@ import { expand } from './nodes/expand';
|
|
|
7
7
|
import { codeBlock } from './nodes/codeBlock';
|
|
8
8
|
import { syncBlock } from './nodes/syncBlock';
|
|
9
9
|
import { bodiedSyncBlock } from './nodes/bodiedSyncBlock';
|
|
10
|
+
import { bodiedExtension } from './nodes/bodiedExtension';
|
|
11
|
+
import { extension } from './nodes/extension';
|
|
12
|
+
import { multiBodiedExtension } from './nodes/multiBodiedExtension';
|
|
10
13
|
import { panel } from './nodes/panel';
|
|
11
14
|
import { rule } from './nodes/rule';
|
|
12
15
|
import { table } from './nodes/tableNodes';
|
|
@@ -18,7 +21,7 @@ panel.use('c1_root_only').addContent(table);
|
|
|
18
21
|
const doc = adfNode('doc').define({
|
|
19
22
|
root: true,
|
|
20
23
|
version: 1,
|
|
21
|
-
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), panel.use('root_only'), rule.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
|
|
24
|
+
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), panel.use('root_only'), rule.use('root_only'), extension.use('root_only'), bodiedExtension.use('root_only'), multiBodiedExtension.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
|
|
22
25
|
DANGEROUS_MANUAL_OVERRIDE: {
|
|
23
26
|
'validator-spec': {
|
|
24
27
|
'props.content.minItems': {
|
|
@@ -96,6 +96,33 @@ export const bodiedExtension = createPMNodeSpecFactory({
|
|
|
96
96
|
defining: true,
|
|
97
97
|
isolating: true
|
|
98
98
|
});
|
|
99
|
+
export const bodiedExtensionRootOnlyStage0 = createPMNodeSpecFactory({
|
|
100
|
+
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
|
101
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
102
|
+
attrs: {
|
|
103
|
+
extensionKey: {
|
|
104
|
+
default: ''
|
|
105
|
+
},
|
|
106
|
+
extensionType: {
|
|
107
|
+
default: ''
|
|
108
|
+
},
|
|
109
|
+
parameters: {
|
|
110
|
+
default: null
|
|
111
|
+
},
|
|
112
|
+
text: {
|
|
113
|
+
default: null
|
|
114
|
+
},
|
|
115
|
+
layout: {
|
|
116
|
+
default: 'default'
|
|
117
|
+
},
|
|
118
|
+
localId: {
|
|
119
|
+
default: null
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
selectable: true,
|
|
123
|
+
defining: true,
|
|
124
|
+
isolating: true
|
|
125
|
+
});
|
|
99
126
|
export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
100
127
|
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
101
128
|
group: 'block',
|
|
@@ -298,7 +325,7 @@ export const decisionList = createPMNodeSpecFactory({
|
|
|
298
325
|
defining: true
|
|
299
326
|
});
|
|
300
327
|
export const doc = createPMNodeSpecFactory({
|
|
301
|
-
content: '(block | codeBlock | panel | rule | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
328
|
+
content: '(block | codeBlock | panel | rule | extension | bodiedExtension | multiBodiedExtension | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
302
329
|
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment breakout'
|
|
303
330
|
});
|
|
304
331
|
export const embedCard = createPMNodeSpecFactory({
|
|
@@ -423,6 +450,30 @@ export const extension = createPMNodeSpecFactory({
|
|
|
423
450
|
},
|
|
424
451
|
selectable: true
|
|
425
452
|
});
|
|
453
|
+
export const extensionRootOnlyStage0 = createPMNodeSpecFactory({
|
|
454
|
+
atom: true,
|
|
455
|
+
attrs: {
|
|
456
|
+
extensionKey: {
|
|
457
|
+
default: ''
|
|
458
|
+
},
|
|
459
|
+
extensionType: {
|
|
460
|
+
default: ''
|
|
461
|
+
},
|
|
462
|
+
parameters: {
|
|
463
|
+
default: null
|
|
464
|
+
},
|
|
465
|
+
text: {
|
|
466
|
+
default: null
|
|
467
|
+
},
|
|
468
|
+
layout: {
|
|
469
|
+
default: 'default'
|
|
470
|
+
},
|
|
471
|
+
localId: {
|
|
472
|
+
default: null
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
selectable: true
|
|
476
|
+
});
|
|
426
477
|
export const extensionWithMarks = createPMNodeSpecFactory({
|
|
427
478
|
group: 'block',
|
|
428
479
|
atom: true,
|
|
@@ -911,6 +962,32 @@ export const mentionStage0 = createPMNodeSpecFactory({
|
|
|
911
962
|
},
|
|
912
963
|
selectable: true
|
|
913
964
|
});
|
|
965
|
+
export const multiBodiedExtensionRootOnlyStage0 = createPMNodeSpecFactory({
|
|
966
|
+
content: 'extensionFrame+',
|
|
967
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
|
968
|
+
attrs: {
|
|
969
|
+
extensionKey: {
|
|
970
|
+
default: ''
|
|
971
|
+
},
|
|
972
|
+
extensionType: {
|
|
973
|
+
default: ''
|
|
974
|
+
},
|
|
975
|
+
parameters: {
|
|
976
|
+
default: null
|
|
977
|
+
},
|
|
978
|
+
text: {
|
|
979
|
+
default: null
|
|
980
|
+
},
|
|
981
|
+
layout: {
|
|
982
|
+
default: 'default'
|
|
983
|
+
},
|
|
984
|
+
localId: {
|
|
985
|
+
default: null
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
selectable: true,
|
|
989
|
+
definingAsContext: true
|
|
990
|
+
});
|
|
914
991
|
export const multiBodiedExtensionStage0 = createPMNodeSpecFactory({
|
|
915
992
|
content: 'extensionFrame+',
|
|
916
993
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
2
|
import { nonNestableBlockContentGroup } from '../groups/nonNestableBlockContentGroup';
|
|
3
|
+
import { breakout } from '../marks/breakout';
|
|
3
4
|
import { dataConsumer } from '../marks/dataConsumer';
|
|
4
5
|
import { fragment } from '../marks/fragment';
|
|
5
6
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
@@ -51,4 +52,9 @@ export const bodiedExtension = adfNode('bodiedExtension').define({
|
|
|
51
52
|
marks: [dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute],
|
|
52
53
|
content: [],
|
|
53
54
|
ignore: []
|
|
55
|
+
})
|
|
56
|
+
// this variant is used to support breakout resizing for bodiedExtension nodes at the document root
|
|
57
|
+
.variant('root_only', {
|
|
58
|
+
stage0: true,
|
|
59
|
+
marks: [breakout, dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute]
|
|
54
60
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
|
+
import { breakout } from '../marks/breakout';
|
|
2
3
|
import { dataConsumer } from '../marks/dataConsumer';
|
|
3
4
|
import { fragment } from '../marks/fragment';
|
|
4
5
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
@@ -45,4 +46,9 @@ export const extension = adfNode('extension').define({
|
|
|
45
46
|
}).variant('with_marks', {
|
|
46
47
|
marks: [dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute],
|
|
47
48
|
ignore: []
|
|
49
|
+
})
|
|
50
|
+
// this variant is used to support breakout resizing for extension nodes at the document root
|
|
51
|
+
.variant('root_only', {
|
|
52
|
+
stage0: true,
|
|
53
|
+
marks: [breakout, dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute]
|
|
48
54
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
|
+
import { breakout } from '../marks/breakout';
|
|
2
3
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
3
4
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
4
5
|
import { extensionFrame } from './extensionFrame';
|
|
@@ -54,4 +55,11 @@ export const multiBodiedExtension = adfNode('multiBodiedExtension').define({
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
}
|
|
58
|
+
})
|
|
59
|
+
// this variant is used to support breakout resizing for multiBodiedExtension nodes at the document root
|
|
60
|
+
.variant('root_only', {
|
|
61
|
+
stage0: true,
|
|
62
|
+
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
|
63
|
+
marksMaxItems: undefined,
|
|
64
|
+
noExtend: true
|
|
57
65
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn,
|
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtensionRootOnlyStage0, bodiedExtensionRootOnlyStage0, extensionRootOnlyStage0, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0 } from './nodes';
|
|
3
3
|
import { ruleRootOnlyStage0 } from './nodes/rule';
|
|
4
4
|
import { extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0 } from './nodes/panel';
|
|
5
5
|
import { createSchema } from './create-schema';
|
|
@@ -22,7 +22,9 @@ export const getSchemaBasedOnStage = memoizeOne(
|
|
|
22
22
|
if (stage === 'stage0') {
|
|
23
23
|
defaultSchemaConfig.customNodeSpecs = {
|
|
24
24
|
layoutSection: layoutSectionWithSingleColumn,
|
|
25
|
-
|
|
25
|
+
extension: extensionRootOnlyStage0,
|
|
26
|
+
bodiedExtension: bodiedExtensionRootOnlyStage0,
|
|
27
|
+
multiBodiedExtension: multiBodiedExtensionRootOnlyStage0,
|
|
26
28
|
extensionFrame: extensionFrame,
|
|
27
29
|
expand: expandWithNestedExpand,
|
|
28
30
|
table: tableWithNestedTable,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
2
|
+
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bodiedExtensionRootOnlyStage0, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, extensionRootOnlyStage0, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, multiBodiedExtensionRootOnlyStage0, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette, colorPaletteNew,
|
|
4
4
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
5
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
@@ -9,6 +9,10 @@ import { bodiedExtension as bodiedExtensionFactory } from '../../next-schema/gen
|
|
|
9
9
|
* @name bodiedExtension_with_marks_node
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @name bodiedExtension_root_only_node
|
|
14
|
+
*/
|
|
15
|
+
|
|
12
16
|
export const bodiedExtension = bodiedExtensionFactory({
|
|
13
17
|
parseDOM: [{
|
|
14
18
|
context: 'bodiedExtension//',
|
|
@@ -31,4 +35,8 @@ export const bodiedExtension = bodiedExtensionFactory({
|
|
|
31
35
|
};
|
|
32
36
|
return ['div', attrs, 0];
|
|
33
37
|
}
|
|
34
|
-
});
|
|
38
|
+
});
|
|
39
|
+
export const bodiedExtensionRootOnlyStage0 = {
|
|
40
|
+
...bodiedExtension,
|
|
41
|
+
marks: `breakout ${bodiedExtension.marks}`
|
|
42
|
+
};
|
|
@@ -9,6 +9,10 @@ import { extension as extensionFactory } from '../../next-schema/generated/nodeT
|
|
|
9
9
|
* @name extension_with_marks_node
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @name extension_root_only_node
|
|
14
|
+
*/
|
|
15
|
+
|
|
12
16
|
export const extension = extensionFactory({
|
|
13
17
|
parseDOM: [{
|
|
14
18
|
tag: '[data-node-type="extension"]',
|
|
@@ -27,4 +31,8 @@ export const extension = extensionFactory({
|
|
|
27
31
|
};
|
|
28
32
|
return ['div', attrs];
|
|
29
33
|
}
|
|
30
|
-
});
|
|
34
|
+
});
|
|
35
|
+
export const extensionRootOnlyStage0 = {
|
|
36
|
+
...extension,
|
|
37
|
+
marks: 'breakout dataConsumer fragment unsupportedMark unsupportedNodeAttribute'
|
|
38
|
+
};
|
|
@@ -41,9 +41,9 @@ export { status } from './status';
|
|
|
41
41
|
export { nestedExpand, nestedExpandWithLocalId } from './nested-expand';
|
|
42
42
|
export { embedCard, embedCardWithLocalId } from './embed-card';
|
|
43
43
|
// Extensions
|
|
44
|
-
export { extension } from './extension';
|
|
44
|
+
export { extension, extensionRootOnlyStage0 } from './extension';
|
|
45
45
|
export { inlineExtension } from './inline-extension';
|
|
46
|
-
export { bodiedExtension } from './bodied-extension';
|
|
47
|
-
export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
|
|
46
|
+
export { bodiedExtension, bodiedExtensionRootOnlyStage0 } from './bodied-extension';
|
|
47
|
+
export { extensionFrame, multiBodiedExtension, multiBodiedExtensionRootOnlyStage0 } from './multi-bodied-extension';
|
|
48
48
|
export { syncBlock } from './sync-block';
|
|
49
49
|
export { bodiedSyncBlock } from './bodied-sync-block';
|
|
@@ -39,6 +39,12 @@ export const extensionFrame = extensionFrameStage0Factory({
|
|
|
39
39
|
* @description Wraps multiple extensionFrame objects.
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
44
|
+
* @stage 0
|
|
45
|
+
* @name multiBodiedExtension_root_only_node
|
|
46
|
+
*/
|
|
47
|
+
|
|
42
48
|
export const multiBodiedExtension = multiBodiedExtensionStage0Factory({
|
|
43
49
|
parseDOM: [{
|
|
44
50
|
context: 'multiBodiedExtension//',
|
|
@@ -60,4 +66,8 @@ export const multiBodiedExtension = multiBodiedExtensionStage0Factory({
|
|
|
60
66
|
};
|
|
61
67
|
return ['div', attrs, 0];
|
|
62
68
|
}
|
|
63
|
-
});
|
|
69
|
+
});
|
|
70
|
+
export const multiBodiedExtensionRootOnlyStage0 = {
|
|
71
|
+
...multiBodiedExtension,
|
|
72
|
+
marks: `breakout ${multiBodiedExtension.marks}`
|
|
73
|
+
};
|
|
@@ -225,6 +225,15 @@ export const bodiedExtension = {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
|
+
export const bodiedExtension_root_only = ['bodiedExtension', {
|
|
229
|
+
props: {
|
|
230
|
+
marks: {
|
|
231
|
+
items: [['breakout', 'dataConsumer', 'fragment']],
|
|
232
|
+
optional: true,
|
|
233
|
+
type: 'array'
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}];
|
|
228
237
|
export const bodiedExtension_with_marks = ['bodiedExtension', {
|
|
229
238
|
props: {
|
|
230
239
|
marks: {
|
|
@@ -513,7 +522,7 @@ export const doc = {
|
|
|
513
522
|
props: {
|
|
514
523
|
content: {
|
|
515
524
|
allowUnsupportedBlock: true,
|
|
516
|
-
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'panel_root_only', 'rule_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
525
|
+
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'panel_root_only', 'rule_root_only', 'extension_root_only', 'bodiedExtension_root_only', 'multiBodiedExtension_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
517
526
|
type: 'array'
|
|
518
527
|
},
|
|
519
528
|
type: {
|
|
@@ -683,6 +692,15 @@ export const extension = {
|
|
|
683
692
|
}
|
|
684
693
|
}
|
|
685
694
|
};
|
|
695
|
+
export const extension_root_only = ['extension', {
|
|
696
|
+
props: {
|
|
697
|
+
marks: {
|
|
698
|
+
items: [['breakout', 'dataConsumer', 'fragment']],
|
|
699
|
+
optional: true,
|
|
700
|
+
type: 'array'
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}];
|
|
686
704
|
export const extension_with_marks = ['extension', {
|
|
687
705
|
props: {
|
|
688
706
|
marks: {
|
|
@@ -1412,6 +1430,15 @@ export const multiBodiedExtension = {
|
|
|
1412
1430
|
}
|
|
1413
1431
|
}
|
|
1414
1432
|
};
|
|
1433
|
+
export const multiBodiedExtension_root_only = ['multiBodiedExtension', {
|
|
1434
|
+
props: {
|
|
1435
|
+
marks: {
|
|
1436
|
+
items: ['breakout'],
|
|
1437
|
+
optional: true,
|
|
1438
|
+
type: 'array'
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
}];
|
|
1415
1442
|
export const nestedExpand = {
|
|
1416
1443
|
props: {
|
|
1417
1444
|
attrs: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { bodiedExtension } from '../schema/nodes/bodied-extension';
|
|
2
|
+
export { bodiedExtension, bodiedExtensionRootOnlyStage0 } from '../schema/nodes/bodied-extension';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { extension } from '../schema/nodes/extension';
|
|
2
|
+
export { extension, extensionRootOnlyStage0 } from '../schema/nodes/extension';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { extensionFrame, multiBodiedExtension } from '../schema/nodes/multi-bodied-extension';
|
|
2
|
+
export { extensionFrame, multiBodiedExtension, multiBodiedExtensionRootOnlyStage0 } from '../schema/nodes/multi-bodied-extension';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { bodiedExtension } from '../schema/nodes/bodied-extension';
|
|
2
|
+
export { bodiedExtension, bodiedExtensionRootOnlyStage0 } from '../schema/nodes/bodied-extension';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { extension } from '../schema/nodes/extension';
|
|
2
|
+
export { extension, extensionRootOnlyStage0 } from '../schema/nodes/extension';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { extensionFrame, multiBodiedExtension } from '../schema/nodes/multi-bodied-extension';
|
|
2
|
+
export { extensionFrame, multiBodiedExtension, multiBodiedExtensionRootOnlyStage0 } from '../schema/nodes/multi-bodied-extension';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { blockCard, blockquote, blockquoteLegacy, blockTaskItem, bodiedExtension, bodiedExtensionWithMarks, bodiedSyncBlock, bulletList, caption, codeBlock, codeBlockRootOnly, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, date, dateStage0, decisionItem, decisionList, doc, embedCard, emoji, emojiStage0, expand, expandRootOnly, extension, extensionWithMarks, extensionFrameStage0, hardBreak, heading, headingWithAlignment, headingWithIndentation, headingWithNoMarks, image, inlineCard, inlineCardStage0, inlineExtension, inlineExtensionWithMarks, layoutColumn, layoutColumn as layoutColumnStage0, layoutSection, layoutSectionFull, layoutSectionWithSingleColumnStage0, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mediaSingleWidthType, mention, mentionStage0, multiBodiedExtensionStage0, nestedExpand, nestedExpandWithNoMarks, orderedList, panel, panelRootOnlyStage0, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, ruleRootOnlyStage0, status, statusStage0, syncBlock, table, tableWithNestedTable, tableCell, tableCell as tableCellStage0, tableCellWithNestedTable, tableCellWithNestedTable as tableCellWithNestedTableStage0, tableHeader, tableHeader as tableHeaderStage0, tableHeaderWithNestedTable, tableHeaderWithNestedTable as tableHeaderWithNestedTableStage0, tableRow, tableRowWithNestedTable, taskItem, taskList, text, textCodeInline, textFormatted, textWithNoMarks, unsupportedBlock, unsupportedInline } from '../next-schema/generated/nodeTypes';
|
|
2
|
+
export { blockCard, blockquote, blockquoteLegacy, blockTaskItem, bodiedExtension, bodiedExtensionRootOnlyStage0, bodiedExtensionWithMarks, bodiedSyncBlock, bulletList, caption, codeBlock, codeBlockRootOnly, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, date, dateStage0, decisionItem, decisionList, doc, embedCard, emoji, emojiStage0, expand, expandRootOnly, extension, extensionRootOnlyStage0, extensionWithMarks, extensionFrameStage0, hardBreak, heading, headingWithAlignment, headingWithIndentation, headingWithNoMarks, image, inlineCard, inlineCardStage0, inlineExtension, inlineExtensionWithMarks, layoutColumn, layoutColumn as layoutColumnStage0, layoutSection, layoutSectionFull, layoutSectionWithSingleColumnStage0, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mediaSingleWidthType, mention, mentionStage0, multiBodiedExtensionStage0, multiBodiedExtensionRootOnlyStage0, nestedExpand, nestedExpandWithNoMarks, orderedList, panel, panelRootOnlyStage0, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, ruleRootOnlyStage0, status, statusStage0, syncBlock, table, tableWithNestedTable, tableCell, tableCell as tableCellStage0, tableCellWithNestedTable, tableCellWithNestedTable as tableCellWithNestedTableStage0, tableHeader, tableHeader as tableHeaderStage0, tableHeaderWithNestedTable, tableHeaderWithNestedTable as tableHeaderWithNestedTableStage0, tableRow, tableRowWithNestedTable, taskItem, taskList, text, textCodeInline, textFormatted, textWithNoMarks, unsupportedBlock, unsupportedInline } from '../next-schema/generated/nodeTypes';
|
|
@@ -7,6 +7,9 @@ import { expand } from './nodes/expand';
|
|
|
7
7
|
import { codeBlock } from './nodes/codeBlock';
|
|
8
8
|
import { syncBlock } from './nodes/syncBlock';
|
|
9
9
|
import { bodiedSyncBlock } from './nodes/bodiedSyncBlock';
|
|
10
|
+
import { bodiedExtension } from './nodes/bodiedExtension';
|
|
11
|
+
import { extension } from './nodes/extension';
|
|
12
|
+
import { multiBodiedExtension } from './nodes/multiBodiedExtension';
|
|
10
13
|
import { panel } from './nodes/panel';
|
|
11
14
|
import { rule } from './nodes/rule';
|
|
12
15
|
import { table } from './nodes/tableNodes';
|
|
@@ -18,7 +21,7 @@ panel.use('c1_root_only').addContent(table);
|
|
|
18
21
|
var doc = adfNode('doc').define({
|
|
19
22
|
root: true,
|
|
20
23
|
version: 1,
|
|
21
|
-
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), panel.use('root_only'), rule.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
|
|
24
|
+
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), panel.use('root_only'), rule.use('root_only'), extension.use('root_only'), bodiedExtension.use('root_only'), multiBodiedExtension.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
|
|
22
25
|
DANGEROUS_MANUAL_OVERRIDE: {
|
|
23
26
|
'validator-spec': {
|
|
24
27
|
'props.content.minItems': {
|
|
@@ -96,6 +96,33 @@ export var bodiedExtension = createPMNodeSpecFactory({
|
|
|
96
96
|
defining: true,
|
|
97
97
|
isolating: true
|
|
98
98
|
});
|
|
99
|
+
export var bodiedExtensionRootOnlyStage0 = createPMNodeSpecFactory({
|
|
100
|
+
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
|
101
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
102
|
+
attrs: {
|
|
103
|
+
extensionKey: {
|
|
104
|
+
default: ''
|
|
105
|
+
},
|
|
106
|
+
extensionType: {
|
|
107
|
+
default: ''
|
|
108
|
+
},
|
|
109
|
+
parameters: {
|
|
110
|
+
default: null
|
|
111
|
+
},
|
|
112
|
+
text: {
|
|
113
|
+
default: null
|
|
114
|
+
},
|
|
115
|
+
layout: {
|
|
116
|
+
default: 'default'
|
|
117
|
+
},
|
|
118
|
+
localId: {
|
|
119
|
+
default: null
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
selectable: true,
|
|
123
|
+
defining: true,
|
|
124
|
+
isolating: true
|
|
125
|
+
});
|
|
99
126
|
export var bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
100
127
|
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
101
128
|
group: 'block',
|
|
@@ -298,7 +325,7 @@ export var decisionList = createPMNodeSpecFactory({
|
|
|
298
325
|
defining: true
|
|
299
326
|
});
|
|
300
327
|
export var doc = createPMNodeSpecFactory({
|
|
301
|
-
content: '(block | codeBlock | panel | rule | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
328
|
+
content: '(block | codeBlock | panel | rule | extension | bodiedExtension | multiBodiedExtension | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
302
329
|
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment breakout'
|
|
303
330
|
});
|
|
304
331
|
export var embedCard = createPMNodeSpecFactory({
|
|
@@ -423,6 +450,30 @@ export var extension = createPMNodeSpecFactory({
|
|
|
423
450
|
},
|
|
424
451
|
selectable: true
|
|
425
452
|
});
|
|
453
|
+
export var extensionRootOnlyStage0 = createPMNodeSpecFactory({
|
|
454
|
+
atom: true,
|
|
455
|
+
attrs: {
|
|
456
|
+
extensionKey: {
|
|
457
|
+
default: ''
|
|
458
|
+
},
|
|
459
|
+
extensionType: {
|
|
460
|
+
default: ''
|
|
461
|
+
},
|
|
462
|
+
parameters: {
|
|
463
|
+
default: null
|
|
464
|
+
},
|
|
465
|
+
text: {
|
|
466
|
+
default: null
|
|
467
|
+
},
|
|
468
|
+
layout: {
|
|
469
|
+
default: 'default'
|
|
470
|
+
},
|
|
471
|
+
localId: {
|
|
472
|
+
default: null
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
selectable: true
|
|
476
|
+
});
|
|
426
477
|
export var extensionWithMarks = createPMNodeSpecFactory({
|
|
427
478
|
group: 'block',
|
|
428
479
|
atom: true,
|
|
@@ -911,6 +962,32 @@ export var mentionStage0 = createPMNodeSpecFactory({
|
|
|
911
962
|
},
|
|
912
963
|
selectable: true
|
|
913
964
|
});
|
|
965
|
+
export var multiBodiedExtensionRootOnlyStage0 = createPMNodeSpecFactory({
|
|
966
|
+
content: 'extensionFrame+',
|
|
967
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
|
968
|
+
attrs: {
|
|
969
|
+
extensionKey: {
|
|
970
|
+
default: ''
|
|
971
|
+
},
|
|
972
|
+
extensionType: {
|
|
973
|
+
default: ''
|
|
974
|
+
},
|
|
975
|
+
parameters: {
|
|
976
|
+
default: null
|
|
977
|
+
},
|
|
978
|
+
text: {
|
|
979
|
+
default: null
|
|
980
|
+
},
|
|
981
|
+
layout: {
|
|
982
|
+
default: 'default'
|
|
983
|
+
},
|
|
984
|
+
localId: {
|
|
985
|
+
default: null
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
selectable: true,
|
|
989
|
+
definingAsContext: true
|
|
990
|
+
});
|
|
914
991
|
export var multiBodiedExtensionStage0 = createPMNodeSpecFactory({
|
|
915
992
|
content: 'extensionFrame+',
|
|
916
993
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
2
|
import { nonNestableBlockContentGroup } from '../groups/nonNestableBlockContentGroup';
|
|
3
|
+
import { breakout } from '../marks/breakout';
|
|
3
4
|
import { dataConsumer } from '../marks/dataConsumer';
|
|
4
5
|
import { fragment } from '../marks/fragment';
|
|
5
6
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
@@ -51,4 +52,9 @@ export var bodiedExtension = adfNode('bodiedExtension').define({
|
|
|
51
52
|
marks: [dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute],
|
|
52
53
|
content: [],
|
|
53
54
|
ignore: []
|
|
55
|
+
})
|
|
56
|
+
// this variant is used to support breakout resizing for bodiedExtension nodes at the document root
|
|
57
|
+
.variant('root_only', {
|
|
58
|
+
stage0: true,
|
|
59
|
+
marks: [breakout, dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute]
|
|
54
60
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
|
+
import { breakout } from '../marks/breakout';
|
|
2
3
|
import { dataConsumer } from '../marks/dataConsumer';
|
|
3
4
|
import { fragment } from '../marks/fragment';
|
|
4
5
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
@@ -45,4 +46,9 @@ export var extension = adfNode('extension').define({
|
|
|
45
46
|
}).variant('with_marks', {
|
|
46
47
|
marks: [dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute],
|
|
47
48
|
ignore: []
|
|
49
|
+
})
|
|
50
|
+
// this variant is used to support breakout resizing for extension nodes at the document root
|
|
51
|
+
.variant('root_only', {
|
|
52
|
+
stage0: true,
|
|
53
|
+
marks: [breakout, dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute]
|
|
48
54
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
|
+
import { breakout } from '../marks/breakout';
|
|
2
3
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
3
4
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
4
5
|
import { extensionFrame } from './extensionFrame';
|
|
@@ -54,4 +55,11 @@ export var multiBodiedExtension = adfNode('multiBodiedExtension').define({
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
}
|
|
58
|
+
})
|
|
59
|
+
// this variant is used to support breakout resizing for multiBodiedExtension nodes at the document root
|
|
60
|
+
.variant('root_only', {
|
|
61
|
+
stage0: true,
|
|
62
|
+
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
|
63
|
+
marksMaxItems: undefined,
|
|
64
|
+
noExtend: true
|
|
57
65
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn,
|
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtensionRootOnlyStage0, bodiedExtensionRootOnlyStage0, extensionRootOnlyStage0, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0 } from './nodes';
|
|
3
3
|
import { ruleRootOnlyStage0 } from './nodes/rule';
|
|
4
4
|
import { extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0 } from './nodes/panel';
|
|
5
5
|
import { createSchema } from './create-schema';
|
|
@@ -23,7 +23,9 @@ function () {
|
|
|
23
23
|
if (stage === 'stage0') {
|
|
24
24
|
defaultSchemaConfig.customNodeSpecs = {
|
|
25
25
|
layoutSection: layoutSectionWithSingleColumn,
|
|
26
|
-
|
|
26
|
+
extension: extensionRootOnlyStage0,
|
|
27
|
+
bodiedExtension: bodiedExtensionRootOnlyStage0,
|
|
28
|
+
multiBodiedExtension: multiBodiedExtensionRootOnlyStage0,
|
|
27
29
|
extensionFrame: extensionFrame,
|
|
28
30
|
expand: expandWithNestedExpand,
|
|
29
31
|
table: tableWithNestedTable,
|
package/dist/esm/schema/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
2
|
+
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bodiedExtensionRootOnlyStage0, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, extensionRootOnlyStage0, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, multiBodiedExtensionRootOnlyStage0, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette, colorPaletteNew,
|
|
4
4
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
5
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|