@atlaskit/adf-schema 47.6.0 → 47.7.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 +12 -0
- package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +1 -0
- package/dist/cjs/utils/editor-palette.js +9 -0
- package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +1 -0
- package/dist/es2019/utils/editor-palette.js +9 -0
- package/dist/esm/next-schema/nodes/multiBodiedExtension.js +1 -0
- package/dist/esm/utils/editor-palette.js +9 -0
- package/dist/json-schema/v1/stage-0.json +2 -1
- package/json-schema/v1/stage-0.json +2 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 47.7.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 742cd9b: fixed MBE maxItems for marks array issue
|
8
|
+
|
9
|
+
## 47.7.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- 105bd25: EDF-2577: Remap orange to yellow in text background color mapping functions behind editor_text_highlight_orange_to_yellow experiment
|
14
|
+
|
3
15
|
## 47.6.0
|
4
16
|
|
5
17
|
### Minor Changes
|
@@ -16,6 +16,7 @@ var multiBodiedExtension = exports.multiBodiedExtension = (0, _adfSchemaGenerato
|
|
16
16
|
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
17
17
|
marks: [_unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
|
18
18
|
hasEmptyMarks: true,
|
19
|
+
marksMaxItems: 0,
|
19
20
|
attrs: {
|
20
21
|
extensionKey: {
|
21
22
|
type: 'string',
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
4
5
|
value: true
|
5
6
|
});
|
@@ -9,6 +10,7 @@ exports.hexToEditorBorderPaletteColor = hexToEditorBorderPaletteColor;
|
|
9
10
|
exports.hexToEditorTextBackgroundPaletteColor = hexToEditorTextBackgroundPaletteColor;
|
10
11
|
exports.hexToEditorTextPaletteColor = hexToEditorTextPaletteColor;
|
11
12
|
exports.textBackgroundColorPalette = void 0;
|
13
|
+
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
12
14
|
/**
|
13
15
|
* This takes an adf hex color and returns a matching border palette color.
|
14
16
|
*
|
@@ -125,6 +127,13 @@ var editorTextPalette = exports.editorTextPalette = {
|
|
125
127
|
* - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
|
126
128
|
*/
|
127
129
|
function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
130
|
+
var orangeToYellowEnabled = _featureGateJsClient.default.getExperimentValue('editor_text_highlight_orange_to_yellow', 'cohort', 'control', {
|
131
|
+
fireExperimentExposure: true
|
132
|
+
});
|
133
|
+
if (orangeToYellowEnabled === 'test') {
|
134
|
+
textBackgroundColorPalette['#FEDEC8'] = 'var(--ds-background-accent-yellow-subtler, #F8E6A0)';
|
135
|
+
}
|
136
|
+
|
128
137
|
// Ts ignore was used to allow use of conditional return type
|
129
138
|
// (preferring better type on consumption over safety in implementation)
|
130
139
|
return hexColor ? textBackgroundColorPalette[hexColor.toUpperCase()] : undefined;
|
@@ -10,6 +10,7 @@ export const multiBodiedExtension = adfNode('multiBodiedExtension').define({
|
|
10
10
|
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
11
11
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
12
12
|
hasEmptyMarks: true,
|
13
|
+
marksMaxItems: 0,
|
13
14
|
attrs: {
|
14
15
|
extensionKey: {
|
15
16
|
type: 'string',
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
2
|
+
|
1
3
|
/**
|
2
4
|
* This takes an adf hex color and returns a matching border palette color.
|
3
5
|
*
|
@@ -114,6 +116,13 @@ export const editorTextPalette = {
|
|
114
116
|
* - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
|
115
117
|
*/
|
116
118
|
export function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
119
|
+
const orangeToYellowEnabled = FeatureGates.getExperimentValue('editor_text_highlight_orange_to_yellow', 'cohort', 'control', {
|
120
|
+
fireExperimentExposure: true
|
121
|
+
});
|
122
|
+
if (orangeToYellowEnabled === 'test') {
|
123
|
+
textBackgroundColorPalette['#FEDEC8'] = 'var(--ds-background-accent-yellow-subtler, #F8E6A0)';
|
124
|
+
}
|
125
|
+
|
117
126
|
// Ts ignore was used to allow use of conditional return type
|
118
127
|
// (preferring better type on consumption over safety in implementation)
|
119
128
|
return hexColor ? textBackgroundColorPalette[hexColor.toUpperCase()] : undefined;
|
@@ -10,6 +10,7 @@ export var multiBodiedExtension = adfNode('multiBodiedExtension').define({
|
|
10
10
|
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
11
11
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
12
12
|
hasEmptyMarks: true,
|
13
|
+
marksMaxItems: 0,
|
13
14
|
attrs: {
|
14
15
|
extensionKey: {
|
15
16
|
type: 'string',
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
2
|
+
|
1
3
|
/**
|
2
4
|
* This takes an adf hex color and returns a matching border palette color.
|
3
5
|
*
|
@@ -114,6 +116,13 @@ export var editorTextPalette = {
|
|
114
116
|
* - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
|
115
117
|
*/
|
116
118
|
export function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
119
|
+
var orangeToYellowEnabled = FeatureGates.getExperimentValue('editor_text_highlight_orange_to_yellow', 'cohort', 'control', {
|
120
|
+
fireExperimentExposure: true
|
121
|
+
});
|
122
|
+
if (orangeToYellowEnabled === 'test') {
|
123
|
+
textBackgroundColorPalette['#FEDEC8'] = 'var(--ds-background-accent-yellow-subtler, #F8E6A0)';
|
124
|
+
}
|
125
|
+
|
117
126
|
// Ts ignore was used to allow use of conditional return type
|
118
127
|
// (preferring better type on consumption over safety in implementation)
|
119
128
|
return hexColor ? textBackgroundColorPalette[hexColor.toUpperCase()] : undefined;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "47.
|
3
|
+
"version": "47.7.1",
|
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/"
|
@@ -39,15 +39,16 @@
|
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
41
|
"@atlaskit/editor-prosemirror": "*",
|
42
|
+
"@atlaskit/feature-gate-js-client": "^4.26.4",
|
42
43
|
"@babel/runtime": "^7.0.0",
|
43
44
|
"css-color-names": "0.0.4",
|
44
45
|
"linkify-it": "^2.0.3",
|
45
46
|
"memoize-one": "^6.0.0"
|
46
47
|
},
|
47
48
|
"devDependencies": {
|
48
|
-
"@
|
49
|
-
"@atlaskit/adf-schema-generator": "^2.1.0",
|
49
|
+
"@atlaskit/adf-schema-generator": "^2.1.1",
|
50
50
|
"@atlaskit/codemod-utils": "^4.2.4",
|
51
|
+
"@atlassian/adf-schema-json": "^1.31.0",
|
51
52
|
"@babel/cli": "^7.22.9",
|
52
53
|
"@babel/core": "^7.22.9",
|
53
54
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|