@atlaskit/editor-plugin-text-color 30.0.21 → 31.1.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,26 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 31.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c13b574ab38d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c13b574ab38d2) -
8
+ Declare the workspace dependencies used by package source and emitted types so isolated
9
+ installations can resolve them.
10
+
11
+ ### Patch Changes
12
+
13
+ - [`cf5488765ee65`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cf5488765ee65) -
14
+ Remove the `control` branches of experiment `platform_editor_controls`; the editor controls
15
+ (`variant1`) experience is now permanent.
16
+ - Updated dependencies
17
+
18
+ ## 31.0.0
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 30.0.21
4
25
 
5
26
  ### Patch Changes
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.textColorPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _textColor = require("@atlaskit/adf-schema/text-color");
10
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
11
10
  var _changeColor2 = require("./editor-commands/change-color");
12
11
  var _palette = require("./editor-commands/palette");
13
12
  var _changeColor3 = require("./pm-plugins/commands/change-color");
@@ -117,9 +116,7 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
117
116
  selectionToolbar: function selectionToolbar() {
118
117
  var _api$userPreferences;
119
118
  var toolbarDocking = api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.currentState()) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.preferences.toolbarDockingPosition;
120
- if (toolbarDocking === 'none' && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1', {
121
- exposure: true
122
- })) {
119
+ if (toolbarDocking === 'none') {
123
120
  var toolbarCustom = {
124
121
  type: 'custom',
125
122
  render: function render(view, _idx, dispatchAnalyticsEvent) {
@@ -31,11 +31,9 @@ var _text = require("@atlaskit/editor-palette/text");
31
31
  var _constants = require("@atlaskit/editor-shared-styles/constants");
32
32
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
33
33
  var _textStyle = _interopRequireDefault(require("@atlaskit/icon/core/text-style"));
34
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
35
34
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
36
35
  var _changeColor = require("../../pm-plugins/commands/change-color");
37
36
  var _inputType = require("../../pm-plugins/utils/inputType");
38
- var _types2 = require("../../types");
39
37
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
40
38
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
41
39
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
@@ -144,7 +142,6 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
144
142
  popupsMountPoint = _this$props.popupsMountPoint,
145
143
  popupsBoundariesElement = _this$props.popupsBoundariesElement,
146
144
  popupsScrollableElement = _this$props.popupsScrollableElement,
147
- isReducedSpacing = _this$props.isReducedSpacing,
148
145
  pluginState = _this$props.pluginState,
149
146
  formatMessage = _this$props.intl.formatMessage,
150
147
  disabled = _this$props.disabled,
@@ -174,7 +171,6 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
174
171
  var _getSelectedRowAndCol = (0, _utils.getSelectedRowAndColumnFromPalette)(palette, pluginState.color, colorPickerColumns),
175
172
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
176
173
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
177
- var reducedSpacing = this.props.toolbarType === _types2.ToolbarType.FLOATING ? 'compact' : 'none';
178
174
  return (0, _react2.jsx)("span", {
179
175
  css:
180
176
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -200,7 +196,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
200
196
  },
201
197
  trigger: (0, _react2.jsx)(_ToolbarButton.default, {
202
198
  buttonId: _toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.TEXT_COLOR,
203
- spacing: !isReducedSpacing || (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? 'default' : reducedSpacing,
199
+ spacing: "default",
204
200
  disabled: disabled || pluginState.disabled,
205
201
  selected: isOpen,
206
202
  "aria-label": labelTextColor,
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { textColor } from '@atlaskit/adf-schema/text-color';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
4
3
  import { changeColor as changeColorCommand } from './editor-commands/change-color';
5
4
  import { setPalette } from './editor-commands/palette';
6
5
  import { changeColor } from './pm-plugins/commands/change-color';
@@ -108,9 +107,7 @@ export const textColorPlugin = ({
108
107
  selectionToolbar: () => {
109
108
  var _api$userPreferences, _api$userPreferences$, _api$userPreferences$2;
110
109
  const toolbarDocking = api === null || api === void 0 ? void 0 : (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 ? void 0 : (_api$userPreferences$ = _api$userPreferences.sharedState) === null || _api$userPreferences$ === void 0 ? void 0 : (_api$userPreferences$2 = _api$userPreferences$.currentState()) === null || _api$userPreferences$2 === void 0 ? void 0 : _api$userPreferences$2.preferences.toolbarDockingPosition;
111
- if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
112
- exposure: true
113
- })) {
110
+ if (toolbarDocking === 'none') {
114
111
  const toolbarCustom = {
115
112
  type: 'custom',
116
113
  render: (view, _idx, dispatchAnalyticsEvent) => {
@@ -24,11 +24,9 @@ import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
24
24
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
25
25
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
26
26
  import TextStyleIcon from '@atlaskit/icon/core/text-style';
27
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
28
27
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
29
28
  import { changeColor as changeColorWithAnalytics } from '../../pm-plugins/commands/change-color';
30
29
  import { getInputMethod } from '../../pm-plugins/utils/inputType';
31
- import { ToolbarType } from '../../types';
32
30
  const addMarginToWrapper = css({
33
31
  marginRight: "var(--ds-space-050, 4px)"
34
32
  });
@@ -122,7 +120,6 @@ export class ToolbarTextColor extends React.Component {
122
120
  popupsMountPoint,
123
121
  popupsBoundariesElement,
124
122
  popupsScrollableElement,
125
- isReducedSpacing,
126
123
  pluginState,
127
124
  intl: {
128
125
  formatMessage
@@ -154,7 +151,6 @@ export class ToolbarTextColor extends React.Component {
154
151
  selectedRowIndex,
155
152
  selectedColumnIndex
156
153
  } = getSelectedRowAndColumnFromPalette(palette, pluginState.color, colorPickerColumns);
157
- const reducedSpacing = this.props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
158
154
  return jsx("span", {
159
155
  css:
160
156
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -180,7 +176,7 @@ export class ToolbarTextColor extends React.Component {
180
176
  },
181
177
  trigger: jsx(ToolbarButton, {
182
178
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
183
- spacing: !isReducedSpacing || editorExperiment('platform_editor_controls', 'variant1') ? 'default' : reducedSpacing,
179
+ spacing: "default",
184
180
  disabled: disabled || pluginState.disabled,
185
181
  selected: isOpen,
186
182
  "aria-label": labelTextColor,
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { textColor } from '@atlaskit/adf-schema/text-color';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
4
3
  import { changeColor as changeColorCommand } from './editor-commands/change-color';
5
4
  import { setPalette as _setPalette } from './editor-commands/palette';
6
5
  import { changeColor as _changeColor } from './pm-plugins/commands/change-color';
@@ -110,9 +109,7 @@ export var textColorPlugin = function textColorPlugin(_ref) {
110
109
  selectionToolbar: function selectionToolbar() {
111
110
  var _api$userPreferences;
112
111
  var toolbarDocking = api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.currentState()) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.preferences.toolbarDockingPosition;
113
- if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
114
- exposure: true
115
- })) {
112
+ if (toolbarDocking === 'none') {
116
113
  var toolbarCustom = {
117
114
  type: 'custom',
118
115
  render: function render(view, _idx, dispatchAnalyticsEvent) {
@@ -34,11 +34,9 @@ import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
34
34
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
35
35
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
36
36
  import TextStyleIcon from '@atlaskit/icon/core/text-style';
37
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
38
37
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
39
38
  import { changeColor as changeColorWithAnalytics } from '../../pm-plugins/commands/change-color';
40
39
  import { getInputMethod } from '../../pm-plugins/utils/inputType';
41
- import { ToolbarType } from '../../types';
42
40
  var addMarginToWrapper = css({
43
41
  marginRight: "var(--ds-space-050, 4px)"
44
42
  });
@@ -140,7 +138,6 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
140
138
  popupsMountPoint = _this$props.popupsMountPoint,
141
139
  popupsBoundariesElement = _this$props.popupsBoundariesElement,
142
140
  popupsScrollableElement = _this$props.popupsScrollableElement,
143
- isReducedSpacing = _this$props.isReducedSpacing,
144
141
  pluginState = _this$props.pluginState,
145
142
  formatMessage = _this$props.intl.formatMessage,
146
143
  disabled = _this$props.disabled,
@@ -170,7 +167,6 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
170
167
  var _getSelectedRowAndCol = getSelectedRowAndColumnFromPalette(palette, pluginState.color, colorPickerColumns),
171
168
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
172
169
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
173
- var reducedSpacing = this.props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
174
170
  return jsx("span", {
175
171
  css:
176
172
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -196,7 +192,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
196
192
  },
197
193
  trigger: jsx(ToolbarButton, {
198
194
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
199
- spacing: !isReducedSpacing || editorExperiment('platform_editor_controls', 'variant1') ? 'default' : reducedSpacing,
195
+ spacing: "default",
200
196
  disabled: disabled || pluginState.disabled,
201
197
  selected: isOpen,
202
198
  "aria-label": labelTextColor,
@@ -11,7 +11,7 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-edi
11
11
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
12
12
  import type { TextColorPluginState } from '../../pm-plugins/main';
13
13
  import type { TextColorPlugin } from '../../textColorPluginType';
14
- import { ToolbarType } from '../../types';
14
+ import type { ToolbarType } from '../../types';
15
15
  export interface State {
16
16
  isOpen: boolean;
17
17
  isOpenedByKeyboard: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "30.0.21",
3
+ "version": "31.1.0",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,12 +30,13 @@
30
30
  "@atlaskit/button": "^25.8.0",
31
31
  "@atlaskit/css": "^1.1.0",
32
32
  "@atlaskit/editor-palette": "^3.5.0",
33
- "@atlaskit/editor-plugin-analytics": "^30.0.0",
34
- "@atlaskit/editor-plugin-highlight": "^30.0.0",
35
- "@atlaskit/editor-plugin-interaction": "^44.0.0",
36
- "@atlaskit/editor-plugin-primary-toolbar": "^31.0.0",
37
- "@atlaskit/editor-plugin-selection-toolbar": "^31.0.0",
38
- "@atlaskit/editor-plugin-toolbar": "^27.1.0",
33
+ "@atlaskit/editor-plugin-analytics": "^31.0.0",
34
+ "@atlaskit/editor-plugin-highlight": "^31.1.0",
35
+ "@atlaskit/editor-plugin-interaction": "^45.0.0",
36
+ "@atlaskit/editor-plugin-primary-toolbar": "^32.0.0",
37
+ "@atlaskit/editor-plugin-selection-toolbar": "^32.0.0",
38
+ "@atlaskit/editor-plugin-toolbar": "^28.0.0",
39
+ "@atlaskit/editor-plugin-user-preferences": "^29.0.0",
39
40
  "@atlaskit/editor-prosemirror": "^9.0.0",
40
41
  "@atlaskit/editor-shared-styles": "^5.1.0",
41
42
  "@atlaskit/editor-toolbar": "^2.11.0",
@@ -51,13 +52,13 @@
51
52
  "@emotion/react": "^11.7.1"
52
53
  },
53
54
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^134.20.0",
55
+ "@atlaskit/editor-common": "^135.3.0",
55
56
  "react": "^18.2.0 || ^19.2.0",
56
57
  "react-dom": "^18.2.0 || ^19.2.0",
57
58
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
58
59
  },
59
60
  "devDependencies": {
60
- "@atlaskit/editor-common": "^134.20.0",
61
+ "@atlaskit/editor-common": "^135.3.0",
61
62
  "@atlassian/structured-docs-types": "workspace:^",
62
63
  "@atlassian/workbench": "workspace:*",
63
64
  "react": "^19.2.0",