@atlaskit/editor-plugin-text-color 3.1.2 → 3.1.4

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
+ ## 3.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#197017](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/197017)
8
+ [`5ef01d09bada1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5ef01d09bada1) -
9
+ [ux] ED-28687 [Register] Text colour + highlight
10
+ - Updated dependencies
11
+
12
+ ## 3.1.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [#195649](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/195649)
17
+ [`231bb33e06dfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/231bb33e06dfe) -
18
+ EDITOR-1131 Bump adf-schema version to 50.2.0
19
+ - Updated dependencies
20
+
3
21
  ## 3.1.2
4
22
 
5
23
  ### Patch Changes
@@ -8,11 +8,13 @@ exports.textColorPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _adfSchema = require("@atlaskit/adf-schema");
10
10
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
13
  var _changeColor2 = require("./pm-plugins/commands/change-color");
13
14
  var _main = require("./pm-plugins/main");
14
15
  var _FloatingToolbarComponent = require("./ui/FloatingToolbarComponent");
15
16
  var _PrimaryToolbarComponent = require("./ui/PrimaryToolbarComponent");
17
+ var _toolbarComponents = require("./ui/toolbar-components");
16
18
  var pluginConfig = function pluginConfig(textColorConfig) {
17
19
  if (!textColorConfig || typeof textColorConfig === 'boolean') {
18
20
  return undefined;
@@ -20,9 +22,9 @@ var pluginConfig = function pluginConfig(textColorConfig) {
20
22
  return textColorConfig;
21
23
  };
22
24
  var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
23
- var _api$primaryToolbar;
24
25
  var textColorConfig = _ref.config,
25
26
  api = _ref.api;
27
+ var isToolbarAifcEnabled = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true);
26
28
  var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
27
29
  var editorView = _ref2.editorView,
28
30
  popupsMountPoint = _ref2.popupsMountPoint,
@@ -42,10 +44,18 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
42
44
  api: api
43
45
  });
44
46
  };
45
- api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
46
- name: 'textColor',
47
- component: primaryToolbarComponent
48
- });
47
+ if (isToolbarAifcEnabled) {
48
+ var _api$toolbar;
49
+ if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents) {
50
+ api.toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api));
51
+ }
52
+ } else {
53
+ var _api$primaryToolbar;
54
+ api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
55
+ name: 'textColor',
56
+ component: primaryToolbarComponent
57
+ });
58
+ }
49
59
  return {
50
60
  name: 'textColor',
51
61
  marks: function marks() {
@@ -75,7 +85,7 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
75
85
  return (0, _changeColor2.changeColor)(color, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, inputMethod);
76
86
  }
77
87
  },
78
- pluginsOptions: {
88
+ pluginsOptions: !isToolbarAifcEnabled ? {
79
89
  selectionToolbar: function selectionToolbar() {
80
90
  var _api$userPreferences, _api$selectionToolbar;
81
91
  var toolbarDocking = (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin') ? 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 : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
@@ -106,7 +116,7 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
106
116
  return undefined;
107
117
  }
108
118
  }
109
- },
119
+ } : {},
110
120
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
111
121
  };
112
122
  };
@@ -0,0 +1,4 @@
1
+ ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
2
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
3
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
4
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -0,0 +1,42 @@
1
+ /* TextColorHighlightMenu.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.TextColorHighlightMenu = void 0;
9
+ require("./TextColorHighlightMenu.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _reactIntlNext = require("react-intl-next");
13
+ var _messages = require("@atlaskit/editor-common/messages");
14
+ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
15
+ var _editorToolbar = require("@atlaskit/editor-toolbar");
16
+ var _compiled = require("@atlaskit/primitives/compiled");
17
+ var styles = {
18
+ menu: "_ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc"
19
+ };
20
+ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
21
+ var children = _ref.children,
22
+ api = _ref.api;
23
+ var isTextColorDisabled = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.disabled');
24
+ var _useIntl = (0, _reactIntlNext.useIntl)(),
25
+ formatMessage = _useIntl.formatMessage;
26
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
27
+ iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarColorSwatch, {
28
+ highlightColor: "var(--ds-background-accent-blue-subtlest, #E9F2FF)"
29
+ }, /*#__PURE__*/_react.default.createElement(_editorToolbar.TextColorIcon, {
30
+ label: formatMessage(_messages.textColorMessages.textColorTooltip),
31
+ iconColor: "var(--ds-text-accent-magenta, #943D73)",
32
+ shouldRecommendSmallIcon: true,
33
+ size: 'small',
34
+ isDisabled: isTextColorDisabled,
35
+ spacing: 'compact'
36
+ })),
37
+ isDisabled: isTextColorDisabled,
38
+ testId: "text-color-highlight-menu"
39
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
40
+ xcss: styles.menu
41
+ }, children));
42
+ };
@@ -0,0 +1,2 @@
1
+
2
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}._18u0x0bf{margin-left:var(--ds-space-negative-100,-8px)}
@@ -0,0 +1,54 @@
1
+ /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.TextColorMenuItem = TextColorMenuItem;
9
+ require("./TextColorMenuItem.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _reactIntlNext = require("react-intl-next");
13
+ var _hooks = require("@atlaskit/editor-common/hooks");
14
+ var _messages = require("@atlaskit/editor-common/messages");
15
+ var _uiColor = require("@atlaskit/editor-common/ui-color");
16
+ var _editorPalette = require("@atlaskit/editor-palette");
17
+ var _editorToolbar = require("@atlaskit/editor-toolbar");
18
+ var _compiled = require("@atlaskit/primitives/compiled");
19
+ var styles = {
20
+ container: "_zulpu2gc",
21
+ colorPalette: "_18u0x0bf"
22
+ };
23
+ function TextColorMenuItem(_ref) {
24
+ var api = _ref.api;
25
+ var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['textColor'], function (states) {
26
+ var _states$textColorStat, _states$textColorStat2, _states$textColorStat3;
27
+ return {
28
+ color: (_states$textColorStat = states.textColorState) === null || _states$textColorStat === void 0 ? void 0 : _states$textColorStat.color,
29
+ defaultColor: ((_states$textColorStat2 = states.textColorState) === null || _states$textColorStat2 === void 0 ? void 0 : _states$textColorStat2.defaultColor) || null,
30
+ palette: ((_states$textColorStat3 = states.textColorState) === null || _states$textColorStat3 === void 0 ? void 0 : _states$textColorStat3.palette) || []
31
+ };
32
+ }),
33
+ color = _useSharedPluginState.color,
34
+ defaultColor = _useSharedPluginState.defaultColor,
35
+ palette = _useSharedPluginState.palette;
36
+ var _useIntl = (0, _reactIntlNext.useIntl)(),
37
+ formatMessage = _useIntl.formatMessage;
38
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, null, /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
39
+ xcss: styles.container,
40
+ testId: "text-color-menu-item"
41
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
42
+ weight: "bold"
43
+ }, formatMessage(_messages.textColorMessages.textColorTooltip)), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
44
+ xcss: styles.colorPalette
45
+ }, /*#__PURE__*/_react.default.createElement(_uiColor.ColorPalette, {
46
+ onClick: function onClick() {},
47
+ selectedColor: color || defaultColor,
48
+ paletteOptions: {
49
+ palette: palette,
50
+ hexToPaletteColor: _editorPalette.hexToEditorTextPaletteColor,
51
+ paletteColorTooltipMessages: _uiColor.textPaletteTooltipMessages
52
+ }
53
+ }))));
54
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getToolbarComponents = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _toolbar = require("@atlaskit/editor-common/toolbar");
11
+ var _TextColorHighlightMenu = require("./TextColorHighlightMenu");
12
+ var _TextColorMenuItem = require("./TextColorMenuItem");
13
+ 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; }
14
+ 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; }
15
+ var getToolbarComponents = exports.getToolbarComponents = function getToolbarComponents(api) {
16
+ return [_objectSpread(_objectSpread({}, _toolbar.TEXT_COLOR_HIGHLIGHT_GROUP), {}, {
17
+ parents: [_objectSpread(_objectSpread({}, _toolbar.TEXT_SECTION), {}, {
18
+ rank: _toolbar.TEXT_SECTION_RANK[_toolbar.TEXT_COLOR_HIGHLIGHT_GROUP.key]
19
+ })]
20
+ }), _objectSpread(_objectSpread({}, _toolbar.TEXT_COLOR_HIGHLIGHT_MENU), {}, {
21
+ parents: [_objectSpread(_objectSpread({}, _toolbar.TEXT_COLOR_HIGHLIGHT_GROUP), {}, {
22
+ rank: _toolbar.TEXT_COLOR_HIGHLIGHT_GROUP_RANK[_toolbar.TEXT_COLOR_HIGHLIGHT_MENU.key]
23
+ })],
24
+ component: function component(_ref) {
25
+ var children = _ref.children;
26
+ return /*#__PURE__*/_react.default.createElement(_TextColorHighlightMenu.TextColorHighlightMenu, {
27
+ api: api
28
+ }, children);
29
+ }
30
+ }), _objectSpread(_objectSpread({}, _toolbar.TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
31
+ parents: [_objectSpread(_objectSpread({}, _toolbar.TEXT_COLOR_HIGHLIGHT_MENU), {}, {
32
+ rank: _toolbar.TEXT_COLOR_HIGHLIGHT_MENU_RANK[_toolbar.TEXT_COLOR_HIGHLIGHT_MENU_SECTION.key]
33
+ })]
34
+ }), _objectSpread(_objectSpread({}, _toolbar.TEXT_COLOR_MENU_ITEM), {}, {
35
+ parents: [_objectSpread(_objectSpread({}, _toolbar.TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
36
+ rank: _toolbar.TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK[_toolbar.TEXT_COLOR_MENU_ITEM.key]
37
+ })],
38
+ component: function component() {
39
+ return /*#__PURE__*/_react.default.createElement(_TextColorMenuItem.TextColorMenuItem, {
40
+ api: api
41
+ });
42
+ }
43
+ })];
44
+ };
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { textColor } from '@atlaskit/adf-schema';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
6
  import { changeColor } from './pm-plugins/commands/change-color';
6
7
  import { createPlugin, pluginKey as textColorPluginKey } from './pm-plugins/main';
7
8
  import { FloatingToolbarComponent } from './ui/FloatingToolbarComponent';
8
9
  import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
10
+ import { getToolbarComponents } from './ui/toolbar-components';
9
11
  const pluginConfig = textColorConfig => {
10
12
  if (!textColorConfig || typeof textColorConfig === 'boolean') {
11
13
  return undefined;
@@ -16,7 +18,7 @@ export const textColorPlugin = ({
16
18
  config: textColorConfig,
17
19
  api
18
20
  }) => {
19
- var _api$primaryToolbar;
21
+ const isToolbarAifcEnabled = expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true);
20
22
  const primaryToolbarComponent = ({
21
23
  editorView,
22
24
  popupsMountPoint,
@@ -37,10 +39,18 @@ export const textColorPlugin = ({
37
39
  api: api
38
40
  });
39
41
  };
40
- api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
41
- name: 'textColor',
42
- component: primaryToolbarComponent
43
- });
42
+ if (isToolbarAifcEnabled) {
43
+ var _api$toolbar;
44
+ if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents) {
45
+ api.toolbar.actions.registerComponents(getToolbarComponents(api));
46
+ }
47
+ } else {
48
+ var _api$primaryToolbar;
49
+ api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
50
+ name: 'textColor',
51
+ component: primaryToolbarComponent
52
+ });
53
+ }
44
54
  return {
45
55
  name: 'textColor',
46
56
  marks() {
@@ -69,7 +79,7 @@ export const textColorPlugin = ({
69
79
  return changeColor(color, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, inputMethod);
70
80
  }
71
81
  },
72
- pluginsOptions: {
82
+ pluginsOptions: !isToolbarAifcEnabled ? {
73
83
  selectionToolbar: () => {
74
84
  var _api$userPreferences, _api$userPreferences$, _api$userPreferences$2, _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
75
85
  const toolbarDocking = fg('platform_editor_use_preferences_plugin') ? 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 : api === null || api === void 0 ? void 0 : (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 ? void 0 : (_api$selectionToolbar2 = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.currentState()) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.toolbarDocking;
@@ -100,7 +110,7 @@ export const textColorPlugin = ({
100
110
  return undefined;
101
111
  }
102
112
  }
103
- },
113
+ } : {},
104
114
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
105
115
  };
106
116
  };
@@ -0,0 +1,4 @@
1
+ ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
2
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
3
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
4
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -0,0 +1,37 @@
1
+ /* TextColorHighlightMenu.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./TextColorHighlightMenu.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
6
+ import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
7
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
8
+ import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
9
+ import { Box } from '@atlaskit/primitives/compiled';
10
+ const styles = {
11
+ menu: "_ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc"
12
+ };
13
+ export const TextColorHighlightMenu = ({
14
+ children,
15
+ api
16
+ }) => {
17
+ const isTextColorDisabled = useSharedPluginStateSelector(api, 'textColor.disabled');
18
+ const {
19
+ formatMessage
20
+ } = useIntl();
21
+ return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
22
+ iconBefore: /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
23
+ highlightColor: "var(--ds-background-accent-blue-subtlest, #E9F2FF)"
24
+ }, /*#__PURE__*/React.createElement(TextColorIcon, {
25
+ label: formatMessage(messages.textColorTooltip),
26
+ iconColor: "var(--ds-text-accent-magenta, #943D73)",
27
+ shouldRecommendSmallIcon: true,
28
+ size: 'small',
29
+ isDisabled: isTextColorDisabled,
30
+ spacing: 'compact'
31
+ })),
32
+ isDisabled: isTextColorDisabled,
33
+ testId: "text-color-highlight-menu"
34
+ }, /*#__PURE__*/React.createElement(Box, {
35
+ xcss: styles.menu
36
+ }, children));
37
+ };
@@ -0,0 +1,2 @@
1
+
2
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}._18u0x0bf{margin-left:var(--ds-space-negative-100,-8px)}
@@ -0,0 +1,50 @@
1
+ /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./TextColorMenuItem.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
6
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
7
+ import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
8
+ import { ColorPalette, textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
9
+ import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
10
+ import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
11
+ import { Stack, Box, Text } from '@atlaskit/primitives/compiled';
12
+ const styles = {
13
+ container: "_zulpu2gc",
14
+ colorPalette: "_18u0x0bf"
15
+ };
16
+ export function TextColorMenuItem({
17
+ api
18
+ }) {
19
+ const {
20
+ color,
21
+ defaultColor,
22
+ palette
23
+ } = useSharedPluginStateWithSelector(api, ['textColor'], states => {
24
+ var _states$textColorStat, _states$textColorStat2, _states$textColorStat3;
25
+ return {
26
+ color: (_states$textColorStat = states.textColorState) === null || _states$textColorStat === void 0 ? void 0 : _states$textColorStat.color,
27
+ defaultColor: ((_states$textColorStat2 = states.textColorState) === null || _states$textColorStat2 === void 0 ? void 0 : _states$textColorStat2.defaultColor) || null,
28
+ palette: ((_states$textColorStat3 = states.textColorState) === null || _states$textColorStat3 === void 0 ? void 0 : _states$textColorStat3.palette) || []
29
+ };
30
+ });
31
+ const {
32
+ formatMessage
33
+ } = useIntl();
34
+ return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, null, /*#__PURE__*/React.createElement(Stack, {
35
+ xcss: styles.container,
36
+ testId: "text-color-menu-item"
37
+ }, /*#__PURE__*/React.createElement(Text, {
38
+ weight: "bold"
39
+ }, formatMessage(messages.textColorTooltip)), /*#__PURE__*/React.createElement(Box, {
40
+ xcss: styles.colorPalette
41
+ }, /*#__PURE__*/React.createElement(ColorPalette, {
42
+ onClick: () => {},
43
+ selectedColor: color || defaultColor,
44
+ paletteOptions: {
45
+ palette: palette,
46
+ hexToPaletteColor: hexToEditorTextPaletteColor,
47
+ paletteColorTooltipMessages: textPaletteTooltipMessages
48
+ }
49
+ }))));
50
+ }
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { TEXT_SECTION, TEXT_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP, TEXT_COLOR_HIGHLIGHT_MENU, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_MENU_ITEM, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK } from '@atlaskit/editor-common/toolbar';
3
+ import { TextColorHighlightMenu } from './TextColorHighlightMenu';
4
+ import { TextColorMenuItem } from './TextColorMenuItem';
5
+ export const getToolbarComponents = api => {
6
+ return [{
7
+ ...TEXT_COLOR_HIGHLIGHT_GROUP,
8
+ parents: [{
9
+ ...TEXT_SECTION,
10
+ rank: TEXT_SECTION_RANK[TEXT_COLOR_HIGHLIGHT_GROUP.key]
11
+ }]
12
+ }, {
13
+ ...TEXT_COLOR_HIGHLIGHT_MENU,
14
+ parents: [{
15
+ ...TEXT_COLOR_HIGHLIGHT_GROUP,
16
+ rank: TEXT_COLOR_HIGHLIGHT_GROUP_RANK[TEXT_COLOR_HIGHLIGHT_MENU.key]
17
+ }],
18
+ component: ({
19
+ children
20
+ }) => /*#__PURE__*/React.createElement(TextColorHighlightMenu, {
21
+ api: api
22
+ }, children)
23
+ }, {
24
+ ...TEXT_COLOR_HIGHLIGHT_MENU_SECTION,
25
+ parents: [{
26
+ ...TEXT_COLOR_HIGHLIGHT_MENU,
27
+ rank: TEXT_COLOR_HIGHLIGHT_MENU_RANK[TEXT_COLOR_HIGHLIGHT_MENU_SECTION.key]
28
+ }]
29
+ }, {
30
+ ...TEXT_COLOR_MENU_ITEM,
31
+ parents: [{
32
+ ...TEXT_COLOR_HIGHLIGHT_MENU_SECTION,
33
+ rank: TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK[TEXT_COLOR_MENU_ITEM.key]
34
+ }],
35
+ component: () => /*#__PURE__*/React.createElement(TextColorMenuItem, {
36
+ api: api
37
+ })
38
+ }];
39
+ };
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { textColor } from '@atlaskit/adf-schema';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
6
  import { changeColor as _changeColor } from './pm-plugins/commands/change-color';
6
7
  import { createPlugin, pluginKey as textColorPluginKey } from './pm-plugins/main';
7
8
  import { FloatingToolbarComponent } from './ui/FloatingToolbarComponent';
8
9
  import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
10
+ import { getToolbarComponents } from './ui/toolbar-components';
9
11
  var pluginConfig = function pluginConfig(textColorConfig) {
10
12
  if (!textColorConfig || typeof textColorConfig === 'boolean') {
11
13
  return undefined;
@@ -13,9 +15,9 @@ var pluginConfig = function pluginConfig(textColorConfig) {
13
15
  return textColorConfig;
14
16
  };
15
17
  export var textColorPlugin = function textColorPlugin(_ref) {
16
- var _api$primaryToolbar;
17
18
  var textColorConfig = _ref.config,
18
19
  api = _ref.api;
20
+ var isToolbarAifcEnabled = expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true);
19
21
  var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
20
22
  var editorView = _ref2.editorView,
21
23
  popupsMountPoint = _ref2.popupsMountPoint,
@@ -35,10 +37,18 @@ export var textColorPlugin = function textColorPlugin(_ref) {
35
37
  api: api
36
38
  });
37
39
  };
38
- api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
39
- name: 'textColor',
40
- component: primaryToolbarComponent
41
- });
40
+ if (isToolbarAifcEnabled) {
41
+ var _api$toolbar;
42
+ if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents) {
43
+ api.toolbar.actions.registerComponents(getToolbarComponents(api));
44
+ }
45
+ } else {
46
+ var _api$primaryToolbar;
47
+ api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
48
+ name: 'textColor',
49
+ component: primaryToolbarComponent
50
+ });
51
+ }
42
52
  return {
43
53
  name: 'textColor',
44
54
  marks: function marks() {
@@ -68,7 +78,7 @@ export var textColorPlugin = function textColorPlugin(_ref) {
68
78
  return _changeColor(color, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, inputMethod);
69
79
  }
70
80
  },
71
- pluginsOptions: {
81
+ pluginsOptions: !isToolbarAifcEnabled ? {
72
82
  selectionToolbar: function selectionToolbar() {
73
83
  var _api$userPreferences, _api$selectionToolbar;
74
84
  var toolbarDocking = fg('platform_editor_use_preferences_plugin') ? 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 : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
@@ -99,7 +109,7 @@ export var textColorPlugin = function textColorPlugin(_ref) {
99
109
  return undefined;
100
110
  }
101
111
  }
102
- },
112
+ } : {},
103
113
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
104
114
  };
105
115
  };
@@ -0,0 +1,4 @@
1
+ ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
2
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
3
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
4
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -0,0 +1,35 @@
1
+ /* TextColorHighlightMenu.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./TextColorHighlightMenu.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
6
+ import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
7
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
8
+ import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
9
+ import { Box } from '@atlaskit/primitives/compiled';
10
+ var styles = {
11
+ menu: "_ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc"
12
+ };
13
+ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
14
+ var children = _ref.children,
15
+ api = _ref.api;
16
+ var isTextColorDisabled = useSharedPluginStateSelector(api, 'textColor.disabled');
17
+ var _useIntl = useIntl(),
18
+ formatMessage = _useIntl.formatMessage;
19
+ return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
20
+ iconBefore: /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
21
+ highlightColor: "var(--ds-background-accent-blue-subtlest, #E9F2FF)"
22
+ }, /*#__PURE__*/React.createElement(TextColorIcon, {
23
+ label: formatMessage(messages.textColorTooltip),
24
+ iconColor: "var(--ds-text-accent-magenta, #943D73)",
25
+ shouldRecommendSmallIcon: true,
26
+ size: 'small',
27
+ isDisabled: isTextColorDisabled,
28
+ spacing: 'compact'
29
+ })),
30
+ isDisabled: isTextColorDisabled,
31
+ testId: "text-color-highlight-menu"
32
+ }, /*#__PURE__*/React.createElement(Box, {
33
+ xcss: styles.menu
34
+ }, children));
35
+ };
@@ -0,0 +1,2 @@
1
+
2
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}._18u0x0bf{margin-left:var(--ds-space-negative-100,-8px)}
@@ -0,0 +1,47 @@
1
+ /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./TextColorMenuItem.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
6
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
7
+ import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
8
+ import { ColorPalette, textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
9
+ import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
10
+ import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
11
+ import { Stack, Box, Text } from '@atlaskit/primitives/compiled';
12
+ var styles = {
13
+ container: "_zulpu2gc",
14
+ colorPalette: "_18u0x0bf"
15
+ };
16
+ export function TextColorMenuItem(_ref) {
17
+ var api = _ref.api;
18
+ var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['textColor'], function (states) {
19
+ var _states$textColorStat, _states$textColorStat2, _states$textColorStat3;
20
+ return {
21
+ color: (_states$textColorStat = states.textColorState) === null || _states$textColorStat === void 0 ? void 0 : _states$textColorStat.color,
22
+ defaultColor: ((_states$textColorStat2 = states.textColorState) === null || _states$textColorStat2 === void 0 ? void 0 : _states$textColorStat2.defaultColor) || null,
23
+ palette: ((_states$textColorStat3 = states.textColorState) === null || _states$textColorStat3 === void 0 ? void 0 : _states$textColorStat3.palette) || []
24
+ };
25
+ }),
26
+ color = _useSharedPluginState.color,
27
+ defaultColor = _useSharedPluginState.defaultColor,
28
+ palette = _useSharedPluginState.palette;
29
+ var _useIntl = useIntl(),
30
+ formatMessage = _useIntl.formatMessage;
31
+ return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, null, /*#__PURE__*/React.createElement(Stack, {
32
+ xcss: styles.container,
33
+ testId: "text-color-menu-item"
34
+ }, /*#__PURE__*/React.createElement(Text, {
35
+ weight: "bold"
36
+ }, formatMessage(messages.textColorTooltip)), /*#__PURE__*/React.createElement(Box, {
37
+ xcss: styles.colorPalette
38
+ }, /*#__PURE__*/React.createElement(ColorPalette, {
39
+ onClick: function onClick() {},
40
+ selectedColor: color || defaultColor,
41
+ paletteOptions: {
42
+ palette: palette,
43
+ hexToPaletteColor: hexToEditorTextPaletteColor,
44
+ paletteColorTooltipMessages: textPaletteTooltipMessages
45
+ }
46
+ }))));
47
+ }
@@ -0,0 +1,37 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ 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; }
3
+ 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) { _defineProperty(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; }
4
+ import React from 'react';
5
+ import { TEXT_SECTION, TEXT_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP, TEXT_COLOR_HIGHLIGHT_MENU, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_MENU_ITEM, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK } from '@atlaskit/editor-common/toolbar';
6
+ import { TextColorHighlightMenu } from './TextColorHighlightMenu';
7
+ import { TextColorMenuItem } from './TextColorMenuItem';
8
+ export var getToolbarComponents = function getToolbarComponents(api) {
9
+ return [_objectSpread(_objectSpread({}, TEXT_COLOR_HIGHLIGHT_GROUP), {}, {
10
+ parents: [_objectSpread(_objectSpread({}, TEXT_SECTION), {}, {
11
+ rank: TEXT_SECTION_RANK[TEXT_COLOR_HIGHLIGHT_GROUP.key]
12
+ })]
13
+ }), _objectSpread(_objectSpread({}, TEXT_COLOR_HIGHLIGHT_MENU), {}, {
14
+ parents: [_objectSpread(_objectSpread({}, TEXT_COLOR_HIGHLIGHT_GROUP), {}, {
15
+ rank: TEXT_COLOR_HIGHLIGHT_GROUP_RANK[TEXT_COLOR_HIGHLIGHT_MENU.key]
16
+ })],
17
+ component: function component(_ref) {
18
+ var children = _ref.children;
19
+ return /*#__PURE__*/React.createElement(TextColorHighlightMenu, {
20
+ api: api
21
+ }, children);
22
+ }
23
+ }), _objectSpread(_objectSpread({}, TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
24
+ parents: [_objectSpread(_objectSpread({}, TEXT_COLOR_HIGHLIGHT_MENU), {}, {
25
+ rank: TEXT_COLOR_HIGHLIGHT_MENU_RANK[TEXT_COLOR_HIGHLIGHT_MENU_SECTION.key]
26
+ })]
27
+ }), _objectSpread(_objectSpread({}, TEXT_COLOR_MENU_ITEM), {}, {
28
+ parents: [_objectSpread(_objectSpread({}, TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
29
+ rank: TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK[TEXT_COLOR_MENU_ITEM.key]
30
+ })],
31
+ component: function component() {
32
+ return /*#__PURE__*/React.createElement(TextColorMenuItem, {
33
+ api: api
34
+ });
35
+ }
36
+ })];
37
+ };
@@ -2,6 +2,7 @@ import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
4
4
  import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
5
+ import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
5
6
  import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
6
7
  import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
7
8
  import type { TextColorInputMethod } from './types';
@@ -10,6 +11,7 @@ export type Dependencies = [
10
11
  OptionalPlugin<AnalyticsPlugin>,
11
12
  OptionalPlugin<PrimaryToolbarPlugin>,
12
13
  OptionalPlugin<SelectionToolbarPlugin>,
14
+ OptionalPlugin<ToolbarPlugin>,
13
15
  OptionalPlugin<UserPreferencesPlugin>
14
16
  ];
15
17
  export type TextColorPlugin = NextEditorPlugin<'textColor', {
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { TextColorPlugin } from '../textColorPluginType';
4
+ interface TextColorHighlightMenuProps {
5
+ api: ExtractInjectionAPI<TextColorPlugin> | undefined;
6
+ children: React.ReactNode;
7
+ }
8
+ export declare const TextColorHighlightMenu: ({ children, api }: TextColorHighlightMenuProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { TextColorPlugin } from '../textColorPluginType';
4
+ export declare function TextColorMenuItem({ api, }: {
5
+ api: ExtractInjectionAPI<TextColorPlugin> | undefined;
6
+ }): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import { type RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
+ import type { TextColorPlugin } from '../textColorPluginType';
4
+ export declare const getToolbarComponents: (api: ExtractInjectionAPI<TextColorPlugin> | undefined) => RegisterComponent[];
@@ -2,6 +2,7 @@ import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
4
4
  import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
5
+ import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
5
6
  import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
6
7
  import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
7
8
  import type { TextColorInputMethod } from './types';
@@ -10,6 +11,7 @@ export type Dependencies = [
10
11
  OptionalPlugin<AnalyticsPlugin>,
11
12
  OptionalPlugin<PrimaryToolbarPlugin>,
12
13
  OptionalPlugin<SelectionToolbarPlugin>,
14
+ OptionalPlugin<ToolbarPlugin>,
13
15
  OptionalPlugin<UserPreferencesPlugin>
14
16
  ];
15
17
  export type TextColorPlugin = NextEditorPlugin<'textColor', {
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { TextColorPlugin } from '../textColorPluginType';
4
+ interface TextColorHighlightMenuProps {
5
+ api: ExtractInjectionAPI<TextColorPlugin> | undefined;
6
+ children: React.ReactNode;
7
+ }
8
+ export declare const TextColorHighlightMenu: ({ children, api }: TextColorHighlightMenuProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { TextColorPlugin } from '../textColorPluginType';
4
+ export declare function TextColorMenuItem({ api, }: {
5
+ api: ExtractInjectionAPI<TextColorPlugin> | undefined;
6
+ }): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import { type RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
+ import type { TextColorPlugin } from '../textColorPluginType';
4
+ export declare const getToolbarComponents: (api: ExtractInjectionAPI<TextColorPlugin> | undefined) => RegisterComponent[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,24 +32,29 @@
32
32
  ".": "./src/index.ts"
33
33
  },
34
34
  "dependencies": {
35
- "@atlaskit/adf-schema": "^50.0.1",
35
+ "@atlaskit/adf-schema": "^50.2.0",
36
+ "@atlaskit/css": "^0.12.0",
36
37
  "@atlaskit/editor-palette": "^2.1.0",
37
38
  "@atlaskit/editor-plugin-analytics": "^3.0.0",
38
39
  "@atlaskit/editor-plugin-primary-toolbar": "^4.1.0",
39
- "@atlaskit/editor-plugin-selection-toolbar": "^4.2.0",
40
+ "@atlaskit/editor-plugin-selection-toolbar": "^4.3.0",
41
+ "@atlaskit/editor-plugin-toolbar": "^0.1.0",
40
42
  "@atlaskit/editor-prosemirror": "7.0.0",
41
- "@atlaskit/editor-shared-styles": "^3.5.0",
43
+ "@atlaskit/editor-shared-styles": "^3.6.0",
42
44
  "@atlaskit/editor-tables": "^2.9.0",
43
- "@atlaskit/icon": "^27.9.0",
45
+ "@atlaskit/editor-toolbar": "^0.1.0",
46
+ "@atlaskit/editor-toolbar-model": "^0.0.4",
47
+ "@atlaskit/icon": "^27.10.0",
44
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
+ "@atlaskit/primitives": "^14.11.0",
45
50
  "@atlaskit/theme": "^19.0.0",
46
- "@atlaskit/tmp-editor-statsig": "^9.22.0",
51
+ "@atlaskit/tmp-editor-statsig": "^9.25.0",
47
52
  "@atlaskit/tokens": "^6.0.0",
48
53
  "@babel/runtime": "^7.0.0",
49
54
  "@emotion/react": "^11.7.1"
50
55
  },
51
56
  "peerDependencies": {
52
- "@atlaskit/editor-common": "^107.16.0",
57
+ "@atlaskit/editor-common": "^107.19.0",
53
58
  "react": "^18.2.0",
54
59
  "react-dom": "^18.2.0",
55
60
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -59,7 +64,6 @@
59
64
  "@atlaskit/ssr": "workspace:^",
60
65
  "@atlaskit/visual-regression": "workspace:^",
61
66
  "@testing-library/react": "^13.4.0",
62
- "typescript": "~5.4.2",
63
67
  "wait-for-expect": "^1.2.0"
64
68
  },
65
69
  "techstack": {