@atlaskit/editor-plugin-paste-options-toolbar 1.4.3 → 1.4.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 (70) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/{commands.js → editor-commands/commands.js} +4 -4
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/{plugin.js → pasteOptionsToolbarPlugin.js} +3 -3
  5. package/dist/cjs/pasteOptionsToolbarPluginType.js +5 -0
  6. package/dist/cjs/pm-plugins/main.js +2 -2
  7. package/dist/cjs/pm-plugins/plugin-factory.js +3 -3
  8. package/dist/cjs/{reducer.js → pm-plugins/reducer.js} +1 -1
  9. package/dist/cjs/{toolbar.js → ui/toolbar.js} +5 -5
  10. package/dist/es2019/{commands.js → editor-commands/commands.js} +4 -4
  11. package/dist/es2019/index.js +4 -1
  12. package/dist/es2019/{plugin.js → pasteOptionsToolbarPlugin.js} +3 -3
  13. package/dist/es2019/pasteOptionsToolbarPluginType.js +1 -0
  14. package/dist/es2019/pm-plugins/main.js +2 -2
  15. package/dist/es2019/pm-plugins/plugin-factory.js +3 -3
  16. package/dist/es2019/{reducer.js → pm-plugins/reducer.js} +1 -1
  17. package/dist/es2019/{toolbar.js → ui/toolbar.js} +5 -5
  18. package/dist/esm/{commands.js → editor-commands/commands.js} +4 -4
  19. package/dist/esm/index.js +4 -1
  20. package/dist/esm/{plugin.js → pasteOptionsToolbarPlugin.js} +3 -3
  21. package/dist/esm/pasteOptionsToolbarPluginType.js +1 -0
  22. package/dist/esm/pm-plugins/main.js +2 -2
  23. package/dist/esm/pm-plugins/plugin-factory.js +3 -3
  24. package/dist/esm/{reducer.js → pm-plugins/reducer.js} +1 -1
  25. package/dist/esm/{toolbar.js → ui/toolbar.js} +5 -5
  26. package/dist/{types-ts4.5 → types/editor-actions}/actions.d.ts +1 -1
  27. package/dist/types/{commands.d.ts → editor-commands/commands.d.ts} +1 -1
  28. package/dist/types/index.d.ts +2 -2
  29. package/dist/types/pasteOptionsToolbarPlugin.d.ts +2 -0
  30. package/dist/types/{plugin.d.ts → pasteOptionsToolbarPluginType.d.ts} +0 -1
  31. package/dist/types/pm-plugins/main.d.ts +1 -1
  32. package/dist/types/pm-plugins/plugin-factory.d.ts +2 -2
  33. package/dist/types/pm-plugins/reducer.d.ts +3 -0
  34. package/dist/types/{util → pm-plugins/util}/format-handlers.d.ts +1 -1
  35. package/dist/types/{toolbar.d.ts → ui/toolbar.d.ts} +1 -1
  36. package/dist/{types → types-ts4.5/editor-actions}/actions.d.ts +1 -1
  37. package/dist/types-ts4.5/{commands.d.ts → editor-commands/commands.d.ts} +1 -1
  38. package/dist/types-ts4.5/index.d.ts +2 -2
  39. package/dist/types-ts4.5/pasteOptionsToolbarPlugin.d.ts +2 -0
  40. package/dist/types-ts4.5/{plugin.d.ts → pasteOptionsToolbarPluginType.d.ts} +0 -1
  41. package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
  42. package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +2 -2
  43. package/dist/types-ts4.5/pm-plugins/reducer.d.ts +3 -0
  44. package/dist/types-ts4.5/{util → pm-plugins/util}/format-handlers.d.ts +1 -1
  45. package/dist/types-ts4.5/{toolbar.d.ts → ui/toolbar.d.ts} +1 -1
  46. package/package.json +5 -5
  47. package/styles/package.json +5 -5
  48. package/dist/cjs/styles.js +0 -12
  49. package/dist/es2019/styles.js +0 -1
  50. package/dist/esm/styles.js +0 -1
  51. package/dist/types/reducer.d.ts +0 -3
  52. package/dist/types/styles.d.ts +0 -1
  53. package/dist/types-ts4.5/reducer.d.ts +0 -3
  54. package/dist/types-ts4.5/styles.d.ts +0 -1
  55. /package/dist/cjs/{actions.js → editor-actions/actions.js} +0 -0
  56. /package/dist/cjs/{util → pm-plugins/util}/format-handlers.js +0 -0
  57. /package/dist/cjs/{util → pm-plugins/util}/index.js +0 -0
  58. /package/dist/cjs/{types.js → types/types.js} +0 -0
  59. /package/dist/es2019/{actions.js → editor-actions/actions.js} +0 -0
  60. /package/dist/es2019/{util → pm-plugins/util}/format-handlers.js +0 -0
  61. /package/dist/es2019/{util → pm-plugins/util}/index.js +0 -0
  62. /package/dist/es2019/{types.js → types/types.js} +0 -0
  63. /package/dist/esm/{actions.js → editor-actions/actions.js} +0 -0
  64. /package/dist/esm/{util → pm-plugins/util}/format-handlers.js +0 -0
  65. /package/dist/esm/{util → pm-plugins/util}/index.js +0 -0
  66. /package/dist/esm/{types.js → types/types.js} +0 -0
  67. /package/dist/types/{util → pm-plugins/util}/index.d.ts +0 -0
  68. /package/dist/types/{types.d.ts → types/types.d.ts} +0 -0
  69. /package/dist/types-ts4.5/{util → pm-plugins/util}/index.d.ts +0 -0
  70. /package/dist/types-ts4.5/{types.d.ts → types/types.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-paste-options-toolbar
2
2
 
3
+ ## 1.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 1.4.3
4
10
 
5
11
  ### Patch Changes
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.showToolbar = exports.highlightContent = exports.hideToolbar = exports.dropdownClickHandler = exports.checkAndHideToolbar = exports.changeToRichTextWithAnalytics = exports.changeToRichText = exports.changeToPlainTextWithAnalytics = exports.changeToPlainText = exports.changeToMarkdownWithAnalytics = exports.changeToMarkDown = void 0;
7
7
  var _analytics = require("@atlaskit/editor-common/analytics");
8
8
  var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
9
- var _actions = require("./actions");
10
- var _pluginFactory = require("./pm-plugins/plugin-factory");
11
- var _types = require("./types");
12
- var _formatHandlers = require("./util/format-handlers");
9
+ var _actions = require("../editor-actions/actions");
10
+ var _pluginFactory = require("../pm-plugins/plugin-factory");
11
+ var _formatHandlers = require("../pm-plugins/util/format-handlers");
12
+ var _types = require("../types/types");
13
13
  var showToolbar = exports.showToolbar = function showToolbar(lastContentPasted, selectedOption) {
14
14
  var commandAction = function commandAction(editorState) {
15
15
  return {
package/dist/cjs/index.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "pasteOptionsToolbarPlugin", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _plugin.pasteOptionsToolbarPlugin;
9
+ return _pasteOptionsToolbarPlugin.pasteOptionsToolbarPlugin;
10
10
  }
11
11
  });
12
- var _plugin = require("./plugin");
12
+ var _pasteOptionsToolbarPlugin = require("./pasteOptionsToolbarPlugin");
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.pasteOptionsToolbarPlugin = void 0;
7
7
  var _react = require("react");
8
8
  var _hooks = require("@atlaskit/editor-common/hooks");
9
- var _commands = require("./commands");
9
+ var _commands = require("./editor-commands/commands");
10
10
  var _main = require("./pm-plugins/main");
11
- var _toolbar = require("./toolbar");
12
- var _types = require("./types");
11
+ var _types = require("./types/types");
12
+ var _toolbar = require("./ui/toolbar");
13
13
  var pasteOptionsToolbarPlugin = exports.pasteOptionsToolbarPlugin = function pasteOptionsToolbarPlugin(_ref) {
14
14
  var _api$analytics;
15
15
  var config = _ref.config,
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -7,8 +7,8 @@ exports.createPlugin = createPlugin;
7
7
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
8
  var _model = require("@atlaskit/editor-prosemirror/model");
9
9
  var _view = require("@atlaskit/editor-prosemirror/view");
10
- var _commands = require("../commands");
11
- var _types = require("../types");
10
+ var _commands = require("../editor-commands/commands");
11
+ var _types = require("../types/types");
12
12
  var _constants = require("./constants");
13
13
  var _pluginFactory = require("./plugin-factory");
14
14
  function createPlugin(dispatch) {
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getPluginState = exports.createPluginState = exports.createCommand = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _utils = require("@atlaskit/editor-common/utils");
10
- var _actions = require("../actions");
11
- var _reducer = require("../reducer");
12
- var _types = require("../types");
10
+ var _actions = require("../editor-actions/actions");
11
+ var _types = require("../types/types");
13
12
  var _constants = require("./constants");
13
+ var _reducer = require("./reducer");
14
14
  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; }
15
15
  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; }
16
16
  var _pluginFactory = (0, _utils.pluginFactory)(_types.pasteOptionsPluginKey, _reducer.reducer, {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.reducer = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _actions = require("./actions");
9
+ var _actions = require("../editor-actions/actions");
10
10
  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; }
11
11
  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; }
12
12
  var reducer = exports.reducer = function reducer(state, action) {
@@ -7,11 +7,11 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.isToolbarVisible = exports.getToolbarMenuConfig = exports.buildToolbar = void 0;
8
8
  var _messages = require("@atlaskit/editor-common/messages");
9
9
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
10
- var _commands = require("./commands");
11
- var _constants = require("./pm-plugins/constants");
12
- var _types = require("./types");
13
- var _pasteIcon = _interopRequireDefault(require("./ui/paste-icon"));
14
- var _util = require("./util");
10
+ var _commands = require("../editor-commands/commands");
11
+ var _constants = require("../pm-plugins/constants");
12
+ var _util = require("../pm-plugins/util");
13
+ var _types = require("../types/types");
14
+ var _pasteIcon = _interopRequireDefault(require("./paste-icon"));
15
15
  var isToolbarVisible = exports.isToolbarVisible = function isToolbarVisible(state, lastContentPasted) {
16
16
  var _$from$parent, _$from$node, _state$schema$nodes$c;
17
17
  /**
@@ -1,9 +1,9 @@
1
1
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD, PasteContents, PasteTypes } from '@atlaskit/editor-common/analytics';
2
2
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
3
- import { PastePluginActionTypes as ActionTypes } from './actions';
4
- import { createCommand } from './pm-plugins/plugin-factory';
5
- import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types';
6
- import { formatMarkdown, formatPlainText, formatRichText } from './util/format-handlers';
3
+ import { PastePluginActionTypes as ActionTypes } from '../editor-actions/actions';
4
+ import { createCommand } from '../pm-plugins/plugin-factory';
5
+ import { formatMarkdown, formatPlainText, formatRichText } from '../pm-plugins/util/format-handlers';
6
+ import { pasteOptionsPluginKey, ToolbarDropdownOption } from '../types/types';
7
7
  export const showToolbar = (lastContentPasted, selectedOption) => {
8
8
  const commandAction = editorState => {
9
9
  return {
@@ -1 +1,4 @@
1
- export { pasteOptionsToolbarPlugin } from './plugin';
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
4
+ export { pasteOptionsToolbarPlugin } from './pasteOptionsToolbarPlugin';
@@ -1,9 +1,9 @@
1
1
  import { useEffect } from 'react';
2
2
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
3
- import { hideToolbar, showToolbar } from './commands';
3
+ import { hideToolbar, showToolbar } from './editor-commands/commands';
4
4
  import { createPlugin } from './pm-plugins/main';
5
- import { buildToolbar, isToolbarVisible } from './toolbar';
6
- import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types';
5
+ import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types/types';
6
+ import { buildToolbar, isToolbarVisible } from './ui/toolbar';
7
7
  export const pasteOptionsToolbarPlugin = ({
8
8
  config,
9
9
  api
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,8 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { Slice } from '@atlaskit/editor-prosemirror/model';
3
3
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
- import { checkAndHideToolbar } from '../commands';
5
- import { pasteOptionsPluginKey, ToolbarDropdownOption } from '../types';
4
+ import { checkAndHideToolbar } from '../editor-commands/commands';
5
+ import { pasteOptionsPluginKey, ToolbarDropdownOption } from '../types/types';
6
6
  import { PASTE_HIGHLIGHT_DECORATION_KEY, TEXT_HIGHLIGHT_CLASS } from './constants';
7
7
  import { createPluginState } from './plugin-factory';
8
8
  export function createPlugin(dispatch) {
@@ -1,8 +1,8 @@
1
1
  import { pluginFactory } from '@atlaskit/editor-common/utils';
2
- import { PastePluginActionTypes } from '../actions';
3
- import { reducer } from '../reducer';
4
- import { pasteOptionsPluginKey } from '../types';
2
+ import { PastePluginActionTypes } from '../editor-actions/actions';
3
+ import { pasteOptionsPluginKey } from '../types/types';
5
4
  import { PASTE_OPTIONS_META_ID } from './constants';
5
+ import { reducer } from './reducer';
6
6
  export const {
7
7
  createPluginState,
8
8
  createCommand,
@@ -1,4 +1,4 @@
1
- import { PastePluginActionTypes as ActionTypes } from './actions';
1
+ import { PastePluginActionTypes as ActionTypes } from '../editor-actions/actions';
2
2
  export const reducer = (state, action) => {
3
3
  switch (action.type) {
4
4
  case ActionTypes.SHOW_PASTE_OPTIONS:
@@ -1,10 +1,10 @@
1
1
  import { pasteOptionsToolbarMessages as messages } from '@atlaskit/editor-common/messages';
2
2
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
3
- import { changeToMarkdownWithAnalytics, changeToPlainTextWithAnalytics, changeToRichTextWithAnalytics, dropdownClickHandler } from './commands';
4
- import { PASTE_OPTIONS_TEST_ID, PASTE_TOOLBAR_CLASS, PASTE_TOOLBAR_ITEM_CLASS } from './pm-plugins/constants';
5
- import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types';
6
- import EditorPasteIcon from './ui/paste-icon';
7
- import { hasLinkMark, hasMediaNode, hasRuleNode, isPastedFromFabricEditor } from './util';
3
+ import { changeToMarkdownWithAnalytics, changeToPlainTextWithAnalytics, changeToRichTextWithAnalytics, dropdownClickHandler } from '../editor-commands/commands';
4
+ import { PASTE_OPTIONS_TEST_ID, PASTE_TOOLBAR_CLASS, PASTE_TOOLBAR_ITEM_CLASS } from '../pm-plugins/constants';
5
+ import { hasLinkMark, hasMediaNode, hasRuleNode, isPastedFromFabricEditor } from '../pm-plugins/util';
6
+ import { pasteOptionsPluginKey, ToolbarDropdownOption } from '../types/types';
7
+ import EditorPasteIcon from './paste-icon';
8
8
  export const isToolbarVisible = (state, lastContentPasted) => {
9
9
  var _$from$parent, _$from$node, _state$schema$nodes$c;
10
10
  /**
@@ -1,9 +1,9 @@
1
1
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD, PasteContents, PasteTypes } from '@atlaskit/editor-common/analytics';
2
2
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
3
- import { PastePluginActionTypes as ActionTypes } from './actions';
4
- import { createCommand } from './pm-plugins/plugin-factory';
5
- import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types';
6
- import { formatMarkdown, formatPlainText, formatRichText } from './util/format-handlers';
3
+ import { PastePluginActionTypes as ActionTypes } from '../editor-actions/actions';
4
+ import { createCommand } from '../pm-plugins/plugin-factory';
5
+ import { formatMarkdown, formatPlainText, formatRichText } from '../pm-plugins/util/format-handlers';
6
+ import { pasteOptionsPluginKey, ToolbarDropdownOption } from '../types/types';
7
7
  export var showToolbar = function showToolbar(lastContentPasted, selectedOption) {
8
8
  var commandAction = function commandAction(editorState) {
9
9
  return {
package/dist/esm/index.js CHANGED
@@ -1 +1,4 @@
1
- export { pasteOptionsToolbarPlugin } from './plugin';
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
4
+ export { pasteOptionsToolbarPlugin } from './pasteOptionsToolbarPlugin';
@@ -1,9 +1,9 @@
1
1
  import { useEffect } from 'react';
2
2
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
3
- import { hideToolbar, showToolbar } from './commands';
3
+ import { hideToolbar, showToolbar } from './editor-commands/commands';
4
4
  import { createPlugin } from './pm-plugins/main';
5
- import { buildToolbar, isToolbarVisible } from './toolbar';
6
- import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types';
5
+ import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types/types';
6
+ import { buildToolbar, isToolbarVisible } from './ui/toolbar';
7
7
  export var pasteOptionsToolbarPlugin = function pasteOptionsToolbarPlugin(_ref) {
8
8
  var _api$analytics;
9
9
  var config = _ref.config,
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,8 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { Slice } from '@atlaskit/editor-prosemirror/model';
3
3
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
- import { checkAndHideToolbar } from '../commands';
5
- import { pasteOptionsPluginKey, ToolbarDropdownOption } from '../types';
4
+ import { checkAndHideToolbar } from '../editor-commands/commands';
5
+ import { pasteOptionsPluginKey, ToolbarDropdownOption } from '../types/types';
6
6
  import { PASTE_HIGHLIGHT_DECORATION_KEY, TEXT_HIGHLIGHT_CLASS } from './constants';
7
7
  import { createPluginState } from './plugin-factory';
8
8
  export function createPlugin(dispatch) {
@@ -2,10 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
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
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
4
  import { pluginFactory } from '@atlaskit/editor-common/utils';
5
- import { PastePluginActionTypes } from '../actions';
6
- import { reducer } from '../reducer';
7
- import { pasteOptionsPluginKey } from '../types';
5
+ import { PastePluginActionTypes } from '../editor-actions/actions';
6
+ import { pasteOptionsPluginKey } from '../types/types';
8
7
  import { PASTE_OPTIONS_META_ID } from './constants';
8
+ import { reducer } from './reducer';
9
9
  var _pluginFactory = pluginFactory(pasteOptionsPluginKey, reducer, {
10
10
  mapping: function mapping(tr, pluginState) {
11
11
  if (!tr.docChanged || !pluginState.showToolbar) {
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
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
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 { PastePluginActionTypes as ActionTypes } from './actions';
4
+ import { PastePluginActionTypes as ActionTypes } from '../editor-actions/actions';
5
5
  export var reducer = function reducer(state, action) {
6
6
  switch (action.type) {
7
7
  case ActionTypes.SHOW_PASTE_OPTIONS:
@@ -1,10 +1,10 @@
1
1
  import { pasteOptionsToolbarMessages as messages } from '@atlaskit/editor-common/messages';
2
2
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
3
- import { changeToMarkdownWithAnalytics, changeToPlainTextWithAnalytics, changeToRichTextWithAnalytics, dropdownClickHandler } from './commands';
4
- import { PASTE_OPTIONS_TEST_ID, PASTE_TOOLBAR_CLASS, PASTE_TOOLBAR_ITEM_CLASS } from './pm-plugins/constants';
5
- import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types';
6
- import EditorPasteIcon from './ui/paste-icon';
7
- import { hasLinkMark, hasMediaNode, hasRuleNode, isPastedFromFabricEditor } from './util';
3
+ import { changeToMarkdownWithAnalytics, changeToPlainTextWithAnalytics, changeToRichTextWithAnalytics, dropdownClickHandler } from '../editor-commands/commands';
4
+ import { PASTE_OPTIONS_TEST_ID, PASTE_TOOLBAR_CLASS, PASTE_TOOLBAR_ITEM_CLASS } from '../pm-plugins/constants';
5
+ import { hasLinkMark, hasMediaNode, hasRuleNode, isPastedFromFabricEditor } from '../pm-plugins/util';
6
+ import { pasteOptionsPluginKey, ToolbarDropdownOption } from '../types/types';
7
+ import EditorPasteIcon from './paste-icon';
8
8
  export var isToolbarVisible = function isToolbarVisible(state, lastContentPasted) {
9
9
  var _$from$parent, _$from$node, _state$schema$nodes$c;
10
10
  /**
@@ -1,5 +1,5 @@
1
1
  import type { Slice } from '@atlaskit/editor-prosemirror/model';
2
- import type { ToolbarDropdownOption } from './types';
2
+ import type { ToolbarDropdownOption } from '../types/types';
3
3
  export declare enum PastePluginActionTypes {
4
4
  START_TRACKING_PASTED_MACRO_POSITIONS = "START_TRACKING_PASTED_MACRO_POSITIONS",
5
5
  STOP_TRACKING_PASTED_MACRO_POSITIONS = "STOP_TRACKING_PASTED_MACRO_POSITIONS",
@@ -2,7 +2,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import type { Command } from '@atlaskit/editor-common/types';
3
3
  import type { LastContentPasted } from '@atlaskit/editor-plugin-paste';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import { ToolbarDropdownOption } from './types';
5
+ import { ToolbarDropdownOption } from '../types/types';
6
6
  export declare const showToolbar: (lastContentPasted: LastContentPasted, selectedOption: ToolbarDropdownOption) => Command;
7
7
  export declare const changeToPlainText: () => Command;
8
8
  export declare const changeToPlainTextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, sliceSize: number) => () => Command;
@@ -1,2 +1,2 @@
1
- export { pasteOptionsToolbarPlugin } from './plugin';
2
- export type { PasteOptionsToolbarPlugin } from './plugin';
1
+ export { pasteOptionsToolbarPlugin } from './pasteOptionsToolbarPlugin';
2
+ export type { PasteOptionsToolbarPlugin } from './pasteOptionsToolbarPluginType';
@@ -0,0 +1,2 @@
1
+ import type { PasteOptionsToolbarPlugin } from './pasteOptionsToolbarPluginType';
2
+ export declare const pasteOptionsToolbarPlugin: PasteOptionsToolbarPlugin;
@@ -4,4 +4,3 @@ import type { PastePlugin } from '@atlaskit/editor-plugin-paste';
4
4
  export type PasteOptionsToolbarPlugin = NextEditorPlugin<'pasteOptionsToolbarPlugin', {
5
5
  dependencies: [OptionalPlugin<AnalyticsPlugin>, PastePlugin];
6
6
  }>;
7
- export declare const pasteOptionsToolbarPlugin: PasteOptionsToolbarPlugin;
@@ -1,3 +1,3 @@
1
1
  import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- export declare function createPlugin(dispatch: Dispatch): SafePlugin<import("../types").PasteOtionsPluginState>;
3
+ export declare function createPlugin(dispatch: Dispatch): SafePlugin<import("../types/types").PasteOtionsPluginState>;
@@ -1,2 +1,2 @@
1
- import type { PasteOtionsPluginState } from '../types';
2
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: PasteOtionsPluginState | ((state: import("prosemirror-state").EditorState) => PasteOtionsPluginState)) => import("prosemirror-state").SafeStateField<PasteOtionsPluginState>, createCommand: <A = import("../actions").PastePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => PasteOtionsPluginState;
1
+ import type { PasteOtionsPluginState } from '../types/types';
2
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: PasteOtionsPluginState | ((state: import("prosemirror-state").EditorState) => PasteOtionsPluginState)) => import("prosemirror-state").SafeStateField<PasteOtionsPluginState>, createCommand: <A = import("../editor-actions/actions").PastePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => PasteOtionsPluginState;
@@ -0,0 +1,3 @@
1
+ import type { PastePluginAction as Action } from '../editor-actions/actions';
2
+ import type { PasteOtionsPluginState as State } from '../types/types';
3
+ export declare const reducer: (state: State, action: Action) => State;
@@ -2,7 +2,7 @@ import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { Slice } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
4
4
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
- import type { PasteOtionsPluginState } from '../types';
5
+ import type { PasteOtionsPluginState } from '../../types/types';
6
6
  export declare const formatMarkdown: (tr: Transaction, pluginState: PasteOtionsPluginState) => Transaction;
7
7
  export declare const formatRichText: (tr: Transaction, pluginState: PasteOtionsPluginState) => Transaction;
8
8
  export declare const formatPlainText: (tr: Transaction, pluginState: PasteOtionsPluginState) => Transaction;
@@ -3,7 +3,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { Command, FloatingToolbarConfig, FloatingToolbarDropdown } from '@atlaskit/editor-common/types';
4
4
  import type { LastContentPasted } from '@atlaskit/editor-plugin-paste';
5
5
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
6
- import type { PasteOtionsPluginState } from './types';
6
+ import type { PasteOtionsPluginState } from '../types/types';
7
7
  export declare const isToolbarVisible: (state: EditorState, lastContentPasted: LastContentPasted) => boolean;
8
8
  export declare const getToolbarMenuConfig: (pluginState: PasteOtionsPluginState, intl: IntlShape, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarDropdown<Command>;
9
9
  export declare const buildToolbar: (state: EditorState, intl: IntlShape, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarConfig | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { Slice } from '@atlaskit/editor-prosemirror/model';
2
- import type { ToolbarDropdownOption } from './types';
2
+ import type { ToolbarDropdownOption } from '../types/types';
3
3
  export declare enum PastePluginActionTypes {
4
4
  START_TRACKING_PASTED_MACRO_POSITIONS = "START_TRACKING_PASTED_MACRO_POSITIONS",
5
5
  STOP_TRACKING_PASTED_MACRO_POSITIONS = "STOP_TRACKING_PASTED_MACRO_POSITIONS",
@@ -2,7 +2,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import type { Command } from '@atlaskit/editor-common/types';
3
3
  import type { LastContentPasted } from '@atlaskit/editor-plugin-paste';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import { ToolbarDropdownOption } from './types';
5
+ import { ToolbarDropdownOption } from '../types/types';
6
6
  export declare const showToolbar: (lastContentPasted: LastContentPasted, selectedOption: ToolbarDropdownOption) => Command;
7
7
  export declare const changeToPlainText: () => Command;
8
8
  export declare const changeToPlainTextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, sliceSize: number) => () => Command;
@@ -1,2 +1,2 @@
1
- export { pasteOptionsToolbarPlugin } from './plugin';
2
- export type { PasteOptionsToolbarPlugin } from './plugin';
1
+ export { pasteOptionsToolbarPlugin } from './pasteOptionsToolbarPlugin';
2
+ export type { PasteOptionsToolbarPlugin } from './pasteOptionsToolbarPluginType';
@@ -0,0 +1,2 @@
1
+ import type { PasteOptionsToolbarPlugin } from './pasteOptionsToolbarPluginType';
2
+ export declare const pasteOptionsToolbarPlugin: PasteOptionsToolbarPlugin;
@@ -7,4 +7,3 @@ export type PasteOptionsToolbarPlugin = NextEditorPlugin<'pasteOptionsToolbarPlu
7
7
  PastePlugin
8
8
  ];
9
9
  }>;
10
- export declare const pasteOptionsToolbarPlugin: PasteOptionsToolbarPlugin;
@@ -1,3 +1,3 @@
1
1
  import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- export declare function createPlugin(dispatch: Dispatch): SafePlugin<import("../types").PasteOtionsPluginState>;
3
+ export declare function createPlugin(dispatch: Dispatch): SafePlugin<import("../types/types").PasteOtionsPluginState>;
@@ -1,2 +1,2 @@
1
- import type { PasteOtionsPluginState } from '../types';
2
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: PasteOtionsPluginState | ((state: import("prosemirror-state").EditorState) => PasteOtionsPluginState)) => import("prosemirror-state").SafeStateField<PasteOtionsPluginState>, createCommand: <A = import("../actions").PastePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => PasteOtionsPluginState;
1
+ import type { PasteOtionsPluginState } from '../types/types';
2
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: PasteOtionsPluginState | ((state: import("prosemirror-state").EditorState) => PasteOtionsPluginState)) => import("prosemirror-state").SafeStateField<PasteOtionsPluginState>, createCommand: <A = import("../editor-actions/actions").PastePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => PasteOtionsPluginState;
@@ -0,0 +1,3 @@
1
+ import type { PastePluginAction as Action } from '../editor-actions/actions';
2
+ import type { PasteOtionsPluginState as State } from '../types/types';
3
+ export declare const reducer: (state: State, action: Action) => State;
@@ -2,7 +2,7 @@ import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { Slice } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
4
4
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
- import type { PasteOtionsPluginState } from '../types';
5
+ import type { PasteOtionsPluginState } from '../../types/types';
6
6
  export declare const formatMarkdown: (tr: Transaction, pluginState: PasteOtionsPluginState) => Transaction;
7
7
  export declare const formatRichText: (tr: Transaction, pluginState: PasteOtionsPluginState) => Transaction;
8
8
  export declare const formatPlainText: (tr: Transaction, pluginState: PasteOtionsPluginState) => Transaction;
@@ -3,7 +3,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { Command, FloatingToolbarConfig, FloatingToolbarDropdown } from '@atlaskit/editor-common/types';
4
4
  import type { LastContentPasted } from '@atlaskit/editor-plugin-paste';
5
5
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
6
- import type { PasteOtionsPluginState } from './types';
6
+ import type { PasteOtionsPluginState } from '../types/types';
7
7
  export declare const isToolbarVisible: (state: EditorState, lastContentPasted: LastContentPasted) => boolean;
8
8
  export declare const getToolbarMenuConfig: (pluginState: PasteOtionsPluginState, intl: IntlShape, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarDropdown<Command>;
9
9
  export declare const buildToolbar: (state: EditorState, intl: IntlShape, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarConfig | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste-options-toolbar",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Paste options toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,17 +29,17 @@
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "af:exports": {
31
31
  ".": "./src/index.ts",
32
- "./styles": "./src/styles.ts"
32
+ "./styles": "./src/ui/styles.ts"
33
33
  },
34
34
  "dependencies": {
35
- "@atlaskit/editor-common": "^96.0.0",
35
+ "@atlaskit/editor-common": "^97.0.0",
36
36
  "@atlaskit/editor-markdown-transformer": "^5.13.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
38
38
  "@atlaskit/editor-plugin-paste": "^2.0.0",
39
39
  "@atlaskit/editor-prosemirror": "6.2.1",
40
40
  "@atlaskit/editor-shared-styles": "^3.2.0",
41
- "@atlaskit/icon": "^23.0.0",
42
- "@atlaskit/tokens": "^2.4.0",
41
+ "@atlaskit/icon": "^23.1.0",
42
+ "@atlaskit/tokens": "^2.5.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1",
45
45
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste-options-toolbar/styles",
3
- "main": "../dist/cjs/styles.js",
4
- "module": "../dist/esm/styles.js",
5
- "module:es2019": "../dist/es2019/styles.js",
3
+ "main": "../dist/cjs/ui/styles.js",
4
+ "module": "../dist/esm/ui/styles.js",
5
+ "module:es2019": "../dist/es2019/ui/styles.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/styles.d.ts",
7
+ "types": "../dist/types/ui/styles.d.ts",
8
8
  "typesVersions": {
9
9
  ">=4.5 <5.4": {
10
10
  "*": [
11
- "../dist/types-ts4.5/styles.d.ts"
11
+ "../dist/types-ts4.5/ui/styles.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "textHighlightStyle", {
7
- enumerable: true,
8
- get: function get() {
9
- return _styles.textHighlightStyle;
10
- }
11
- });
12
- var _styles = require("./ui/styles");
@@ -1 +0,0 @@
1
- export { textHighlightStyle } from './ui/styles';
@@ -1 +0,0 @@
1
- export { textHighlightStyle } from './ui/styles';
@@ -1,3 +0,0 @@
1
- import type { PastePluginAction as Action } from './actions';
2
- import type { PasteOtionsPluginState as State } from './types';
3
- export declare const reducer: (state: State, action: Action) => State;
@@ -1 +0,0 @@
1
- export { textHighlightStyle } from './ui/styles';
@@ -1,3 +0,0 @@
1
- import type { PastePluginAction as Action } from './actions';
2
- import type { PasteOtionsPluginState as State } from './types';
3
- export declare const reducer: (state: State, action: Action) => State;
@@ -1 +0,0 @@
1
- export { textHighlightStyle } from './ui/styles';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes