@atlaskit/adf-schema 56.0.3 → 56.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/entry-points/panel.js +12 -0
- package/dist/cjs/entry-points/rule.js +6 -0
- package/dist/cjs/entry-points/schema-next-nodeTypes.js +12 -0
- package/dist/cjs/entry-points/schema-panel.js +12 -0
- package/dist/cjs/entry-points/schema-rule.js +6 -0
- package/dist/cjs/next-schema/full-schema.adf.js +3 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +34 -2
- package/dist/cjs/next-schema/nodes/panel.js +16 -0
- package/dist/cjs/next-schema/nodes/rule.js +8 -0
- package/dist/cjs/schema/default-schema.js +5 -1
- package/dist/cjs/schema/index.js +12 -0
- package/dist/cjs/schema/nodes/index.js +18 -0
- package/dist/cjs/schema/nodes/panel.js +17 -1
- package/dist/cjs/schema/nodes/rule.js +8 -1
- package/dist/cjs/validator-schema/generated/validatorSpec.js +20 -2
- package/dist/es2019/entry-points/panel.js +1 -1
- package/dist/es2019/entry-points/rule.js +1 -1
- package/dist/es2019/entry-points/schema-next-nodeTypes.js +1 -1
- package/dist/es2019/entry-points/schema-panel.js +1 -1
- package/dist/es2019/entry-points/schema-rule.js +1 -1
- package/dist/es2019/next-schema/full-schema.adf.js +3 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +33 -1
- package/dist/es2019/next-schema/nodes/panel.js +16 -0
- package/dist/es2019/next-schema/nodes/rule.js +8 -0
- package/dist/es2019/schema/default-schema.js +5 -1
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +2 -2
- package/dist/es2019/schema/nodes/panel.js +19 -1
- package/dist/es2019/schema/nodes/rule.js +5 -1
- package/dist/es2019/validator-schema/generated/validatorSpec.js +19 -1
- package/dist/esm/entry-points/panel.js +1 -1
- package/dist/esm/entry-points/rule.js +1 -1
- package/dist/esm/entry-points/schema-next-nodeTypes.js +1 -1
- package/dist/esm/entry-points/schema-panel.js +1 -1
- package/dist/esm/entry-points/schema-rule.js +1 -1
- package/dist/esm/next-schema/full-schema.adf.js +3 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +33 -1
- package/dist/esm/next-schema/nodes/panel.js +16 -0
- package/dist/esm/next-schema/nodes/rule.js +8 -0
- package/dist/esm/schema/default-schema.js +5 -1
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +2 -2
- package/dist/esm/schema/nodes/panel.js +16 -0
- package/dist/esm/schema/nodes/rule.js +6 -0
- package/dist/esm/validator-schema/generated/validatorSpec.js +19 -1
- package/dist/json-schema/v1/stage-0.json +3271 -3191
- package/dist/types/entry-points/panel.d.ts +1 -1
- package/dist/types/entry-points/rule.d.ts +1 -1
- package/dist/types/entry-points/schema-next-nodeTypes.d.ts +2 -2
- package/dist/types/entry-points/schema-panel.d.ts +1 -1
- package/dist/types/entry-points/schema-rule.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +25 -1
- package/dist/types/next-schema/nodes/panel.d.ts +1 -1
- package/dist/types/next-schema/nodes/rule.d.ts +1 -1
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +2 -2
- package/dist/types/schema/nodes/panel.d.ts +5 -0
- package/dist/types/schema/nodes/rule.d.ts +1 -0
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +18 -0
- package/json-schema/v1/stage-0.json +3271 -3191
- package/package.json +2 -2
|
@@ -9,14 +9,14 @@ export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-
|
|
|
9
9
|
export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
|
|
10
10
|
export { hardBreak } from './hard-break';
|
|
11
11
|
export { heading } from './heading';
|
|
12
|
-
export { rule, ruleWithLocalId } from './rule';
|
|
12
|
+
export { rule, ruleWithLocalId, ruleRootOnlyStage0 } from './rule';
|
|
13
13
|
export { orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId } from './ordered-list';
|
|
14
14
|
export { paragraph } from './paragraph';
|
|
15
15
|
export { emoji, emojiWithLocalId } from './emoji';
|
|
16
16
|
export { image } from './image';
|
|
17
17
|
export { mention, toJSON as mentionToJSON } from './mention';
|
|
18
18
|
export { listItem, listItemWithLocalId } from './list-item';
|
|
19
|
-
export { extendedPanel, extendedPanelWithLocalId, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
|
|
19
|
+
export { extendedPanel, extendedPanelWithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
|
|
20
20
|
export { text } from './text';
|
|
21
21
|
export { default as unknownBlock } from './unknown-block';
|
|
22
22
|
export { caption, captionWithLocalId } from './caption';
|
|
@@ -89,4 +89,22 @@ export const extendedPanelWithLocalId = allowCustomPanel => panelFactory(createP
|
|
|
89
89
|
* and generateLocalId propagate identically.
|
|
90
90
|
*/
|
|
91
91
|
export const extendedPanelC1 = allowCustomPanel => panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel));
|
|
92
|
-
export const extendedPanelC1WithLocalId = allowCustomPanel => panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
92
|
+
export const extendedPanelC1WithLocalId = allowCustomPanel => panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @name extended_panel_root_only
|
|
96
|
+
*/
|
|
97
|
+
export const extendedPanelRootOnlyStage0 = allowCustomPanel => {
|
|
98
|
+
const panelNodeSpec = extendedPanelWithLocalId(allowCustomPanel);
|
|
99
|
+
return {
|
|
100
|
+
...panelNodeSpec,
|
|
101
|
+
marks: `breakout ${panelNodeSpec.marks}`
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
export const extendedPanelC1RootOnlyStage0 = allowCustomPanel => {
|
|
105
|
+
const panelNodeSpec = extendedPanelC1WithLocalId(allowCustomPanel);
|
|
106
|
+
return {
|
|
107
|
+
...panelNodeSpec,
|
|
108
|
+
marks: `breakout ${panelNodeSpec.marks}`
|
|
109
|
+
};
|
|
110
|
+
};
|
|
@@ -27,4 +27,8 @@ export const ruleWithLocalId = ruleFactory({
|
|
|
27
27
|
'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
|
|
28
28
|
}];
|
|
29
29
|
}
|
|
30
|
-
});
|
|
30
|
+
});
|
|
31
|
+
export const ruleRootOnlyStage0 = {
|
|
32
|
+
...ruleWithLocalId,
|
|
33
|
+
marks: 'breakout unsupportedMark unsupportedNodeAttribute'
|
|
34
|
+
};
|
|
@@ -513,7 +513,7 @@ export const doc = {
|
|
|
513
513
|
props: {
|
|
514
514
|
content: {
|
|
515
515
|
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', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
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']],
|
|
517
517
|
type: 'array'
|
|
518
518
|
},
|
|
519
519
|
type: {
|
|
@@ -1520,6 +1520,15 @@ export const panel = {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
};
|
|
1523
|
+
export const panel_root_only = ['panel', {
|
|
1524
|
+
props: {
|
|
1525
|
+
marks: {
|
|
1526
|
+
items: ['breakout'],
|
|
1527
|
+
optional: true,
|
|
1528
|
+
type: 'array'
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}];
|
|
1523
1532
|
export const paragraph = {
|
|
1524
1533
|
props: {
|
|
1525
1534
|
attrs: {
|
|
@@ -1621,6 +1630,15 @@ export const rule = {
|
|
|
1621
1630
|
}
|
|
1622
1631
|
}
|
|
1623
1632
|
};
|
|
1633
|
+
export const rule_root_only = ['rule', {
|
|
1634
|
+
props: {
|
|
1635
|
+
marks: {
|
|
1636
|
+
items: ['breakout'],
|
|
1637
|
+
optional: true,
|
|
1638
|
+
type: 'array'
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
}];
|
|
1624
1642
|
export const status = {
|
|
1625
1643
|
props: {
|
|
1626
1644
|
attrs: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { PanelType, extendedPanel, extendedPanelWithLocalId } from '../schema/nodes/panel';
|
|
2
|
+
export { PanelType, extendedPanel, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId } from '../schema/nodes/panel';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { rule, ruleWithLocalId } from '../schema/nodes/rule';
|
|
2
|
+
export { rule, ruleRootOnlyStage0, ruleWithLocalId } from '../schema/nodes/rule';
|
|
@@ -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, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, 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, 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';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { PanelType, extendedPanel, extendedPanelWithLocalId } from '../schema/nodes/panel';
|
|
2
|
+
export { PanelType, extendedPanel, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId } from '../schema/nodes/panel';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { rule, ruleWithLocalId } from '../schema/nodes/rule';
|
|
2
|
+
export { rule, ruleRootOnlyStage0, ruleWithLocalId } from '../schema/nodes/rule';
|
|
@@ -8,15 +8,17 @@ import { codeBlock } from './nodes/codeBlock';
|
|
|
8
8
|
import { syncBlock } from './nodes/syncBlock';
|
|
9
9
|
import { bodiedSyncBlock } from './nodes/bodiedSyncBlock';
|
|
10
10
|
import { panel } from './nodes/panel';
|
|
11
|
+
import { rule } from './nodes/rule';
|
|
11
12
|
import { table } from './nodes/tableNodes';
|
|
12
13
|
|
|
13
14
|
// Wire cross-container content after all node modules are fully evaluated,
|
|
14
15
|
// so neither import is undefined when the $or() expression is constructed.
|
|
15
16
|
panel.use('c1').addContent(table);
|
|
17
|
+
panel.use('c1_root_only').addContent(table);
|
|
16
18
|
var doc = adfNode('doc').define({
|
|
17
19
|
root: true,
|
|
18
20
|
version: 1,
|
|
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))],
|
|
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))],
|
|
20
22
|
DANGEROUS_MANUAL_OVERRIDE: {
|
|
21
23
|
'validator-spec': {
|
|
22
24
|
'props.content.minItems': {
|
|
@@ -298,7 +298,7 @@ export var decisionList = createPMNodeSpecFactory({
|
|
|
298
298
|
defining: true
|
|
299
299
|
});
|
|
300
300
|
export var doc = createPMNodeSpecFactory({
|
|
301
|
-
content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
301
|
+
content: '(block | codeBlock | panel | rule | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
302
302
|
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment breakout'
|
|
303
303
|
});
|
|
304
304
|
export var embedCard = createPMNodeSpecFactory({
|
|
@@ -1036,6 +1036,31 @@ export var panelC1 = createPMNodeSpecFactory({
|
|
|
1036
1036
|
},
|
|
1037
1037
|
selectable: true
|
|
1038
1038
|
});
|
|
1039
|
+
export var panelRootOnlyStage0 = createPMNodeSpecFactory({
|
|
1040
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | extension)+',
|
|
1041
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1042
|
+
attrs: {
|
|
1043
|
+
panelType: {
|
|
1044
|
+
default: 'info'
|
|
1045
|
+
},
|
|
1046
|
+
panelIcon: {
|
|
1047
|
+
default: null
|
|
1048
|
+
},
|
|
1049
|
+
panelIconId: {
|
|
1050
|
+
default: null
|
|
1051
|
+
},
|
|
1052
|
+
panelIconText: {
|
|
1053
|
+
default: null
|
|
1054
|
+
},
|
|
1055
|
+
panelColor: {
|
|
1056
|
+
default: null
|
|
1057
|
+
},
|
|
1058
|
+
localId: {
|
|
1059
|
+
default: null
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
selectable: true
|
|
1063
|
+
});
|
|
1039
1064
|
export var paragraph = createPMNodeSpecFactory({
|
|
1040
1065
|
content: 'inline*',
|
|
1041
1066
|
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
|
@@ -1104,6 +1129,13 @@ export var rule = createPMNodeSpecFactory({
|
|
|
1104
1129
|
}
|
|
1105
1130
|
}
|
|
1106
1131
|
});
|
|
1132
|
+
export var ruleRootOnlyStage0 = createPMNodeSpecFactory({
|
|
1133
|
+
attrs: {
|
|
1134
|
+
localId: {
|
|
1135
|
+
default: null
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1107
1139
|
export var status = createPMNodeSpecFactory({
|
|
1108
1140
|
group: 'inline',
|
|
1109
1141
|
inline: true,
|
|
@@ -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 { blockCard } from './blockCard';
|
|
@@ -56,4 +57,19 @@ export var panel = adfNode('panel').define({
|
|
|
56
57
|
content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))],
|
|
57
58
|
ignore: ['json-schema', 'validator-spec'],
|
|
58
59
|
preserveVariantNameInPm: true
|
|
60
|
+
})
|
|
61
|
+
// this variant is used to support breakout resizing for panel nodes at the document root
|
|
62
|
+
.variant('root_only', {
|
|
63
|
+
stage0: true,
|
|
64
|
+
marks: [breakout, unsupportedMark, unsupportedNodeAttribute]
|
|
65
|
+
})
|
|
66
|
+
// this variant is used to support breakout resizing for panel_c1 nodes at the document root
|
|
67
|
+
.variant('c1_root_only', {
|
|
68
|
+
stage0: true,
|
|
69
|
+
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
|
70
|
+
// panel_c1 allows all standard panel content plus table (wired via addContent
|
|
71
|
+
// in full-schema.adf.ts to avoid a circular module import).
|
|
72
|
+
content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))],
|
|
73
|
+
ignore: ['json-schema', 'validator-spec'],
|
|
74
|
+
preserveVariantNameInPm: true
|
|
59
75
|
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
|
+
import { breakout } from '../marks/breakout';
|
|
3
|
+
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
4
|
+
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
2
5
|
export var rule = adfNode('rule').define({
|
|
3
6
|
attrs: {
|
|
4
7
|
localId: {
|
|
@@ -7,4 +10,9 @@ export var rule = adfNode('rule').define({
|
|
|
7
10
|
optional: true
|
|
8
11
|
}
|
|
9
12
|
}
|
|
13
|
+
})
|
|
14
|
+
// this variant is used to support breakout resizing for rule nodes at the document root
|
|
15
|
+
.variant('root_only', {
|
|
16
|
+
stage0: true,
|
|
17
|
+
marks: [breakout, unsupportedMark, unsupportedNodeAttribute]
|
|
10
18
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
2
|
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0 } from './nodes';
|
|
3
|
+
import { ruleRootOnlyStage0 } from './nodes/rule';
|
|
4
|
+
import { extendedPanelRootOnlyStage0 } from './nodes/panel';
|
|
3
5
|
import { createSchema } from './create-schema';
|
|
4
6
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
5
7
|
var defaultSchemaConfig = {
|
|
@@ -27,7 +29,9 @@ function () {
|
|
|
27
29
|
table: tableWithNestedTable,
|
|
28
30
|
tableRow: tableRowWithNestedTable,
|
|
29
31
|
tableCell: tableCellWithNestedTableStage0,
|
|
30
|
-
tableHeader: tableHeaderWithNestedTableStage0
|
|
32
|
+
tableHeader: tableHeaderWithNestedTableStage0,
|
|
33
|
+
panel: extendedPanelRootOnlyStage0(true),
|
|
34
|
+
rule: ruleRootOnlyStage0
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
37
|
return createSchema(defaultSchemaConfig);
|
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, 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, 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';
|
|
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,14 +9,14 @@ export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-
|
|
|
9
9
|
export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
|
|
10
10
|
export { hardBreak } from './hard-break';
|
|
11
11
|
export { heading } from './heading';
|
|
12
|
-
export { rule, ruleWithLocalId } from './rule';
|
|
12
|
+
export { rule, ruleWithLocalId, ruleRootOnlyStage0 } from './rule';
|
|
13
13
|
export { orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId } from './ordered-list';
|
|
14
14
|
export { paragraph } from './paragraph';
|
|
15
15
|
export { emoji, emojiWithLocalId } from './emoji';
|
|
16
16
|
export { image } from './image';
|
|
17
17
|
export { mention, toJSON as mentionToJSON } from './mention';
|
|
18
18
|
export { listItem, listItemWithLocalId } from './list-item';
|
|
19
|
-
export { extendedPanel, extendedPanelWithLocalId, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
|
|
19
|
+
export { extendedPanel, extendedPanelWithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
|
|
20
20
|
export { text } from './text';
|
|
21
21
|
export { default as unknownBlock } from './unknown-block';
|
|
22
22
|
export { caption, captionWithLocalId } from './caption';
|
|
@@ -103,4 +103,20 @@ export var extendedPanelC1 = function extendedPanelC1(allowCustomPanel) {
|
|
|
103
103
|
};
|
|
104
104
|
export var extendedPanelC1WithLocalId = function extendedPanelC1WithLocalId(allowCustomPanel) {
|
|
105
105
|
return panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @name extended_panel_root_only
|
|
110
|
+
*/
|
|
111
|
+
export var extendedPanelRootOnlyStage0 = function extendedPanelRootOnlyStage0(allowCustomPanel) {
|
|
112
|
+
var panelNodeSpec = extendedPanelWithLocalId(allowCustomPanel);
|
|
113
|
+
return _objectSpread(_objectSpread({}, panelNodeSpec), {}, {
|
|
114
|
+
marks: "breakout ".concat(panelNodeSpec.marks)
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
export var extendedPanelC1RootOnlyStage0 = function extendedPanelC1RootOnlyStage0(allowCustomPanel) {
|
|
118
|
+
var panelNodeSpec = extendedPanelC1WithLocalId(allowCustomPanel);
|
|
119
|
+
return _objectSpread(_objectSpread({}, panelNodeSpec), {}, {
|
|
120
|
+
marks: "breakout ".concat(panelNodeSpec.marks)
|
|
121
|
+
});
|
|
106
122
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1
4
|
import { rule as ruleFactory } from '../../next-schema/generated/nodeTypes';
|
|
2
5
|
import { uuid } from '../../utils/uuid';
|
|
3
6
|
|
|
@@ -29,4 +32,7 @@ export var ruleWithLocalId = ruleFactory({
|
|
|
29
32
|
'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
|
|
30
33
|
}];
|
|
31
34
|
}
|
|
35
|
+
});
|
|
36
|
+
export var ruleRootOnlyStage0 = _objectSpread(_objectSpread({}, ruleWithLocalId), {}, {
|
|
37
|
+
marks: 'breakout unsupportedMark unsupportedNodeAttribute'
|
|
32
38
|
});
|
|
@@ -513,7 +513,7 @@ export var doc = {
|
|
|
513
513
|
props: {
|
|
514
514
|
content: {
|
|
515
515
|
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', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
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']],
|
|
517
517
|
type: 'array'
|
|
518
518
|
},
|
|
519
519
|
type: {
|
|
@@ -1520,6 +1520,15 @@ export var panel = {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
};
|
|
1523
|
+
export var panel_root_only = ['panel', {
|
|
1524
|
+
props: {
|
|
1525
|
+
marks: {
|
|
1526
|
+
items: ['breakout'],
|
|
1527
|
+
optional: true,
|
|
1528
|
+
type: 'array'
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}];
|
|
1523
1532
|
export var paragraph = {
|
|
1524
1533
|
props: {
|
|
1525
1534
|
attrs: {
|
|
@@ -1621,6 +1630,15 @@ export var rule = {
|
|
|
1621
1630
|
}
|
|
1622
1631
|
}
|
|
1623
1632
|
};
|
|
1633
|
+
export var rule_root_only = ['rule', {
|
|
1634
|
+
props: {
|
|
1635
|
+
marks: {
|
|
1636
|
+
items: ['breakout'],
|
|
1637
|
+
optional: true,
|
|
1638
|
+
type: 'array'
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
}];
|
|
1624
1642
|
export var status = {
|
|
1625
1643
|
props: {
|
|
1626
1644
|
attrs: {
|