@atlaskit/editor-plugin-annotation 7.1.11 → 7.1.13

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,19 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 7.1.13
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 7.1.12
10
+
11
+ ### Patch Changes
12
+
13
+ - [`7ef3027df8198`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7ef3027df8198) -
14
+ remove platform_editor_lovability_user_intent experiment
15
+ - Updated dependencies
16
+
3
17
  ## 7.1.11
4
18
 
5
19
  ### Patch Changes
@@ -92,7 +92,7 @@ var annotationPlugin = exports.annotationPlugin = function annotationPlugin(_ref
92
92
  state: state,
93
93
  bookmark: bookmark
94
94
  })) {
95
- return (0, _toolbar.buildSuppressedToolbar)(state, api);
95
+ return (0, _toolbar.buildSuppressedToolbar)(state);
96
96
  }
97
97
  },
98
98
  selectionToolbar: function selectionToolbar(state, intl) {
@@ -14,7 +14,6 @@ var _utils = require("@atlaskit/editor-common/utils");
14
14
  var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
15
15
  var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
16
16
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
17
  var _editorCommands = require("../editor-commands");
19
18
  var _types = require("../types");
20
19
  var _utils2 = require("./utils");
@@ -50,13 +49,11 @@ var shouldSuppressFloatingToolbar = exports.shouldSuppressFloatingToolbar = func
50
49
  var isSelectionMatchingBookmark = resolvedBookmark.to === tr.selection.to && resolvedBookmark.from === tr.selection.from;
51
50
  return isSelectionMatchingBookmark;
52
51
  };
53
- var buildSuppressedToolbar = exports.buildSuppressedToolbar = function buildSuppressedToolbar(state, api) {
54
- var userIntentEnabled = Boolean((api === null || api === void 0 ? void 0 : api.userIntent) && (0, _expValEquals.expValEquals)('platform_editor_lovability_user_intent', 'isEnabled', true));
52
+ var buildSuppressedToolbar = exports.buildSuppressedToolbar = function buildSuppressedToolbar(state) {
55
53
  return {
56
54
  items: [],
57
55
  nodeType: getValidNodes(state),
58
- title: 'Annotation suppressed toolbar',
59
- __suppressAllToolbars: userIntentEnabled ? undefined : true
56
+ title: 'Annotation suppressed toolbar'
60
57
  };
61
58
  };
62
59
  var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsAPI) {
@@ -82,7 +82,7 @@ export const annotationPlugin = ({
82
82
  state,
83
83
  bookmark
84
84
  })) {
85
- return buildSuppressedToolbar(state, api);
85
+ return buildSuppressedToolbar(state);
86
86
  }
87
87
  },
88
88
  selectionToolbar(state, intl) {
@@ -7,7 +7,6 @@ import { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHe
7
7
  import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
8
8
  import CommentIcon from '@atlaskit/icon/core/comment';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
10
  import { setInlineCommentDraftState } from '../editor-commands';
12
11
  import { AnnotationSelectionType, AnnotationTestIds } from '../types';
13
12
  import { getPluginState, isSelectionValid, resolveDraftBookmark } from './utils';
@@ -50,13 +49,11 @@ export const shouldSuppressFloatingToolbar = ({
50
49
  const isSelectionMatchingBookmark = resolvedBookmark.to === tr.selection.to && resolvedBookmark.from === tr.selection.from;
51
50
  return isSelectionMatchingBookmark;
52
51
  };
53
- export const buildSuppressedToolbar = (state, api) => {
54
- const userIntentEnabled = Boolean((api === null || api === void 0 ? void 0 : api.userIntent) && expValEquals('platform_editor_lovability_user_intent', 'isEnabled', true));
52
+ export const buildSuppressedToolbar = state => {
55
53
  return {
56
54
  items: [],
57
55
  nodeType: getValidNodes(state),
58
- title: 'Annotation suppressed toolbar',
59
- __suppressAllToolbars: userIntentEnabled ? undefined : true
56
+ title: 'Annotation suppressed toolbar'
60
57
  };
61
58
  };
62
59
  export const buildToolbar = editorAnalyticsAPI => ({
@@ -85,7 +85,7 @@ export var annotationPlugin = function annotationPlugin(_ref) {
85
85
  state: state,
86
86
  bookmark: bookmark
87
87
  })) {
88
- return buildSuppressedToolbar(state, api);
88
+ return buildSuppressedToolbar(state);
89
89
  }
90
90
  },
91
91
  selectionToolbar: function selectionToolbar(state, intl) {
@@ -7,7 +7,6 @@ import { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHe
7
7
  import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
8
8
  import CommentIcon from '@atlaskit/icon/core/comment';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
10
  import { setInlineCommentDraftState } from '../editor-commands';
12
11
  import { AnnotationSelectionType, AnnotationTestIds } from '../types';
13
12
  import { getPluginState, isSelectionValid, resolveDraftBookmark } from './utils';
@@ -43,13 +42,11 @@ export var shouldSuppressFloatingToolbar = function shouldSuppressFloatingToolba
43
42
  var isSelectionMatchingBookmark = resolvedBookmark.to === tr.selection.to && resolvedBookmark.from === tr.selection.from;
44
43
  return isSelectionMatchingBookmark;
45
44
  };
46
- export var buildSuppressedToolbar = function buildSuppressedToolbar(state, api) {
47
- var userIntentEnabled = Boolean((api === null || api === void 0 ? void 0 : api.userIntent) && expValEquals('platform_editor_lovability_user_intent', 'isEnabled', true));
45
+ export var buildSuppressedToolbar = function buildSuppressedToolbar(state) {
48
46
  return {
49
47
  items: [],
50
48
  nodeType: getValidNodes(state),
51
- title: 'Annotation suppressed toolbar',
52
- __suppressAllToolbars: userIntentEnabled ? undefined : true
49
+ title: 'Annotation suppressed toolbar'
53
50
  };
54
51
  };
55
52
  export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
@@ -35,11 +35,10 @@ type ShouldSuppressFloatingToolbarOptions = {
35
35
  * @example
36
36
  */
37
37
  export declare const shouldSuppressFloatingToolbar: ({ state, bookmark, }: ShouldSuppressFloatingToolbarOptions) => boolean;
38
- export declare const buildSuppressedToolbar: (state: EditorState, api?: ExtractInjectionAPI<AnnotationPlugin>) => {
38
+ export declare const buildSuppressedToolbar: (state: EditorState) => {
39
39
  items: never[];
40
40
  nodeType: NodeType[];
41
41
  title: string;
42
- __suppressAllToolbars: boolean | undefined;
43
42
  };
44
43
  export declare const buildToolbar: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ state, intl, isToolbarAbove, _supportedNodes, api, createCommentExperience, annotationManager, onCommentButtonMount, getCanAddComments, contentType, }: BuildToolbarOptions) => {
45
44
  items: FloatingToolbarButton<Command>[];
@@ -35,11 +35,10 @@ type ShouldSuppressFloatingToolbarOptions = {
35
35
  * @example
36
36
  */
37
37
  export declare const shouldSuppressFloatingToolbar: ({ state, bookmark, }: ShouldSuppressFloatingToolbarOptions) => boolean;
38
- export declare const buildSuppressedToolbar: (state: EditorState, api?: ExtractInjectionAPI<AnnotationPlugin>) => {
38
+ export declare const buildSuppressedToolbar: (state: EditorState) => {
39
39
  items: never[];
40
40
  nodeType: NodeType[];
41
41
  title: string;
42
- __suppressAllToolbars: boolean | undefined;
43
42
  };
44
43
  export declare const buildToolbar: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ state, intl, isToolbarAbove, _supportedNodes, api, createCommentExperience, annotationManager, onCommentButtonMount, getCanAddComments, contentType, }: BuildToolbarOptions) => {
45
44
  items: FloatingToolbarButton<Command>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "7.1.11",
3
+ "version": "7.1.13",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,12 +39,12 @@
39
39
  "@atlaskit/editor-toolbar-model": "^0.3.0",
40
40
  "@atlaskit/icon": "^31.0.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^25.0.0",
42
+ "@atlaskit/tmp-editor-statsig": "^26.0.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "react-intl-next": "npm:react-intl@^5.18.1"
45
45
  },
46
46
  "peerDependencies": {
47
- "@atlaskit/editor-common": "^111.12.0",
47
+ "@atlaskit/editor-common": "^111.16.0",
48
48
  "react": "^18.2.0",
49
49
  "react-dom": "^18.2.0"
50
50
  },