@atlaskit/editor-plugin-text-color 12.2.0 → 12.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 12.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`a3986c96cfbc4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a3986c96cfbc4) -
8
+ Clean up
9
+ [platform_editor_toolbar_aifc_text_color_config](https://switcheroo.atlassian.com/ui/gates/72f9412f-73b0-449f-891e-82bd3c32d50b/key/platform_editor_toolbar_aifc_text_color_config)
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 12.2.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 12.2.0
4
22
 
5
23
  ### Minor Changes
@@ -53,16 +53,9 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
53
53
  });
54
54
  };
55
55
  if (isToolbarAIFCEnabled) {
56
- if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_text_color_config')) {
57
- var _api$toolbar;
58
- if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents && isToolbarComponentEnabled(pluginConfig(textColorConfig))) {
59
- api.toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api));
60
- }
61
- } else {
62
- var _api$toolbar2;
63
- if (api !== null && api !== void 0 && (_api$toolbar2 = api.toolbar) !== null && _api$toolbar2 !== void 0 && _api$toolbar2.actions.registerComponents) {
64
- api.toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api));
65
- }
56
+ var _api$toolbar;
57
+ if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents && isToolbarComponentEnabled(pluginConfig(textColorConfig))) {
58
+ api.toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api));
66
59
  }
67
60
  } else {
68
61
  var _api$primaryToolbar;
@@ -52,9 +52,8 @@ var getContrastRatio = function getContrastRatio(defaultColor, highlightColor, t
52
52
  try {
53
53
  var contrastRatio = (0, _colorContrast.getContrastRatio)(getForegroundColor(textColor, defaultColor), getBackgroundColor(highlightColor));
54
54
  return contrastRatio;
55
- }
56
- // if we failed to calculate the contrast ratio, return null
57
- catch (_unused) {
55
+ } catch (_unused) {
56
+ // if we failed to calculate the contrast ratio, return null
58
57
  return null;
59
58
  }
60
59
  };
@@ -48,16 +48,9 @@ export const textColorPlugin = ({
48
48
  });
49
49
  };
50
50
  if (isToolbarAIFCEnabled) {
51
- if (fg('platform_editor_toolbar_aifc_text_color_config')) {
52
- var _api$toolbar;
53
- if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents && isToolbarComponentEnabled(pluginConfig(textColorConfig))) {
54
- api.toolbar.actions.registerComponents(getToolbarComponents(api));
55
- }
56
- } else {
57
- var _api$toolbar2;
58
- if (api !== null && api !== void 0 && (_api$toolbar2 = api.toolbar) !== null && _api$toolbar2 !== void 0 && _api$toolbar2.actions.registerComponents) {
59
- api.toolbar.actions.registerComponents(getToolbarComponents(api));
60
- }
51
+ var _api$toolbar;
52
+ if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents && isToolbarComponentEnabled(pluginConfig(textColorConfig))) {
53
+ api.toolbar.actions.registerComponents(getToolbarComponents(api));
61
54
  }
62
55
  } else {
63
56
  var _api$primaryToolbar;
@@ -45,9 +45,8 @@ const getContrastRatio = (defaultColor, highlightColor, textColor) => {
45
45
  try {
46
46
  const contrastRatio = calcContrastRatio(getForegroundColor(textColor, defaultColor), getBackgroundColor(highlightColor));
47
47
  return contrastRatio;
48
- }
49
- // if we failed to calculate the contrast ratio, return null
50
- catch {
48
+ } catch {
49
+ // if we failed to calculate the contrast ratio, return null
51
50
  return null;
52
51
  }
53
52
  };
@@ -46,16 +46,9 @@ export var textColorPlugin = function textColorPlugin(_ref) {
46
46
  });
47
47
  };
48
48
  if (isToolbarAIFCEnabled) {
49
- if (fg('platform_editor_toolbar_aifc_text_color_config')) {
50
- var _api$toolbar;
51
- if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents && isToolbarComponentEnabled(pluginConfig(textColorConfig))) {
52
- api.toolbar.actions.registerComponents(getToolbarComponents(api));
53
- }
54
- } else {
55
- var _api$toolbar2;
56
- if (api !== null && api !== void 0 && (_api$toolbar2 = api.toolbar) !== null && _api$toolbar2 !== void 0 && _api$toolbar2.actions.registerComponents) {
57
- api.toolbar.actions.registerComponents(getToolbarComponents(api));
58
- }
49
+ var _api$toolbar;
50
+ if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents && isToolbarComponentEnabled(pluginConfig(textColorConfig))) {
51
+ api.toolbar.actions.registerComponents(getToolbarComponents(api));
59
52
  }
60
53
  } else {
61
54
  var _api$primaryToolbar;
@@ -45,9 +45,8 @@ var getContrastRatio = function getContrastRatio(defaultColor, highlightColor, t
45
45
  try {
46
46
  var contrastRatio = calcContrastRatio(getForegroundColor(textColor, defaultColor), getBackgroundColor(highlightColor));
47
47
  return contrastRatio;
48
- }
49
- // if we failed to calculate the contrast ratio, return null
50
- catch (_unused) {
48
+ } catch (_unused) {
49
+ // if we failed to calculate the contrast ratio, return null
51
50
  return null;
52
51
  }
53
52
  };
@@ -4,5 +4,5 @@ import type { TextColorPlugin } from '../textColorPluginType';
4
4
  type ColorAccessibilityMenuItemProps = {
5
5
  api: ExtractInjectionAPI<TextColorPlugin> | undefined;
6
6
  };
7
- export declare const ColorAccessibilityMenuItem: ({ api }: ColorAccessibilityMenuItemProps) => React.JSX.Element;
7
+ export declare const ColorAccessibilityMenuItem: ({ api, }: ColorAccessibilityMenuItemProps) => React.JSX.Element;
8
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "12.2.0",
3
+ "version": "12.3.0",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -27,7 +27,7 @@
27
27
  "@atlaskit/editor-palette": "^3.1.0",
28
28
  "@atlaskit/editor-plugin-analytics": "^12.0.0",
29
29
  "@atlaskit/editor-plugin-highlight": "^12.1.0",
30
- "@atlaskit/editor-plugin-interaction": "^21.0.0",
30
+ "@atlaskit/editor-plugin-interaction": "^22.0.0",
31
31
  "@atlaskit/editor-plugin-primary-toolbar": "^13.0.0",
32
32
  "@atlaskit/editor-plugin-selection-toolbar": "^13.0.0",
33
33
  "@atlaskit/editor-plugin-toolbar": "^9.0.0",
@@ -37,17 +37,17 @@
37
37
  "@atlaskit/editor-toolbar-model": "^1.0.0",
38
38
  "@atlaskit/heading": "^6.0.0",
39
39
  "@atlaskit/icon": "^36.0.0",
40
- "@atlaskit/icon-lab": "^7.0.0",
40
+ "@atlaskit/icon-lab": "^7.1.0",
41
41
  "@atlaskit/platform-feature-flags": "^2.0.0",
42
42
  "@atlaskit/platform-feature-flags-react": "^1.0.0",
43
43
  "@atlaskit/primitives": "^20.0.0",
44
- "@atlaskit/tmp-editor-statsig": "^109.0.0",
45
- "@atlaskit/tokens": "^14.0.0",
44
+ "@atlaskit/tmp-editor-statsig": "^111.0.0",
45
+ "@atlaskit/tokens": "^15.0.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "@emotion/react": "^11.7.1"
48
48
  },
49
49
  "peerDependencies": {
50
- "@atlaskit/editor-common": "^116.6.0",
50
+ "@atlaskit/editor-common": "^116.11.0",
51
51
  "react": "^18.2.0",
52
52
  "react-dom": "^18.2.0",
53
53
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -57,7 +57,7 @@
57
57
  "@testing-library/react": "^16.3.0",
58
58
  "react": "^18.2.0",
59
59
  "react-dom": "^18.2.0",
60
- "react-intl": "^6.6.2",
60
+ "react-intl": "^7.0.0",
61
61
  "wait-for-expect": "^1.2.0"
62
62
  },
63
63
  "techstack": {
@@ -99,9 +99,6 @@
99
99
  "platform-feature-flags": {
100
100
  "platform_editor_use_preferences_plugin": {
101
101
  "type": "boolean"
102
- },
103
- "platform_editor_toolbar_aifc_text_color_config": {
104
- "type": "boolean"
105
102
  }
106
103
  }
107
104
  }