@atlaskit/editor-core 187.28.0 → 187.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +3 -3
- package/dist/cjs/create-editor/create-plugins-list.js +2 -2
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/plugins/base/index.js +7 -126
- package/dist/cjs/plugins/base/plugin.js +140 -0
- package/dist/cjs/plugins/base/pm-plugins/scroll-gutter.js +3 -9
- package/dist/cjs/plugins/index.js +2 -2
- package/dist/cjs/plugins/list/index.js +17 -0
- package/dist/cjs/plugins/list/utils/find.js +4 -3
- package/dist/cjs/plugins/paste/handlers.js +27 -3
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/cjs/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +58 -36
- package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +6 -6
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +3 -3
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +8 -9
- package/dist/cjs/test-utils.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +19 -18
- package/dist/cjs/ui/ToolbarFeedback/index.js +22 -16
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +3 -3
- package/dist/es2019/create-editor/create-plugins-list.js +1 -1
- package/dist/es2019/index.js +0 -1
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/plugins/base/index.js +2 -104
- package/dist/es2019/plugins/base/plugin.js +109 -0
- package/dist/es2019/plugins/base/pm-plugins/scroll-gutter.js +1 -4
- package/dist/es2019/plugins/index.js +1 -1
- package/dist/es2019/plugins/list/index.js +19 -0
- package/dist/es2019/plugins/list/utils/find.js +2 -2
- package/dist/es2019/plugins/paste/handlers.js +27 -3
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +62 -38
- package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +6 -6
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +3 -3
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +5 -6
- package/dist/es2019/test-utils.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +25 -3
- package/dist/es2019/ui/ToolbarFeedback/index.js +14 -9
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorViewInternal.js +3 -3
- package/dist/esm/create-editor/create-plugins-list.js +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/plugins/base/index.js +2 -123
- package/dist/esm/plugins/base/plugin.js +128 -0
- package/dist/esm/plugins/base/pm-plugins/scroll-gutter.js +1 -4
- package/dist/esm/plugins/index.js +1 -1
- package/dist/esm/plugins/list/index.js +19 -0
- package/dist/esm/plugins/list/utils/find.js +2 -2
- package/dist/esm/plugins/paste/handlers.js +25 -3
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +60 -37
- package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +6 -6
- package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +3 -3
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +5 -6
- package/dist/esm/test-utils.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +6 -5
- package/dist/esm/ui/ToolbarFeedback/index.js +20 -14
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/plugins/base/index.d.ts +4 -16
- package/dist/types/plugins/base/plugin.d.ts +23 -0
- package/dist/types/plugins/base/pm-plugins/scroll-gutter.d.ts +0 -3
- package/dist/types/plugins/index.d.ts +1 -1
- package/dist/types/plugins/list/types.d.ts +1 -8
- package/dist/types/plugins/list/utils/find.d.ts +1 -1
- package/dist/types/plugins/paste/handlers.d.ts +4 -2
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +2 -1
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +5 -2
- package/dist/types/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +4 -1
- package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +3 -3
- package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +3 -2
- package/dist/types/ui/ToolbarFeedback/index.d.ts +1 -19
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/base/index.d.ts +4 -18
- package/dist/types-ts4.5/plugins/base/plugin.d.ts +25 -0
- package/dist/types-ts4.5/plugins/base/pm-plugins/scroll-gutter.d.ts +0 -3
- package/dist/types-ts4.5/plugins/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/list/types.d.ts +1 -8
- package/dist/types-ts4.5/plugins/list/utils/find.d.ts +1 -1
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +4 -2
- package/dist/types-ts4.5/plugins/paste/pm-plugins/analytics.d.ts +2 -1
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/index.d.ts +5 -2
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +4 -1
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/index.d.ts +3 -3
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +3 -2
- package/dist/types-ts4.5/ui/ToolbarFeedback/index.d.ts +1 -19
- package/package.json +2 -2
- package/report.api.md +4 -58
- package/tmp/api-report-tmp.d.ts +4 -47
- package/dist/cjs/plugins/list/styles.js +0 -15
- package/dist/cjs/utils/list-commands.js +0 -17
- package/dist/cjs/utils/lists.js +0 -31
- package/dist/es2019/plugins/list/styles.js +0 -26
- package/dist/es2019/utils/list-commands.js +0 -11
- package/dist/es2019/utils/lists.js +0 -26
- package/dist/esm/plugins/list/styles.js +0 -7
- package/dist/esm/utils/list-commands.js +0 -11
- package/dist/esm/utils/lists.js +0 -24
- package/dist/types/plugins/list/styles.d.ts +0 -1
- package/dist/types/utils/list-commands.d.ts +0 -6
- package/dist/types/utils/lists.d.ts +0 -2
- package/dist/types-ts4.5/plugins/list/styles.d.ts +0 -1
- package/dist/types-ts4.5/utils/list-commands.d.ts +0 -6
- package/dist/types-ts4.5/utils/lists.d.ts +0 -2
|
@@ -18,7 +18,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
18
18
|
indentDisabled = props.indentDisabled,
|
|
19
19
|
outdentDisabled = props.outdentDisabled,
|
|
20
20
|
featureFlags = props.featureFlags,
|
|
21
|
-
|
|
21
|
+
pluginInjectionApi = props.pluginInjectionApi;
|
|
22
22
|
if (isSmall) {
|
|
23
23
|
return jsx(ToolbarDropdown, {
|
|
24
24
|
editorView: props.editorView,
|
|
@@ -34,7 +34,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
34
34
|
indentDisabled: indentDisabled,
|
|
35
35
|
outdentDisabled: outdentDisabled,
|
|
36
36
|
disabled: disabled,
|
|
37
|
-
onItemActivated: onItemActivated(
|
|
37
|
+
onItemActivated: onItemActivated(pluginInjectionApi),
|
|
38
38
|
featureFlags: featureFlags
|
|
39
39
|
});
|
|
40
40
|
}
|
|
@@ -49,7 +49,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
49
49
|
indentDisabled: indentDisabled,
|
|
50
50
|
outdentDisabled: outdentDisabled,
|
|
51
51
|
disabled: disabled,
|
|
52
|
-
onItemActivated: onItemActivated(
|
|
52
|
+
onItemActivated: onItemActivated(pluginInjectionApi),
|
|
53
53
|
featureFlags: featureFlags
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { indentList, outdentList, toggleBulletList, toggleOrderedList } from '../../list/commands';
|
|
2
1
|
import { getIndentCommand as indentParagraphOrHeading, getOutdentCommand as outdentParagraphOrHeading } from '../../indentation/commands';
|
|
3
2
|
import { getIndentCommand as indentTaskList, getUnindentCommand as outdentTaskList } from '../../tasks-and-decisions/pm-plugins/keymaps';
|
|
4
3
|
import { INPUT_METHOD } from '../../analytics';
|
|
5
4
|
import { pluginKey as indentationButtonsPluginKey } from '../pm-plugins/indentation-buttons';
|
|
6
|
-
export var onItemActivated = function onItemActivated(
|
|
5
|
+
export var onItemActivated = function onItemActivated(pluginInjectionApi) {
|
|
7
6
|
return function (_ref) {
|
|
8
7
|
var buttonName = _ref.buttonName,
|
|
9
8
|
editorView = _ref.editorView,
|
|
10
9
|
featureFlags = _ref.featureFlags;
|
|
11
10
|
switch (buttonName) {
|
|
12
11
|
case 'bullet_list':
|
|
13
|
-
toggleBulletList(
|
|
12
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.actions.toggleBulletList(editorView, INPUT_METHOD.TOOLBAR);
|
|
14
13
|
break;
|
|
15
14
|
case 'ordered_list':
|
|
16
|
-
toggleOrderedList(
|
|
15
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.actions.toggleOrderedList(editorView, INPUT_METHOD.TOOLBAR);
|
|
17
16
|
break;
|
|
18
17
|
case 'indent':
|
|
19
18
|
{
|
|
@@ -23,7 +22,7 @@ export var onItemActivated = function onItemActivated(editorAnalyticsAPI) {
|
|
|
23
22
|
indentParagraphOrHeading(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
24
23
|
}
|
|
25
24
|
if (node === 'list') {
|
|
26
|
-
indentList(
|
|
25
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.actions.indentList(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
27
26
|
}
|
|
28
27
|
if (node === 'taskList') {
|
|
29
28
|
indentTaskList(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
@@ -38,7 +37,7 @@ export var onItemActivated = function onItemActivated(editorAnalyticsAPI) {
|
|
|
38
37
|
outdentParagraphOrHeading(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
39
38
|
}
|
|
40
39
|
if (_node === 'list') {
|
|
41
|
-
outdentList(
|
|
40
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.actions.outdentList(INPUT_METHOD.TOOLBAR, featureFlags)(editorView.state, editorView.dispatch);
|
|
42
41
|
}
|
|
43
42
|
if (_node === 'taskList') {
|
|
44
43
|
outdentTaskList(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
package/dist/esm/test-utils.js
CHANGED
|
@@ -7,7 +7,7 @@ import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
|
7
7
|
import { createSchema } from './create-editor/create-schema';
|
|
8
8
|
import { sortByOrder } from './create-editor/sort-by-order';
|
|
9
9
|
import { analyticsPluginKey } from './plugins/analytics/plugin-key';
|
|
10
|
-
import basePlugin from './plugins/base';
|
|
10
|
+
import { basePlugin } from './plugins/base';
|
|
11
11
|
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
12
12
|
export function getFireAnalytics(editorView) {
|
|
13
13
|
var _analyticsPluginKey$g;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
6
|
-
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles } from '@atlaskit/editor-common/styles';
|
|
7
|
-
import { editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
|
|
7
|
+
import { blockNodesVerticalMargin, editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { unsupportedStyles } from '../../plugins/unsupported-content/styles';
|
|
9
9
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
10
10
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
@@ -12,7 +12,6 @@ import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
|
12
12
|
import { placeholderStyles } from '../../plugins/placeholder/styles';
|
|
13
13
|
import { blocktypeStyles } from '../../plugins/block-type/styles';
|
|
14
14
|
import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
15
|
-
import { listsStyles } from '../../plugins/list/styles';
|
|
16
15
|
import { ruleStyles } from '../../plugins/rule/styles';
|
|
17
16
|
import { mediaStyles } from '../../plugins/media/styles';
|
|
18
17
|
import { layoutStyles } from '../../plugins/layout/styles';
|
|
@@ -30,9 +29,11 @@ import { statusStyles } from '../../plugins/status/styles';
|
|
|
30
29
|
import { dateStyles } from '../../plugins/date/styles';
|
|
31
30
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
32
31
|
import { linkSharedStyle, codeMarkSharedStyles } from '@atlaskit/editor-common/styles';
|
|
32
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
33
33
|
export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n"])), linkSharedStyle);
|
|
34
|
+
var listsStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: 4px 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n }\n"])), blockNodesVerticalMargin, browser.safari ? codeBlockInListSafariFix : '');
|
|
34
35
|
var contentStyles = function contentStyles(props) {
|
|
35
|
-
return css(
|
|
36
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
|
|
36
37
|
theme: props.theme
|
|
37
38
|
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(props), blocktypeStyles(props), codeMarkSharedStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles(props), telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
38
39
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -29,7 +30,7 @@ import { openFeedbackDialog } from '../../plugins/feedback-dialog';
|
|
|
29
30
|
import deprecationWarnings from '../../utils/deprecation-warnings';
|
|
30
31
|
import pickBy from '../../utils/pick-by';
|
|
31
32
|
import { analyticsEventKey } from '../../plugins/analytics/consts';
|
|
32
|
-
import {
|
|
33
|
+
import { usePresetContext } from '../../presets/context';
|
|
33
34
|
var PopupWithOutsideListeners = withOuterListeners(Popup);
|
|
34
35
|
var POPUP_HEIGHT = 388;
|
|
35
36
|
var POPUP_WIDTH = 280;
|
|
@@ -50,12 +51,12 @@ var deprecations = [{
|
|
|
50
51
|
var isNullOrUndefined = function isNullOrUndefined(attr) {
|
|
51
52
|
return attr === null || attr === undefined;
|
|
52
53
|
};
|
|
53
|
-
var
|
|
54
|
-
_inherits(
|
|
55
|
-
var _super = _createSuper(
|
|
56
|
-
function
|
|
54
|
+
var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
55
|
+
_inherits(ToolbarFeedbackInternal, _PureComponent);
|
|
56
|
+
var _super = _createSuper(ToolbarFeedbackInternal);
|
|
57
|
+
function ToolbarFeedbackInternal(props) {
|
|
57
58
|
var _this;
|
|
58
|
-
_classCallCheck(this,
|
|
59
|
+
_classCallCheck(this, ToolbarFeedbackInternal);
|
|
59
60
|
_this = _super.call(this, props);
|
|
60
61
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
61
62
|
jiraIssueCollectorScriptLoading: false,
|
|
@@ -92,8 +93,8 @@ var ToolbarFeedback = /*#__PURE__*/function (_PureComponent) {
|
|
|
92
93
|
});
|
|
93
94
|
});
|
|
94
95
|
_defineProperty(_assertThisInitialized(_this), "openJiraIssueCollector", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
95
|
-
var _window$localStorage$,
|
|
96
|
-
var
|
|
96
|
+
var _this$props$api, _window$localStorage$, _basePluginState$cont;
|
|
97
|
+
var basePluginState, sessionId, contentId, tabId;
|
|
97
98
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
98
99
|
while (1) switch (_context.prev = _context.next) {
|
|
99
100
|
case 0:
|
|
@@ -101,9 +102,9 @@ var ToolbarFeedback = /*#__PURE__*/function (_PureComponent) {
|
|
|
101
102
|
jiraIssueCollectorScriptLoading: true,
|
|
102
103
|
showOptOutOption: false
|
|
103
104
|
});
|
|
104
|
-
|
|
105
|
+
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.dependencies.base.sharedState.currentState();
|
|
105
106
|
sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
106
|
-
contentId =
|
|
107
|
+
contentId = basePluginState === null || basePluginState === void 0 ? void 0 : (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
107
108
|
tabId = window.sessionStorage['awc.tab.id'];
|
|
108
109
|
_context.next = 7;
|
|
109
110
|
return openFeedbackDialog(_objectSpread(_objectSpread({}, _this.getFeedbackInfo()), {}, {
|
|
@@ -144,7 +145,7 @@ var ToolbarFeedback = /*#__PURE__*/function (_PureComponent) {
|
|
|
144
145
|
deprecationWarnings(ToolbarFeedback.name, props, deprecations);
|
|
145
146
|
return _this;
|
|
146
147
|
}
|
|
147
|
-
_createClass(
|
|
148
|
+
_createClass(ToolbarFeedbackInternal, [{
|
|
148
149
|
key: "render",
|
|
149
150
|
value: function render() {
|
|
150
151
|
var _this$props = this.props,
|
|
@@ -191,9 +192,14 @@ var ToolbarFeedback = /*#__PURE__*/function (_PureComponent) {
|
|
|
191
192
|
}, "Learn more")))))) : null;
|
|
192
193
|
}
|
|
193
194
|
}]);
|
|
194
|
-
return
|
|
195
|
+
return ToolbarFeedbackInternal;
|
|
195
196
|
}(PureComponent);
|
|
196
|
-
_defineProperty(
|
|
197
|
+
_defineProperty(ToolbarFeedbackInternal, "contextTypes", {
|
|
197
198
|
editorActions: PropTypes.object.isRequired
|
|
198
199
|
});
|
|
199
|
-
export
|
|
200
|
+
export default function ToolbarFeedback(props) {
|
|
201
|
+
var api = usePresetContext();
|
|
202
|
+
return jsx(ToolbarFeedbackInternal, _extends({
|
|
203
|
+
api: api
|
|
204
|
+
}, props));
|
|
205
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -63,7 +63,6 @@ export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, }
|
|
|
63
63
|
export type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
64
64
|
export { setKeyboardHeight, setMobilePaddingTop, setIsExpanded, } from './plugins/mobile-dimensions/commands';
|
|
65
65
|
export { setTextSelection, dedupe, getNodesCount, measurements } from './utils';
|
|
66
|
-
export { getListCommands } from './utils/list-commands';
|
|
67
66
|
export { ReactEditorView, BaseReactEditorView } from './create-editor';
|
|
68
67
|
export { getDefaultPresetOptionsFromEditorProps } from './create-editor';
|
|
69
68
|
export type { Command, EditorPlugin, EditorProps, EditorInstance, CommandDispatch, } from './types';
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import basePlugin from './plugin';
|
|
2
|
+
import type { BasePlugin, BasePluginState, BasePluginOptions } from './plugin';
|
|
2
3
|
import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface BasePluginOptions {
|
|
6
|
-
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
7
|
-
allowInlineCursorTarget?: boolean;
|
|
8
|
-
inputTracking?: InputTracking;
|
|
9
|
-
browserFreezeTracking?: BrowserFreezetracking;
|
|
10
|
-
ufo?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const isChromeWithSelectionBug: any;
|
|
13
|
-
declare const basePlugin: NextEditorPlugin<'base', {
|
|
14
|
-
pluginConfiguration: BasePluginOptions | undefined;
|
|
15
|
-
dependencies: [typeof featureFlagsPlugin];
|
|
16
|
-
}>;
|
|
17
|
-
export default basePlugin;
|
|
4
|
+
export { basePlugin };
|
|
5
|
+
export type { BasePlugin, BasePluginState, BasePluginOptions, ScrollGutterPluginOptions, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { NextEditorPlugin } from '../../types';
|
|
2
|
+
import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
|
|
3
|
+
import type { InputTracking, BrowserFreezetracking } from '../../types/performance-tracking';
|
|
4
|
+
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
+
export interface BasePluginOptions {
|
|
7
|
+
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
8
|
+
allowInlineCursorTarget?: boolean;
|
|
9
|
+
inputTracking?: InputTracking;
|
|
10
|
+
browserFreezeTracking?: BrowserFreezetracking;
|
|
11
|
+
ufo?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type BasePluginState = {
|
|
14
|
+
contextIdentifier: ContextIdentifierProvider | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type BasePlugin = NextEditorPlugin<'base', {
|
|
17
|
+
pluginConfiguration: BasePluginOptions | undefined;
|
|
18
|
+
dependencies: [typeof featureFlagsPlugin];
|
|
19
|
+
sharedState: BasePluginState;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const isChromeWithSelectionBug: any;
|
|
22
|
+
declare const basePlugin: BasePlugin;
|
|
23
|
+
export default basePlugin;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export declare const GUTTER_SIZE_IN_PX = 120;
|
|
4
|
-
export declare const GUTTER_SIZE_MOBILE_IN_PX = 36;
|
|
5
|
-
export declare const GUTTER_SELECTOR = "#editor-scroll-gutter";
|
|
6
3
|
export type ScrollGutterPluginOptions = {
|
|
7
4
|
/** Element the page uses for scrolling */
|
|
8
5
|
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
2
1
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
+
export type { ListState } from '@atlaskit/editor-plugin-list';
|
|
3
3
|
export declare const MAX_NESTED_LIST_INDENTATION = 6;
|
|
4
|
-
export interface ListState {
|
|
5
|
-
bulletListActive: boolean;
|
|
6
|
-
bulletListDisabled: boolean;
|
|
7
|
-
orderedListActive: boolean;
|
|
8
|
-
orderedListDisabled: boolean;
|
|
9
|
-
decorationSet: DecorationSet;
|
|
10
|
-
}
|
|
11
4
|
export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
|
|
@@ -7,4 +7,4 @@ export declare function findFirstParentListItemNode($pos: ResolvedPos): {
|
|
|
7
7
|
pos: number;
|
|
8
8
|
node: PMNode;
|
|
9
9
|
} | null;
|
|
10
|
-
export declare
|
|
10
|
+
export declare const findRootParentListNode: ($pos: ResolvedPos) => ResolvedPos | null;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { Command } from '../../types';
|
|
6
6
|
import type { InputMethodInsertMedia } from '../analytics';
|
|
7
7
|
import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
|
|
8
8
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
9
|
+
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
9
10
|
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
10
11
|
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
11
12
|
export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
|
|
12
|
-
export declare
|
|
13
|
+
export declare const doesSelectionWhichStartsOrEndsInListContainEntireList: (selection: Selection, findRootParentListNode: FindRootParentListNode | undefined) => boolean;
|
|
14
|
+
export declare function handlePastePanelOrDecisionContentIntoList(slice: Slice, findRootParentListNode: FindRootParentListNode | undefined): Command;
|
|
13
15
|
export declare function handlePasteLinkOnSelectedText(slice: Slice): Command;
|
|
14
16
|
export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEvent): Command;
|
|
15
17
|
export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
@@ -4,6 +4,7 @@ import type { Slice, Fragment, Schema } from '@atlaskit/editor-prosemirror/model
|
|
|
4
4
|
import type { ExtractInjectionAPI, Command } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type pastePlugin from '../';
|
|
6
6
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
7
8
|
type PasteContext = {
|
|
8
9
|
type: PasteType;
|
|
9
10
|
asPlain?: boolean;
|
|
@@ -29,7 +30,7 @@ export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: C
|
|
|
29
30
|
export declare const handlePastePreservingMarksWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
30
31
|
export declare const handleMarkdownWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
31
32
|
export declare const handleRichTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
32
|
-
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
33
|
+
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, findRootParentListNode: FindRootParentListNode | undefined) => Command;
|
|
33
34
|
export declare const handlePasteNonNestableBlockNodesIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
34
35
|
export declare const handleExpandWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
35
36
|
export declare const handleSelectedTableWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
5
|
+
import type { IndentationButtons } from './pm-plugins/indentation-buttons';
|
|
5
6
|
type Config = {
|
|
6
7
|
showIndentationButtons: boolean;
|
|
7
8
|
allowHeadingAndParagraphIndentation: boolean;
|
|
@@ -10,7 +11,9 @@ declare const toolbarListsIndentationPlugin: NextEditorPlugin<'toolbarListsInden
|
|
|
10
11
|
pluginConfiguration: Config;
|
|
11
12
|
dependencies: [
|
|
12
13
|
typeof featureFlagsPlugin,
|
|
14
|
+
ListPlugin,
|
|
13
15
|
OptionalPlugin<typeof analyticsPlugin>
|
|
14
16
|
];
|
|
17
|
+
sharedState: IndentationButtons | undefined;
|
|
15
18
|
}>;
|
|
16
19
|
export default toolbarListsIndentationPlugin;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { Dispatch } from '../../../event-dispatcher';
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type toolbarListsIndentationPlugin from '../index';
|
|
4
6
|
export interface IndentationButtons {
|
|
5
7
|
indentDisabled: boolean;
|
|
6
8
|
outdentDisabled: boolean;
|
|
7
9
|
node: null | 'paragraph_heading' | 'list' | 'taskList';
|
|
8
10
|
}
|
|
9
11
|
export declare const pluginKey: PluginKey<IndentationButtons>;
|
|
10
|
-
export declare const createPlugin: ({ dispatch, showIndentationButtons, allowHeadingAndParagraphIndentation, }: {
|
|
12
|
+
export declare const createPlugin: ({ dispatch, showIndentationButtons, allowHeadingAndParagraphIndentation, api, }: {
|
|
11
13
|
dispatch: Dispatch;
|
|
12
14
|
showIndentationButtons: boolean;
|
|
13
15
|
allowHeadingAndParagraphIndentation: boolean;
|
|
16
|
+
api: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
|
|
14
17
|
}) => SafePlugin<IndentationButtons>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type
|
|
4
|
+
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type toolbarListsIndentationPlugin from '../index';
|
|
6
6
|
export interface Props {
|
|
7
7
|
editorView: EditorView;
|
|
8
8
|
featureFlags: FeatureFlags;
|
|
@@ -19,6 +19,6 @@ export interface Props {
|
|
|
19
19
|
showIndentationButtons?: boolean;
|
|
20
20
|
indentDisabled?: boolean;
|
|
21
21
|
outdentDisabled?: boolean;
|
|
22
|
-
|
|
22
|
+
pluginInjectionApi?: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
|
|
23
23
|
}
|
|
24
24
|
export default function ToolbarListsIndentation(props: Props): jsx.JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { ButtonName } from '../types';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type toolbarListsIndentationPlugin from '../index';
|
|
6
|
+
export declare const onItemActivated: (pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined) => ({ buttonName, editorView, featureFlags, }: {
|
|
6
7
|
featureFlags: FeatureFlags;
|
|
7
8
|
buttonName: ButtonName;
|
|
8
9
|
editorView: EditorView;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { PureComponent } from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
export type EditorProduct = 'bitbucket' | 'jira' | 'confluence' | 'stride' | undefined;
|
|
6
4
|
export interface Props {
|
|
7
5
|
/** @deprecated To pass package version use feedbackInfo property – <Editor feedbackInfo={{ packageVersion }} /> */
|
|
@@ -26,20 +24,4 @@ declare global {
|
|
|
26
24
|
ATL_JQ_PAGE_PROPS: any;
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
|
-
export default
|
|
30
|
-
static contextTypes: {
|
|
31
|
-
editorActions: PropTypes.Validator<object>;
|
|
32
|
-
};
|
|
33
|
-
state: State;
|
|
34
|
-
constructor(props: Props);
|
|
35
|
-
private handleRef;
|
|
36
|
-
showJiraCollectorDialogCallback?: () => void;
|
|
37
|
-
private getFeedbackInfo;
|
|
38
|
-
render(): jsx.JSX.Element | null;
|
|
39
|
-
private collectFeedback;
|
|
40
|
-
private toggleShowOptOutOption;
|
|
41
|
-
private openJiraIssueCollector;
|
|
42
|
-
private openFeedbackPopup;
|
|
43
|
-
private openLearnMorePage;
|
|
44
|
-
private hasJquery;
|
|
45
|
-
}
|
|
27
|
+
export default function ToolbarFeedback(props: Props): jsx.JSX.Element;
|
|
@@ -63,7 +63,6 @@ export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, }
|
|
|
63
63
|
export type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
64
64
|
export { setKeyboardHeight, setMobilePaddingTop, setIsExpanded, } from './plugins/mobile-dimensions/commands';
|
|
65
65
|
export { setTextSelection, dedupe, getNodesCount, measurements } from './utils';
|
|
66
|
-
export { getListCommands } from './utils/list-commands';
|
|
67
66
|
export { ReactEditorView, BaseReactEditorView } from './create-editor';
|
|
68
67
|
export { getDefaultPresetOptionsFromEditorProps } from './create-editor';
|
|
69
68
|
export type { Command, EditorPlugin, EditorProps, EditorInstance, CommandDispatch, } from './types';
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import basePlugin from './plugin';
|
|
2
|
+
import type { BasePlugin, BasePluginState, BasePluginOptions } from './plugin';
|
|
2
3
|
import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface BasePluginOptions {
|
|
6
|
-
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
7
|
-
allowInlineCursorTarget?: boolean;
|
|
8
|
-
inputTracking?: InputTracking;
|
|
9
|
-
browserFreezeTracking?: BrowserFreezetracking;
|
|
10
|
-
ufo?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const isChromeWithSelectionBug: any;
|
|
13
|
-
declare const basePlugin: NextEditorPlugin<'base', {
|
|
14
|
-
pluginConfiguration: BasePluginOptions | undefined;
|
|
15
|
-
dependencies: [
|
|
16
|
-
typeof featureFlagsPlugin
|
|
17
|
-
];
|
|
18
|
-
}>;
|
|
19
|
-
export default basePlugin;
|
|
4
|
+
export { basePlugin };
|
|
5
|
+
export type { BasePlugin, BasePluginState, BasePluginOptions, ScrollGutterPluginOptions, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NextEditorPlugin } from '../../types';
|
|
2
|
+
import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
|
|
3
|
+
import type { InputTracking, BrowserFreezetracking } from '../../types/performance-tracking';
|
|
4
|
+
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
+
export interface BasePluginOptions {
|
|
7
|
+
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
8
|
+
allowInlineCursorTarget?: boolean;
|
|
9
|
+
inputTracking?: InputTracking;
|
|
10
|
+
browserFreezeTracking?: BrowserFreezetracking;
|
|
11
|
+
ufo?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type BasePluginState = {
|
|
14
|
+
contextIdentifier: ContextIdentifierProvider | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type BasePlugin = NextEditorPlugin<'base', {
|
|
17
|
+
pluginConfiguration: BasePluginOptions | undefined;
|
|
18
|
+
dependencies: [
|
|
19
|
+
typeof featureFlagsPlugin
|
|
20
|
+
];
|
|
21
|
+
sharedState: BasePluginState;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const isChromeWithSelectionBug: any;
|
|
24
|
+
declare const basePlugin: BasePlugin;
|
|
25
|
+
export default basePlugin;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export declare const GUTTER_SIZE_IN_PX = 120;
|
|
4
|
-
export declare const GUTTER_SIZE_MOBILE_IN_PX = 36;
|
|
5
|
-
export declare const GUTTER_SELECTOR = "#editor-scroll-gutter";
|
|
6
3
|
export type ScrollGutterPluginOptions = {
|
|
7
4
|
/** Element the page uses for scrolling */
|
|
8
5
|
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
2
1
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
+
export type { ListState } from '@atlaskit/editor-plugin-list';
|
|
3
3
|
export declare const MAX_NESTED_LIST_INDENTATION = 6;
|
|
4
|
-
export interface ListState {
|
|
5
|
-
bulletListActive: boolean;
|
|
6
|
-
bulletListDisabled: boolean;
|
|
7
|
-
orderedListActive: boolean;
|
|
8
|
-
orderedListDisabled: boolean;
|
|
9
|
-
decorationSet: DecorationSet;
|
|
10
|
-
}
|
|
11
4
|
export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
|
|
@@ -7,4 +7,4 @@ export declare function findFirstParentListItemNode($pos: ResolvedPos): {
|
|
|
7
7
|
pos: number;
|
|
8
8
|
node: PMNode;
|
|
9
9
|
} | null;
|
|
10
|
-
export declare
|
|
10
|
+
export declare const findRootParentListNode: ($pos: ResolvedPos) => ResolvedPos | null;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { Command } from '../../types';
|
|
6
6
|
import type { InputMethodInsertMedia } from '../analytics';
|
|
7
7
|
import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
|
|
8
8
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
9
|
+
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
9
10
|
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
10
11
|
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
11
12
|
export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
|
|
12
|
-
export declare
|
|
13
|
+
export declare const doesSelectionWhichStartsOrEndsInListContainEntireList: (selection: Selection, findRootParentListNode: FindRootParentListNode | undefined) => boolean;
|
|
14
|
+
export declare function handlePastePanelOrDecisionContentIntoList(slice: Slice, findRootParentListNode: FindRootParentListNode | undefined): Command;
|
|
13
15
|
export declare function handlePasteLinkOnSelectedText(slice: Slice): Command;
|
|
14
16
|
export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEvent): Command;
|
|
15
17
|
export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
@@ -4,6 +4,7 @@ import type { Slice, Fragment, Schema } from '@atlaskit/editor-prosemirror/model
|
|
|
4
4
|
import type { ExtractInjectionAPI, Command } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type pastePlugin from '../';
|
|
6
6
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
7
8
|
type PasteContext = {
|
|
8
9
|
type: PasteType;
|
|
9
10
|
asPlain?: boolean;
|
|
@@ -29,7 +30,7 @@ export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: C
|
|
|
29
30
|
export declare const handlePastePreservingMarksWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
30
31
|
export declare const handleMarkdownWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
31
32
|
export declare const handleRichTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
32
|
-
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
33
|
+
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, findRootParentListNode: FindRootParentListNode | undefined) => Command;
|
|
33
34
|
export declare const handlePasteNonNestableBlockNodesIntoListWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
34
35
|
export declare const handleExpandWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
35
36
|
export declare const handleSelectedTableWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
5
|
+
import type { IndentationButtons } from './pm-plugins/indentation-buttons';
|
|
5
6
|
type Config = {
|
|
6
7
|
showIndentationButtons: boolean;
|
|
7
8
|
allowHeadingAndParagraphIndentation: boolean;
|
|
@@ -10,7 +11,9 @@ declare const toolbarListsIndentationPlugin: NextEditorPlugin<'toolbarListsInden
|
|
|
10
11
|
pluginConfiguration: Config;
|
|
11
12
|
dependencies: [
|
|
12
13
|
typeof featureFlagsPlugin,
|
|
14
|
+
ListPlugin,
|
|
13
15
|
OptionalPlugin<typeof analyticsPlugin>
|
|
14
16
|
];
|
|
17
|
+
sharedState: IndentationButtons | undefined;
|
|
15
18
|
}>;
|
|
16
19
|
export default toolbarListsIndentationPlugin;
|