@atlaskit/editor-core 187.38.5 → 187.39.4
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 +16 -0
- package/dist/cjs/create-editor/feature-flags-from-props.js +5 -6
- package/dist/cjs/labs/next/presets/universal.js +1 -6
- package/dist/cjs/plugins/floating-toolbar/index.js +1 -1
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +3 -1
- package/dist/cjs/plugins/selection/index.js +17 -5
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +23 -10
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/feature-flags-from-props.js +5 -6
- package/dist/es2019/labs/next/presets/universal.js +1 -6
- package/dist/es2019/plugins/floating-toolbar/index.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +3 -1
- package/dist/es2019/plugins/selection/index.js +11 -0
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +27 -11
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/feature-flags-from-props.js +5 -6
- package/dist/esm/labs/next/presets/universal.js +1 -6
- package/dist/esm/plugins/floating-toolbar/index.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +3 -1
- package/dist/esm/plugins/selection/index.js +17 -5
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +23 -10
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +6 -0
- package/dist/types/plugins/selection/index.d.ts +6 -2
- package/dist/types/plugins/selection/pm-plugins/gap-cursor-main.d.ts +4 -1
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +6 -0
- package/dist/types-ts4.5/plugins/selection/index.d.ts +6 -2
- package/dist/types-ts4.5/plugins/selection/pm-plugins/gap-cursor-main.d.ts +4 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.39.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dca155209d9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dca155209d9) - ED-15094 Feature flag clean up for copy button
|
|
8
|
+
|
|
9
|
+
## 187.39.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`985ecca5c88`](https://bitbucket.org/atlassian/atlassian-frontend/commits/985ecca5c88) - Add new editor plugin action for the selection plugin, which allows other plugins to control the visibility of the gap cursor
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 187.38.5
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -32,7 +32,7 @@ function getSpellCheck(featureFlags) {
|
|
|
32
32
|
* which is used by both current and archv3 editors.
|
|
33
33
|
*/
|
|
34
34
|
function createFeatureFlagsFromProps(props) {
|
|
35
|
-
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29
|
|
35
|
+
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29;
|
|
36
36
|
var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
|
|
37
37
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
38
38
|
newInsertionBehaviour: props.allowNewInsertionBehaviour,
|
|
@@ -58,14 +58,13 @@ function createFeatureFlagsFromProps(props) {
|
|
|
58
58
|
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
59
59
|
showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
|
|
60
60
|
indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
|
|
61
|
-
|
|
62
|
-
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
61
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
63
62
|
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
|
|
64
63
|
// Including fallback to props.featureFlags so that mobile feature flags
|
|
65
64
|
// are included (they are not kebab cased)
|
|
66
|
-
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$
|
|
67
|
-
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$
|
|
65
|
+
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
|
|
66
|
+
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
|
|
68
67
|
lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
|
|
69
|
-
preventPopupOverflow: Boolean(typeof ((_props$
|
|
68
|
+
preventPopupOverflow: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29['prevent-popup-overflow']) : false)
|
|
70
69
|
});
|
|
71
70
|
}
|
|
@@ -395,11 +395,6 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
395
395
|
return builder;
|
|
396
396
|
}).add([_plugins.codeBidiWarningPlugin, {
|
|
397
397
|
appearance: appearance
|
|
398
|
-
}]).
|
|
399
|
-
if (featureFlags.floatingToolbarCopyButton) {
|
|
400
|
-
return builder.add(plugin);
|
|
401
|
-
}
|
|
402
|
-
return builder;
|
|
403
|
-
});
|
|
398
|
+
}]).add(_plugins.copyButtonPlugin);
|
|
404
399
|
return finalPreset;
|
|
405
400
|
}
|
|
@@ -244,7 +244,7 @@ function ContentComponent(_ref5) {
|
|
|
244
244
|
var _ref7 = floatingToolbarData || {},
|
|
245
245
|
confirmDialogForItem = _ref7.confirmDialogForItem;
|
|
246
246
|
var confirmButtonItem = confirmDialogForItem ? toolbarItems[confirmDialogForItem] : undefined;
|
|
247
|
-
var scrollable =
|
|
247
|
+
var scrollable = config.scrollable;
|
|
248
248
|
var confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
|
|
249
249
|
return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
|
|
250
250
|
component: _analytics.ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN,
|
|
@@ -120,8 +120,10 @@ var ScrollButtons = function ScrollButtons(_ref) {
|
|
|
120
120
|
(0, _react.useEffect)(function () {
|
|
121
121
|
var scrollContainerRefCurrent = scrollContainerRef.current;
|
|
122
122
|
if (scrollContainerRefCurrent) {
|
|
123
|
+
var _scrollContainerRefCu;
|
|
123
124
|
// reset scroll position when switching from one node with toolbar to another
|
|
124
|
-
|
|
125
|
+
// scroll to made optional as it may not be rendered in testing env
|
|
126
|
+
(_scrollContainerRefCu = scrollContainerRefCurrent.scrollTo) === null || _scrollContainerRefCu === void 0 ? void 0 : _scrollContainerRefCu.call(scrollContainerRefCurrent, {
|
|
125
127
|
left: 0
|
|
126
128
|
});
|
|
127
129
|
}
|
|
@@ -8,17 +8,29 @@ exports.selectionPlugin = exports.default = void 0;
|
|
|
8
8
|
var _selectionMain = require("./pm-plugins/selection-main");
|
|
9
9
|
var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
|
|
10
10
|
var _gapCursorMain = _interopRequireDefault(require("./pm-plugins/gap-cursor-main"));
|
|
11
|
+
var _gapCursorPluginKey = require("./pm-plugins/gap-cursor-plugin-key");
|
|
11
12
|
var _gapCursorKeymap = _interopRequireDefault(require("./pm-plugins/gap-cursor-keymap"));
|
|
12
|
-
var
|
|
13
|
-
|
|
13
|
+
var displayGapCursor = function displayGapCursor(toggle) {
|
|
14
|
+
return function (_ref) {
|
|
15
|
+
var tr = _ref.tr;
|
|
16
|
+
return tr.setMeta(_gapCursorPluginKey.gapCursorPluginKey, {
|
|
17
|
+
displayGapCursor: toggle
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
var selectionPlugin = function selectionPlugin(_ref2) {
|
|
22
|
+
var options = _ref2.config;
|
|
14
23
|
return {
|
|
15
24
|
name: 'selection',
|
|
25
|
+
commands: {
|
|
26
|
+
displayGapCursor: displayGapCursor
|
|
27
|
+
},
|
|
16
28
|
pmPlugins: function pmPlugins() {
|
|
17
29
|
return [{
|
|
18
30
|
name: 'selection',
|
|
19
|
-
plugin: function plugin(
|
|
20
|
-
var dispatch =
|
|
21
|
-
dispatchAnalyticsEvent =
|
|
31
|
+
plugin: function plugin(_ref3) {
|
|
32
|
+
var dispatch = _ref3.dispatch,
|
|
33
|
+
dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent;
|
|
22
34
|
return (0, _selectionMain.createPlugin)(dispatch, dispatchAnalyticsEvent, options);
|
|
23
35
|
}
|
|
24
36
|
}, {
|
|
@@ -20,10 +20,20 @@ var plugin = new _safePlugin.SafePlugin({
|
|
|
20
20
|
key: _gapCursorPluginKey.gapCursorPluginKey,
|
|
21
21
|
state: {
|
|
22
22
|
init: function init() {
|
|
23
|
-
return
|
|
23
|
+
return {
|
|
24
|
+
selectionIsGapCursor: false,
|
|
25
|
+
displayGapCursor: true
|
|
26
|
+
};
|
|
24
27
|
},
|
|
25
|
-
apply: function apply(
|
|
26
|
-
|
|
28
|
+
apply: function apply(tr, pluginState, _oldState, newState) {
|
|
29
|
+
var _meta$displayGapCurso;
|
|
30
|
+
var meta = tr.getMeta(_gapCursorPluginKey.gapCursorPluginKey);
|
|
31
|
+
var selectionIsGapCursor = newState.selection instanceof _selection.GapCursorSelection;
|
|
32
|
+
return {
|
|
33
|
+
selectionIsGapCursor: selectionIsGapCursor,
|
|
34
|
+
// only attempt to hide gap cursor if selection is gap cursor
|
|
35
|
+
displayGapCursor: selectionIsGapCursor ? (_meta$displayGapCurso = meta === null || meta === void 0 ? void 0 : meta.displayGapCursor) !== null && _meta$displayGapCurso !== void 0 ? _meta$displayGapCurso : pluginState.displayGapCursor : true
|
|
36
|
+
};
|
|
27
37
|
}
|
|
28
38
|
},
|
|
29
39
|
view: function view(_view) {
|
|
@@ -40,9 +50,10 @@ var plugin = new _safePlugin.SafePlugin({
|
|
|
40
50
|
}
|
|
41
51
|
return {
|
|
42
52
|
update: function update(view) {
|
|
43
|
-
var
|
|
53
|
+
var _gapCursorPluginKey$g = _gapCursorPluginKey.gapCursorPluginKey.getState(view.state),
|
|
54
|
+
selectionIsGapCursor = _gapCursorPluginKey$g.selectionIsGapCursor;
|
|
44
55
|
/**
|
|
45
|
-
* Starting with prosemirror-view 1.19.4, cursor wrapper that
|
|
56
|
+
* Starting with prosemirror-view 1.19.4, cursor wrapper that previously was hiding cursor doesn't exist:
|
|
46
57
|
* https://github.com/ProseMirror/prosemirror-view/commit/4a56bc7b7e61e96ef879d1dae1014ede0fc09e43
|
|
47
58
|
*
|
|
48
59
|
* Because it was causing issues with RTL: https://github.com/ProseMirror/prosemirror/issues/948
|
|
@@ -52,15 +63,17 @@ var plugin = new _safePlugin.SafePlugin({
|
|
|
52
63
|
*
|
|
53
64
|
* Browser support is pretty good: https://caniuse.com/#feat=css-caret-color
|
|
54
65
|
*/
|
|
55
|
-
view.dom.classList.toggle(_styles.hideCaretModifier,
|
|
66
|
+
view.dom.classList.toggle(_styles.hideCaretModifier, selectionIsGapCursor);
|
|
56
67
|
}
|
|
57
68
|
};
|
|
58
69
|
},
|
|
59
70
|
props: {
|
|
60
|
-
decorations: function decorations(
|
|
61
|
-
var doc =
|
|
62
|
-
selection =
|
|
63
|
-
|
|
71
|
+
decorations: function decorations(editorState) {
|
|
72
|
+
var doc = editorState.doc,
|
|
73
|
+
selection = editorState.selection;
|
|
74
|
+
var _gapCursorPluginKey$g2 = _gapCursorPluginKey.gapCursorPluginKey.getState(editorState),
|
|
75
|
+
displayGapCursor = _gapCursorPluginKey$g2.displayGapCursor;
|
|
76
|
+
if (selection instanceof _selection.GapCursorSelection && displayGapCursor) {
|
|
64
77
|
var $from = selection.$from,
|
|
65
78
|
side = selection.side;
|
|
66
79
|
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.
|
|
9
|
+
var version = "187.39.4";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
@@ -21,7 +21,7 @@ function getSpellCheck(featureFlags) {
|
|
|
21
21
|
* which is used by both current and archv3 editors.
|
|
22
22
|
*/
|
|
23
23
|
export function createFeatureFlagsFromProps(props) {
|
|
24
|
-
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29
|
|
24
|
+
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29;
|
|
25
25
|
const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
26
26
|
return {
|
|
27
27
|
...normalizedFeatureFlags,
|
|
@@ -48,14 +48,13 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
48
48
|
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
49
49
|
showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
|
|
50
50
|
indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
|
|
51
|
-
|
|
52
|
-
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
51
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
53
52
|
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
|
|
54
53
|
// Including fallback to props.featureFlags so that mobile feature flags
|
|
55
54
|
// are included (they are not kebab cased)
|
|
56
|
-
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$
|
|
57
|
-
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$
|
|
55
|
+
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
|
|
56
|
+
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
|
|
58
57
|
lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
|
|
59
|
-
preventPopupOverflow: Boolean(typeof ((_props$
|
|
58
|
+
preventPopupOverflow: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29['prevent-popup-overflow']) : false)
|
|
60
59
|
};
|
|
61
60
|
}
|
|
@@ -392,11 +392,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
392
392
|
return builder;
|
|
393
393
|
}).add([codeBidiWarningPlugin, {
|
|
394
394
|
appearance
|
|
395
|
-
}]).
|
|
396
|
-
if (featureFlags.floatingToolbarCopyButton) {
|
|
397
|
-
return builder.add(plugin);
|
|
398
|
-
}
|
|
399
|
-
return builder;
|
|
400
|
-
});
|
|
395
|
+
}]).add(copyButtonPlugin);
|
|
401
396
|
return finalPreset;
|
|
402
397
|
}
|
|
@@ -232,7 +232,7 @@ function ContentComponent({
|
|
|
232
232
|
confirmDialogForItem
|
|
233
233
|
} = floatingToolbarData || {};
|
|
234
234
|
const confirmButtonItem = confirmDialogForItem ? toolbarItems[confirmDialogForItem] : undefined;
|
|
235
|
-
const scrollable =
|
|
235
|
+
const scrollable = config.scrollable;
|
|
236
236
|
const confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
|
|
237
237
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
238
238
|
component: ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN,
|
|
@@ -106,8 +106,10 @@ export const ScrollButtons = ({
|
|
|
106
106
|
useEffect(() => {
|
|
107
107
|
const scrollContainerRefCurrent = scrollContainerRef.current;
|
|
108
108
|
if (scrollContainerRefCurrent) {
|
|
109
|
+
var _scrollContainerRefCu;
|
|
109
110
|
// reset scroll position when switching from one node with toolbar to another
|
|
110
|
-
|
|
111
|
+
// scroll to made optional as it may not be rendered in testing env
|
|
112
|
+
(_scrollContainerRefCu = scrollContainerRefCurrent.scrollTo) === null || _scrollContainerRefCu === void 0 ? void 0 : _scrollContainerRefCu.call(scrollContainerRefCurrent, {
|
|
111
113
|
left: 0
|
|
112
114
|
});
|
|
113
115
|
}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { createPlugin } from './pm-plugins/selection-main';
|
|
2
2
|
import selectionKeymapPlugin from './pm-plugins/keymap';
|
|
3
3
|
import gapCursorPlugin from './pm-plugins/gap-cursor-main';
|
|
4
|
+
import { gapCursorPluginKey } from './pm-plugins/gap-cursor-plugin-key';
|
|
4
5
|
import gapCursorKeymapPlugin from './pm-plugins/gap-cursor-keymap';
|
|
6
|
+
const displayGapCursor = toggle => ({
|
|
7
|
+
tr
|
|
8
|
+
}) => {
|
|
9
|
+
return tr.setMeta(gapCursorPluginKey, {
|
|
10
|
+
displayGapCursor: toggle
|
|
11
|
+
});
|
|
12
|
+
};
|
|
5
13
|
export const selectionPlugin = ({
|
|
6
14
|
config: options
|
|
7
15
|
}) => ({
|
|
8
16
|
name: 'selection',
|
|
17
|
+
commands: {
|
|
18
|
+
displayGapCursor
|
|
19
|
+
},
|
|
9
20
|
pmPlugins() {
|
|
10
21
|
return [{
|
|
11
22
|
name: 'selection',
|
|
@@ -13,9 +13,19 @@ import { gapCursorPluginKey } from './gap-cursor-plugin-key';
|
|
|
13
13
|
const plugin = new SafePlugin({
|
|
14
14
|
key: gapCursorPluginKey,
|
|
15
15
|
state: {
|
|
16
|
-
init: () =>
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
init: () => ({
|
|
17
|
+
selectionIsGapCursor: false,
|
|
18
|
+
displayGapCursor: true
|
|
19
|
+
}),
|
|
20
|
+
apply: (tr, pluginState, _oldState, newState) => {
|
|
21
|
+
var _meta$displayGapCurso;
|
|
22
|
+
const meta = tr.getMeta(gapCursorPluginKey);
|
|
23
|
+
const selectionIsGapCursor = newState.selection instanceof GapCursorSelection;
|
|
24
|
+
return {
|
|
25
|
+
selectionIsGapCursor,
|
|
26
|
+
// only attempt to hide gap cursor if selection is gap cursor
|
|
27
|
+
displayGapCursor: selectionIsGapCursor ? (_meta$displayGapCurso = meta === null || meta === void 0 ? void 0 : meta.displayGapCursor) !== null && _meta$displayGapCurso !== void 0 ? _meta$displayGapCurso : pluginState.displayGapCursor : true
|
|
28
|
+
};
|
|
19
29
|
}
|
|
20
30
|
},
|
|
21
31
|
view: view => {
|
|
@@ -32,9 +42,11 @@ const plugin = new SafePlugin({
|
|
|
32
42
|
}
|
|
33
43
|
return {
|
|
34
44
|
update(view) {
|
|
35
|
-
const
|
|
45
|
+
const {
|
|
46
|
+
selectionIsGapCursor
|
|
47
|
+
} = gapCursorPluginKey.getState(view.state);
|
|
36
48
|
/**
|
|
37
|
-
* Starting with prosemirror-view 1.19.4, cursor wrapper that
|
|
49
|
+
* Starting with prosemirror-view 1.19.4, cursor wrapper that previously was hiding cursor doesn't exist:
|
|
38
50
|
* https://github.com/ProseMirror/prosemirror-view/commit/4a56bc7b7e61e96ef879d1dae1014ede0fc09e43
|
|
39
51
|
*
|
|
40
52
|
* Because it was causing issues with RTL: https://github.com/ProseMirror/prosemirror/issues/948
|
|
@@ -44,16 +56,20 @@ const plugin = new SafePlugin({
|
|
|
44
56
|
*
|
|
45
57
|
* Browser support is pretty good: https://caniuse.com/#feat=css-caret-color
|
|
46
58
|
*/
|
|
47
|
-
view.dom.classList.toggle(hideCaretModifier,
|
|
59
|
+
view.dom.classList.toggle(hideCaretModifier, selectionIsGapCursor);
|
|
48
60
|
}
|
|
49
61
|
};
|
|
50
62
|
},
|
|
51
63
|
props: {
|
|
52
|
-
decorations:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
decorations: editorState => {
|
|
65
|
+
const {
|
|
66
|
+
doc,
|
|
67
|
+
selection
|
|
68
|
+
} = editorState;
|
|
69
|
+
const {
|
|
70
|
+
displayGapCursor
|
|
71
|
+
} = gapCursorPluginKey.getState(editorState);
|
|
72
|
+
if (selection instanceof GapCursorSelection && displayGapCursor) {
|
|
57
73
|
const {
|
|
58
74
|
$from,
|
|
59
75
|
side
|
|
@@ -25,7 +25,7 @@ function getSpellCheck(featureFlags) {
|
|
|
25
25
|
* which is used by both current and archv3 editors.
|
|
26
26
|
*/
|
|
27
27
|
export function createFeatureFlagsFromProps(props) {
|
|
28
|
-
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29
|
|
28
|
+
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29;
|
|
29
29
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
30
30
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
31
31
|
newInsertionBehaviour: props.allowNewInsertionBehaviour,
|
|
@@ -51,14 +51,13 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
51
51
|
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
52
52
|
showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
|
|
53
53
|
indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
|
|
54
|
-
|
|
55
|
-
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
54
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
56
55
|
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
|
|
57
56
|
// Including fallback to props.featureFlags so that mobile feature flags
|
|
58
57
|
// are included (they are not kebab cased)
|
|
59
|
-
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$
|
|
60
|
-
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$
|
|
58
|
+
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
|
|
59
|
+
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
|
|
61
60
|
lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
|
|
62
|
-
preventPopupOverflow: Boolean(typeof ((_props$
|
|
61
|
+
preventPopupOverflow: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29['prevent-popup-overflow']) : false)
|
|
63
62
|
});
|
|
64
63
|
}
|
|
@@ -388,11 +388,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
388
388
|
return builder;
|
|
389
389
|
}).add([codeBidiWarningPlugin, {
|
|
390
390
|
appearance: appearance
|
|
391
|
-
}]).
|
|
392
|
-
if (featureFlags.floatingToolbarCopyButton) {
|
|
393
|
-
return builder.add(plugin);
|
|
394
|
-
}
|
|
395
|
-
return builder;
|
|
396
|
-
});
|
|
391
|
+
}]).add(copyButtonPlugin);
|
|
397
392
|
return finalPreset;
|
|
398
393
|
}
|
|
@@ -234,7 +234,7 @@ function ContentComponent(_ref5) {
|
|
|
234
234
|
var _ref7 = floatingToolbarData || {},
|
|
235
235
|
confirmDialogForItem = _ref7.confirmDialogForItem;
|
|
236
236
|
var confirmButtonItem = confirmDialogForItem ? toolbarItems[confirmDialogForItem] : undefined;
|
|
237
|
-
var scrollable =
|
|
237
|
+
var scrollable = config.scrollable;
|
|
238
238
|
var confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
|
|
239
239
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
240
240
|
component: ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN,
|
|
@@ -110,8 +110,10 @@ export var ScrollButtons = function ScrollButtons(_ref) {
|
|
|
110
110
|
useEffect(function () {
|
|
111
111
|
var scrollContainerRefCurrent = scrollContainerRef.current;
|
|
112
112
|
if (scrollContainerRefCurrent) {
|
|
113
|
+
var _scrollContainerRefCu;
|
|
113
114
|
// reset scroll position when switching from one node with toolbar to another
|
|
114
|
-
|
|
115
|
+
// scroll to made optional as it may not be rendered in testing env
|
|
116
|
+
(_scrollContainerRefCu = scrollContainerRefCurrent.scrollTo) === null || _scrollContainerRefCu === void 0 ? void 0 : _scrollContainerRefCu.call(scrollContainerRefCurrent, {
|
|
115
117
|
left: 0
|
|
116
118
|
});
|
|
117
119
|
}
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { createPlugin } from './pm-plugins/selection-main';
|
|
2
2
|
import selectionKeymapPlugin from './pm-plugins/keymap';
|
|
3
3
|
import gapCursorPlugin from './pm-plugins/gap-cursor-main';
|
|
4
|
+
import { gapCursorPluginKey } from './pm-plugins/gap-cursor-plugin-key';
|
|
4
5
|
import gapCursorKeymapPlugin from './pm-plugins/gap-cursor-keymap';
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
var displayGapCursor = function displayGapCursor(toggle) {
|
|
7
|
+
return function (_ref) {
|
|
8
|
+
var tr = _ref.tr;
|
|
9
|
+
return tr.setMeta(gapCursorPluginKey, {
|
|
10
|
+
displayGapCursor: toggle
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export var selectionPlugin = function selectionPlugin(_ref2) {
|
|
15
|
+
var options = _ref2.config;
|
|
7
16
|
return {
|
|
8
17
|
name: 'selection',
|
|
18
|
+
commands: {
|
|
19
|
+
displayGapCursor: displayGapCursor
|
|
20
|
+
},
|
|
9
21
|
pmPlugins: function pmPlugins() {
|
|
10
22
|
return [{
|
|
11
23
|
name: 'selection',
|
|
12
|
-
plugin: function plugin(
|
|
13
|
-
var dispatch =
|
|
14
|
-
dispatchAnalyticsEvent =
|
|
24
|
+
plugin: function plugin(_ref3) {
|
|
25
|
+
var dispatch = _ref3.dispatch,
|
|
26
|
+
dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent;
|
|
15
27
|
return createPlugin(dispatch, dispatchAnalyticsEvent, options);
|
|
16
28
|
}
|
|
17
29
|
}, {
|
|
@@ -14,10 +14,20 @@ var plugin = new SafePlugin({
|
|
|
14
14
|
key: gapCursorPluginKey,
|
|
15
15
|
state: {
|
|
16
16
|
init: function init() {
|
|
17
|
-
return
|
|
17
|
+
return {
|
|
18
|
+
selectionIsGapCursor: false,
|
|
19
|
+
displayGapCursor: true
|
|
20
|
+
};
|
|
18
21
|
},
|
|
19
|
-
apply: function apply(
|
|
20
|
-
|
|
22
|
+
apply: function apply(tr, pluginState, _oldState, newState) {
|
|
23
|
+
var _meta$displayGapCurso;
|
|
24
|
+
var meta = tr.getMeta(gapCursorPluginKey);
|
|
25
|
+
var selectionIsGapCursor = newState.selection instanceof GapCursorSelection;
|
|
26
|
+
return {
|
|
27
|
+
selectionIsGapCursor: selectionIsGapCursor,
|
|
28
|
+
// only attempt to hide gap cursor if selection is gap cursor
|
|
29
|
+
displayGapCursor: selectionIsGapCursor ? (_meta$displayGapCurso = meta === null || meta === void 0 ? void 0 : meta.displayGapCursor) !== null && _meta$displayGapCurso !== void 0 ? _meta$displayGapCurso : pluginState.displayGapCursor : true
|
|
30
|
+
};
|
|
21
31
|
}
|
|
22
32
|
},
|
|
23
33
|
view: function view(_view) {
|
|
@@ -34,9 +44,10 @@ var plugin = new SafePlugin({
|
|
|
34
44
|
}
|
|
35
45
|
return {
|
|
36
46
|
update: function update(view) {
|
|
37
|
-
var
|
|
47
|
+
var _gapCursorPluginKey$g = gapCursorPluginKey.getState(view.state),
|
|
48
|
+
selectionIsGapCursor = _gapCursorPluginKey$g.selectionIsGapCursor;
|
|
38
49
|
/**
|
|
39
|
-
* Starting with prosemirror-view 1.19.4, cursor wrapper that
|
|
50
|
+
* Starting with prosemirror-view 1.19.4, cursor wrapper that previously was hiding cursor doesn't exist:
|
|
40
51
|
* https://github.com/ProseMirror/prosemirror-view/commit/4a56bc7b7e61e96ef879d1dae1014ede0fc09e43
|
|
41
52
|
*
|
|
42
53
|
* Because it was causing issues with RTL: https://github.com/ProseMirror/prosemirror/issues/948
|
|
@@ -46,15 +57,17 @@ var plugin = new SafePlugin({
|
|
|
46
57
|
*
|
|
47
58
|
* Browser support is pretty good: https://caniuse.com/#feat=css-caret-color
|
|
48
59
|
*/
|
|
49
|
-
view.dom.classList.toggle(hideCaretModifier,
|
|
60
|
+
view.dom.classList.toggle(hideCaretModifier, selectionIsGapCursor);
|
|
50
61
|
}
|
|
51
62
|
};
|
|
52
63
|
},
|
|
53
64
|
props: {
|
|
54
|
-
decorations: function decorations(
|
|
55
|
-
var doc =
|
|
56
|
-
selection =
|
|
57
|
-
|
|
65
|
+
decorations: function decorations(editorState) {
|
|
66
|
+
var doc = editorState.doc,
|
|
67
|
+
selection = editorState.selection;
|
|
68
|
+
var _gapCursorPluginKey$g2 = gapCursorPluginKey.getState(editorState),
|
|
69
|
+
displayGapCursor = _gapCursorPluginKey$g2.displayGapCursor;
|
|
70
|
+
if (selection instanceof GapCursorSelection && displayGapCursor) {
|
|
58
71
|
var $from = selection.$from,
|
|
59
72
|
side = selection.side;
|
|
60
73
|
|
|
@@ -61,6 +61,9 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
61
61
|
};
|
|
62
62
|
}, CodeBlockOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
63
63
|
pluginConfiguration: SelectionPluginOptions | undefined;
|
|
64
|
+
commands: {
|
|
65
|
+
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
66
|
+
};
|
|
64
67
|
}, SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"floatingToolbar", {
|
|
65
68
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
66
69
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
@@ -213,6 +216,9 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
213
216
|
};
|
|
214
217
|
}, CodeBlockOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
215
218
|
pluginConfiguration: SelectionPluginOptions | undefined;
|
|
219
|
+
commands: {
|
|
220
|
+
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
221
|
+
};
|
|
216
222
|
}, SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"floatingToolbar", {
|
|
217
223
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
218
224
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { EditorCommand, NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { SelectionPluginOptions } from './types';
|
|
3
|
-
|
|
3
|
+
type SelectionPlugin = NextEditorPlugin<'selection', {
|
|
4
4
|
pluginConfiguration: SelectionPluginOptions | undefined;
|
|
5
|
+
commands: {
|
|
6
|
+
displayGapCursor: (toggle: boolean) => EditorCommand;
|
|
7
|
+
};
|
|
5
8
|
}>;
|
|
9
|
+
export declare const selectionPlugin: SelectionPlugin;
|
|
6
10
|
export default selectionPlugin;
|
|
@@ -84,6 +84,9 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
84
84
|
}, CodeBlockOptions>,
|
|
85
85
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
86
86
|
pluginConfiguration: SelectionPluginOptions | undefined;
|
|
87
|
+
commands: {
|
|
88
|
+
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
89
|
+
};
|
|
87
90
|
}, SelectionPluginOptions | undefined>,
|
|
88
91
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"floatingToolbar", {
|
|
89
92
|
dependencies: [
|
|
@@ -290,6 +293,9 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
290
293
|
}, CodeBlockOptions>,
|
|
291
294
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
292
295
|
pluginConfiguration: SelectionPluginOptions | undefined;
|
|
296
|
+
commands: {
|
|
297
|
+
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
298
|
+
};
|
|
293
299
|
}, SelectionPluginOptions | undefined>,
|
|
294
300
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"floatingToolbar", {
|
|
295
301
|
dependencies: [
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { EditorCommand, NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { SelectionPluginOptions } from './types';
|
|
3
|
-
|
|
3
|
+
type SelectionPlugin = NextEditorPlugin<'selection', {
|
|
4
4
|
pluginConfiguration: SelectionPluginOptions | undefined;
|
|
5
|
+
commands: {
|
|
6
|
+
displayGapCursor: (toggle: boolean) => EditorCommand;
|
|
7
|
+
};
|
|
5
8
|
}>;
|
|
9
|
+
export declare const selectionPlugin: SelectionPlugin;
|
|
6
10
|
export default selectionPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.
|
|
3
|
+
"version": "187.39.4",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@atlaskit/editor-plugin-list": "^1.2.0",
|
|
79
79
|
"@atlaskit/editor-plugin-placeholder": "^0.1.0",
|
|
80
80
|
"@atlaskit/editor-plugin-rule": "^0.1.0",
|
|
81
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
81
|
+
"@atlaskit/editor-plugin-table": "^2.13.0",
|
|
82
82
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
83
83
|
"@atlaskit/editor-plugin-type-ahead": "^0.3.0",
|
|
84
84
|
"@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@atlaskit/radio": "^5.6.0",
|
|
109
109
|
"@atlaskit/section-message": "^6.4.0",
|
|
110
110
|
"@atlaskit/select": "^16.5.0",
|
|
111
|
-
"@atlaskit/smart-card": "^26.
|
|
111
|
+
"@atlaskit/smart-card": "^26.22.0",
|
|
112
112
|
"@atlaskit/smart-user-picker": "^6.3.0",
|
|
113
113
|
"@atlaskit/spinner": "^15.5.0",
|
|
114
114
|
"@atlaskit/status": "^1.3.0",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"@atlaskit/textfield": "^5.6.0",
|
|
119
119
|
"@atlaskit/theme": "^12.6.0",
|
|
120
120
|
"@atlaskit/toggle": "^12.6.0",
|
|
121
|
-
"@atlaskit/tokens": "^1.
|
|
121
|
+
"@atlaskit/tokens": "^1.21.0",
|
|
122
122
|
"@atlaskit/tooltip": "^17.8.0",
|
|
123
123
|
"@atlaskit/width-detector": "^4.1.0",
|
|
124
124
|
"@babel/runtime": "^7.0.0",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"@atlaskit/collab-provider": "9.12.1",
|
|
153
153
|
"@atlaskit/dropdown-menu": "^11.13.0",
|
|
154
154
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
155
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
155
|
+
"@atlaskit/editor-plugin-table": "^2.13.0",
|
|
156
156
|
"@atlaskit/flag": "^15.2.0",
|
|
157
157
|
"@atlaskit/icon-object": "^6.3.0",
|
|
158
158
|
"@atlaskit/inline-dialog": "^13.6.0",
|