@atlaskit/editor-plugin-copy-button 16.0.7 → 16.1.0
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
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-copy-button
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) -
|
|
8
|
+
Remove stale API report artifacts from published Platform packages.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 16.0.8
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 16.0.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -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
|
|
16
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
17
17
|
var _pluginKey = require("./plugin-key");
|
|
18
18
|
function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
|
19
19
|
function command(state, dispatch) {
|
|
@@ -121,7 +121,7 @@ var createToolbarCopyCommandForNode = exports.createToolbarCopyCommandForNode =
|
|
|
121
121
|
// dispatch is provided -- as otherwise the consumer is only testing to see if
|
|
122
122
|
// the action is availble.
|
|
123
123
|
var domNode = (0, _copyButton.toDOM)(contentNodeWithPos.node, schema);
|
|
124
|
-
if ((0,
|
|
124
|
+
if ((0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
|
|
125
125
|
(0, _copyButton.copyDomNode)(domNode, contentNodeWithPos.node.type, tr.selection);
|
|
126
126
|
} else {
|
|
127
127
|
if (domNode) {
|
|
@@ -3,7 +3,7 @@ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
|
3
3
|
import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
4
4
|
import { copyDomNode, getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { copyButtonPluginKey } from './plugin-key';
|
|
8
8
|
export function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
|
9
9
|
function command(state, dispatch) {
|
|
@@ -3,7 +3,7 @@ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
|
3
3
|
import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
4
4
|
import { copyDomNode, getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { copyButtonPluginKey } from './plugin-key';
|
|
8
8
|
export function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
|
9
9
|
function command(state, dispatch) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-copy-button",
|
|
3
|
-
"version": "16.0
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "editor-plugin-copy-button for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"atlaskit:src": "src/index.ts",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@atlaskit/editor-plugin-accessibility-utils": "^16.0.0",
|
|
23
|
-
"@atlaskit/editor-plugin-analytics": "^16.
|
|
24
|
-
"@atlaskit/editor-plugin-decorations": "^16.
|
|
23
|
+
"@atlaskit/editor-plugin-analytics": "^16.1.0",
|
|
24
|
+
"@atlaskit/editor-plugin-decorations": "^16.1.0",
|
|
25
25
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
26
|
-
"@atlaskit/icon": "^37.
|
|
27
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
26
|
+
"@atlaskit/icon": "^37.6.0",
|
|
27
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
28
28
|
"@babel/runtime": "^7.0.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@atlaskit/editor-common": "^120.
|
|
31
|
+
"@atlaskit/editor-common": "^120.9.0",
|
|
32
32
|
"react": "^18.2.0 || ^19.2.0",
|
|
33
33
|
"react-dom": "^18.2.0 || ^19.2.0"
|
|
34
34
|
},
|
package/report.api.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<!-- API Report Version: 2.3 -->
|
|
2
|
-
|
|
3
|
-
## API Report File for "@atlaskit/editor-plugin-copy-button"
|
|
4
|
-
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
6
|
-
> [API Extractor](https://api-extractor.com/).
|
|
7
|
-
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
8
|
-
|
|
9
|
-
### Table of contents
|
|
10
|
-
|
|
11
|
-
- [Main Entry Types](#main-entry-types)
|
|
12
|
-
- [Peer Dependencies](#peer-dependencies)
|
|
13
|
-
|
|
14
|
-
### Main Entry Types
|
|
15
|
-
|
|
16
|
-
<!--SECTION START: Main Entry Types-->
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
20
|
-
import { Command } from '@atlaskit/editor-common/types';
|
|
21
|
-
import { EditorState } from 'prosemirror-state';
|
|
22
|
-
import { FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
23
|
-
import type { MarkType } from '@atlaskit/editor-prosemirror/model';
|
|
24
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
25
|
-
import { NodeType } from 'prosemirror-model';
|
|
26
|
-
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
27
|
-
|
|
28
|
-
// @public (undocumented)
|
|
29
|
-
export type CopyButtonPlugin = NextEditorPlugin<
|
|
30
|
-
'copyButton',
|
|
31
|
-
{
|
|
32
|
-
dependencies: [OptionalPlugin<AnalyticsPlugin>];
|
|
33
|
-
actions: {
|
|
34
|
-
processCopyButtonItems: typeof processCopyButtonItemsWithAnalytics;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
>;
|
|
38
|
-
|
|
39
|
-
// @public (undocumented)
|
|
40
|
-
export const copyButtonPlugin: CopyButtonPlugin;
|
|
41
|
-
|
|
42
|
-
// @public (undocumented)
|
|
43
|
-
export type CopyButtonPluginState = {
|
|
44
|
-
copied: boolean;
|
|
45
|
-
markSelection?: {
|
|
46
|
-
start: number;
|
|
47
|
-
end: number;
|
|
48
|
-
markType: MarkType;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// @public (undocumented)
|
|
53
|
-
const processCopyButtonItemsWithAnalytics: (
|
|
54
|
-
state: EditorState,
|
|
55
|
-
) => (
|
|
56
|
-
items: FloatingToolbarItem<Command>[],
|
|
57
|
-
hoverDecoration:
|
|
58
|
-
| ((nodeType: NodeType | NodeType[], add: boolean, className?: string | undefined) => Command)
|
|
59
|
-
| undefined,
|
|
60
|
-
) => FloatingToolbarItem<Command>[];
|
|
61
|
-
|
|
62
|
-
// (No @packageDocumentation comment for this package)
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
<!--SECTION END: Main Entry Types-->
|
|
66
|
-
|
|
67
|
-
### Peer Dependencies
|
|
68
|
-
|
|
69
|
-
<!--SECTION START: Peer Dependencies-->
|
|
70
|
-
|
|
71
|
-
```json
|
|
72
|
-
{
|
|
73
|
-
"react": "^16.8.0"
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
<!--SECTION END: Peer Dependencies-->
|