@atlaskit/editor-core 189.3.13 → 189.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/plugins/analytics/index.js +0 -6
- package/dist/cjs/plugins/analytics/utils.js +0 -29
- package/dist/cjs/plugins/breakout/index.js +3 -3
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -4
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
- package/dist/cjs/plugins/find-replace/commands-with-analytics.js +85 -71
- package/dist/cjs/plugins/find-replace/index.js +5 -2
- package/dist/cjs/plugins/find-replace/keymap.js +4 -4
- package/dist/cjs/plugins/index.js +1 -24
- package/dist/cjs/plugins/mobile-dimensions/index.js +6 -0
- package/dist/cjs/presets/context.js +5 -3
- package/dist/cjs/presets/universal.js +14 -4
- package/dist/cjs/ui/Appearance/Chromeless.js +18 -9
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +7 -9
- package/dist/cjs/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +11 -8
- package/dist/cjs/ui/ContentStyles/index.js +4 -4
- package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
- package/dist/cjs/use-preset.js +0 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ErrorBoundary.js +0 -2
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/es2019/plugins/analytics/index.js +1 -1
- package/dist/es2019/plugins/analytics/utils.js +0 -24
- package/dist/es2019/plugins/breakout/index.js +1 -1
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +1 -1
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +20 -19
- package/dist/es2019/plugins/find-replace/commands-with-analytics.js +15 -15
- package/dist/es2019/plugins/find-replace/index.js +7 -2
- package/dist/es2019/plugins/find-replace/keymap.js +4 -4
- package/dist/es2019/plugins/index.js +0 -2
- package/dist/es2019/plugins/mobile-dimensions/index.js +6 -0
- package/dist/es2019/presets/context.js +2 -2
- package/dist/es2019/presets/universal.js +11 -1
- package/dist/es2019/ui/Appearance/Chromeless.js +17 -9
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +8 -9
- package/dist/es2019/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ToolbarFeedback/index.js +2 -2
- package/dist/es2019/use-preset.js +0 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +0 -2
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/esm/plugins/analytics/utils.js +0 -28
- package/dist/esm/plugins/breakout/index.js +1 -1
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -1
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
- package/dist/esm/plugins/find-replace/commands-with-analytics.js +84 -70
- package/dist/esm/plugins/find-replace/index.js +5 -2
- package/dist/esm/plugins/find-replace/keymap.js +4 -4
- package/dist/esm/plugins/index.js +0 -2
- package/dist/esm/plugins/mobile-dimensions/index.js +6 -0
- package/dist/esm/presets/context.js +2 -2
- package/dist/esm/presets/universal.js +10 -1
- package/dist/esm/ui/Appearance/Chromeless.js +15 -9
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/esm/ui/AppearanceComponents/Mobile.js +7 -9
- package/dist/esm/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/use-preset.js +0 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/analytics/index.d.ts +1 -1
- package/dist/types/plugins/analytics/utils.d.ts +0 -11
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
- package/dist/types/plugins/find-replace/commands-with-analytics.d.ts +9 -9
- package/dist/types/plugins/find-replace/index.d.ts +5 -3
- package/dist/types/plugins/find-replace/keymap.d.ts +2 -1
- package/dist/types/plugins/index.d.ts +0 -2
- package/dist/types/plugins/insert-block/types.d.ts +1 -1
- package/dist/types/plugins/mobile-dimensions/index.d.ts +5 -1
- package/dist/types/presets/context.d.ts +2 -2
- package/dist/types/presets/universal.d.ts +5 -0
- package/dist/types/ui/Appearance/Chromeless.d.ts +1 -1
- package/dist/types/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
- package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/analytics/utils.d.ts +0 -11
- package/dist/types-ts4.5/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
- package/dist/types-ts4.5/plugins/find-replace/commands-with-analytics.d.ts +9 -9
- package/dist/types-ts4.5/plugins/find-replace/index.d.ts +6 -3
- package/dist/types-ts4.5/plugins/find-replace/keymap.d.ts +2 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/mobile-dimensions/index.d.ts +5 -1
- package/dist/types-ts4.5/presets/context.d.ts +2 -2
- package/dist/types-ts4.5/presets/universal.d.ts +5 -0
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +1 -1
- package/dist/types-ts4.5/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
- package/package.json +6 -9
- package/dist/cjs/plugins/breakout/constants.js +0 -10
- package/dist/cjs/plugins/expand/commands.js +0 -184
- package/dist/cjs/plugins/expand/index.js +0 -111
- package/dist/cjs/plugins/expand/nodeviews/index.js +0 -485
- package/dist/cjs/plugins/expand/pm-plugins/keymap.js +0 -171
- package/dist/cjs/plugins/expand/pm-plugins/main.js +0 -85
- package/dist/cjs/plugins/expand/pm-plugins/plugin-factory.js +0 -15
- package/dist/cjs/plugins/expand/reducer.js +0 -20
- package/dist/cjs/plugins/expand/toolbar.js +0 -59
- package/dist/cjs/plugins/expand/types.js +0 -5
- package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +0 -104
- package/dist/cjs/plugins/expand/ui/class-names.js +0 -20
- package/dist/cjs/plugins/expand/utils.js +0 -24
- package/dist/cjs/plugins/max-content-size/index.js +0 -44
- package/dist/es2019/plugins/breakout/constants.js +0 -4
- package/dist/es2019/plugins/expand/commands.js +0 -161
- package/dist/es2019/plugins/expand/index.js +0 -95
- package/dist/es2019/plugins/expand/nodeviews/index.js +0 -475
- package/dist/es2019/plugins/expand/pm-plugins/keymap.js +0 -197
- package/dist/es2019/plugins/expand/pm-plugins/main.js +0 -73
- package/dist/es2019/plugins/expand/pm-plugins/plugin-factory.js +0 -9
- package/dist/es2019/plugins/expand/reducer.js +0 -11
- package/dist/es2019/plugins/expand/toolbar.js +0 -52
- package/dist/es2019/plugins/expand/types.js +0 -1
- package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +0 -85
- package/dist/es2019/plugins/expand/ui/class-names.js +0 -12
- package/dist/es2019/plugins/expand/utils.js +0 -1
- package/dist/es2019/plugins/max-content-size/index.js +0 -35
- package/dist/esm/plugins/breakout/constants.js +0 -4
- package/dist/esm/plugins/expand/commands.js +0 -177
- package/dist/esm/plugins/expand/index.js +0 -97
- package/dist/esm/plugins/expand/nodeviews/index.js +0 -477
- package/dist/esm/plugins/expand/pm-plugins/keymap.js +0 -165
- package/dist/esm/plugins/expand/pm-plugins/main.js +0 -77
- package/dist/esm/plugins/expand/pm-plugins/plugin-factory.js +0 -9
- package/dist/esm/plugins/expand/reducer.js +0 -13
- package/dist/esm/plugins/expand/toolbar.js +0 -52
- package/dist/esm/plugins/expand/types.js +0 -1
- package/dist/esm/plugins/expand/ui/ExpandIconButton.js +0 -95
- package/dist/esm/plugins/expand/ui/class-names.js +0 -14
- package/dist/esm/plugins/expand/utils.js +0 -1
- package/dist/esm/plugins/max-content-size/index.js +0 -37
- package/dist/types/plugins/breakout/constants.d.ts +0 -4
- package/dist/types/plugins/expand/commands.d.ts +0 -13
- package/dist/types/plugins/expand/index.d.ts +0 -31
- package/dist/types/plugins/expand/nodeviews/index.d.ts +0 -55
- package/dist/types/plugins/expand/pm-plugins/keymap.d.ts +0 -4
- package/dist/types/plugins/expand/pm-plugins/main.d.ts +0 -8
- package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
- package/dist/types/plugins/expand/reducer.d.ts +0 -3
- package/dist/types/plugins/expand/toolbar.d.ts +0 -3
- package/dist/types/plugins/expand/types.d.ts +0 -9
- package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
- package/dist/types/plugins/expand/ui/class-names.d.ts +0 -11
- package/dist/types/plugins/expand/utils.d.ts +0 -1
- package/dist/types/plugins/max-content-size/index.d.ts +0 -13
- package/dist/types-ts4.5/plugins/breakout/constants.d.ts +0 -4
- package/dist/types-ts4.5/plugins/expand/commands.d.ts +0 -13
- package/dist/types-ts4.5/plugins/expand/index.d.ts +0 -31
- package/dist/types-ts4.5/plugins/expand/nodeviews/index.d.ts +0 -55
- package/dist/types-ts4.5/plugins/expand/pm-plugins/keymap.d.ts +0 -4
- package/dist/types-ts4.5/plugins/expand/pm-plugins/main.d.ts +0 -8
- package/dist/types-ts4.5/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/reducer.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/types.d.ts +0 -9
- package/dist/types-ts4.5/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
- package/dist/types-ts4.5/plugins/expand/ui/class-names.d.ts +0 -11
- package/dist/types-ts4.5/plugins/expand/utils.d.ts +0 -1
- package/dist/types-ts4.5/plugins/max-content-size/index.d.ts +0 -13
|
@@ -19,7 +19,8 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
19
19
|
}, {
|
|
20
20
|
name: 'findReplaceKeymap',
|
|
21
21
|
plugin: function plugin() {
|
|
22
|
-
|
|
22
|
+
var _api$analytics;
|
|
23
|
+
return keymapPlugin(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
23
24
|
}
|
|
24
25
|
}];
|
|
25
26
|
},
|
|
@@ -34,6 +35,7 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
34
35
|
if (props !== null && props !== void 0 && props.twoLineEditorToolbar) {
|
|
35
36
|
return null;
|
|
36
37
|
} else {
|
|
38
|
+
var _api$analytics2;
|
|
37
39
|
return /*#__PURE__*/React.createElement(FindReplaceToolbarButtonWithState, {
|
|
38
40
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
39
41
|
popupsMountPoint: popupsMountPoint,
|
|
@@ -43,7 +45,8 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
43
45
|
containerElement: containerElement,
|
|
44
46
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
45
47
|
takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
|
|
46
|
-
featureFlags: featureFlags
|
|
48
|
+
featureFlags: featureFlags,
|
|
49
|
+
editorAnalyticsAPI: api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
}
|
|
@@ -2,17 +2,17 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
2
2
|
import { bindKeymapWithCommand, find as findKeymap } from '../../keymaps';
|
|
3
3
|
import { activateWithAnalytics } from './commands-with-analytics';
|
|
4
4
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
var activateFindReplace = function activateFindReplace() {
|
|
5
|
+
var activateFindReplace = function activateFindReplace(editorAnalyticsAPI) {
|
|
6
6
|
return function (state, dispatch) {
|
|
7
|
-
activateWithAnalytics({
|
|
7
|
+
activateWithAnalytics(editorAnalyticsAPI)({
|
|
8
8
|
triggerMethod: TRIGGER_METHOD.SHORTCUT
|
|
9
9
|
})(state, dispatch);
|
|
10
10
|
return true;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
var keymapPlugin = function keymapPlugin() {
|
|
13
|
+
var keymapPlugin = function keymapPlugin(editorAnalyticsAPI) {
|
|
14
14
|
var list = {};
|
|
15
|
-
bindKeymapWithCommand(findKeymap.common, activateFindReplace(), list);
|
|
15
|
+
bindKeymapWithCommand(findKeymap.common, activateFindReplace(editorAnalyticsAPI), list);
|
|
16
16
|
return keymap(list);
|
|
17
17
|
};
|
|
18
18
|
export default keymapPlugin;
|
|
@@ -5,7 +5,6 @@ export { default as insertBlockPlugin } from './insert-block';
|
|
|
5
5
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
6
6
|
export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
|
|
7
7
|
export { default as macroPlugin } from './macro';
|
|
8
|
-
export { default as maxContentSizePlugin } from './max-content-size';
|
|
9
8
|
export { default as pastePlugin } from './paste';
|
|
10
9
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
11
10
|
export { default as breakoutPlugin } from './breakout';
|
|
@@ -16,7 +15,6 @@ export { default as annotationPlugin } from './annotation';
|
|
|
16
15
|
export { default as analyticsPlugin } from './analytics';
|
|
17
16
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
18
17
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
19
|
-
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
20
18
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
21
19
|
export { default as findReplacePlugin } from './find-replace';
|
|
22
20
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
@@ -73,6 +73,12 @@ var createPlugin = function createPlugin(dispatch) {
|
|
|
73
73
|
var mobileDimensionsPlugin = function mobileDimensionsPlugin() {
|
|
74
74
|
return {
|
|
75
75
|
name: 'mobileDimensions',
|
|
76
|
+
getSharedState: function getSharedState(editorState) {
|
|
77
|
+
if (!editorState) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
return mobileDimensionsPluginKey.getState(editorState);
|
|
81
|
+
},
|
|
76
82
|
pmPlugins: function pmPlugins() {
|
|
77
83
|
return [{
|
|
78
84
|
name: 'mobileDimensions',
|
|
@@ -14,11 +14,11 @@ export var PresetContextProvider = function PresetContextProvider(_ref) {
|
|
|
14
14
|
}
|
|
15
15
|
}, children);
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export function usePresetContext() {
|
|
18
18
|
var _useContext = useContext(EditorAPIContext),
|
|
19
19
|
editorApi = _useContext.editorApi;
|
|
20
20
|
return editorApi;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
22
|
export var useSetPresetContext = function useSetPresetContext() {
|
|
23
23
|
var _useContext2 = useContext(EditorAPIContext),
|
|
24
24
|
setEditorApi = _useContext2.setEditorApi;
|
|
@@ -2,12 +2,13 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin,
|
|
5
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
6
6
|
import { panelPlugin } from '@atlaskit/editor-plugin-panel';
|
|
7
7
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
8
8
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
9
9
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
10
10
|
import { datePlugin } from '@atlaskit/editor-plugin-date';
|
|
11
|
+
import { maxContentSizePlugin } from '@atlaskit/editor-plugin-max-content-size';
|
|
11
12
|
import { captionPlugin } from '@atlaskit/editor-plugin-caption';
|
|
12
13
|
import { borderPlugin } from '@atlaskit/editor-plugin-border';
|
|
13
14
|
import { helpDialogPlugin } from '@atlaskit/editor-plugin-help-dialog';
|
|
@@ -30,6 +31,7 @@ import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
|
30
31
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
31
32
|
import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
32
33
|
import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
|
|
34
|
+
import { expandPlugin } from '@atlaskit/editor-plugin-expand';
|
|
33
35
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
34
36
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
35
37
|
import { createDefaultPreset } from './default';
|
|
@@ -411,4 +413,11 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
411
413
|
appearance: appearance
|
|
412
414
|
}]);
|
|
413
415
|
return finalPreset;
|
|
416
|
+
}
|
|
417
|
+
export function isExpandInsertionEnabled(_ref) {
|
|
418
|
+
var allowExpand = _ref.allowExpand;
|
|
419
|
+
if (allowExpand && _typeof(allowExpand) === 'object') {
|
|
420
|
+
return !!allowExpand.allowInsertion;
|
|
421
|
+
}
|
|
422
|
+
return false;
|
|
414
423
|
}
|
|
@@ -10,14 +10,14 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
/** @jsx jsx */
|
|
13
|
-
import React from 'react';
|
|
13
|
+
import React, { Fragment } from 'react';
|
|
14
14
|
import { css, jsx } from '@emotion/react';
|
|
15
15
|
import PluginSlot from '../PluginSlot';
|
|
16
|
-
import WithPluginState from '../WithPluginState';
|
|
17
16
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
18
|
-
import { pluginKey as maxContentSizePluginKey } from '../../plugins/max-content-size';
|
|
19
17
|
import { scrollbarStyles } from '../styles';
|
|
20
18
|
import WithFlash from '../WithFlash';
|
|
19
|
+
import { usePresetContext } from '../../presets/context';
|
|
20
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
21
21
|
var chromelessEditor = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 20px;\n height: auto;\n\n overflow-x: hidden;\n overflow-y: auto;\n ", ";\n max-width: inherit;\n box-sizing: border-box;\n word-wrap: break-word;\n\n div > .ProseMirror {\n outline: none;\n white-space: pre-wrap;\n padding: 0;\n margin: 0;\n\n & > :last-child {\n padding-bottom: 0.5em;\n }\n }\n"])), scrollbarStyles);
|
|
22
22
|
var ContentArea = createEditorContentStyle();
|
|
23
23
|
ContentArea.displayName = 'ContentArea';
|
|
@@ -87,15 +87,21 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
87
87
|
_createClass(Editor, [{
|
|
88
88
|
key: "render",
|
|
89
89
|
value: function render() {
|
|
90
|
-
return jsx(
|
|
91
|
-
|
|
92
|
-
maxContentSize: maxContentSizePluginKey
|
|
93
|
-
},
|
|
94
|
-
render: this.renderChrome
|
|
90
|
+
return jsx(RenderWithPluginState, {
|
|
91
|
+
renderChrome: this.renderChrome
|
|
95
92
|
});
|
|
96
93
|
}
|
|
97
94
|
}]);
|
|
98
95
|
return Editor;
|
|
99
96
|
}(React.Component);
|
|
100
97
|
_defineProperty(Editor, "displayName", 'ChromelessEditorAppearance');
|
|
101
|
-
export { Editor as default };
|
|
98
|
+
export { Editor as default };
|
|
99
|
+
function RenderWithPluginState(_ref3) {
|
|
100
|
+
var renderChrome = _ref3.renderChrome;
|
|
101
|
+
var api = usePresetContext();
|
|
102
|
+
var _useSharedPluginState = useSharedPluginState(api, ['maxContentSize']),
|
|
103
|
+
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
104
|
+
return jsx(Fragment, null, renderChrome({
|
|
105
|
+
maxContentSize: maxContentSizeState
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
@@ -203,7 +203,7 @@ function RenderWithPluginState(_ref4) {
|
|
|
203
203
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
204
204
|
return jsx(Fragment, null, renderChrome({
|
|
205
205
|
maxContentSize: maxContentSizeState,
|
|
206
|
-
mediaState: mediaState
|
|
206
|
+
mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
|
|
207
207
|
}));
|
|
208
208
|
}
|
|
209
209
|
export var CommentEditorWithIntl = injectIntl(Editor);
|
|
@@ -14,7 +14,7 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
14
14
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
15
15
|
import { usePresetContext } from '../../../presets/context';
|
|
16
16
|
export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
17
|
-
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3;
|
|
17
|
+
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
|
|
18
18
|
var _useState = useState(false),
|
|
19
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
20
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -66,7 +66,8 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
66
66
|
editorView: props.editorView,
|
|
67
67
|
containerElement: props.containerElement,
|
|
68
68
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
69
|
-
featureFlags: props.featureFlags
|
|
69
|
+
featureFlags: props.featureFlags,
|
|
70
|
+
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
|
|
70
71
|
}) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
|
|
71
72
|
useEffect(function () {
|
|
72
73
|
if (twoLineEditorToolbar) {
|
|
@@ -3,13 +3,11 @@ var _templateObject;
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useCallback, forwardRef } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import { pluginKey as maxContentSizePluginKey } from '../../plugins/max-content-size';
|
|
7
|
-
import { mobileDimensionsPluginKey } from '../../plugins/mobile-dimensions/plugin-factory';
|
|
8
|
-
import WithPluginState from '../WithPluginState';
|
|
9
6
|
import WithFlash from '../WithFlash';
|
|
10
7
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
11
8
|
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
12
9
|
import { usePresetContext } from '../../presets/context';
|
|
10
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
11
|
var mobileEditor = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-height: 30px;\n width: 100%;\n max-width: inherit;\n box-sizing: border-box;\n word-wrap: break-word;\n\n div > .ProseMirror {\n outline: none;\n white-space: pre-wrap;\n padding: 0;\n margin: 0;\n }\n"])));
|
|
14
12
|
var ContentArea = createEditorContentStyle();
|
|
15
13
|
ContentArea.displayName = 'ContentArea';
|
|
@@ -21,6 +19,9 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
|
|
|
21
19
|
editorDisabled = _ref.editorDisabled,
|
|
22
20
|
featureFlags = _ref.featureFlags;
|
|
23
21
|
var api = usePresetContext();
|
|
22
|
+
var _useSharedPluginState = useSharedPluginState(api, ['maxContentSize', 'mobileDimensions']),
|
|
23
|
+
maxContentSizeState = _useSharedPluginState.maxContentSizeState,
|
|
24
|
+
mobileDimensionsState = _useSharedPluginState.mobileDimensionsState;
|
|
24
25
|
var render = useCallback(function (_ref2) {
|
|
25
26
|
var maxContentSize = _ref2.maxContentSize,
|
|
26
27
|
mobileDimensions = _ref2.mobileDimensions;
|
|
@@ -70,11 +71,8 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
|
|
|
70
71
|
className: "ak-editor-content-area"
|
|
71
72
|
}, children)))));
|
|
72
73
|
}, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags, api === null || api === void 0 || (_api$base2 = api.base) === null || _api$base2 === void 0 ? void 0 : _api$base2.sharedState]);
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
mobileDimensions: mobileDimensionsPluginKey
|
|
77
|
-
},
|
|
78
|
-
render: render
|
|
74
|
+
return render({
|
|
75
|
+
maxContentSize: maxContentSizeState,
|
|
76
|
+
mobileDimensions: mobileDimensionsState
|
|
79
77
|
});
|
|
80
78
|
});
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
+
import { DN50, N40A, N50A, N80A, R200, R300, R50 } from '@atlaskit/theme/colors';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
6
|
import { themed } from '@atlaskit/theme/components';
|
|
5
|
-
import {
|
|
7
|
+
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
8
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { expandClassNames } from './class-names';
|
|
9
|
+
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
10
11
|
var EXPAND_SELECTED_BACKGROUND = themed({
|
|
11
12
|
light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
|
|
12
13
|
dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
|
|
13
14
|
});
|
|
15
|
+
|
|
16
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
14
17
|
var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
|
|
15
18
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
|
|
16
19
|
light: "var(--ds-icon-subtle, ".concat(N80A, ")"),
|
|
@@ -39,6 +42,8 @@ var DANGER_STATE_BORDER_COLOR = themed({
|
|
|
39
42
|
var DANGER_STATE_BORDER_RADIUS = themed({
|
|
40
43
|
dark: '3px'
|
|
41
44
|
});
|
|
45
|
+
|
|
46
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
42
47
|
export var expandStyles = function expandStyles(props) {
|
|
43
48
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " > div {\n display: flex;\n }\n\n .", " {\n ", "\n overflow: hidden;\n cursor: pointer;\n box-sizing: border-box;\n\n td > & {\n margin-top: 0;\n }\n\n .", " svg {\n ", ";\n transform: rotate(90deg);\n }\n\n &.", ":not(.danger) {\n ", "\n\n ::after {\n // Custom background color and borders (for dark theme).\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n }\n }\n\n &.danger {\n background: ", ";\n border: ", ";\n border-color: ", ";\n border-radius: ", ";\n }\n }\n\n .ProseMirror\n > .", ",\n .", "\n > .", " {\n margin-left: -", "px;\n margin-right: -", "px;\n }\n\n .", " {\n ", "\n cursor: text;\n padding-top: 0px;\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", ";\n align-items: center;\n overflow: visible;\n }\n\n .", " {\n background: ", ";\n border-color: ", ";\n\n .", " {\n padding-top: ", ";\n }\n }\n\n .", " {\n width: 100%;\n }\n\n /* stylelint-disable property-no-unknown, value-keyword-case */\n .", ":(.", ") {\n .expand-content-wrapper {\n height: auto;\n }\n }\n /* stylelint-enable property-no-unknown, value-keyword-case */\n\n .", ":not(.", ") {\n .ak-editor-expand__content {\n position: absolute;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap;\n }\n\n .", " svg {\n ", ";\n transform: rotate(0deg);\n }\n\n &:not(.", "):not(.danger) {\n background: transparent;\n border-color: transparent;\n\n &:hover {\n border-color: ", ";\n background: ", ";\n }\n }\n }\n"])), expandClassNames.icon, expandClassNames.prefix, sharedExpandStyles.containerStyles({
|
|
44
49
|
expanded: false,
|
|
@@ -16,7 +16,7 @@ import { layoutStyles } from './layout';
|
|
|
16
16
|
import { panelStyles } from './panel';
|
|
17
17
|
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
18
18
|
import { extensionStyles } from '../../plugins/extension/ui/styles';
|
|
19
|
-
import { expandStyles } from '
|
|
19
|
+
import { expandStyles } from './expand';
|
|
20
20
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
21
21
|
import { findReplaceStyles } from '../../plugins/find-replace/styles';
|
|
22
22
|
import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
|
|
@@ -102,7 +102,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
102
102
|
jiraIssueCollectorScriptLoading: true,
|
|
103
103
|
showOptOutOption: false
|
|
104
104
|
});
|
|
105
|
-
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.
|
|
105
|
+
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.base) === null || _this$props$api === void 0 ? void 0 : _this$props$api.sharedState.currentState();
|
|
106
106
|
sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
107
107
|
contentId = basePluginState === null || basePluginState === void 0 || (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
108
108
|
tabId = window.sessionStorage['awc.tab.id'];
|
package/dist/esm/use-preset.js
CHANGED
|
@@ -35,7 +35,6 @@ import { usePresetContext } from './presets/context';
|
|
|
35
35
|
*/
|
|
36
36
|
export function usePreset(createPreset, dependencies) {
|
|
37
37
|
var editorApi = usePresetContext();
|
|
38
|
-
|
|
39
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
39
|
var preset = useMemo(createPreset, dependencies);
|
|
41
40
|
return {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "189.3.
|
|
2
|
+
export var version = "189.3.15";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { AnalyticsEventPayload } from './types';
|
|
3
|
-
import type { HigherOrderCommand } from '../../types/command';
|
|
4
3
|
/**
|
|
5
4
|
*
|
|
6
5
|
* @private
|
|
@@ -10,13 +9,3 @@ import type { HigherOrderCommand } from '../../types/command';
|
|
|
10
9
|
*
|
|
11
10
|
*/
|
|
12
11
|
export declare function addAnalytics(state: EditorState, tr: Transaction, payload: AnalyticsEventPayload, channel?: string): Transaction;
|
|
13
|
-
export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @private
|
|
17
|
-
* @deprecated
|
|
18
|
-
*
|
|
19
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
export declare function withAnalytics(payload: AnalyticsEventPayload | AnalyticsEventPayloadCallback, channel?: string): HigherOrderCommand;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
export type FindReplaceToolbarButtonWithStateProps = {
|
|
6
7
|
popupsBoundariesElement?: HTMLElement;
|
|
7
8
|
popupsMountPoint?: HTMLElement;
|
|
@@ -12,6 +13,7 @@ export type FindReplaceToolbarButtonWithStateProps = {
|
|
|
12
13
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
13
14
|
takeFullWidth?: boolean;
|
|
14
15
|
featureFlags: FeatureFlags;
|
|
16
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
15
17
|
};
|
|
16
|
-
declare const FindReplaceToolbarButtonWithState:
|
|
18
|
+
declare const FindReplaceToolbarButtonWithState: ({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, featureFlags, editorAnalyticsAPI, takeFullWidth, }: FindReplaceToolbarButtonWithStateProps) => JSX.Element | null;
|
|
17
19
|
export default FindReplaceToolbarButtonWithState;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { Command } from '../../types';
|
|
3
|
-
import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
export declare const activateWithAnalytics: ({ triggerMethod, }: {
|
|
3
|
+
import type { TRIGGER_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export declare const activateWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
5
5
|
triggerMethod: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR;
|
|
6
6
|
}) => Command;
|
|
7
|
-
export declare const findWithAnalytics: ({ editorView, containerElement, keyword, }: {
|
|
7
|
+
export declare const findWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ editorView, containerElement, keyword, }: {
|
|
8
8
|
editorView: EditorView;
|
|
9
9
|
containerElement: HTMLElement | null;
|
|
10
10
|
keyword?: string | undefined;
|
|
11
|
-
}) => Command;
|
|
12
|
-
export declare const findNextWithAnalytics: ({ triggerMethod, }: {
|
|
11
|
+
}) => import("@atlaskit/editor-common/types").Command;
|
|
12
|
+
export declare const findNextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
13
13
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
14
14
|
}) => Command;
|
|
15
|
-
export declare const findPrevWithAnalytics: ({ triggerMethod, }: {
|
|
15
|
+
export declare const findPrevWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
16
16
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
17
17
|
}) => Command;
|
|
18
|
-
export declare const replaceWithAnalytics: ({ triggerMethod, replaceText, }: {
|
|
18
|
+
export declare const replaceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, replaceText, }: {
|
|
19
19
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
20
20
|
replaceText: string;
|
|
21
21
|
}) => Command;
|
|
22
|
-
export declare const replaceAllWithAnalytics: ({ replaceText
|
|
22
|
+
export declare const replaceAllWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ replaceText }: {
|
|
23
23
|
replaceText: string;
|
|
24
24
|
}) => Command;
|
|
25
|
-
export declare const cancelSearchWithAnalytics: ({ triggerMethod, }: {
|
|
25
|
+
export declare const cancelSearchWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
26
26
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
|
|
27
27
|
}) => Command;
|
|
@@ -1,11 +1,13 @@
|
|
|
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
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
4
|
type Config = {
|
|
4
5
|
takeFullWidth: boolean;
|
|
5
6
|
twoLineEditorToolbar: boolean;
|
|
6
7
|
};
|
|
7
|
-
export
|
|
8
|
+
export type FindReplacePlugin = NextEditorPlugin<'findReplace', {
|
|
8
9
|
pluginConfiguration: Config;
|
|
9
|
-
dependencies: [FeatureFlagsPlugin];
|
|
10
|
+
dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
|
|
10
11
|
}>;
|
|
12
|
+
export declare const findReplacePlugin: FindReplacePlugin;
|
|
11
13
|
export default findReplacePlugin;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
declare const keymapPlugin: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<any>;
|
|
3
4
|
export default keymapPlugin;
|
|
@@ -5,7 +5,6 @@ export { default as insertBlockPlugin } from './insert-block';
|
|
|
5
5
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
6
6
|
export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
|
|
7
7
|
export { default as macroPlugin } from './macro';
|
|
8
|
-
export { default as maxContentSizePlugin } from './max-content-size';
|
|
9
8
|
export { default as pastePlugin } from './paste';
|
|
10
9
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
11
10
|
export { default as breakoutPlugin } from './breakout';
|
|
@@ -16,7 +15,6 @@ export { default as annotationPlugin } from './annotation';
|
|
|
16
15
|
export { default as analyticsPlugin } from './analytics';
|
|
17
16
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
18
17
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
19
|
-
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
20
18
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
21
19
|
export { default as findReplacePlugin } from './find-replace';
|
|
22
20
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
@@ -17,7 +17,7 @@ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
|
17
17
|
import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
18
18
|
import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
|
|
19
19
|
import type { PlaceholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
|
|
20
|
-
import type { ExpandPlugin } from '
|
|
20
|
+
import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand';
|
|
21
21
|
export type InsertBlockPluginDependencies = [
|
|
22
22
|
FeatureFlagsPlugin,
|
|
23
23
|
TypeAheadPlugin,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
|
|
2
|
+
import type { MobileDimensionsPluginState } from './types';
|
|
3
|
+
export type MobileDimensionsPlugin = NextEditorPlugin<'mobileDimensions', {
|
|
4
|
+
sharedState: MobileDimensionsPluginState | undefined;
|
|
5
|
+
}>;
|
|
6
|
+
declare const mobileDimensionsPlugin: MobileDimensionsPlugin;
|
|
3
7
|
export default mobileDimensionsPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { PublicPluginAPI, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
export type SetEditorAPI = (editorApi: PublicPluginAPI<any>) => void;
|
|
4
4
|
export interface EditorAPIContextType {
|
|
5
5
|
editorApi?: PublicPluginAPI<any>;
|
|
@@ -10,6 +10,6 @@ interface EditorAPIProviderProps {
|
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
}
|
|
12
12
|
export declare const PresetContextProvider: ({ children }: EditorAPIProviderProps) => JSX.Element;
|
|
13
|
-
export declare
|
|
13
|
+
export declare function usePresetContext<Plugins extends OptionalPlugin<NextEditorPlugin<any, any>>[]>(): PublicPluginAPI<Plugins>;
|
|
14
14
|
export declare const useSetPresetContext: () => SetEditorAPI | undefined;
|
|
15
15
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorProps } from '../types';
|
|
3
4
|
import type { DefaultPresetPluginOptions } from './default';
|
|
4
5
|
import type { EditorPresetProps } from './types';
|
|
5
6
|
import type { EditorSharedPropsWithPlugins, EditorPluginFeatureProps, EditorProviderProps } from '../types/editor-props';
|
|
@@ -18,4 +19,8 @@ type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & Edi
|
|
|
18
19
|
* @returns a full featured preset configured according to the provided props - basis for create-plugins-list
|
|
19
20
|
*/
|
|
20
21
|
export default function createUniversalPreset(appearance: EditorAppearance | undefined, props: UniversalPresetProps, featureFlags: FeatureFlags, prevAppearance?: EditorAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetBuilder<any, any>;
|
|
22
|
+
interface ExpandEditorProps {
|
|
23
|
+
allowExpand?: EditorProps['allowExpand'];
|
|
24
|
+
}
|
|
25
|
+
export declare function isExpandInsertionEnabled({ allowExpand }: ExpandEditorProps): boolean;
|
|
21
26
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { EditorAppearanceComponentProps } from '../../types';
|
|
4
|
+
import type { EditorAppearanceComponentProps } from '../../types';
|
|
5
5
|
export default class Editor extends React.Component<EditorAppearanceComponentProps, any> {
|
|
6
6
|
static displayName: string;
|
|
7
7
|
private appearance;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const expandStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { AnalyticsEventPayload } from './types';
|
|
3
|
-
import type { HigherOrderCommand } from '../../types/command';
|
|
4
3
|
/**
|
|
5
4
|
*
|
|
6
5
|
* @private
|
|
@@ -10,13 +9,3 @@ import type { HigherOrderCommand } from '../../types/command';
|
|
|
10
9
|
*
|
|
11
10
|
*/
|
|
12
11
|
export declare function addAnalytics(state: EditorState, tr: Transaction, payload: AnalyticsEventPayload, channel?: string): Transaction;
|
|
13
|
-
export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @private
|
|
17
|
-
* @deprecated
|
|
18
|
-
*
|
|
19
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
export declare function withAnalytics(payload: AnalyticsEventPayload | AnalyticsEventPayloadCallback, channel?: string): HigherOrderCommand;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
export type FindReplaceToolbarButtonWithStateProps = {
|
|
6
7
|
popupsBoundariesElement?: HTMLElement;
|
|
7
8
|
popupsMountPoint?: HTMLElement;
|
|
@@ -12,6 +13,7 @@ export type FindReplaceToolbarButtonWithStateProps = {
|
|
|
12
13
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
13
14
|
takeFullWidth?: boolean;
|
|
14
15
|
featureFlags: FeatureFlags;
|
|
16
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
15
17
|
};
|
|
16
|
-
declare const FindReplaceToolbarButtonWithState:
|
|
18
|
+
declare const FindReplaceToolbarButtonWithState: ({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, featureFlags, editorAnalyticsAPI, takeFullWidth, }: FindReplaceToolbarButtonWithStateProps) => JSX.Element | null;
|
|
17
19
|
export default FindReplaceToolbarButtonWithState;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { Command } from '../../types';
|
|
3
|
-
import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
export declare const activateWithAnalytics: ({ triggerMethod, }: {
|
|
3
|
+
import type { TRIGGER_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export declare const activateWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
5
5
|
triggerMethod: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR;
|
|
6
6
|
}) => Command;
|
|
7
|
-
export declare const findWithAnalytics: ({ editorView, containerElement, keyword, }: {
|
|
7
|
+
export declare const findWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ editorView, containerElement, keyword, }: {
|
|
8
8
|
editorView: EditorView;
|
|
9
9
|
containerElement: HTMLElement | null;
|
|
10
10
|
keyword?: string | undefined;
|
|
11
|
-
}) => Command;
|
|
12
|
-
export declare const findNextWithAnalytics: ({ triggerMethod, }: {
|
|
11
|
+
}) => import("@atlaskit/editor-common/types").Command;
|
|
12
|
+
export declare const findNextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
13
13
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
14
14
|
}) => Command;
|
|
15
|
-
export declare const findPrevWithAnalytics: ({ triggerMethod, }: {
|
|
15
|
+
export declare const findPrevWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
16
16
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
17
17
|
}) => Command;
|
|
18
|
-
export declare const replaceWithAnalytics: ({ triggerMethod, replaceText, }: {
|
|
18
|
+
export declare const replaceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, replaceText, }: {
|
|
19
19
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
20
20
|
replaceText: string;
|
|
21
21
|
}) => Command;
|
|
22
|
-
export declare const replaceAllWithAnalytics: ({ replaceText
|
|
22
|
+
export declare const replaceAllWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ replaceText }: {
|
|
23
23
|
replaceText: string;
|
|
24
24
|
}) => Command;
|
|
25
|
-
export declare const cancelSearchWithAnalytics: ({ triggerMethod, }: {
|
|
25
|
+
export declare const cancelSearchWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
26
26
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
|
|
27
27
|
}) => Command;
|