@atlaskit/editor-plugin-annotation 7.1.11 → 7.1.12
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/annotationPlugin.js +1 -1
- package/dist/cjs/pm-plugins/toolbar.js +2 -5
- package/dist/es2019/annotationPlugin.js +1 -1
- package/dist/es2019/pm-plugins/toolbar.js +2 -5
- package/dist/esm/annotationPlugin.js +1 -1
- package/dist/esm/pm-plugins/toolbar.js +2 -5
- package/dist/types/pm-plugins/toolbar.d.ts +1 -2
- package/dist/types-ts4.5/pm-plugins/toolbar.d.ts +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 7.1.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7ef3027df8198`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7ef3027df8198) -
|
|
8
|
+
remove platform_editor_lovability_user_intent experiment
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 7.1.11
|
|
4
12
|
|
|
5
13
|
### 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
|
|
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
|
|
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) {
|
|
@@ -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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
3
|
+
"version": "7.1.12",
|
|
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.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^25.6.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.
|
|
47
|
+
"@atlaskit/editor-common": "^111.15.0",
|
|
48
48
|
"react": "^18.2.0",
|
|
49
49
|
"react-dom": "^18.2.0"
|
|
50
50
|
},
|