@atlaskit/adf-schema 56.5.5 → 56.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/entry-points/schema-tableNodes.js +6 -0
- package/dist/cjs/entry-points/tableNodes.js +12 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/schema/index.js +6 -0
- package/dist/cjs/schema/nodes/index.js +6 -0
- package/dist/cjs/schema/nodes/tableNodes.js +39 -2
- package/dist/cjs/utils/colors.js +14 -1
- package/dist/cjs/utils/editor-palette.js +114 -1
- package/dist/es2019/entry-points/schema-tableNodes.js +1 -1
- package/dist/es2019/entry-points/tableNodes.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/schema/nodes/tableNodes.js +36 -2
- package/dist/es2019/utils/colors.js +13 -0
- package/dist/es2019/utils/editor-palette.js +82 -1
- package/dist/esm/entry-points/schema-tableNodes.js +1 -1
- package/dist/esm/entry-points/tableNodes.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/schema/nodes/tableNodes.js +39 -2
- package/dist/esm/utils/colors.js +13 -0
- package/dist/esm/utils/editor-palette.js +114 -1
- package/dist/types/entry-points/schema-tableNodes.d.ts +1 -1
- package/dist/types/entry-points/tableNodes.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +1 -1
- package/dist/types/schema/nodes/tableNodes.d.ts +25 -0
- package/dist/types/utils/colors.d.ts +13 -0
- package/dist/types/utils/editor-palette.d.ts +80 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 56.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 56.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`b0682afb9fdf1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b0682afb9fdf1) -
|
|
14
|
+
Add lime, orange and magenta colours to the table cell background colour palette.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 56.5.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -39,6 +39,12 @@ Object.defineProperty(exports, "tableBackgroundColorPalette", {
|
|
|
39
39
|
return _tableNodes.tableBackgroundColorPalette;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "tableBackgroundColorPaletteNew", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _tableNodes.tableBackgroundColorPaletteNew;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
42
48
|
Object.defineProperty(exports, "tableCell", {
|
|
43
49
|
enumerable: true,
|
|
44
50
|
get: function get() {
|
|
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "tableBackgroundBorderColor", {
|
|
|
27
27
|
return _tableNodes.tableBackgroundBorderColor;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "tableBackgroundColorNameByHex", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _tableNodes.tableBackgroundColorNameByHex;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
Object.defineProperty(exports, "tableBackgroundColorNames", {
|
|
31
37
|
enumerable: true,
|
|
32
38
|
get: function get() {
|
|
@@ -39,6 +45,12 @@ Object.defineProperty(exports, "tableBackgroundColorPalette", {
|
|
|
39
45
|
return _tableNodes.tableBackgroundColorPalette;
|
|
40
46
|
}
|
|
41
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "tableBackgroundColorPaletteNew", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _tableNodes.tableBackgroundColorPaletteNew;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
42
54
|
Object.defineProperty(exports, "tableCell", {
|
|
43
55
|
enumerable: true,
|
|
44
56
|
get: function get() {
|
package/dist/cjs/index.js
CHANGED
|
@@ -1101,6 +1101,12 @@ Object.defineProperty(exports, "tableBackgroundColorPalette", {
|
|
|
1101
1101
|
return _schema.tableBackgroundColorPalette;
|
|
1102
1102
|
}
|
|
1103
1103
|
});
|
|
1104
|
+
Object.defineProperty(exports, "tableBackgroundColorPaletteNew", {
|
|
1105
|
+
enumerable: true,
|
|
1106
|
+
get: function get() {
|
|
1107
|
+
return _schema.tableBackgroundColorPaletteNew;
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1104
1110
|
Object.defineProperty(exports, "tableCell", {
|
|
1105
1111
|
enumerable: true,
|
|
1106
1112
|
get: function get() {
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -771,6 +771,12 @@ Object.defineProperty(exports, "tableBackgroundColorPalette", {
|
|
|
771
771
|
return _nodes.tableBackgroundColorPalette;
|
|
772
772
|
}
|
|
773
773
|
});
|
|
774
|
+
Object.defineProperty(exports, "tableBackgroundColorPaletteNew", {
|
|
775
|
+
enumerable: true,
|
|
776
|
+
get: function get() {
|
|
777
|
+
return _nodes.tableBackgroundColorPaletteNew;
|
|
778
|
+
}
|
|
779
|
+
});
|
|
774
780
|
Object.defineProperty(exports, "tableCell", {
|
|
775
781
|
enumerable: true,
|
|
776
782
|
get: function get() {
|
|
@@ -574,6 +574,12 @@ Object.defineProperty(exports, "tableBackgroundColorPalette", {
|
|
|
574
574
|
return _tableNodes.tableBackgroundColorPalette;
|
|
575
575
|
}
|
|
576
576
|
});
|
|
577
|
+
Object.defineProperty(exports, "tableBackgroundColorPaletteNew", {
|
|
578
|
+
enumerable: true,
|
|
579
|
+
get: function get() {
|
|
580
|
+
return _tableNodes.tableBackgroundColorPaletteNew;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
577
583
|
Object.defineProperty(exports, "tableCell", {
|
|
578
584
|
enumerable: true,
|
|
579
585
|
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.toJSONTableHeader = exports.toJSONTableCell = exports.tableWithNestedTable = exports.tableWithCustomWidth = exports.tableToJSON = exports.tableStage0 = exports.tableRowWithNestedTableWithLocalId = exports.tableRowWithNestedTable = exports.tableRowWithLocalId = exports.tableRow = exports.tablePrefixSelector = exports.tableHeaderWithNestedTableWithLocalId = exports.tableHeaderWithNestedTableStage0 = exports.tableHeaderWithNestedTable = exports.tableHeaderWithLocalId = exports.tableHeaderStage0 = exports.tableHeaderSelector = exports.tableHeader = exports.tableCellWithNestedTableWithLocalId = exports.tableCellWithNestedTableStage0 = exports.tableCellWithNestedTable = exports.tableCellWithLocalId = exports.tableCellStage0 = exports.tableCellSelector = exports.tableCellContentWrapperSelector = exports.tableCellContentDomSelector = exports.tableCell = exports.tableBackgroundColorPalette = exports.tableBackgroundColorNames = exports.tableBackgroundBorderColor = exports.table = exports.setGlobalTheme = exports.getCellDomAttrs = exports.getCellAttrs = void 0;
|
|
7
|
+
exports.toJSONTableHeader = exports.toJSONTableCell = exports.tableWithNestedTable = exports.tableWithCustomWidth = exports.tableToJSON = exports.tableStage0 = exports.tableRowWithNestedTableWithLocalId = exports.tableRowWithNestedTable = exports.tableRowWithLocalId = exports.tableRow = exports.tablePrefixSelector = exports.tableHeaderWithNestedTableWithLocalId = exports.tableHeaderWithNestedTableStage0 = exports.tableHeaderWithNestedTable = exports.tableHeaderWithLocalId = exports.tableHeaderStage0 = exports.tableHeaderSelector = exports.tableHeader = exports.tableCellWithNestedTableWithLocalId = exports.tableCellWithNestedTableStage0 = exports.tableCellWithNestedTable = exports.tableCellWithLocalId = exports.tableCellStage0 = exports.tableCellSelector = exports.tableCellContentWrapperSelector = exports.tableCellContentDomSelector = exports.tableCell = exports.tableBackgroundColorPaletteNew = exports.tableBackgroundColorPalette = exports.tableBackgroundColorNames = exports.tableBackgroundColorNameByHex = exports.tableBackgroundBorderColor = exports.table = exports.setGlobalTheme = exports.getCellDomAttrs = exports.getCellAttrs = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _editorPalette = require("../../utils/editor-palette");
|
|
@@ -182,7 +182,7 @@ var getCellDomAttrs = exports.getCellDomAttrs = function getCellDomAttrs(node) {
|
|
|
182
182
|
attrs['data-cell-background'] = color;
|
|
183
183
|
}
|
|
184
184
|
if (typeof color === 'string') {
|
|
185
|
-
attrs.colorname =
|
|
185
|
+
attrs.colorname = tableBackgroundColorNameByHex.get(color.toLowerCase());
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
}
|
|
@@ -200,14 +200,51 @@ var getCellDomAttrs = exports.getCellDomAttrs = function getCellDomAttrs(node) {
|
|
|
200
200
|
return attrs;
|
|
201
201
|
};
|
|
202
202
|
var tableBackgroundColorPalette = exports.tableBackgroundColorPalette = new Map();
|
|
203
|
+
/**
|
|
204
|
+
* Expanded 10-column (30-entry) palette. Compared with {@link tableBackgroundColorPalette} it adds
|
|
205
|
+
* lime, orange and magenta columns, and replaces the `Gray` / `Dark *` row with a bold row built on
|
|
206
|
+
* `subtler.hovered` design tokens.
|
|
207
|
+
*
|
|
208
|
+
* NOTE: it is *not* a superset of {@link tableBackgroundColorPalette} — the bold row uses different
|
|
209
|
+
* hex codes, so the earlier row's colours are absent here. Use this map only to build the colour
|
|
210
|
+
* picker. To resolve a colour a document may already contain, use
|
|
211
|
+
* {@link tableBackgroundColorNameByHex}, which spans both palettes.
|
|
212
|
+
*/
|
|
213
|
+
var tableBackgroundColorPaletteNew = exports.tableBackgroundColorPaletteNew = new Map();
|
|
203
214
|
var tableBackgroundBorderColor = exports.tableBackgroundBorderColor = (0, _colors.hexToRgba)(_colors.N800, 0.12) || _colors.N0;
|
|
215
|
+
/**
|
|
216
|
+
* Colour name -> hex, and its inverse {@link tableBackgroundColorNameByHex}, covering the colours of
|
|
217
|
+
* {@link tableBackgroundColorPalette} and {@link tableBackgroundColorPaletteNew} together.
|
|
218
|
+
*
|
|
219
|
+
* These drive the themed CSS variables and `td[colorname=...]` overrides in editor-core and
|
|
220
|
+
* renderer, so they must span both palettes: the hex is stored in ADF, which outlives whichever
|
|
221
|
+
* palette produced it, and is read back by the editor, the renderer and Confluence export. Resolving
|
|
222
|
+
* against only one palette would leave cells coloured from the other rendering untokenised, or with
|
|
223
|
+
* no background at all.
|
|
224
|
+
*/
|
|
204
225
|
var tableBackgroundColorNames = exports.tableBackgroundColorNames = new Map();
|
|
226
|
+
/**
|
|
227
|
+
* Hex -> colour name, the inverse of {@link tableBackgroundColorNames}. Also spans both palettes.
|
|
228
|
+
*/
|
|
229
|
+
var tableBackgroundColorNameByHex = exports.tableBackgroundColorNameByHex = new Map();
|
|
230
|
+
|
|
231
|
+
// Original 7-column palette — kept as the default export so external consumers
|
|
232
|
+
// are not broken. When cleaning up the platform_editor_lovability_text_bg_color experiment, check if this can be removed
|
|
205
233
|
[[_colors.N0, 'White'], [_colors.B50, 'Light blue'], [_colors.T50, 'Light teal'], [_colors.G50, 'Light green'], [_colors.Y50, 'Light yellow'], [_colors.R50, 'Light red'], [_colors.P50, 'Light purple'], [_colors.N20, 'Light gray'], [_colors.B75, 'Blue'], [_colors.T75, 'Teal'], [_colors.G75, 'Green'], [_colors.Y75, 'Yellow'], [_colors.R75, 'Red'], [_colors.P75, 'Purple'], [_colors.N60, 'Gray'], [_colors.B100, 'Dark blue'], [_colors.T100, 'Dark teal'], [_colors.G200, 'Dark green'], [_colors.Y200, 'Dark yellow'], [_colors.R100, 'Dark red'], [_colors.P100, 'Dark purple']].forEach(function (_ref) {
|
|
206
234
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
207
235
|
colorValue = _ref2[0],
|
|
208
236
|
colorName = _ref2[1];
|
|
209
237
|
tableBackgroundColorPalette.set(colorValue.toLowerCase(), colorName);
|
|
210
238
|
tableBackgroundColorNames.set(colorName.toLowerCase(), colorValue.toLowerCase());
|
|
239
|
+
tableBackgroundColorNameByHex.set(colorValue.toLowerCase(), colorName);
|
|
240
|
+
});
|
|
241
|
+
[[_colors.N0, 'White'], [_colors.B50, 'Light blue'], [_colors.T50, 'Light teal'], [_colors.G50, 'Light green'], [_colors.L50, 'Subtle lime'], [_colors.Y50, 'Light yellow'], [_colors.Orange50, 'Subtle orange'], [_colors.R50, 'Light red'], [_colors.M50, 'Subtle magenta'], [_colors.P50, 'Light purple'], [_colors.N20, 'Light gray'], [_colors.B75, 'Blue'], [_colors.T75, 'Teal'], [_colors.G75, 'Green'], [_colors.L200, 'Lime'], [_colors.Y75, 'Yellow'], [_colors.Orange200, 'Orange'], [_colors.R75, 'Red'], [_colors.M200, 'Magenta'], [_colors.P75, 'Purple'], [_colors.GrayBold, 'Bold gray'], [_colors.BlueBold, 'Bold blue'], [_colors.TealBold, 'Bold teal'], [_colors.GreenBold, 'Bold green'], [_colors.L400, 'Bold lime'], [_colors.YellowBold, 'Bold yellow'], [_colors.Orange400, 'Bold orange'], [_colors.RedBold, 'Bold red'], [_colors.M400, 'Bold magenta'], [_colors.PurpleBold, 'Bold purple']].forEach(function (_ref3) {
|
|
242
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
|
243
|
+
colorValue = _ref4[0],
|
|
244
|
+
colorName = _ref4[1];
|
|
245
|
+
tableBackgroundColorPaletteNew.set(colorValue.toLowerCase(), colorName);
|
|
246
|
+
tableBackgroundColorNames.set(colorName.toLowerCase(), colorValue.toLowerCase());
|
|
247
|
+
tableBackgroundColorNameByHex.set(colorValue.toLowerCase(), colorName);
|
|
211
248
|
});
|
|
212
249
|
|
|
213
250
|
/**
|
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.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.R200 = 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;
|
|
8
|
+
exports.YellowBold = exports.Yellow200 = exports.Y800 = exports.Y75 = exports.Y600 = exports.Y500 = exports.Y50 = exports.Y400 = exports.Y200 = exports.TealBold = exports.T75 = exports.T500 = exports.T50 = exports.T300 = exports.T200 = exports.T100 = exports.RedBold = exports.R75 = exports.R500 = exports.R50 = exports.R400 = exports.R300 = exports.R200 = exports.R100 = exports.PurpleBold = exports.P75 = exports.P500 = exports.P50 = exports.P400 = exports.P300 = exports.P200 = exports.P100 = exports.Orange50 = exports.Orange400 = 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.M50 = exports.M400 = exports.M200 = exports.L800 = exports.L600 = exports.L50 = exports.L400 = exports.L200 = exports.GreenBold = exports.GrayBold = exports.G75 = exports.G500 = exports.G50 = exports.G400 = exports.G300 = exports.G200 = exports.BlueBold = 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;
|
|
@@ -28,6 +28,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
28
28
|
var R50 = exports.R50 = '#FFEBE6';
|
|
29
29
|
var R75 = exports.R75 = '#FFBDAD';
|
|
30
30
|
var R100 = exports.R100 = '#FF8F73';
|
|
31
|
+
var RedBold = exports.RedBold = '#FFB8B2';
|
|
31
32
|
var R200 = exports.R200 = '#FFD5D2';
|
|
32
33
|
var R300 = exports.R300 = '#FF5630';
|
|
33
34
|
var R400 = exports.R400 = '#DE350B';
|
|
@@ -35,6 +36,7 @@ var R500 = exports.R500 = '#BF2600';
|
|
|
35
36
|
var Y50 = exports.Y50 = '#FFFAE6';
|
|
36
37
|
var Y75 = exports.Y75 = '#FFF0B3';
|
|
37
38
|
var Y200 = exports.Y200 = '#FFC400';
|
|
39
|
+
var YellowBold = exports.YellowBold = '#EFDD4E';
|
|
38
40
|
var Yellow200 = exports.Yellow200 = '#F8E6A0';
|
|
39
41
|
var Y400 = exports.Y400 = '#FF991F';
|
|
40
42
|
var Y500 = exports.Y500 = '#FF8B00';
|
|
@@ -43,15 +45,19 @@ var Y800 = exports.Y800 = '#7F5F01';
|
|
|
43
45
|
var G50 = exports.G50 = '#E3FCEF';
|
|
44
46
|
var G75 = exports.G75 = '#ABF5D1';
|
|
45
47
|
var G200 = exports.G200 = '#57D9A3';
|
|
48
|
+
var GreenBold = exports.GreenBold = '#97EDC9';
|
|
46
49
|
var G300 = exports.G300 = '#36B37E';
|
|
47
50
|
var G400 = exports.G400 = '#00875A';
|
|
48
51
|
var G500 = exports.G500 = '#006644';
|
|
49
52
|
var B50 = exports.B50 = '#DEEBFF';
|
|
50
53
|
var B75 = exports.B75 = '#B3D4FF';
|
|
51
54
|
var B100 = exports.B100 = '#4C9AFF';
|
|
55
|
+
var BlueBold = exports.BlueBold = '#ADCBFB';
|
|
52
56
|
var B400 = exports.B400 = '#0052CC';
|
|
53
57
|
var B500 = exports.B500 = '#0747A6';
|
|
58
|
+
var L50 = exports.L50 = '#EFFFD6';
|
|
54
59
|
var L200 = exports.L200 = '#D3F1A7';
|
|
60
|
+
var L400 = exports.L400 = '#BDE97C';
|
|
55
61
|
var L600 = exports.L600 = '#6A9A23';
|
|
56
62
|
var L800 = exports.L800 = '#4C6B1F';
|
|
57
63
|
var N0 = exports.N0 = '#FFFFFF';
|
|
@@ -60,6 +66,7 @@ var N30 = exports.N30 = '#EBECF0';
|
|
|
60
66
|
var N40 = exports.N40 = '#DFE1E6';
|
|
61
67
|
var N50 = exports.N50 = '#C1C7D0';
|
|
62
68
|
var N60 = exports.N60 = '#B3BAC5';
|
|
69
|
+
var GrayBold = exports.GrayBold = '#B7B9BE';
|
|
63
70
|
var N80 = exports.N80 = '#97A0AF';
|
|
64
71
|
var N90 = exports.N90 = '#8993A4';
|
|
65
72
|
var N200 = exports.N200 = '#6B778C';
|
|
@@ -70,16 +77,21 @@ var N500 = exports.N500 = '#42526E';
|
|
|
70
77
|
var N600 = exports.N600 = '#758195';
|
|
71
78
|
var N800 = exports.N800 = '#172B4D';
|
|
72
79
|
var N1000 = exports.N1000 = '#172B4D';
|
|
80
|
+
var M50 = exports.M50 = '#FFECF8';
|
|
73
81
|
var M200 = exports.M200 = '#FDD0EC';
|
|
82
|
+
var M400 = exports.M400 = '#FCB6E1';
|
|
74
83
|
var M600 = exports.M600 = '#CD519D';
|
|
75
84
|
var M800 = exports.M800 = '#943D73';
|
|
76
85
|
var O200 = exports.O200 = '#FEDEC8';
|
|
86
|
+
var Orange50 = exports.Orange50 = '#FFF5DB';
|
|
77
87
|
var Orange200 = exports.Orange200 = '#FCE4A6';
|
|
88
|
+
var Orange400 = exports.Orange400 = '#FBD779';
|
|
78
89
|
var O600 = exports.O600 = '#E06C00';
|
|
79
90
|
var O800 = exports.O800 = '#9E4C00';
|
|
80
91
|
var P50 = exports.P50 = '#EAE6FF';
|
|
81
92
|
var P75 = exports.P75 = '#C0B6F2';
|
|
82
93
|
var P100 = exports.P100 = '#998DD9';
|
|
94
|
+
var PurpleBold = exports.PurpleBold = '#E3BDFA';
|
|
83
95
|
var P200 = exports.P200 = '#DFD8FD';
|
|
84
96
|
var P300 = exports.P300 = '#6554C0';
|
|
85
97
|
var P400 = exports.P400 = '#5243AA';
|
|
@@ -87,6 +99,7 @@ var P500 = exports.P500 = '#403294';
|
|
|
87
99
|
var T50 = exports.T50 = '#E6FCFF';
|
|
88
100
|
var T75 = exports.T75 = '#B3F5FF';
|
|
89
101
|
var T100 = exports.T100 = '#79E2F2';
|
|
102
|
+
var TealBold = exports.TealBold = '#B1E4F7';
|
|
90
103
|
var T200 = exports.T200 = '#C6EDFB';
|
|
91
104
|
var T300 = exports.T300 = '#00B8D9';
|
|
92
105
|
var T500 = exports.T500 = '#008DA6';
|
|
@@ -197,7 +197,6 @@ var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
|
|
197
197
|
function hexToEditorBackgroundPaletteRawValue(hexColor) {
|
|
198
198
|
// Ts ignore was used to allow use of conditional return type
|
|
199
199
|
// (preferencing better type on consumption over safety in implementation)
|
|
200
|
-
// @ts-ignore
|
|
201
200
|
var tokenData = hexColor ? editorBackgroundPalette[hexColor.toUpperCase()] : undefined;
|
|
202
201
|
// @ts-expect-error
|
|
203
202
|
return tokenData ? tokenData.getValue(hexColor) : undefined;
|
|
@@ -354,5 +353,119 @@ var editorBackgroundPalette = exports.editorBackgroundPalette = {
|
|
|
354
353
|
return '#B3BAC5';
|
|
355
354
|
},
|
|
356
355
|
token: 'var(--ds-background-accent-gray-subtle, #B3BAC5)'
|
|
356
|
+
},
|
|
357
|
+
/** lime - light */
|
|
358
|
+
'#EFFFD6': {
|
|
359
|
+
getValue: function getValue() {
|
|
360
|
+
return '#EFFFD6';
|
|
361
|
+
},
|
|
362
|
+
token: 'var(--ds-background-accent-lime-subtlest, #EFFFD6)'
|
|
363
|
+
},
|
|
364
|
+
/** lime - medium */
|
|
365
|
+
'#D3F1A7': {
|
|
366
|
+
getValue: function getValue() {
|
|
367
|
+
return '#D3F1A7';
|
|
368
|
+
},
|
|
369
|
+
token: 'var(--ds-background-accent-lime-subtler, #D3F1A7)'
|
|
370
|
+
},
|
|
371
|
+
/** lime - bold */
|
|
372
|
+
'#BDE97C': {
|
|
373
|
+
getValue: function getValue() {
|
|
374
|
+
return '#BDE97C';
|
|
375
|
+
},
|
|
376
|
+
token: 'var(--ds-background-accent-lime-subtler-hovered, #BDE97C)'
|
|
377
|
+
},
|
|
378
|
+
/** orange - light */
|
|
379
|
+
'#FFF5DB': {
|
|
380
|
+
getValue: function getValue() {
|
|
381
|
+
return '#FFF5DB';
|
|
382
|
+
},
|
|
383
|
+
token: 'var(--ds-background-accent-orange-subtlest, #FFF5DB)'
|
|
384
|
+
},
|
|
385
|
+
/** orange - medium */
|
|
386
|
+
'#FCE4A6': {
|
|
387
|
+
getValue: function getValue() {
|
|
388
|
+
return '#FCE4A6';
|
|
389
|
+
},
|
|
390
|
+
token: 'var(--ds-background-accent-orange-subtler, #FCE4A6)'
|
|
391
|
+
},
|
|
392
|
+
/** orange - bold */
|
|
393
|
+
'#FBD779': {
|
|
394
|
+
getValue: function getValue() {
|
|
395
|
+
return '#FBD779';
|
|
396
|
+
},
|
|
397
|
+
token: 'var(--ds-background-accent-orange-subtler-hovered, #FBD779)'
|
|
398
|
+
},
|
|
399
|
+
/** magenta - light */
|
|
400
|
+
'#FFECF8': {
|
|
401
|
+
getValue: function getValue() {
|
|
402
|
+
return '#FFECF8';
|
|
403
|
+
},
|
|
404
|
+
token: 'var(--ds-background-accent-magenta-subtlest, #FFECF8)'
|
|
405
|
+
},
|
|
406
|
+
/** magenta - medium */
|
|
407
|
+
'#FDD0EC': {
|
|
408
|
+
getValue: function getValue() {
|
|
409
|
+
return '#FDD0EC';
|
|
410
|
+
},
|
|
411
|
+
token: 'var(--ds-background-accent-magenta-subtler, #FDD0EC)'
|
|
412
|
+
},
|
|
413
|
+
/** magenta - bold */
|
|
414
|
+
'#FCB6E1': {
|
|
415
|
+
getValue: function getValue() {
|
|
416
|
+
return '#FCB6E1';
|
|
417
|
+
},
|
|
418
|
+
token: 'var(--ds-background-accent-magenta-subtler-hovered, #FCB6E1)'
|
|
419
|
+
},
|
|
420
|
+
// Bold row mappings using subtler.hovered tokens. These use new hex codes
|
|
421
|
+
// so pre-existing documents keep their old subtle-token mappings above.
|
|
422
|
+
/** blue - bold */
|
|
423
|
+
'#ADCBFB': {
|
|
424
|
+
getValue: function getValue() {
|
|
425
|
+
return '#ADCBFB';
|
|
426
|
+
},
|
|
427
|
+
token: 'var(--ds-background-accent-blue-subtler-hovered, #ADCBFB)'
|
|
428
|
+
},
|
|
429
|
+
/** teal - bold */
|
|
430
|
+
'#B1E4F7': {
|
|
431
|
+
getValue: function getValue() {
|
|
432
|
+
return '#B1E4F7';
|
|
433
|
+
},
|
|
434
|
+
token: 'var(--ds-background-accent-teal-subtler-hovered, #B1E4F7)'
|
|
435
|
+
},
|
|
436
|
+
/** green - bold */
|
|
437
|
+
'#97EDC9': {
|
|
438
|
+
getValue: function getValue() {
|
|
439
|
+
return '#97EDC9';
|
|
440
|
+
},
|
|
441
|
+
token: 'var(--ds-background-accent-green-subtler-hovered, #97EDC9)'
|
|
442
|
+
},
|
|
443
|
+
/** yellow - bold */
|
|
444
|
+
'#EFDD4E': {
|
|
445
|
+
getValue: function getValue() {
|
|
446
|
+
return '#EFDD4E';
|
|
447
|
+
},
|
|
448
|
+
token: 'var(--ds-background-accent-yellow-subtler-hovered, #EFDD4E)'
|
|
449
|
+
},
|
|
450
|
+
/** red - bold */
|
|
451
|
+
'#FFB8B2': {
|
|
452
|
+
getValue: function getValue() {
|
|
453
|
+
return '#FFB8B2';
|
|
454
|
+
},
|
|
455
|
+
token: 'var(--ds-background-accent-red-subtler-hovered, #FFB8B2)'
|
|
456
|
+
},
|
|
457
|
+
/** purple - bold */
|
|
458
|
+
'#E3BDFA': {
|
|
459
|
+
getValue: function getValue() {
|
|
460
|
+
return '#E3BDFA';
|
|
461
|
+
},
|
|
462
|
+
token: 'var(--ds-background-accent-purple-subtler-hovered, #E3BDFA)'
|
|
463
|
+
},
|
|
464
|
+
/** gray - bold */
|
|
465
|
+
'#B7B9BE': {
|
|
466
|
+
getValue: function getValue() {
|
|
467
|
+
return '#B7B9BE';
|
|
468
|
+
},
|
|
469
|
+
token: 'var(--ds-background-accent-gray-subtler-hovered, #B7B9BE)'
|
|
357
470
|
}
|
|
358
471
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { getCellAttrs, getCellDomAttrs, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, toJSONTableCell, toJSONTableHeader, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from '../schema/nodes/tableNodes';
|
|
2
|
+
export { getCellAttrs, getCellDomAttrs, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableBackgroundColorPaletteNew, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, toJSONTableCell, toJSONTableHeader, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from '../schema/nodes/tableNodes';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { getCellAttrs, getCellDomAttrs, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, toJSONTableCell, toJSONTableHeader, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from '../schema/nodes/tableNodes';
|
|
2
|
+
export { getCellAttrs, getCellDomAttrs, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNameByHex, tableBackgroundColorNames, tableBackgroundColorPalette, tableBackgroundColorPaletteNew, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, toJSONTableCell, toJSONTableHeader, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from '../schema/nodes/tableNodes';
|
package/dist/es2019/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, fontSize, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
|
|
3
3
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
5
|
-
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, tableBackgroundColorPaletteNew, 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';
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bodiedExtensionRootOnlyStage0, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, extensionRootOnlyStage0, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, multiBodiedExtensionRootOnlyStage0, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
2
|
+
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bodiedExtensionRootOnlyStage0, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, extensionRootOnlyStage0, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableBackgroundColorPaletteNew, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, multiBodiedExtensionRootOnlyStage0, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette, colorPaletteNew,
|
|
4
4
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
5
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
@@ -24,7 +24,7 @@ export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as m
|
|
|
24
24
|
export { mediaGroup } from './media-group';
|
|
25
25
|
export { mediaInline } from './media-inline';
|
|
26
26
|
export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, toJSON as mediaSingleToJSON } from './media-single';
|
|
27
|
-
export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
|
27
|
+
export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundColorPaletteNew, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
|
28
28
|
export { decisionList, decisionListSelector } from './decision-list';
|
|
29
29
|
export { decisionItem } from './decision-item';
|
|
30
30
|
export { taskList, taskListSelector } from './task-list';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hexToEditorBackgroundPaletteRawValue } from '../../utils/editor-palette';
|
|
2
|
-
import { B100, B50, B75, G200, G50, G75, hexToRgba, isHex, isRgb, N0, N20, N60, N800, P100, P50, P75, R100, R50, R75, rgbToHex, T100, T50, T75, Y200, Y50, Y75 } from '../../utils/colors';
|
|
2
|
+
import { B100, B50, B75, BlueBold, G200, G50, G75, GrayBold, GreenBold, hexToRgba, isHex, isRgb, L200, L400, L50, M200, M400, M50, N0, N20, N60, N800, Orange200, Orange400, Orange50, P100, P50, P75, PurpleBold, R100, R50, R75, RedBold, rgbToHex, T100, T50, T75, TealBold, Y200, Y50, Y75, YellowBold } from '../../utils/colors';
|
|
3
3
|
import { uuid } from '../../utils/uuid';
|
|
4
4
|
import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
|
|
5
5
|
import { table as tableFactory, tableWithNestedTable as tableWithNestedTableFactory, tableRow as tableRowFactory, tableRowWithNestedTable as tableRowWithNestedTableFactory, tableHeader as tableHeaderFactory, tableHeaderWithNestedTable as tableHeaderWithNestedTableFactory, tableCell as tableCellFactory, tableCellWithNestedTable as tableCellWithNestedTableFactory } from '../../next-schema/generated/nodeTypes';
|
|
@@ -174,7 +174,7 @@ export const getCellDomAttrs = node => {
|
|
|
174
174
|
attrs['data-cell-background'] = color;
|
|
175
175
|
}
|
|
176
176
|
if (typeof color === 'string') {
|
|
177
|
-
attrs.colorname =
|
|
177
|
+
attrs.colorname = tableBackgroundColorNameByHex.get(color.toLowerCase());
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
@@ -192,11 +192,45 @@ export const getCellDomAttrs = node => {
|
|
|
192
192
|
return attrs;
|
|
193
193
|
};
|
|
194
194
|
export const tableBackgroundColorPalette = new Map();
|
|
195
|
+
/**
|
|
196
|
+
* Expanded 10-column (30-entry) palette. Compared with {@link tableBackgroundColorPalette} it adds
|
|
197
|
+
* lime, orange and magenta columns, and replaces the `Gray` / `Dark *` row with a bold row built on
|
|
198
|
+
* `subtler.hovered` design tokens.
|
|
199
|
+
*
|
|
200
|
+
* NOTE: it is *not* a superset of {@link tableBackgroundColorPalette} — the bold row uses different
|
|
201
|
+
* hex codes, so the earlier row's colours are absent here. Use this map only to build the colour
|
|
202
|
+
* picker. To resolve a colour a document may already contain, use
|
|
203
|
+
* {@link tableBackgroundColorNameByHex}, which spans both palettes.
|
|
204
|
+
*/
|
|
205
|
+
export const tableBackgroundColorPaletteNew = new Map();
|
|
195
206
|
export const tableBackgroundBorderColor = hexToRgba(N800, 0.12) || N0;
|
|
207
|
+
/**
|
|
208
|
+
* Colour name -> hex, and its inverse {@link tableBackgroundColorNameByHex}, covering the colours of
|
|
209
|
+
* {@link tableBackgroundColorPalette} and {@link tableBackgroundColorPaletteNew} together.
|
|
210
|
+
*
|
|
211
|
+
* These drive the themed CSS variables and `td[colorname=...]` overrides in editor-core and
|
|
212
|
+
* renderer, so they must span both palettes: the hex is stored in ADF, which outlives whichever
|
|
213
|
+
* palette produced it, and is read back by the editor, the renderer and Confluence export. Resolving
|
|
214
|
+
* against only one palette would leave cells coloured from the other rendering untokenised, or with
|
|
215
|
+
* no background at all.
|
|
216
|
+
*/
|
|
196
217
|
export const tableBackgroundColorNames = new Map();
|
|
218
|
+
/**
|
|
219
|
+
* Hex -> colour name, the inverse of {@link tableBackgroundColorNames}. Also spans both palettes.
|
|
220
|
+
*/
|
|
221
|
+
export const tableBackgroundColorNameByHex = new Map();
|
|
222
|
+
|
|
223
|
+
// Original 7-column palette — kept as the default export so external consumers
|
|
224
|
+
// are not broken. When cleaning up the platform_editor_lovability_text_bg_color experiment, check if this can be removed
|
|
197
225
|
[[N0, 'White'], [B50, 'Light blue'], [T50, 'Light teal'], [G50, 'Light green'], [Y50, 'Light yellow'], [R50, 'Light red'], [P50, 'Light purple'], [N20, 'Light gray'], [B75, 'Blue'], [T75, 'Teal'], [G75, 'Green'], [Y75, 'Yellow'], [R75, 'Red'], [P75, 'Purple'], [N60, 'Gray'], [B100, 'Dark blue'], [T100, 'Dark teal'], [G200, 'Dark green'], [Y200, 'Dark yellow'], [R100, 'Dark red'], [P100, 'Dark purple']].forEach(([colorValue, colorName]) => {
|
|
198
226
|
tableBackgroundColorPalette.set(colorValue.toLowerCase(), colorName);
|
|
199
227
|
tableBackgroundColorNames.set(colorName.toLowerCase(), colorValue.toLowerCase());
|
|
228
|
+
tableBackgroundColorNameByHex.set(colorValue.toLowerCase(), colorName);
|
|
229
|
+
});
|
|
230
|
+
[[N0, 'White'], [B50, 'Light blue'], [T50, 'Light teal'], [G50, 'Light green'], [L50, 'Subtle lime'], [Y50, 'Light yellow'], [Orange50, 'Subtle orange'], [R50, 'Light red'], [M50, 'Subtle magenta'], [P50, 'Light purple'], [N20, 'Light gray'], [B75, 'Blue'], [T75, 'Teal'], [G75, 'Green'], [L200, 'Lime'], [Y75, 'Yellow'], [Orange200, 'Orange'], [R75, 'Red'], [M200, 'Magenta'], [P75, 'Purple'], [GrayBold, 'Bold gray'], [BlueBold, 'Bold blue'], [TealBold, 'Bold teal'], [GreenBold, 'Bold green'], [L400, 'Bold lime'], [YellowBold, 'Bold yellow'], [Orange400, 'Bold orange'], [RedBold, 'Bold red'], [M400, 'Bold magenta'], [PurpleBold, 'Bold purple']].forEach(([colorValue, colorName]) => {
|
|
231
|
+
tableBackgroundColorPaletteNew.set(colorValue.toLowerCase(), colorName);
|
|
232
|
+
tableBackgroundColorNames.set(colorName.toLowerCase(), colorValue.toLowerCase());
|
|
233
|
+
tableBackgroundColorNameByHex.set(colorValue.toLowerCase(), colorName);
|
|
200
234
|
});
|
|
201
235
|
|
|
202
236
|
/**
|
|
@@ -12,6 +12,7 @@ import * as namedColors from 'css-color-names';
|
|
|
12
12
|
export const R50 = '#FFEBE6';
|
|
13
13
|
export const R75 = '#FFBDAD';
|
|
14
14
|
export const R100 = '#FF8F73';
|
|
15
|
+
export const RedBold = '#FFB8B2';
|
|
15
16
|
export const R200 = '#FFD5D2';
|
|
16
17
|
export const R300 = '#FF5630';
|
|
17
18
|
export const R400 = '#DE350B';
|
|
@@ -19,6 +20,7 @@ export const R500 = '#BF2600';
|
|
|
19
20
|
export const Y50 = '#FFFAE6';
|
|
20
21
|
export const Y75 = '#FFF0B3';
|
|
21
22
|
export const Y200 = '#FFC400';
|
|
23
|
+
export const YellowBold = '#EFDD4E';
|
|
22
24
|
export const Yellow200 = '#F8E6A0';
|
|
23
25
|
export const Y400 = '#FF991F';
|
|
24
26
|
export const Y500 = '#FF8B00';
|
|
@@ -27,15 +29,19 @@ export const Y800 = '#7F5F01';
|
|
|
27
29
|
export const G50 = '#E3FCEF';
|
|
28
30
|
export const G75 = '#ABF5D1';
|
|
29
31
|
export const G200 = '#57D9A3';
|
|
32
|
+
export const GreenBold = '#97EDC9';
|
|
30
33
|
export const G300 = '#36B37E';
|
|
31
34
|
export const G400 = '#00875A';
|
|
32
35
|
export const G500 = '#006644';
|
|
33
36
|
export const B50 = '#DEEBFF';
|
|
34
37
|
export const B75 = '#B3D4FF';
|
|
35
38
|
export const B100 = '#4C9AFF';
|
|
39
|
+
export const BlueBold = '#ADCBFB';
|
|
36
40
|
export const B400 = '#0052CC';
|
|
37
41
|
export const B500 = '#0747A6';
|
|
42
|
+
export const L50 = '#EFFFD6';
|
|
38
43
|
export const L200 = '#D3F1A7';
|
|
44
|
+
export const L400 = '#BDE97C';
|
|
39
45
|
export const L600 = '#6A9A23';
|
|
40
46
|
export const L800 = '#4C6B1F';
|
|
41
47
|
export const N0 = '#FFFFFF';
|
|
@@ -44,6 +50,7 @@ export const N30 = '#EBECF0';
|
|
|
44
50
|
export const N40 = '#DFE1E6';
|
|
45
51
|
export const N50 = '#C1C7D0';
|
|
46
52
|
export const N60 = '#B3BAC5';
|
|
53
|
+
export const GrayBold = '#B7B9BE';
|
|
47
54
|
export const N80 = '#97A0AF';
|
|
48
55
|
export const N90 = '#8993A4';
|
|
49
56
|
export const N200 = '#6B778C';
|
|
@@ -54,16 +61,21 @@ export const N500 = '#42526E';
|
|
|
54
61
|
export const N600 = '#758195';
|
|
55
62
|
export const N800 = '#172B4D';
|
|
56
63
|
export const N1000 = '#172B4D';
|
|
64
|
+
export const M50 = '#FFECF8';
|
|
57
65
|
export const M200 = '#FDD0EC';
|
|
66
|
+
export const M400 = '#FCB6E1';
|
|
58
67
|
export const M600 = '#CD519D';
|
|
59
68
|
export const M800 = '#943D73';
|
|
60
69
|
export const O200 = '#FEDEC8';
|
|
70
|
+
export const Orange50 = '#FFF5DB';
|
|
61
71
|
export const Orange200 = '#FCE4A6';
|
|
72
|
+
export const Orange400 = '#FBD779';
|
|
62
73
|
export const O600 = '#E06C00';
|
|
63
74
|
export const O800 = '#9E4C00';
|
|
64
75
|
export const P50 = '#EAE6FF';
|
|
65
76
|
export const P75 = '#C0B6F2';
|
|
66
77
|
export const P100 = '#998DD9';
|
|
78
|
+
export const PurpleBold = '#E3BDFA';
|
|
67
79
|
export const P200 = '#DFD8FD';
|
|
68
80
|
export const P300 = '#6554C0';
|
|
69
81
|
export const P400 = '#5243AA';
|
|
@@ -71,6 +83,7 @@ export const P500 = '#403294';
|
|
|
71
83
|
export const T50 = '#E6FCFF';
|
|
72
84
|
export const T75 = '#B3F5FF';
|
|
73
85
|
export const T100 = '#79E2F2';
|
|
86
|
+
export const TealBold = '#B1E4F7';
|
|
74
87
|
export const T200 = '#C6EDFB';
|
|
75
88
|
export const T300 = '#00B8D9';
|
|
76
89
|
export const T500 = '#008DA6';
|