@atlaskit/editor-plugin-paste 8.6.0 → 9.0.1
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/pm-plugins/move-analytics/plugin-factory.js +4 -4
- package/dist/cjs/pm-plugins/plugin-factory.js +25 -25
- package/dist/es2019/pm-plugins/move-analytics/plugin-factory.js +4 -5
- package/dist/es2019/pm-plugins/plugin-factory.js +6 -6
- package/dist/esm/pm-plugins/move-analytics/plugin-factory.js +4 -5
- package/dist/esm/pm-plugins/plugin-factory.js +25 -25
- package/dist/types/editor-commands/commands.d.ts +3 -2
- package/dist/types/pm-plugins/main.d.ts +2 -1
- package/dist/types/pm-plugins/move-analytics/commands.d.ts +3 -2
- package/dist/types/pm-plugins/move-analytics/plugin-factory.d.ts +8 -1
- package/dist/types/pm-plugins/move-analytics/plugin.d.ts +2 -1
- package/dist/types/pm-plugins/plugin-factory.d.ts +9 -3
- package/dist/types-ts4.5/editor-commands/commands.d.ts +3 -2
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/move-analytics/commands.d.ts +3 -2
- package/dist/types-ts4.5/pm-plugins/move-analytics/plugin-factory.d.ts +8 -1
- package/dist/types-ts4.5/pm-plugins/move-analytics/plugin.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +9 -3
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ exports.getPluginState = exports.createPluginState = exports.createCommand = voi
|
|
|
7
7
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
8
8
|
var _pluginKey = require("./plugin-key");
|
|
9
9
|
var _reducer = require("./reducer");
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
var dest = (0, _utils.pluginFactory)(_pluginKey.pluginKey, _reducer.reducer);
|
|
11
|
+
var createPluginState = exports.createPluginState = dest.createPluginState;
|
|
12
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
13
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
@@ -11,32 +11,32 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _reducer = require("./reducer");
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
15
15
|
var pluginKey = exports.pluginKey = new _state.PluginKey('pastePlugin');
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
acc[key] = tr.mapping.map(position);
|
|
29
|
-
return acc;
|
|
30
|
-
}, {});
|
|
31
|
-
if (atLeastOnePositionChanged) {
|
|
32
|
-
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
33
|
-
pastedMacroPositions: positionsMappedThroughChanges
|
|
34
|
-
});
|
|
16
|
+
var dest = (0, _utils.pluginFactory)(pluginKey, _reducer.reducer, {
|
|
17
|
+
mapping: function mapping(tr, pluginState) {
|
|
18
|
+
if (tr.docChanged) {
|
|
19
|
+
var atLeastOnePositionChanged = false;
|
|
20
|
+
var positionsMappedThroughChanges = Object.entries(pluginState.pastedMacroPositions).reduce(function (acc, _ref) {
|
|
21
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
22
|
+
key = _ref2[0],
|
|
23
|
+
position = _ref2[1];
|
|
24
|
+
var mappedPosition = tr.mapping.map(position);
|
|
25
|
+
if (position !== mappedPosition) {
|
|
26
|
+
atLeastOnePositionChanged = true;
|
|
35
27
|
}
|
|
28
|
+
acc[key] = tr.mapping.map(position);
|
|
29
|
+
return acc;
|
|
30
|
+
}, {});
|
|
31
|
+
if (atLeastOnePositionChanged) {
|
|
32
|
+
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
33
|
+
pastedMacroPositions: positionsMappedThroughChanges
|
|
34
|
+
});
|
|
36
35
|
}
|
|
37
|
-
return pluginState;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
return pluginState;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
var createPluginState = exports.createPluginState = dest.createPluginState;
|
|
41
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
42
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { pluginKey } from './plugin-key';
|
|
3
3
|
import { reducer } from './reducer';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = pluginFactory(pluginKey, reducer);
|
|
4
|
+
const dest = pluginFactory(pluginKey, reducer);
|
|
5
|
+
export const createPluginState = dest.createPluginState;
|
|
6
|
+
export const createCommand = dest.createCommand;
|
|
7
|
+
export const getPluginState = dest.getPluginState;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
2
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import { reducer } from './reducer';
|
|
4
5
|
export const pluginKey = new PluginKey('pastePlugin');
|
|
5
|
-
|
|
6
|
-
createPluginState,
|
|
7
|
-
createCommand,
|
|
8
|
-
getPluginState
|
|
9
|
-
} = pluginFactory(pluginKey, reducer, {
|
|
6
|
+
const dest = pluginFactory(pluginKey, reducer, {
|
|
10
7
|
mapping: (tr, pluginState) => {
|
|
11
8
|
if (tr.docChanged) {
|
|
12
9
|
let atLeastOnePositionChanged = false;
|
|
@@ -27,4 +24,7 @@ export const {
|
|
|
27
24
|
}
|
|
28
25
|
return pluginState;
|
|
29
26
|
}
|
|
30
|
-
});
|
|
27
|
+
});
|
|
28
|
+
export const createPluginState = dest.createPluginState;
|
|
29
|
+
export const createCommand = dest.createCommand;
|
|
30
|
+
export const getPluginState = dest.getPluginState;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { pluginKey } from './plugin-key';
|
|
3
3
|
import { reducer } from './reducer';
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { createPluginState, createCommand, getPluginState };
|
|
4
|
+
var dest = pluginFactory(pluginKey, reducer);
|
|
5
|
+
export var createPluginState = dest.createPluginState;
|
|
6
|
+
export var createCommand = dest.createCommand;
|
|
7
|
+
export var getPluginState = dest.getPluginState;
|
|
@@ -3,34 +3,34 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
6
7
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
7
8
|
import { reducer } from './reducer';
|
|
8
9
|
export var pluginKey = new PluginKey('pastePlugin');
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
acc[key] = tr.mapping.map(position);
|
|
22
|
-
return acc;
|
|
23
|
-
}, {});
|
|
24
|
-
if (atLeastOnePositionChanged) {
|
|
25
|
-
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
26
|
-
pastedMacroPositions: positionsMappedThroughChanges
|
|
27
|
-
});
|
|
10
|
+
var dest = pluginFactory(pluginKey, reducer, {
|
|
11
|
+
mapping: function mapping(tr, pluginState) {
|
|
12
|
+
if (tr.docChanged) {
|
|
13
|
+
var atLeastOnePositionChanged = false;
|
|
14
|
+
var positionsMappedThroughChanges = Object.entries(pluginState.pastedMacroPositions).reduce(function (acc, _ref) {
|
|
15
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
16
|
+
key = _ref2[0],
|
|
17
|
+
position = _ref2[1];
|
|
18
|
+
var mappedPosition = tr.mapping.map(position);
|
|
19
|
+
if (position !== mappedPosition) {
|
|
20
|
+
atLeastOnePositionChanged = true;
|
|
28
21
|
}
|
|
22
|
+
acc[key] = tr.mapping.map(position);
|
|
23
|
+
return acc;
|
|
24
|
+
}, {});
|
|
25
|
+
if (atLeastOnePositionChanged) {
|
|
26
|
+
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
27
|
+
pastedMacroPositions: positionsMappedThroughChanges
|
|
28
|
+
});
|
|
29
29
|
}
|
|
30
|
-
return pluginState;
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export
|
|
31
|
+
return pluginState;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export var createPluginState = dest.createPluginState;
|
|
35
|
+
export var createCommand = dest.createCommand;
|
|
36
|
+
export var getPluginState = dest.getPluginState;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
2
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { Mark, Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
/**
|
|
@@ -14,8 +15,8 @@ import type { Mark, Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
|
14
15
|
*/
|
|
15
16
|
export declare const startTrackingPastedMacroPositions: (pastedMacroPositions: {
|
|
16
17
|
[key: string]: number;
|
|
17
|
-
}) =>
|
|
18
|
-
export declare const stopTrackingPastedMacroPositions: (pastedMacroPositionKeys: string[]) =>
|
|
18
|
+
}) => Command;
|
|
19
|
+
export declare const stopTrackingPastedMacroPositions: (pastedMacroPositionKeys: string[]) => Command;
|
|
19
20
|
export declare const _contentSplitByHardBreaks: (content: Array<Node>, schema: Schema) => Array<Node>[];
|
|
20
21
|
export declare const extractListFromParagraph: (node: Node, parent: Node | null, schema: Schema) => Fragment;
|
|
21
22
|
export declare const upgradeTextToLists: (slice: Slice, schema: Schema) => Slice;
|
|
@@ -8,6 +8,7 @@ import type { ExtractInjectionAPI, FeatureFlags, PasteWarningOptions } from '@at
|
|
|
8
8
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import type { PastePlugin } from '../index';
|
|
11
|
+
import type { PastePluginState } from '../pastePluginType';
|
|
11
12
|
export declare const isInsideBlockQuote: (state: EditorState) => boolean;
|
|
12
13
|
export declare function isSharePointUrl(url: string | undefined): boolean;
|
|
13
|
-
export declare function createPlugin(schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined, getIntl: () => IntlShape, cardOptions?: CardOptions, sanitizePrivateContent?: boolean, providerFactory?: ProviderFactory, pasteWarningOptions?: PasteWarningOptions): SafePlugin<
|
|
14
|
+
export declare function createPlugin(schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined, getIntl: () => IntlShape, cardOptions?: CardOptions, sanitizePrivateContent?: boolean, providerFactory?: ProviderFactory, pasteWarningOptions?: PasteWarningOptions): SafePlugin<PastePluginState>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
3
|
import type { ActionType, ContentMoved } from './types';
|
|
3
|
-
export declare const updateContentMoved: (nextState: Omit<ContentMoved, "currentActions">, nextAction: ActionType) =>
|
|
4
|
-
export declare const resetContentMoved: () =>
|
|
4
|
+
export declare const updateContentMoved: (nextState: Omit<ContentMoved, "currentActions">, nextAction: ActionType) => Command;
|
|
5
|
+
export declare const resetContentMoved: () => Command;
|
|
5
6
|
export declare const resetContentMovedTransform: () => (tr: Transaction) => Transaction;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { MoveAnalyticsPluginAction } from './actions';
|
|
5
|
+
import type { MoveAnalyticsPluginState } from './types';
|
|
6
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: MoveAnalyticsPluginState | ((state: EditorState) => MoveAnalyticsPluginState)) => SafeStateField<MoveAnalyticsPluginState>;
|
|
7
|
+
export declare const createCommand: <A = MoveAnalyticsPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
8
|
+
export declare const getPluginState: (state: EditorState) => MoveAnalyticsPluginState;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
|
|
4
|
+
import { type MoveAnalyticsPluginState } from './types';
|
|
5
|
+
export declare const createPlugin: (dispatch: Dispatch, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<MoveAnalyticsPluginState>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorState, PluginKey, Transaction, type SafeStateField } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { PastePluginAction } from '../editor-actions/actions';
|
|
5
|
+
import type { PastePluginState } from '../pastePluginType';
|
|
6
|
+
export declare const pluginKey: PluginKey;
|
|
7
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: PastePluginState | ((state: EditorState) => PastePluginState)) => SafeStateField<PastePluginState>;
|
|
8
|
+
export declare const createCommand: <A = PastePluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
9
|
+
export declare const getPluginState: (state: EditorState) => PastePluginState;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
2
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { Mark, Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
/**
|
|
@@ -14,8 +15,8 @@ import type { Mark, Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
|
14
15
|
*/
|
|
15
16
|
export declare const startTrackingPastedMacroPositions: (pastedMacroPositions: {
|
|
16
17
|
[key: string]: number;
|
|
17
|
-
}) =>
|
|
18
|
-
export declare const stopTrackingPastedMacroPositions: (pastedMacroPositionKeys: string[]) =>
|
|
18
|
+
}) => Command;
|
|
19
|
+
export declare const stopTrackingPastedMacroPositions: (pastedMacroPositionKeys: string[]) => Command;
|
|
19
20
|
export declare const _contentSplitByHardBreaks: (content: Array<Node>, schema: Schema) => Array<Node>[];
|
|
20
21
|
export declare const extractListFromParagraph: (node: Node, parent: Node | null, schema: Schema) => Fragment;
|
|
21
22
|
export declare const upgradeTextToLists: (slice: Slice, schema: Schema) => Slice;
|
|
@@ -8,6 +8,7 @@ import type { ExtractInjectionAPI, FeatureFlags, PasteWarningOptions } from '@at
|
|
|
8
8
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import type { PastePlugin } from '../index';
|
|
11
|
+
import type { PastePluginState } from '../pastePluginType';
|
|
11
12
|
export declare const isInsideBlockQuote: (state: EditorState) => boolean;
|
|
12
13
|
export declare function isSharePointUrl(url: string | undefined): boolean;
|
|
13
|
-
export declare function createPlugin(schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined, getIntl: () => IntlShape, cardOptions?: CardOptions, sanitizePrivateContent?: boolean, providerFactory?: ProviderFactory, pasteWarningOptions?: PasteWarningOptions): SafePlugin<
|
|
14
|
+
export declare function createPlugin(schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined, getIntl: () => IntlShape, cardOptions?: CardOptions, sanitizePrivateContent?: boolean, providerFactory?: ProviderFactory, pasteWarningOptions?: PasteWarningOptions): SafePlugin<PastePluginState>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
3
|
import type { ActionType, ContentMoved } from './types';
|
|
3
|
-
export declare const updateContentMoved: (nextState: Omit<ContentMoved, "currentActions">, nextAction: ActionType) =>
|
|
4
|
-
export declare const resetContentMoved: () =>
|
|
4
|
+
export declare const updateContentMoved: (nextState: Omit<ContentMoved, "currentActions">, nextAction: ActionType) => Command;
|
|
5
|
+
export declare const resetContentMoved: () => Command;
|
|
5
6
|
export declare const resetContentMovedTransform: () => (tr: Transaction) => Transaction;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { MoveAnalyticsPluginAction } from './actions';
|
|
5
|
+
import type { MoveAnalyticsPluginState } from './types';
|
|
6
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: MoveAnalyticsPluginState | ((state: EditorState) => MoveAnalyticsPluginState)) => SafeStateField<MoveAnalyticsPluginState>;
|
|
7
|
+
export declare const createCommand: <A = MoveAnalyticsPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
8
|
+
export declare const getPluginState: (state: EditorState) => MoveAnalyticsPluginState;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
|
|
4
|
+
import { type MoveAnalyticsPluginState } from './types';
|
|
5
|
+
export declare const createPlugin: (dispatch: Dispatch, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<MoveAnalyticsPluginState>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorState, PluginKey, Transaction, type SafeStateField } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { PastePluginAction } from '../editor-actions/actions';
|
|
5
|
+
import type { PastePluginState } from '../pastePluginType';
|
|
6
|
+
export declare const pluginKey: PluginKey;
|
|
7
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: PastePluginState | ((state: EditorState) => PastePluginState)) => SafeStateField<PastePluginState>;
|
|
8
|
+
export declare const createCommand: <A = PastePluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
9
|
+
export declare const getPluginState: (state: EditorState) => PastePluginState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"@atlaskit/adf-schema": "^52.2.0",
|
|
31
31
|
"@atlaskit/code": "^17.4.0",
|
|
32
32
|
"@atlaskit/editor-markdown-transformer": "^5.20.0",
|
|
33
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
34
|
-
"@atlaskit/editor-plugin-annotation": "^
|
|
35
|
-
"@atlaskit/editor-plugin-better-type-history": "^
|
|
36
|
-
"@atlaskit/editor-plugin-card": "^
|
|
37
|
-
"@atlaskit/editor-plugin-expand": "^
|
|
38
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
39
|
-
"@atlaskit/editor-plugin-list": "^
|
|
40
|
-
"@atlaskit/editor-plugin-media": "^
|
|
41
|
-
"@atlaskit/editor-plugin-mentions": "^
|
|
33
|
+
"@atlaskit/editor-plugin-analytics": "^8.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-annotation": "^8.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-better-type-history": "^8.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-card": "^13.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-expand": "^9.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-feature-flags": "^7.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-list": "^10.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-media": "^10.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-mentions": "^10.0.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/flag": "^17.8.0",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
"@atlaskit/media-common": "^13.0.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
52
|
-
"@atlaskit/tokens": "^11.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^36.0.0",
|
|
52
|
+
"@atlaskit/tokens": "^11.1.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
55
55
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
56
56
|
"uuid": "^3.1.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^
|
|
59
|
+
"@atlaskit/editor-common": "^112.0.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0"
|
|
62
62
|
},
|