@atlaskit/adf-schema 56.1.18 → 56.3.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 +22 -0
- package/dist/cjs/entry-points/schema-tableNodes.js +6 -0
- package/dist/cjs/entry-points/tableNodes.js +6 -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 +20 -2
- package/dist/cjs/utils/colors.js +14 -1
- package/dist/cjs/utils/editor-palette.js +121 -3
- 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 +17 -2
- package/dist/es2019/utils/colors.js +13 -0
- package/dist/es2019/utils/editor-palette.js +89 -3
- 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 +20 -2
- package/dist/esm/utils/colors.js +13 -0
- package/dist/esm/utils/editor-palette.js +121 -3
- 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 +6 -0
- package/dist/types/utils/colors.d.ts +13 -0
- package/dist/types/utils/editor-palette.d.ts +80 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 56.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3b0816741523c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b0816741523c) -
|
|
8
|
+
Add lime, orange, and magenta colors to table cell background color palette
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 56.2.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`51c33ef5349b6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51c33ef5349b6) -
|
|
19
|
+
Enable compatibility with React 19.2.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 56.1.18
|
|
4
26
|
|
|
5
27
|
### 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() {
|
|
@@ -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() {
|
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
|
@@ -753,6 +753,12 @@ Object.defineProperty(exports, "tableBackgroundColorPalette", {
|
|
|
753
753
|
return _nodes.tableBackgroundColorPalette;
|
|
754
754
|
}
|
|
755
755
|
});
|
|
756
|
+
Object.defineProperty(exports, "tableBackgroundColorPaletteNew", {
|
|
757
|
+
enumerable: true,
|
|
758
|
+
get: function get() {
|
|
759
|
+
return _nodes.tableBackgroundColorPaletteNew;
|
|
760
|
+
}
|
|
761
|
+
});
|
|
756
762
|
Object.defineProperty(exports, "tableCell", {
|
|
757
763
|
enumerable: true,
|
|
758
764
|
get: function get() {
|
|
@@ -556,6 +556,12 @@ Object.defineProperty(exports, "tableBackgroundColorPalette", {
|
|
|
556
556
|
return _tableNodes.tableBackgroundColorPalette;
|
|
557
557
|
}
|
|
558
558
|
});
|
|
559
|
+
Object.defineProperty(exports, "tableBackgroundColorPaletteNew", {
|
|
560
|
+
enumerable: true,
|
|
561
|
+
get: function get() {
|
|
562
|
+
return _tableNodes.tableBackgroundColorPaletteNew;
|
|
563
|
+
}
|
|
564
|
+
});
|
|
559
565
|
Object.defineProperty(exports, "tableCell", {
|
|
560
566
|
enumerable: true,
|
|
561
567
|
get: function get() {
|
|
@@ -4,10 +4,12 @@ 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.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");
|
|
11
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
13
|
var _colors = require("../../utils/colors");
|
|
12
14
|
var _uuid = require("../../utils/uuid");
|
|
13
15
|
var _lchColorInversion = require("../../utils/lch-color-inversion");
|
|
@@ -182,7 +184,8 @@ var getCellDomAttrs = exports.getCellDomAttrs = function getCellDomAttrs(node) {
|
|
|
182
184
|
attrs['data-cell-background'] = color;
|
|
183
185
|
}
|
|
184
186
|
if (typeof color === 'string') {
|
|
185
|
-
|
|
187
|
+
var palette = (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_2') ? tableBackgroundColorPaletteNew : tableBackgroundColorPalette;
|
|
188
|
+
attrs.colorname = palette.get(color.toLowerCase());
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
191
|
}
|
|
@@ -200,13 +203,28 @@ var getCellDomAttrs = exports.getCellDomAttrs = function getCellDomAttrs(node) {
|
|
|
200
203
|
return attrs;
|
|
201
204
|
};
|
|
202
205
|
var tableBackgroundColorPalette = exports.tableBackgroundColorPalette = new Map();
|
|
206
|
+
/**
|
|
207
|
+
* Expanded 10-column (30-entry) palette that adds lime, orange, and magenta columns
|
|
208
|
+
* and updates the bold row to use `subtler.hovered` design tokens.
|
|
209
|
+
* This is a superset of {@link tableBackgroundColorPalette}.
|
|
210
|
+
*/
|
|
211
|
+
var tableBackgroundColorPaletteNew = exports.tableBackgroundColorPaletteNew = new Map();
|
|
203
212
|
var tableBackgroundBorderColor = exports.tableBackgroundBorderColor = (0, _colors.hexToRgba)(_colors.N800, 0.12) || _colors.N0;
|
|
204
213
|
var tableBackgroundColorNames = exports.tableBackgroundColorNames = new Map();
|
|
214
|
+
|
|
215
|
+
// Original 7-column palette — kept as the default export so external consumers
|
|
216
|
+
// are not broken. When cleaning up the platform_editor_lovability_text_bg_color experiment, check if this can be removed
|
|
205
217
|
[[_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
218
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
207
219
|
colorValue = _ref2[0],
|
|
208
220
|
colorName = _ref2[1];
|
|
209
221
|
tableBackgroundColorPalette.set(colorValue.toLowerCase(), colorName);
|
|
222
|
+
});
|
|
223
|
+
[[_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) {
|
|
224
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
|
225
|
+
colorValue = _ref4[0],
|
|
226
|
+
colorName = _ref4[1];
|
|
227
|
+
tableBackgroundColorPaletteNew.set(colorValue.toLowerCase(), colorName);
|
|
210
228
|
tableBackgroundColorNames.set(colorName.toLowerCase(), colorValue.toLowerCase());
|
|
211
229
|
});
|
|
212
230
|
|
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';
|
|
@@ -156,8 +156,11 @@ var editorTextPalette = exports.editorTextPalette = (0, _defineProperty2.default
|
|
|
156
156
|
function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
|
157
157
|
// Ts ignore was used to allow use of conditional return type
|
|
158
158
|
// (preferring better type on consumption over safety in implementation)
|
|
159
|
+
return hexColor ?
|
|
159
160
|
// @ts-expect-error
|
|
160
|
-
|
|
161
|
+
textBackgroundColorPalette[hexColor.toUpperCase()] :
|
|
162
|
+
// @ts-expect-error
|
|
163
|
+
undefined;
|
|
161
164
|
}
|
|
162
165
|
var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
|
163
166
|
/** Gray - light */
|
|
@@ -197,8 +200,9 @@ var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
|
|
197
200
|
function hexToEditorBackgroundPaletteRawValue(hexColor) {
|
|
198
201
|
// Ts ignore was used to allow use of conditional return type
|
|
199
202
|
// (preferencing better type on consumption over safety in implementation)
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
var tokenData = hexColor ?
|
|
204
|
+
// @ts-expect-error
|
|
205
|
+
editorBackgroundPalette[hexColor.toUpperCase()] : undefined;
|
|
202
206
|
// @ts-expect-error
|
|
203
207
|
return tokenData ? tokenData.getValue(hexColor) : undefined;
|
|
204
208
|
}
|
|
@@ -354,5 +358,119 @@ var editorBackgroundPalette = exports.editorBackgroundPalette = {
|
|
|
354
358
|
return '#B3BAC5';
|
|
355
359
|
},
|
|
356
360
|
token: 'var(--ds-background-accent-gray-subtle, #B3BAC5)'
|
|
361
|
+
},
|
|
362
|
+
/** lime - light */
|
|
363
|
+
'#EFFFD6': {
|
|
364
|
+
getValue: function getValue() {
|
|
365
|
+
return '#EFFFD6';
|
|
366
|
+
},
|
|
367
|
+
token: 'var(--ds-background-accent-lime-subtlest, #EFFFD6)'
|
|
368
|
+
},
|
|
369
|
+
/** lime - medium */
|
|
370
|
+
'#D3F1A7': {
|
|
371
|
+
getValue: function getValue() {
|
|
372
|
+
return '#D3F1A7';
|
|
373
|
+
},
|
|
374
|
+
token: 'var(--ds-background-accent-lime-subtler, #D3F1A7)'
|
|
375
|
+
},
|
|
376
|
+
/** lime - bold */
|
|
377
|
+
'#BDE97C': {
|
|
378
|
+
getValue: function getValue() {
|
|
379
|
+
return '#BDE97C';
|
|
380
|
+
},
|
|
381
|
+
token: 'var(--ds-background-accent-lime-subtler-hovered, #BDE97C)'
|
|
382
|
+
},
|
|
383
|
+
/** orange - light */
|
|
384
|
+
'#FFF5DB': {
|
|
385
|
+
getValue: function getValue() {
|
|
386
|
+
return '#FFF5DB';
|
|
387
|
+
},
|
|
388
|
+
token: 'var(--ds-background-accent-orange-subtlest, #FFF5DB)'
|
|
389
|
+
},
|
|
390
|
+
/** orange - medium */
|
|
391
|
+
'#FCE4A6': {
|
|
392
|
+
getValue: function getValue() {
|
|
393
|
+
return '#FCE4A6';
|
|
394
|
+
},
|
|
395
|
+
token: 'var(--ds-background-accent-orange-subtler, #FCE4A6)'
|
|
396
|
+
},
|
|
397
|
+
/** orange - bold */
|
|
398
|
+
'#FBD779': {
|
|
399
|
+
getValue: function getValue() {
|
|
400
|
+
return '#FBD779';
|
|
401
|
+
},
|
|
402
|
+
token: 'var(--ds-background-accent-orange-subtler-hovered, #FBD779)'
|
|
403
|
+
},
|
|
404
|
+
/** magenta - light */
|
|
405
|
+
'#FFECF8': {
|
|
406
|
+
getValue: function getValue() {
|
|
407
|
+
return '#FFECF8';
|
|
408
|
+
},
|
|
409
|
+
token: 'var(--ds-background-accent-magenta-subtlest, #FFECF8)'
|
|
410
|
+
},
|
|
411
|
+
/** magenta - medium */
|
|
412
|
+
'#FDD0EC': {
|
|
413
|
+
getValue: function getValue() {
|
|
414
|
+
return '#FDD0EC';
|
|
415
|
+
},
|
|
416
|
+
token: 'var(--ds-background-accent-magenta-subtler, #FDD0EC)'
|
|
417
|
+
},
|
|
418
|
+
/** magenta - bold */
|
|
419
|
+
'#FCB6E1': {
|
|
420
|
+
getValue: function getValue() {
|
|
421
|
+
return '#FCB6E1';
|
|
422
|
+
},
|
|
423
|
+
token: 'var(--ds-background-accent-magenta-subtler-hovered, #FCB6E1)'
|
|
424
|
+
},
|
|
425
|
+
// Bold row mappings using subtler.hovered tokens. These use new hex codes
|
|
426
|
+
// so pre-existing documents keep their old subtle-token mappings above.
|
|
427
|
+
/** blue - bold */
|
|
428
|
+
'#ADCBFB': {
|
|
429
|
+
getValue: function getValue() {
|
|
430
|
+
return '#ADCBFB';
|
|
431
|
+
},
|
|
432
|
+
token: 'var(--ds-background-accent-blue-subtler-hovered, #ADCBFB)'
|
|
433
|
+
},
|
|
434
|
+
/** teal - bold */
|
|
435
|
+
'#B1E4F7': {
|
|
436
|
+
getValue: function getValue() {
|
|
437
|
+
return '#B1E4F7';
|
|
438
|
+
},
|
|
439
|
+
token: 'var(--ds-background-accent-teal-subtler-hovered, #B1E4F7)'
|
|
440
|
+
},
|
|
441
|
+
/** green - bold */
|
|
442
|
+
'#97EDC9': {
|
|
443
|
+
getValue: function getValue() {
|
|
444
|
+
return '#97EDC9';
|
|
445
|
+
},
|
|
446
|
+
token: 'var(--ds-background-accent-green-subtler-hovered, #97EDC9)'
|
|
447
|
+
},
|
|
448
|
+
/** yellow - bold */
|
|
449
|
+
'#EFDD4E': {
|
|
450
|
+
getValue: function getValue() {
|
|
451
|
+
return '#EFDD4E';
|
|
452
|
+
},
|
|
453
|
+
token: 'var(--ds-background-accent-yellow-subtler-hovered, #EFDD4E)'
|
|
454
|
+
},
|
|
455
|
+
/** red - bold */
|
|
456
|
+
'#FFB8B2': {
|
|
457
|
+
getValue: function getValue() {
|
|
458
|
+
return '#FFB8B2';
|
|
459
|
+
},
|
|
460
|
+
token: 'var(--ds-background-accent-red-subtler-hovered, #FFB8B2)'
|
|
461
|
+
},
|
|
462
|
+
/** purple - bold */
|
|
463
|
+
'#E3BDFA': {
|
|
464
|
+
getValue: function getValue() {
|
|
465
|
+
return '#E3BDFA';
|
|
466
|
+
},
|
|
467
|
+
token: 'var(--ds-background-accent-purple-subtler-hovered, #E3BDFA)'
|
|
468
|
+
},
|
|
469
|
+
/** gray - bold */
|
|
470
|
+
'#B7B9BE': {
|
|
471
|
+
getValue: function getValue() {
|
|
472
|
+
return '#B7B9BE';
|
|
473
|
+
},
|
|
474
|
+
token: 'var(--ds-background-accent-gray-subtler-hovered, #B7B9BE)'
|
|
357
475
|
}
|
|
358
476
|
};
|
|
@@ -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, 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, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
2
|
+
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableBackgroundColorPaletteNew, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette, colorPaletteNew,
|
|
4
4
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
5
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
@@ -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,7 @@
|
|
|
1
1
|
import { hexToEditorBackgroundPaletteRawValue } from '../../utils/editor-palette';
|
|
2
|
-
import {
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
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
5
|
import { uuid } from '../../utils/uuid';
|
|
4
6
|
import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
|
|
5
7
|
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 +176,8 @@ export const getCellDomAttrs = node => {
|
|
|
174
176
|
attrs['data-cell-background'] = color;
|
|
175
177
|
}
|
|
176
178
|
if (typeof color === 'string') {
|
|
177
|
-
|
|
179
|
+
const palette = expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && fg('platform_editor_lovability_text_bg_color_patch_2') ? tableBackgroundColorPaletteNew : tableBackgroundColorPalette;
|
|
180
|
+
attrs.colorname = palette.get(color.toLowerCase());
|
|
178
181
|
}
|
|
179
182
|
}
|
|
180
183
|
}
|
|
@@ -192,10 +195,22 @@ export const getCellDomAttrs = node => {
|
|
|
192
195
|
return attrs;
|
|
193
196
|
};
|
|
194
197
|
export const tableBackgroundColorPalette = new Map();
|
|
198
|
+
/**
|
|
199
|
+
* Expanded 10-column (30-entry) palette that adds lime, orange, and magenta columns
|
|
200
|
+
* and updates the bold row to use `subtler.hovered` design tokens.
|
|
201
|
+
* This is a superset of {@link tableBackgroundColorPalette}.
|
|
202
|
+
*/
|
|
203
|
+
export const tableBackgroundColorPaletteNew = new Map();
|
|
195
204
|
export const tableBackgroundBorderColor = hexToRgba(N800, 0.12) || N0;
|
|
196
205
|
export const tableBackgroundColorNames = new Map();
|
|
206
|
+
|
|
207
|
+
// Original 7-column palette — kept as the default export so external consumers
|
|
208
|
+
// are not broken. When cleaning up the platform_editor_lovability_text_bg_color experiment, check if this can be removed
|
|
197
209
|
[[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
210
|
tableBackgroundColorPalette.set(colorValue.toLowerCase(), colorName);
|
|
211
|
+
});
|
|
212
|
+
[[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]) => {
|
|
213
|
+
tableBackgroundColorPaletteNew.set(colorValue.toLowerCase(), colorName);
|
|
199
214
|
tableBackgroundColorNames.set(colorName.toLowerCase(), colorValue.toLowerCase());
|
|
200
215
|
});
|
|
201
216
|
|
|
@@ -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';
|