@atlaskit/adf-schema 57.7.48 → 57.7.50
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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 57.7.50
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`030d3ce5ff027`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/030d3ce5ff027) -
|
|
8
|
+
Make the table cell background parsing fix permanent so cell colours are not interpreted as text
|
|
9
|
+
highlights.
|
|
10
|
+
|
|
11
|
+
## 57.7.49
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 57.7.48
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -7,7 +7,6 @@ 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 _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
11
10
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
12
11
|
var _markTypes = require("../../next-schema/generated/markTypes");
|
|
13
12
|
var _colors = require("../../utils/colors");
|
|
@@ -90,21 +89,13 @@ var getBackgroundColor = function getBackgroundColor(value) {
|
|
|
90
89
|
};
|
|
91
90
|
var backgroundColor = exports.backgroundColor = (0, _markTypes.backgroundColor)({
|
|
92
91
|
parseDOM: [{
|
|
93
|
-
style: 'background-color',
|
|
94
|
-
getAttrs: function getAttrs(maybeValue) {
|
|
95
|
-
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_fix_table_cell_background')) {
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
return getBackgroundColor(maybeValue);
|
|
99
|
-
}
|
|
100
|
-
}, {
|
|
101
92
|
// the table cell and background color palettes overlap on Blue and Green, so
|
|
102
93
|
// we need to exclude table cells to avoid parsing table cell background as background color
|
|
103
94
|
tag: '[style]:not(td):not(th)',
|
|
104
95
|
consuming: false,
|
|
105
96
|
priority: 60,
|
|
106
97
|
getAttrs: function getAttrs(maybeElement) {
|
|
107
|
-
if (!(
|
|
98
|
+
if (!(maybeElement instanceof HTMLElement)) {
|
|
108
99
|
return false;
|
|
109
100
|
}
|
|
110
101
|
return getBackgroundColor(maybeElement.style.backgroundColor);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
1
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
3
2
|
import { backgroundColor as backgroundColorFactory } from '../../next-schema/generated/markTypes';
|
|
4
3
|
import { B75, G75, L200, M200, Neutral300, O200, P200, R200, T200, Yellow200 } from '../../utils/colors';
|
|
@@ -72,21 +71,13 @@ const getBackgroundColor = value => {
|
|
|
72
71
|
};
|
|
73
72
|
export const backgroundColor = backgroundColorFactory({
|
|
74
73
|
parseDOM: [{
|
|
75
|
-
style: 'background-color',
|
|
76
|
-
getAttrs: maybeValue => {
|
|
77
|
-
if (isExperimentEnabled('platform_editor_fix_table_cell_background')) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
return getBackgroundColor(maybeValue);
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
74
|
// the table cell and background color palettes overlap on Blue and Green, so
|
|
84
75
|
// we need to exclude table cells to avoid parsing table cell background as background color
|
|
85
76
|
tag: '[style]:not(td):not(th)',
|
|
86
77
|
consuming: false,
|
|
87
78
|
priority: 60,
|
|
88
79
|
getAttrs: maybeElement => {
|
|
89
|
-
if (!
|
|
80
|
+
if (!(maybeElement instanceof HTMLElement)) {
|
|
90
81
|
return false;
|
|
91
82
|
}
|
|
92
83
|
return getBackgroundColor(maybeElement.style.backgroundColor);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
3
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
4
|
import { backgroundColor as backgroundColorFactory } from '../../next-schema/generated/markTypes';
|
|
6
5
|
import { B75, G75, L200, M200, Neutral300, O200, P200, R200, T200, Yellow200 } from '../../utils/colors';
|
|
@@ -84,21 +83,13 @@ var getBackgroundColor = function getBackgroundColor(value) {
|
|
|
84
83
|
};
|
|
85
84
|
export var backgroundColor = backgroundColorFactory({
|
|
86
85
|
parseDOM: [{
|
|
87
|
-
style: 'background-color',
|
|
88
|
-
getAttrs: function getAttrs(maybeValue) {
|
|
89
|
-
if (isExperimentEnabled('platform_editor_fix_table_cell_background')) {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
return getBackgroundColor(maybeValue);
|
|
93
|
-
}
|
|
94
|
-
}, {
|
|
95
86
|
// the table cell and background color palettes overlap on Blue and Green, so
|
|
96
87
|
// we need to exclude table cells to avoid parsing table cell background as background color
|
|
97
88
|
tag: '[style]:not(td):not(th)',
|
|
98
89
|
consuming: false,
|
|
99
90
|
priority: 60,
|
|
100
91
|
getAttrs: function getAttrs(maybeElement) {
|
|
101
|
-
if (!
|
|
92
|
+
if (!(maybeElement instanceof HTMLElement)) {
|
|
102
93
|
return false;
|
|
103
94
|
}
|
|
104
95
|
return getBackgroundColor(maybeElement.style.backgroundColor);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-schema",
|
|
3
|
-
"version": "57.7.
|
|
3
|
+
"version": "57.7.50",
|
|
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/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
45
45
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^269.0.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"css-color-names": "0.0.4",
|
|
50
50
|
"linkify-it": "^5.0.2",
|