@atlaskit/editor-plugin-text-color 2.0.0 → 2.0.2

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,25 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 2.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#120931](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120931)
8
+ [`624b97c021fea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/624b97c021fea) -
9
+ [ux] ED-26676 revert to existing primary toolbar components
10
+
11
+ ## 2.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#120533](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120533)
16
+ [`f1bec731e278f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1bec731e278f) -
17
+ Adds a `sideEffects` field to ensure this package does not have Compiled styles tree-shaken in the
18
+ future to avoid an accidental regression.
19
+
20
+ This is related to
21
+ https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953
22
+
3
23
  ## 2.0.0
4
24
 
5
25
  ### Major Changes
@@ -30,15 +30,6 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
30
30
  isToolbarReducedSpacing = _ref2.isToolbarReducedSpacing,
31
31
  dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
32
32
  disabled = _ref2.disabled;
33
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
34
- exposure: true
35
- })) {
36
- return /*#__PURE__*/_react.default.createElement(_FloatingToolbarComponent.FloatingToolbarComponent, {
37
- editorView: editorView,
38
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
39
- api: api
40
- });
41
- }
42
33
  return /*#__PURE__*/_react.default.createElement(_PrimaryToolbarComponent.PrimaryToolbarComponent, {
43
34
  isReducedSpacing: isToolbarReducedSpacing,
44
35
  editorView: editorView,
@@ -26,6 +26,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
26
26
  var _textStyle = _interopRequireDefault(require("@atlaskit/icon/core/text-style"));
27
27
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
28
28
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
29
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
29
30
  var _changeColor = require("../../pm-plugins/commands/change-color");
30
31
  var _inputType = require("../../pm-plugins/utils/inputType");
31
32
  var _types = require("../../types");
@@ -200,7 +201,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
200
201
  },
201
202
  trigger: (0, _react2.jsx)(_uiMenu.ToolbarButton, {
202
203
  buttonId: _uiMenu.TOOLBAR_BUTTON.TEXT_COLOR,
203
- spacing: isReducedSpacing ? reducedSpacing : 'default',
204
+ spacing: !isReducedSpacing || (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? 'default' : reducedSpacing,
204
205
  disabled: disabled || pluginState.disabled,
205
206
  selected: isOpen,
206
207
  "aria-label": labelTextColor,
@@ -25,15 +25,6 @@ export const textColorPlugin = ({
25
25
  dispatchAnalyticsEvent,
26
26
  disabled
27
27
  }) => {
28
- if (editorExperiment('platform_editor_controls', 'variant1', {
29
- exposure: true
30
- })) {
31
- return /*#__PURE__*/React.createElement(FloatingToolbarComponent, {
32
- editorView: editorView,
33
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
34
- api: api
35
- });
36
- }
37
28
  return /*#__PURE__*/React.createElement(PrimaryToolbarComponent, {
38
29
  isReducedSpacing: isToolbarReducedSpacing,
39
30
  editorView: editorView,
@@ -6,7 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
6
  import React from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { jsx, css } from '@emotion/react';
9
+ import { css, jsx } from '@emotion/react';
10
10
  import { injectIntl } from 'react-intl-next';
11
11
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
12
12
  import { DynamicStrokeIconDecoration, SteppedRainbowIconDecoration } from '@atlaskit/editor-common/icons';
@@ -19,6 +19,7 @@ import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
19
19
  import TextStyleIcon from '@atlaskit/icon/core/text-style';
20
20
  import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
22
23
  import { changeColor as changeColorWithAnalytics } from '../../pm-plugins/commands/change-color';
23
24
  import { getInputMethod } from '../../pm-plugins/utils/inputType';
24
25
  import { ToolbarType } from '../../types';
@@ -182,7 +183,7 @@ export class ToolbarTextColor extends React.Component {
182
183
  },
183
184
  trigger: jsx(ToolbarButton, {
184
185
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
185
- spacing: isReducedSpacing ? reducedSpacing : 'default',
186
+ spacing: !isReducedSpacing || editorExperiment('platform_editor_controls', 'variant1') ? 'default' : reducedSpacing,
186
187
  disabled: disabled || pluginState.disabled,
187
188
  selected: isOpen,
188
189
  "aria-label": labelTextColor,
@@ -23,15 +23,6 @@ export var textColorPlugin = function textColorPlugin(_ref) {
23
23
  isToolbarReducedSpacing = _ref2.isToolbarReducedSpacing,
24
24
  dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
25
25
  disabled = _ref2.disabled;
26
- if (editorExperiment('platform_editor_controls', 'variant1', {
27
- exposure: true
28
- })) {
29
- return /*#__PURE__*/React.createElement(FloatingToolbarComponent, {
30
- editorView: editorView,
31
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
32
- api: api
33
- });
34
- }
35
26
  return /*#__PURE__*/React.createElement(PrimaryToolbarComponent, {
36
27
  isReducedSpacing: isToolbarReducedSpacing,
37
28
  editorView: editorView,
@@ -16,7 +16,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
16
16
  import React from 'react';
17
17
 
18
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
- import { jsx, css } from '@emotion/react';
19
+ import { css, jsx } from '@emotion/react';
20
20
  import { injectIntl } from 'react-intl-next';
21
21
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
22
22
  import { DynamicStrokeIconDecoration, SteppedRainbowIconDecoration } from '@atlaskit/editor-common/icons';
@@ -29,6 +29,7 @@ import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
29
29
  import TextStyleIcon from '@atlaskit/icon/core/text-style';
30
30
  import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
31
31
  import { fg } from '@atlaskit/platform-feature-flags';
32
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
32
33
  import { changeColor as changeColorWithAnalytics } from '../../pm-plugins/commands/change-color';
33
34
  import { getInputMethod } from '../../pm-plugins/utils/inputType';
34
35
  import { ToolbarType } from '../../types';
@@ -196,7 +197,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
196
197
  },
197
198
  trigger: jsx(ToolbarButton, {
198
199
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
199
- spacing: isReducedSpacing ? reducedSpacing : 'default',
200
+ spacing: !isReducedSpacing || editorExperiment('platform_editor_controls', 'variant1') ? 'default' : reducedSpacing,
200
201
  disabled: disabled || pluginState.disabled,
201
202
  selected: isOpen,
202
203
  "aria-label": labelTextColor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -25,26 +25,28 @@
25
25
  ]
26
26
  }
27
27
  },
28
- "sideEffects": false,
28
+ "sideEffects": [
29
+ "*.compiled.css"
30
+ ],
29
31
  "atlaskit:src": "src/index.ts",
30
32
  "af:exports": {
31
33
  ".": "./src/index.ts"
32
34
  },
33
35
  "dependencies": {
34
36
  "@atlaskit/adf-schema": "^47.2.1",
35
- "@atlaskit/editor-common": "^100.0.0",
37
+ "@atlaskit/editor-common": "^100.4.0",
36
38
  "@atlaskit/editor-palette": "2.0.0",
37
39
  "@atlaskit/editor-plugin-analytics": "^2.0.0",
38
40
  "@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
39
41
  "@atlaskit/editor-plugin-selection-toolbar": "^2.0.0",
40
42
  "@atlaskit/editor-prosemirror": "7.0.0",
41
- "@atlaskit/editor-shared-styles": "^3.3.0",
43
+ "@atlaskit/editor-shared-styles": "^3.4.0",
42
44
  "@atlaskit/editor-tables": "^2.9.0",
43
- "@atlaskit/icon": "^24.0.0",
45
+ "@atlaskit/icon": "^24.1.0",
44
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
47
  "@atlaskit/theme": "^17.0.0",
46
- "@atlaskit/tmp-editor-statsig": "^3.0.0",
47
- "@atlaskit/tokens": "^4.0.0",
48
+ "@atlaskit/tmp-editor-statsig": "^3.3.0",
49
+ "@atlaskit/tokens": "^4.3.0",
48
50
  "@babel/runtime": "^7.0.0",
49
51
  "@emotion/react": "^11.7.1"
50
52
  },