@atlaskit/editor-plugin-copy-button 11.0.14 → 12.0.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 +32 -0
- package/copyButtonPlugin/package.json +1 -8
- package/copyButtonPluginType/package.json +1 -8
- package/package.json +8 -16
- package/dist/types-ts4.5/copyButtonPlugin.d.ts +0 -2
- package/dist/types-ts4.5/copyButtonPluginType.d.ts +0 -26
- package/dist/types-ts4.5/entry-points/copyButtonPlugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/copyButtonPluginType.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -11
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -2
- package/dist/types-ts4.5/ui/toolbar.d.ts +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-copy-button
|
|
2
2
|
|
|
3
|
+
## 12.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 11.0.15
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 11.0.14
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/copyButtonPlugin.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/copyButtonPlugin.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/copyButtonPlugin.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/copyButtonPlugin.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/copyButtonPlugin.d.ts"
|
|
15
8
|
}
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/copyButtonPluginType.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/copyButtonPluginType.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/copyButtonPluginType.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/copyButtonPluginType.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/copyButtonPluginType.d.ts"
|
|
15
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-copy-button",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "editor-plugin-copy-button for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,27 +16,19 @@
|
|
|
16
16
|
"module": "dist/esm/index.js",
|
|
17
17
|
"module:es2019": "dist/es2019/index.js",
|
|
18
18
|
"types": "dist/types/index.d.ts",
|
|
19
|
-
"typesVersions": {
|
|
20
|
-
">=4.5 <4.9": {
|
|
21
|
-
"*": [
|
|
22
|
-
"dist/types-ts4.5/*",
|
|
23
|
-
"dist/types-ts4.5/index.d.ts"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
19
|
"sideEffects": false,
|
|
28
20
|
"atlaskit:src": "src/index.ts",
|
|
29
21
|
"dependencies": {
|
|
30
|
-
"@atlaskit/editor-plugin-accessibility-utils": "^
|
|
31
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
32
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
33
|
-
"@atlaskit/editor-prosemirror": "^
|
|
34
|
-
"@atlaskit/icon": "^
|
|
35
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
22
|
+
"@atlaskit/editor-plugin-accessibility-utils": "^12.0.0",
|
|
23
|
+
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
24
|
+
"@atlaskit/editor-plugin-decorations": "^12.0.0",
|
|
25
|
+
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
26
|
+
"@atlaskit/icon": "^36.0.0",
|
|
27
|
+
"@atlaskit/tmp-editor-statsig": "^104.0.0",
|
|
36
28
|
"@babel/runtime": "^7.0.0"
|
|
37
29
|
},
|
|
38
30
|
"peerDependencies": {
|
|
39
|
-
"@atlaskit/editor-common": "^
|
|
31
|
+
"@atlaskit/editor-common": "^116.0.0",
|
|
40
32
|
"react": "^18.2.0",
|
|
41
33
|
"react-dom": "^18.2.0"
|
|
42
34
|
},
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Command, FloatingToolbarItem, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibility-utils';
|
|
3
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
5
|
-
import type { MarkType } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
declare const processCopyButtonItemsWithAnalytics: (state: EditorState) => (items: Array<FloatingToolbarItem<Command>>, hoverDecoration: HoverDecorationHandler | undefined) => Array<FloatingToolbarItem<Command>>;
|
|
8
|
-
export type CopyButtonPlugin = NextEditorPlugin<'copyButton', {
|
|
9
|
-
actions: {
|
|
10
|
-
afterCopy: (message: string) => void;
|
|
11
|
-
processCopyButtonItems: typeof processCopyButtonItemsWithAnalytics;
|
|
12
|
-
};
|
|
13
|
-
dependencies: [
|
|
14
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
15
|
-
OptionalPlugin<AccessibilityUtilsPlugin>
|
|
16
|
-
];
|
|
17
|
-
}>;
|
|
18
|
-
export type CopyButtonPluginState = {
|
|
19
|
-
copied: boolean;
|
|
20
|
-
markSelection?: {
|
|
21
|
-
end: number;
|
|
22
|
-
markType: MarkType;
|
|
23
|
-
start: number;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { copyButtonPlugin } from '../copyButtonPlugin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { CopyButtonPlugin, CopyButtonPluginState } from '../copyButtonPluginType';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { ExtractInjectionAPI, Command, CommandDispatch } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
4
|
-
import type { MarkType, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import type { CopyButtonPlugin } from '../copyButtonPluginType';
|
|
7
|
-
export declare function createToolbarCopyCommandForMark(markType: MarkType, editorAnalyticsApi: EditorAnalyticsAPI | undefined): Command;
|
|
8
|
-
export declare function getProvideMarkVisualFeedbackForCopyButtonCommand(markType: MarkType): (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
9
|
-
export declare function removeMarkVisualFeedbackForCopyButtonCommand(state: EditorState, dispatch: CommandDispatch | undefined): boolean;
|
|
10
|
-
export declare const createToolbarCopyCommandForNode: (nodeType: NodeType | Array<NodeType>, editorAnalyticsApi: EditorAnalyticsAPI | undefined, api: ExtractInjectionAPI<CopyButtonPlugin> | undefined, onClickMessage?: string) => Command;
|
|
11
|
-
export declare const resetCopiedState: (nodeType: NodeType | Array<NodeType>, hoverDecoration: HoverDecorationHandler | undefined, onMouseLeave?: Command) => Command;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { MarkType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { CopyButtonPluginState } from '../copyButtonPluginType';
|
|
4
|
-
export declare function getMarkSelectionHelper({ $pos, markType, }: {
|
|
5
|
-
$pos: ResolvedPos;
|
|
6
|
-
markType: MarkType;
|
|
7
|
-
}): false | {
|
|
8
|
-
end: number;
|
|
9
|
-
start: number;
|
|
10
|
-
};
|
|
11
|
-
export declare function copyButtonPlugin(): SafePlugin<CopyButtonPluginState>;
|
|
12
|
-
export default copyButtonPlugin;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { ExtractInjectionAPI, Command, FloatingToolbarButton, FloatingToolbarItem, MarkOptions, NodeOptions } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
4
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { CopyButtonPlugin } from '../copyButtonPluginType';
|
|
6
|
-
/**
|
|
7
|
-
* Performs the actions after a copy operation.
|
|
8
|
-
* - Sets the copied state in the editor state
|
|
9
|
-
* - Announces the copied message to the user
|
|
10
|
-
*/
|
|
11
|
-
export declare const afterCopy: (api?: ExtractInjectionAPI<CopyButtonPlugin>) => (message: string) => void;
|
|
12
|
-
export declare function getCopyButtonConfig(options: MarkOptions | NodeOptions, hoverDecoration: HoverDecorationHandler | undefined, editorAnalyticsApi: EditorAnalyticsAPI | undefined, api?: ExtractInjectionAPI<CopyButtonPlugin>): FloatingToolbarButton<Command>;
|
|
13
|
-
/**
|
|
14
|
-
* Process floatingToolbar items for copyButton
|
|
15
|
-
*/
|
|
16
|
-
export declare const processCopyButtonItems: (editorAnalyticsApi?: EditorAnalyticsAPI | undefined, api?: ExtractInjectionAPI<CopyButtonPlugin>) => (state: EditorState) => (items: Array<FloatingToolbarItem<Command>>, hoverDecoration: HoverDecorationHandler | undefined) => Array<FloatingToolbarItem<Command>>;
|