@atlaskit/editor-plugin-collab-edit 1.23.2 → 1.23.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/{plugin.js → collabEditPlugin.js} +9 -11
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/{events → pm-plugins/events}/initialize.js +1 -1
  5. package/dist/cjs/{events → pm-plugins/events}/send-transaction.js +1 -1
  6. package/dist/cjs/pm-plugins/main/index.js +2 -2
  7. package/dist/cjs/pm-plugins/main/plugin-state.js +2 -2
  8. package/dist/cjs/pm-plugins/track-and-filter-spamming-steps.js +3 -5
  9. package/dist/cjs/pm-plugins/track-last-organic-change.js +1 -1
  10. package/dist/cjs/pm-plugins/track-ncs-initialization.js +1 -1
  11. package/dist/cjs/types/index.js +5 -0
  12. package/dist/es2019/{plugin.js → collabEditPlugin.js} +9 -11
  13. package/dist/es2019/index.js +1 -1
  14. package/dist/es2019/{events → pm-plugins/events}/initialize.js +1 -1
  15. package/dist/es2019/{events → pm-plugins/events}/send-transaction.js +1 -1
  16. package/dist/es2019/pm-plugins/main/index.js +2 -2
  17. package/dist/es2019/pm-plugins/main/plugin-state.js +2 -2
  18. package/dist/es2019/pm-plugins/track-and-filter-spamming-steps.js +3 -5
  19. package/dist/es2019/pm-plugins/track-last-organic-change.js +1 -1
  20. package/dist/es2019/pm-plugins/track-ncs-initialization.js +1 -1
  21. package/dist/esm/{plugin.js → collabEditPlugin.js} +9 -11
  22. package/dist/esm/collabEditPluginType.js +1 -0
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/{events → pm-plugins/events}/initialize.js +1 -1
  25. package/dist/esm/{events → pm-plugins/events}/send-transaction.js +1 -1
  26. package/dist/esm/pm-plugins/main/index.js +2 -2
  27. package/dist/esm/pm-plugins/main/plugin-state.js +2 -2
  28. package/dist/esm/pm-plugins/track-and-filter-spamming-steps.js +3 -5
  29. package/dist/esm/pm-plugins/track-last-organic-change.js +1 -1
  30. package/dist/esm/pm-plugins/track-ncs-initialization.js +1 -1
  31. package/dist/esm/types/index.js +1 -0
  32. package/dist/types/collabEditPlugin.d.ts +2 -0
  33. package/dist/types/collabEditPluginType.d.ts +40 -0
  34. package/dist/types/index.d.ts +3 -2
  35. package/dist/types/{actions.d.ts → pm-plugins/actions.d.ts} +1 -1
  36. package/dist/{types-ts4.5 → types/pm-plugins}/events/handlers.d.ts +1 -1
  37. package/dist/types/{events → pm-plugins/events}/initialize.d.ts +2 -1
  38. package/dist/types/pm-plugins/main/index.d.ts +2 -1
  39. package/dist/types/pm-plugins/main/plugin-state.d.ts +1 -1
  40. package/dist/types/{participants.d.ts → pm-plugins/participants.d.ts} +1 -1
  41. package/dist/{types-ts4.5/types.d.ts → types/types/index.d.ts} +1 -38
  42. package/dist/types-ts4.5/collabEditPlugin.d.ts +2 -0
  43. package/dist/types-ts4.5/collabEditPluginType.d.ts +40 -0
  44. package/dist/types-ts4.5/index.d.ts +3 -2
  45. package/dist/types-ts4.5/{actions.d.ts → pm-plugins/actions.d.ts} +1 -1
  46. package/dist/{types → types-ts4.5/pm-plugins}/events/handlers.d.ts +1 -1
  47. package/dist/types-ts4.5/{events → pm-plugins/events}/initialize.d.ts +2 -1
  48. package/dist/types-ts4.5/pm-plugins/main/index.d.ts +2 -1
  49. package/dist/types-ts4.5/pm-plugins/main/plugin-state.d.ts +1 -1
  50. package/dist/types-ts4.5/{participants.d.ts → pm-plugins/participants.d.ts} +1 -1
  51. package/dist/{types/types.d.ts → types-ts4.5/types/index.d.ts} +1 -38
  52. package/package.json +7 -10
  53. package/dist/types/plugin.d.ts +0 -2
  54. package/dist/types-ts4.5/plugin.d.ts +0 -2
  55. /package/dist/cjs/{types.js → collabEditPluginType.js} +0 -0
  56. /package/dist/cjs/{actions.js → pm-plugins/actions.js} +0 -0
  57. /package/dist/cjs/{analytics.js → pm-plugins/analytics.js} +0 -0
  58. /package/dist/cjs/{events → pm-plugins/events}/handlers.js +0 -0
  59. /package/dist/cjs/{participants.js → pm-plugins/participants.js} +0 -0
  60. /package/dist/cjs/{track-steps.js → pm-plugins/track-steps.js} +0 -0
  61. /package/dist/cjs/{utils.js → pm-plugins/utils.js} +0 -0
  62. /package/dist/es2019/{types.js → collabEditPluginType.js} +0 -0
  63. /package/dist/es2019/{actions.js → pm-plugins/actions.js} +0 -0
  64. /package/dist/es2019/{analytics.js → pm-plugins/analytics.js} +0 -0
  65. /package/dist/es2019/{events → pm-plugins/events}/handlers.js +0 -0
  66. /package/dist/es2019/{participants.js → pm-plugins/participants.js} +0 -0
  67. /package/dist/es2019/{track-steps.js → pm-plugins/track-steps.js} +0 -0
  68. /package/dist/es2019/{utils.js → pm-plugins/utils.js} +0 -0
  69. /package/dist/{esm/types.js → es2019/types/index.js} +0 -0
  70. /package/dist/esm/{actions.js → pm-plugins/actions.js} +0 -0
  71. /package/dist/esm/{analytics.js → pm-plugins/analytics.js} +0 -0
  72. /package/dist/esm/{events → pm-plugins/events}/handlers.js +0 -0
  73. /package/dist/esm/{participants.js → pm-plugins/participants.js} +0 -0
  74. /package/dist/esm/{track-steps.js → pm-plugins/track-steps.js} +0 -0
  75. /package/dist/esm/{utils.js → pm-plugins/utils.js} +0 -0
  76. /package/dist/types/{analytics.d.ts → pm-plugins/analytics.d.ts} +0 -0
  77. /package/dist/types/{events → pm-plugins/events}/send-transaction.d.ts +0 -0
  78. /package/dist/types/{track-steps.d.ts → pm-plugins/track-steps.d.ts} +0 -0
  79. /package/dist/types/{utils.d.ts → pm-plugins/utils.d.ts} +0 -0
  80. /package/dist/types-ts4.5/{analytics.d.ts → pm-plugins/analytics.d.ts} +0 -0
  81. /package/dist/types-ts4.5/{events → pm-plugins/events}/send-transaction.d.ts +0 -0
  82. /package/dist/types-ts4.5/{track-steps.d.ts → pm-plugins/track-steps.d.ts} +0 -0
  83. /package/dist/types-ts4.5/{utils.d.ts → pm-plugins/utils.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-collab-edit
2
2
 
3
+ ## 1.23.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#170711](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170711)
8
+ [`2ec85aed74aa8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2ec85aed74aa8) -
9
+ platform_editor_filter_spamming_transactions FF cleanup
10
+
11
+ ## 1.23.3
12
+
13
+ ### Patch Changes
14
+
15
+ - [#165765](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/165765)
16
+ [`3f441f30e6507`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f441f30e6507) -
17
+ Bump adf-schema to 46.0.0
18
+ - [#168970](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168970)
19
+ [`97db2d026001d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/97db2d026001d) -
20
+ ED-25808: refactors plugins to meet folder standards
21
+ - Updated dependencies
22
+
3
23
  ## 1.23.2
4
24
 
5
25
  ### Patch Changes
@@ -14,16 +14,16 @@ var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
14
14
  var _transform = require("@atlaskit/editor-prosemirror/transform");
15
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
16
  var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
17
- var _analytics2 = require("./analytics");
18
- var _sendTransaction = require("./events/send-transaction");
17
+ var _analytics2 = require("./pm-plugins/analytics");
18
+ var _sendTransaction = require("./pm-plugins/events/send-transaction");
19
19
  var _main = require("./pm-plugins/main");
20
20
  var _pluginKey = require("./pm-plugins/main/plugin-key");
21
21
  var _nativeCollabProviderPlugin = require("./pm-plugins/native-collab-provider-plugin");
22
22
  var _trackAndFilterSpammingSteps = require("./pm-plugins/track-and-filter-spamming-steps");
23
23
  var _trackLastOrganicChange = require("./pm-plugins/track-last-organic-change");
24
24
  var _trackNcsInitialization = require("./pm-plugins/track-ncs-initialization");
25
- var _trackSteps = require("./track-steps");
26
- var _utils = require("./utils");
25
+ var _trackSteps = require("./pm-plugins/track-steps");
26
+ var _utils = require("./pm-plugins/utils");
27
27
  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; }
28
28
  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; }
29
29
  var providerBuilder = function providerBuilder(collabEditProviderPromise) {
@@ -204,7 +204,7 @@ var collabEditPlugin = exports.collabEditPlugin = function collabEditPlugin(_ref
204
204
  name: 'collabTrackNCSInitializationPlugin',
205
205
  plugin: _trackNcsInitialization.createPlugin
206
206
  }]);
207
- if ((0, _platformFeatureFlags.fg)('platform_editor_filter_transactions_analytics') || (0, _platformFeatureFlags.fg)('platform_editor_filter_spamming_transactions')) {
207
+ if ((0, _platformFeatureFlags.fg)('platform_editor_filter_transactions_analytics')) {
208
208
  plugins.push({
209
209
  name: 'trackAndFilterSpammingSteps',
210
210
  plugin: function plugin() {
@@ -225,12 +225,10 @@ var collabEditPlugin = exports.collabEditPlugin = function collabEditPlugin(_ref
225
225
  }
226
226
  });
227
227
  }
228
- if ((0, _platformFeatureFlags.fg)('platform_editor_last_organic_change')) {
229
- plugins.push({
230
- name: 'collabTrackLastOrganicChangePlugin',
231
- plugin: _trackLastOrganicChange.createPlugin
232
- });
233
- }
228
+ plugins.push({
229
+ name: 'collabTrackLastOrganicChangePlugin',
230
+ plugin: _trackLastOrganicChange.createPlugin
231
+ });
234
232
  return plugins;
235
233
  },
236
234
  onEditorViewStateUpdated: function onEditorViewStateUpdated(props) {
package/dist/cjs/index.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "collabEditPlugin", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _plugin.collabEditPlugin;
9
+ return _collabEditPlugin.collabEditPlugin;
10
10
  }
11
11
  });
12
- var _plugin = require("./plugin");
12
+ var _collabEditPlugin = require("./collabEditPlugin");
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.initialize = void 0;
8
8
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
9
9
  var _transform = require("@atlaskit/editor-prosemirror/transform");
10
- var _pluginKey = require("../pm-plugins/main/plugin-key");
10
+ var _pluginKey = require("../main/plugin-key");
11
11
  var _handlers = require("./handlers");
12
12
  var initCollab = function initCollab(collabEditProvider, view) {
13
13
  if (collabEditProvider.initialize) {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.sendTransaction = void 0;
7
7
  var _actions = require("../actions");
8
- var _pluginKey = require("../pm-plugins/main/plugin-key");
8
+ var _pluginKey = require("../main/plugin-key");
9
9
  var sendTransaction = exports.sendTransaction = function sendTransaction(_ref) {
10
10
  var originalTransaction = _ref.originalTransaction,
11
11
  transactions = _ref.transactions,
@@ -10,8 +10,8 @@ var atlaskKitCustomSteps = _interopRequireWildcard(require("@atlaskit/custom-ste
10
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
12
12
  var _transform = require("@atlaskit/editor-prosemirror/transform");
13
- var _analytics2 = require("../../analytics");
14
- var _initialize = require("../../events/initialize");
13
+ var _analytics2 = require("../analytics");
14
+ var _initialize = require("../events/initialize");
15
15
  var _pluginKey = require("./plugin-key");
16
16
  var _pluginState = require("./plugin-state");
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -19,8 +19,8 @@ var _browser = require("@atlaskit/editor-common/browser");
19
19
  var _collab = require("@atlaskit/editor-common/collab");
20
20
  var _state = require("@atlaskit/editor-prosemirror/state");
21
21
  var _view = require("@atlaskit/editor-prosemirror/view");
22
- var _participants = require("../../participants");
23
- var _utils = require("../../utils");
22
+ var _participants = require("../participants");
23
+ var _utils = require("../utils");
24
24
  /**
25
25
  * Returns position where it's possible to place a decoration.
26
26
  */
@@ -10,7 +10,6 @@ var _steps = require("@atlaskit/adf-schema/steps");
10
10
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
12
  var _transform = require("@atlaskit/editor-prosemirror/transform");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var THRESHOLD = 50; // 50 milliseconds
15
14
 
16
15
  /**
@@ -108,10 +107,9 @@ var createFilterTransaction = exports.createFilterTransaction = function createF
108
107
 
109
108
  // Track analytics for the filtered transaction
110
109
  trackFilteredTransaction(tr);
111
- if ((0, _platformFeatureFlags.fg)('platform_editor_filter_spamming_transactions')) {
112
- // Filter transaction
113
- return false;
114
- }
110
+
111
+ // Filter transaction
112
+ return false;
115
113
  }
116
114
  return true; // Allow the transaction
117
115
  };
@@ -8,7 +8,7 @@ var _collab = require("@atlaskit/editor-common/collab");
8
8
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
9
9
  var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var _transform = require("@atlaskit/editor-prosemirror/transform");
11
- var _utils = require("../utils");
11
+ var _utils = require("./utils");
12
12
  var trackLastOrganicChangePluginKey = exports.trackLastOrganicChangePluginKey = new _state.PluginKey('collabTrackLastOrganicChangePlugin');
13
13
  var createPlugin = exports.createPlugin = function createPlugin() {
14
14
  return new _safePlugin.SafePlugin({
@@ -10,7 +10,7 @@ var _collab = require("@atlaskit/editor-common/collab");
10
10
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
12
  var _transform = require("@atlaskit/editor-prosemirror/transform");
13
- var _utils = require("../utils");
13
+ var _utils = require("./utils");
14
14
  var trackNCSInitializationPluginKey = exports.trackNCSInitializationPluginKey = new _state.PluginKey('collabTrackNCSInitializationPlugin');
15
15
  var createPlugin = exports.createPlugin = function createPlugin() {
16
16
  return new _safePlugin.SafePlugin({
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -3,16 +3,16 @@ import { JSONTransformer } from '@atlaskit/editor-json-transformer';
3
3
  import { AddMarkStep, AddNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { collab, getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
6
- import { addSynchronyErrorAnalytics } from './analytics';
7
- import { sendTransaction } from './events/send-transaction';
6
+ import { addSynchronyErrorAnalytics } from './pm-plugins/analytics';
7
+ import { sendTransaction } from './pm-plugins/events/send-transaction';
8
8
  import { createPlugin } from './pm-plugins/main';
9
9
  import { pluginKey as mainPluginKey } from './pm-plugins/main/plugin-key';
10
10
  import { nativeCollabProviderPlugin } from './pm-plugins/native-collab-provider-plugin';
11
11
  import { sanitizeFilteredStep, createPlugin as trackSpammingStepsPlugin } from './pm-plugins/track-and-filter-spamming-steps';
12
12
  import { createPlugin as createLastOrganicChangePlugin, trackLastOrganicChangePluginKey } from './pm-plugins/track-last-organic-change';
13
13
  import { createPlugin as createTrackNCSInitializationPlugin, trackNCSInitializationPluginKey } from './pm-plugins/track-ncs-initialization';
14
- import { track } from './track-steps';
15
- import { getAvatarColor } from './utils';
14
+ import { track } from './pm-plugins/track-steps';
15
+ import { getAvatarColor } from './pm-plugins/utils';
16
16
  const providerBuilder = collabEditProviderPromise => async (codeToExecute, onError) => {
17
17
  try {
18
18
  const provider = await collabEditProviderPromise;
@@ -157,7 +157,7 @@ export const collabEditPlugin = ({
157
157
  name: 'collabTrackNCSInitializationPlugin',
158
158
  plugin: createTrackNCSInitializationPlugin
159
159
  }];
160
- if (fg('platform_editor_filter_transactions_analytics') || fg('platform_editor_filter_spamming_transactions')) {
160
+ if (fg('platform_editor_filter_transactions_analytics')) {
161
161
  plugins.push({
162
162
  name: 'trackAndFilterSpammingSteps',
163
163
  plugin: () => trackSpammingStepsPlugin(tr => {
@@ -174,12 +174,10 @@ export const collabEditPlugin = ({
174
174
  })
175
175
  });
176
176
  }
177
- if (fg('platform_editor_last_organic_change')) {
178
- plugins.push({
179
- name: 'collabTrackLastOrganicChangePlugin',
180
- plugin: createLastOrganicChangePlugin
181
- });
182
- }
177
+ plugins.push({
178
+ name: 'collabTrackLastOrganicChangePlugin',
179
+ plugin: createLastOrganicChangePlugin
180
+ });
183
181
  return plugins;
184
182
  },
185
183
  onEditorViewStateUpdated(props) {
@@ -1 +1 @@
1
- export { collabEditPlugin } from './plugin';
1
+ export { collabEditPlugin } from './collabEditPlugin';
@@ -1,6 +1,6 @@
1
1
  import memoizeOne from 'memoize-one';
2
2
  import { Step } from '@atlaskit/editor-prosemirror/transform';
3
- import { pluginKey } from '../pm-plugins/main/plugin-key';
3
+ import { pluginKey } from '../main/plugin-key';
4
4
  import { subscribe } from './handlers';
5
5
  const initCollab = (collabEditProvider, view) => {
6
6
  if (collabEditProvider.initialize) {
@@ -1,5 +1,5 @@
1
1
  import { getSendableSelection } from '../actions';
2
- import { pluginKey } from '../pm-plugins/main/plugin-key';
2
+ import { pluginKey } from '../main/plugin-key';
3
3
  export const sendTransaction = ({
4
4
  originalTransaction,
5
5
  transactions,
@@ -5,8 +5,8 @@ import * as atlaskKitCustomSteps from '@atlaskit/custom-steps';
5
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
7
  import { Step } from '@atlaskit/editor-prosemirror/transform';
8
- import { addSynchronyErrorAnalytics } from '../../analytics';
9
- import { initialize } from '../../events/initialize';
8
+ import { addSynchronyErrorAnalytics } from '../analytics';
9
+ import { initialize } from '../events/initialize';
10
10
  import { pluginKey } from './plugin-key';
11
11
  import { PluginState } from './plugin-state';
12
12
  const enforceCustomStepRegisters = () => {
@@ -3,8 +3,8 @@ import { browser } from '@atlaskit/editor-common/browser';
3
3
  import { TELEPOINTER_DIM_CLASS } from '@atlaskit/editor-common/collab';
4
4
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
6
- import { Participants } from '../../participants';
7
- import { createTelepointers, findPointers, getPositionOfTelepointer, isReplaceStep } from '../../utils';
6
+ import { Participants } from '../participants';
7
+ import { createTelepointers, findPointers, getPositionOfTelepointer, isReplaceStep } from '../utils';
8
8
  export { TELEPOINTER_DIM_CLASS };
9
9
 
10
10
  /**
@@ -2,7 +2,6 @@ import { AnalyticsStep, InsertTypeAheadStep, LinkMetaStep, SetAttrsStep } from '
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
4
  import { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, RemoveMarkStep, RemoveNodeMarkStep, ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  const THRESHOLD = 50; // 50 milliseconds
7
6
 
8
7
  /**
@@ -100,10 +99,9 @@ export const createFilterTransaction = (recentTransactionsTimestamps, trackFilte
100
99
 
101
100
  // Track analytics for the filtered transaction
102
101
  trackFilteredTransaction(tr);
103
- if (fg('platform_editor_filter_spamming_transactions')) {
104
- // Filter transaction
105
- return false;
106
- }
102
+
103
+ // Filter transaction
104
+ return false;
107
105
  }
108
106
  return true; // Allow the transaction
109
107
  };
@@ -2,7 +2,7 @@ import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
4
  import { AddMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
5
- import { isOrganicChange } from '../utils';
5
+ import { isOrganicChange } from './utils';
6
6
  export const trackLastOrganicChangePluginKey = new PluginKey('collabTrackLastOrganicChangePlugin');
7
7
  export const createPlugin = () => {
8
8
  return new SafePlugin({
@@ -2,7 +2,7 @@ import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
4
  import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
5
- import { originalTransactionHasMeta } from '../utils';
5
+ import { originalTransactionHasMeta } from './utils';
6
6
  export const trackNCSInitializationPluginKey = new PluginKey('collabTrackNCSInitializationPlugin');
7
7
  export const createPlugin = () => {
8
8
  return new SafePlugin({
@@ -9,16 +9,16 @@ import { JSONTransformer } from '@atlaskit/editor-json-transformer';
9
9
  import { AddMarkStep, AddNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
10
10
  import { fg } from '@atlaskit/platform-feature-flags';
11
11
  import { collab, getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
12
- import { addSynchronyErrorAnalytics } from './analytics';
13
- import { sendTransaction } from './events/send-transaction';
12
+ import { addSynchronyErrorAnalytics } from './pm-plugins/analytics';
13
+ import { sendTransaction } from './pm-plugins/events/send-transaction';
14
14
  import { createPlugin } from './pm-plugins/main';
15
15
  import { pluginKey as mainPluginKey } from './pm-plugins/main/plugin-key';
16
16
  import { nativeCollabProviderPlugin } from './pm-plugins/native-collab-provider-plugin';
17
17
  import { sanitizeFilteredStep, createPlugin as trackSpammingStepsPlugin } from './pm-plugins/track-and-filter-spamming-steps';
18
18
  import { createPlugin as createLastOrganicChangePlugin, trackLastOrganicChangePluginKey } from './pm-plugins/track-last-organic-change';
19
19
  import { createPlugin as createTrackNCSInitializationPlugin, trackNCSInitializationPluginKey } from './pm-plugins/track-ncs-initialization';
20
- import { track } from './track-steps';
21
- import { getAvatarColor } from './utils';
20
+ import { track } from './pm-plugins/track-steps';
21
+ import { getAvatarColor } from './pm-plugins/utils';
22
22
  var providerBuilder = function providerBuilder(collabEditProviderPromise) {
23
23
  return /*#__PURE__*/function () {
24
24
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(codeToExecute, onError) {
@@ -197,7 +197,7 @@ export var collabEditPlugin = function collabEditPlugin(_ref4) {
197
197
  name: 'collabTrackNCSInitializationPlugin',
198
198
  plugin: createTrackNCSInitializationPlugin
199
199
  }]);
200
- if (fg('platform_editor_filter_transactions_analytics') || fg('platform_editor_filter_spamming_transactions')) {
200
+ if (fg('platform_editor_filter_transactions_analytics')) {
201
201
  plugins.push({
202
202
  name: 'trackAndFilterSpammingSteps',
203
203
  plugin: function plugin() {
@@ -218,12 +218,10 @@ export var collabEditPlugin = function collabEditPlugin(_ref4) {
218
218
  }
219
219
  });
220
220
  }
221
- if (fg('platform_editor_last_organic_change')) {
222
- plugins.push({
223
- name: 'collabTrackLastOrganicChangePlugin',
224
- plugin: createLastOrganicChangePlugin
225
- });
226
- }
221
+ plugins.push({
222
+ name: 'collabTrackLastOrganicChangePlugin',
223
+ plugin: createLastOrganicChangePlugin
224
+ });
227
225
  return plugins;
228
226
  },
229
227
  onEditorViewStateUpdated: function onEditorViewStateUpdated(props) {
@@ -0,0 +1 @@
1
+ export {};
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { collabEditPlugin } from './plugin';
1
+ export { collabEditPlugin } from './collabEditPlugin';
@@ -1,6 +1,6 @@
1
1
  import memoizeOne from 'memoize-one';
2
2
  import { Step } from '@atlaskit/editor-prosemirror/transform';
3
- import { pluginKey } from '../pm-plugins/main/plugin-key';
3
+ import { pluginKey } from '../main/plugin-key';
4
4
  import { subscribe } from './handlers';
5
5
  var initCollab = function initCollab(collabEditProvider, view) {
6
6
  if (collabEditProvider.initialize) {
@@ -1,5 +1,5 @@
1
1
  import { getSendableSelection } from '../actions';
2
- import { pluginKey } from '../pm-plugins/main/plugin-key';
2
+ import { pluginKey } from '../main/plugin-key';
3
3
  export var sendTransaction = function sendTransaction(_ref) {
4
4
  var originalTransaction = _ref.originalTransaction,
5
5
  transactions = _ref.transactions,
@@ -5,8 +5,8 @@ import * as atlaskKitCustomSteps from '@atlaskit/custom-steps';
5
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
7
  import { Step } from '@atlaskit/editor-prosemirror/transform';
8
- import { addSynchronyErrorAnalytics } from '../../analytics';
9
- import { initialize } from '../../events/initialize';
8
+ import { addSynchronyErrorAnalytics } from '../analytics';
9
+ import { initialize } from '../events/initialize';
10
10
  import { pluginKey } from './plugin-key';
11
11
  import { PluginState } from './plugin-state';
12
12
  var enforceCustomStepRegisters = function enforceCustomStepRegisters() {
@@ -5,8 +5,8 @@ import { browser } from '@atlaskit/editor-common/browser';
5
5
  import { TELEPOINTER_DIM_CLASS } from '@atlaskit/editor-common/collab';
6
6
  import { Selection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
- import { Participants } from '../../participants';
9
- import { createTelepointers, findPointers, getPositionOfTelepointer, isReplaceStep } from '../../utils';
8
+ import { Participants } from '../participants';
9
+ import { createTelepointers, findPointers, getPositionOfTelepointer, isReplaceStep } from '../utils';
10
10
  export { TELEPOINTER_DIM_CLASS };
11
11
 
12
12
  /**
@@ -2,7 +2,6 @@ import { AnalyticsStep, InsertTypeAheadStep, LinkMetaStep, SetAttrsStep } from '
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
4
  import { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, RemoveMarkStep, RemoveNodeMarkStep, ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  var THRESHOLD = 50; // 50 milliseconds
7
6
 
8
7
  /**
@@ -100,10 +99,9 @@ export var createFilterTransaction = function createFilterTransaction(recentTran
100
99
 
101
100
  // Track analytics for the filtered transaction
102
101
  trackFilteredTransaction(tr);
103
- if (fg('platform_editor_filter_spamming_transactions')) {
104
- // Filter transaction
105
- return false;
106
- }
102
+
103
+ // Filter transaction
104
+ return false;
107
105
  }
108
106
  return true; // Allow the transaction
109
107
  };
@@ -2,7 +2,7 @@ import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
4
  import { AddMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
5
- import { isOrganicChange } from '../utils';
5
+ import { isOrganicChange } from './utils';
6
6
  export var trackLastOrganicChangePluginKey = new PluginKey('collabTrackLastOrganicChangePlugin');
7
7
  export var createPlugin = function createPlugin() {
8
8
  return new SafePlugin({
@@ -3,7 +3,7 @@ import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
5
  import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
6
- import { originalTransactionHasMeta } from '../utils';
6
+ import { originalTransactionHasMeta } from './utils';
7
7
  export var trackNCSInitializationPluginKey = new PluginKey('collabTrackNCSInitializationPlugin');
8
8
  export var createPlugin = function createPlugin() {
9
9
  return new SafePlugin({
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { CollabEditPlugin } from './collabEditPluginType';
2
+ export declare const collabEditPlugin: CollabEditPlugin;
@@ -0,0 +1,40 @@
1
+ import type { Color } from '@atlaskit/editor-common/collab';
2
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
+ import type { JSONNode } from '@atlaskit/editor-json-transformer';
4
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
+ import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
6
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
7
+ import type { Mark } from '@atlaskit/editor-prosemirror/model';
8
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
9
+ import type { CollabEditPluginSharedState, CollabSendableSteps, PrivateCollabEditOptions } from './types';
10
+ export type CollabEditPlugin = NextEditorPlugin<'collabEdit', {
11
+ pluginConfiguration: PrivateCollabEditOptions;
12
+ dependencies: [
13
+ OptionalPlugin<FeatureFlagsPlugin>,
14
+ OptionalPlugin<AnalyticsPlugin>,
15
+ OptionalPlugin<EditorViewModePlugin>
16
+ ];
17
+ sharedState: CollabEditPluginSharedState;
18
+ actions: {
19
+ getAvatarColor: (str: string) => {
20
+ index: number;
21
+ color: Color;
22
+ };
23
+ addInlineCommentMark: (props: {
24
+ from: number;
25
+ to: number;
26
+ mark: Mark;
27
+ }) => boolean;
28
+ addInlineCommentNodeMark: (props: {
29
+ pos: number;
30
+ mark: Mark;
31
+ }) => boolean;
32
+ isRemoteReplaceDocumentTransaction: (tr: Transaction) => boolean;
33
+ getCurrentCollabState: () => {
34
+ version: number | undefined;
35
+ sendableSteps: CollabSendableSteps | undefined | null;
36
+ content: JSONNode | undefined;
37
+ };
38
+ validatePMJSONDocument: (doc: any) => boolean;
39
+ };
40
+ }>;
@@ -1,2 +1,3 @@
1
- export { collabEditPlugin } from './plugin';
2
- export type { CollabInitializedMetadata, CollabEditPluginSharedState, CollabEditPlugin, ReadOnlyParticipants, PrivateCollabEditOptions, CollabInviteToEditProps, CollabSendableSteps, } from './types';
1
+ export { collabEditPlugin } from './collabEditPlugin';
2
+ export type { CollabEditPlugin } from './collabEditPluginType';
3
+ export type { CollabInitializedMetadata, CollabEditPluginSharedState, ReadOnlyParticipants, PrivateCollabEditOptions, CollabInviteToEditProps, CollabSendableSteps, } from './types';
@@ -2,7 +2,7 @@ import type { CollabEditProvider, CollabEventConnectionData, CollabEventInitData
2
2
  import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/src/analytics';
3
3
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { PrivateCollabEditOptions } from './types';
5
+ import type { PrivateCollabEditOptions } from '../types';
6
6
  export declare const registerAllCustomSteps: () => void;
7
7
  export declare const handleInit: (initData: CollabEventInitData, view: EditorView, options?: PrivateCollabEditOptions, editorAnalyticsApi?: EditorAnalyticsAPI) => void;
8
8
  export declare const handleConnection: (connectionData: CollabEventConnectionData, view: EditorView) => void;
@@ -3,7 +3,7 @@ import type { CollabEditProvider, CollabEventConnectionData, CollabEventInitData
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import type { PrivateCollabEditOptions } from '../types';
6
+ import type { PrivateCollabEditOptions } from '../../types';
7
7
  export type SynchronyEntity = {
8
8
  on: (evt: 'disconnected' | 'error', handler: (...args: any) => void) => void;
9
9
  off: (evt: 'disconnected' | 'error', handler: (...args: any) => void) => void;
@@ -3,7 +3,8 @@ import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import type { CollabEditPlugin, PrivateCollabEditOptions } from '../types';
6
+ import type { CollabEditPlugin } from '../../collabEditPluginType';
7
+ import type { PrivateCollabEditOptions } from '../../types';
7
8
  import type { Cleanup } from './handlers';
8
9
  type Props = {
9
10
  view: EditorView;
@@ -3,6 +3,7 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
6
- import type { CollabEditPlugin, PrivateCollabEditOptions, ProviderCallback } from '../../types';
6
+ import type { CollabEditPlugin } from '../../collabEditPluginType';
7
+ import type { PrivateCollabEditOptions, ProviderCallback } from '../../types';
7
8
  import { PluginState } from './plugin-state';
8
9
  export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, providerResolver: (value: CollabEditProvider) => void, collabProviderCallback: ProviderCallback, options: PrivateCollabEditOptions, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<CollabEditPlugin> | undefined) => SafePlugin<PluginState>;
@@ -1,8 +1,8 @@
1
1
  import { TELEPOINTER_DIM_CLASS } from '@atlaskit/editor-common/collab';
2
2
  import type { ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
3
3
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
- import { Participants } from '../../participants';
5
4
  import type { ReadOnlyParticipants } from '../../types';
5
+ import { Participants } from '../participants';
6
6
  export { TELEPOINTER_DIM_CLASS };
7
7
  /**
8
8
  * Returns position where it's possible to place a decoration.
@@ -1,5 +1,5 @@
1
1
  import type { CollabParticipant } from '@atlaskit/editor-common/collab';
2
- import type { ReadOnlyParticipants } from './types';
2
+ import type { ReadOnlyParticipants } from '../types';
3
3
  export declare class Participants implements ReadOnlyParticipants {
4
4
  private participants;
5
5
  constructor(participants?: Map<string, CollabParticipant>);
@@ -1,11 +1,5 @@
1
- import type { CollabEditOptions, CollabEditProvider, CollabParticipant, Color, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
2
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { JSONNode } from '@atlaskit/editor-json-transformer';
4
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
6
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
1
+ import type { CollabEditOptions, CollabEditProvider, CollabParticipant, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
7
2
  import { type Step } from '@atlaskit/editor-prosemirror/dist/types/transform';
8
- import type { Mark } from '@atlaskit/editor-prosemirror/model';
9
3
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
10
4
  export type { InviteToEditComponentProps, InviteToEditButtonProps, CollabInviteToEditProps, CollabAnalyticsProps, } from '@atlaskit/editor-common/collab';
11
5
  export type PrivateCollabEditOptions = CollabEditOptions & {
@@ -47,34 +41,3 @@ export type CollabEditPluginSharedState = {
47
41
  activeParticipants: ReadOnlyParticipants | undefined;
48
42
  sessionId: string | undefined;
49
43
  };
50
- export type CollabEditPlugin = NextEditorPlugin<'collabEdit', {
51
- pluginConfiguration: PrivateCollabEditOptions;
52
- dependencies: [
53
- OptionalPlugin<FeatureFlagsPlugin>,
54
- OptionalPlugin<AnalyticsPlugin>,
55
- OptionalPlugin<EditorViewModePlugin>
56
- ];
57
- sharedState: CollabEditPluginSharedState;
58
- actions: {
59
- getAvatarColor: (str: string) => {
60
- index: number;
61
- color: Color;
62
- };
63
- addInlineCommentMark: (props: {
64
- from: number;
65
- to: number;
66
- mark: Mark;
67
- }) => boolean;
68
- addInlineCommentNodeMark: (props: {
69
- pos: number;
70
- mark: Mark;
71
- }) => boolean;
72
- isRemoteReplaceDocumentTransaction: (tr: Transaction) => boolean;
73
- getCurrentCollabState: () => {
74
- version: number | undefined;
75
- sendableSteps: CollabSendableSteps | undefined | null;
76
- content: JSONNode | undefined;
77
- };
78
- validatePMJSONDocument: (doc: any) => boolean;
79
- };
80
- }>;
@@ -0,0 +1,2 @@
1
+ import type { CollabEditPlugin } from './collabEditPluginType';
2
+ export declare const collabEditPlugin: CollabEditPlugin;
@@ -0,0 +1,40 @@
1
+ import type { Color } from '@atlaskit/editor-common/collab';
2
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
+ import type { JSONNode } from '@atlaskit/editor-json-transformer';
4
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
+ import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
6
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
7
+ import type { Mark } from '@atlaskit/editor-prosemirror/model';
8
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
9
+ import type { CollabEditPluginSharedState, CollabSendableSteps, PrivateCollabEditOptions } from './types';
10
+ export type CollabEditPlugin = NextEditorPlugin<'collabEdit', {
11
+ pluginConfiguration: PrivateCollabEditOptions;
12
+ dependencies: [
13
+ OptionalPlugin<FeatureFlagsPlugin>,
14
+ OptionalPlugin<AnalyticsPlugin>,
15
+ OptionalPlugin<EditorViewModePlugin>
16
+ ];
17
+ sharedState: CollabEditPluginSharedState;
18
+ actions: {
19
+ getAvatarColor: (str: string) => {
20
+ index: number;
21
+ color: Color;
22
+ };
23
+ addInlineCommentMark: (props: {
24
+ from: number;
25
+ to: number;
26
+ mark: Mark;
27
+ }) => boolean;
28
+ addInlineCommentNodeMark: (props: {
29
+ pos: number;
30
+ mark: Mark;
31
+ }) => boolean;
32
+ isRemoteReplaceDocumentTransaction: (tr: Transaction) => boolean;
33
+ getCurrentCollabState: () => {
34
+ version: number | undefined;
35
+ sendableSteps: CollabSendableSteps | undefined | null;
36
+ content: JSONNode | undefined;
37
+ };
38
+ validatePMJSONDocument: (doc: any) => boolean;
39
+ };
40
+ }>;
@@ -1,2 +1,3 @@
1
- export { collabEditPlugin } from './plugin';
2
- export type { CollabInitializedMetadata, CollabEditPluginSharedState, CollabEditPlugin, ReadOnlyParticipants, PrivateCollabEditOptions, CollabInviteToEditProps, CollabSendableSteps, } from './types';
1
+ export { collabEditPlugin } from './collabEditPlugin';
2
+ export type { CollabEditPlugin } from './collabEditPluginType';
3
+ export type { CollabInitializedMetadata, CollabEditPluginSharedState, ReadOnlyParticipants, PrivateCollabEditOptions, CollabInviteToEditProps, CollabSendableSteps, } from './types';
@@ -2,7 +2,7 @@ import type { CollabEditProvider, CollabEventConnectionData, CollabEventInitData
2
2
  import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/src/analytics';
3
3
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { PrivateCollabEditOptions } from './types';
5
+ import type { PrivateCollabEditOptions } from '../types';
6
6
  export declare const registerAllCustomSteps: () => void;
7
7
  export declare const handleInit: (initData: CollabEventInitData, view: EditorView, options?: PrivateCollabEditOptions, editorAnalyticsApi?: EditorAnalyticsAPI) => void;
8
8
  export declare const handleConnection: (connectionData: CollabEventConnectionData, view: EditorView) => void;
@@ -3,7 +3,7 @@ import type { CollabEditProvider, CollabEventConnectionData, CollabEventInitData
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import type { PrivateCollabEditOptions } from '../types';
6
+ import type { PrivateCollabEditOptions } from '../../types';
7
7
  export type SynchronyEntity = {
8
8
  on: (evt: 'disconnected' | 'error', handler: (...args: any) => void) => void;
9
9
  off: (evt: 'disconnected' | 'error', handler: (...args: any) => void) => void;
@@ -3,7 +3,8 @@ import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import type { CollabEditPlugin, PrivateCollabEditOptions } from '../types';
6
+ import type { CollabEditPlugin } from '../../collabEditPluginType';
7
+ import type { PrivateCollabEditOptions } from '../../types';
7
8
  import type { Cleanup } from './handlers';
8
9
  type Props = {
9
10
  view: EditorView;
@@ -3,6 +3,7 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
6
- import type { CollabEditPlugin, PrivateCollabEditOptions, ProviderCallback } from '../../types';
6
+ import type { CollabEditPlugin } from '../../collabEditPluginType';
7
+ import type { PrivateCollabEditOptions, ProviderCallback } from '../../types';
7
8
  import { PluginState } from './plugin-state';
8
9
  export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, providerResolver: (value: CollabEditProvider) => void, collabProviderCallback: ProviderCallback, options: PrivateCollabEditOptions, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<CollabEditPlugin> | undefined) => SafePlugin<PluginState>;
@@ -1,8 +1,8 @@
1
1
  import { TELEPOINTER_DIM_CLASS } from '@atlaskit/editor-common/collab';
2
2
  import type { ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
3
3
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
- import { Participants } from '../../participants';
5
4
  import type { ReadOnlyParticipants } from '../../types';
5
+ import { Participants } from '../participants';
6
6
  export { TELEPOINTER_DIM_CLASS };
7
7
  /**
8
8
  * Returns position where it's possible to place a decoration.
@@ -1,5 +1,5 @@
1
1
  import type { CollabParticipant } from '@atlaskit/editor-common/collab';
2
- import type { ReadOnlyParticipants } from './types';
2
+ import type { ReadOnlyParticipants } from '../types';
3
3
  export declare class Participants implements ReadOnlyParticipants {
4
4
  private participants;
5
5
  constructor(participants?: Map<string, CollabParticipant>);
@@ -1,11 +1,5 @@
1
- import type { CollabEditOptions, CollabEditProvider, CollabParticipant, Color, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
2
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { JSONNode } from '@atlaskit/editor-json-transformer';
4
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
6
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
1
+ import type { CollabEditOptions, CollabEditProvider, CollabParticipant, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
7
2
  import { type Step } from '@atlaskit/editor-prosemirror/dist/types/transform';
8
- import type { Mark } from '@atlaskit/editor-prosemirror/model';
9
3
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
10
4
  export type { InviteToEditComponentProps, InviteToEditButtonProps, CollabInviteToEditProps, CollabAnalyticsProps, } from '@atlaskit/editor-common/collab';
11
5
  export type PrivateCollabEditOptions = CollabEditOptions & {
@@ -47,34 +41,3 @@ export type CollabEditPluginSharedState = {
47
41
  activeParticipants: ReadOnlyParticipants | undefined;
48
42
  sessionId: string | undefined;
49
43
  };
50
- export type CollabEditPlugin = NextEditorPlugin<'collabEdit', {
51
- pluginConfiguration: PrivateCollabEditOptions;
52
- dependencies: [
53
- OptionalPlugin<FeatureFlagsPlugin>,
54
- OptionalPlugin<AnalyticsPlugin>,
55
- OptionalPlugin<EditorViewModePlugin>
56
- ];
57
- sharedState: CollabEditPluginSharedState;
58
- actions: {
59
- getAvatarColor: (str: string) => {
60
- index: number;
61
- color: Color;
62
- };
63
- addInlineCommentMark: (props: {
64
- from: number;
65
- to: number;
66
- mark: Mark;
67
- }) => boolean;
68
- addInlineCommentNodeMark: (props: {
69
- pos: number;
70
- mark: Mark;
71
- }) => boolean;
72
- isRemoteReplaceDocumentTransaction: (tr: Transaction) => boolean;
73
- getCurrentCollabState: () => {
74
- version: number | undefined;
75
- sendableSteps: CollabSendableSteps | undefined | null;
76
- content: JSONNode | undefined;
77
- };
78
- validatePMJSONDocument: (doc: any) => boolean;
79
- };
80
- }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-collab-edit",
3
- "version": "1.23.2",
3
+ "version": "1.23.4",
4
4
  "description": "Collab Edit plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,11 +31,11 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^44.2.0",
34
+ "@atlaskit/adf-schema": "^46.1.0",
35
35
  "@atlaskit/custom-steps": "^0.9.0",
36
- "@atlaskit/editor-common": "^95.6.0",
36
+ "@atlaskit/editor-common": "^95.9.0",
37
37
  "@atlaskit/editor-json-transformer": "^8.21.0",
38
- "@atlaskit/editor-plugin-analytics": "1.10.5",
38
+ "@atlaskit/editor-plugin-analytics": "1.10.6",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
40
40
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
41
41
  "@atlaskit/editor-prosemirror": "6.0.0",
@@ -67,6 +67,9 @@
67
67
  },
68
68
  "techstack": {
69
69
  "@atlassian/frontend": {
70
+ "code-structure": [
71
+ "editor-plugin"
72
+ ],
70
73
  "import-structure": [
71
74
  "atlassian-conventions"
72
75
  ],
@@ -99,15 +102,9 @@
99
102
  }
100
103
  },
101
104
  "platform-feature-flags": {
102
- "platform_editor_last_organic_change": {
103
- "type": "boolean"
104
- },
105
105
  "platform_editor_filter_transactions_analytics": {
106
106
  "type": "boolean"
107
107
  },
108
- "platform_editor_filter_spamming_transactions": {
109
- "type": "boolean"
110
- },
111
108
  "platform_editor_use_nested_table_pm_nodes": {
112
109
  "type": "boolean"
113
110
  }
@@ -1,2 +0,0 @@
1
- import type { CollabEditPlugin } from './types';
2
- export declare const collabEditPlugin: CollabEditPlugin;
@@ -1,2 +0,0 @@
1
- import type { CollabEditPlugin } from './types';
2
- export declare const collabEditPlugin: CollabEditPlugin;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes