@atlaskit/adf-schema 52.16.6 → 53.0.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 +17 -0
- package/dist/cjs/entry-points/code-block.js +0 -6
- package/dist/cjs/entry-points/schema-code-block.js +0 -6
- package/dist/cjs/entry-points/schema-next-nodeTypes.js +0 -12
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/next-schema/full-schema.adf.js +1 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +2 -37
- package/dist/cjs/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/codeBlock.js +5 -60
- package/dist/cjs/schema/default-schema.js +1 -2
- package/dist/cjs/schema/index.js +0 -6
- package/dist/cjs/schema/nodes/code-block.js +23 -109
- package/dist/cjs/schema/nodes/index.js +0 -6
- package/dist/cjs/validator-schema/generated/validatorSpec.js +15 -70
- package/dist/es2019/entry-points/code-block.js +1 -1
- package/dist/es2019/entry-points/schema-code-block.js +1 -1
- package/dist/es2019/entry-points/schema-next-nodeTypes.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/full-schema.adf.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +1 -36
- package/dist/es2019/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/codeBlock.js +5 -60
- package/dist/es2019/schema/default-schema.js +2 -3
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/code-block.js +34 -116
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/validator-schema/generated/validatorSpec.js +14 -69
- package/dist/esm/entry-points/code-block.js +1 -1
- package/dist/esm/entry-points/schema-code-block.js +1 -1
- package/dist/esm/entry-points/schema-next-nodeTypes.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/full-schema.adf.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +1 -36
- package/dist/esm/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/esm/next-schema/nodes/codeBlock.js +5 -60
- package/dist/esm/schema/default-schema.js +2 -3
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/code-block.js +23 -108
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/validator-schema/generated/validatorSpec.js +14 -69
- package/dist/json-schema/v1/full.json +12 -0
- package/dist/json-schema/v1/stage-0.json +4 -91
- package/dist/types/entry-points/code-block.d.ts +1 -1
- package/dist/types/entry-points/schema-code-block.d.ts +1 -1
- package/dist/types/entry-points/schema-next-nodeTypes.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types/next-schema/generated/nodeTypes.d.ts +16 -39
- package/dist/types/next-schema/nodes/codeBlock.d.ts +1 -3
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/code-block.d.ts +0 -8
- package/dist/types/schema/nodes/index.d.ts +1 -1
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +8 -63
- package/dist/types-ts4.5/entry-points/code-block.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/schema-code-block.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/schema-next-nodeTypes.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +16 -39
- package/dist/types-ts4.5/next-schema/nodes/codeBlock.d.ts +1 -3
- package/dist/types-ts4.5/schema/index.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/code-block.d.ts +0 -8
- package/dist/types-ts4.5/schema/nodes/index.d.ts +1 -1
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +8 -63
- package/json-schema/v1/full.json +12 -0
- package/json-schema/v1/stage-0.json +4 -91
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { codeBlock, codeBlockWithLocalId,
|
|
2
|
+
export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from '../schema/nodes/code-block';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { codeBlock, codeBlockWithLocalId,
|
|
2
|
+
export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from '../schema/nodes/code-block';
|
|
@@ -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,
|
|
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, layoutColumnStage0, layoutSection, layoutSectionFull, layoutSectionWithSingleColumnStage0, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mediaSingleWidthType, mention, mentionStage0, multiBodiedExtensionStage0, nestedExpand, nestedExpandWithNoMarks, orderedList, panel, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, status, statusStage0, syncBlock, table, tableWithNestedTable, tableCell, tableCellStage0, tableCellWithNestedTable, tableCellWithNestedTableStage0, tableHeader, tableHeaderStage0, tableHeaderWithNestedTable, tableHeaderWithNestedTableStage0, tableRow, tableRowWithNestedTable, taskItem, taskList, text, textCodeInline, textFormatted, textWithNoMarks, unsupportedBlock, unsupportedInline } from '../next-schema/generated/nodeTypes';
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, fontSize, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId,
|
|
2
|
+
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, fontSize, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
|
|
3
3
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
5
5
|
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
|
|
@@ -16,7 +16,7 @@ panel.use('c1').addContent(table);
|
|
|
16
16
|
const doc = adfNode('doc').define({
|
|
17
17
|
root: true,
|
|
18
18
|
version: 1,
|
|
19
|
-
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'),
|
|
19
|
+
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
|
|
20
20
|
DANGEROUS_MANUAL_OVERRIDE: {
|
|
21
21
|
'validator-spec': {
|
|
22
22
|
'props.content.minItems': {
|
|
@@ -163,40 +163,6 @@ export const codeBlock = createPMNodeSpecFactory({
|
|
|
163
163
|
content: '(text | unsupportedInline)*',
|
|
164
164
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
165
165
|
group: 'block',
|
|
166
|
-
attrs: {
|
|
167
|
-
language: {
|
|
168
|
-
default: null
|
|
169
|
-
},
|
|
170
|
-
uniqueId: {
|
|
171
|
-
default: null
|
|
172
|
-
},
|
|
173
|
-
localId: {
|
|
174
|
-
default: null
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
code: true,
|
|
178
|
-
defining: true
|
|
179
|
-
});
|
|
180
|
-
export const codeBlockRootOnly = createPMNodeSpecFactory({
|
|
181
|
-
content: '(text | unsupportedInline)*',
|
|
182
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
183
|
-
attrs: {
|
|
184
|
-
language: {
|
|
185
|
-
default: null
|
|
186
|
-
},
|
|
187
|
-
uniqueId: {
|
|
188
|
-
default: null
|
|
189
|
-
},
|
|
190
|
-
localId: {
|
|
191
|
-
default: null
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
code: true,
|
|
195
|
-
defining: true
|
|
196
|
-
});
|
|
197
|
-
export const codeBlockRootOnlyWithExtendedAttributesStage0 = createPMNodeSpecFactory({
|
|
198
|
-
content: '(text | unsupportedInline)*',
|
|
199
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
200
166
|
attrs: {
|
|
201
167
|
language: {
|
|
202
168
|
default: null
|
|
@@ -217,10 +183,9 @@ export const codeBlockRootOnlyWithExtendedAttributesStage0 = createPMNodeSpecFac
|
|
|
217
183
|
code: true,
|
|
218
184
|
defining: true
|
|
219
185
|
});
|
|
220
|
-
export const
|
|
186
|
+
export const codeBlockRootOnly = createPMNodeSpecFactory({
|
|
221
187
|
content: '(text | unsupportedInline)*',
|
|
222
188
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
223
|
-
group: 'block',
|
|
224
189
|
attrs: {
|
|
225
190
|
language: {
|
|
226
191
|
default: null
|
|
@@ -31,7 +31,7 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
|
31
31
|
* - no base mediaSingle
|
|
32
32
|
* - no base heading
|
|
33
33
|
*/
|
|
34
|
-
export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock,
|
|
34
|
+
export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, table,
|
|
35
35
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
36
36
|
table.use('with_nested_table'), expand, bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
|
|
37
37
|
ignore: ['pm-spec']
|
|
@@ -18,7 +18,7 @@ import { rule } from '../nodes/rule';
|
|
|
18
18
|
import { table } from '../nodes/tableNodes';
|
|
19
19
|
import { taskList } from '../nodes/task';
|
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
21
|
-
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock,
|
|
21
|
+
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('c1'), table,
|
|
22
22
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
23
23
|
table.use('with_nested_table'), bodiedExtension, bodiedExtension.use('with_marks'), expand, confluenceUnsupportedBlock, unsupportedBlock], {
|
|
24
24
|
// @DSLCompatibilityException
|
|
@@ -19,7 +19,7 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
|
19
19
|
// Not an actual group, but a collection of nodes that can't be nested inside each other
|
|
20
20
|
// TODO: ED-29537 - make it an actual group
|
|
21
21
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
-
export const nonNestableBlockContent = [paragraph.use('with_no_marks'), paragraph.use('with_font_size'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock,
|
|
22
|
+
export const nonNestableBlockContent = [paragraph.use('with_no_marks'), paragraph.use('with_font_size'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), decisionList, taskList, table,
|
|
23
23
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
24
24
|
table.use('with_nested_table'), blockCard, embedCard, extension.use('with_marks'), unsupportedBlock];
|
|
25
25
|
|
|
@@ -17,7 +17,7 @@ import { taskList } from '../nodes/task';
|
|
|
17
17
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
18
18
|
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock,
|
|
20
|
+
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks')];
|
|
21
21
|
|
|
22
22
|
// This is not an actual group, but a collection of nodes
|
|
23
23
|
// @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
|
|
@@ -7,34 +7,6 @@ import { unsupportedInline } from './unsupportedInline';
|
|
|
7
7
|
export const codeBlock = adfNode('codeBlock').define({
|
|
8
8
|
code: true,
|
|
9
9
|
defining: true,
|
|
10
|
-
attrs: {
|
|
11
|
-
language: {
|
|
12
|
-
type: 'string',
|
|
13
|
-
default: null,
|
|
14
|
-
optional: true
|
|
15
|
-
},
|
|
16
|
-
uniqueId: {
|
|
17
|
-
type: 'string',
|
|
18
|
-
default: null,
|
|
19
|
-
optional: true
|
|
20
|
-
},
|
|
21
|
-
localId: {
|
|
22
|
-
type: 'string',
|
|
23
|
-
default: null,
|
|
24
|
-
optional: true
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
noMarks: true,
|
|
28
|
-
content: [$zeroPlus($or(text.use('with_no_marks'), unsupportedInline))]
|
|
29
|
-
})
|
|
30
|
-
// Variant used root scenario where we have breakout
|
|
31
|
-
.variant('root_only', {
|
|
32
|
-
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
|
33
|
-
noMarks: false,
|
|
34
|
-
noExtend: true
|
|
35
|
-
})
|
|
36
|
-
// Stage-0 variant: adds wrap and hideLineNumbers attributes (ADF Change 101)
|
|
37
|
-
.variant('with_extended_attributes', {
|
|
38
10
|
attrs: {
|
|
39
11
|
language: {
|
|
40
12
|
type: 'string',
|
|
@@ -62,39 +34,12 @@ export const codeBlock = adfNode('codeBlock').define({
|
|
|
62
34
|
optional: true
|
|
63
35
|
}
|
|
64
36
|
},
|
|
65
|
-
|
|
37
|
+
noMarks: true,
|
|
38
|
+
content: [$zeroPlus($or(text.use('with_no_marks'), unsupportedInline))]
|
|
66
39
|
})
|
|
67
|
-
//
|
|
68
|
-
.variant('
|
|
40
|
+
// Variant used root scenario where we have breakout
|
|
41
|
+
.variant('root_only', {
|
|
69
42
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
|
70
43
|
noMarks: false,
|
|
71
|
-
noExtend: true
|
|
72
|
-
attrs: {
|
|
73
|
-
language: {
|
|
74
|
-
type: 'string',
|
|
75
|
-
default: null,
|
|
76
|
-
optional: true
|
|
77
|
-
},
|
|
78
|
-
uniqueId: {
|
|
79
|
-
type: 'string',
|
|
80
|
-
default: null,
|
|
81
|
-
optional: true
|
|
82
|
-
},
|
|
83
|
-
localId: {
|
|
84
|
-
type: 'string',
|
|
85
|
-
default: null,
|
|
86
|
-
optional: true
|
|
87
|
-
},
|
|
88
|
-
wrap: {
|
|
89
|
-
type: 'boolean',
|
|
90
|
-
default: null,
|
|
91
|
-
optional: true
|
|
92
|
-
},
|
|
93
|
-
hideLineNumbers: {
|
|
94
|
-
type: 'boolean',
|
|
95
|
-
default: false,
|
|
96
|
-
optional: true
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
stage0: true
|
|
44
|
+
noExtend: true
|
|
100
45
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, layoutColumnStage0
|
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, layoutColumnStage0 } from './nodes';
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
4
|
const getDefaultSchemaConfig = () => {
|
|
5
5
|
const defaultSchemaConfig = {
|
|
@@ -27,8 +27,7 @@ export const getSchemaBasedOnStage = memoizeOne(
|
|
|
27
27
|
table: tableWithNestedTable,
|
|
28
28
|
tableRow: tableRowWithNestedTable,
|
|
29
29
|
tableCell: tableCellWithNestedTableStage0,
|
|
30
|
-
tableHeader: tableHeaderWithNestedTableStage0
|
|
31
|
-
codeBlock: codeBlockWithExtendedAttributes
|
|
30
|
+
tableHeader: tableHeaderWithNestedTableStage0
|
|
32
31
|
};
|
|
33
32
|
}
|
|
34
33
|
return createSchema(defaultSchemaConfig);
|
|
@@ -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,
|
|
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, 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';
|
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette,
|
|
4
4
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
5
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { codeBlock as codeBlockFactory
|
|
2
|
+
import { codeBlock as codeBlockFactory } from '../../next-schema/generated/nodeTypes';
|
|
3
3
|
import { uuid } from '../../utils';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -87,8 +87,17 @@ export const codeBlock = codeBlockFactory({
|
|
|
87
87
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
88
88
|
dom.getAttribute('data-language');
|
|
89
89
|
dom = removeLastNewLine(dom);
|
|
90
|
+
const wrapAttr = dom.getAttribute('data-wrap');
|
|
91
|
+
const isCopiedFromEditor = Boolean(dom.closest('[data-pm-slice]') || dom.hasAttribute('data-pm-slice'));
|
|
92
|
+
// Default external HTML paste to wrapped when data-wrap is absent, but preserve
|
|
93
|
+
// unwrapped editor-origin paste when copied content has data-pm-slice.
|
|
94
|
+
const wrap = wrapAttr === null ? !isCopiedFromEditor : wrapAttr !== 'false';
|
|
95
|
+
const hideLineNumbers = dom.getAttribute('data-hide-line-numbers') === 'true';
|
|
90
96
|
return {
|
|
91
|
-
language
|
|
97
|
+
language,
|
|
98
|
+
wrap,
|
|
99
|
+
hideLineNumbers,
|
|
100
|
+
localId: uuid.generate()
|
|
92
101
|
};
|
|
93
102
|
}
|
|
94
103
|
},
|
|
@@ -101,7 +110,9 @@ export const codeBlock = codeBlockFactory({
|
|
|
101
110
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
102
111
|
const dom = domNode;
|
|
103
112
|
if (dom.style.whiteSpace === 'pre' || dom.style.fontFamily && dom.style.fontFamily.toLowerCase().indexOf('monospace') > -1) {
|
|
104
|
-
return {
|
|
113
|
+
return {
|
|
114
|
+
wrap: true
|
|
115
|
+
};
|
|
105
116
|
}
|
|
106
117
|
return false;
|
|
107
118
|
},
|
|
@@ -117,7 +128,9 @@ export const codeBlock = codeBlockFactory({
|
|
|
117
128
|
getAttrs: dom => {
|
|
118
129
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
119
130
|
if (dom.querySelector('td[class*="blob-code"]')) {
|
|
120
|
-
return {
|
|
131
|
+
return {
|
|
132
|
+
wrap: true
|
|
133
|
+
};
|
|
121
134
|
}
|
|
122
135
|
return false;
|
|
123
136
|
}
|
|
@@ -135,11 +148,26 @@ export const codeBlock = codeBlockFactory({
|
|
|
135
148
|
// `react-syntax-highlighter-line-number` check, so that we don't remove real code
|
|
136
149
|
lineNumber.forEach(line => line.remove());
|
|
137
150
|
}
|
|
138
|
-
return {
|
|
151
|
+
return {
|
|
152
|
+
wrap: true
|
|
153
|
+
};
|
|
139
154
|
}
|
|
140
155
|
}],
|
|
141
156
|
toDOM(node) {
|
|
142
|
-
|
|
157
|
+
var _node$attrs;
|
|
158
|
+
const attrs = {};
|
|
159
|
+
if ((node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) !== undefined) {
|
|
160
|
+
attrs['data-local-id'] = node.attrs.localId;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Always serialize data-wrap explicitly (both true and false) so that
|
|
164
|
+
// editor-to-editor paste can distinguish intentional wrap:false from
|
|
165
|
+
// absent data-wrap (which parseDOM defaults to wrap:true for external HTML).
|
|
166
|
+
attrs['data-wrap'] = node.attrs.wrap ? 'true' : 'false';
|
|
167
|
+
if (node.attrs.hideLineNumbers) {
|
|
168
|
+
attrs['data-hide-line-numbers'] = 'true';
|
|
169
|
+
}
|
|
170
|
+
return ['pre', attrs, ['code', {
|
|
143
171
|
'data-language': node.attrs.language
|
|
144
172
|
}, 0]];
|
|
145
173
|
}
|
|
@@ -163,116 +191,6 @@ export const toJSON = node => ({
|
|
|
163
191
|
return memo;
|
|
164
192
|
}, {})
|
|
165
193
|
});
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* @name codeBlock_with_extended_attributes
|
|
169
|
-
* @description stage-0 codeBlock variant with wrap and hideLineNumbers attributes (ADF Change 101)
|
|
170
|
-
*
|
|
171
|
-
* Stage-0 variant: adds wrap and hideLineNumbers attributes (ADF Change 101).
|
|
172
|
-
* The DSL variant includes all attrs (base + new), so the generated factory provides the full set.
|
|
173
|
-
*/
|
|
174
|
-
export const codeBlockWithExtendedAttributes = {
|
|
175
|
-
...codeBlockWithExtendedAttributesStage0Factory({
|
|
176
|
-
parseDOM: [{
|
|
177
|
-
tag: 'pre',
|
|
178
|
-
preserveWhitespace: 'full',
|
|
179
|
-
getAttrs: domNode => {
|
|
180
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
181
|
-
let dom = domNode;
|
|
182
|
-
const language =
|
|
183
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
184
|
-
getLanguageFromBitbucketStyle(dom.parentElement) ||
|
|
185
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
186
|
-
getLanguageFromEditorStyle(dom.parentElement) || getLanguageFromCode(dom) ||
|
|
187
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
188
|
-
dom.getAttribute('data-language');
|
|
189
|
-
dom = removeLastNewLine(dom);
|
|
190
|
-
const wrapAttr = dom.getAttribute('data-wrap');
|
|
191
|
-
const isCopiedFromEditor = Boolean(dom.closest('[data-pm-slice]') || dom.hasAttribute('data-pm-slice'));
|
|
192
|
-
// Default external HTML paste to wrapped when data-wrap is absent, but preserve
|
|
193
|
-
// unwrapped editor-origin paste when copied content has data-pm-slice.
|
|
194
|
-
const wrap = wrapAttr === null ? !isCopiedFromEditor : wrapAttr !== 'false';
|
|
195
|
-
const hideLineNumbers = dom.getAttribute('data-hide-line-numbers') === 'true';
|
|
196
|
-
return {
|
|
197
|
-
language,
|
|
198
|
-
wrap,
|
|
199
|
-
hideLineNumbers,
|
|
200
|
-
localId: uuid.generate()
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
// Handle VSCode, Android Studio paste
|
|
205
|
-
// Checking `white-space: pre-wrap` is too aggressive @see ED-2627
|
|
206
|
-
{
|
|
207
|
-
tag: 'div[style]',
|
|
208
|
-
preserveWhitespace: 'full',
|
|
209
|
-
getAttrs: domNode => {
|
|
210
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
211
|
-
const dom = domNode;
|
|
212
|
-
if (dom.style.whiteSpace === 'pre' || dom.style.fontFamily && dom.style.fontFamily.toLowerCase().indexOf('monospace') > -1) {
|
|
213
|
-
return {
|
|
214
|
-
wrap: true
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
return false;
|
|
218
|
-
},
|
|
219
|
-
getContent: (domNode, schema) => {
|
|
220
|
-
const code = parseCodeFromHtml(domNode);
|
|
221
|
-
return code ? Fragment.from(schema.text(code)) : Fragment.empty;
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
// Handle GitHub/Gist paste
|
|
225
|
-
{
|
|
226
|
-
tag: 'table[style]',
|
|
227
|
-
preserveWhitespace: 'full',
|
|
228
|
-
getAttrs: dom => {
|
|
229
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
230
|
-
if (dom.querySelector('td[class*="blob-code"]')) {
|
|
231
|
-
return {
|
|
232
|
-
wrap: true
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
}, {
|
|
238
|
-
tag: 'div.code-block',
|
|
239
|
-
preserveWhitespace: 'full',
|
|
240
|
-
getAttrs: domNode => {
|
|
241
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
242
|
-
const dom = domNode;
|
|
243
|
-
// TODO: ED-5604 - Fix it inside `react-syntax-highlighter`
|
|
244
|
-
// Remove line numbers
|
|
245
|
-
const lineNumber = dom.querySelectorAll('.react-syntax-highlighter-line-number');
|
|
246
|
-
if (lineNumber.length > 0) {
|
|
247
|
-
// It's possible to copy without the line numbers too hence this
|
|
248
|
-
// `react-syntax-highlighter-line-number` check, so that we don't remove real code
|
|
249
|
-
lineNumber.forEach(line => line.remove());
|
|
250
|
-
}
|
|
251
|
-
return {
|
|
252
|
-
wrap: true
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
}],
|
|
256
|
-
toDOM(node) {
|
|
257
|
-
var _node$attrs;
|
|
258
|
-
const attrs = {};
|
|
259
|
-
if ((node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) !== undefined) {
|
|
260
|
-
attrs['data-local-id'] = node.attrs.localId;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// Always serialize data-wrap explicitly (both true and false) so that
|
|
264
|
-
// editor-to-editor paste can distinguish intentional wrap:false from
|
|
265
|
-
// absent data-wrap (which parseDOM defaults to wrap:true for external HTML).
|
|
266
|
-
attrs['data-wrap'] = node.attrs.wrap ? 'true' : 'false';
|
|
267
|
-
if (node.attrs.hideLineNumbers) {
|
|
268
|
-
attrs['data-hide-line-numbers'] = 'true';
|
|
269
|
-
}
|
|
270
|
-
return ['pre', attrs, ['code', {
|
|
271
|
-
'data-language': node.attrs.language
|
|
272
|
-
}, 0]];
|
|
273
|
-
}
|
|
274
|
-
})
|
|
275
|
-
};
|
|
276
194
|
export const codeBlockWithLocalId = codeBlockFactory({
|
|
277
195
|
parseDOM: [{
|
|
278
196
|
tag: 'pre',
|
|
@@ -6,7 +6,7 @@ export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
|
|
|
6
6
|
export { doc } from './doc';
|
|
7
7
|
export { blockquote, extendedBlockquote, extendedBlockquoteWithLocalId } from './blockquote';
|
|
8
8
|
export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-list';
|
|
9
|
-
export { codeBlock, codeBlockWithLocalId,
|
|
9
|
+
export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
|
|
10
10
|
export { hardBreak } from './hard-break';
|
|
11
11
|
export { heading } from './heading';
|
|
12
12
|
export { rule, ruleWithLocalId } from './rule';
|
|
@@ -49,7 +49,7 @@ export const backgroundColor = {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
export const block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', '
|
|
52
|
+
export const block_content = ['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'];
|
|
53
53
|
export const blockCard = {
|
|
54
54
|
props: {
|
|
55
55
|
attrs: [{
|
|
@@ -362,6 +362,10 @@ export const codeBlock = {
|
|
|
362
362
|
attrs: {
|
|
363
363
|
optional: true,
|
|
364
364
|
props: {
|
|
365
|
+
hideLineNumbers: {
|
|
366
|
+
optional: true,
|
|
367
|
+
type: 'boolean'
|
|
368
|
+
},
|
|
365
369
|
language: {
|
|
366
370
|
optional: true,
|
|
367
371
|
type: 'string'
|
|
@@ -373,6 +377,10 @@ export const codeBlock = {
|
|
|
373
377
|
uniqueId: {
|
|
374
378
|
optional: true,
|
|
375
379
|
type: 'string'
|
|
380
|
+
},
|
|
381
|
+
wrap: {
|
|
382
|
+
optional: true,
|
|
383
|
+
type: 'boolean'
|
|
376
384
|
}
|
|
377
385
|
}
|
|
378
386
|
},
|
|
@@ -397,69 +405,6 @@ export const codeBlock_root_only = ['codeBlock', {
|
|
|
397
405
|
}
|
|
398
406
|
}
|
|
399
407
|
}];
|
|
400
|
-
export const codeBlock_root_only_with_extended_attributes = ['codeBlock', {
|
|
401
|
-
props: {
|
|
402
|
-
attrs: {
|
|
403
|
-
optional: true,
|
|
404
|
-
props: {
|
|
405
|
-
hideLineNumbers: {
|
|
406
|
-
optional: true,
|
|
407
|
-
type: 'boolean'
|
|
408
|
-
},
|
|
409
|
-
language: {
|
|
410
|
-
optional: true,
|
|
411
|
-
type: 'string'
|
|
412
|
-
},
|
|
413
|
-
localId: {
|
|
414
|
-
optional: true,
|
|
415
|
-
type: 'string'
|
|
416
|
-
},
|
|
417
|
-
uniqueId: {
|
|
418
|
-
optional: true,
|
|
419
|
-
type: 'string'
|
|
420
|
-
},
|
|
421
|
-
wrap: {
|
|
422
|
-
optional: true,
|
|
423
|
-
type: 'boolean'
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
},
|
|
427
|
-
marks: {
|
|
428
|
-
items: ['breakout'],
|
|
429
|
-
optional: true,
|
|
430
|
-
type: 'array'
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}];
|
|
434
|
-
export const codeBlock_with_extended_attributes = ['codeBlock', {
|
|
435
|
-
props: {
|
|
436
|
-
attrs: {
|
|
437
|
-
optional: true,
|
|
438
|
-
props: {
|
|
439
|
-
hideLineNumbers: {
|
|
440
|
-
optional: true,
|
|
441
|
-
type: 'boolean'
|
|
442
|
-
},
|
|
443
|
-
language: {
|
|
444
|
-
optional: true,
|
|
445
|
-
type: 'string'
|
|
446
|
-
},
|
|
447
|
-
localId: {
|
|
448
|
-
optional: true,
|
|
449
|
-
type: 'string'
|
|
450
|
-
},
|
|
451
|
-
uniqueId: {
|
|
452
|
-
optional: true,
|
|
453
|
-
type: 'string'
|
|
454
|
-
},
|
|
455
|
-
wrap: {
|
|
456
|
-
optional: true,
|
|
457
|
-
type: 'boolean'
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
}];
|
|
463
408
|
export const confluenceInlineComment = {
|
|
464
409
|
props: {
|
|
465
410
|
attrs: {
|
|
@@ -568,7 +513,7 @@ export const doc = {
|
|
|
568
513
|
props: {
|
|
569
514
|
content: {
|
|
570
515
|
allowUnsupportedBlock: true,
|
|
571
|
-
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', '
|
|
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', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
572
517
|
type: 'array'
|
|
573
518
|
},
|
|
574
519
|
type: {
|
|
@@ -676,7 +621,7 @@ export const expand = {
|
|
|
676
621
|
},
|
|
677
622
|
content: {
|
|
678
623
|
allowUnsupportedBlock: true,
|
|
679
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', '
|
|
624
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
|
680
625
|
minItems: 1,
|
|
681
626
|
type: 'array'
|
|
682
627
|
},
|
|
@@ -1505,7 +1450,7 @@ export const nestedExpand_with_no_marks = ['nestedExpand', {
|
|
|
1505
1450
|
}
|
|
1506
1451
|
}
|
|
1507
1452
|
}];
|
|
1508
|
-
export const non_nestable_block_content = ['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', '
|
|
1453
|
+
export const non_nestable_block_content = ['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks'];
|
|
1509
1454
|
export const orderedList = {
|
|
1510
1455
|
props: {
|
|
1511
1456
|
attrs: {
|
|
@@ -1847,7 +1792,7 @@ export const tableCell = {
|
|
|
1847
1792
|
},
|
|
1848
1793
|
content: {
|
|
1849
1794
|
allowUnsupportedBlock: true,
|
|
1850
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', '
|
|
1795
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
|
1851
1796
|
minItems: 1,
|
|
1852
1797
|
type: 'array'
|
|
1853
1798
|
},
|
|
@@ -1894,7 +1839,7 @@ export const tableHeader = {
|
|
|
1894
1839
|
}
|
|
1895
1840
|
},
|
|
1896
1841
|
content: {
|
|
1897
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', '
|
|
1842
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
|
|
1898
1843
|
minItems: 1,
|
|
1899
1844
|
type: 'array'
|
|
1900
1845
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { codeBlock, codeBlockWithLocalId,
|
|
2
|
+
export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from '../schema/nodes/code-block';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { codeBlock, codeBlockWithLocalId,
|
|
2
|
+
export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from '../schema/nodes/code-block';
|
|
@@ -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,
|
|
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, layoutColumnStage0, layoutSection, layoutSectionFull, layoutSectionWithSingleColumnStage0, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mediaSingleWidthType, mention, mentionStage0, multiBodiedExtensionStage0, nestedExpand, nestedExpandWithNoMarks, orderedList, panel, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, status, statusStage0, syncBlock, table, tableWithNestedTable, tableCell, tableCellStage0, tableCellWithNestedTable, tableCellWithNestedTableStage0, tableHeader, tableHeaderStage0, tableHeaderWithNestedTable, tableHeaderWithNestedTableStage0, tableRow, tableRowWithNestedTable, taskItem, taskList, text, textCodeInline, textFormatted, textWithNoMarks, unsupportedBlock, unsupportedInline } from '../next-schema/generated/nodeTypes';
|