@atlaskit/editor-plugin-text-color 1.20.0 → 2.0.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 CHANGED
@@ -1,5 +1,35 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#120533](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120533)
8
+ [`f1bec731e278f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1bec731e278f) -
9
+ Adds a `sideEffects` field to ensure this package does not have Compiled styles tree-shaken in the
10
+ future to avoid an accidental regression.
11
+
12
+ This is related to
13
+ https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953
14
+
15
+ ## 2.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - [#117363](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117363)
20
+ [`10a0f7f6c2027`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10a0f7f6c2027) -
21
+ This package's `peerDependencies` have been adjusted for `react` and/or `react-dom` to reflect the
22
+ status of only supporting React 18 going forward. No explicit breaking change to React support has
23
+ been made in this release, but this is to signify going forward, breaking changes for React 16 or
24
+ React 17 may come via non-major semver releases.
25
+
26
+ Please refer this community post for more details:
27
+ https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies
32
+
3
33
  ## 1.20.0
4
34
 
5
35
  ### Minor Changes
@@ -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,
@@ -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,
@@ -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": "1.20.0",
3
+ "version": "2.0.1",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -25,32 +25,34 @@
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": "^99.18.0",
36
- "@atlaskit/editor-palette": "1.7.0",
37
- "@atlaskit/editor-plugin-analytics": "^1.12.0",
38
- "@atlaskit/editor-plugin-primary-toolbar": "^2.3.0",
39
- "@atlaskit/editor-plugin-selection-toolbar": "^1.9.0",
37
+ "@atlaskit/editor-common": "^100.4.0",
38
+ "@atlaskit/editor-palette": "2.0.0",
39
+ "@atlaskit/editor-plugin-analytics": "^2.0.0",
40
+ "@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
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": "^23.11.0",
45
+ "@atlaskit/icon": "^24.1.0",
44
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/theme": "^16.0.0",
46
- "@atlaskit/tmp-editor-statsig": "^2.47.0",
47
- "@atlaskit/tokens": "^3.3.0",
47
+ "@atlaskit/theme": "^17.0.0",
48
+ "@atlaskit/tmp-editor-statsig": "^3.3.0",
49
+ "@atlaskit/tokens": "^4.2.0",
48
50
  "@babel/runtime": "^7.0.0",
49
51
  "@emotion/react": "^11.7.1"
50
52
  },
51
53
  "peerDependencies": {
52
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0",
53
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.2.0",
54
+ "react": "^18.2.0",
55
+ "react-dom": "^18.2.0",
54
56
  "react-intl-next": "npm:react-intl@^5.18.1"
55
57
  },
56
58
  "devDependencies": {