@atlaskit/editor-plugin-annotation 23.0.1 → 24.0.0
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
|
+
## 24.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 23.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d61565965ce82`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d61565965ce82) -
|
|
14
|
+
Clean up experiment `platform_editor_annotations_sync_on_docchange`
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 23.0.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -9,20 +9,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
14
13
|
var _utils2 = require("./utils");
|
|
15
14
|
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; }
|
|
16
15
|
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) { (0, _defineProperty2.default)(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; }
|
|
17
|
-
var handleDocChanged = function handleDocChanged(tr, prevPluginState) {
|
|
18
|
-
if (!tr.getMeta('replaceDocument')) {
|
|
19
|
-
return getSelectionChangedHandler(false)(tr, prevPluginState);
|
|
20
|
-
}
|
|
21
|
-
return _objectSpread(_objectSpread({}, prevPluginState), {}, {
|
|
22
|
-
dirtyAnnotations: true
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
|
|
26
16
|
/**
|
|
27
17
|
* Creates a handleDocChanged function with its own deleted annotations cache.
|
|
28
18
|
* This ensures each editor instance has its own cache, avoiding cross-contamination.
|
|
@@ -208,16 +198,9 @@ var getSelectionChangedHandler = function getSelectionChangedHandler(reopenComme
|
|
|
208
198
|
|
|
209
199
|
// Create the handler with cache once at module level
|
|
210
200
|
var handleDocChangedWithSync = createHandleDocChanged();
|
|
211
|
-
var getDocChangedHandler = function getDocChangedHandler(tr, prevPluginState) {
|
|
212
|
-
// Check feature flag at runtime to support test variants
|
|
213
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_annotations_sync_on_docchange', 'isEnabled', true)) {
|
|
214
|
-
return handleDocChangedWithSync(tr, prevPluginState);
|
|
215
|
-
}
|
|
216
|
-
return handleDocChanged(tr, prevPluginState);
|
|
217
|
-
};
|
|
218
201
|
var dest = (0, _utils.pluginFactory)(_utils2.inlineCommentPluginKey, _reducer.default, {
|
|
219
202
|
onSelectionChanged: getSelectionChangedHandler(true),
|
|
220
|
-
onDocChanged:
|
|
203
|
+
onDocChanged: handleDocChangedWithSync,
|
|
221
204
|
mapping: function mapping(tr, pluginState, editorState) {
|
|
222
205
|
var draftDecorationSet = pluginState.draftDecorationSet,
|
|
223
206
|
bookmark = pluginState.bookmark;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import reducer from './reducer';
|
|
6
5
|
import { decorationKey, findAnnotationsInSelection, inlineCommentPluginKey, isBlockNodeAnnotationsSelected, isSelectedAnnotationsChanged } from './utils';
|
|
7
|
-
const handleDocChanged = (tr, prevPluginState) => {
|
|
8
|
-
if (!tr.getMeta('replaceDocument')) {
|
|
9
|
-
return getSelectionChangedHandler(false)(tr, prevPluginState);
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
...prevPluginState,
|
|
13
|
-
dirtyAnnotations: true
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
6
|
|
|
17
7
|
/**
|
|
18
8
|
* Creates a handleDocChanged function with its own deleted annotations cache.
|
|
@@ -207,16 +197,9 @@ getSelectionChangeHandlerOld(reopenCommentView)(tr, pluginState);
|
|
|
207
197
|
|
|
208
198
|
// Create the handler with cache once at module level
|
|
209
199
|
const handleDocChangedWithSync = createHandleDocChanged();
|
|
210
|
-
const getDocChangedHandler = (tr, prevPluginState) => {
|
|
211
|
-
// Check feature flag at runtime to support test variants
|
|
212
|
-
if (expValEquals('platform_editor_annotations_sync_on_docchange', 'isEnabled', true)) {
|
|
213
|
-
return handleDocChangedWithSync(tr, prevPluginState);
|
|
214
|
-
}
|
|
215
|
-
return handleDocChanged(tr, prevPluginState);
|
|
216
|
-
};
|
|
217
200
|
const dest = pluginFactory(inlineCommentPluginKey, reducer, {
|
|
218
201
|
onSelectionChanged: getSelectionChangedHandler(true),
|
|
219
|
-
onDocChanged:
|
|
202
|
+
onDocChanged: handleDocChangedWithSync,
|
|
220
203
|
mapping: (tr, pluginState, editorState) => {
|
|
221
204
|
const {
|
|
222
205
|
draftDecorationSet,
|
|
@@ -4,17 +4,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import reducer from './reducer';
|
|
9
8
|
import { decorationKey, findAnnotationsInSelection, inlineCommentPluginKey, isBlockNodeAnnotationsSelected, isSelectedAnnotationsChanged } from './utils';
|
|
10
|
-
var handleDocChanged = function handleDocChanged(tr, prevPluginState) {
|
|
11
|
-
if (!tr.getMeta('replaceDocument')) {
|
|
12
|
-
return getSelectionChangedHandler(false)(tr, prevPluginState);
|
|
13
|
-
}
|
|
14
|
-
return _objectSpread(_objectSpread({}, prevPluginState), {}, {
|
|
15
|
-
dirtyAnnotations: true
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
9
|
|
|
19
10
|
/**
|
|
20
11
|
* Creates a handleDocChanged function with its own deleted annotations cache.
|
|
@@ -201,16 +192,9 @@ var getSelectionChangedHandler = function getSelectionChangedHandler(reopenComme
|
|
|
201
192
|
|
|
202
193
|
// Create the handler with cache once at module level
|
|
203
194
|
var handleDocChangedWithSync = createHandleDocChanged();
|
|
204
|
-
var getDocChangedHandler = function getDocChangedHandler(tr, prevPluginState) {
|
|
205
|
-
// Check feature flag at runtime to support test variants
|
|
206
|
-
if (expValEquals('platform_editor_annotations_sync_on_docchange', 'isEnabled', true)) {
|
|
207
|
-
return handleDocChangedWithSync(tr, prevPluginState);
|
|
208
|
-
}
|
|
209
|
-
return handleDocChanged(tr, prevPluginState);
|
|
210
|
-
};
|
|
211
195
|
var dest = pluginFactory(inlineCommentPluginKey, reducer, {
|
|
212
196
|
onSelectionChanged: getSelectionChangedHandler(true),
|
|
213
|
-
onDocChanged:
|
|
197
|
+
onDocChanged: handleDocChangedWithSync,
|
|
214
198
|
mapping: function mapping(tr, pluginState, editorState) {
|
|
215
199
|
var draftDecorationSet = pluginState.draftDecorationSet,
|
|
216
200
|
bookmark = pluginState.bookmark;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,22 +20,22 @@
|
|
|
20
20
|
"atlaskit:src": "src/index.ts",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@atlaskit/adf-schema": "^57.6.0",
|
|
23
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
24
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
25
|
-
"@atlaskit/editor-plugin-editor-viewmode-effects": "^
|
|
26
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
27
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
28
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
23
|
+
"@atlaskit/editor-plugin-analytics": "^24.0.0",
|
|
24
|
+
"@atlaskit/editor-plugin-connectivity": "^24.0.0",
|
|
25
|
+
"@atlaskit/editor-plugin-editor-viewmode-effects": "^24.0.0",
|
|
26
|
+
"@atlaskit/editor-plugin-feature-flags": "^23.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-toolbar": "^21.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-user-intent": "^22.0.0",
|
|
29
29
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
30
30
|
"@atlaskit/editor-toolbar": "^2.8.0",
|
|
31
31
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
32
32
|
"@atlaskit/icon": "^38.0.0",
|
|
33
33
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
34
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
34
|
+
"@atlaskit/tmp-editor-statsig": "^220.0.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@atlaskit/editor-common": "^
|
|
38
|
+
"@atlaskit/editor-common": "^128.0.0",
|
|
39
39
|
"react": "^18.2.0 || ^19.2.0",
|
|
40
40
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
41
41
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|