@atlaskit/editor-plugin-copy-button 1.3.12 → 1.3.13

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 (31) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/{plugin.js → copyButtonPlugin.js} +1 -1
  3. package/dist/cjs/{types.js → copyButtonPluginType.js} +1 -1
  4. package/dist/cjs/index.js +2 -2
  5. package/dist/cjs/{commands.js → pm-plugins/commands.js} +1 -1
  6. package/dist/cjs/{toolbar.js → ui/toolbar.js} +2 -2
  7. package/dist/es2019/{plugin.js → copyButtonPlugin.js} +1 -1
  8. package/dist/es2019/{types.js → copyButtonPluginType.js} +1 -1
  9. package/dist/es2019/index.js +1 -1
  10. package/dist/es2019/{commands.js → pm-plugins/commands.js} +1 -1
  11. package/dist/es2019/{toolbar.js → ui/toolbar.js} +2 -2
  12. package/dist/esm/{plugin.js → copyButtonPlugin.js} +1 -1
  13. package/dist/esm/{types.js → copyButtonPluginType.js} +1 -1
  14. package/dist/esm/index.js +1 -1
  15. package/dist/esm/{commands.js → pm-plugins/commands.js} +1 -1
  16. package/dist/esm/{toolbar.js → ui/toolbar.js} +2 -2
  17. package/dist/types/copyButtonPlugin.d.ts +2 -0
  18. package/dist/types/index.d.ts +2 -2
  19. package/dist/types/pm-plugins/main.d.ts +1 -1
  20. package/dist/types-ts4.5/copyButtonPlugin.d.ts +2 -0
  21. package/dist/types-ts4.5/index.d.ts +2 -2
  22. package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
  23. package/package.json +6 -3
  24. package/dist/types/plugin.d.ts +0 -2
  25. package/dist/types-ts4.5/plugin.d.ts +0 -2
  26. /package/dist/types/{types.d.ts → copyButtonPluginType.d.ts} +0 -0
  27. /package/dist/types/{commands.d.ts → pm-plugins/commands.d.ts} +0 -0
  28. /package/dist/types/{toolbar.d.ts → ui/toolbar.d.ts} +0 -0
  29. /package/dist/types-ts4.5/{types.d.ts → copyButtonPluginType.d.ts} +0 -0
  30. /package/dist/types-ts4.5/{commands.d.ts → pm-plugins/commands.d.ts} +0 -0
  31. /package/dist/types-ts4.5/{toolbar.d.ts → ui/toolbar.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-plugin-copy-button
2
2
 
3
+ ## 1.3.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [#168970](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168970)
8
+ [`97db2d026001d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/97db2d026001d) -
9
+ ED-25808: refactors plugins to meet folder standards
10
+ - Updated dependencies
11
+
3
12
  ## 1.3.12
4
13
 
5
14
  ### Patch Changes
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.copyButtonPlugin = void 0;
8
8
  var _main = _interopRequireDefault(require("./pm-plugins/main"));
9
- var _toolbar = require("./toolbar");
9
+ var _toolbar = require("./ui/toolbar");
10
10
  var copyButtonPlugin = exports.copyButtonPlugin = function copyButtonPlugin(_ref) {
11
11
  var _api$analytics;
12
12
  var api = _ref.api;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _toolbar = require("./toolbar");
3
+ var _toolbar = require("./ui/toolbar");
4
4
  var editorAnalyticsApi = undefined;
5
5
  var processCopyButtonItemsWithAnalytics = (0, _toolbar.processCopyButtonItems)(editorAnalyticsApi);
package/dist/cjs/index.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "copyButtonPlugin", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _plugin.copyButtonPlugin;
9
+ return _copyButtonPlugin.copyButtonPlugin;
10
10
  }
11
11
  });
12
- var _plugin = require("./plugin");
12
+ var _copyButtonPlugin = require("./copyButtonPlugin");
@@ -13,7 +13,7 @@ var _browser = require("@atlaskit/editor-common/browser");
13
13
  var _clipboard = require("@atlaskit/editor-common/clipboard");
14
14
  var _copyButton = require("@atlaskit/editor-common/copy-button");
15
15
  var _state = require("@atlaskit/editor-prosemirror/state");
16
- var _pluginKey = require("./pm-plugins/plugin-key");
16
+ var _pluginKey = require("./plugin-key");
17
17
  function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
18
18
  function command(state, dispatch) {
19
19
  var textNode = state.tr.selection.$head.parent.maybeChild(state.tr.selection.$head.index());
@@ -9,8 +9,8 @@ exports.processCopyButtonItems = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
11
11
  var _copy = _interopRequireDefault(require("@atlaskit/icon/core/migration/copy"));
12
- var _commands = require("./commands");
13
- var _pluginKey = require("./pm-plugins/plugin-key");
12
+ var _commands = require("../pm-plugins/commands");
13
+ var _pluginKey = require("../pm-plugins/plugin-key");
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
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1,5 +1,5 @@
1
1
  import createPlugin from './pm-plugins/main';
2
- import { processCopyButtonItems } from './toolbar';
2
+ import { processCopyButtonItems } from './ui/toolbar';
3
3
  export const copyButtonPlugin = ({
4
4
  api
5
5
  }) => {
@@ -1,3 +1,3 @@
1
- import { processCopyButtonItems } from './toolbar';
1
+ import { processCopyButtonItems } from './ui/toolbar';
2
2
  const editorAnalyticsApi = undefined;
3
3
  const processCopyButtonItemsWithAnalytics = processCopyButtonItems(editorAnalyticsApi);
@@ -1 +1 @@
1
- export { copyButtonPlugin } from './plugin';
1
+ export { copyButtonPlugin } from './copyButtonPlugin';
@@ -3,7 +3,7 @@ import { browser } from '@atlaskit/editor-common/browser';
3
3
  import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
4
4
  import { getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
5
5
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
6
- import { copyButtonPluginKey } from './pm-plugins/plugin-key';
6
+ import { copyButtonPluginKey } from './plugin-key';
7
7
  export function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
8
8
  function command(state, dispatch) {
9
9
  const textNode = state.tr.selection.$head.parent.maybeChild(state.tr.selection.$head.index());
@@ -1,7 +1,7 @@
1
1
  import commonMessages from '@atlaskit/editor-common/messages';
2
2
  import CopyIcon from '@atlaskit/icon/core/migration/copy';
3
- import { createToolbarCopyCommandForMark, createToolbarCopyCommandForNode, getProvideMarkVisualFeedbackForCopyButtonCommand, removeMarkVisualFeedbackForCopyButtonCommand, resetCopiedState } from './commands';
4
- import { copyButtonPluginKey } from './pm-plugins/plugin-key';
3
+ import { createToolbarCopyCommandForMark, createToolbarCopyCommandForNode, getProvideMarkVisualFeedbackForCopyButtonCommand, removeMarkVisualFeedbackForCopyButtonCommand, resetCopiedState } from '../pm-plugins/commands';
4
+ import { copyButtonPluginKey } from '../pm-plugins/plugin-key';
5
5
 
6
6
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
7
  function isSeparator(item) {
@@ -1,5 +1,5 @@
1
1
  import createPlugin from './pm-plugins/main';
2
- import { processCopyButtonItems } from './toolbar';
2
+ import { processCopyButtonItems } from './ui/toolbar';
3
3
  export var copyButtonPlugin = function copyButtonPlugin(_ref) {
4
4
  var _api$analytics;
5
5
  var api = _ref.api;
@@ -1,3 +1,3 @@
1
- import { processCopyButtonItems } from './toolbar';
1
+ import { processCopyButtonItems } from './ui/toolbar';
2
2
  var editorAnalyticsApi = undefined;
3
3
  var processCopyButtonItemsWithAnalytics = processCopyButtonItems(editorAnalyticsApi);
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { copyButtonPlugin } from './plugin';
1
+ export { copyButtonPlugin } from './copyButtonPlugin';
@@ -3,7 +3,7 @@ import { browser } from '@atlaskit/editor-common/browser';
3
3
  import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
4
4
  import { getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
5
5
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
6
- import { copyButtonPluginKey } from './pm-plugins/plugin-key';
6
+ import { copyButtonPluginKey } from './plugin-key';
7
7
  export function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
8
8
  function command(state, dispatch) {
9
9
  var textNode = state.tr.selection.$head.parent.maybeChild(state.tr.selection.$head.index());
@@ -3,8 +3,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
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 commonMessages from '@atlaskit/editor-common/messages';
5
5
  import CopyIcon from '@atlaskit/icon/core/migration/copy';
6
- import { createToolbarCopyCommandForMark, createToolbarCopyCommandForNode, getProvideMarkVisualFeedbackForCopyButtonCommand, removeMarkVisualFeedbackForCopyButtonCommand, resetCopiedState } from './commands';
7
- import { copyButtonPluginKey } from './pm-plugins/plugin-key';
6
+ import { createToolbarCopyCommandForMark, createToolbarCopyCommandForNode, getProvideMarkVisualFeedbackForCopyButtonCommand, removeMarkVisualFeedbackForCopyButtonCommand, resetCopiedState } from '../pm-plugins/commands';
7
+ import { copyButtonPluginKey } from '../pm-plugins/plugin-key';
8
8
 
9
9
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
10
  function isSeparator(item) {
@@ -0,0 +1,2 @@
1
+ import type { CopyButtonPlugin } from './copyButtonPluginType';
2
+ export declare const copyButtonPlugin: CopyButtonPlugin;
@@ -1,2 +1,2 @@
1
- export type { CopyButtonPlugin, CopyButtonPluginState } from './types';
2
- export { copyButtonPlugin } from './plugin';
1
+ export type { CopyButtonPlugin, CopyButtonPluginState } from './copyButtonPluginType';
2
+ export { copyButtonPlugin } from './copyButtonPlugin';
@@ -1,6 +1,6 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { MarkType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
- import type { CopyButtonPluginState } from '../types';
3
+ import type { CopyButtonPluginState } from '../copyButtonPluginType';
4
4
  export declare function getMarkSelectionHelper({ $pos, markType, }: {
5
5
  $pos: ResolvedPos;
6
6
  markType: MarkType;
@@ -0,0 +1,2 @@
1
+ import type { CopyButtonPlugin } from './copyButtonPluginType';
2
+ export declare const copyButtonPlugin: CopyButtonPlugin;
@@ -1,2 +1,2 @@
1
- export type { CopyButtonPlugin, CopyButtonPluginState } from './types';
2
- export { copyButtonPlugin } from './plugin';
1
+ export type { CopyButtonPlugin, CopyButtonPluginState } from './copyButtonPluginType';
2
+ export { copyButtonPlugin } from './copyButtonPlugin';
@@ -1,6 +1,6 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { MarkType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
- import type { CopyButtonPluginState } from '../types';
3
+ import type { CopyButtonPluginState } from '../copyButtonPluginType';
4
4
  export declare function getMarkSelectionHelper({ $pos, markType, }: {
5
5
  $pos: ResolvedPos;
6
6
  markType: MarkType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-copy-button",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "editor-plugin-copy-button for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,11 +31,11 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/editor-common": "^95.0.0",
34
+ "@atlaskit/editor-common": "^95.7.0",
35
35
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
36
36
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
37
37
  "@atlaskit/editor-prosemirror": "6.0.0",
38
- "@atlaskit/icon": "^22.24.0",
38
+ "@atlaskit/icon": "^22.26.0",
39
39
  "@babel/runtime": "^7.0.0"
40
40
  },
41
41
  "peerDependencies": {
@@ -49,6 +49,9 @@
49
49
  },
50
50
  "techstack": {
51
51
  "@atlassian/frontend": {
52
+ "code-structure": [
53
+ "editor-plugin"
54
+ ],
52
55
  "import-structure": [
53
56
  "atlassian-conventions"
54
57
  ],
@@ -1,2 +0,0 @@
1
- import type { CopyButtonPlugin } from './types';
2
- export declare const copyButtonPlugin: CopyButtonPlugin;
@@ -1,2 +0,0 @@
1
- import type { CopyButtonPlugin } from './types';
2
- export declare const copyButtonPlugin: CopyButtonPlugin;
File without changes