@atlaskit/editor-core 189.0.3 → 189.0.5
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 +12 -0
- package/dist/cjs/plugins/paste/handlers.js +15 -13
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +95 -73
- package/dist/cjs/plugins/paste/pm-plugins/main.js +15 -13
- package/dist/cjs/plugins/paste/util/index.js +4 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/paste/handlers.js +4 -4
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +27 -26
- package/dist/es2019/plugins/paste/pm-plugins/main.js +15 -13
- package/dist/es2019/plugins/paste/util/index.js +4 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +15 -13
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +94 -71
- package/dist/esm/plugins/paste/pm-plugins/main.js +15 -13
- package/dist/esm/plugins/paste/util/index.js +4 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/paste/handlers.d.ts +3 -3
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +11 -11
- package/dist/types/plugins/paste/util/index.d.ts +2 -1
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +3 -3
- package/dist/types-ts4.5/plugins/paste/pm-plugins/analytics.d.ts +11 -11
- package/dist/types-ts4.5/plugins/paste/util/index.d.ts +2 -1
- package/package.json +6 -2
|
@@ -2,6 +2,7 @@ import type { Node as PMNode, NodeType, Schema } from '@atlaskit/editor-prosemir
|
|
|
2
2
|
import { Slice, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { PasteSource } from '../../analytics';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
6
7
|
export declare function isPastedFromWord(html?: string): boolean;
|
|
7
8
|
export declare function isPastedFromExcel(html?: string): boolean;
|
|
@@ -17,5 +18,5 @@ export declare function isPanelNode(node: PMNode | null | undefined): boolean;
|
|
|
17
18
|
export declare function isSelectionInsidePanel(selection: Selection): PMNode | null;
|
|
18
19
|
export declare const htmlHasInvalidLinkTags: (html?: string) => boolean;
|
|
19
20
|
export declare const removeDuplicateInvalidLinks: (html: string) => string;
|
|
20
|
-
export declare const addReplaceSelectedTableAnalytics: (state: EditorState, tr: Transaction) => Transaction;
|
|
21
|
+
export declare const addReplaceSelectedTableAnalytics: (state: EditorState, tr: Transaction, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Transaction;
|
|
21
22
|
export declare const transformUnsupportedBlockCardToInline: (slice: Slice, state: EditorState, cardOptions?: CardOptions) => Slice;
|
|
@@ -3,7 +3,7 @@ import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import type { InputMethodInsertMedia, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import type { InsertMediaAsMediaSingle } from '@atlaskit/editor-plugin-media/types';
|
|
8
8
|
import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
|
|
9
9
|
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
@@ -13,7 +13,7 @@ export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice):
|
|
|
13
13
|
export declare const doesSelectionWhichStartsOrEndsInListContainEntireList: (selection: Selection, findRootParentListNode: FindRootParentListNode | undefined) => boolean;
|
|
14
14
|
export declare function handlePastePanelOrDecisionContentIntoList(slice: Slice, findRootParentListNode: FindRootParentListNode | undefined): Command;
|
|
15
15
|
export declare function handlePasteLinkOnSelectedText(slice: Slice): Command;
|
|
16
|
-
export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEvent): Command;
|
|
16
|
+
export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEvent, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): Command;
|
|
17
17
|
export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
18
18
|
export declare function handleMacroAutoConvert(text: string, slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, cardsOptions?: CardOptions, extensionAutoConverter?: ExtensionAutoConvertHandler): Command;
|
|
19
19
|
export declare function handleCodeBlock(text: string): Command;
|
|
@@ -51,4 +51,4 @@ export declare function handleParagraphBlockMarks(state: EditorState, slice: Sli
|
|
|
51
51
|
export declare function flattenNestedListInSlice(slice: Slice): Slice;
|
|
52
52
|
export declare function handleRichText(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
53
53
|
export declare function handlePasteIntoCaption(slice: Slice): Command;
|
|
54
|
-
export declare const handleSelectedTable: (slice: Slice) => Command;
|
|
54
|
+
export declare const handleSelectedTable: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (slice: Slice) => Command;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnalyticsEventPayload, PasteType, PasteContent } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { AnalyticsEventPayload, PasteType, PasteContent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { Slice, Fragment, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { ExtractInjectionAPI, Command } from '@atlaskit/editor-common/types';
|
|
@@ -20,20 +20,20 @@ type GetContentProps = {
|
|
|
20
20
|
export declare function getContent({ schema, slice }: GetContentProps): PasteContent;
|
|
21
21
|
export declare function getMediaTraceId(slice: Slice): undefined;
|
|
22
22
|
export declare function createPasteAnalyticsPayload(view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext): AnalyticsEventPayload;
|
|
23
|
-
export declare
|
|
24
|
-
export declare const handlePasteAsPlainTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
23
|
+
export declare const sendPasteAnalyticsEvent: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext) => void;
|
|
24
|
+
export declare const handlePasteAsPlainTextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
25
25
|
export declare const handlePasteIntoTaskAndDecisionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
26
|
-
export declare const handlePasteIntoCaptionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
27
|
-
export declare const handleCodeBlockWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, text: string) => Command;
|
|
28
|
-
export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, insertMediaAsMediaSingle: InsertMediaAsMediaSingle | undefined) => Command;
|
|
26
|
+
export declare const handlePasteIntoCaptionWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
27
|
+
export declare const handleCodeBlockWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, text: string) => Command;
|
|
28
|
+
export declare const handleMediaSingleWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, insertMediaAsMediaSingle: InsertMediaAsMediaSingle | undefined) => Command;
|
|
29
29
|
export declare const handlePastePreservingMarksWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
30
30
|
export declare const handleMarkdownWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
31
31
|
export declare const handleRichTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
32
|
-
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, findRootParentListNode: FindRootParentListNode | undefined) => Command;
|
|
33
|
-
export declare const handlePasteNonNestableBlockNodesIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
34
|
-
export declare const handleExpandWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
35
|
-
export declare const handleSelectedTableWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
36
|
-
export declare const handlePasteLinkOnSelectedTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
32
|
+
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, findRootParentListNode: FindRootParentListNode | undefined) => Command;
|
|
33
|
+
export declare const handlePasteNonNestableBlockNodesIntoListWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
34
|
+
export declare const handleExpandWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
35
|
+
export declare const handleSelectedTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
36
|
+
export declare const handlePasteLinkOnSelectedTextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
37
37
|
export declare const createPasteMeasurePayload: ({ view, duration, content, distortedDuration, }: {
|
|
38
38
|
view: EditorView;
|
|
39
39
|
duration: number;
|
|
@@ -2,6 +2,7 @@ import type { Node as PMNode, NodeType, Schema } from '@atlaskit/editor-prosemir
|
|
|
2
2
|
import { Slice, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { PasteSource } from '../../analytics';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
6
7
|
export declare function isPastedFromWord(html?: string): boolean;
|
|
7
8
|
export declare function isPastedFromExcel(html?: string): boolean;
|
|
@@ -17,5 +18,5 @@ export declare function isPanelNode(node: PMNode | null | undefined): boolean;
|
|
|
17
18
|
export declare function isSelectionInsidePanel(selection: Selection): PMNode | null;
|
|
18
19
|
export declare const htmlHasInvalidLinkTags: (html?: string) => boolean;
|
|
19
20
|
export declare const removeDuplicateInvalidLinks: (html: string) => string;
|
|
20
|
-
export declare const addReplaceSelectedTableAnalytics: (state: EditorState, tr: Transaction) => Transaction;
|
|
21
|
+
export declare const addReplaceSelectedTableAnalytics: (state: EditorState, tr: Transaction, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Transaction;
|
|
21
22
|
export declare const transformUnsupportedBlockCardToInline: (slice: Slice, state: EditorState, cardOptions?: CardOptions) => Slice;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "189.0.
|
|
3
|
+
"version": "189.0.5",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -316,6 +316,10 @@
|
|
|
316
316
|
"type": "boolean",
|
|
317
317
|
"referenceOnly": "true"
|
|
318
318
|
},
|
|
319
|
+
"platform.editor.table-shift-click-selection-backward": {
|
|
320
|
+
"type": "boolean",
|
|
321
|
+
"referenceOnly": "true"
|
|
322
|
+
},
|
|
319
323
|
"platform.editor.table-update-colwidths-after-column-is-deleted": {
|
|
320
324
|
"type": "boolean",
|
|
321
325
|
"referenceOnly": "true"
|
|
@@ -327,4 +331,4 @@
|
|
|
327
331
|
"type": "boolean"
|
|
328
332
|
}
|
|
329
333
|
}
|
|
330
|
-
}
|
|
334
|
+
}
|