@atlaskit/adf-schema 56.0.2 → 56.0.4
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 +16 -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/marks/background-color.js +9 -2
- package/dist/cjs/schema/marks/text-color.js +10 -3
- 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/marks/background-color.js +9 -2
- package/dist/es2019/schema/marks/text-color.js +10 -3
- 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/marks/background-color.js +9 -2
- package/dist/esm/schema/marks/text-color.js +10 -3
- 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/background-color.d.ts +1 -1
- 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-background-color.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/marks/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 +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 56.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`edd71c69a804b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/edd71c69a804b) -
|
|
8
|
+
[EDITOR-7026] add breakout mark to rule and panel nodes in stage0
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 56.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`88d7b2e461104`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88d7b2e461104) -
|
|
16
|
+
Preserve new text and highlight colors when pasted behind platform_editor_lovability_text_bg_color
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 56.0.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -15,6 +15,18 @@ Object.defineProperty(exports, "extendedPanel", {
|
|
|
15
15
|
return _panel.extendedPanel;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "extendedPanelC1RootOnlyStage0", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _panel.extendedPanelC1RootOnlyStage0;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "extendedPanelRootOnlyStage0", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _panel.extendedPanelRootOnlyStage0;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
18
30
|
Object.defineProperty(exports, "extendedPanelWithLocalId", {
|
|
19
31
|
enumerable: true,
|
|
20
32
|
get: function get() {
|
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "rule", {
|
|
|
9
9
|
return _rule.rule;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "ruleRootOnlyStage0", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _rule.ruleRootOnlyStage0;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "ruleWithLocalId", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function get() {
|
|
@@ -345,6 +345,12 @@ Object.defineProperty(exports, "panel", {
|
|
|
345
345
|
return _nodeTypes.panel;
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
|
+
Object.defineProperty(exports, "panelRootOnlyStage0", {
|
|
349
|
+
enumerable: true,
|
|
350
|
+
get: function get() {
|
|
351
|
+
return _nodeTypes.panelRootOnlyStage0;
|
|
352
|
+
}
|
|
353
|
+
});
|
|
348
354
|
Object.defineProperty(exports, "paragraph", {
|
|
349
355
|
enumerable: true,
|
|
350
356
|
get: function get() {
|
|
@@ -387,6 +393,12 @@ Object.defineProperty(exports, "rule", {
|
|
|
387
393
|
return _nodeTypes.rule;
|
|
388
394
|
}
|
|
389
395
|
});
|
|
396
|
+
Object.defineProperty(exports, "ruleRootOnlyStage0", {
|
|
397
|
+
enumerable: true,
|
|
398
|
+
get: function get() {
|
|
399
|
+
return _nodeTypes.ruleRootOnlyStage0;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
390
402
|
Object.defineProperty(exports, "status", {
|
|
391
403
|
enumerable: true,
|
|
392
404
|
get: function get() {
|
|
@@ -15,6 +15,18 @@ Object.defineProperty(exports, "extendedPanel", {
|
|
|
15
15
|
return _panel.extendedPanel;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "extendedPanelC1RootOnlyStage0", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _panel.extendedPanelC1RootOnlyStage0;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "extendedPanelRootOnlyStage0", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _panel.extendedPanelRootOnlyStage0;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
18
30
|
Object.defineProperty(exports, "extendedPanelWithLocalId", {
|
|
19
31
|
enumerable: true,
|
|
20
32
|
get: function get() {
|
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "rule", {
|
|
|
9
9
|
return _rule.rule;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "ruleRootOnlyStage0", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _rule.ruleRootOnlyStage0;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "ruleWithLocalId", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function get() {
|
|
@@ -14,14 +14,16 @@ var _codeBlock = require("./nodes/codeBlock");
|
|
|
14
14
|
var _syncBlock = require("./nodes/syncBlock");
|
|
15
15
|
var _bodiedSyncBlock = require("./nodes/bodiedSyncBlock");
|
|
16
16
|
var _panel = require("./nodes/panel");
|
|
17
|
+
var _rule = require("./nodes/rule");
|
|
17
18
|
var _tableNodes = require("./nodes/tableNodes");
|
|
18
19
|
// Wire cross-container content after all node modules are fully evaluated,
|
|
19
20
|
// so neither import is undefined when the $or() expression is constructed.
|
|
20
21
|
_panel.panel.use('c1').addContent(_tableNodes.table);
|
|
22
|
+
_panel.panel.use('c1_root_only').addContent(_tableNodes.table);
|
|
21
23
|
var doc = (0, _adfSchemaGenerator.adfNode)('doc').define({
|
|
22
24
|
root: true,
|
|
23
25
|
version: 1,
|
|
24
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _blockContentGroup.blockContentGroup, _codeBlock.codeBlock.use('root_only'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup, _expand.expand.use('root_only'), _syncBlock.syncBlock, _bodiedSyncBlock.bodiedSyncBlock))],
|
|
26
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _blockContentGroup.blockContentGroup, _codeBlock.codeBlock.use('root_only'), _panel.panel.use('root_only'), _rule.rule.use('root_only'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup, _expand.expand.use('root_only'), _syncBlock.syncBlock, _bodiedSyncBlock.bodiedSyncBlock))],
|
|
25
27
|
DANGEROUS_MANUAL_OVERRIDE: {
|
|
26
28
|
'validator-spec': {
|
|
27
29
|
'props.content.minItems': {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.syncBlock = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithFontSize = exports.paragraphWithAlignment = exports.paragraph = exports.panelC1 = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandRootOnly = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedSyncBlock = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = exports.blockCard = void 0;
|
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.syncBlock = exports.statusStage0 = exports.status = exports.ruleRootOnlyStage0 = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithFontSize = exports.paragraphWithAlignment = exports.paragraph = exports.panelRootOnlyStage0 = exports.panelC1 = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandRootOnly = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedSyncBlock = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = exports.blockCard = void 0;
|
|
7
7
|
var _createPMSpecFactory = require("../../schema/createPMSpecFactory");
|
|
8
8
|
/**
|
|
9
9
|
* This file was automatically generated by @atlaskit/adf-schema-generator
|
|
@@ -304,7 +304,7 @@ var decisionList = exports.decisionList = (0, _createPMSpecFactory.createPMNodeS
|
|
|
304
304
|
defining: true
|
|
305
305
|
});
|
|
306
306
|
var doc = exports.doc = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
307
|
-
content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
307
|
+
content: '(block | codeBlock | panel | rule | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
308
308
|
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment breakout'
|
|
309
309
|
});
|
|
310
310
|
var embedCard = exports.embedCard = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
@@ -1042,6 +1042,31 @@ var panelC1 = exports.panelC1 = (0, _createPMSpecFactory.createPMNodeSpecFactory
|
|
|
1042
1042
|
},
|
|
1043
1043
|
selectable: true
|
|
1044
1044
|
});
|
|
1045
|
+
var panelRootOnlyStage0 = exports.panelRootOnlyStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1046
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | extension)+',
|
|
1047
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1048
|
+
attrs: {
|
|
1049
|
+
panelType: {
|
|
1050
|
+
default: 'info'
|
|
1051
|
+
},
|
|
1052
|
+
panelIcon: {
|
|
1053
|
+
default: null
|
|
1054
|
+
},
|
|
1055
|
+
panelIconId: {
|
|
1056
|
+
default: null
|
|
1057
|
+
},
|
|
1058
|
+
panelIconText: {
|
|
1059
|
+
default: null
|
|
1060
|
+
},
|
|
1061
|
+
panelColor: {
|
|
1062
|
+
default: null
|
|
1063
|
+
},
|
|
1064
|
+
localId: {
|
|
1065
|
+
default: null
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
selectable: true
|
|
1069
|
+
});
|
|
1045
1070
|
var paragraph = exports.paragraph = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1046
1071
|
content: 'inline*',
|
|
1047
1072
|
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
|
@@ -1110,6 +1135,13 @@ var rule = exports.rule = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
|
1110
1135
|
}
|
|
1111
1136
|
}
|
|
1112
1137
|
});
|
|
1138
|
+
var ruleRootOnlyStage0 = exports.ruleRootOnlyStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1139
|
+
attrs: {
|
|
1140
|
+
localId: {
|
|
1141
|
+
default: null
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1113
1145
|
var status = exports.status = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1114
1146
|
group: 'inline',
|
|
1115
1147
|
inline: true,
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.panel = void 0;
|
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
|
8
|
+
var _breakout = require("../marks/breakout");
|
|
8
9
|
var _unsupportedMark = require("../marks/unsupportedMark");
|
|
9
10
|
var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
|
|
10
11
|
var _blockCard = require("./blockCard");
|
|
@@ -62,4 +63,19 @@ var panel = exports.panel = (0, _adfSchemaGenerator.adfNode)('panel').define({
|
|
|
62
63
|
content: [(0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, panelContent.concat([_extension.extension.use('with_marks')])))],
|
|
63
64
|
ignore: ['json-schema', 'validator-spec'],
|
|
64
65
|
preserveVariantNameInPm: true
|
|
66
|
+
})
|
|
67
|
+
// this variant is used to support breakout resizing for panel nodes at the document root
|
|
68
|
+
.variant('root_only', {
|
|
69
|
+
stage0: true,
|
|
70
|
+
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute]
|
|
71
|
+
})
|
|
72
|
+
// this variant is used to support breakout resizing for panel_c1 nodes at the document root
|
|
73
|
+
.variant('c1_root_only', {
|
|
74
|
+
stage0: true,
|
|
75
|
+
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
76
|
+
// panel_c1 allows all standard panel content plus table (wired via addContent
|
|
77
|
+
// in full-schema.adf.ts to avoid a circular module import).
|
|
78
|
+
content: [(0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, panelContent.concat([_extension.extension.use('with_marks')])))],
|
|
79
|
+
ignore: ['json-schema', 'validator-spec'],
|
|
80
|
+
preserveVariantNameInPm: true
|
|
65
81
|
});
|
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.rule = void 0;
|
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
|
8
|
+
var _breakout = require("../marks/breakout");
|
|
9
|
+
var _unsupportedMark = require("../marks/unsupportedMark");
|
|
10
|
+
var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
|
|
8
11
|
var rule = exports.rule = (0, _adfSchemaGenerator.adfNode)('rule').define({
|
|
9
12
|
attrs: {
|
|
10
13
|
localId: {
|
|
@@ -13,4 +16,9 @@ var rule = exports.rule = (0, _adfSchemaGenerator.adfNode)('rule').define({
|
|
|
13
16
|
optional: true
|
|
14
17
|
}
|
|
15
18
|
}
|
|
19
|
+
})
|
|
20
|
+
// this variant is used to support breakout resizing for rule nodes at the document root
|
|
21
|
+
.variant('root_only', {
|
|
22
|
+
stage0: true,
|
|
23
|
+
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute]
|
|
16
24
|
});
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getSchemaBasedOnStage = exports.defaultSchemaConfig = exports.defaultSchema = void 0;
|
|
8
8
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
9
9
|
var _nodes = require("./nodes");
|
|
10
|
+
var _rule = require("./nodes/rule");
|
|
11
|
+
var _panel = require("./nodes/panel");
|
|
10
12
|
var _createSchema = require("./create-schema");
|
|
11
13
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
12
14
|
var defaultSchemaConfig = {
|
|
@@ -34,7 +36,9 @@ function () {
|
|
|
34
36
|
table: _nodes.tableWithNestedTable,
|
|
35
37
|
tableRow: _nodes.tableRowWithNestedTable,
|
|
36
38
|
tableCell: _nodes.tableCellWithNestedTableStage0,
|
|
37
|
-
tableHeader: _nodes.tableHeaderWithNestedTableStage0
|
|
39
|
+
tableHeader: _nodes.tableHeaderWithNestedTableStage0,
|
|
40
|
+
panel: (0, _panel.extendedPanelRootOnlyStage0)(true),
|
|
41
|
+
rule: _rule.ruleRootOnlyStage0
|
|
38
42
|
};
|
|
39
43
|
}
|
|
40
44
|
return (0, _createSchema.createSchema)(defaultSchemaConfig);
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -357,12 +357,24 @@ Object.defineProperty(exports, "extendedPanelC1", {
|
|
|
357
357
|
return _nodes.extendedPanelC1;
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
|
+
Object.defineProperty(exports, "extendedPanelC1RootOnlyStage0", {
|
|
361
|
+
enumerable: true,
|
|
362
|
+
get: function get() {
|
|
363
|
+
return _nodes.extendedPanelC1RootOnlyStage0;
|
|
364
|
+
}
|
|
365
|
+
});
|
|
360
366
|
Object.defineProperty(exports, "extendedPanelC1WithLocalId", {
|
|
361
367
|
enumerable: true,
|
|
362
368
|
get: function get() {
|
|
363
369
|
return _nodes.extendedPanelC1WithLocalId;
|
|
364
370
|
}
|
|
365
371
|
});
|
|
372
|
+
Object.defineProperty(exports, "extendedPanelRootOnlyStage0", {
|
|
373
|
+
enumerable: true,
|
|
374
|
+
get: function get() {
|
|
375
|
+
return _nodes.extendedPanelRootOnlyStage0;
|
|
376
|
+
}
|
|
377
|
+
});
|
|
366
378
|
Object.defineProperty(exports, "extendedPanelWithLocalId", {
|
|
367
379
|
enumerable: true,
|
|
368
380
|
get: function get() {
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.backgroundColorPaletteNew = exports.backgroundColorPalette = exports.backgroundColor = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
10
11
|
var _markTypes = require("../../next-schema/generated/markTypes");
|
|
11
12
|
var _colors = require("../../utils/colors");
|
|
12
13
|
var _editorPalette = require("../../utils/editor-palette");
|
|
@@ -67,6 +68,12 @@ colorArrayPaletteNew.forEach(function (_ref3) {
|
|
|
67
68
|
label = _ref4[1];
|
|
68
69
|
return backgroundColorPaletteNew.set(color.toLowerCase(), label);
|
|
69
70
|
});
|
|
71
|
+
var isSupportedBackgroundColor = function isSupportedBackgroundColor(hexColor) {
|
|
72
|
+
if (backgroundColorPalette.has(hexColor)) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
return (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor);
|
|
76
|
+
};
|
|
70
77
|
var backgroundColor = exports.backgroundColor = (0, _markTypes.backgroundColor)({
|
|
71
78
|
parseDOM: [{
|
|
72
79
|
style: 'background-color',
|
|
@@ -79,7 +86,7 @@ var backgroundColor = exports.backgroundColor = (0, _markTypes.backgroundColor)(
|
|
|
79
86
|
hexColor = value.toLowerCase();
|
|
80
87
|
}
|
|
81
88
|
// else handle other colour formats
|
|
82
|
-
return hexColor &&
|
|
89
|
+
return hexColor && isSupportedBackgroundColor(hexColor) ? {
|
|
83
90
|
color: hexColor
|
|
84
91
|
} : false;
|
|
85
92
|
}
|
|
@@ -97,7 +104,7 @@ var backgroundColor = exports.backgroundColor = (0, _markTypes.backgroundColor)(
|
|
|
97
104
|
return false;
|
|
98
105
|
}
|
|
99
106
|
var hexColor = maybeElement.dataset.backgroundCustomColor;
|
|
100
|
-
return hexColor &&
|
|
107
|
+
return hexColor && isSupportedBackgroundColor(hexColor) ? {
|
|
101
108
|
color: hexColor
|
|
102
109
|
} : false;
|
|
103
110
|
}
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.textColor = exports.setGlobalTheme = exports.getGlobalTheme = exports.colorPaletteNew = exports.colorPaletteExtended = exports.colorPalette = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
10
11
|
var _markTypes = require("../../next-schema/generated/markTypes");
|
|
11
12
|
var _editorPalette = require("../../utils/editor-palette");
|
|
12
13
|
var _colors = require("../../utils/colors");
|
|
@@ -73,7 +74,7 @@ var colorArrayPaletteNew = [
|
|
|
73
74
|
[_colors.L800, 'Dark lime'], [_colors.Y800, 'Dark yellow'], [_colors.O800, 'Dark orange'], [_colors.R500, 'Dark red'],
|
|
74
75
|
// Dragon's blood
|
|
75
76
|
[_colors.M800, 'Dark magenta'], [_colors.P500, 'Dark purple'],
|
|
76
|
-
// Prince
|
|
77
|
+
// Prince
|
|
77
78
|
// row 2
|
|
78
79
|
[_colors.N80, 'Light gray'],
|
|
79
80
|
// Spooky ghost
|
|
@@ -122,6 +123,12 @@ colorArrayPaletteNew.forEach(function (_ref3) {
|
|
|
122
123
|
label = _ref4[1];
|
|
123
124
|
return colorPaletteNew.set(color.toLowerCase(), label);
|
|
124
125
|
});
|
|
126
|
+
var isSupportedTextColor = function isSupportedTextColor(hexColor) {
|
|
127
|
+
if (colorPalette.has(hexColor)) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
return (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && colorPaletteNew.has(hexColor);
|
|
131
|
+
};
|
|
125
132
|
|
|
126
133
|
// these are for test only
|
|
127
134
|
var testGlobalTheme;
|
|
@@ -161,7 +168,7 @@ var textColor = exports.textColor = (0, _markTypes.textColor)({
|
|
|
161
168
|
hexColor = value.toLowerCase();
|
|
162
169
|
}
|
|
163
170
|
// else handle other colour formats
|
|
164
|
-
return hexColor &&
|
|
171
|
+
return hexColor && isSupportedTextColor(hexColor) ? {
|
|
165
172
|
color: hexColor
|
|
166
173
|
} : false;
|
|
167
174
|
}
|
|
@@ -181,7 +188,7 @@ var textColor = exports.textColor = (0, _markTypes.textColor)({
|
|
|
181
188
|
return false;
|
|
182
189
|
}
|
|
183
190
|
var hexColor = maybeElement.dataset.textCustomColor;
|
|
184
|
-
return hexColor &&
|
|
191
|
+
return hexColor && isSupportedTextColor(hexColor) ? {
|
|
185
192
|
color: hexColor
|
|
186
193
|
} : false;
|
|
187
194
|
}
|
|
@@ -220,12 +220,24 @@ Object.defineProperty(exports, "extendedPanelC1", {
|
|
|
220
220
|
return _panel.extendedPanelC1;
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
|
+
Object.defineProperty(exports, "extendedPanelC1RootOnlyStage0", {
|
|
224
|
+
enumerable: true,
|
|
225
|
+
get: function get() {
|
|
226
|
+
return _panel.extendedPanelC1RootOnlyStage0;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
223
229
|
Object.defineProperty(exports, "extendedPanelC1WithLocalId", {
|
|
224
230
|
enumerable: true,
|
|
225
231
|
get: function get() {
|
|
226
232
|
return _panel.extendedPanelC1WithLocalId;
|
|
227
233
|
}
|
|
228
234
|
});
|
|
235
|
+
Object.defineProperty(exports, "extendedPanelRootOnlyStage0", {
|
|
236
|
+
enumerable: true,
|
|
237
|
+
get: function get() {
|
|
238
|
+
return _panel.extendedPanelRootOnlyStage0;
|
|
239
|
+
}
|
|
240
|
+
});
|
|
229
241
|
Object.defineProperty(exports, "extendedPanelWithLocalId", {
|
|
230
242
|
enumerable: true,
|
|
231
243
|
get: function get() {
|
|
@@ -496,6 +508,12 @@ Object.defineProperty(exports, "rule", {
|
|
|
496
508
|
return _rule.rule;
|
|
497
509
|
}
|
|
498
510
|
});
|
|
511
|
+
Object.defineProperty(exports, "ruleRootOnlyStage0", {
|
|
512
|
+
enumerable: true,
|
|
513
|
+
get: function get() {
|
|
514
|
+
return _rule.ruleRootOnlyStage0;
|
|
515
|
+
}
|
|
516
|
+
});
|
|
499
517
|
Object.defineProperty(exports, "ruleWithLocalId", {
|
|
500
518
|
enumerable: true,
|
|
501
519
|
get: function get() {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.extendedPanelWithLocalId = exports.extendedPanelC1WithLocalId = exports.extendedPanelC1 = exports.extendedPanel = exports.PanelType = void 0;
|
|
7
|
+
exports.extendedPanelWithLocalId = exports.extendedPanelRootOnlyStage0 = exports.extendedPanelC1WithLocalId = exports.extendedPanelC1RootOnlyStage0 = exports.extendedPanelC1 = exports.extendedPanel = exports.PanelType = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
|
10
10
|
var _uuid = require("../../utils/uuid");
|
|
@@ -107,4 +107,20 @@ var extendedPanelC1 = exports.extendedPanelC1 = function extendedPanelC1(allowCu
|
|
|
107
107
|
};
|
|
108
108
|
var extendedPanelC1WithLocalId = exports.extendedPanelC1WithLocalId = function extendedPanelC1WithLocalId(allowCustomPanel) {
|
|
109
109
|
return (0, _nodeTypes.panelC1)(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @name extended_panel_root_only
|
|
114
|
+
*/
|
|
115
|
+
var extendedPanelRootOnlyStage0 = exports.extendedPanelRootOnlyStage0 = function extendedPanelRootOnlyStage0(allowCustomPanel) {
|
|
116
|
+
var panelNodeSpec = extendedPanelWithLocalId(allowCustomPanel);
|
|
117
|
+
return _objectSpread(_objectSpread({}, panelNodeSpec), {}, {
|
|
118
|
+
marks: "breakout ".concat(panelNodeSpec.marks)
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
var extendedPanelC1RootOnlyStage0 = exports.extendedPanelC1RootOnlyStage0 = function extendedPanelC1RootOnlyStage0(allowCustomPanel) {
|
|
122
|
+
var panelNodeSpec = extendedPanelC1WithLocalId(allowCustomPanel);
|
|
123
|
+
return _objectSpread(_objectSpread({}, panelNodeSpec), {}, {
|
|
124
|
+
marks: "breakout ".concat(panelNodeSpec.marks)
|
|
125
|
+
});
|
|
110
126
|
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.ruleWithLocalId = exports.rule = void 0;
|
|
7
|
+
exports.ruleWithLocalId = exports.ruleRootOnlyStage0 = exports.rule = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
|
8
10
|
var _uuid = require("../../utils/uuid");
|
|
11
|
+
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; }
|
|
12
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
9
13
|
/**
|
|
10
14
|
* @name rule_node
|
|
11
15
|
*/
|
|
@@ -34,4 +38,7 @@ var ruleWithLocalId = exports.ruleWithLocalId = (0, _nodeTypes.rule)({
|
|
|
34
38
|
'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
|
|
35
39
|
}];
|
|
36
40
|
}
|
|
41
|
+
});
|
|
42
|
+
var ruleRootOnlyStage0 = exports.ruleRootOnlyStage0 = _objectSpread(_objectSpread({}, ruleWithLocalId), {}, {
|
|
43
|
+
marks: 'breakout unsupportedMark unsupportedNodeAttribute'
|
|
37
44
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.underline = exports.text_with_no_marks = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.syncBlock = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_font_size = exports.paragraph_with_alignment = exports.paragraph = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.fontSize = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_root_only = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedSyncBlock = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockTaskItem = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
|
|
6
|
+
exports.underline = exports.text_with_no_marks = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.syncBlock = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule_root_only = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_font_size = exports.paragraph_with_alignment = exports.paragraph = exports.panel_root_only = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.fontSize = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_root_only = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedSyncBlock = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockTaskItem = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
|
|
7
7
|
var alignment = exports.alignment = {
|
|
8
8
|
props: {
|
|
9
9
|
attrs: {
|
|
@@ -519,7 +519,7 @@ var doc = exports.doc = {
|
|
|
519
519
|
props: {
|
|
520
520
|
content: {
|
|
521
521
|
allowUnsupportedBlock: true,
|
|
522
|
-
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']],
|
|
522
|
+
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']],
|
|
523
523
|
type: 'array'
|
|
524
524
|
},
|
|
525
525
|
type: {
|
|
@@ -1526,6 +1526,15 @@ var panel = exports.panel = {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
1528
|
};
|
|
1529
|
+
var panel_root_only = exports.panel_root_only = ['panel', {
|
|
1530
|
+
props: {
|
|
1531
|
+
marks: {
|
|
1532
|
+
items: ['breakout'],
|
|
1533
|
+
optional: true,
|
|
1534
|
+
type: 'array'
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
}];
|
|
1529
1538
|
var paragraph = exports.paragraph = {
|
|
1530
1539
|
props: {
|
|
1531
1540
|
attrs: {
|
|
@@ -1627,6 +1636,15 @@ var rule = exports.rule = {
|
|
|
1627
1636
|
}
|
|
1628
1637
|
}
|
|
1629
1638
|
};
|
|
1639
|
+
var rule_root_only = exports.rule_root_only = ['rule', {
|
|
1640
|
+
props: {
|
|
1641
|
+
marks: {
|
|
1642
|
+
items: ['breakout'],
|
|
1643
|
+
optional: true,
|
|
1644
|
+
type: 'array'
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
}];
|
|
1630
1648
|
var status = exports.status = {
|
|
1631
1649
|
props: {
|
|
1632
1650
|
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
|
const 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 const decisionList = createPMNodeSpecFactory({
|
|
|
298
298
|
defining: true
|
|
299
299
|
});
|
|
300
300
|
export const 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 const embedCard = createPMNodeSpecFactory({
|
|
@@ -1036,6 +1036,31 @@ export const panelC1 = createPMNodeSpecFactory({
|
|
|
1036
1036
|
},
|
|
1037
1037
|
selectable: true
|
|
1038
1038
|
});
|
|
1039
|
+
export const 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 const 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 const rule = createPMNodeSpecFactory({
|
|
|
1104
1129
|
}
|
|
1105
1130
|
}
|
|
1106
1131
|
});
|
|
1132
|
+
export const ruleRootOnlyStage0 = createPMNodeSpecFactory({
|
|
1133
|
+
attrs: {
|
|
1134
|
+
localId: {
|
|
1135
|
+
default: null
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1107
1139
|
export const status = createPMNodeSpecFactory({
|
|
1108
1140
|
group: 'inline',
|
|
1109
1141
|
inline: true,
|