@atlaskit/adf-schema 56.1.6 → 56.1.7
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 +8 -0
- package/dist/cjs/schema/marks/background-color.js +4 -1
- package/dist/cjs/utils/colors.js +2 -1
- package/dist/cjs/utils/editor-palette.js +2 -0
- package/dist/es2019/schema/marks/background-color.js +5 -2
- package/dist/es2019/utils/colors.js +1 -0
- package/dist/es2019/utils/editor-palette.js +2 -0
- package/dist/esm/schema/marks/background-color.js +5 -2
- package/dist/esm/utils/colors.js +1 -0
- package/dist/esm/utils/editor-palette.js +2 -0
- package/dist/types/schema/marks/background-color.d.ts +1 -1
- package/dist/types/utils/colors.d.ts +1 -0
- package/dist/types/utils/editor-palette.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 56.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`245230d12da8d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/245230d12da8d) -
|
|
8
|
+
[ux] [EDITOR-8142] add red highlight color and filter out the transparent/ default highlight color
|
|
9
|
+
behind platform_editor_lovability_text_bg_color_patch_1
|
|
10
|
+
|
|
3
11
|
## 56.1.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.backgroundColorPaletteNew = exports.backgroundColorPalette = exports.backgroundColor = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
11
12
|
var _markTypes = require("../../next-schema/generated/markTypes");
|
|
12
13
|
var _colors = require("../../utils/colors");
|
|
@@ -45,6 +46,8 @@ var colorArrayPaletteNew = [[_colors.Neutral300, 'Gray'],
|
|
|
45
46
|
// token: color.background.accent.yellow.subtler
|
|
46
47
|
[_colors.O200, 'Orange'],
|
|
47
48
|
// token: color.background.accent.orange.subtler
|
|
49
|
+
[_colors.R200, 'Red'],
|
|
50
|
+
// token: color.background.accent.red.subtler
|
|
48
51
|
[_colors.M200, 'Magenta'],
|
|
49
52
|
// token: color.background.accent.magenta.subtler
|
|
50
53
|
[_colors.P200, 'Purple'] // token: color.background.accent.purple.subtler
|
|
@@ -72,7 +75,7 @@ var isSupportedBackgroundColor = function isSupportedBackgroundColor(hexColor) {
|
|
|
72
75
|
if (backgroundColorPalette.has(hexColor)) {
|
|
73
76
|
return true;
|
|
74
77
|
}
|
|
75
|
-
return (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor);
|
|
78
|
+
return (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor) && (hexColor !== _colors.R200.toLowerCase() || (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1'));
|
|
76
79
|
};
|
|
77
80
|
var backgroundColor = exports.backgroundColor = (0, _markTypes.backgroundColor)({
|
|
78
81
|
parseDOM: [{
|
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.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.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;
|
|
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 R200 = exports.R200 = '#FFD5D2';
|
|
31
32
|
var R300 = exports.R300 = '#FF5630';
|
|
32
33
|
var R400 = exports.R400 = '#DE350B';
|
|
33
34
|
var R500 = exports.R500 = '#BF2600';
|
|
@@ -169,6 +169,8 @@ var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
|
|
169
169
|
'#F8E6A0': 'var(--ds-background-accent-yellow-subtler, #F8E6A0)',
|
|
170
170
|
/** Orange - light */
|
|
171
171
|
'#FEDEC8': 'var(--ds-background-accent-orange-subtler, #FEDEC8)',
|
|
172
|
+
/** Red - light */
|
|
173
|
+
'#FFD5D2': 'var(--ds-background-accent-red-subtler, #FFD5D2)',
|
|
172
174
|
/** Magenta - light */
|
|
173
175
|
'#FDD0EC': 'var(--ds-background-accent-magenta-subtler, #FDD0EC)',
|
|
174
176
|
/** Purple - light */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
2
3
|
import { backgroundColor as backgroundColorFactory } from '../../next-schema/generated/markTypes';
|
|
3
|
-
import { B75, G75, L200, M200, Neutral300, O200, P200, rgbToHex, T200, Yellow200 } from '../../utils/colors';
|
|
4
|
+
import { B75, G75, L200, M200, Neutral300, O200, P200, R200, rgbToHex, T200, Yellow200 } from '../../utils/colors';
|
|
4
5
|
import { hexToEditorTextBackgroundPaletteColor } from '../../utils/editor-palette';
|
|
5
6
|
import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
|
|
6
7
|
import { getGlobalTheme } from './text-color';
|
|
@@ -37,6 +38,8 @@ const colorArrayPaletteNew = [[Neutral300, 'Gray'],
|
|
|
37
38
|
// token: color.background.accent.yellow.subtler
|
|
38
39
|
[O200, 'Orange'],
|
|
39
40
|
// token: color.background.accent.orange.subtler
|
|
41
|
+
[R200, 'Red'],
|
|
42
|
+
// token: color.background.accent.red.subtler
|
|
40
43
|
[M200, 'Magenta'],
|
|
41
44
|
// token: color.background.accent.magenta.subtler
|
|
42
45
|
[P200, 'Purple'] // token: color.background.accent.purple.subtler
|
|
@@ -54,7 +57,7 @@ const isSupportedBackgroundColor = hexColor => {
|
|
|
54
57
|
if (backgroundColorPalette.has(hexColor)) {
|
|
55
58
|
return true;
|
|
56
59
|
}
|
|
57
|
-
return expValEqualsNoExposure('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor);
|
|
60
|
+
return expValEqualsNoExposure('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor) && (hexColor !== R200.toLowerCase() || fg('platform_editor_lovability_text_bg_color_patch_1'));
|
|
58
61
|
};
|
|
59
62
|
export const backgroundColor = backgroundColorFactory({
|
|
60
63
|
parseDOM: [{
|
|
@@ -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 R200 = '#FFD5D2';
|
|
15
16
|
export const R300 = '#FF5630';
|
|
16
17
|
export const R400 = '#DE350B';
|
|
17
18
|
export const R500 = '#BF2600';
|
|
@@ -160,6 +160,8 @@ export const textBackgroundColorPalette = {
|
|
|
160
160
|
'#F8E6A0': 'var(--ds-background-accent-yellow-subtler, #F8E6A0)',
|
|
161
161
|
/** Orange - light */
|
|
162
162
|
'#FEDEC8': 'var(--ds-background-accent-orange-subtler, #FEDEC8)',
|
|
163
|
+
/** Red - light */
|
|
164
|
+
'#FFD5D2': 'var(--ds-background-accent-red-subtler, #FFD5D2)',
|
|
163
165
|
/** Magenta - light */
|
|
164
166
|
'#FDD0EC': 'var(--ds-background-accent-magenta-subtler, #FDD0EC)',
|
|
165
167
|
/** Purple - light */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
5
|
import { backgroundColor as backgroundColorFactory } from '../../next-schema/generated/markTypes';
|
|
5
|
-
import { B75, G75, L200, M200, Neutral300, O200, P200, rgbToHex, T200, Yellow200 } from '../../utils/colors';
|
|
6
|
+
import { B75, G75, L200, M200, Neutral300, O200, P200, R200, rgbToHex, T200, Yellow200 } from '../../utils/colors';
|
|
6
7
|
import { hexToEditorTextBackgroundPaletteColor } from '../../utils/editor-palette';
|
|
7
8
|
import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
|
|
8
9
|
import { getGlobalTheme } from './text-color';
|
|
@@ -39,6 +40,8 @@ var colorArrayPaletteNew = [[Neutral300, 'Gray'],
|
|
|
39
40
|
// token: color.background.accent.yellow.subtler
|
|
40
41
|
[O200, 'Orange'],
|
|
41
42
|
// token: color.background.accent.orange.subtler
|
|
43
|
+
[R200, 'Red'],
|
|
44
|
+
// token: color.background.accent.red.subtler
|
|
42
45
|
[M200, 'Magenta'],
|
|
43
46
|
// token: color.background.accent.magenta.subtler
|
|
44
47
|
[P200, 'Purple'] // token: color.background.accent.purple.subtler
|
|
@@ -66,7 +69,7 @@ var isSupportedBackgroundColor = function isSupportedBackgroundColor(hexColor) {
|
|
|
66
69
|
if (backgroundColorPalette.has(hexColor)) {
|
|
67
70
|
return true;
|
|
68
71
|
}
|
|
69
|
-
return expValEqualsNoExposure('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor);
|
|
72
|
+
return expValEqualsNoExposure('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor) && (hexColor !== R200.toLowerCase() || fg('platform_editor_lovability_text_bg_color_patch_1'));
|
|
70
73
|
};
|
|
71
74
|
export var backgroundColor = backgroundColorFactory({
|
|
72
75
|
parseDOM: [{
|
package/dist/esm/utils/colors.js
CHANGED
|
@@ -13,6 +13,7 @@ import * as namedColors from 'css-color-names';
|
|
|
13
13
|
export var R50 = '#FFEBE6';
|
|
14
14
|
export var R75 = '#FFBDAD';
|
|
15
15
|
export var R100 = '#FF8F73';
|
|
16
|
+
export var R200 = '#FFD5D2';
|
|
16
17
|
export var R300 = '#FF5630';
|
|
17
18
|
export var R400 = '#DE350B';
|
|
18
19
|
export var R500 = '#BF2600';
|
|
@@ -158,6 +158,8 @@ export var textBackgroundColorPalette = {
|
|
|
158
158
|
'#F8E6A0': 'var(--ds-background-accent-yellow-subtler, #F8E6A0)',
|
|
159
159
|
/** Orange - light */
|
|
160
160
|
'#FEDEC8': 'var(--ds-background-accent-orange-subtler, #FEDEC8)',
|
|
161
|
+
/** Red - light */
|
|
162
|
+
'#FFD5D2': 'var(--ds-background-accent-red-subtler, #FFD5D2)',
|
|
161
163
|
/** Magenta - light */
|
|
162
164
|
'#FDD0EC': 'var(--ds-background-accent-magenta-subtler, #FDD0EC)',
|
|
163
165
|
/** Purple - light */
|
|
@@ -10,7 +10,7 @@ export interface BackgroundColorDefinition {
|
|
|
10
10
|
export interface BackgroundColorMark extends Mark {
|
|
11
11
|
attrs: TextColorAttributes;
|
|
12
12
|
}
|
|
13
|
-
export type BackgroundColorKey = 'Gray' | 'Teal' | 'Lime' | 'Yellow' | 'Orange' | 'Magenta' | 'Purple' | 'Blue' | 'Green';
|
|
13
|
+
export type BackgroundColorKey = 'Gray' | 'Teal' | 'Lime' | 'Yellow' | 'Orange' | 'Red' | 'Magenta' | 'Purple' | 'Blue' | 'Green';
|
|
14
14
|
export declare const backgroundColorPalette: Map<string, BackgroundColorKey>;
|
|
15
15
|
export declare const backgroundColorPaletteNew: Map<string, BackgroundColorKey>;
|
|
16
16
|
export declare const backgroundColor: MarkSpec;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export declare const R50 = "#FFEBE6";
|
|
8
8
|
export declare const R75 = "#FFBDAD";
|
|
9
9
|
export declare const R100 = "#FF8F73";
|
|
10
|
+
export declare const R200 = "#FFD5D2";
|
|
10
11
|
export declare const R300 = "#FF5630";
|
|
11
12
|
export declare const R400 = "#DE350B";
|
|
12
13
|
export declare const R500 = "#BF2600";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-schema",
|
|
3
|
-
"version": "56.1.
|
|
3
|
+
"version": "56.1.7",
|
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/adf-schema-generator": "^3.1.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^126.
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^126.3.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"css-color-names": "0.0.4",
|
|
46
46
|
"linkify-it": "^3.0.3",
|