@atlaskit/editor-plugin-annotation 1.26.2 → 1.26.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 1.26.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#177868](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/177868)
8
+ [`431c4ab75f0c5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/431c4ab75f0c5) -
9
+ [ux] Disable the annotation selection toolbar while offline.
10
+
11
+ ## 1.26.3
12
+
13
+ ### Patch Changes
14
+
15
+ - [#177132](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/177132)
16
+ [`089d1f8b617d7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/089d1f8b617d7) -
17
+ [ux] Shows title next to comment icon on the Selection toolbar when page is in View only mode and
18
+ Contextual toolbar is enabled
19
+
3
20
  ## 1.26.2
4
21
 
5
22
  ### Patch Changes
@@ -7,22 +7,21 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getBlockAnnotationViewClassname = exports.getAnnotationViewClassname = exports.AnnotationNodeView = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
11
10
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
11
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
13
  var _react = _interopRequireDefault(require("react"));
14
14
  var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
15
15
  var _styles = require("@atlaskit/editor-common/styles");
16
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
16
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
17
17
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
18
18
  var AnnotationNodeView = exports.AnnotationNodeView = /*#__PURE__*/function (_ReactNodeView) {
19
- (0, _inherits2.default)(AnnotationNodeView, _ReactNodeView);
20
- var _super = _createSuper(AnnotationNodeView);
21
19
  function AnnotationNodeView() {
22
20
  (0, _classCallCheck2.default)(this, AnnotationNodeView);
23
- return _super.apply(this, arguments);
21
+ return _callSuper(this, AnnotationNodeView, arguments);
24
22
  }
25
- (0, _createClass2.default)(AnnotationNodeView, [{
23
+ (0, _inherits2.default)(AnnotationNodeView, _ReactNodeView);
24
+ return (0, _createClass2.default)(AnnotationNodeView, [{
26
25
  key: "createDomRef",
27
26
  value: function createDomRef() {
28
27
  return document.createElement('span');
@@ -49,7 +48,6 @@ var AnnotationNodeView = exports.AnnotationNodeView = /*#__PURE__*/function (_Re
49
48
  );
50
49
  }
51
50
  }]);
52
- return AnnotationNodeView;
53
51
  }(_reactNodeView.default);
54
52
  var getAnnotationViewClassname = exports.getAnnotationViewClassname = function getAnnotationViewClassname(isUnresolved, hasFocus, isHovered) {
55
53
  if (!isUnresolved) {
@@ -51,6 +51,7 @@ var createSpotlightConfig = function createSpotlightConfig(_ref) {
51
51
  };
52
52
  var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsAPI) {
53
53
  return function (_ref2) {
54
+ var _api$editorViewMode, _api$connectivity;
54
55
  var state = _ref2.state,
55
56
  intl = _ref2.intl,
56
57
  _ref2$isToolbarAbove = _ref2.isToolbarAbove,
@@ -68,12 +69,13 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
68
69
  }
69
70
  var createCommentMessage = intl.formatMessage(_messages.annotationMessages.createComment);
70
71
  var commentDisabledMessage = intl.formatMessage((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? _messages.annotationMessages.createCommentDisabled : _messages.annotationMessages.createCommentInvalid);
72
+ var isViewMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view';
71
73
  var createComment = {
72
74
  type: 'button',
73
- showTitle: (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
75
+ showTitle: !isViewMode && (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
74
76
  exposure: true
75
77
  }) ? false : true,
76
- disabled: selectionValid === _types.AnnotationSelectionType.DISABLED,
78
+ disabled: selectionValid === _types.AnnotationSelectionType.DISABLED || (api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.sharedState) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.currentState()) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.mode) === 'offline',
77
79
  testId: _types.AnnotationTestIds.floatingToolbarCreateButton,
78
80
  icon: _comment.default,
79
81
  iconFallback: _comment2.default,
@@ -7,21 +7,20 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.AnnotationViewWrapper = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
11
10
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
11
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
13
  var _react = _interopRequireDefault(require("react"));
14
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
14
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
15
15
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
16
16
  // eslint-disable-next-line @repo/internal/react/no-class-components
17
17
  var AnnotationViewWrapper = exports.AnnotationViewWrapper = /*#__PURE__*/function (_React$PureComponent) {
18
- (0, _inherits2.default)(AnnotationViewWrapper, _React$PureComponent);
19
- var _super = _createSuper(AnnotationViewWrapper);
20
18
  function AnnotationViewWrapper() {
21
19
  (0, _classCallCheck2.default)(this, AnnotationViewWrapper);
22
- return _super.apply(this, arguments);
20
+ return _callSuper(this, AnnotationViewWrapper, arguments);
23
21
  }
24
- (0, _createClass2.default)(AnnotationViewWrapper, [{
22
+ (0, _inherits2.default)(AnnotationViewWrapper, _React$PureComponent);
23
+ return (0, _createClass2.default)(AnnotationViewWrapper, [{
25
24
  key: "componentDidMount",
26
25
  value: function componentDidMount() {
27
26
  var onViewed = this.props.onViewed;
@@ -35,5 +34,4 @@ var AnnotationViewWrapper = exports.AnnotationViewWrapper = /*#__PURE__*/functio
35
34
  return this.props.children;
36
35
  }
37
36
  }]);
38
- return AnnotationViewWrapper;
39
37
  }(_react.default.PureComponent);
@@ -48,6 +48,7 @@ export const buildToolbar = editorAnalyticsAPI => ({
48
48
  _supportedNodes = [],
49
49
  api
50
50
  }) => {
51
+ var _api$editorViewMode, _api$editorViewMode$s, _api$connectivity, _api$connectivity$sha, _api$connectivity$sha2;
51
52
  const {
52
53
  schema
53
54
  } = state;
@@ -60,12 +61,13 @@ export const buildToolbar = editorAnalyticsAPI => ({
60
61
  }
61
62
  const createCommentMessage = intl.formatMessage(annotationMessages.createComment);
62
63
  const commentDisabledMessage = intl.formatMessage(fg('editor_inline_comments_on_inline_nodes') ? annotationMessages.createCommentDisabled : annotationMessages.createCommentInvalid);
64
+ const isViewMode = (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'view';
63
65
  const createComment = {
64
66
  type: 'button',
65
- showTitle: editorExperiment('contextual_formatting_toolbar', true, {
67
+ showTitle: !isViewMode && editorExperiment('contextual_formatting_toolbar', true, {
66
68
  exposure: true
67
69
  }) ? false : true,
68
- disabled: selectionValid === AnnotationSelectionType.DISABLED,
70
+ disabled: selectionValid === AnnotationSelectionType.DISABLED || (api === null || api === void 0 ? void 0 : (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 ? void 0 : (_api$connectivity$sha = _api$connectivity.sharedState) === null || _api$connectivity$sha === void 0 ? void 0 : (_api$connectivity$sha2 = _api$connectivity$sha.currentState()) === null || _api$connectivity$sha2 === void 0 ? void 0 : _api$connectivity$sha2.mode) === 'offline',
69
71
  testId: AnnotationTestIds.floatingToolbarCreateButton,
70
72
  icon: CommentIcon,
71
73
  iconFallback: LegacyCommentIcon,
@@ -1,21 +1,20 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
9
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
10
10
  import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
11
11
  export var AnnotationNodeView = /*#__PURE__*/function (_ReactNodeView) {
12
- _inherits(AnnotationNodeView, _ReactNodeView);
13
- var _super = _createSuper(AnnotationNodeView);
14
12
  function AnnotationNodeView() {
15
13
  _classCallCheck(this, AnnotationNodeView);
16
- return _super.apply(this, arguments);
14
+ return _callSuper(this, AnnotationNodeView, arguments);
17
15
  }
18
- _createClass(AnnotationNodeView, [{
16
+ _inherits(AnnotationNodeView, _ReactNodeView);
17
+ return _createClass(AnnotationNodeView, [{
19
18
  key: "createDomRef",
20
19
  value: function createDomRef() {
21
20
  return document.createElement('span');
@@ -42,7 +41,6 @@ export var AnnotationNodeView = /*#__PURE__*/function (_ReactNodeView) {
42
41
  );
43
42
  }
44
43
  }]);
45
- return AnnotationNodeView;
46
44
  }(ReactNodeView);
47
45
  export var getAnnotationViewClassname = function getAnnotationViewClassname(isUnresolved, hasFocus, isHovered) {
48
46
  if (!isUnresolved) {
@@ -44,6 +44,7 @@ var createSpotlightConfig = function createSpotlightConfig(_ref) {
44
44
  };
45
45
  export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
46
46
  return function (_ref2) {
47
+ var _api$editorViewMode, _api$connectivity;
47
48
  var state = _ref2.state,
48
49
  intl = _ref2.intl,
49
50
  _ref2$isToolbarAbove = _ref2.isToolbarAbove,
@@ -61,12 +62,13 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
61
62
  }
62
63
  var createCommentMessage = intl.formatMessage(annotationMessages.createComment);
63
64
  var commentDisabledMessage = intl.formatMessage(fg('editor_inline_comments_on_inline_nodes') ? annotationMessages.createCommentDisabled : annotationMessages.createCommentInvalid);
65
+ var isViewMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view';
64
66
  var createComment = {
65
67
  type: 'button',
66
- showTitle: editorExperiment('contextual_formatting_toolbar', true, {
68
+ showTitle: !isViewMode && editorExperiment('contextual_formatting_toolbar', true, {
67
69
  exposure: true
68
70
  }) ? false : true,
69
- disabled: selectionValid === AnnotationSelectionType.DISABLED,
71
+ disabled: selectionValid === AnnotationSelectionType.DISABLED || (api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.sharedState) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.currentState()) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.mode) === 'offline',
70
72
  testId: AnnotationTestIds.floatingToolbarCreateButton,
71
73
  icon: CommentIcon,
72
74
  iconFallback: LegacyCommentIcon,
@@ -1,20 +1,19 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
9
  // eslint-disable-next-line @repo/internal/react/no-class-components
10
10
  export var AnnotationViewWrapper = /*#__PURE__*/function (_React$PureComponent) {
11
- _inherits(AnnotationViewWrapper, _React$PureComponent);
12
- var _super = _createSuper(AnnotationViewWrapper);
13
11
  function AnnotationViewWrapper() {
14
12
  _classCallCheck(this, AnnotationViewWrapper);
15
- return _super.apply(this, arguments);
13
+ return _callSuper(this, AnnotationViewWrapper, arguments);
16
14
  }
17
- _createClass(AnnotationViewWrapper, [{
15
+ _inherits(AnnotationViewWrapper, _React$PureComponent);
16
+ return _createClass(AnnotationViewWrapper, [{
18
17
  key: "componentDidMount",
19
18
  value: function componentDidMount() {
20
19
  var onViewed = this.props.onViewed;
@@ -28,5 +27,4 @@ export var AnnotationViewWrapper = /*#__PURE__*/function (_React$PureComponent)
28
27
  return this.props.children;
29
28
  }
30
29
  }]);
31
- return AnnotationViewWrapper;
32
30
  }(React.PureComponent);
@@ -1,5 +1,7 @@
1
1
  import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
+ import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
4
+ import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
3
5
  import type { EditorViewModeEffectsPlugin } from '@atlaskit/editor-plugin-editor-viewmode-effects';
4
6
  import type { EngagementPlatformPlugin } from '@atlaskit/editor-plugin-engagement-platform';
5
7
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
@@ -18,8 +20,10 @@ export type AnnotationPlugin = NextEditorPlugin<'annotation', {
18
20
  dependencies: [
19
21
  OptionalPlugin<AnalyticsPlugin>,
20
22
  OptionalPlugin<EditorViewModeEffectsPlugin>,
23
+ OptionalPlugin<EditorViewModePlugin>,
21
24
  OptionalPlugin<FeatureFlagsPlugin>,
22
- OptionalPlugin<EngagementPlatformPlugin>
25
+ OptionalPlugin<EngagementPlatformPlugin>,
26
+ OptionalPlugin<ConnectivityPlugin>
23
27
  ];
24
28
  actions: {
25
29
  stripNonExistingAnnotations: StripNonExistingAnnotations;
@@ -86,7 +86,18 @@ declare const _default: {
86
86
  actions: {
87
87
  applyViewModeStepAt: (tr: Transaction) => boolean;
88
88
  };
89
- }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
89
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
90
+ sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
91
+ dependencies: [];
92
+ pluginConfiguration?: {
93
+ mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
94
+ } | undefined;
95
+ commands: {
96
+ updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
97
+ };
98
+ }, {
99
+ mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
100
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
90
101
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
91
102
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
92
103
  }, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"engagementPlatform", {
@@ -109,7 +120,11 @@ declare const _default: {
109
120
  actions: EditorAnalyticsAPI;
110
121
  }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
111
122
  sharedState: import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginState;
112
- }, import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginConfig>>];
123
+ }, import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginConfig>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
124
+ sharedState: {
125
+ mode: "offline" | "online";
126
+ };
127
+ }, undefined>>];
113
128
  actions: {
114
129
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: EditorState) => boolean | undefined;
115
130
  setInlineCommentDraftState: (drafting: boolean, inputMethod: InlineCommentInputMethod, targetType?: import("../types").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
@@ -1,5 +1,7 @@
1
1
  import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
+ import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
4
+ import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
3
5
  import type { EditorViewModeEffectsPlugin } from '@atlaskit/editor-plugin-editor-viewmode-effects';
4
6
  import type { EngagementPlatformPlugin } from '@atlaskit/editor-plugin-engagement-platform';
5
7
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
@@ -18,8 +20,10 @@ export type AnnotationPlugin = NextEditorPlugin<'annotation', {
18
20
  dependencies: [
19
21
  OptionalPlugin<AnalyticsPlugin>,
20
22
  OptionalPlugin<EditorViewModeEffectsPlugin>,
23
+ OptionalPlugin<EditorViewModePlugin>,
21
24
  OptionalPlugin<FeatureFlagsPlugin>,
22
- OptionalPlugin<EngagementPlatformPlugin>
25
+ OptionalPlugin<EngagementPlatformPlugin>,
26
+ OptionalPlugin<ConnectivityPlugin>
23
27
  ];
24
28
  actions: {
25
29
  stripNonExistingAnnotations: StripNonExistingAnnotations;
@@ -102,6 +102,19 @@ declare const _default: {
102
102
  applyViewModeStepAt: (tr: Transaction) => boolean;
103
103
  };
104
104
  }, undefined>>,
105
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
106
+ sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
107
+ dependencies: [
108
+ ];
109
+ pluginConfiguration?: {
110
+ mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
111
+ } | undefined;
112
+ commands: {
113
+ updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
114
+ };
115
+ }, {
116
+ mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
117
+ } | undefined>>,
105
118
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
106
119
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
107
120
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
@@ -130,7 +143,12 @@ declare const _default: {
130
143
  }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
131
144
  ];
132
145
  sharedState: import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginState;
133
- }, import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginConfig>>
146
+ }, import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginConfig>>,
147
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
148
+ sharedState: {
149
+ mode: "offline" | "online";
150
+ };
151
+ }, undefined>>
134
152
  ];
135
153
  actions: {
136
154
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: EditorState) => boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "1.26.2",
3
+ "version": "1.26.4",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,8 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^96.3.0",
35
+ "@atlaskit/editor-common": "^96.5.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
+ "@atlaskit/editor-plugin-connectivity": "^1.0.0",
37
38
  "@atlaskit/editor-plugin-editor-viewmode-effects": "^1.1.0",
38
39
  "@atlaskit/editor-plugin-engagement-platform": "^2.1.0",
39
40
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
@@ -41,7 +42,7 @@
41
42
  "@atlaskit/icon": "^23.1.0",
42
43
  "@atlaskit/onboarding": "^12.2.0",
43
44
  "@atlaskit/platform-feature-flags": "^0.3.0",
44
- "@atlaskit/tmp-editor-statsig": "^2.23.0",
45
+ "@atlaskit/tmp-editor-statsig": "^2.26.0",
45
46
  "@babel/runtime": "^7.0.0"
46
47
  },
47
48
  "peerDependencies": {