@atlaskit/editor-plugin-copy-button 1.1.5 → 1.1.6

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/.eslintrc.js CHANGED
@@ -1,14 +1,14 @@
1
1
  module.exports = {
2
- rules: {
3
- '@typescript-eslint/no-duplicate-imports': 'error',
4
- '@typescript-eslint/no-explicit-any': 'error',
5
- },
6
- overrides: [
7
- {
8
- files: ['**/__tests__/**/*.{js,ts,tsx}', '**/examples/**/*.{js,ts,tsx}'],
9
- rules: {
10
- '@typescript-eslint/no-explicit-any': 'off',
11
- },
12
- },
13
- ],
2
+ rules: {
3
+ '@typescript-eslint/no-duplicate-imports': 'error',
4
+ '@typescript-eslint/no-explicit-any': 'error',
5
+ },
6
+ overrides: [
7
+ {
8
+ files: ['**/__tests__/**/*.{js,ts,tsx}', '**/examples/**/*.{js,ts,tsx}'],
9
+ rules: {
10
+ '@typescript-eslint/no-explicit-any': 'off',
11
+ },
12
+ },
13
+ ],
14
14
  };
package/CHANGELOG.md CHANGED
@@ -1,133 +1,141 @@
1
1
  # @atlaskit/editor-plugin-copy-button
2
2
 
3
+ ## 1.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#103294](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103294)
8
+ [`4853ec31c00b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4853ec31c00b) -
9
+ fixed a bug with copy button
10
+
3
11
  ## 1.1.5
4
12
 
5
13
  ### Patch Changes
6
14
 
7
- - Updated dependencies
15
+ - Updated dependencies
8
16
 
9
17
  ## 1.1.4
10
18
 
11
19
  ### Patch Changes
12
20
 
13
- - Updated dependencies
21
+ - Updated dependencies
14
22
 
15
23
  ## 1.1.3
16
24
 
17
25
  ### Patch Changes
18
26
 
19
- - [#99954](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99954)
20
- [`0d119c672ce2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0d119c672ce2) -
21
- [ED-23345] Clean up showCopyButton check which enabled the copy button only if the copy button
22
- plugin was enabled. This is now in the universal and default presets so will always be enabled.
23
- - Updated dependencies
27
+ - [#99954](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99954)
28
+ [`0d119c672ce2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0d119c672ce2) -
29
+ [ED-23345] Clean up showCopyButton check which enabled the copy button only if the copy button
30
+ plugin was enabled. This is now in the universal and default presets so will always be enabled.
31
+ - Updated dependencies
24
32
 
25
33
  ## 1.1.2
26
34
 
27
35
  ### Patch Changes
28
36
 
29
- - [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
30
- [`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
31
- [HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
32
- language triggering composition on an empty line.This was fixed in a patch bump of
33
- prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
37
+ - [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
38
+ [`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
39
+ [HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
40
+ language triggering composition on an empty line.This was fixed in a patch bump of
41
+ prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
34
42
 
35
43
  ## 1.1.1
36
44
 
37
45
  ### Patch Changes
38
46
 
39
- - Updated dependencies
47
+ - Updated dependencies
40
48
 
41
49
  ## 1.1.0
42
50
 
43
51
  ### Minor Changes
44
52
 
45
- - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
46
- [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
47
- bumped editor-prosemirror version to 4.0.0
53
+ - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
54
+ [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
55
+ bumped editor-prosemirror version to 4.0.0
48
56
 
49
57
  ### Patch Changes
50
58
 
51
- - Updated dependencies
59
+ - Updated dependencies
52
60
 
53
61
  ## 1.0.8
54
62
 
55
63
  ### Patch Changes
56
64
 
57
- - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
58
- [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
59
- Upgrade Typescript from `4.9.5` to `5.4.2`
65
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
66
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
67
+ Upgrade Typescript from `4.9.5` to `5.4.2`
60
68
 
61
69
  ## 1.0.7
62
70
 
63
71
  ### Patch Changes
64
72
 
65
- - Updated dependencies
73
+ - Updated dependencies
66
74
 
67
75
  ## 1.0.6
68
76
 
69
77
  ### Patch Changes
70
78
 
71
- - Updated dependencies
79
+ - Updated dependencies
72
80
 
73
81
  ## 1.0.5
74
82
 
75
83
  ### Patch Changes
76
84
 
77
- - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
78
- [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
79
- Upgrading @atlaskit/editor-prosemirror dependency
85
+ - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
86
+ [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
87
+ Upgrading @atlaskit/editor-prosemirror dependency
80
88
 
81
89
  ## 1.0.4
82
90
 
83
91
  ### Patch Changes
84
92
 
85
- - Updated dependencies
93
+ - Updated dependencies
86
94
 
87
95
  ## 1.0.3
88
96
 
89
97
  ### Patch Changes
90
98
 
91
- - Updated dependencies
99
+ - Updated dependencies
92
100
 
93
101
  ## 1.0.2
94
102
 
95
103
  ### Patch Changes
96
104
 
97
- - Updated dependencies
105
+ - Updated dependencies
98
106
 
99
107
  ## 1.0.1
100
108
 
101
109
  ### Patch Changes
102
110
 
103
- - Updated dependencies
111
+ - Updated dependencies
104
112
 
105
113
  ## 1.0.0
106
114
 
107
115
  ### Major Changes
108
116
 
109
- - [#41021](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41021)
110
- [`79abfef6196`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79abfef6196) -
111
- ED-20299 remove unnecessary entry points in editor-plugin-copy-button and refactor
117
+ - [#41021](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41021)
118
+ [`79abfef6196`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79abfef6196) - ED-20299
119
+ remove unnecessary entry points in editor-plugin-copy-button and refactor
112
120
 
113
121
  ### Patch Changes
114
122
 
115
- - Updated dependencies
123
+ - Updated dependencies
116
124
 
117
125
  ## 0.2.1
118
126
 
119
127
  ### Patch Changes
120
128
 
121
- - Updated dependencies
129
+ - Updated dependencies
122
130
 
123
131
  ## 0.2.0
124
132
 
125
133
  ### Minor Changes
126
134
 
127
- - [#40092](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40092)
128
- [`9f2365fabcc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9f2365fabcc) -
129
- ED-19617 - Initial creation of editor-plugin-copy-button package
135
+ - [#40092](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40092)
136
+ [`9f2365fabcc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9f2365fabcc) -
137
+ ED-19617 - Initial creation of editor-plugin-copy-button package
130
138
 
131
139
  ### Patch Changes
132
140
 
133
- - Updated dependencies
141
+ - Updated dependencies
package/LICENSE.md CHANGED
@@ -1,13 +1,11 @@
1
1
  Copyright 2023 Atlassian Pty Ltd
2
2
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
4
+ compliance with the License. You may obtain a copy of the License at
6
5
 
7
6
  http://www.apache.org/licenses/LICENSE-2.0
8
7
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
8
+ Unless required by applicable law or agreed to in writing, software distributed under the License is
9
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+ implied. See the License for the specific language governing permissions and limitations under the
11
+ License.
@@ -1,32 +1,74 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.copyButtonPlugin = copyButtonPlugin;
7
8
  exports.default = void 0;
9
+ exports.getMarkSelectionHelper = getMarkSelectionHelper;
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
11
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
9
12
  var _view = require("@atlaskit/editor-prosemirror/view");
10
13
  var _pluginKey = require("./plugin-key");
11
- function getMarkSelectionDecorationStartAndEnd(_ref) {
12
- var markType = _ref.markType,
13
- transaction = _ref.transaction;
14
- var headResolvedPos = transaction.selection.$head;
15
- var textNodeIndex = transaction.selection.$head.index();
16
- var textNode = headResolvedPos.parent.maybeChild(textNodeIndex);
17
- var textNodeOffset = 0;
18
- headResolvedPos.parent.forEach(function (_node, nodeOffset, index) {
19
- if (index === textNodeIndex) {
20
- textNodeOffset = nodeOffset;
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
+ 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
+ function getMarkSelectionHelper(_ref) {
17
+ var $pos = _ref.$pos,
18
+ markType = _ref.markType;
19
+ var hasMark = $pos.doc.rangeHasMark($pos.pos, Math.min($pos.pos + 1, $pos.doc.nodeSize), markType);
20
+ if (!hasMark) {
21
+ return false;
22
+ }
23
+ if ($pos.parent.childCount === 1) {
24
+ var nodePosition = $pos.pos;
25
+ var maybeNode = $pos.doc.nodeAt(nodePosition);
26
+ if (!maybeNode || !maybeNode.isText) {
27
+ return false;
21
28
  }
29
+ var start = $pos.pos - $pos.parentOffset;
30
+ var end = start + maybeNode.nodeSize;
31
+ return {
32
+ start: start,
33
+ end: end
34
+ };
35
+ }
36
+ if ($pos.parent.childCount > 1) {
37
+ var _start = $pos.pos - $pos.textOffset;
38
+ var maybeTextNode = $pos.doc.nodeAt(_start);
39
+ if (!maybeTextNode || !maybeTextNode.isText) {
40
+ return false;
41
+ }
42
+ var _end = _start + maybeTextNode.nodeSize;
43
+ return {
44
+ start: _start,
45
+ end: _end
46
+ };
47
+ }
48
+ return false;
49
+ }
50
+ function getMarkSelectionDecorationStartAndEnd(_ref2) {
51
+ var markType = _ref2.markType,
52
+ transaction = _ref2.transaction;
53
+ var anchorPositions = getMarkSelectionHelper({
54
+ $pos: transaction.selection.$anchor,
55
+ markType: markType
22
56
  });
23
- var start = headResolvedPos.start(headResolvedPos.depth) + textNodeOffset;
24
- var end = start + textNode.text.length;
25
- return {
26
- start: start,
27
- end: end,
57
+ if (anchorPositions) {
58
+ return _objectSpread(_objectSpread({}, anchorPositions), {}, {
59
+ markType: markType
60
+ });
61
+ }
62
+ var headPositions = getMarkSelectionHelper({
63
+ $pos: transaction.selection.$head,
28
64
  markType: markType
29
- };
65
+ });
66
+ if (headPositions) {
67
+ return _objectSpread(_objectSpread({}, headPositions), {}, {
68
+ markType: markType
69
+ });
70
+ }
71
+ return undefined;
30
72
  }
31
73
  function copyButtonPlugin() {
32
74
  return new _safePlugin.SafePlugin({
@@ -1,26 +1,66 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
3
  import { copyButtonPluginKey } from './plugin-key';
4
+ export function getMarkSelectionHelper({
5
+ $pos,
6
+ markType
7
+ }) {
8
+ const hasMark = $pos.doc.rangeHasMark($pos.pos, Math.min($pos.pos + 1, $pos.doc.nodeSize), markType);
9
+ if (!hasMark) {
10
+ return false;
11
+ }
12
+ if ($pos.parent.childCount === 1) {
13
+ const nodePosition = $pos.pos;
14
+ const maybeNode = $pos.doc.nodeAt(nodePosition);
15
+ if (!maybeNode || !maybeNode.isText) {
16
+ return false;
17
+ }
18
+ const start = $pos.pos - $pos.parentOffset;
19
+ const end = start + maybeNode.nodeSize;
20
+ return {
21
+ start,
22
+ end
23
+ };
24
+ }
25
+ if ($pos.parent.childCount > 1) {
26
+ const start = $pos.pos - $pos.textOffset;
27
+ const maybeTextNode = $pos.doc.nodeAt(start);
28
+ if (!maybeTextNode || !maybeTextNode.isText) {
29
+ return false;
30
+ }
31
+ const end = start + maybeTextNode.nodeSize;
32
+ return {
33
+ start,
34
+ end
35
+ };
36
+ }
37
+ return false;
38
+ }
4
39
  function getMarkSelectionDecorationStartAndEnd({
5
40
  markType,
6
41
  transaction
7
42
  }) {
8
- const headResolvedPos = transaction.selection.$head;
9
- const textNodeIndex = transaction.selection.$head.index();
10
- const textNode = headResolvedPos.parent.maybeChild(textNodeIndex);
11
- let textNodeOffset = 0;
12
- headResolvedPos.parent.forEach((_node, nodeOffset, index) => {
13
- if (index === textNodeIndex) {
14
- textNodeOffset = nodeOffset;
15
- }
43
+ const anchorPositions = getMarkSelectionHelper({
44
+ $pos: transaction.selection.$anchor,
45
+ markType
16
46
  });
17
- const start = headResolvedPos.start(headResolvedPos.depth) + textNodeOffset;
18
- const end = start + textNode.text.length;
19
- return {
20
- start,
21
- end,
47
+ if (anchorPositions) {
48
+ return {
49
+ ...anchorPositions,
50
+ markType
51
+ };
52
+ }
53
+ const headPositions = getMarkSelectionHelper({
54
+ $pos: transaction.selection.$head,
22
55
  markType
23
- };
56
+ });
57
+ if (headPositions) {
58
+ return {
59
+ ...headPositions,
60
+ markType
61
+ };
62
+ }
63
+ return undefined;
24
64
  }
25
65
  export function copyButtonPlugin() {
26
66
  return new SafePlugin({
@@ -1,25 +1,65 @@
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; }
1
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
5
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
6
  import { copyButtonPluginKey } from './plugin-key';
4
- function getMarkSelectionDecorationStartAndEnd(_ref) {
5
- var markType = _ref.markType,
6
- transaction = _ref.transaction;
7
- var headResolvedPos = transaction.selection.$head;
8
- var textNodeIndex = transaction.selection.$head.index();
9
- var textNode = headResolvedPos.parent.maybeChild(textNodeIndex);
10
- var textNodeOffset = 0;
11
- headResolvedPos.parent.forEach(function (_node, nodeOffset, index) {
12
- if (index === textNodeIndex) {
13
- textNodeOffset = nodeOffset;
7
+ export function getMarkSelectionHelper(_ref) {
8
+ var $pos = _ref.$pos,
9
+ markType = _ref.markType;
10
+ var hasMark = $pos.doc.rangeHasMark($pos.pos, Math.min($pos.pos + 1, $pos.doc.nodeSize), markType);
11
+ if (!hasMark) {
12
+ return false;
13
+ }
14
+ if ($pos.parent.childCount === 1) {
15
+ var nodePosition = $pos.pos;
16
+ var maybeNode = $pos.doc.nodeAt(nodePosition);
17
+ if (!maybeNode || !maybeNode.isText) {
18
+ return false;
14
19
  }
20
+ var start = $pos.pos - $pos.parentOffset;
21
+ var end = start + maybeNode.nodeSize;
22
+ return {
23
+ start: start,
24
+ end: end
25
+ };
26
+ }
27
+ if ($pos.parent.childCount > 1) {
28
+ var _start = $pos.pos - $pos.textOffset;
29
+ var maybeTextNode = $pos.doc.nodeAt(_start);
30
+ if (!maybeTextNode || !maybeTextNode.isText) {
31
+ return false;
32
+ }
33
+ var _end = _start + maybeTextNode.nodeSize;
34
+ return {
35
+ start: _start,
36
+ end: _end
37
+ };
38
+ }
39
+ return false;
40
+ }
41
+ function getMarkSelectionDecorationStartAndEnd(_ref2) {
42
+ var markType = _ref2.markType,
43
+ transaction = _ref2.transaction;
44
+ var anchorPositions = getMarkSelectionHelper({
45
+ $pos: transaction.selection.$anchor,
46
+ markType: markType
15
47
  });
16
- var start = headResolvedPos.start(headResolvedPos.depth) + textNodeOffset;
17
- var end = start + textNode.text.length;
18
- return {
19
- start: start,
20
- end: end,
48
+ if (anchorPositions) {
49
+ return _objectSpread(_objectSpread({}, anchorPositions), {}, {
50
+ markType: markType
51
+ });
52
+ }
53
+ var headPositions = getMarkSelectionHelper({
54
+ $pos: transaction.selection.$head,
21
55
  markType: markType
22
- };
56
+ });
57
+ if (headPositions) {
58
+ return _objectSpread(_objectSpread({}, headPositions), {}, {
59
+ markType: markType
60
+ });
61
+ }
62
+ return undefined;
23
63
  }
24
64
  export function copyButtonPlugin() {
25
65
  return new SafePlugin({
@@ -1,4 +1,12 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import type { MarkType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
3
  import type { CopyButtonPluginState } from '../types';
4
+ export declare function getMarkSelectionHelper({ $pos, markType, }: {
5
+ $pos: ResolvedPos;
6
+ markType: MarkType;
7
+ }): false | {
8
+ start: number;
9
+ end: number;
10
+ };
3
11
  export declare function copyButtonPlugin(): SafePlugin<CopyButtonPluginState>;
4
12
  export default copyButtonPlugin;
@@ -1,4 +1,12 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import type { MarkType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
3
  import type { CopyButtonPluginState } from '../types';
4
+ export declare function getMarkSelectionHelper({ $pos, markType, }: {
5
+ $pos: ResolvedPos;
6
+ markType: MarkType;
7
+ }): false | {
8
+ start: number;
9
+ end: number;
10
+ };
3
11
  export declare function copyButtonPlugin(): SafePlugin<CopyButtonPluginState>;
4
12
  export default copyButtonPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-copy-button",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "editor-plugin-copy-button for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  ".": "./src/index.ts"
33
33
  },
34
34
  "dependencies": {
35
- "@atlaskit/editor-common": "^81.0.0",
35
+ "@atlaskit/editor-common": "^81.1.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.2.0",
37
37
  "@atlaskit/editor-plugin-decorations": "^1.1.0",
38
38
  "@atlaskit/editor-prosemirror": "4.0.1",
@@ -44,7 +44,6 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@atlaskit/analytics-next": "^9.3.0",
47
- "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
48
47
  "@testing-library/react": "^12.1.5",
49
48
  "react-dom": "^16.8.0",
50
49
  "typescript": "~5.4.2"
@@ -81,6 +80,5 @@
81
80
  "import-no-extraneous-disable-for-examples-and-docs"
82
81
  ]
83
82
  }
84
- },
85
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
83
+ }
86
84
  }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/editor-plugin-copy-button"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -26,13 +27,13 @@ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
26
27
 
27
28
  // @public (undocumented)
28
29
  export type CopyButtonPlugin = NextEditorPlugin<
29
- 'copyButton',
30
- {
31
- dependencies: [OptionalPlugin<AnalyticsPlugin>];
32
- actions: {
33
- processCopyButtonItems: typeof processCopyButtonItemsWithAnalytics;
34
- };
35
- }
30
+ 'copyButton',
31
+ {
32
+ dependencies: [OptionalPlugin<AnalyticsPlugin>];
33
+ actions: {
34
+ processCopyButtonItems: typeof processCopyButtonItemsWithAnalytics;
35
+ };
36
+ }
36
37
  >;
37
38
 
38
39
  // @public (undocumented)
@@ -40,26 +41,22 @@ export const copyButtonPlugin: CopyButtonPlugin;
40
41
 
41
42
  // @public (undocumented)
42
43
  export type CopyButtonPluginState = {
43
- copied: boolean;
44
- markSelection?: {
45
- start: number;
46
- end: number;
47
- markType: MarkType;
48
- };
44
+ copied: boolean;
45
+ markSelection?: {
46
+ start: number;
47
+ end: number;
48
+ markType: MarkType;
49
+ };
49
50
  };
50
51
 
51
52
  // @public (undocumented)
52
53
  const processCopyButtonItemsWithAnalytics: (
53
- state: EditorState,
54
+ state: EditorState,
54
55
  ) => (
55
- items: FloatingToolbarItem<Command>[],
56
- hoverDecoration:
57
- | ((
58
- nodeType: NodeType | NodeType[],
59
- add: boolean,
60
- className?: string | undefined,
61
- ) => Command)
62
- | undefined,
56
+ items: FloatingToolbarItem<Command>[],
57
+ hoverDecoration:
58
+ | ((nodeType: NodeType | NodeType[], add: boolean, className?: string | undefined) => Command)
59
+ | undefined,
63
60
  ) => FloatingToolbarItem<Command>[];
64
61
 
65
62
  // (No @packageDocumentation comment for this package)
@@ -73,7 +70,7 @@ const processCopyButtonItemsWithAnalytics: (
73
70
 
74
71
  ```json
75
72
  {
76
- "react": "^16.8.0"
73
+ "react": "^16.8.0"
77
74
  }
78
75
  ```
79
76