@atlaskit/adf-schema 55.0.2 → 55.2.0
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 +23 -0
- package/dist/cjs/entry-points/background-color.js +6 -0
- package/dist/cjs/entry-points/schema-background-color.js +6 -0
- package/dist/cjs/entry-points/schema-text-color.js +6 -0
- package/dist/cjs/entry-points/text-color.js +6 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +1 -1
- package/dist/cjs/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/cjs/next-schema/nodes/panel.js +2 -1
- package/dist/cjs/schema/index.js +12 -0
- package/dist/cjs/schema/marks/background-color.js +28 -3
- package/dist/cjs/schema/marks/index.js +12 -0
- package/dist/cjs/schema/marks/text-color.js +52 -1
- package/dist/cjs/schema/nodes/panel.js +3 -0
- package/dist/cjs/schema/sanitizeNodes.js +5 -1
- package/dist/cjs/utils/colors.js +10 -1
- package/dist/cjs/utils/editor-palette.js +28 -2
- package/dist/es2019/entry-points/background-color.js +1 -1
- package/dist/es2019/entry-points/schema-background-color.js +1 -1
- package/dist/es2019/entry-points/schema-text-color.js +1 -1
- package/dist/es2019/entry-points/text-color.js +1 -1
- package/dist/es2019/index.js +2 -2
- package/dist/es2019/next-schema/generated/nodeTypes.js +1 -1
- package/dist/es2019/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/es2019/next-schema/nodes/panel.js +2 -1
- package/dist/es2019/schema/index.js +2 -2
- package/dist/es2019/schema/marks/background-color.js +22 -2
- package/dist/es2019/schema/marks/index.js +2 -2
- package/dist/es2019/schema/marks/text-color.js +47 -1
- package/dist/es2019/schema/nodes/panel.js +4 -0
- package/dist/es2019/schema/sanitizeNodes.js +3 -1
- package/dist/es2019/utils/colors.js +9 -0
- package/dist/es2019/utils/editor-palette.js +28 -2
- package/dist/esm/entry-points/background-color.js +1 -1
- package/dist/esm/entry-points/schema-background-color.js +1 -1
- package/dist/esm/entry-points/schema-text-color.js +1 -1
- package/dist/esm/entry-points/text-color.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/next-schema/generated/nodeTypes.js +1 -1
- package/dist/esm/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/esm/next-schema/nodes/panel.js +2 -1
- package/dist/esm/schema/index.js +2 -2
- package/dist/esm/schema/marks/background-color.js +27 -2
- package/dist/esm/schema/marks/index.js +2 -2
- package/dist/esm/schema/marks/text-color.js +52 -1
- package/dist/esm/schema/nodes/panel.js +4 -0
- package/dist/esm/schema/sanitizeNodes.js +5 -1
- package/dist/esm/utils/colors.js +9 -0
- package/dist/esm/utils/editor-palette.js +28 -2
- package/dist/types/entry-points/background-color.d.ts +1 -1
- package/dist/types/entry-points/schema-background-color.d.ts +1 -1
- package/dist/types/entry-points/schema-text-color.d.ts +1 -1
- package/dist/types/entry-points/text-color.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +1 -1
- package/dist/types/schema/index.d.ts +2 -2
- package/dist/types/schema/marks/background-color.d.ts +2 -1
- package/dist/types/schema/marks/index.d.ts +2 -2
- package/dist/types/schema/marks/text-color.d.ts +2 -1
- package/dist/types/schema/nodes/bodied-sync-block.d.ts +2 -2
- package/dist/types/schema/nodes/panel.d.ts +15 -0
- package/dist/types/utils/colors.d.ts +9 -0
- package/dist/types/utils/editor-palette.d.ts +26 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 55.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1498129c7eef2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1498129c7eef2) -
|
|
8
|
+
[EDITOR-7591] adds updated text color and highlight color palettes behind the
|
|
9
|
+
`platform_editor_lovability_text_bg_color` experiment
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 55.1.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`100d833307949`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/100d833307949) -
|
|
20
|
+
Allow panel_c1 inside bodied sync blocks
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 55.0.2
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -15,4 +15,10 @@ Object.defineProperty(exports, "backgroundColorPalette", {
|
|
|
15
15
|
return _backgroundColor.backgroundColorPalette;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "backgroundColorPaletteNew", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _backgroundColor.backgroundColorPaletteNew;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
var _backgroundColor = require("../schema/marks/background-color");
|
|
@@ -15,4 +15,10 @@ Object.defineProperty(exports, "backgroundColorPalette", {
|
|
|
15
15
|
return _backgroundColor.backgroundColorPalette;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "backgroundColorPaletteNew", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _backgroundColor.backgroundColorPaletteNew;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
var _backgroundColor = require("../schema/marks/background-color");
|
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "colorPaletteExtended", {
|
|
|
15
15
|
return _textColor.colorPaletteExtended;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "colorPaletteNew", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _textColor.colorPaletteNew;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "textColor", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function get() {
|
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "colorPaletteExtended", {
|
|
|
15
15
|
return _textColor.colorPaletteExtended;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "colorPaletteNew", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _textColor.colorPaletteNew;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "textColor", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function get() {
|
package/dist/cjs/index.js
CHANGED
|
@@ -333,6 +333,12 @@ Object.defineProperty(exports, "backgroundColorPalette", {
|
|
|
333
333
|
return _schema.backgroundColorPalette;
|
|
334
334
|
}
|
|
335
335
|
});
|
|
336
|
+
Object.defineProperty(exports, "backgroundColorPaletteNew", {
|
|
337
|
+
enumerable: true,
|
|
338
|
+
get: function get() {
|
|
339
|
+
return _schema.backgroundColorPaletteNew;
|
|
340
|
+
}
|
|
341
|
+
});
|
|
336
342
|
Object.defineProperty(exports, "blockCard", {
|
|
337
343
|
enumerable: true,
|
|
338
344
|
get: function get() {
|
|
@@ -459,6 +465,12 @@ Object.defineProperty(exports, "colorPaletteExtended", {
|
|
|
459
465
|
return _schema.colorPaletteExtended;
|
|
460
466
|
}
|
|
461
467
|
});
|
|
468
|
+
Object.defineProperty(exports, "colorPaletteNew", {
|
|
469
|
+
enumerable: true,
|
|
470
|
+
get: function get() {
|
|
471
|
+
return _schema.colorPaletteNew;
|
|
472
|
+
}
|
|
473
|
+
});
|
|
462
474
|
Object.defineProperty(exports, "confluenceInlineComment", {
|
|
463
475
|
enumerable: true,
|
|
464
476
|
get: function get() {
|
|
@@ -130,7 +130,7 @@ var bodiedExtensionWithMarks = exports.bodiedExtensionWithMarks = (0, _createPMS
|
|
|
130
130
|
isolating: true
|
|
131
131
|
});
|
|
132
132
|
var bodiedSyncBlock = exports.bodiedSyncBlock = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
133
|
-
content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | rule | table | taskList | unsupportedBlock)+',
|
|
133
|
+
content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | panel_c1 | rule | table | taskList | unsupportedBlock)+',
|
|
134
134
|
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation breakout link fragment',
|
|
135
135
|
attrs: {
|
|
136
136
|
resourceId: {
|
|
@@ -40,7 +40,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = (0, _adfSchemaGenerator.adfNode)
|
|
|
40
40
|
default: ''
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _blockCard.blockCard, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _list.bulletList, _codeBlock.codeBlock, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _decisionList.decisionList, _embedCard.embedCard, _expand.expand, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _list.orderedList, _panel.panel, _rule.rule, _tableNodes.table,
|
|
43
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _blockCard.blockCard, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _list.bulletList, _codeBlock.codeBlock, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _decisionList.decisionList, _embedCard.embedCard, _expand.expand, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _list.orderedList, _panel.panel, _panel.panel.use('c1'), _rule.rule, _tableNodes.table,
|
|
44
44
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
45
45
|
_tableNodes.table.use('with_nested_table'), _task.taskList, _unsupportedBlock.unsupportedBlock))]
|
|
46
46
|
});
|
|
@@ -60,5 +60,6 @@ var panel = exports.panel = (0, _adfSchemaGenerator.adfNode)('panel').define({
|
|
|
60
60
|
// panel_c1 allows all standard panel content plus table (wired via addContent
|
|
61
61
|
// in full-schema.adf.ts to avoid a circular module import).
|
|
62
62
|
content: [(0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, panelContent.concat([_extension.extension.use('with_marks')])))],
|
|
63
|
-
ignore: ['json-schema', 'validator-spec']
|
|
63
|
+
ignore: ['json-schema', 'validator-spec'],
|
|
64
|
+
preserveVariantNameInPm: true
|
|
64
65
|
});
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "backgroundColorPalette", {
|
|
|
51
51
|
return _marks.backgroundColorPalette;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "backgroundColorPaletteNew", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _marks.backgroundColorPaletteNew;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
54
60
|
Object.defineProperty(exports, "blockCard", {
|
|
55
61
|
enumerable: true,
|
|
56
62
|
get: function get() {
|
|
@@ -177,6 +183,12 @@ Object.defineProperty(exports, "colorPaletteExtended", {
|
|
|
177
183
|
return _marks.colorPaletteExtended;
|
|
178
184
|
}
|
|
179
185
|
});
|
|
186
|
+
Object.defineProperty(exports, "colorPaletteNew", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function get() {
|
|
189
|
+
return _marks.colorPaletteNew;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
180
192
|
Object.defineProperty(exports, "confluenceInlineComment", {
|
|
181
193
|
enumerable: true,
|
|
182
194
|
get: function get() {
|
|
@@ -4,14 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.backgroundColorPalette = exports.backgroundColor = void 0;
|
|
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
10
|
var _markTypes = require("../../next-schema/generated/markTypes");
|
|
11
|
-
var _editorPalette = require("../../utils/editor-palette");
|
|
12
11
|
var _colors = require("../../utils/colors");
|
|
13
|
-
var
|
|
12
|
+
var _editorPalette = require("../../utils/editor-palette");
|
|
14
13
|
var _lchColorInversion = require("../../utils/lch-color-inversion");
|
|
14
|
+
var _textColor = require("./text-color");
|
|
15
15
|
/**
|
|
16
16
|
* @name backgroundColor_mark
|
|
17
17
|
*/
|
|
@@ -30,6 +30,24 @@ var colorArrayPalette = [[_colors.Neutral300, 'Gray'],
|
|
|
30
30
|
// token: color.background.accent.lime.subtler
|
|
31
31
|
[_colors.T200, 'Teal'] // token: color.background.accent.teal.subtler
|
|
32
32
|
];
|
|
33
|
+
var colorArrayPaletteNew = [[_colors.Neutral300, 'Gray'],
|
|
34
|
+
// token: color.background.accent.gray.subtler
|
|
35
|
+
[_colors.B75, 'Blue'],
|
|
36
|
+
// token: color.background.accent.blue.subtler
|
|
37
|
+
[_colors.T200, 'Teal'],
|
|
38
|
+
// token: color.background.accent.teal.subtler
|
|
39
|
+
[_colors.G75, 'Green'],
|
|
40
|
+
// token: color.background.accent.green.subtler
|
|
41
|
+
[_colors.L200, 'Lime'],
|
|
42
|
+
// token: color.background.accent.lime.subtler
|
|
43
|
+
[_colors.Yellow200, 'Yellow'],
|
|
44
|
+
// token: color.background.accent.yellow.subtler
|
|
45
|
+
[_colors.O200, 'Orange'],
|
|
46
|
+
// token: color.background.accent.orange.subtler
|
|
47
|
+
[_colors.M200, 'Magenta'],
|
|
48
|
+
// token: color.background.accent.magenta.subtler
|
|
49
|
+
[_colors.P200, 'Purple'] // token: color.background.accent.purple.subtler
|
|
50
|
+
];
|
|
33
51
|
|
|
34
52
|
// @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
|
|
35
53
|
var backgroundColorPalette = exports.backgroundColorPalette = new Map();
|
|
@@ -42,6 +60,13 @@ colorArrayPalette.forEach(function (_ref) {
|
|
|
42
60
|
|
|
43
61
|
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
44
62
|
var RGB_PREFIX_BG_COLOR_REGEX = /^rgb/i;
|
|
63
|
+
var backgroundColorPaletteNew = exports.backgroundColorPaletteNew = new Map();
|
|
64
|
+
colorArrayPaletteNew.forEach(function (_ref3) {
|
|
65
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
|
66
|
+
color = _ref4[0],
|
|
67
|
+
label = _ref4[1];
|
|
68
|
+
return backgroundColorPaletteNew.set(color.toLowerCase(), label);
|
|
69
|
+
});
|
|
45
70
|
var backgroundColor = exports.backgroundColor = (0, _markTypes.backgroundColor)({
|
|
46
71
|
parseDOM: [{
|
|
47
72
|
style: 'background-color',
|
|
@@ -45,6 +45,12 @@ Object.defineProperty(exports, "backgroundColorPalette", {
|
|
|
45
45
|
return _backgroundColor.backgroundColorPalette;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "backgroundColorPaletteNew", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _backgroundColor.backgroundColorPaletteNew;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
48
54
|
Object.defineProperty(exports, "border", {
|
|
49
55
|
enumerable: true,
|
|
50
56
|
get: function get() {
|
|
@@ -87,6 +93,12 @@ Object.defineProperty(exports, "colorPaletteExtended", {
|
|
|
87
93
|
return _textColor.colorPaletteExtended;
|
|
88
94
|
}
|
|
89
95
|
});
|
|
96
|
+
Object.defineProperty(exports, "colorPaletteNew", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function get() {
|
|
99
|
+
return _textColor.colorPaletteNew;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
90
102
|
Object.defineProperty(exports, "confluenceInlineComment", {
|
|
91
103
|
enumerable: true,
|
|
92
104
|
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.textColor = exports.setGlobalTheme = exports.getGlobalTheme = exports.colorPaletteExtended = exports.colorPalette = void 0;
|
|
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
10
|
var _markTypes = require("../../next-schema/generated/markTypes");
|
|
@@ -60,8 +60,53 @@ var colorArrayPalette = [
|
|
|
60
60
|
[_colors.P50, 'Light purple'] // Lavender secret
|
|
61
61
|
];
|
|
62
62
|
|
|
63
|
+
// experiment: platform_editor_lovability_text_bg_color
|
|
64
|
+
var colorArrayPaletteNew = [
|
|
65
|
+
// default row - first color is added programatically
|
|
66
|
+
// [N800, 'Squid ink'], // default dark gray
|
|
67
|
+
[_colors.B500, 'Dark blue'],
|
|
68
|
+
// Chore coat
|
|
69
|
+
[_colors.T500, 'Dark teal'],
|
|
70
|
+
// Shabby chic
|
|
71
|
+
[_colors.G500, 'Dark green'],
|
|
72
|
+
// Keen green
|
|
73
|
+
[_colors.L800, 'Dark lime'], [_colors.Y800, 'Dark yellow'], [_colors.O800, 'Dark orange'], [_colors.R500, 'Dark red'],
|
|
74
|
+
// Dragon's blood
|
|
75
|
+
[_colors.M800, 'Dark magenta'], [_colors.P500, 'Dark purple'],
|
|
76
|
+
// Prince
|
|
77
|
+
// row 2
|
|
78
|
+
[_colors.N80, 'Light gray'],
|
|
79
|
+
// Spooky ghost
|
|
80
|
+
[_colors.B100, 'Blue'],
|
|
81
|
+
// Arvo breeze
|
|
82
|
+
[_colors.T300, 'Teal'],
|
|
83
|
+
// Tamarama
|
|
84
|
+
[_colors.G300, 'Green'],
|
|
85
|
+
// Fine pine
|
|
86
|
+
[_colors.L600, 'Lime'], [_colors.Y600, 'Yellow'],
|
|
87
|
+
// Pub mix
|
|
88
|
+
[_colors.O600, 'Orange'], [_colors.R300, 'Red'],
|
|
89
|
+
// Poppy surprise
|
|
90
|
+
[_colors.M600, 'Magenta'], [_colors.P300, 'Purple'],
|
|
91
|
+
// Da' juice
|
|
92
|
+
// row 3
|
|
93
|
+
[_colors.N0, 'White'], [_colors.B75, 'Light blue'],
|
|
94
|
+
// Schwag
|
|
95
|
+
[_colors.T75, 'Light teal'],
|
|
96
|
+
// Arctic chill
|
|
97
|
+
[_colors.G75, 'Light green'],
|
|
98
|
+
// Mintie
|
|
99
|
+
[_colors.L200, 'Light lime'], [_colors.Y75, 'Light yellow'],
|
|
100
|
+
// Dandelion whisper
|
|
101
|
+
[_colors.Orange200, 'Light orange'], [_colors.R75, 'Light red'],
|
|
102
|
+
// Bondi sunburn
|
|
103
|
+
[_colors.M200, 'Light magenta'], [_colors.P50, 'Light purple'] // Lavender secret
|
|
104
|
+
];
|
|
105
|
+
|
|
63
106
|
// @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
|
|
64
107
|
var colorPalette = exports.colorPalette = new Map();
|
|
108
|
+
var colorPaletteNew = exports.colorPaletteNew = new Map();
|
|
109
|
+
|
|
65
110
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
66
111
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
67
112
|
var colorPaletteExtended = exports.colorPaletteExtended = colorPalette;
|
|
@@ -71,6 +116,12 @@ colorArrayPalette.forEach(function (_ref) {
|
|
|
71
116
|
label = _ref2[1];
|
|
72
117
|
return colorPalette.set(color.toLowerCase(), label);
|
|
73
118
|
});
|
|
119
|
+
colorArrayPaletteNew.forEach(function (_ref3) {
|
|
120
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
|
121
|
+
color = _ref4[0],
|
|
122
|
+
label = _ref4[1];
|
|
123
|
+
return colorPaletteNew.set(color.toLowerCase(), label);
|
|
124
|
+
});
|
|
74
125
|
|
|
75
126
|
// these are for test only
|
|
76
127
|
var testGlobalTheme;
|
|
@@ -23,6 +23,9 @@ var PanelType = exports.PanelType = /*#__PURE__*/function (PanelType) {
|
|
|
23
23
|
/**
|
|
24
24
|
* @name panel_node
|
|
25
25
|
*/
|
|
26
|
+
/**
|
|
27
|
+
* @name panel_c1_node
|
|
28
|
+
*/
|
|
26
29
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
30
|
var getDomAttrs = function getDomAttrs(nodeAttrs) {
|
|
28
31
|
var attrs = {
|
|
@@ -29,8 +29,12 @@ function sanitizeNodeSpecContent(nodes, rawContent) {
|
|
|
29
29
|
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
30
30
|
var content = rawContent.replace(/(?:[\0-\/:-@\[-\^`\{-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, ' ');
|
|
31
31
|
var contentKeys = content.split(' ');
|
|
32
|
-
var unsupportedContentKeys = contentKeys.filter(function (contentKey) {
|
|
32
|
+
var unsupportedContentKeys = Array.from(new Set(contentKeys.filter(function (contentKey) {
|
|
33
33
|
return !isContentSupported(nodes, contentKey);
|
|
34
|
+
}))
|
|
35
|
+
// Remove longer variant names first so base names like `panel` don't partially strip `panel_c1`.
|
|
36
|
+
).sort(function (a, b) {
|
|
37
|
+
return b.length - a.length;
|
|
34
38
|
});
|
|
35
39
|
return unsupportedContentKeys.reduce(function (newContent, nodeName) {
|
|
36
40
|
return sanitizedContent(newContent, nodeName);
|
package/dist/cjs/utils/colors.js
CHANGED
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.Yellow200 = exports.Y75 = exports.Y500 = exports.Y50 = exports.Y400 = exports.Y200 = exports.T75 = exports.T500 = exports.T50 = exports.T300 = exports.T200 = exports.T100 = exports.R75 = exports.R500 = exports.R50 = exports.R400 = exports.R300 = exports.R100 = exports.P75 = exports.P500 = exports.P50 = exports.P400 = exports.P300 = exports.P200 = exports.P100 = exports.O200 = exports.Neutral300 = exports.N90 = exports.N800 = exports.N80 = exports.N600 = exports.N60 = exports.N500 = exports.N50 = exports.N40 = exports.N300A = exports.N300 = exports.N30 = exports.N200 = exports.N20 = exports.N1000 = exports.N0 = exports.M200 = exports.L200 = exports.G75 = exports.G500 = exports.G50 = exports.G400 = exports.G300 = exports.G200 = exports.B75 = exports.B500 = exports.B50 = exports.B400 = exports.B100 = void 0;
|
|
8
|
+
exports.Yellow200 = exports.Y800 = exports.Y75 = exports.Y600 = exports.Y500 = exports.Y50 = exports.Y400 = exports.Y200 = exports.T75 = exports.T500 = exports.T50 = exports.T300 = exports.T200 = exports.T100 = exports.R75 = exports.R500 = exports.R50 = exports.R400 = exports.R300 = exports.R100 = exports.P75 = exports.P500 = exports.P50 = exports.P400 = exports.P300 = exports.P200 = exports.P100 = exports.Orange200 = exports.O800 = exports.O600 = exports.O200 = exports.Neutral300 = exports.N90 = exports.N800 = exports.N80 = exports.N600 = exports.N60 = exports.N500 = exports.N50 = exports.N40 = exports.N300A = exports.N300 = exports.N30 = exports.N200 = exports.N20 = exports.N1000 = exports.N0 = exports.M800 = exports.M600 = exports.M200 = exports.L800 = exports.L600 = exports.L200 = exports.G75 = exports.G500 = exports.G50 = exports.G400 = exports.G300 = exports.G200 = exports.B75 = exports.B500 = exports.B50 = exports.B400 = exports.B100 = void 0;
|
|
9
9
|
exports.hexToRgb = hexToRgb;
|
|
10
10
|
exports.hexToRgba = hexToRgba;
|
|
11
11
|
exports.isHex = isHex;
|
|
@@ -37,6 +37,8 @@ var Y200 = exports.Y200 = '#FFC400';
|
|
|
37
37
|
var Yellow200 = exports.Yellow200 = '#F8E6A0';
|
|
38
38
|
var Y400 = exports.Y400 = '#FF991F';
|
|
39
39
|
var Y500 = exports.Y500 = '#FF8B00';
|
|
40
|
+
var Y600 = exports.Y600 = '#B38600';
|
|
41
|
+
var Y800 = exports.Y800 = '#7F5F01';
|
|
40
42
|
var G50 = exports.G50 = '#E3FCEF';
|
|
41
43
|
var G75 = exports.G75 = '#ABF5D1';
|
|
42
44
|
var G200 = exports.G200 = '#57D9A3';
|
|
@@ -49,6 +51,8 @@ var B100 = exports.B100 = '#4C9AFF';
|
|
|
49
51
|
var B400 = exports.B400 = '#0052CC';
|
|
50
52
|
var B500 = exports.B500 = '#0747A6';
|
|
51
53
|
var L200 = exports.L200 = '#D3F1A7';
|
|
54
|
+
var L600 = exports.L600 = '#6A9A23';
|
|
55
|
+
var L800 = exports.L800 = '#4C6B1F';
|
|
52
56
|
var N0 = exports.N0 = '#FFFFFF';
|
|
53
57
|
var N20 = exports.N20 = '#F4F5F7';
|
|
54
58
|
var N30 = exports.N30 = '#EBECF0';
|
|
@@ -66,7 +70,12 @@ var N600 = exports.N600 = '#758195';
|
|
|
66
70
|
var N800 = exports.N800 = '#172B4D';
|
|
67
71
|
var N1000 = exports.N1000 = '#172B4D';
|
|
68
72
|
var M200 = exports.M200 = '#FDD0EC';
|
|
73
|
+
var M600 = exports.M600 = '#CD519D';
|
|
74
|
+
var M800 = exports.M800 = '#943D73';
|
|
69
75
|
var O200 = exports.O200 = '#FEDEC8';
|
|
76
|
+
var Orange200 = exports.Orange200 = '#FCE4A6';
|
|
77
|
+
var O600 = exports.O600 = '#E06C00';
|
|
78
|
+
var O800 = exports.O800 = '#9E4C00';
|
|
70
79
|
var P50 = exports.P50 = '#EAE6FF';
|
|
71
80
|
var P75 = exports.P75 = '#C0B6F2';
|
|
72
81
|
var P100 = exports.P100 = '#998DD9';
|
|
@@ -106,7 +106,29 @@ var editorTextPalette = exports.editorTextPalette = {
|
|
|
106
106
|
/** whiteGray - medium */
|
|
107
107
|
'#97A0AF': 'var(--ds-icon-accent-gray, #97A0AF)',
|
|
108
108
|
/** whiteGray - strong */
|
|
109
|
-
'#172B4D': 'var(--ds-text, #172B4D)'
|
|
109
|
+
'#172B4D': 'var(--ds-text, #172B4D)',
|
|
110
|
+
/** lime - light */
|
|
111
|
+
'#D3F1A7': 'var(--ds-background-accent-lime-subtler, #D3F1A7)',
|
|
112
|
+
/** lime - medium */
|
|
113
|
+
'#6A9A23': 'var(--ds-icon-accent-lime, #6A9A23)',
|
|
114
|
+
/** lime - strong */
|
|
115
|
+
'#4C6B1F': 'var(--ds-text-accent-lime, #4C6B1F)',
|
|
116
|
+
/** orange - light */
|
|
117
|
+
'#FCE4A6': 'var(--ds-background-accent-orange-subtler, #FCE4A6)',
|
|
118
|
+
/** orange - medium */
|
|
119
|
+
'#E06C00': 'var(--ds-icon-accent-orange, #E06C00)',
|
|
120
|
+
/** orange - strong */
|
|
121
|
+
'#9E4C00': 'var(--ds-text-accent-orange, #9E4C00)',
|
|
122
|
+
/** magenta - light */
|
|
123
|
+
'#FDD0EC': 'var(--ds-background-accent-magenta-subtler, #FDD0EC)',
|
|
124
|
+
/** magenta - medium */
|
|
125
|
+
'#CD519D': 'var(--ds-icon-accent-magenta, #CD519D)',
|
|
126
|
+
/** magenta - strong */
|
|
127
|
+
'#943D73': 'var(--ds-text-accent-magenta, #943D73)',
|
|
128
|
+
/** yellow - medium */
|
|
129
|
+
'#B38600': 'var(--ds-icon-accent-yellow, #B38600)',
|
|
130
|
+
/** yellow - strong */
|
|
131
|
+
'#7F5F01': 'var(--ds-text-accent-yellow, #7F5F01)'
|
|
110
132
|
};
|
|
111
133
|
|
|
112
134
|
/**
|
|
@@ -146,7 +168,11 @@ var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
|
|
146
168
|
/** Magenta - light */
|
|
147
169
|
'#FDD0EC': 'var(--ds-background-accent-magenta-subtler, #FDD0EC)',
|
|
148
170
|
/** Purple - light */
|
|
149
|
-
'#DFD8FD': 'var(--ds-background-accent-purple-subtler, #DFD8FD)'
|
|
171
|
+
'#DFD8FD': 'var(--ds-background-accent-purple-subtler, #DFD8FD)',
|
|
172
|
+
/** Blue - light */
|
|
173
|
+
'#B3D4FF': 'var(--ds-background-accent-blue-subtler, #B3D4FF)',
|
|
174
|
+
/** Green - light */
|
|
175
|
+
'#ABF5D1': 'var(--ds-background-accent-green-subtler, #ABF5D1)'
|
|
150
176
|
};
|
|
151
177
|
/**
|
|
152
178
|
* Takes an ADF hex color and returns the rendered hex code for the associated background palette design token using getTokenValue.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { backgroundColor, backgroundColorPalette } from '../schema/marks/background-color';
|
|
2
|
+
export { backgroundColor, backgroundColorPalette, backgroundColorPaletteNew } from '../schema/marks/background-color';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { backgroundColor, backgroundColorPalette } from '../schema/marks/background-color';
|
|
2
|
+
export { backgroundColor, backgroundColorPalette, backgroundColorPaletteNew } from '../schema/marks/background-color';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { colorPalette, colorPaletteExtended, textColor } from '../schema/marks/text-color';
|
|
2
|
+
export { colorPalette, colorPaletteNew, colorPaletteExtended, textColor } from '../schema/marks/text-color';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { colorPalette, colorPaletteExtended, textColor } from '../schema/marks/text-color';
|
|
2
|
+
export { colorPalette, colorPaletteNew, colorPaletteExtended, textColor } from '../schema/marks/text-color';
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, codeBlockToJSON, colorPalette,
|
|
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, colorPaletteNew,
|
|
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
|
-
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';
|
|
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, backgroundColorPaletteNew, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
|
|
6
6
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
|
|
7
7
|
|
|
8
8
|
// ADF createPMSpecFactory
|
|
@@ -124,7 +124,7 @@ export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
124
124
|
isolating: true
|
|
125
125
|
});
|
|
126
126
|
export const bodiedSyncBlock = createPMNodeSpecFactory({
|
|
127
|
-
content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | rule | table | taskList | unsupportedBlock)+',
|
|
127
|
+
content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | panel_c1 | rule | table | taskList | unsupportedBlock)+',
|
|
128
128
|
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation breakout link fragment',
|
|
129
129
|
attrs: {
|
|
130
130
|
resourceId: {
|
|
@@ -34,7 +34,7 @@ export const bodiedSyncBlock = adfNode('bodiedSyncBlock').define({
|
|
|
34
34
|
default: ''
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, rule, table,
|
|
37
|
+
content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, panel.use('c1'), rule, table,
|
|
38
38
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
39
39
|
table.use('with_nested_table'), taskList, unsupportedBlock))]
|
|
40
40
|
});
|
|
@@ -54,5 +54,6 @@ export const panel = adfNode('panel').define({
|
|
|
54
54
|
// panel_c1 allows all standard panel content plus table (wired via addContent
|
|
55
55
|
// in full-schema.adf.ts to avoid a circular module import).
|
|
56
56
|
content: [$onePlus($or(...panelContent, extension.use('with_marks')))],
|
|
57
|
-
ignore: ['json-schema', 'validator-spec']
|
|
57
|
+
ignore: ['json-schema', 'validator-spec'],
|
|
58
|
+
preserveVariantNameInPm: true
|
|
58
59
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
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
|
-
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette,
|
|
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. */
|
|
6
|
-
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette } from './marks';
|
|
6
|
+
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette, backgroundColorPaletteNew } from './marks';
|
|
7
7
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
|
8
8
|
export { inlineNodes } from './inline-nodes';
|
|
9
9
|
export { createSchema } from './create-schema';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { backgroundColor as backgroundColorFactory } from '../../next-schema/generated/markTypes';
|
|
2
|
+
import { B75, G75, L200, M200, Neutral300, O200, P200, rgbToHex, T200, Yellow200 } from '../../utils/colors';
|
|
2
3
|
import { hexToEditorTextBackgroundPaletteColor } from '../../utils/editor-palette';
|
|
3
|
-
import { rgbToHex, L200, T200, P200, M200, Neutral300, O200, Yellow200 } from '../../utils/colors';
|
|
4
|
-
import { getGlobalTheme } from './text-color';
|
|
5
4
|
import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
|
|
5
|
+
import { getGlobalTheme } from './text-color';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @name backgroundColor_mark
|
|
@@ -22,6 +22,24 @@ const colorArrayPalette = [[Neutral300, 'Gray'],
|
|
|
22
22
|
// token: color.background.accent.lime.subtler
|
|
23
23
|
[T200, 'Teal'] // token: color.background.accent.teal.subtler
|
|
24
24
|
];
|
|
25
|
+
const colorArrayPaletteNew = [[Neutral300, 'Gray'],
|
|
26
|
+
// token: color.background.accent.gray.subtler
|
|
27
|
+
[B75, 'Blue'],
|
|
28
|
+
// token: color.background.accent.blue.subtler
|
|
29
|
+
[T200, 'Teal'],
|
|
30
|
+
// token: color.background.accent.teal.subtler
|
|
31
|
+
[G75, 'Green'],
|
|
32
|
+
// token: color.background.accent.green.subtler
|
|
33
|
+
[L200, 'Lime'],
|
|
34
|
+
// token: color.background.accent.lime.subtler
|
|
35
|
+
[Yellow200, 'Yellow'],
|
|
36
|
+
// token: color.background.accent.yellow.subtler
|
|
37
|
+
[O200, 'Orange'],
|
|
38
|
+
// token: color.background.accent.orange.subtler
|
|
39
|
+
[M200, 'Magenta'],
|
|
40
|
+
// token: color.background.accent.magenta.subtler
|
|
41
|
+
[P200, 'Purple'] // token: color.background.accent.purple.subtler
|
|
42
|
+
];
|
|
25
43
|
|
|
26
44
|
// @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
|
|
27
45
|
export const backgroundColorPalette = new Map();
|
|
@@ -29,6 +47,8 @@ colorArrayPalette.forEach(([color, label]) => backgroundColorPalette.set(color.t
|
|
|
29
47
|
|
|
30
48
|
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
31
49
|
const RGB_PREFIX_BG_COLOR_REGEX = /^rgb/iu;
|
|
50
|
+
export const backgroundColorPaletteNew = new Map();
|
|
51
|
+
colorArrayPaletteNew.forEach(([color, label]) => backgroundColorPaletteNew.set(color.toLowerCase(), label));
|
|
32
52
|
export const backgroundColor = backgroundColorFactory({
|
|
33
53
|
parseDOM: [{
|
|
34
54
|
style: 'background-color',
|
|
@@ -7,7 +7,7 @@ export { underline } from './underline';
|
|
|
7
7
|
export { link, toJSON as linkToJSON } from './link';
|
|
8
8
|
export { typeAheadQuery } from './type-ahead-query';
|
|
9
9
|
export { subsup } from './subsup';
|
|
10
|
-
export { textColor, colorPalette, colorPaletteExtended } from './text-color';
|
|
10
|
+
export { textColor, colorPalette, colorPaletteNew, colorPaletteExtended } from './text-color';
|
|
11
11
|
export { confluenceInlineComment } from './confluence-inline-comment';
|
|
12
12
|
export { breakout } from './breakout';
|
|
13
13
|
export { fontSize } from './font-size';
|
|
@@ -19,4 +19,4 @@ export { unsupportedNodeAttribute } from './unsupported-node-attributes';
|
|
|
19
19
|
export { dataConsumer, toJSON as dataConsumerToJSON } from './data-consumer';
|
|
20
20
|
export { fragment, toJSON as fragmentToJSON } from './fragment';
|
|
21
21
|
export { border, borderColorPalette } from './border';
|
|
22
|
-
export { backgroundColor, backgroundColorPalette } from './background-color';
|
|
22
|
+
export { backgroundColor, backgroundColorPalette, backgroundColorPaletteNew } from './background-color';
|