@atlaskit/editor-plugin-text-color 1.16.3 → 1.16.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/index.js +2 -2
  3. package/dist/cjs/{commands → pm-plugins/commands}/change-color.js +1 -1
  4. package/dist/cjs/{commands → pm-plugins/commands}/remove-color.js +1 -1
  5. package/dist/cjs/{commands → pm-plugins/commands}/toggle-color.js +1 -1
  6. package/dist/cjs/pm-plugins/main.js +3 -3
  7. package/dist/cjs/{utils → pm-plugins/utils}/inputType.js +1 -1
  8. package/dist/cjs/{plugin.js → textColorPlugin.js} +1 -1
  9. package/dist/cjs/textColorPluginType.js +5 -0
  10. package/dist/cjs/ui/ToolbarTextColor/index.js +2 -2
  11. package/dist/es2019/index.js +1 -1
  12. package/dist/es2019/{commands → pm-plugins/commands}/change-color.js +1 -1
  13. package/dist/es2019/{commands → pm-plugins/commands}/remove-color.js +1 -1
  14. package/dist/es2019/{commands → pm-plugins/commands}/toggle-color.js +1 -1
  15. package/dist/es2019/pm-plugins/main.js +4 -4
  16. package/dist/es2019/{utils → pm-plugins/utils}/inputType.js +1 -1
  17. package/dist/es2019/{plugin.js → textColorPlugin.js} +1 -1
  18. package/dist/es2019/textColorPluginType.js +1 -0
  19. package/dist/es2019/ui/ToolbarTextColor/index.js +2 -2
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/{commands → pm-plugins/commands}/change-color.js +1 -1
  22. package/dist/esm/{commands → pm-plugins/commands}/remove-color.js +1 -1
  23. package/dist/esm/{commands → pm-plugins/commands}/toggle-color.js +1 -1
  24. package/dist/esm/pm-plugins/main.js +4 -4
  25. package/dist/esm/{utils → pm-plugins/utils}/inputType.js +1 -1
  26. package/dist/esm/{plugin.js → textColorPlugin.js} +1 -1
  27. package/dist/esm/textColorPluginType.js +1 -0
  28. package/dist/esm/ui/ToolbarTextColor/index.js +2 -2
  29. package/dist/types/index.d.ts +3 -2
  30. package/dist/types/{commands → pm-plugins/commands}/change-color.d.ts +1 -1
  31. package/dist/types/pm-plugins/main.d.ts +1 -1
  32. package/dist/types/pm-plugins/utils/inputType.d.ts +3 -0
  33. package/dist/types/{plugin.d.ts → textColorPlugin.d.ts} +1 -1
  34. package/dist/types/{types.d.ts → textColorPluginType.d.ts} +1 -6
  35. package/dist/types/types/index.d.ts +6 -0
  36. package/dist/types/ui/FloatingToolbarComponent.d.ts +1 -1
  37. package/dist/types/ui/PrimaryToolbarComponent.d.ts +1 -1
  38. package/dist/types/ui/ToolbarTextColor/index.d.ts +2 -1
  39. package/dist/types-ts4.5/index.d.ts +3 -2
  40. package/dist/types-ts4.5/{commands → pm-plugins/commands}/change-color.d.ts +1 -1
  41. package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
  42. package/dist/types-ts4.5/pm-plugins/utils/inputType.d.ts +3 -0
  43. package/dist/types-ts4.5/{plugin.d.ts → textColorPlugin.d.ts} +1 -1
  44. package/dist/types-ts4.5/{types.d.ts → textColorPluginType.d.ts} +1 -6
  45. package/dist/types-ts4.5/types/index.d.ts +6 -0
  46. package/dist/types-ts4.5/ui/FloatingToolbarComponent.d.ts +1 -1
  47. package/dist/types-ts4.5/ui/PrimaryToolbarComponent.d.ts +1 -1
  48. package/dist/types-ts4.5/ui/ToolbarTextColor/index.d.ts +2 -1
  49. package/package.json +7 -4
  50. package/dist/types/utils/inputType.d.ts +0 -3
  51. package/dist/types-ts4.5/utils/inputType.d.ts +0 -3
  52. /package/dist/cjs/{utils → pm-plugins/utils}/color.js +0 -0
  53. /package/dist/cjs/{utils → pm-plugins/utils}/constants.js +0 -0
  54. /package/dist/cjs/{utils → pm-plugins/utils}/disabled.js +0 -0
  55. /package/dist/cjs/{types.js → types/index.js} +0 -0
  56. /package/dist/es2019/{utils → pm-plugins/utils}/color.js +0 -0
  57. /package/dist/es2019/{utils → pm-plugins/utils}/constants.js +0 -0
  58. /package/dist/es2019/{utils → pm-plugins/utils}/disabled.js +0 -0
  59. /package/dist/es2019/{types.js → types/index.js} +0 -0
  60. /package/dist/esm/{utils → pm-plugins/utils}/color.js +0 -0
  61. /package/dist/esm/{utils → pm-plugins/utils}/constants.js +0 -0
  62. /package/dist/esm/{utils → pm-plugins/utils}/disabled.js +0 -0
  63. /package/dist/esm/{types.js → types/index.js} +0 -0
  64. /package/dist/types/{commands → pm-plugins/commands}/remove-color.d.ts +0 -0
  65. /package/dist/types/{commands → pm-plugins/commands}/toggle-color.d.ts +0 -0
  66. /package/dist/types/{utils → pm-plugins/utils}/color.d.ts +0 -0
  67. /package/dist/types/{utils → pm-plugins/utils}/constants.d.ts +0 -0
  68. /package/dist/types/{utils → pm-plugins/utils}/disabled.d.ts +0 -0
  69. /package/dist/types-ts4.5/{commands → pm-plugins/commands}/remove-color.d.ts +0 -0
  70. /package/dist/types-ts4.5/{commands → pm-plugins/commands}/toggle-color.d.ts +0 -0
  71. /package/dist/types-ts4.5/{utils → pm-plugins/utils}/color.d.ts +0 -0
  72. /package/dist/types-ts4.5/{utils → pm-plugins/utils}/constants.d.ts +0 -0
  73. /package/dist/types-ts4.5/{utils → pm-plugins/utils}/disabled.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 1.16.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#171551](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171551)
8
+ [`702c918817e78`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/702c918817e78) -
9
+ ED-25817: refactors plugins to meet folder standards
10
+
3
11
  ## 1.16.3
4
12
 
5
13
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "textColorPlugin", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _plugin.textColorPlugin;
9
+ return _textColorPlugin.textColorPlugin;
10
10
  }
11
11
  });
12
- var _plugin = require("./plugin");
12
+ var _textColorPlugin = require("./textColorPlugin");
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.changeColor = void 0;
7
7
  var _analytics = require("@atlaskit/editor-common/analytics");
8
8
  var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
9
- var _main = require("../pm-plugins/main");
9
+ var _main = require("../main");
10
10
  var _color = require("../utils/color");
11
11
  var _removeColor = require("./remove-color");
12
12
  var _toggleColor = require("./toggle-color");
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.removeColor = void 0;
7
7
  var _mark = require("@atlaskit/editor-common/mark");
8
- var _main = require("../pm-plugins/main");
8
+ var _main = require("../main");
9
9
  var removeColor = exports.removeColor = function removeColor() {
10
10
  return function (state, dispatch) {
11
11
  var schema = state.schema;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.toggleColor = void 0;
7
7
  var _mark = require("@atlaskit/editor-common/mark");
8
- var _main = require("../pm-plugins/main");
8
+ var _main = require("../main");
9
9
  var _constants = require("../utils/constants");
10
10
  var _disabled = require("../utils/disabled");
11
11
  var toggleColor = exports.toggleColor = function toggleColor(color) {
@@ -18,9 +18,9 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
18
18
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
19
19
  var _uiColor = require("@atlaskit/editor-common/ui-color");
20
20
  var _state = require("@atlaskit/editor-prosemirror/state");
21
- var _color = require("../utils/color");
22
- var _constants = require("../utils/constants");
23
- var _disabled = require("../utils/disabled");
21
+ var _color = require("./utils/color");
22
+ var _constants = require("./utils/constants");
23
+ var _disabled = require("./utils/disabled");
24
24
  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; }
25
25
  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; }
26
26
  function createInitialPluginState(editorState, pluginConfig) {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getInputMethod = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _analytics = require("@atlaskit/editor-common/analytics");
10
- var _types = require("../types");
10
+ var _types = require("../../types");
11
11
  var _toolbarTypeToInputMe;
12
12
  var toolbarTypeToInputMethod = (_toolbarTypeToInputMe = {}, (0, _defineProperty2.default)(_toolbarTypeToInputMe, _types.ToolbarType.PRIMARY, _analytics.INPUT_METHOD.TOOLBAR), (0, _defineProperty2.default)(_toolbarTypeToInputMe, _types.ToolbarType.FLOATING, _analytics.INPUT_METHOD.FLOATING_TB), _toolbarTypeToInputMe);
13
13
  var getInputMethod = exports.getInputMethod = function getInputMethod(toolbarType) {
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "textColorPluginKey", {
14
14
  var _react = _interopRequireDefault(require("react"));
15
15
  var _adfSchema = require("@atlaskit/adf-schema");
16
16
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
- var _changeColor2 = require("./commands/change-color");
17
+ var _changeColor2 = require("./pm-plugins/commands/change-color");
18
18
  var _main = require("./pm-plugins/main");
19
19
  var _FloatingToolbarComponent = require("./ui/FloatingToolbarComponent");
20
20
  var _PrimaryToolbarComponent = require("./ui/PrimaryToolbarComponent");
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -26,9 +26,9 @@ 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 _changeColor = require("../../commands/change-color");
29
+ var _changeColor = require("../../pm-plugins/commands/change-color");
30
+ var _inputType = require("../../pm-plugins/utils/inputType");
30
31
  var _types = require("../../types");
31
- var _inputType = require("../../utils/inputType");
32
32
  var _icon = require("./icon");
33
33
  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; }
34
34
  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; }
@@ -1 +1 @@
1
- export { textColorPlugin } from './plugin';
1
+ export { textColorPlugin } from './textColorPlugin';
@@ -1,6 +1,6 @@
1
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
2
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
3
- import { pluginKey } from '../pm-plugins/main';
3
+ import { pluginKey } from '../main';
4
4
  import { getActiveColor } from '../utils/color';
5
5
  import { removeColor } from './remove-color';
6
6
  import { toggleColor } from './toggle-color';
@@ -1,5 +1,5 @@
1
1
  import { removeMark } from '@atlaskit/editor-common/mark';
2
- import { ACTIONS, pluginKey } from '../pm-plugins/main';
2
+ import { ACTIONS, pluginKey } from '../main';
3
3
  export const removeColor = () => (state, dispatch) => {
4
4
  const {
5
5
  schema
@@ -1,5 +1,5 @@
1
1
  import { removeMark, toggleMark } from '@atlaskit/editor-common/mark';
2
- import { ACTIONS, pluginKey } from '../pm-plugins/main';
2
+ import { ACTIONS, pluginKey } from '../main';
3
3
  import { overrideMarks } from '../utils/constants';
4
4
  import { getDisabledState } from '../utils/disabled';
5
5
  export const toggleColor = color => (state, dispatch) => {
@@ -1,10 +1,10 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { textColorPalette } from '@atlaskit/editor-common/ui-color';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
- import { getActiveColor } from '../utils/color';
5
- import { DEFAULT_COLOR } from '../utils/constants';
6
- import { getDisabledState } from '../utils/disabled';
7
- export { DEFAULT_COLOR } from '../utils/constants';
4
+ import { getActiveColor } from './utils/color';
5
+ import { DEFAULT_COLOR } from './utils/constants';
6
+ import { getDisabledState } from './utils/disabled';
7
+ export { DEFAULT_COLOR } from './utils/constants';
8
8
  function createInitialPluginState(editorState, pluginConfig) {
9
9
  const defaultColor = (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.defaultColor) || DEFAULT_COLOR;
10
10
  const palette = [{
@@ -1,5 +1,5 @@
1
1
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import { ToolbarType } from '../types';
2
+ import { ToolbarType } from '../../types';
3
3
  const toolbarTypeToInputMethod = {
4
4
  [ToolbarType.PRIMARY]: INPUT_METHOD.TOOLBAR,
5
5
  [ToolbarType.FLOATING]: INPUT_METHOD.FLOATING_TB
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { textColor } from '@atlaskit/adf-schema';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
- import { changeColor } from './commands/change-color';
4
+ import { changeColor } from './pm-plugins/commands/change-color';
5
5
  import { createPlugin, pluginKey as textColorPluginKey } from './pm-plugins/main';
6
6
  import { FloatingToolbarComponent } from './ui/FloatingToolbarComponent';
7
7
  import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
@@ -0,0 +1 @@
1
+ export {};
@@ -19,9 +19,9 @@ 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 { changeColor as changeColorWithAnalytics } from '../../commands/change-color';
22
+ import { changeColor as changeColorWithAnalytics } from '../../pm-plugins/commands/change-color';
23
+ import { getInputMethod } from '../../pm-plugins/utils/inputType';
23
24
  import { ToolbarType } from '../../types';
24
- import { getInputMethod } from '../../utils/inputType';
25
25
  import { EditorTextColorIcon } from './icon';
26
26
  const EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
27
27
  const EXPERIMENT_GROUP_CONTROL = 'control';
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { textColorPlugin } from './plugin';
1
+ export { textColorPlugin } from './textColorPlugin';
@@ -1,6 +1,6 @@
1
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
2
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
3
- import { pluginKey } from '../pm-plugins/main';
3
+ import { pluginKey } from '../main';
4
4
  import { getActiveColor } from '../utils/color';
5
5
  import { removeColor } from './remove-color';
6
6
  import { toggleColor } from './toggle-color';
@@ -1,5 +1,5 @@
1
1
  import { removeMark } from '@atlaskit/editor-common/mark';
2
- import { ACTIONS, pluginKey } from '../pm-plugins/main';
2
+ import { ACTIONS, pluginKey } from '../main';
3
3
  export var removeColor = function removeColor() {
4
4
  return function (state, dispatch) {
5
5
  var schema = state.schema;
@@ -1,5 +1,5 @@
1
1
  import { removeMark, toggleMark } from '@atlaskit/editor-common/mark';
2
- import { ACTIONS, pluginKey } from '../pm-plugins/main';
2
+ import { ACTIONS, pluginKey } from '../main';
3
3
  import { overrideMarks } from '../utils/constants';
4
4
  import { getDisabledState } from '../utils/disabled';
5
5
  export var toggleColor = function toggleColor(color) {
@@ -5,10 +5,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { textColorPalette } from '@atlaskit/editor-common/ui-color';
7
7
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
8
- import { getActiveColor } from '../utils/color';
9
- import { DEFAULT_COLOR } from '../utils/constants';
10
- import { getDisabledState } from '../utils/disabled';
11
- export { DEFAULT_COLOR } from '../utils/constants';
8
+ import { getActiveColor } from './utils/color';
9
+ import { DEFAULT_COLOR } from './utils/constants';
10
+ import { getDisabledState } from './utils/disabled';
11
+ export { DEFAULT_COLOR } from './utils/constants';
12
12
  function createInitialPluginState(editorState, pluginConfig) {
13
13
  var defaultColor = (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.defaultColor) || DEFAULT_COLOR;
14
14
  var palette = [{
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  var _toolbarTypeToInputMe;
3
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
- import { ToolbarType } from '../types';
4
+ import { ToolbarType } from '../../types';
5
5
  var toolbarTypeToInputMethod = (_toolbarTypeToInputMe = {}, _defineProperty(_toolbarTypeToInputMe, ToolbarType.PRIMARY, INPUT_METHOD.TOOLBAR), _defineProperty(_toolbarTypeToInputMe, ToolbarType.FLOATING, INPUT_METHOD.FLOATING_TB), _toolbarTypeToInputMe);
6
6
  export var getInputMethod = function getInputMethod(toolbarType) {
7
7
  return toolbarTypeToInputMethod[toolbarType];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { textColor } from '@atlaskit/adf-schema';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
- import { changeColor as _changeColor } from './commands/change-color';
4
+ import { changeColor as _changeColor } from './pm-plugins/commands/change-color';
5
5
  import { createPlugin, pluginKey as textColorPluginKey } from './pm-plugins/main';
6
6
  import { FloatingToolbarComponent } from './ui/FloatingToolbarComponent';
7
7
  import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
@@ -0,0 +1 @@
1
+ export {};
@@ -29,9 +29,9 @@ 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 { changeColor as changeColorWithAnalytics } from '../../commands/change-color';
32
+ import { changeColor as changeColorWithAnalytics } from '../../pm-plugins/commands/change-color';
33
+ import { getInputMethod } from '../../pm-plugins/utils/inputType';
33
34
  import { ToolbarType } from '../../types';
34
- import { getInputMethod } from '../../utils/inputType';
35
35
  import { EditorTextColorIcon } from './icon';
36
36
  var EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
37
37
  var EXPERIMENT_GROUP_CONTROL = 'control';
@@ -1,3 +1,4 @@
1
- export { textColorPlugin } from './plugin';
2
- export type { TextColorInputMethod, TextColorPlugin } from './types';
1
+ export { textColorPlugin } from './textColorPlugin';
2
+ export type { TextColorPlugin } from './textColorPluginType';
3
+ export type { TextColorInputMethod } from './types';
3
4
  export type { TextColorPluginState, TextColorPluginConfig } from './pm-plugins/main';
@@ -1,4 +1,4 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import type { Command } from '@atlaskit/editor-common/types';
3
- import type { TextColorInputMethod } from '../types';
3
+ import type { TextColorInputMethod } from '../../types';
4
4
  export declare const changeColor: (color: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined, inputMethod?: TextColorInputMethod) => Command;
@@ -2,7 +2,7 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
4
4
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
- export { DEFAULT_COLOR } from '../utils/constants';
5
+ export { DEFAULT_COLOR } from './utils/constants';
6
6
  export type TextColorPluginState = {
7
7
  palette: Array<PaletteColor>;
8
8
  defaultColor: string;
@@ -0,0 +1,3 @@
1
+ import type { TextColorInputMethod } from '../../types';
2
+ import { ToolbarType } from '../../types';
3
+ export declare const getInputMethod: (toolbarType: ToolbarType) => TextColorInputMethod;
@@ -1,6 +1,6 @@
1
1
  import type { TextColorPluginState } from './pm-plugins/main';
2
2
  import { pluginKey as textColorPluginKey } from './pm-plugins/main';
3
- import type { TextColorPlugin } from './types';
3
+ import type { TextColorPlugin } from './textColorPluginType';
4
4
  export declare const textColorPlugin: TextColorPlugin;
5
5
  export { textColorPluginKey };
6
6
  export type { TextColorPluginState };
@@ -1,10 +1,9 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
1
  import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
3
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
5
4
  import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
5
+ import type { TextColorInputMethod } from './types';
6
6
  type Config = TextColorPluginConfig | boolean;
7
- export type TextColorInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
8
7
  export type TextColorPlugin = NextEditorPlugin<'textColor', {
9
8
  pluginConfiguration: Config | undefined;
10
9
  dependencies: [OptionalPlugin<AnalyticsPlugin>, OptionalPlugin<PrimaryToolbarPlugin>];
@@ -13,8 +12,4 @@ export type TextColorPlugin = NextEditorPlugin<'textColor', {
13
12
  };
14
13
  sharedState: TextColorPluginState | undefined;
15
14
  }>;
16
- export declare enum ToolbarType {
17
- PRIMARY = "primaryToolbar",
18
- FLOATING = "floatingToolbar"
19
- }
20
15
  export {};
@@ -0,0 +1,6 @@
1
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
+ export type TextColorInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
3
+ export declare enum ToolbarType {
4
+ PRIMARY = "primaryToolbar",
5
+ FLOATING = "floatingToolbar"
6
+ }
@@ -2,7 +2,7 @@
2
2
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TextColorPlugin } from '../types';
5
+ import type { TextColorPlugin } from '../textColorPluginType';
6
6
  interface FloatingToolbarComponentProps {
7
7
  editorView: EditorView;
8
8
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
@@ -2,7 +2,7 @@
2
2
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TextColorPlugin } from '../types';
5
+ import type { TextColorPlugin } from '../textColorPluginType';
6
6
  interface PrimaryToolbarComponentProps {
7
7
  isReducedSpacing: boolean;
8
8
  editorView: EditorView;
@@ -9,7 +9,8 @@ import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/edito
9
9
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
10
10
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
11
11
  import type { TextColorPluginState } from '../../pm-plugins/main';
12
- import { type TextColorPlugin, ToolbarType } from '../../types';
12
+ import type { TextColorPlugin } from '../../textColorPluginType';
13
+ import { ToolbarType } from '../../types';
13
14
  export interface State {
14
15
  isOpen: boolean;
15
16
  isOpenedByKeyboard: boolean;
@@ -1,3 +1,4 @@
1
- export { textColorPlugin } from './plugin';
2
- export type { TextColorInputMethod, TextColorPlugin } from './types';
1
+ export { textColorPlugin } from './textColorPlugin';
2
+ export type { TextColorPlugin } from './textColorPluginType';
3
+ export type { TextColorInputMethod } from './types';
3
4
  export type { TextColorPluginState, TextColorPluginConfig } from './pm-plugins/main';
@@ -1,4 +1,4 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import type { Command } from '@atlaskit/editor-common/types';
3
- import type { TextColorInputMethod } from '../types';
3
+ import type { TextColorInputMethod } from '../../types';
4
4
  export declare const changeColor: (color: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined, inputMethod?: TextColorInputMethod) => Command;
@@ -2,7 +2,7 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
4
4
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
- export { DEFAULT_COLOR } from '../utils/constants';
5
+ export { DEFAULT_COLOR } from './utils/constants';
6
6
  export type TextColorPluginState = {
7
7
  palette: Array<PaletteColor>;
8
8
  defaultColor: string;
@@ -0,0 +1,3 @@
1
+ import type { TextColorInputMethod } from '../../types';
2
+ import { ToolbarType } from '../../types';
3
+ export declare const getInputMethod: (toolbarType: ToolbarType) => TextColorInputMethod;
@@ -1,6 +1,6 @@
1
1
  import type { TextColorPluginState } from './pm-plugins/main';
2
2
  import { pluginKey as textColorPluginKey } from './pm-plugins/main';
3
- import type { TextColorPlugin } from './types';
3
+ import type { TextColorPlugin } from './textColorPluginType';
4
4
  export declare const textColorPlugin: TextColorPlugin;
5
5
  export { textColorPluginKey };
6
6
  export type { TextColorPluginState };
@@ -1,10 +1,9 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
1
  import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
3
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
5
4
  import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
5
+ import type { TextColorInputMethod } from './types';
6
6
  type Config = TextColorPluginConfig | boolean;
7
- export type TextColorInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
8
7
  export type TextColorPlugin = NextEditorPlugin<'textColor', {
9
8
  pluginConfiguration: Config | undefined;
10
9
  dependencies: [
@@ -16,8 +15,4 @@ export type TextColorPlugin = NextEditorPlugin<'textColor', {
16
15
  };
17
16
  sharedState: TextColorPluginState | undefined;
18
17
  }>;
19
- export declare enum ToolbarType {
20
- PRIMARY = "primaryToolbar",
21
- FLOATING = "floatingToolbar"
22
- }
23
18
  export {};
@@ -0,0 +1,6 @@
1
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
+ export type TextColorInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
3
+ export declare enum ToolbarType {
4
+ PRIMARY = "primaryToolbar",
5
+ FLOATING = "floatingToolbar"
6
+ }
@@ -2,7 +2,7 @@
2
2
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TextColorPlugin } from '../types';
5
+ import type { TextColorPlugin } from '../textColorPluginType';
6
6
  interface FloatingToolbarComponentProps {
7
7
  editorView: EditorView;
8
8
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
@@ -2,7 +2,7 @@
2
2
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TextColorPlugin } from '../types';
5
+ import type { TextColorPlugin } from '../textColorPluginType';
6
6
  interface PrimaryToolbarComponentProps {
7
7
  isReducedSpacing: boolean;
8
8
  editorView: EditorView;
@@ -9,7 +9,8 @@ import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/edito
9
9
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
10
10
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
11
11
  import type { TextColorPluginState } from '../../pm-plugins/main';
12
- import { type TextColorPlugin, ToolbarType } from '../../types';
12
+ import type { TextColorPlugin } from '../../textColorPluginType';
13
+ import { ToolbarType } from '../../types';
13
14
  export interface State {
14
15
  isOpen: boolean;
15
16
  isOpenedByKeyboard: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "1.16.3",
3
+ "version": "1.16.4",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,17 +32,17 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^96.1.0",
35
+ "@atlaskit/editor-common": "^96.3.0",
36
36
  "@atlaskit/editor-palette": "1.6.3",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
38
38
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
39
39
  "@atlaskit/editor-prosemirror": "6.2.1",
40
40
  "@atlaskit/editor-shared-styles": "^3.2.0",
41
41
  "@atlaskit/editor-tables": "^2.8.0",
42
- "@atlaskit/icon": "^23.0.0",
42
+ "@atlaskit/icon": "^23.1.0",
43
43
  "@atlaskit/platform-feature-flags": "^0.3.0",
44
44
  "@atlaskit/theme": "^14.0.0",
45
- "@atlaskit/tmp-editor-statsig": "^2.22.0",
45
+ "@atlaskit/tmp-editor-statsig": "^2.23.0",
46
46
  "@atlaskit/tokens": "^2.4.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "@emotion/react": "^11.7.1"
@@ -62,6 +62,9 @@
62
62
  },
63
63
  "techstack": {
64
64
  "@atlassian/frontend": {
65
+ "code-structure": [
66
+ "editor-plugin"
67
+ ],
65
68
  "import-structure": [
66
69
  "atlassian-conventions"
67
70
  ],
@@ -1,3 +0,0 @@
1
- import type { TextColorInputMethod } from '../types';
2
- import { ToolbarType } from '../types';
3
- export declare const getInputMethod: (toolbarType: ToolbarType) => TextColorInputMethod;
@@ -1,3 +0,0 @@
1
- import type { TextColorInputMethod } from '../types';
2
- import { ToolbarType } from '../types';
3
- export declare const getInputMethod: (toolbarType: ToolbarType) => TextColorInputMethod;
File without changes
File without changes
File without changes
File without changes
File without changes