@atlaskit/editor-plugin-paste 27.0.4 → 27.0.7
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 +18 -0
- package/dist/cjs/editor-commands/commands.js +4 -3
- package/dist/cjs/pm-plugins/analytics.js +75 -73
- package/dist/cjs/pm-plugins/create-clipboard-text-serializer.js +2 -2
- package/dist/cjs/pm-plugins/main.js +65 -56
- package/dist/cjs/pm-plugins/media.js +9 -8
- package/dist/cjs/pm-plugins/move-analytics/plugin-factory.js +2 -2
- package/dist/cjs/pm-plugins/move-analytics/plugin.js +5 -5
- package/dist/cjs/pm-plugins/plugin-factory.js +2 -2
- package/dist/cjs/pm-plugins/util/edge-cases/handleVSCodeBlock.js +2 -2
- package/dist/cjs/pm-plugins/util/get-markdown-slice.js +2 -2
- package/dist/cjs/pm-plugins/util/handlers.js +52 -48
- package/dist/cjs/pm-plugins/util/index.js +8 -6
- package/dist/cjs/pm-plugins/util/sync-block.js +7 -7
- package/dist/cjs/ui/Flag.js +2 -2
- package/dist/es2019/editor-commands/commands.js +2 -1
- package/dist/es2019/pm-plugins/analytics.js +4 -2
- package/dist/es2019/pm-plugins/create-clipboard-text-serializer.js +1 -1
- package/dist/es2019/pm-plugins/main.js +19 -10
- package/dist/es2019/pm-plugins/media.js +4 -3
- package/dist/es2019/pm-plugins/move-analytics/plugin-factory.js +1 -1
- package/dist/es2019/pm-plugins/move-analytics/plugin.js +1 -1
- package/dist/es2019/pm-plugins/plugin-factory.js +1 -1
- package/dist/es2019/pm-plugins/util/edge-cases/handleVSCodeBlock.js +1 -1
- package/dist/es2019/pm-plugins/util/get-markdown-slice.js +1 -1
- package/dist/es2019/pm-plugins/util/handlers.js +11 -7
- package/dist/es2019/pm-plugins/util/index.js +4 -2
- package/dist/es2019/pm-plugins/util/sync-block.js +2 -2
- package/dist/es2019/ui/Flag.js +1 -1
- package/dist/esm/editor-commands/commands.js +2 -1
- package/dist/esm/pm-plugins/analytics.js +4 -2
- package/dist/esm/pm-plugins/create-clipboard-text-serializer.js +1 -1
- package/dist/esm/pm-plugins/main.js +19 -10
- package/dist/esm/pm-plugins/media.js +4 -3
- package/dist/esm/pm-plugins/move-analytics/plugin-factory.js +1 -1
- package/dist/esm/pm-plugins/move-analytics/plugin.js +1 -1
- package/dist/esm/pm-plugins/plugin-factory.js +1 -1
- package/dist/esm/pm-plugins/util/edge-cases/handleVSCodeBlock.js +1 -1
- package/dist/esm/pm-plugins/util/get-markdown-slice.js +1 -1
- package/dist/esm/pm-plugins/util/handlers.js +11 -7
- package/dist/esm/pm-plugins/util/index.js +4 -2
- package/dist/esm/pm-plugins/util/sync-block.js +2 -2
- package/dist/esm/ui/Flag.js +1 -1
- package/dist/types/editor-commands/commands.d.ts +1 -1
- package/dist/types/pastePluginType.d.ts +14 -13
- package/dist/types/pm-plugins/analytics.d.ts +6 -3
- package/dist/types/pm-plugins/main.d.ts +6 -4
- package/dist/types/pm-plugins/media.d.ts +1 -1
- package/dist/types/pm-plugins/move-analytics/commands.d.ts +1 -1
- package/dist/types/pm-plugins/move-analytics/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/move-analytics/plugin.d.ts +1 -1
- package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/util/handlers.d.ts +8 -6
- package/dist/types/pm-plugins/util/index.d.ts +3 -2
- package/dist/types/pm-plugins/util/sync-block.d.ts +3 -2
- package/dist/types/ui/Flag.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD
|
|
1
|
+
import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import { TABLE_ACTION } from '@atlaskit/editor-common/analytics/types/table-events';
|
|
2
3
|
import { sortByOrderWithTypeName } from '@atlaskit/editor-common/legacy-rank-plugins';
|
|
3
|
-
import { isSupportedInParent
|
|
4
|
+
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
4
5
|
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
6
|
+
import { mapChildren } from '@atlaskit/editor-common/utils/slice';
|
|
5
7
|
import { Fragment, Mark, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
6
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
9
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { mapSlice } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { mapSlice } from '@atlaskit/editor-common/utils/slice';
|
|
4
4
|
import { PastePluginActionTypes } from '../../editor-actions/actions';
|
|
5
5
|
import { FLAG_TYPE } from '../../pastePluginType';
|
|
6
6
|
import { pluginKey } from '../../pm-plugins/plugin-factory';
|
package/dist/es2019/ui/Flag.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
4
4
|
import AutoDismissFlag from '@atlaskit/flag/auto-dismiss-flag';
|
|
5
5
|
import AkFlag from '@atlaskit/flag/flag';
|
|
6
6
|
import { FlagGroup } from '@atlaskit/flag/flag-group';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import { isListNode
|
|
3
|
+
import { isListNode } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { mapChildren, mapSlice } from '@atlaskit/editor-common/utils/slice';
|
|
4
5
|
import { autoJoin } from '@atlaskit/editor-prosemirror/commands';
|
|
5
6
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
6
7
|
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -2,9 +2,11 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
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
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
|
+
import { PasteContents, PasteTypes } from '@atlaskit/editor-common/analytics/types/paste-events';
|
|
6
7
|
import { getHadMarkAttributes } from '@atlaskit/editor-common/mark';
|
|
7
|
-
import { getLinkDomain
|
|
8
|
+
import { getLinkDomain } from '@atlaskit/editor-common/utils';
|
|
9
|
+
import { mapSlice } from '@atlaskit/editor-common/utils/slice';
|
|
8
10
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
9
11
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
10
12
|
import { getPasteSource } from './util';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { timestampToString } from '@atlaskit/editor-common/utils';
|
|
1
|
+
import { timestampToString } from '@atlaskit/editor-common/utils/date';
|
|
2
2
|
/**
|
|
3
3
|
* Returns a plain text serialization of a given slice. This is used for populating the plain text
|
|
4
4
|
* section of the clipboard on copy.
|
|
@@ -5,23 +5,32 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
5
5
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
6
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
7
7
|
import { v4 as uuid } from 'uuid';
|
|
8
|
-
import { ACTION, INPUT_METHOD
|
|
8
|
+
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
9
|
+
import { PasteTypes } from '@atlaskit/editor-common/analytics/types/paste-events';
|
|
9
10
|
import { addLinkMetadata } from '@atlaskit/editor-common/card';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
11
|
+
import { getExtensionAutoConvertersFromProvider } from '@atlaskit/editor-common/extensions/module-helpers';
|
|
12
|
+
import { insideTable } from '@atlaskit/editor-common/inside';
|
|
12
13
|
import { isNestedTablesSupported } from '@atlaskit/editor-common/nesting';
|
|
13
|
-
import { isPastedFile as isPastedFileFromEvent
|
|
14
|
+
import { isPastedFile as isPastedFileFromEvent } from '@atlaskit/editor-common/paste/clipboard';
|
|
15
|
+
import { md } from '@atlaskit/editor-common/paste/md';
|
|
14
16
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
15
17
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
16
|
-
import { SyncBlockRendererDataAttributeName } from '@atlaskit/editor-common/sync-block';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
18
|
+
import { SyncBlockRendererDataAttributeName } from '@atlaskit/editor-common/styles/sync-block';
|
|
19
|
+
import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToRemoveMacroId } from '@atlaskit/editor-common/transforms';
|
|
20
|
+
import { transformSliceToJoinAdjacentCodeBlocks } from '@atlaskit/editor-common/transforms/code-block';
|
|
21
|
+
import { transformSliceToDecisionList } from '@atlaskit/editor-common/transforms/decision-list';
|
|
22
|
+
import { transformSliceToRemoveLegacyContentMacro } from '@atlaskit/editor-common/transforms/extension';
|
|
23
|
+
import { removeBreakoutFromRendererSyncBlockHTML } from '@atlaskit/editor-common/transforms/sync-block';
|
|
24
|
+
import { extractSliceFromStep } from '@atlaskit/editor-common/utils';
|
|
25
|
+
import { containsAnyAnnotations } from '@atlaskit/editor-common/utils/annotation';
|
|
26
|
+
import { linkifyContent } from '@atlaskit/editor-common/utils/hyperlink';
|
|
27
|
+
import { mapChildren } from '@atlaskit/editor-common/utils/slice';
|
|
19
28
|
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
20
29
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
21
30
|
import { contains, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
22
|
-
import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils';
|
|
23
|
-
import { insm } from '@atlaskit/insm';
|
|
24
|
-
import { extractClientIdsFromHtml } from '@atlaskit/media-common';
|
|
31
|
+
import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils/handle-paste';
|
|
32
|
+
import { insm } from '@atlaskit/insm/api';
|
|
33
|
+
import { extractClientIdsFromHtml } from '@atlaskit/media-common/clientIdCache';
|
|
25
34
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
26
35
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
27
36
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
-
import { DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
5
|
-
import {
|
|
4
|
+
import { DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single/constants';
|
|
5
|
+
import { removeNestedEmptyEls, unwrap, walkUpTreeUntil } from '@atlaskit/editor-common/utils';
|
|
6
|
+
import { mapSlice } from '@atlaskit/editor-common/utils/slice';
|
|
6
7
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
-
import { getRandomHex } from '@atlaskit/media-common';
|
|
8
|
+
import { getRandomHex } from '@atlaskit/media-common/helpers';
|
|
8
9
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
10
|
/**
|
|
10
11
|
* Ensure correct layout in nested mode
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
1
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
|
|
2
2
|
import { pluginKey } from './plugin-key';
|
|
3
3
|
import { reducer } from './reducer';
|
|
4
4
|
var dest = pluginFactory(pluginKey, reducer);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { resetContentMoved, resetContentMovedTransform, updateContentMoved } from './commands';
|
|
4
4
|
import { createPluginState, getPluginState } from './plugin-factory';
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
5
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
7
7
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { reducer } from './reducer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SUPPORTED_LANGUAGES } from '@atlaskit/code/constants';
|
|
2
|
-
import { mapSlice } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { mapSlice } from '@atlaskit/editor-common/utils/slice';
|
|
3
3
|
function safelyGetVSCodeLanguage(editorData) {
|
|
4
4
|
try {
|
|
5
5
|
var vscodeData = editorData ? JSON.parse(editorData) : undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
1
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
2
2
|
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { escapeBackslashAndLinksExceptCodeBlock } from './index';
|
|
4
4
|
|
|
@@ -9,20 +9,24 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
9
9
|
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; }
|
|
10
10
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
11
11
|
import { v4 as uuid } from 'uuid';
|
|
12
|
-
import { transformContainerNodes } from '@atlaskit/adf-utils/
|
|
13
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
12
|
+
import { transformContainerNodes } from '@atlaskit/adf-utils/depth-limited-nesting-container-nodes-transform';
|
|
13
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
14
14
|
import { addLinkMetadata } from '@atlaskit/editor-common/card';
|
|
15
|
-
import { insideTable } from '@atlaskit/editor-common/
|
|
16
|
-
import { getBlockMarkAttrs, getFirstParagraphBlockMarkAttrs, reconcileBlockMarkForContainerAtPos, reconcileBlockMarkForParagraphAtPos, reconcileBlockMarkInRange } from '@atlaskit/editor-common/lists';
|
|
15
|
+
import { insideTable } from '@atlaskit/editor-common/inside';
|
|
16
|
+
import { getBlockMarkAttrs, getFirstParagraphBlockMarkAttrs, reconcileBlockMarkForContainerAtPos, reconcileBlockMarkForParagraphAtPos, reconcileBlockMarkInRange } from '@atlaskit/editor-common/lists/block-mark';
|
|
17
17
|
import { anyMarkActive } from '@atlaskit/editor-common/mark';
|
|
18
18
|
import { getParentOfTypeCount, getPositionAfterTopParentNodeOfType } from '@atlaskit/editor-common/nesting';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
19
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
20
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
21
|
+
import { canLinkBeCreatedInRange, insideTableCell, isInListItem, isListItemNode, isListNode, isNodeEmpty } from '@atlaskit/editor-common/utils';
|
|
22
|
+
import { linkifyContent } from '@atlaskit/editor-common/utils/hyperlink';
|
|
21
23
|
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
24
|
+
import { isLinkMark, isParagraph, isText } from '@atlaskit/editor-common/utils/nodes';
|
|
25
|
+
import { mapSlice } from '@atlaskit/editor-common/utils/slice';
|
|
22
26
|
import { Fragment, Node as PMNode, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
23
27
|
import { AllSelection, NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
24
28
|
import { canInsert, contains, findParentNodeOfType, findParentNodeOfTypeClosestToPos, hasParentNode, hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
25
|
-
import { replaceSelectedTable } from '@atlaskit/editor-tables/utils';
|
|
29
|
+
import { replaceSelectedTable } from '@atlaskit/editor-tables/utils/replace-table';
|
|
26
30
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
27
31
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
28
32
|
import { closeHistory } from '@atlaskit/prosemirror-history/closeHistory';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD
|
|
2
|
+
import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { TABLE_ACTION } from '@atlaskit/editor-common/analytics/types/table-events';
|
|
3
4
|
import { sortByOrderWithTypeName } from '@atlaskit/editor-common/legacy-rank-plugins';
|
|
4
|
-
import { isSupportedInParent
|
|
5
|
+
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
5
6
|
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
7
|
+
import { mapChildren } from '@atlaskit/editor-common/utils/slice';
|
|
6
8
|
import { Fragment, Mark, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
7
9
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
10
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -3,8 +3,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
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 { uuid } from '@atlaskit/adf-schema/uuid';
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import { mapSlice } from '@atlaskit/editor-common/utils';
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
7
|
+
import { mapSlice } from '@atlaskit/editor-common/utils/slice';
|
|
8
8
|
import { PastePluginActionTypes } from '../../editor-actions/actions';
|
|
9
9
|
import { FLAG_TYPE } from '../../pastePluginType';
|
|
10
10
|
import { pluginKey } from '../../pm-plugins/plugin-factory';
|
package/dist/esm/ui/Flag.js
CHANGED
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
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; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
6
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
7
7
|
import AutoDismissFlag from '@atlaskit/flag/auto-dismiss-flag';
|
|
8
8
|
import AkFlag from '@atlaskit/flag/flag';
|
|
9
9
|
import { FlagGroup } from '@atlaskit/flag/flag-group';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
2
2
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { Mark, Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
/**
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { MessageDescriptor } from 'react-intl';
|
|
2
|
-
import type { PasteSource } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
2
|
+
import type { PasteSource } from '@atlaskit/editor-common/analytics/types/paste-events';
|
|
3
|
+
import type { CardOptions } from '@atlaskit/editor-common/card/cardOptions';
|
|
4
|
+
import type { PasteWarningOptions } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
6
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
7
|
+
import type { AnnotationPlugin } from '@atlaskit/editor-plugin-annotation/annotationPluginType';
|
|
8
|
+
import type { BetterTypeHistoryPlugin } from '@atlaskit/editor-plugin-better-type-history/betterTypeHistoryPluginType';
|
|
9
|
+
import type { CardPlugin } from '@atlaskit/editor-plugin-card/cardPluginType';
|
|
10
|
+
import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand/types';
|
|
11
|
+
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension/extensionPluginType';
|
|
12
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags/featureFlagsPluginType';
|
|
13
|
+
import type { ListPlugin } from '@atlaskit/editor-plugin-list/list-plugin-type';
|
|
14
|
+
import type { MediaPlugin } from '@atlaskit/editor-plugin-media/media-plugin-type';
|
|
15
|
+
import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions/mentions-plugin-type';
|
|
15
16
|
import type { Fragment, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
16
17
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
17
18
|
export declare enum FLAG_TYPE {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics/types/events';
|
|
3
|
+
import type { PasteContent, PasteType } from '@atlaskit/editor-common/analytics/types/paste-events';
|
|
4
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
5
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
6
|
+
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list/types';
|
|
4
7
|
import type { InsertMediaAsMediaSingle } from '@atlaskit/editor-plugin-media/types';
|
|
5
8
|
import type { Fragment, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
6
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
2
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
|
|
3
|
+
import type { CardOptions } from '@atlaskit/editor-common/card/cardOptions';
|
|
4
4
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
|
-
import type
|
|
5
|
+
import type ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
import type {
|
|
7
|
+
import type { PasteWarningOptions } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types/feature-flags';
|
|
9
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
8
10
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
11
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
10
12
|
import type { PastePlugin } from '../index';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
2
|
import type { Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { PastePlugin } from '../pastePluginType';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
2
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { ActionType, ContentMoved } from './types';
|
|
4
4
|
export declare const updateContentMoved: (nextState: Omit<ContentMoved, 'currentActions'>, nextAction: ActionType) => Command;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
3
3
|
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { MoveAnalyticsPluginAction } from './actions';
|
|
5
5
|
import type { MoveAnalyticsPluginState } from './types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
3
3
|
import { EditorState, PluginKey, Transaction, type SafeStateField } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { PastePluginAction } from '../editor-actions/actions';
|
|
5
5
|
import type { PastePluginState } from '../pastePluginType';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics/types/insert-events';
|
|
3
|
+
import type { CardOptions } from '@atlaskit/editor-common/card/cardOptions';
|
|
4
|
+
import type { QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card/types';
|
|
5
|
+
import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions/extension-manifest';
|
|
6
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
7
|
+
import type { RunMacroAutoConvert } from '@atlaskit/editor-plugin-extension/extensionPluginType';
|
|
8
|
+
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list/types';
|
|
7
9
|
import type { InsertMediaAsMediaSingle } from '@atlaskit/editor-plugin-media/types';
|
|
8
10
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
11
|
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI
|
|
2
|
-
import type {
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import type { PasteSource } from '@atlaskit/editor-common/analytics/types/paste-events';
|
|
3
|
+
import type { CardOptions } from '@atlaskit/editor-common/card/cardOptions';
|
|
3
4
|
import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
5
|
import { Mark, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { PasteSource } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type {
|
|
1
|
+
import type { PasteSource } from '@atlaskit/editor-common/analytics/types/paste-events';
|
|
2
|
+
import type { PasteWarningOptions } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
4
|
import type { Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
4
5
|
import type { PastePlugin } from '../../pastePluginType';
|
|
5
6
|
/**
|
package/dist/types/ui/Flag.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { PastePlugin } from '../pastePluginType';
|
|
4
4
|
type Props = {
|
|
5
5
|
api?: ExtractInjectionAPI<PastePlugin>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "27.0.
|
|
3
|
+
"version": "27.0.7",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/editor-plugin-extension": "^29.0.0",
|
|
32
32
|
"@atlaskit/editor-plugin-feature-flags": "^25.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-list": "^28.0.0",
|
|
34
|
-
"@atlaskit/editor-plugin-media": "^28.
|
|
34
|
+
"@atlaskit/editor-plugin-media": "^28.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-mentions": "^28.1.0",
|
|
36
36
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
37
37
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
46
46
|
"@atlaskit/prosemirror-history": "^1.3.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^234.0.0",
|
|
48
48
|
"@atlaskit/tokens": "^20.4.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
51
|
"uuid": "^11.1.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^130.
|
|
54
|
+
"@atlaskit/editor-common": "^130.5.0",
|
|
55
55
|
"react": "^18.2.0 || ^19.2.0",
|
|
56
56
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
57
57
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|