@atlaskit/editor-plugin-copy-button 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/commands.js +2 -2
- package/dist/es2019/commands.js +1 -1
- package/dist/esm/commands.js +1 -1
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-copy-button
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#136348](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136348)
|
|
8
|
+
[`fb4fb56f1da7c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fb4fb56f1da7c) -
|
|
9
|
+
Use optimised entry-points on editor-common for browser.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 1.3.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/commands.js
CHANGED
|
@@ -9,9 +9,9 @@ exports.getProvideMarkVisualFeedbackForCopyButtonCommand = getProvideMarkVisualF
|
|
|
9
9
|
exports.removeMarkVisualFeedbackForCopyButtonCommand = removeMarkVisualFeedbackForCopyButtonCommand;
|
|
10
10
|
exports.resetCopiedState = void 0;
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
|
+
var _browser = require("@atlaskit/editor-common/browser");
|
|
12
13
|
var _clipboard = require("@atlaskit/editor-common/clipboard");
|
|
13
14
|
var _copyButton = require("@atlaskit/editor-common/copy-button");
|
|
14
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
16
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
17
17
|
function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
|
@@ -134,7 +134,7 @@ var createToolbarCopyCommandForNode = exports.createToolbarCopyCommandForNode =
|
|
|
134
134
|
}
|
|
135
135
|
// ED-17083 safari seems have bugs for extension copy because exntension do not have a child text(innerText) and it will not recognized as html in clipboard, this could be merge into one if this extension fixed children issue or safari fix the copy bug
|
|
136
136
|
// MEX-2528 safari has a bug related to the mediaSingle node with border or link. The image tag within the clipboard is not recognized as HTML when using the ClipboardItem API. To address this, we have to switch to ClipboardPolyfill
|
|
137
|
-
if (
|
|
137
|
+
if (_browser.browser.safari && state.selection instanceof _state.NodeSelection && (state.selection.node.type === state.schema.nodes.extension || state.selection.node.type === state.schema.nodes.mediaSingle)) {
|
|
138
138
|
(0, _clipboard.copyHTMLToClipboardPolyfill)(div);
|
|
139
139
|
} else {
|
|
140
140
|
(0, _clipboard.copyHTMLToClipboard)(div);
|
package/dist/es2019/commands.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { browser } from '@atlaskit/editor-common/browser';
|
|
2
3
|
import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
3
4
|
import { getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
|
|
4
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { copyButtonPluginKey } from './pm-plugins/plugin-key';
|
|
7
7
|
export function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
package/dist/esm/commands.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { browser } from '@atlaskit/editor-common/browser';
|
|
2
3
|
import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
3
4
|
import { getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
|
|
4
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { copyButtonPluginKey } from './pm-plugins/plugin-key';
|
|
7
7
|
export function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-copy-button",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "editor-plugin-copy-button for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"atlassian": {
|
|
11
11
|
"team": "Editor: Lego",
|
|
12
12
|
"singleton": true,
|
|
13
|
-
"releaseModel": "continuous",
|
|
14
13
|
"runReact18": false
|
|
15
14
|
},
|
|
16
15
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
@@ -32,11 +31,11 @@
|
|
|
32
31
|
".": "./src/index.ts"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@atlaskit/editor-common": "^88.
|
|
34
|
+
"@atlaskit/editor-common": "^88.8.0",
|
|
36
35
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
37
36
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
38
37
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
39
|
-
"@atlaskit/icon": "^22.
|
|
38
|
+
"@atlaskit/icon": "^22.15.0",
|
|
40
39
|
"@babel/runtime": "^7.0.0"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|