@atlaskit/editor-core 187.43.12 → 187.43.17

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 (92) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/labs/next/presets/default.js +2 -1
  3. package/dist/cjs/labs/next/presets/universal.js +1 -1
  4. package/dist/cjs/plugins/clipboard/pm-plugins/main.js +13 -54
  5. package/dist/cjs/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +1 -1
  6. package/dist/cjs/plugins/floating-toolbar/index.js +1 -2
  7. package/dist/cjs/plugins/index.js +0 -7
  8. package/dist/cjs/plugins/selection/utils.js +29 -80
  9. package/dist/cjs/plugins/type-ahead/index.js +2 -2
  10. package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +4 -4
  11. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +2 -2
  12. package/dist/cjs/utils/clipboard.js +19 -127
  13. package/dist/cjs/version-wrapper.js +1 -1
  14. package/dist/es2019/labs/next/presets/default.js +2 -1
  15. package/dist/es2019/labs/next/presets/universal.js +2 -2
  16. package/dist/es2019/plugins/clipboard/pm-plugins/main.js +3 -53
  17. package/dist/es2019/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +1 -1
  18. package/dist/es2019/plugins/floating-toolbar/index.js +1 -2
  19. package/dist/es2019/plugins/index.js +0 -1
  20. package/dist/es2019/plugins/selection/utils.js +3 -74
  21. package/dist/es2019/plugins/type-ahead/index.js +1 -1
  22. package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +1 -1
  23. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +1 -1
  24. package/dist/es2019/utils/clipboard.js +1 -53
  25. package/dist/es2019/version-wrapper.js +1 -1
  26. package/dist/esm/labs/next/presets/default.js +2 -1
  27. package/dist/esm/labs/next/presets/universal.js +2 -2
  28. package/dist/esm/plugins/clipboard/pm-plugins/main.js +3 -49
  29. package/dist/esm/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +1 -1
  30. package/dist/esm/plugins/floating-toolbar/index.js +1 -2
  31. package/dist/esm/plugins/index.js +0 -1
  32. package/dist/esm/plugins/selection/utils.js +3 -72
  33. package/dist/esm/plugins/type-ahead/index.js +1 -1
  34. package/dist/esm/plugins/type-ahead/pm-plugins/main.js +1 -1
  35. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +1 -1
  36. package/dist/esm/utils/clipboard.js +1 -119
  37. package/dist/esm/version-wrapper.js +1 -1
  38. package/dist/types/labs/next/presets/default.d.ts +68 -4
  39. package/dist/types/plugins/clipboard/pm-plugins/main.d.ts +2 -3
  40. package/dist/types/plugins/index.d.ts +0 -1
  41. package/dist/types/plugins/selection/utils.d.ts +2 -5
  42. package/dist/types/plugins/type-ahead/api.d.ts +1 -1
  43. package/dist/types/plugins/type-ahead/commands/update-list-items.d.ts +1 -1
  44. package/dist/types/plugins/type-ahead/commands/update-query.d.ts +1 -1
  45. package/dist/types/plugins/type-ahead/commands/update-selected-index.d.ts +1 -1
  46. package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +1 -1
  47. package/dist/types/plugins/type-ahead/types.d.ts +1 -1
  48. package/dist/types/utils/clipboard.d.ts +1 -3
  49. package/dist/types-ts4.5/labs/next/presets/default.d.ts +86 -0
  50. package/dist/types-ts4.5/plugins/clipboard/pm-plugins/main.d.ts +2 -3
  51. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  52. package/dist/types-ts4.5/plugins/selection/utils.d.ts +2 -5
  53. package/dist/types-ts4.5/plugins/type-ahead/api.d.ts +1 -1
  54. package/dist/types-ts4.5/plugins/type-ahead/commands/update-list-items.d.ts +1 -1
  55. package/dist/types-ts4.5/plugins/type-ahead/commands/update-query.d.ts +1 -1
  56. package/dist/types-ts4.5/plugins/type-ahead/commands/update-selected-index.d.ts +1 -1
  57. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/main.d.ts +1 -1
  58. package/dist/types-ts4.5/plugins/type-ahead/types.d.ts +1 -1
  59. package/dist/types-ts4.5/utils/clipboard.d.ts +1 -3
  60. package/package.json +12 -8
  61. package/report.api.md +1 -1
  62. package/tmp/api-report-tmp.d.ts +1 -1
  63. package/dist/cjs/plugins/copy-button/commands.js +0 -171
  64. package/dist/cjs/plugins/copy-button/index.js +0 -23
  65. package/dist/cjs/plugins/copy-button/pm-plugins/main.js +0 -104
  66. package/dist/cjs/plugins/copy-button/pm-plugins/plugin-key.js +0 -9
  67. package/dist/cjs/plugins/copy-button/toolbar.js +0 -99
  68. package/dist/cjs/plugins/copy-button/utils.js +0 -22
  69. package/dist/es2019/plugins/copy-button/commands.js +0 -157
  70. package/dist/es2019/plugins/copy-button/index.js +0 -11
  71. package/dist/es2019/plugins/copy-button/pm-plugins/main.js +0 -97
  72. package/dist/es2019/plugins/copy-button/pm-plugins/plugin-key.js +0 -2
  73. package/dist/es2019/plugins/copy-button/toolbar.js +0 -82
  74. package/dist/es2019/plugins/copy-button/utils.js +0 -15
  75. package/dist/esm/plugins/copy-button/commands.js +0 -159
  76. package/dist/esm/plugins/copy-button/index.js +0 -15
  77. package/dist/esm/plugins/copy-button/pm-plugins/main.js +0 -96
  78. package/dist/esm/plugins/copy-button/pm-plugins/plugin-key.js +0 -2
  79. package/dist/esm/plugins/copy-button/toolbar.js +0 -89
  80. package/dist/esm/plugins/copy-button/utils.js +0 -14
  81. package/dist/types/plugins/copy-button/commands.d.ts +0 -9
  82. package/dist/types/plugins/copy-button/index.d.ts +0 -3
  83. package/dist/types/plugins/copy-button/pm-plugins/main.d.ts +0 -4
  84. package/dist/types/plugins/copy-button/pm-plugins/plugin-key.d.ts +0 -2
  85. package/dist/types/plugins/copy-button/toolbar.d.ts +0 -13
  86. package/dist/types/plugins/copy-button/utils.d.ts +0 -8
  87. package/dist/types-ts4.5/plugins/copy-button/commands.d.ts +0 -9
  88. package/dist/types-ts4.5/plugins/copy-button/index.d.ts +0 -3
  89. package/dist/types-ts4.5/plugins/copy-button/pm-plugins/main.d.ts +0 -4
  90. package/dist/types-ts4.5/plugins/copy-button/pm-plugins/plugin-key.d.ts +0 -2
  91. package/dist/types-ts4.5/plugins/copy-button/toolbar.d.ts +0 -13
  92. package/dist/types-ts4.5/plugins/copy-button/utils.d.ts +0 -8
@@ -1,119 +1 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
- import * as clipboard from 'clipboard-polyfill';
5
- var isClipboardApiSupported = function isClipboardApiSupported() {
6
- return !!navigator.clipboard && typeof navigator.clipboard.writeText === 'function';
7
- };
8
- var isIEClipboardApiSupported = function isIEClipboardApiSupported() {
9
- return window.clipboardData && typeof window.clipboardData.setData === 'function';
10
- };
11
- export var copyToClipboard = /*#__PURE__*/function () {
12
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(textToCopy) {
13
- return _regeneratorRuntime.wrap(function _callee$(_context) {
14
- while (1) switch (_context.prev = _context.next) {
15
- case 0:
16
- if (!isClipboardApiSupported()) {
17
- _context.next = 11;
18
- break;
19
- }
20
- _context.prev = 1;
21
- _context.next = 4;
22
- return navigator.clipboard.writeText(textToCopy);
23
- case 4:
24
- _context.next = 9;
25
- break;
26
- case 6:
27
- _context.prev = 6;
28
- _context.t0 = _context["catch"](1);
29
- throw new Error('Clipboard api is not supported');
30
- case 9:
31
- _context.next = 23;
32
- break;
33
- case 11:
34
- if (!isIEClipboardApiSupported()) {
35
- _context.next = 22;
36
- break;
37
- }
38
- _context.prev = 12;
39
- _context.next = 15;
40
- return window.clipboardData.setData('text', textToCopy);
41
- case 15:
42
- _context.next = 20;
43
- break;
44
- case 17:
45
- _context.prev = 17;
46
- _context.t1 = _context["catch"](12);
47
- throw new Error('IE clipboard api is not supported');
48
- case 20:
49
- _context.next = 23;
50
- break;
51
- case 22:
52
- throw new Error('Clipboard api is not supported');
53
- case 23:
54
- case "end":
55
- return _context.stop();
56
- }
57
- }, _callee, null, [[1, 6], [12, 17]]);
58
- }));
59
- return function copyToClipboard(_x) {
60
- return _ref.apply(this, arguments);
61
- };
62
- }();
63
- export var copyHTMLToClipboard = /*#__PURE__*/function () {
64
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(elementToCopy, plainTextToCopy) {
65
- var data;
66
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
67
- while (1) switch (_context2.prev = _context2.next) {
68
- case 0:
69
- if (!(isClipboardApiSupported() && typeof ClipboardItem !== 'undefined')) {
70
- _context2.next = 12;
71
- break;
72
- }
73
- _context2.prev = 1;
74
- data = new ClipboardItem({
75
- 'text/plain': new Blob([plainTextToCopy || elementToCopy.innerText], {
76
- type: 'text/plain'
77
- }),
78
- 'text/html': new Blob([elementToCopy.innerHTML], {
79
- type: 'text/html'
80
- })
81
- }); // @ts-ignore
82
- _context2.next = 5;
83
- return navigator.clipboard.write([data]);
84
- case 5:
85
- _context2.next = 10;
86
- break;
87
- case 7:
88
- _context2.prev = 7;
89
- _context2.t0 = _context2["catch"](1);
90
- throw new Error('Clipboard api is not supported');
91
- case 10:
92
- _context2.next = 13;
93
- break;
94
- case 12:
95
- if ((typeof document === "undefined" ? "undefined" : _typeof(document)) !== undefined) {
96
- // ED-17083 extension copy seems have issue with ClipboardItem API
97
- // Hence of use of this polyfill
98
- copyHTMLToClipboardPolyfill(elementToCopy, plainTextToCopy);
99
- }
100
- case 13:
101
- case "end":
102
- return _context2.stop();
103
- }
104
- }, _callee2, null, [[1, 7]]);
105
- }));
106
- return function copyHTMLToClipboard(_x2, _x3) {
107
- return _ref2.apply(this, arguments);
108
- };
109
- }();
110
-
111
- // At the time of development, Firefox doesn't support ClipboardItem API
112
- // Hence of use of this polyfill
113
- export var copyHTMLToClipboardPolyfill = function copyHTMLToClipboardPolyfill(elementToCopy, plainTextToCopy) {
114
- var Clipboard = clipboard;
115
- var dt = new Clipboard.DT();
116
- dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
117
- dt.setData('text/html', elementToCopy.innerHTML);
118
- Clipboard.write(dt);
119
- };
1
+ export { copyToClipboard, copyHTMLToClipboard, copyHTMLToClipboardPolyfill } from '@atlaskit/editor-common/clipboard';
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.43.12";
2
+ export var version = "187.43.17";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -34,7 +34,7 @@ export type DefaultPresetPluginOptions = {
34
34
  * Note: The order that presets are added determines
35
35
  * their placement in the editor toolbar
36
36
  */
37
- export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "placeholder", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBlock", {
37
+ export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "placeholder", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "copyButton", "floatingToolbar", "selection", "codeBlock"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBlock", {
38
38
  pluginConfiguration: CodeBlockOptions;
39
39
  dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
40
40
  sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
@@ -99,7 +99,23 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
99
99
  actions: {
100
100
  api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
101
101
  };
102
- }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
102
+ }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
103
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
104
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
105
+ sharedState: {
106
+ createAnalyticsEvent: CreateUIAnalyticsEvent | null;
107
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
108
+ };
109
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
110
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
111
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
112
+ }, import("@atlaskit/editor-common/types").FeatureFlags>];
113
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
114
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
115
+ actions: {
116
+ processCopyButtonItems: (state: import("prosemirror-state").EditorState) => (items: import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[], hoverDecoration: ((nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command) | undefined) => import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[];
117
+ };
118
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
103
119
  sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
104
120
  }, undefined>];
105
121
  actions: {
@@ -109,6 +125,22 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
109
125
  configWithNodeInfo: import("@atlaskit/editor-plugin-floating-toolbar").ConfigWithNodeInfo | undefined;
110
126
  floatingToolbarData: import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData | undefined;
111
127
  } | undefined;
128
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
129
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
130
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
131
+ sharedState: {
132
+ createAnalyticsEvent: CreateUIAnalyticsEvent | null;
133
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
134
+ };
135
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
136
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
137
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
138
+ }, import("@atlaskit/editor-common/types").FeatureFlags>];
139
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
140
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
141
+ actions: {
142
+ processCopyButtonItems: (state: import("prosemirror-state").EditorState) => (items: import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[], hoverDecoration: ((nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command) | undefined) => import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[];
143
+ };
112
144
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"fakeTextCursor", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"submitEditor", {
113
145
  pluginConfiguration: ((editorView: import("prosemirror-view").EditorView) => void) | undefined;
114
146
  }, ((editorView: import("prosemirror-view").EditorView) => void) | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
@@ -210,7 +242,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
210
242
  };
211
243
  sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
212
244
  }, HyperlinkPluginOptions | undefined>, ...import("@atlaskit/editor-common/types").AllEditorPresetPluginTypes[]]>;
213
- export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "placeholder", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBlock", {
245
+ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "placeholder", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "copyButton", "floatingToolbar", "selection", "codeBlock"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBlock", {
214
246
  pluginConfiguration: CodeBlockOptions;
215
247
  dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
216
248
  sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
@@ -275,7 +307,23 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
275
307
  actions: {
276
308
  api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
277
309
  };
278
- }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
310
+ }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
311
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
312
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
313
+ sharedState: {
314
+ createAnalyticsEvent: CreateUIAnalyticsEvent | null;
315
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
316
+ };
317
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
318
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
319
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
320
+ }, import("@atlaskit/editor-common/types").FeatureFlags>];
321
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
322
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
323
+ actions: {
324
+ processCopyButtonItems: (state: import("prosemirror-state").EditorState) => (items: import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[], hoverDecoration: ((nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command) | undefined) => import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[];
325
+ };
326
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
279
327
  sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
280
328
  }, undefined>];
281
329
  actions: {
@@ -285,6 +333,22 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
285
333
  configWithNodeInfo: import("@atlaskit/editor-plugin-floating-toolbar").ConfigWithNodeInfo | undefined;
286
334
  floatingToolbarData: import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData | undefined;
287
335
  } | undefined;
336
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
337
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
338
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
339
+ sharedState: {
340
+ createAnalyticsEvent: CreateUIAnalyticsEvent | null;
341
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
342
+ };
343
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
344
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
345
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
346
+ }, import("@atlaskit/editor-common/types").FeatureFlags>];
347
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
348
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
349
+ actions: {
350
+ processCopyButtonItems: (state: import("prosemirror-state").EditorState) => (items: import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[], hoverDecoration: ((nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command) | undefined) => import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[];
351
+ };
288
352
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"fakeTextCursor", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"submitEditor", {
289
353
  pluginConfiguration: ((editorView: import("prosemirror-view").EditorView) => void) | undefined;
290
354
  }, ((editorView: import("prosemirror-view").EditorView) => void) | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
@@ -1,12 +1,11 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
3
  import type { PMPluginFactoryParams } from '../../../types';
5
4
  import type { DispatchAnalyticsEvent } from '../../analytics/types/dispatch-analytics-event';
6
- import type { AnalyticsEventPayload } from '../../../plugins/analytics';
7
5
  import { ACTION } from '../../analytics/types/enums';
8
6
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
9
7
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
8
+ import { getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
10
9
  export declare const createPlugin: ({ dispatchAnalyticsEvent, schema, }: PMPluginFactoryParams) => SafePlugin<any>;
11
10
  /**
12
11
  * Overrides Prosemirror's default clipboardSerializer, in order to fix table row copy/paste bug raised in ED-13003.
@@ -16,4 +15,4 @@ export declare const createPlugin: ({ dispatchAnalyticsEvent, schema, }: PMPlugi
16
15
  */
17
16
  export declare const createClipboardSerializer: (schema: Schema, getEditorView: () => EditorView) => DOMSerializer;
18
17
  export declare const sendClipboardAnalytics: (view: EditorView, dispatchAnalyticsEvent: DispatchAnalyticsEvent, action: ACTION.CUT | ACTION.COPIED) => boolean;
19
- export declare const getAnalyticsPayload: (state: EditorState, action: ACTION.CUT | ACTION.COPIED) => AnalyticsEventPayload | undefined;
18
+ export { getAnalyticsPayload };
@@ -48,5 +48,4 @@ export { default as avatarGroupPlugin } from './avatar-group';
48
48
  export { default as viewUpdateSubscriptionPlugin } from './view-update-subscription';
49
49
  export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
50
50
  export { default as codeBidiWarningPlugin } from './code-bidi-warning';
51
- export { default as copyButtonPlugin } from './copy-button';
52
51
  export { default as borderPlugin } from './border';
@@ -4,15 +4,12 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { Node as PmNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { ContentNodeWithPos, NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
7
- import type { AnalyticsEventPayload } from '../analytics';
7
+ import { getNodeSelectionAnalyticsPayload, getAllSelectionAnalyticsPayload, getRangeSelectionAnalyticsPayload, getCellSelectionAnalyticsPayload } from '@atlaskit/editor-common/selection';
8
8
  export declare function createSelectionClickHandler(nodes: string[], isValidTarget: (target: HTMLElement) => boolean, options: {
9
9
  useLongPressSelection: boolean;
10
10
  getNodeSelectionPos?: (state: EditorState, nodePos: number) => number;
11
11
  }): (view: EditorView, pos: number, node: PmNode, nodePos: number, event: MouseEvent, direct: boolean) => boolean;
12
12
  export declare const getDecorations: (tr: Transaction | ReadonlyTransaction) => DecorationSet;
13
- export declare function getNodeSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
14
- export declare function getAllSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
15
- export declare function getCellSelectionAnalyticsPayload(state: EditorState): AnalyticsEventPayload | undefined;
16
13
  /**
17
14
  * Use `getNodesToDecorateFromSelection` to collect and return
18
15
  * a list of nodes within the Selection that should have Selection
@@ -25,7 +22,6 @@ export declare const getNodesToDecorateFromSelection: (selection: Selection, doc
25
22
  node: PmNode;
26
23
  pos: number;
27
24
  }[];
28
- export declare function getRangeSelectionAnalyticsPayload(selection: Selection, doc: PmNode): AnalyticsEventPayload | undefined;
29
25
  export declare function shouldRecalcDecorations({ oldEditorState, newEditorState, }: {
30
26
  oldEditorState: EditorState;
31
27
  newEditorState: EditorState;
@@ -64,3 +60,4 @@ export declare const findFirstChildNodeToSelect: (parent: PmNode) => NodeWithPos
64
60
  export declare const findLastChildNodeToSelect: (parent: PmNode) => NodeWithPos | undefined;
65
61
  export declare const isSelectionAtStartOfParentNode: ($pos: ResolvedPos, selection: Selection) => boolean;
66
62
  export declare const isSelectionAtEndOfParentNode: ($pos: ResolvedPos, selection: Selection) => boolean;
63
+ export { getNodeSelectionAnalyticsPayload, getAllSelectionAnalyticsPayload, getRangeSelectionAnalyticsPayload, getCellSelectionAnalyticsPayload, };
@@ -4,7 +4,7 @@ import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
4
4
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
5
5
  import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
6
6
  import type { TypeAheadHandler } from './types';
7
- import type { Command } from '../../types/command';
7
+ import type { Command } from '@atlaskit/editor-common/types';
8
8
  type CloseOptions = {
9
9
  insertCurrentQueryAsRawText: boolean;
10
10
  attachCommand?: Command;
@@ -1,3 +1,3 @@
1
1
  import type { TypeAheadItem } from '../types';
2
- import { Command } from '../../../types/command';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
3
  export declare const updateListItem: (items: Array<TypeAheadItem>) => Command;
@@ -1,2 +1,2 @@
1
- import { Command } from '../../../types/command';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
2
  export declare const updateQuery: (query: string) => Command;
@@ -1,2 +1,2 @@
1
- import { Command } from '../../../types/command';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
2
  export declare const updateSelectedIndex: (selectedIndex: number) => Command;
@@ -1,7 +1,7 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
- import type { Dispatch } from '../../../event-dispatcher';
4
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import type { PopupMountPointReference, TypeAheadHandler } from '../types';
6
6
  type Props = {
7
7
  reactDispatch: Dispatch;
@@ -1,7 +1,7 @@
1
1
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { EditorState, Transaction, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { CloseSelectionOptions } from './constants';
4
- import type { UiComponentFactoryParams } from '../../types/ui-components';
4
+ import type { UiComponentFactoryParams } from '@atlaskit/editor-common/types';
5
5
  import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
6
6
  import type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler } from '@atlaskit/editor-common/types';
7
7
  import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
@@ -1,3 +1 @@
1
- export declare const copyToClipboard: (textToCopy: string) => Promise<void>;
2
- export declare const copyHTMLToClipboard: (elementToCopy: HTMLElement, plainTextToCopy?: string) => Promise<void>;
3
- export declare const copyHTMLToClipboardPolyfill: (elementToCopy: HTMLElement, plainTextToCopy?: string) => void;
1
+ export { copyToClipboard, copyHTMLToClipboard, copyHTMLToClipboardPolyfill, } from '@atlaskit/editor-common/clipboard';
@@ -46,6 +46,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
46
46
  "editorDisabled",
47
47
  "submitEditor",
48
48
  "fakeTextCursor",
49
+ "copyButton",
49
50
  "floatingToolbar",
50
51
  "selection",
51
52
  "codeBlock"
@@ -133,6 +134,27 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
133
134
  api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
134
135
  };
135
136
  }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>,
137
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
138
+ dependencies: [
139
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
140
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
141
+ sharedState: {
142
+ createAnalyticsEvent: CreateUIAnalyticsEvent | null;
143
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
144
+ };
145
+ dependencies: [
146
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
147
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
148
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
149
+ }, import("@atlaskit/editor-common/types").FeatureFlags>
150
+ ];
151
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
152
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
153
+ ];
154
+ actions: {
155
+ processCopyButtonItems: (state: import("prosemirror-state").EditorState) => (items: import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[], hoverDecoration: ((nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command) | undefined) => import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[];
156
+ };
157
+ }, undefined>,
136
158
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
137
159
  sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
138
160
  }, undefined>
@@ -145,6 +167,27 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
145
167
  floatingToolbarData: import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData | undefined;
146
168
  } | undefined;
147
169
  }, undefined>,
170
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
171
+ dependencies: [
172
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
173
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
174
+ sharedState: {
175
+ createAnalyticsEvent: CreateUIAnalyticsEvent | null;
176
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
177
+ };
178
+ dependencies: [
179
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
180
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
181
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
182
+ }, import("@atlaskit/editor-common/types").FeatureFlags>
183
+ ];
184
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
185
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
186
+ ];
187
+ actions: {
188
+ processCopyButtonItems: (state: import("prosemirror-state").EditorState) => (items: import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[], hoverDecoration: ((nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command) | undefined) => import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[];
189
+ };
190
+ }, undefined>,
148
191
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"fakeTextCursor", {}, undefined>,
149
192
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"submitEditor", {
150
193
  pluginConfiguration: ((editorView: import("prosemirror-view").EditorView) => void) | undefined;
@@ -282,6 +325,7 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
282
325
  "editorDisabled",
283
326
  "submitEditor",
284
327
  "fakeTextCursor",
328
+ "copyButton",
285
329
  "floatingToolbar",
286
330
  "selection",
287
331
  "codeBlock"
@@ -369,6 +413,27 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
369
413
  api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
370
414
  };
371
415
  }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>,
416
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
417
+ dependencies: [
418
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
419
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
420
+ sharedState: {
421
+ createAnalyticsEvent: CreateUIAnalyticsEvent | null;
422
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
423
+ };
424
+ dependencies: [
425
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
426
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
427
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
428
+ }, import("@atlaskit/editor-common/types").FeatureFlags>
429
+ ];
430
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
431
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
432
+ ];
433
+ actions: {
434
+ processCopyButtonItems: (state: import("prosemirror-state").EditorState) => (items: import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[], hoverDecoration: ((nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command) | undefined) => import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[];
435
+ };
436
+ }, undefined>,
372
437
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
373
438
  sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
374
439
  }, undefined>
@@ -381,6 +446,27 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
381
446
  floatingToolbarData: import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData | undefined;
382
447
  } | undefined;
383
448
  }, undefined>,
449
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
450
+ dependencies: [
451
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
452
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
453
+ sharedState: {
454
+ createAnalyticsEvent: CreateUIAnalyticsEvent | null;
455
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
456
+ };
457
+ dependencies: [
458
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
459
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
460
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
461
+ }, import("@atlaskit/editor-common/types").FeatureFlags>
462
+ ];
463
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
464
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
465
+ ];
466
+ actions: {
467
+ processCopyButtonItems: (state: import("prosemirror-state").EditorState) => (items: import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[], hoverDecoration: ((nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command) | undefined) => import("@atlaskit/editor-common/types").FloatingToolbarItem<import("@atlaskit/editor-common/types").Command>[];
468
+ };
469
+ }, undefined>,
384
470
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"fakeTextCursor", {}, undefined>,
385
471
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"submitEditor", {
386
472
  pluginConfiguration: ((editorView: import("prosemirror-view").EditorView) => void) | undefined;
@@ -1,12 +1,11 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
3
  import type { PMPluginFactoryParams } from '../../../types';
5
4
  import type { DispatchAnalyticsEvent } from '../../analytics/types/dispatch-analytics-event';
6
- import type { AnalyticsEventPayload } from '../../../plugins/analytics';
7
5
  import { ACTION } from '../../analytics/types/enums';
8
6
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
9
7
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
8
+ import { getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
10
9
  export declare const createPlugin: ({ dispatchAnalyticsEvent, schema, }: PMPluginFactoryParams) => SafePlugin<any>;
11
10
  /**
12
11
  * Overrides Prosemirror's default clipboardSerializer, in order to fix table row copy/paste bug raised in ED-13003.
@@ -16,4 +15,4 @@ export declare const createPlugin: ({ dispatchAnalyticsEvent, schema, }: PMPlugi
16
15
  */
17
16
  export declare const createClipboardSerializer: (schema: Schema, getEditorView: () => EditorView) => DOMSerializer;
18
17
  export declare const sendClipboardAnalytics: (view: EditorView, dispatchAnalyticsEvent: DispatchAnalyticsEvent, action: ACTION.CUT | ACTION.COPIED) => boolean;
19
- export declare const getAnalyticsPayload: (state: EditorState, action: ACTION.CUT | ACTION.COPIED) => AnalyticsEventPayload | undefined;
18
+ export { getAnalyticsPayload };
@@ -48,5 +48,4 @@ export { default as avatarGroupPlugin } from './avatar-group';
48
48
  export { default as viewUpdateSubscriptionPlugin } from './view-update-subscription';
49
49
  export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
50
50
  export { default as codeBidiWarningPlugin } from './code-bidi-warning';
51
- export { default as copyButtonPlugin } from './copy-button';
52
51
  export { default as borderPlugin } from './border';
@@ -4,15 +4,12 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { Node as PmNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { ContentNodeWithPos, NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
7
- import type { AnalyticsEventPayload } from '../analytics';
7
+ import { getNodeSelectionAnalyticsPayload, getAllSelectionAnalyticsPayload, getRangeSelectionAnalyticsPayload, getCellSelectionAnalyticsPayload } from '@atlaskit/editor-common/selection';
8
8
  export declare function createSelectionClickHandler(nodes: string[], isValidTarget: (target: HTMLElement) => boolean, options: {
9
9
  useLongPressSelection: boolean;
10
10
  getNodeSelectionPos?: (state: EditorState, nodePos: number) => number;
11
11
  }): (view: EditorView, pos: number, node: PmNode, nodePos: number, event: MouseEvent, direct: boolean) => boolean;
12
12
  export declare const getDecorations: (tr: Transaction | ReadonlyTransaction) => DecorationSet;
13
- export declare function getNodeSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
14
- export declare function getAllSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
15
- export declare function getCellSelectionAnalyticsPayload(state: EditorState): AnalyticsEventPayload | undefined;
16
13
  /**
17
14
  * Use `getNodesToDecorateFromSelection` to collect and return
18
15
  * a list of nodes within the Selection that should have Selection
@@ -25,7 +22,6 @@ export declare const getNodesToDecorateFromSelection: (selection: Selection, doc
25
22
  node: PmNode;
26
23
  pos: number;
27
24
  }[];
28
- export declare function getRangeSelectionAnalyticsPayload(selection: Selection, doc: PmNode): AnalyticsEventPayload | undefined;
29
25
  export declare function shouldRecalcDecorations({ oldEditorState, newEditorState, }: {
30
26
  oldEditorState: EditorState;
31
27
  newEditorState: EditorState;
@@ -64,3 +60,4 @@ export declare const findFirstChildNodeToSelect: (parent: PmNode) => NodeWithPos
64
60
  export declare const findLastChildNodeToSelect: (parent: PmNode) => NodeWithPos | undefined;
65
61
  export declare const isSelectionAtStartOfParentNode: ($pos: ResolvedPos, selection: Selection) => boolean;
66
62
  export declare const isSelectionAtEndOfParentNode: ($pos: ResolvedPos, selection: Selection) => boolean;
63
+ export { getNodeSelectionAnalyticsPayload, getAllSelectionAnalyticsPayload, getRangeSelectionAnalyticsPayload, getCellSelectionAnalyticsPayload, };
@@ -4,7 +4,7 @@ import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
4
4
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
5
5
  import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
6
6
  import type { TypeAheadHandler } from './types';
7
- import type { Command } from '../../types/command';
7
+ import type { Command } from '@atlaskit/editor-common/types';
8
8
  type CloseOptions = {
9
9
  insertCurrentQueryAsRawText: boolean;
10
10
  attachCommand?: Command;
@@ -1,3 +1,3 @@
1
1
  import type { TypeAheadItem } from '../types';
2
- import { Command } from '../../../types/command';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
3
  export declare const updateListItem: (items: Array<TypeAheadItem>) => Command;
@@ -1,2 +1,2 @@
1
- import { Command } from '../../../types/command';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
2
  export declare const updateQuery: (query: string) => Command;
@@ -1,2 +1,2 @@
1
- import { Command } from '../../../types/command';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
2
  export declare const updateSelectedIndex: (selectedIndex: number) => Command;
@@ -1,7 +1,7 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
- import type { Dispatch } from '../../../event-dispatcher';
4
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import type { PopupMountPointReference, TypeAheadHandler } from '../types';
6
6
  type Props = {
7
7
  reactDispatch: Dispatch;
@@ -1,7 +1,7 @@
1
1
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { EditorState, Transaction, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { CloseSelectionOptions } from './constants';
4
- import type { UiComponentFactoryParams } from '../../types/ui-components';
4
+ import type { UiComponentFactoryParams } from '@atlaskit/editor-common/types';
5
5
  import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
6
6
  import type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler } from '@atlaskit/editor-common/types';
7
7
  import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
@@ -1,3 +1 @@
1
- export declare const copyToClipboard: (textToCopy: string) => Promise<void>;
2
- export declare const copyHTMLToClipboard: (elementToCopy: HTMLElement, plainTextToCopy?: string) => Promise<void>;
3
- export declare const copyHTMLToClipboardPolyfill: (elementToCopy: HTMLElement, plainTextToCopy?: string) => void;
1
+ export { copyToClipboard, copyHTMLToClipboard, copyHTMLToClipboardPolyfill, } from '@atlaskit/editor-common/clipboard';