@atlaskit/adf-schema 56.0.10 → 56.0.12

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
+ ## 56.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6949db5856550`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6949db5856550) -
8
+ Fixed in dark theme the bold yellow and yellow were the same color
9
+ - Updated dependencies
10
+
11
+ ## 56.0.11
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 56.0.10
4
18
 
5
19
  ### Patch Changes
package/compass.yml ADDED
@@ -0,0 +1,38 @@
1
+ configVersion: 1
2
+ id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/1784a7c0-b12e-4c98-892b-bb493bce62c8
3
+ name: '@atlaskit/adf-schema'
4
+ ownerId: ari:cloud:identity::team/ce353f56-2a90-491b-b272-b90dca4fffa2 # Editor FE Platform
5
+ labels:
6
+ - platform-code
7
+ - platform-afm
8
+ typeId: OTHER
9
+ fields:
10
+ tier: 4
11
+ lifecycle: Active
12
+ isMonorepoProject: true
13
+ links:
14
+ - name: Root Repository
15
+ type: REPOSITORY
16
+ url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
17
+ - name: Slack Channel
18
+ type: CHAT_CHANNEL
19
+ url: https://atlassian.enterprise.slack.com/archives/C03SD6QJWPP # #cc-editor-lego
20
+ - name: Adf Schema
21
+ type: REPOSITORY
22
+ url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/adf-schema
23
+ customFields:
24
+ - name: Department
25
+ type: text
26
+ value: Eng - Editor Frontend Platform
27
+ - name: Technical Owner
28
+ type: user
29
+ value: ari:cloud:identity::user/5ea93c14a4c57d0b8bd65a16 # Anand Raj
30
+ - name: Required Reviewers Opt In
31
+ type: boolean
32
+ value: true
33
+ - name: Reviewer Selection Mechanism
34
+ type: text
35
+ value: random(2)
36
+ - name: Required Reviewer Approvals
37
+ type: number
38
+ value: 1
@@ -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,9 @@ exports.hexToEditorBorderPaletteColor = hexToEditorBorderPaletteColor;
9
10
  exports.hexToEditorTextBackgroundPaletteColor = hexToEditorTextBackgroundPaletteColor;
10
11
  exports.hexToEditorTextPaletteColor = hexToEditorTextPaletteColor;
11
12
  exports.textBackgroundColorPalette = void 0;
13
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
+ function _defineAccessor(e, r, n, t) { var c = { configurable: !0, enumerable: !0 }; return c[e] = t, Object.defineProperty(r, n, c); }
12
16
  /**
13
17
  * This takes an adf hex color and returns a matching border palette color.
14
18
  *
@@ -59,12 +63,14 @@ var editorBorderPalette = exports.editorBorderPalette = {
59
63
  * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
60
64
  */
61
65
  function hexToEditorTextPaletteColor(hexColor) {
66
+ var normalizedHexColor = hexColor ? hexColor.toUpperCase() : undefined;
67
+
62
68
  // Ts ignore was used to allow use of conditional return type
63
69
  // (preferencing better type on consumption over safety in implementation)
64
70
  // @ts-expect-error
65
- return hexColor ? editorTextPalette[hexColor.toUpperCase()] : undefined;
71
+ return normalizedHexColor ? editorTextPalette[normalizedHexColor] : undefined;
66
72
  }
67
- var editorTextPalette = exports.editorTextPalette = {
73
+ var editorTextPalette = exports.editorTextPalette = (0, _defineProperty2.default)(_defineAccessor("get", {
68
74
  /** blue - light */
69
75
  '#B3D4FF': 'var(--ds-background-accent-blue-subtler, #B3D4FF)',
70
76
  /** blue - medium */
@@ -124,12 +130,10 @@ var editorTextPalette = exports.editorTextPalette = {
124
130
  /** magenta - medium */
125
131
  '#CD519D': 'var(--ds-icon-accent-magenta, #CD519D)',
126
132
  /** magenta - strong */
127
- '#943D73': 'var(--ds-text-accent-magenta, #943D73)',
128
- /** yellow - medium */
129
- '#B38600': 'var(--ds-icon-accent-yellow, #B38600)',
130
- /** yellow - strong */
131
- '#7F5F01': 'var(--ds-text-accent-yellow, #7F5F01)'
132
- };
133
+ '#943D73': 'var(--ds-text-accent-magenta, #943D73)'
134
+ }, '#B38600', function () {
135
+ return (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') ? 'var(--ds-border-accent-yellow, #B38600)' : 'var(--ds-icon-accent-yellow, #B38600)';
136
+ }), '#7F5F01', 'var(--ds-text-accent-yellow, #7F5F01)');
133
137
 
134
138
  /**
135
139
  * This takes an ADF hex color and returns a matching text background palette color.
@@ -1,3 +1,5 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
+
1
3
  /**
2
4
  * This takes an adf hex color and returns a matching border palette color.
3
5
  *
@@ -48,10 +50,12 @@ export const editorBorderPalette = {
48
50
  * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
49
51
  */
50
52
  export function hexToEditorTextPaletteColor(hexColor) {
53
+ const normalizedHexColor = hexColor ? hexColor.toUpperCase() : undefined;
54
+
51
55
  // Ts ignore was used to allow use of conditional return type
52
56
  // (preferencing better type on consumption over safety in implementation)
53
57
  // @ts-expect-error
54
- return hexColor ? editorTextPalette[hexColor.toUpperCase()] : undefined;
58
+ return normalizedHexColor ? editorTextPalette[normalizedHexColor] : undefined;
55
59
  }
56
60
  export const editorTextPalette = {
57
61
  /** blue - light */
@@ -115,7 +119,9 @@ export const editorTextPalette = {
115
119
  /** magenta - strong */
116
120
  '#943D73': 'var(--ds-text-accent-magenta, #943D73)',
117
121
  /** yellow - medium */
118
- '#B38600': 'var(--ds-icon-accent-yellow, #B38600)',
122
+ get ['#B38600']() {
123
+ return fg('platform_editor_lovability_text_bg_color_patch_1') ? 'var(--ds-border-accent-yellow, #B38600)' : 'var(--ds-icon-accent-yellow, #B38600)';
124
+ },
119
125
  /** yellow - strong */
120
126
  '#7F5F01': 'var(--ds-text-accent-yellow, #7F5F01)'
121
127
  };
@@ -1,3 +1,7 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function _defineAccessor(e, r, n, t) { var c = { configurable: !0, enumerable: !0 }; return c[e] = t, Object.defineProperty(r, n, c); }
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
+
1
5
  /**
2
6
  * This takes an adf hex color and returns a matching border palette color.
3
7
  *
@@ -48,12 +52,14 @@ export var editorBorderPalette = {
48
52
  * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
49
53
  */
50
54
  export function hexToEditorTextPaletteColor(hexColor) {
55
+ var normalizedHexColor = hexColor ? hexColor.toUpperCase() : undefined;
56
+
51
57
  // Ts ignore was used to allow use of conditional return type
52
58
  // (preferencing better type on consumption over safety in implementation)
53
59
  // @ts-expect-error
54
- return hexColor ? editorTextPalette[hexColor.toUpperCase()] : undefined;
60
+ return normalizedHexColor ? editorTextPalette[normalizedHexColor] : undefined;
55
61
  }
56
- export var editorTextPalette = {
62
+ export var editorTextPalette = _defineProperty(_defineAccessor("get", {
57
63
  /** blue - light */
58
64
  '#B3D4FF': 'var(--ds-background-accent-blue-subtler, #B3D4FF)',
59
65
  /** blue - medium */
@@ -113,12 +119,10 @@ export var editorTextPalette = {
113
119
  /** magenta - medium */
114
120
  '#CD519D': 'var(--ds-icon-accent-magenta, #CD519D)',
115
121
  /** magenta - strong */
116
- '#943D73': 'var(--ds-text-accent-magenta, #943D73)',
117
- /** yellow - medium */
118
- '#B38600': 'var(--ds-icon-accent-yellow, #B38600)',
119
- /** yellow - strong */
120
- '#7F5F01': 'var(--ds-text-accent-yellow, #7F5F01)'
121
- };
122
+ '#943D73': 'var(--ds-text-accent-magenta, #943D73)'
123
+ }, '#B38600', function () {
124
+ return fg('platform_editor_lovability_text_bg_color_patch_1') ? 'var(--ds-border-accent-yellow, #B38600)' : 'var(--ds-icon-accent-yellow, #B38600)';
125
+ }), '#7F5F01', 'var(--ds-text-accent-yellow, #7F5F01)');
122
126
 
123
127
  /**
124
128
  * This takes an ADF hex color and returns a matching text background palette color.
@@ -108,7 +108,7 @@ export declare const editorTextPalette: {
108
108
  /** magenta - strong */
109
109
  '#943D73': string;
110
110
  /** yellow - medium */
111
- '#B38600': string;
111
+ readonly "#B38600": "var(--ds-border-accent-yellow, #B38600)" | "var(--ds-icon-accent-yellow, #B38600)";
112
112
  /** yellow - strong */
113
113
  '#7F5F01': string;
114
114
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "56.0.10",
3
+ "version": "56.0.12",
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,12 +39,18 @@
39
39
  "dependencies": {
40
40
  "@atlaskit/adf-schema-generator": "^3.1.0",
41
41
  "@atlaskit/editor-prosemirror": "^8.0.0",
42
- "@atlaskit/tmp-editor-statsig": "^116.0.0",
42
+ "@atlaskit/platform-feature-flags": "^2.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^118.0.0",
43
44
  "@babel/runtime": "^7.0.0",
44
45
  "css-color-names": "0.0.4",
45
46
  "linkify-it": "^3.0.3",
46
47
  "memoize-one": "^6.0.0"
47
48
  },
49
+ "platform-feature-flags": {
50
+ "platform_editor_lovability_text_bg_color_patch_1": {
51
+ "type": "boolean"
52
+ }
53
+ },
48
54
  "devDependencies": {
49
55
  "@atlaskit/codemod-utils": "^5.0.0",
50
56
  "@atlassian/adf-schema-json": "^1.33.0",