@atlaskit/editor-plugin-collab-edit 3.10.3 → 4.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,53 @@
1
1
  # @atlaskit/editor-plugin-collab-edit
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#181024](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181024)
8
+ [`8e80c487ca307`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e80c487ca307) - ##
9
+ Make `@atlaskit/editor-common` a peer dependency
10
+
11
+ **WHAT:** `@atlaskit/editor-common` has been moved from `dependencies` to `peerDependencies` in
12
+ all editor plugin packages.
13
+
14
+ **WHY:** This change ensures that only a single version of `@atlaskit/editor-common` is used in
15
+ consuming applications, preventing issues caused by multiple versions of singleton libraries (such
16
+ as context mismatches or duplicated state). This is especially important for packages that rely on
17
+ shared context or singletons.
18
+
19
+ **HOW TO ADJUST:**
20
+
21
+ - Consumers must now explicitly install `@atlaskit/editor-common` in their own project if they use
22
+ any of these editor plugins.
23
+ - Ensure the version you install matches the version required by the plugins.
24
+ - You can use the
25
+ [`check-peer-dependencies`](https://www.npmjs.com/package/check-peer-dependencies) package to
26
+ verify that all required peer dependencies are installed and compatible.
27
+ - Example install command:
28
+ ```
29
+ npm install @atlaskit/editor-common
30
+ ```
31
+ or
32
+ ```
33
+ yarn add @atlaskit/editor-common
34
+ ```
35
+
36
+ **Note:** This is a breaking change. If `@atlaskit/editor-common` is not installed at the
37
+ application level, you may see errors or unexpected behavior.
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies
42
+
43
+ ## 3.10.4
44
+
45
+ ### Patch Changes
46
+
47
+ - [#180346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180346)
48
+ [`d00d1d362bd18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00d1d362bd18) -
49
+ ED-28086 Clean up platform_editor_no_cursor_on_live_doc_init
50
+
3
51
  ## 3.10.3
4
52
 
5
53
  ### Patch Changes
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.sendTransaction = void 0;
7
7
  var _steps = require("@atlaskit/adf-schema/steps");
8
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
8
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
10
9
  var _actions = require("../actions");
11
10
  var _pluginKey = require("../main/plugin-key");
@@ -48,7 +47,7 @@ var sendTransaction = exports.sendTransaction = function sendTransaction(_ref) {
48
47
  sessionId = currentPluginState.sessionId;
49
48
  var selectionChanged = !oldEditorState.selection.eq(newEditorState.selection);
50
49
  var participantsChanged = prevActiveParticipants && !prevActiveParticipants.eq(activeParticipants);
51
- if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || ((0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') ? participantsChanged && !hideTelecursorOnLoad : participantsChanged))) {
50
+ if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || participantsChanged && !hideTelecursorOnLoad)) {
52
51
  var selection = (0, _actions.getSendableSelection)(newEditorState.selection);
53
52
  var message = {
54
53
  type: 'telepointer',
@@ -151,11 +151,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
151
151
  var from = 1;
152
152
  var to = 1;
153
153
  try {
154
- if ((0, _platformFeatureFlags.fg)('platform_editor_selection_without_left_shift')) {
155
- from = getValidPos(tr, isSelection ? Math.max(rawFrom, 0) : rawFrom);
156
- } else {
157
- from = getValidPos(tr, isSelection ? Math.max(rawFrom - 1, 0) : rawFrom);
158
- }
154
+ from = getValidPos(tr, isSelection ? Math.max(rawFrom, 0) : rawFrom);
159
155
  to = isSelection ? getValidPos(tr, rawTo) : from;
160
156
  } catch (err) {
161
157
  this.onError(err);
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  import { getSendableSelection } from '../actions';
5
4
  import { pluginKey } from '../main/plugin-key';
@@ -43,7 +42,7 @@ export const sendTransaction = ({
43
42
  } = currentPluginState;
44
43
  const selectionChanged = !oldEditorState.selection.eq(newEditorState.selection);
45
44
  const participantsChanged = prevActiveParticipants && !prevActiveParticipants.eq(activeParticipants);
46
- if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || (fg('platform_editor_no_cursor_on_live_doc_init') ? participantsChanged && !hideTelecursorOnLoad : participantsChanged))) {
45
+ if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || participantsChanged && !hideTelecursorOnLoad)) {
47
46
  const selection = getSendableSelection(newEditorState.selection);
48
47
  const message = {
49
48
  type: 'telepointer',
@@ -124,11 +124,7 @@ export class PluginState {
124
124
  let from = 1;
125
125
  let to = 1;
126
126
  try {
127
- if (fg('platform_editor_selection_without_left_shift')) {
128
- from = getValidPos(tr, isSelection ? Math.max(rawFrom, 0) : rawFrom);
129
- } else {
130
- from = getValidPos(tr, isSelection ? Math.max(rawFrom - 1, 0) : rawFrom);
131
- }
127
+ from = getValidPos(tr, isSelection ? Math.max(rawFrom, 0) : rawFrom);
132
128
  to = isSelection ? getValidPos(tr, rawTo) : from;
133
129
  } catch (err) {
134
130
  this.onError(err);
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  import { getSendableSelection } from '../actions';
5
4
  import { pluginKey } from '../main/plugin-key';
@@ -42,7 +41,7 @@ export var sendTransaction = function sendTransaction(_ref) {
42
41
  sessionId = currentPluginState.sessionId;
43
42
  var selectionChanged = !oldEditorState.selection.eq(newEditorState.selection);
44
43
  var participantsChanged = prevActiveParticipants && !prevActiveParticipants.eq(activeParticipants);
45
- if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || (fg('platform_editor_no_cursor_on_live_doc_init') ? participantsChanged && !hideTelecursorOnLoad : participantsChanged))) {
44
+ if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || participantsChanged && !hideTelecursorOnLoad)) {
46
45
  var selection = getSendableSelection(newEditorState.selection);
47
46
  var message = {
48
47
  type: 'telepointer',
@@ -145,11 +145,7 @@ export var PluginState = /*#__PURE__*/function () {
145
145
  var from = 1;
146
146
  var to = 1;
147
147
  try {
148
- if (fg('platform_editor_selection_without_left_shift')) {
149
- from = getValidPos(tr, isSelection ? Math.max(rawFrom, 0) : rawFrom);
150
- } else {
151
- from = getValidPos(tr, isSelection ? Math.max(rawFrom - 1, 0) : rawFrom);
152
- }
148
+ from = getValidPos(tr, isSelection ? Math.max(rawFrom, 0) : rawFrom);
153
149
  to = isSelection ? getValidPos(tr, rawTo) : from;
154
150
  } catch (err) {
155
151
  this.onError(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-collab-edit",
3
- "version": "3.10.3",
3
+ "version": "4.0.0",
4
4
  "description": "Collab Edit plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,8 +9,7 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Editor: Collaboration",
12
- "singleton": true,
13
- "runReact18": true
12
+ "singleton": true
14
13
  },
15
14
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
16
15
  "main": "dist/cjs/index.js",
@@ -33,32 +32,32 @@
33
32
  "dependencies": {
34
33
  "@atlaskit/adf-schema": "^47.6.0",
35
34
  "@atlaskit/custom-steps": "^0.11.0",
36
- "@atlaskit/editor-common": "^107.0.0",
37
35
  "@atlaskit/editor-json-transformer": "^8.24.0",
38
- "@atlaskit/editor-plugin-analytics": "^2.3.0",
39
- "@atlaskit/editor-plugin-connectivity": "^2.0.0",
40
- "@atlaskit/editor-plugin-editor-viewmode": "^4.0.0",
41
- "@atlaskit/editor-plugin-feature-flags": "^1.4.0",
36
+ "@atlaskit/editor-plugin-analytics": "^3.0.0",
37
+ "@atlaskit/editor-plugin-connectivity": "^3.0.0",
38
+ "@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
39
+ "@atlaskit/editor-plugin-feature-flags": "^2.0.0",
42
40
  "@atlaskit/editor-prosemirror": "7.0.0",
43
41
  "@atlaskit/editor-shared-styles": "^3.4.0",
44
42
  "@atlaskit/frontend-utilities": "^3.0.0",
45
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
46
44
  "@atlaskit/prosemirror-collab": "^0.17.0",
47
- "@atlaskit/tmp-editor-statsig": "^8.0.0",
45
+ "@atlaskit/tmp-editor-statsig": "^8.7.0",
48
46
  "@babel/runtime": "^7.0.0",
49
47
  "memoize-one": "^6.0.0"
50
48
  },
51
49
  "peerDependencies": {
50
+ "@atlaskit/editor-common": "^107.6.0",
52
51
  "react": "^18.2.0",
53
52
  "react-dom": "^18.2.0"
54
53
  },
55
54
  "devDependencies": {
56
55
  "@af/integration-testing": "workspace:^",
57
56
  "@af/visual-regression": "workspace:^",
58
- "@atlaskit/editor-plugin-mentions": "^4.7.0",
59
- "@atlaskit/editor-plugin-text-formatting": "^2.3.0",
60
- "@atlaskit/editor-plugin-type-ahead": "^2.7.0",
61
- "@atlaskit/editor-plugin-unsupported-content": "^2.1.0",
57
+ "@atlaskit/editor-plugin-mentions": "^5.0.0",
58
+ "@atlaskit/editor-plugin-text-formatting": "^3.0.0",
59
+ "@atlaskit/editor-plugin-type-ahead": "^3.0.0",
60
+ "@atlaskit/editor-plugin-unsupported-content": "^3.0.0",
62
61
  "@atlaskit/editor-test-helpers": "workspace:^",
63
62
  "@atlaskit/ssr": "workspace:^",
64
63
  "@atlaskit/synchrony-test-helpers": "workspace:^",
@@ -105,12 +104,6 @@
105
104
  }
106
105
  },
107
106
  "platform-feature-flags": {
108
- "platform_editor_selection_without_left_shift": {
109
- "type": "boolean"
110
- },
111
- "platform_editor_no_cursor_on_live_doc_init": {
112
- "type": "boolean"
113
- },
114
107
  "confluence_team_presence_scroll_to_pointer": {
115
108
  "type": "boolean"
116
109
  },