@atlaskit/editor-core 188.5.0 → 188.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/labs/next/presets/universal.js +1 -6
- package/dist/cjs/plugins/expand/index.js +0 -2
- package/dist/cjs/plugins/expand/nodeviews/index.js +37 -13
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +30 -29
- package/dist/cjs/plugins/status/actions.js +14 -11
- package/dist/cjs/plugins/status/index.js +17 -8
- package/dist/cjs/plugins/status/keymap.js +1 -1
- package/dist/cjs/plugins/status/ui/statusPicker.js +2 -2
- package/dist/cjs/ui/Addon/click-area-helper.js +9 -11
- package/dist/cjs/ui/ContentStyles/index.js +13 -13
- package/dist/cjs/utils/selection.js +12 -14
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +1 -6
- package/dist/es2019/plugins/expand/index.js +0 -2
- package/dist/es2019/plugins/expand/nodeviews/index.js +37 -13
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -3
- package/dist/es2019/plugins/status/actions.js +3 -2
- package/dist/es2019/plugins/status/index.js +91 -80
- package/dist/es2019/plugins/status/keymap.js +1 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +1 -1
- package/dist/es2019/ui/Addon/click-area-helper.js +4 -6
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/utils/selection.js +2 -17
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +1 -6
- package/dist/esm/plugins/expand/index.js +0 -2
- package/dist/esm/plugins/expand/nodeviews/index.js +37 -13
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +30 -29
- package/dist/esm/plugins/status/actions.js +14 -11
- package/dist/esm/plugins/status/index.js +17 -8
- package/dist/esm/plugins/status/keymap.js +1 -1
- package/dist/esm/plugins/status/ui/statusPicker.js +1 -1
- package/dist/esm/ui/Addon/click-area-helper.js +4 -6
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/utils/selection.js +2 -13
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +22 -8
- package/dist/types/plugins/expand/index.d.ts +1 -1
- package/dist/types/plugins/expand/nodeviews/index.d.ts +3 -2
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/status/actions.d.ts +4 -2
- package/dist/types/plugins/status/index.d.ts +12 -3
- package/dist/types/plugins/status/nodeviews/status.d.ts +1 -1
- package/dist/types/plugins/status/plugin.d.ts +1 -1
- package/dist/types/utils/selection.d.ts +1 -4
- package/package.json +4 -3
- package/dist/cjs/plugins/selection/actions.js +0 -11
- package/dist/cjs/plugins/selection/commands.js +0 -257
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +0 -272
- package/dist/cjs/plugins/selection/gap-cursor/direction.js +0 -23
- package/dist/cjs/plugins/selection/gap-cursor/selection.js +0 -30
- package/dist/cjs/plugins/selection/gap-cursor/styles.js +0 -17
- package/dist/cjs/plugins/selection/gap-cursor/utils/is-ignored.js +0 -12
- package/dist/cjs/plugins/selection/gap-cursor/utils/is-valid-target-node.js +0 -12
- package/dist/cjs/plugins/selection/gap-cursor/utils/place-gap-cursor.js +0 -103
- package/dist/cjs/plugins/selection/gap-cursor/utils.js +0 -137
- package/dist/cjs/plugins/selection/gap-cursor-selection.js +0 -37
- package/dist/cjs/plugins/selection/index.js +0 -65
- package/dist/cjs/plugins/selection/plugin-factory.js +0 -49
- package/dist/cjs/plugins/selection/pm-plugins/events/create-selection-between.js +0 -92
- package/dist/cjs/plugins/selection/pm-plugins/events/keydown.js +0 -115
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-keymap.js +0 -46
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +0 -160
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-plugin-key.js +0 -8
- package/dist/cjs/plugins/selection/pm-plugins/keymap.js +0 -16
- package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +0 -104
- package/dist/cjs/plugins/selection/reducer.js +0 -26
- package/dist/cjs/plugins/selection/types.js +0 -20
- package/dist/cjs/plugins/selection/utils.js +0 -280
- package/dist/cjs/selection-api/api.js +0 -27
- package/dist/es2019/plugins/selection/actions.js +0 -5
- package/dist/es2019/plugins/selection/commands.js +0 -250
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +0 -270
- package/dist/es2019/plugins/selection/gap-cursor/direction.js +0 -15
- package/dist/es2019/plugins/selection/gap-cursor/selection.js +0 -1
- package/dist/es2019/plugins/selection/gap-cursor/styles.js +0 -145
- package/dist/es2019/plugins/selection/gap-cursor/utils/is-ignored.js +0 -1
- package/dist/es2019/plugins/selection/gap-cursor/utils/is-valid-target-node.js +0 -1
- package/dist/es2019/plugins/selection/gap-cursor/utils/place-gap-cursor.js +0 -94
- package/dist/es2019/plugins/selection/gap-cursor/utils.js +0 -124
- package/dist/es2019/plugins/selection/gap-cursor-selection.js +0 -2
- package/dist/es2019/plugins/selection/index.js +0 -51
- package/dist/es2019/plugins/selection/plugin-factory.js +0 -43
- package/dist/es2019/plugins/selection/pm-plugins/events/create-selection-between.js +0 -89
- package/dist/es2019/plugins/selection/pm-plugins/events/keydown.js +0 -112
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-keymap.js +0 -40
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +0 -158
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-plugin-key.js +0 -2
- package/dist/es2019/plugins/selection/pm-plugins/keymap.js +0 -10
- package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +0 -97
- package/dist/es2019/plugins/selection/reducer.js +0 -18
- package/dist/es2019/plugins/selection/types.js +0 -9
- package/dist/es2019/plugins/selection/utils.js +0 -233
- package/dist/es2019/selection-api/api.js +0 -20
- package/dist/esm/plugins/selection/actions.js +0 -5
- package/dist/esm/plugins/selection/commands.js +0 -251
- package/dist/esm/plugins/selection/gap-cursor/actions.js +0 -266
- package/dist/esm/plugins/selection/gap-cursor/direction.js +0 -15
- package/dist/esm/plugins/selection/gap-cursor/selection.js +0 -1
- package/dist/esm/plugins/selection/gap-cursor/styles.js +0 -10
- package/dist/esm/plugins/selection/gap-cursor/utils/is-ignored.js +0 -1
- package/dist/esm/plugins/selection/gap-cursor/utils/is-valid-target-node.js +0 -1
- package/dist/esm/plugins/selection/gap-cursor/utils/place-gap-cursor.js +0 -97
- package/dist/esm/plugins/selection/gap-cursor/utils.js +0 -128
- package/dist/esm/plugins/selection/gap-cursor-selection.js +0 -2
- package/dist/esm/plugins/selection/index.js +0 -58
- package/dist/esm/plugins/selection/plugin-factory.js +0 -43
- package/dist/esm/plugins/selection/pm-plugins/events/create-selection-between.js +0 -86
- package/dist/esm/plugins/selection/pm-plugins/events/keydown.js +0 -110
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-keymap.js +0 -40
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +0 -154
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-plugin-key.js +0 -2
- package/dist/esm/plugins/selection/pm-plugins/keymap.js +0 -10
- package/dist/esm/plugins/selection/pm-plugins/selection-main.js +0 -98
- package/dist/esm/plugins/selection/reducer.js +0 -19
- package/dist/esm/plugins/selection/types.js +0 -9
- package/dist/esm/plugins/selection/utils.js +0 -241
- package/dist/esm/selection-api/api.js +0 -21
- package/dist/types/plugins/selection/actions.d.ts +0 -17
- package/dist/types/plugins/selection/commands.d.ts +0 -10
- package/dist/types/plugins/selection/gap-cursor/actions.d.ts +0 -25
- package/dist/types/plugins/selection/gap-cursor/direction.d.ts +0 -10
- package/dist/types/plugins/selection/gap-cursor/selection.d.ts +0 -1
- package/dist/types/plugins/selection/gap-cursor/styles.d.ts +0 -2
- package/dist/types/plugins/selection/gap-cursor/utils/is-ignored.d.ts +0 -1
- package/dist/types/plugins/selection/gap-cursor/utils/is-valid-target-node.d.ts +0 -1
- package/dist/types/plugins/selection/gap-cursor/utils/place-gap-cursor.d.ts +0 -2
- package/dist/types/plugins/selection/gap-cursor/utils.d.ts +0 -8
- package/dist/types/plugins/selection/gap-cursor-selection.d.ts +0 -2
- package/dist/types/plugins/selection/index.d.ts +0 -13
- package/dist/types/plugins/selection/plugin-factory.d.ts +0 -2
- package/dist/types/plugins/selection/pm-plugins/events/create-selection-between.d.ts +0 -4
- package/dist/types/plugins/selection/pm-plugins/events/keydown.d.ts +0 -2
- package/dist/types/plugins/selection/pm-plugins/gap-cursor-keymap.d.ts +0 -2
- package/dist/types/plugins/selection/pm-plugins/gap-cursor-main.d.ts +0 -6
- package/dist/types/plugins/selection/pm-plugins/gap-cursor-plugin-key.d.ts +0 -2
- package/dist/types/plugins/selection/pm-plugins/keymap.d.ts +0 -3
- package/dist/types/plugins/selection/pm-plugins/selection-main.d.ts +0 -7
- package/dist/types/plugins/selection/reducer.d.ts +0 -3
- package/dist/types/plugins/selection/types.d.ts +0 -12
- package/dist/types/plugins/selection/utils.d.ts +0 -58
- package/dist/types/selection-api/api.d.ts +0 -11
|
@@ -24,7 +24,6 @@ import { showPlaceholderFloatingToolbar } from '../../../placeholder-text/action
|
|
|
24
24
|
import { insertLayoutColumnsWithAnalytics } from '../../../layout/actions';
|
|
25
25
|
import { insertTaskDecisionCommand } from '../../../tasks-and-decisions/commands';
|
|
26
26
|
import { insertExpand } from '../../../expand/commands';
|
|
27
|
-
import { updateStatusWithAnalytics } from '../../../status/actions';
|
|
28
27
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
29
28
|
import { messages } from './messages';
|
|
30
29
|
import { createItems } from './create-items';
|
|
@@ -215,14 +214,16 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
215
214
|
return true;
|
|
216
215
|
});
|
|
217
216
|
_defineProperty(_assertThisInitialized(_this), "createStatus", function (inputMethod) {
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
var _pluginInjectionApi$s, _pluginInjectionApi$s2;
|
|
218
|
+
var _this$props4 = _this.props,
|
|
219
|
+
pluginInjectionApi = _this$props4.pluginInjectionApi,
|
|
220
|
+
editorView = _this$props4.editorView;
|
|
221
|
+
return (_pluginInjectionApi$s = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$s2 = pluginInjectionApi.status) === null || _pluginInjectionApi$s2 === void 0 || (_pluginInjectionApi$s2 = _pluginInjectionApi$s2.actions) === null || _pluginInjectionApi$s2 === void 0 ? void 0 : _pluginInjectionApi$s2.updateStatus(inputMethod)(editorView.state, editorView.dispatch)) !== null && _pluginInjectionApi$s !== void 0 ? _pluginInjectionApi$s : false;
|
|
221
222
|
});
|
|
222
223
|
_defineProperty(_assertThisInitialized(_this), "openMediaPicker", function (inputMethod) {
|
|
223
|
-
var _this$
|
|
224
|
-
onShowMediaPicker = _this$
|
|
225
|
-
dispatchAnalyticsEvent = _this$
|
|
224
|
+
var _this$props5 = _this.props,
|
|
225
|
+
onShowMediaPicker = _this$props5.onShowMediaPicker,
|
|
226
|
+
dispatchAnalyticsEvent = _this$props5.dispatchAnalyticsEvent;
|
|
226
227
|
if (onShowMediaPicker) {
|
|
227
228
|
onShowMediaPicker();
|
|
228
229
|
if (dispatchAnalyticsEvent) {
|
|
@@ -250,11 +251,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
250
251
|
});
|
|
251
252
|
_defineProperty(_assertThisInitialized(_this), "insertHorizontalRule", function (inputMethod) {
|
|
252
253
|
var _pluginInjectionApi$r, _pluginInjectionApi$r2;
|
|
253
|
-
var _this$
|
|
254
|
-
_this$
|
|
255
|
-
state = _this$
|
|
256
|
-
dispatch = _this$
|
|
257
|
-
pluginInjectionApi = _this$
|
|
254
|
+
var _this$props6 = _this.props,
|
|
255
|
+
_this$props6$editorVi = _this$props6.editorView,
|
|
256
|
+
state = _this$props6$editorVi.state,
|
|
257
|
+
dispatch = _this$props6$editorVi.dispatch,
|
|
258
|
+
pluginInjectionApi = _this$props6.pluginInjectionApi;
|
|
258
259
|
return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
|
|
259
260
|
});
|
|
260
261
|
_defineProperty(_assertThisInitialized(_this), "insertExpand", function () {
|
|
@@ -265,9 +266,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
265
266
|
});
|
|
266
267
|
_defineProperty(_assertThisInitialized(_this), "insertBlockType", function (itemName) {
|
|
267
268
|
return function () {
|
|
268
|
-
var _this$
|
|
269
|
-
editorView = _this$
|
|
270
|
-
onInsertBlockType = _this$
|
|
269
|
+
var _this$props7 = _this.props,
|
|
270
|
+
editorView = _this$props7.editorView,
|
|
271
|
+
onInsertBlockType = _this$props7.onInsertBlockType;
|
|
271
272
|
var state = editorView.state,
|
|
272
273
|
dispatch = editorView.dispatch;
|
|
273
274
|
onInsertBlockType(itemName)(state, dispatch);
|
|
@@ -290,11 +291,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
290
291
|
_defineProperty(_assertThisInitialized(_this), "onItemActivated", function (_ref2) {
|
|
291
292
|
var item = _ref2.item,
|
|
292
293
|
inputMethod = _ref2.inputMethod;
|
|
293
|
-
var _this$
|
|
294
|
-
editorView = _this$
|
|
295
|
-
editorActions = _this$
|
|
296
|
-
handleImageUpload = _this$
|
|
297
|
-
expandEnabled = _this$
|
|
294
|
+
var _this$props8 = _this.props,
|
|
295
|
+
editorView = _this$props8.editorView,
|
|
296
|
+
editorActions = _this$props8.editorActions,
|
|
297
|
+
handleImageUpload = _this$props8.handleImageUpload,
|
|
298
|
+
expandEnabled = _this$props8.expandEnabled;
|
|
298
299
|
|
|
299
300
|
// need to do this before inserting nodes so scrollIntoView works properly
|
|
300
301
|
if (!editorView.hasFocus()) {
|
|
@@ -410,12 +411,12 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
410
411
|
key: "renderPopup",
|
|
411
412
|
value: function renderPopup() {
|
|
412
413
|
var emojiPickerOpen = this.state.emojiPickerOpen;
|
|
413
|
-
var _this$
|
|
414
|
-
popupsMountPoint = _this$
|
|
415
|
-
popupsBoundariesElement = _this$
|
|
416
|
-
popupsScrollableElement = _this$
|
|
417
|
-
emojiProvider = _this$
|
|
418
|
-
replacePlusMenuWithElementBrowser = _this$
|
|
414
|
+
var _this$props9 = this.props,
|
|
415
|
+
popupsMountPoint = _this$props9.popupsMountPoint,
|
|
416
|
+
popupsBoundariesElement = _this$props9.popupsBoundariesElement,
|
|
417
|
+
popupsScrollableElement = _this$props9.popupsScrollableElement,
|
|
418
|
+
emojiProvider = _this$props9.emojiProvider,
|
|
419
|
+
replacePlusMenuWithElementBrowser = _this$props9.replacePlusMenuWithElementBrowser;
|
|
419
420
|
var dropdownEmoji = this.state.dropdownItems.some(function (_ref4) {
|
|
420
421
|
var name = _ref4.value.name;
|
|
421
422
|
return name === 'emoji';
|
|
@@ -452,9 +453,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
452
453
|
buttons = _this$state.buttons,
|
|
453
454
|
dropdownItems = _this$state.dropdownItems,
|
|
454
455
|
emojiPickerOpen = _this$state.emojiPickerOpen;
|
|
455
|
-
var _this$
|
|
456
|
-
isDisabled = _this$
|
|
457
|
-
isReducedSpacing = _this$
|
|
456
|
+
var _this$props10 = this.props,
|
|
457
|
+
isDisabled = _this$props10.isDisabled,
|
|
458
|
+
isReducedSpacing = _this$props10.isReducedSpacing;
|
|
458
459
|
if (buttons.length === 0 && dropdownItems.length === 0) {
|
|
459
460
|
return null;
|
|
460
461
|
}
|
|
@@ -4,7 +4,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { uuid } from '@atlaskit/adf-schema';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
8
9
|
import { pluginKey } from './plugin-key';
|
|
9
10
|
import { canInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
10
11
|
export var DEFAULT_STATUS = {
|
|
@@ -71,16 +72,18 @@ export var updateStatus = function updateStatus(status) {
|
|
|
71
72
|
return false;
|
|
72
73
|
};
|
|
73
74
|
};
|
|
74
|
-
export var updateStatusWithAnalytics = function updateStatusWithAnalytics(
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
export var updateStatusWithAnalytics = function updateStatusWithAnalytics(editorAnalyticsAPI) {
|
|
76
|
+
return function (inputMethod, status) {
|
|
77
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
78
|
+
action: ACTION.INSERTED,
|
|
79
|
+
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
80
|
+
actionSubjectId: ACTION_SUBJECT_ID.STATUS,
|
|
81
|
+
attributes: {
|
|
82
|
+
inputMethod: inputMethod
|
|
83
|
+
},
|
|
84
|
+
eventType: EVENT_TYPE.TRACK
|
|
85
|
+
})(updateStatus(status));
|
|
86
|
+
};
|
|
84
87
|
};
|
|
85
88
|
export var setStatusPickerAt = function setStatusPickerAt(showStatusPickerAt) {
|
|
86
89
|
return function (state, dispatch) {
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
3
|
import { status } from '@atlaskit/adf-schema';
|
|
4
|
-
import WithPluginState from '
|
|
5
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID,
|
|
4
|
+
import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { messages } from '../insert-block/ui/ToolbarInsertBlock/messages';
|
|
7
7
|
import { IconStatus } from '@atlaskit/editor-common/quick-insert';
|
|
8
|
-
import { commitStatusPicker, createStatus, updateStatus } from './actions';
|
|
8
|
+
import { updateStatusWithAnalytics, commitStatusPicker, createStatus, updateStatus } from './actions';
|
|
9
9
|
import { keymapPlugin } from './keymap';
|
|
10
10
|
import createStatusPlugin from './plugin';
|
|
11
11
|
import { pluginKey } from './plugin-key';
|
|
12
12
|
import StatusPicker from './ui/statusPicker';
|
|
13
13
|
var baseStatusPlugin = function baseStatusPlugin(_ref) {
|
|
14
|
-
var
|
|
14
|
+
var _api$analytics;
|
|
15
|
+
var options = _ref.config,
|
|
16
|
+
api = _ref.api;
|
|
15
17
|
return {
|
|
16
18
|
name: 'status',
|
|
17
19
|
nodes: function nodes() {
|
|
@@ -31,6 +33,10 @@ var baseStatusPlugin = function baseStatusPlugin(_ref) {
|
|
|
31
33
|
plugin: keymapPlugin
|
|
32
34
|
}];
|
|
33
35
|
},
|
|
36
|
+
actions: {
|
|
37
|
+
commitStatusPicker: commitStatusPicker,
|
|
38
|
+
updateStatus: updateStatusWithAnalytics(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)
|
|
39
|
+
},
|
|
34
40
|
contentComponent: function contentComponent(_ref2) {
|
|
35
41
|
var editorView = _ref2.editorView,
|
|
36
42
|
popupsMountPoint = _ref2.popupsMountPoint,
|
|
@@ -84,7 +90,7 @@ var baseStatusPlugin = function baseStatusPlugin(_ref) {
|
|
|
84
90
|
}
|
|
85
91
|
};
|
|
86
92
|
};
|
|
87
|
-
var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, options) {
|
|
93
|
+
var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, options, api) {
|
|
88
94
|
if ((options === null || options === void 0 ? void 0 : options.menuDisabled) === true) {
|
|
89
95
|
return plugin;
|
|
90
96
|
}
|
|
@@ -101,7 +107,9 @@ var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, optio
|
|
|
101
107
|
return /*#__PURE__*/React.createElement(IconStatus, null);
|
|
102
108
|
},
|
|
103
109
|
action: function action(insert, state) {
|
|
104
|
-
|
|
110
|
+
var _api$analytics2;
|
|
111
|
+
var tr = createStatus()(insert, state);
|
|
112
|
+
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
|
|
105
113
|
action: ACTION.INSERTED,
|
|
106
114
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
107
115
|
actionSubjectId: ACTION_SUBJECT_ID.STATUS,
|
|
@@ -109,7 +117,8 @@ var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, optio
|
|
|
109
117
|
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
110
118
|
},
|
|
111
119
|
eventType: EVENT_TYPE.TRACK
|
|
112
|
-
});
|
|
120
|
+
})(tr);
|
|
121
|
+
return tr;
|
|
113
122
|
}
|
|
114
123
|
}];
|
|
115
124
|
}
|
|
@@ -122,6 +131,6 @@ var statusPlugin = function statusPlugin(_ref5) {
|
|
|
122
131
|
return decorateWithPluginOptions(baseStatusPlugin({
|
|
123
132
|
config: options,
|
|
124
133
|
api: api
|
|
125
|
-
}), options);
|
|
134
|
+
}), options, api);
|
|
126
135
|
};
|
|
127
136
|
export default statusPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
2
|
-
import { bindKeymapWithCommand, enter, tab } from '
|
|
2
|
+
import { bindKeymapWithCommand, enter, tab } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { mayGetStatusAtSelection } from './utils';
|
|
4
4
|
export function keymapPlugin() {
|
|
5
5
|
var list = {};
|
|
@@ -19,7 +19,7 @@ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
19
19
|
import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
|
|
20
20
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
21
21
|
import { N0 } from '@atlaskit/theme/colors';
|
|
22
|
-
import withOuterListeners from '
|
|
22
|
+
import { withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
23
23
|
import { DEFAULT_STATUS } from '../actions';
|
|
24
24
|
import { analyticsState, createStatusAnalyticsAndFire } from '../analytics';
|
|
25
25
|
var PopupWithListeners = withOuterListeners(Popup);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { closestElement } from '
|
|
2
|
-
import { setSelectionTopLevelBlocks
|
|
3
|
-
import { addParagraphAtEnd } from '
|
|
1
|
+
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { setSelectionTopLevelBlocks } from '@atlaskit/editor-common/selection';
|
|
3
|
+
import { addParagraphAtEnd } from '@atlaskit/editor-common/commands';
|
|
4
4
|
|
|
5
5
|
// we ignore all of the clicks made inside <div class="ak-editor-content-area" /> (but not clicks on the node itself)
|
|
6
6
|
var insideContentArea = function insideContentArea(ref) {
|
|
@@ -94,9 +94,7 @@ var outsideProsemirrorEditorClickHandler = function outsideProsemirrorEditorClic
|
|
|
94
94
|
if (isBottomAreaClicked) {
|
|
95
95
|
addParagraphAtEnd(tr);
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
setSelectionTopLevelBlocks(tr, event, dom, view.posAtCoords.bind(view), isEditorFocused);
|
|
99
|
-
}
|
|
97
|
+
setSelectionTopLevelBlocks(tr, event, dom, view.posAtCoords.bind(view), isEditorFocused);
|
|
100
98
|
if (!tr.docChanged && !tr.selectionSet) {
|
|
101
99
|
return;
|
|
102
100
|
}
|
|
@@ -7,7 +7,6 @@ import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, inden
|
|
|
7
7
|
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
9
9
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
10
|
-
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
11
10
|
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
12
11
|
import { blocktypeStyles } from '@atlaskit/editor-plugin-block-type/styles';
|
|
13
12
|
import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
@@ -28,6 +27,7 @@ import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlask
|
|
|
28
27
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
29
28
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
30
29
|
import { N500, N30A, N200 } from '@atlaskit/theme/colors';
|
|
30
|
+
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
31
31
|
export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n"])), linkSharedStyle);
|
|
32
32
|
var ruleStyles = function ruleStyles(props) {
|
|
33
33
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), ruleSharedStyles(props), "var(--ds-space-050, 4px)", akEditorLineHeight, akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(akEditorSelectedBorderColor, ")"));
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
2
|
-
import { NodeSelection, TextSelection
|
|
2
|
+
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
4
|
-
export { setNodeSelection, setTextSelection } from '@atlaskit/editor-common/utils';
|
|
5
|
-
export function setAllSelection(view) {
|
|
6
|
-
var state = view.state,
|
|
7
|
-
dispatch = view.dispatch;
|
|
8
|
-
var tr = state.tr.setSelection(new AllSelection(view.state.doc));
|
|
9
|
-
dispatch(tr);
|
|
10
|
-
}
|
|
11
|
-
export function setCellSelection(view, anchor, head) {
|
|
12
|
-
var state = view.state,
|
|
13
|
-
dispatch = view.dispatch;
|
|
14
|
-
dispatch(state.tr.setSelection(CellSelection.create(state.doc, anchor, head)));
|
|
15
|
-
}
|
|
4
|
+
export { setNodeSelection, setTextSelection, setAllSelection, setCellSelection } from '@atlaskit/editor-common/utils';
|
|
16
5
|
|
|
17
6
|
// checks if the given position is within the ProseMirror document
|
|
18
7
|
export var isValidPosition = function isValidPosition(pos, state) {
|
|
@@ -60,13 +60,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
60
60
|
insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
|
|
61
61
|
};
|
|
62
62
|
}, CodeBlockOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
63
|
-
pluginConfiguration: import("
|
|
63
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
|
|
64
|
+
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
64
65
|
commands: {
|
|
65
66
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
66
|
-
selectNearNode: import("@atlaskit/editor-common/types").EditorCommandWithMetadata;
|
|
67
67
|
};
|
|
68
68
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
69
|
-
}, import("
|
|
69
|
+
}, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"floatingToolbar", {
|
|
70
70
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
71
71
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
72
72
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
@@ -257,7 +257,14 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
257
257
|
sharedState: {
|
|
258
258
|
hasFocus: boolean;
|
|
259
259
|
};
|
|
260
|
-
}, undefined
|
|
260
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
261
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
|
|
262
|
+
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
263
|
+
commands: {
|
|
264
|
+
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
265
|
+
};
|
|
266
|
+
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
267
|
+
}, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>];
|
|
261
268
|
sharedState: import("@atlaskit/editor-plugin-media/types").MediaPluginState | null;
|
|
262
269
|
actions: {
|
|
263
270
|
insertMediaAsMediaSingle: import("@atlaskit/editor-plugin-media/types").InsertMediaAsMediaSingle;
|
|
@@ -495,13 +502,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
495
502
|
insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
|
|
496
503
|
};
|
|
497
504
|
}, CodeBlockOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
498
|
-
pluginConfiguration: import("
|
|
505
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
|
|
506
|
+
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
499
507
|
commands: {
|
|
500
508
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
501
|
-
selectNearNode: import("@atlaskit/editor-common/types").EditorCommandWithMetadata;
|
|
502
509
|
};
|
|
503
510
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
504
|
-
}, import("
|
|
511
|
+
}, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"floatingToolbar", {
|
|
505
512
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
506
513
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
507
514
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
@@ -692,7 +699,14 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
692
699
|
sharedState: {
|
|
693
700
|
hasFocus: boolean;
|
|
694
701
|
};
|
|
695
|
-
}, undefined
|
|
702
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
703
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
|
|
704
|
+
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
705
|
+
commands: {
|
|
706
|
+
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
707
|
+
};
|
|
708
|
+
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
709
|
+
}, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>];
|
|
696
710
|
sharedState: import("@atlaskit/editor-plugin-media/types").MediaPluginState | null;
|
|
697
711
|
actions: {
|
|
698
712
|
insertMediaAsMediaSingle: import("@atlaskit/editor-plugin-media/types").InsertMediaAsMediaSingle;
|
|
@@ -2,7 +2,7 @@ import type { NextEditorPlugin, EditorProps } from '../../types';
|
|
|
2
2
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
5
|
-
import type { SelectionPlugin } from '
|
|
5
|
+
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
6
6
|
interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
7
7
|
allowInsertion?: boolean;
|
|
8
8
|
appearance?: EditorProps['appearance'];
|
|
@@ -2,8 +2,9 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { EditorView, NodeView, Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { getPosHandlerNode, getPosHandler } from '../../../nodeviews/';
|
|
5
|
-
import type { FeatureFlags, ExtractInjectionAPI
|
|
5
|
+
import type { FeatureFlags, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type expandPlugin from '../index';
|
|
7
|
+
import type { SetSelectionRelativeToNode } from '@atlaskit/editor-common/selection';
|
|
7
8
|
export declare class ExpandNodeView implements NodeView {
|
|
8
9
|
private selectNearNode;
|
|
9
10
|
node: PmNode;
|
|
@@ -20,7 +21,7 @@ export declare class ExpandNodeView implements NodeView {
|
|
|
20
21
|
isMobile: boolean;
|
|
21
22
|
featureFlags: FeatureFlags;
|
|
22
23
|
api: ExtractInjectionAPI<typeof expandPlugin> | undefined;
|
|
23
|
-
constructor(node: PmNode, view: EditorView, getPos: getPosHandlerNode, getIntl: () => IntlShape, isMobile: boolean, featureFlags: FeatureFlags, selectNearNode:
|
|
24
|
+
constructor(node: PmNode, view: EditorView, getPos: getPosHandlerNode, getIntl: () => IntlShape, isMobile: boolean, featureFlags: FeatureFlags, selectNearNode: SetSelectionRelativeToNode | undefined, api: ExtractInjectionAPI<typeof expandPlugin> | undefined);
|
|
24
25
|
private initHandlers;
|
|
25
26
|
private focusTitle;
|
|
26
27
|
private handleIconKeyDown;
|
|
@@ -35,7 +35,6 @@ export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
|
35
35
|
export { default as scrollIntoViewPlugin } from './scroll-into-view';
|
|
36
36
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
37
37
|
export { default as findReplacePlugin } from './find-replace';
|
|
38
|
-
export { default as selectionPlugin } from './selection';
|
|
39
38
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
40
39
|
export { default as undoRedoPlugin } from './undo-redo';
|
|
41
40
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
@@ -14,6 +14,7 @@ import type panelPlugin from '../panel';
|
|
|
14
14
|
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
15
15
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
16
16
|
import type { MentionPlugin } from '../mentions';
|
|
17
|
+
import type { StatusPlugin } from '../status';
|
|
17
18
|
export type InsertBlockPluginDependencies = [
|
|
18
19
|
FeatureFlagsPlugin,
|
|
19
20
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -29,5 +30,6 @@ export type InsertBlockPluginDependencies = [
|
|
|
29
30
|
OptionalPlugin<typeof codeBlockPlugin>,
|
|
30
31
|
OptionalPlugin<typeof panelPlugin>,
|
|
31
32
|
OptionalPlugin<MediaPlugin>,
|
|
32
|
-
OptionalPlugin<MentionPlugin
|
|
33
|
+
OptionalPlugin<MentionPlugin>,
|
|
34
|
+
OptionalPlugin<StatusPlugin>
|
|
33
35
|
];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { Command } from '
|
|
3
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
5
|
import type { TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
5
6
|
import type { StatusType, ClosingPayload } from './types';
|
|
6
7
|
export declare const DEFAULT_STATUS: StatusType;
|
|
@@ -8,7 +9,8 @@ export declare const createStatus: (showStatusPickerAtOffset?: number) => (inser
|
|
|
8
9
|
selectInlineNode: boolean;
|
|
9
10
|
}) => Transaction, state: EditorState) => Transaction;
|
|
10
11
|
export declare const updateStatus: (status?: StatusType) => Command;
|
|
11
|
-
export
|
|
12
|
+
export type UpdateStatus = (inputMethod: TOOLBAR_MENU_TYPE, status?: StatusType) => Command;
|
|
13
|
+
export declare const updateStatusWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: TOOLBAR_MENU_TYPE, status?: StatusType) => Command;
|
|
12
14
|
export declare const setStatusPickerAt: (showStatusPickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
13
15
|
export declare const removeStatus: (showStatusPickerAt: number) => Command;
|
|
14
16
|
export declare const commitStatusPicker: (closingPayload?: ClosingPayload) => (editorView: EditorView) => void;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { UpdateStatus } from './actions';
|
|
3
|
+
import { commitStatusPicker } from './actions';
|
|
2
4
|
import type { StatusPluginOptions } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
+
export type StatusPlugin = NextEditorPlugin<'status', {
|
|
7
|
+
dependencies: [OptionalPlugin<AnalyticsPlugin>];
|
|
8
|
+
pluginConfiguration: StatusPluginOptions | undefined;
|
|
9
|
+
actions: {
|
|
10
|
+
commitStatusPicker: typeof commitStatusPicker;
|
|
11
|
+
updateStatus: UpdateStatus;
|
|
12
|
+
};
|
|
5
13
|
}>;
|
|
14
|
+
declare const statusPlugin: StatusPlugin;
|
|
6
15
|
export default statusPlugin;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { IntlShape } from 'react-intl-next';
|
|
5
5
|
import type { Color, StatusStyle } from '@atlaskit/status/element';
|
|
6
|
-
import type { EventDispatcher } from '
|
|
6
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
7
7
|
import type { InlineNodeViewComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
8
8
|
import type { StatusPluginOptions } from '../types';
|
|
9
9
|
export interface ContainerProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { PMPluginFactoryParams } from '
|
|
2
|
+
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { StatusPluginOptions } from './types';
|
|
4
4
|
export { pluginKey, pluginKeyName } from './plugin-key';
|
|
5
5
|
export type { StatusState, StatusType, ClosingPayload } from './types';
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
1
|
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
2
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
export { setNodeSelection, setTextSelection, } from '@atlaskit/editor-common/utils';
|
|
5
|
-
export declare function setAllSelection(view: EditorView): void;
|
|
6
|
-
export declare function setCellSelection(view: EditorView, anchor: number, head?: number): void;
|
|
3
|
+
export { setNodeSelection, setTextSelection, setAllSelection, setCellSelection, } from '@atlaskit/editor-common/utils';
|
|
7
4
|
export declare const isValidPosition: (pos: number, state: EditorState) => boolean;
|
|
8
5
|
export declare const duplicateSelection: (selectionToDuplicate: Selection, doc: Node) => Selection | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "188.
|
|
3
|
+
"version": "188.6.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/code": "^14.6.0",
|
|
56
56
|
"@atlaskit/date": "^0.10.0",
|
|
57
57
|
"@atlaskit/datetime-picker": "^12.10.0",
|
|
58
|
-
"@atlaskit/editor-common": "^76.
|
|
58
|
+
"@atlaskit/editor-common": "^76.8.0",
|
|
59
59
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
60
60
|
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
61
61
|
"@atlaskit/editor-palette": "1.5.1",
|
|
@@ -87,7 +87,8 @@
|
|
|
87
87
|
"@atlaskit/editor-plugin-placeholder": "^0.1.0",
|
|
88
88
|
"@atlaskit/editor-plugin-quick-insert": "^0.2.0",
|
|
89
89
|
"@atlaskit/editor-plugin-rule": "^0.1.0",
|
|
90
|
-
"@atlaskit/editor-plugin-
|
|
90
|
+
"@atlaskit/editor-plugin-selection": "^0.1.0",
|
|
91
|
+
"@atlaskit/editor-plugin-table": "^5.0.0",
|
|
91
92
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
92
93
|
"@atlaskit/editor-plugin-type-ahead": "^0.5.0",
|
|
93
94
|
"@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SelectionActionTypes = void 0;
|
|
7
|
-
var SelectionActionTypes = exports.SelectionActionTypes = /*#__PURE__*/function (SelectionActionTypes) {
|
|
8
|
-
SelectionActionTypes["SET_DECORATIONS"] = "SET_DECORATIONS";
|
|
9
|
-
SelectionActionTypes["SET_RELATIVE_SELECTION"] = "SET_RELATIVE_SELECTION";
|
|
10
|
-
return SelectionActionTypes;
|
|
11
|
-
}({});
|