@atlaskit/collab-provider 28.2.1 → 28.3.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/analytics/analytics-helper.js +2 -2
  3. package/dist/cjs/analytics/ufo.js +1 -1
  4. package/dist/cjs/api/api.js +1 -1
  5. package/dist/cjs/channel.js +7 -7
  6. package/dist/cjs/document/document-service.js +7 -9
  7. package/dist/cjs/errors/error-code-mapper.js +2 -2
  8. package/dist/cjs/participants/participants-service.js +2 -2
  9. package/dist/cjs/participants/telepointers-helper.js +2 -2
  10. package/dist/cjs/provider/commit-step.js +12 -9
  11. package/dist/cjs/provider/index.js +13 -13
  12. package/dist/cjs/socket-io-provider.js +2 -2
  13. package/dist/cjs/version-wrapper.js +1 -1
  14. package/dist/es2019/analytics/analytics-helper.js +2 -2
  15. package/dist/es2019/analytics/ufo.js +1 -1
  16. package/dist/es2019/api/api.js +1 -1
  17. package/dist/es2019/channel.js +7 -7
  18. package/dist/es2019/document/document-service.js +8 -9
  19. package/dist/es2019/entry-points/provider.js +1 -0
  20. package/dist/es2019/entry-points/sleep-detector.js +1 -0
  21. package/dist/es2019/entry-points/socket-io-provider.js +1 -0
  22. package/dist/es2019/entry-points/types.js +1 -0
  23. package/dist/es2019/entry-points/version-wrapper.js +1 -0
  24. package/dist/es2019/errors/error-code-mapper.js +2 -2
  25. package/dist/es2019/helpers/utils.js +0 -1
  26. package/dist/es2019/participants/participants-service.js +2 -2
  27. package/dist/es2019/participants/telepointers-helper.js +2 -2
  28. package/dist/es2019/provider/commit-step.js +9 -7
  29. package/dist/es2019/provider/index.js +13 -13
  30. package/dist/es2019/socket-io-provider.js +2 -2
  31. package/dist/es2019/version-wrapper.js +1 -1
  32. package/dist/esm/analytics/analytics-helper.js +2 -2
  33. package/dist/esm/analytics/ufo.js +1 -1
  34. package/dist/esm/api/api.js +1 -1
  35. package/dist/esm/channel.js +7 -7
  36. package/dist/esm/document/document-service.js +8 -9
  37. package/dist/esm/entry-points/provider.js +1 -0
  38. package/dist/esm/entry-points/sleep-detector.js +1 -0
  39. package/dist/esm/entry-points/socket-io-provider.js +1 -0
  40. package/dist/esm/entry-points/types.js +1 -0
  41. package/dist/esm/entry-points/version-wrapper.js +1 -0
  42. package/dist/esm/errors/error-code-mapper.js +2 -2
  43. package/dist/esm/helpers/utils.js +0 -1
  44. package/dist/esm/participants/participants-service.js +2 -2
  45. package/dist/esm/participants/telepointers-helper.js +2 -2
  46. package/dist/esm/provider/commit-step.js +12 -9
  47. package/dist/esm/provider/index.js +13 -13
  48. package/dist/esm/socket-io-provider.js +2 -2
  49. package/dist/esm/version-wrapper.js +1 -1
  50. package/dist/types/api/api.d.ts +1 -1
  51. package/dist/types/channel.d.ts +4 -4
  52. package/dist/types/document/catchupv2.d.ts +1 -1
  53. package/dist/types/document/document-service.d.ts +8 -8
  54. package/dist/types/document/getConflictChanges.d.ts +2 -2
  55. package/dist/types/document/interface-document-service.d.ts +2 -2
  56. package/dist/types/document/null-document-service.d.ts +1 -1
  57. package/dist/types/errors/error-code-mapper.d.ts +1 -1
  58. package/dist/types/helpers/utils.d.ts +3 -3
  59. package/dist/types/participants/participants-state.d.ts +1 -1
  60. package/dist/types/participants/telepointers-helper.d.ts +1 -1
  61. package/dist/types/provider/commit-step.d.ts +3 -3
  62. package/dist/types/provider/get-offline-steps-length.d.ts +1 -1
  63. package/dist/types/provider/index.d.ts +4 -4
  64. package/dist/types/socket-io-provider.d.ts +1 -1
  65. package/dist/types/types.d.ts +5 -5
  66. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 28.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`fcc5d229eacdb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fcc5d229eacdb) -
8
+ Carry complete agent display identity through the shared update-command adapter and collaboration
9
+ step attribution while preserving account ID semantics.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 28.2.1
4
16
 
5
17
  ### Patch Changes
@@ -10,10 +10,10 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
- var _const = require("../helpers/const");
14
- var _versionWrapper = require("../version-wrapper");
15
13
  var _singleton = require("../connectivity/singleton");
16
14
  var _customErrors = require("../errors/custom-errors");
15
+ var _const = require("../helpers/const");
16
+ var _versionWrapper = require("../version-wrapper");
17
17
  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; }
18
18
  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; }
19
19
  var EVENT_SUBJECT = 'collab';
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.createDocInitExp = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _experienceTypes = require("@atlaskit/ufo/experience-types");
10
9
  var _experience = require("@atlaskit/ufo/experience");
10
+ var _experienceTypes = require("@atlaskit/ufo/experience-types");
11
11
  var createDocumentInitExperience = function createDocumentInitExperience() {
12
12
  return new _experience.UFOExperience('collab-provider.document-init', {
13
13
  type: _experienceTypes.ExperienceTypes.Load,
@@ -14,8 +14,8 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
14
14
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
15
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
16
  var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
17
- var _utils = require("../helpers/utils");
18
17
  var _getActiveTraceHttpRequestHeaders = require("@atlaskit/react-ufo/get-active-trace-http-request-headers");
18
+ var _utils = require("../helpers/utils");
19
19
  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; }
20
20
  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; }
21
21
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
@@ -13,19 +13,19 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
13
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
+ var _bindEventListener = require("bind-event-listener");
16
17
  var _utilServiceSupport = require("@atlaskit/util-service-support");
17
- var _emitter = require("./emitter");
18
- var _utils = require("./helpers/utils");
19
18
  var _performance = require("./analytics/performance");
20
- var _const = require("./helpers/const");
21
- var _reconnectHelper = _interopRequireDefault(require("./connectivity/reconnect-helper"));
22
19
  var _ufo = require("./analytics/ufo");
23
- var _disconnectedReasonMapper = require("./disconnected-reason-mapper");
24
20
  var _network = _interopRequireDefault(require("./connectivity/network"));
21
+ var _reconnectHelper = _interopRequireDefault(require("./connectivity/reconnect-helper"));
22
+ var _disconnectedReasonMapper = require("./disconnected-reason-mapper");
23
+ var _emitter = require("./emitter");
24
+ var _customErrors = require("./errors/custom-errors");
25
25
  var _internalErrors = require("./errors/internal-errors");
26
26
  var _ncsErrors = require("./errors/ncs-errors");
27
- var _customErrors = require("./errors/custom-errors");
28
- var _bindEventListener = require("bind-event-listener");
27
+ var _const = require("./helpers/const");
28
+ var _utils = require("./helpers/utils");
29
29
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
30
30
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
31
31
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -12,30 +12,28 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
12
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
14
  var _throttle = _interopRequireDefault(require("lodash/throttle"));
15
- var _transformOverride = require("@atlaskit/editor-prosemirror/transform-override");
16
- var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
17
- var _state = require("@atlaskit/editor-prosemirror/state");
18
15
  var _JSONTransformer = require("@atlaskit/editor-json-transformer/JSONTransformer-2");
16
+ var _state = require("@atlaskit/editor-prosemirror/state");
17
+ var _transformOverride = require("@atlaskit/editor-prosemirror/transform-override");
19
18
  var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
20
19
  var _fg = require("@atlaskit/platform-feature-flags/fg");
20
+ var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
21
21
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
- var _const = require("../helpers/const");
23
22
  var _performance = require("../analytics/performance");
23
+ var _customErrors = require("../errors/custom-errors");
24
24
  var _internalErrors = require("../errors/internal-errors");
25
+ var _const = require("../helpers/const");
25
26
  var _utils = require("../helpers/utils");
26
27
  var _provider = require("../provider");
27
28
  var _commitStep = require("../provider/commit-step");
28
- var _customErrors = require("../errors/custom-errors");
29
29
  var _catchupv = require("./catchupv2");
30
- var _stepQueueState = require("./step-queue-state");
31
30
  var _getConflictChanges = require("./getConflictChanges");
31
+ var _stepQueueState = require("./step-queue-state");
32
32
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
33
33
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
34
34
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
35
35
  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; }
36
- 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; }
37
- // oxlint-disable-next-line @atlassian/no-restricted-imports
38
-
36
+ 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; } // oxlint-disable-next-line @atlassian/no-restricted-imports
39
37
  var CATCHUP_THROTTLE = 1 * 1000; // 1 second
40
38
 
41
39
  var noop = function noop() {};
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.errorCodeMapper = void 0;
7
+ var _collab = require("@atlaskit/editor-common/collab");
7
8
  var _fg = require("@atlaskit/platform-feature-flags/fg");
8
- var _ncsErrors = require("./ncs-errors");
9
9
  var _internalErrors = require("./internal-errors");
10
- var _collab = require("@atlaskit/editor-common/collab");
10
+ var _ncsErrors = require("./ncs-errors");
11
11
  /*
12
12
  * Maps internal collab provider errors to an emitted error format
13
13
  */
@@ -14,10 +14,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
14
14
  var _fg = require("@atlaskit/platform-feature-flags/fg");
15
15
  var _disconnectedReasonMapper = require("../disconnected-reason-mapper");
16
16
  var _const = require("../helpers/const");
17
- var _telepointersHelper = require("./telepointers-helper");
17
+ var _utils = require("../helpers/utils");
18
18
  var _participantsHelper = require("./participants-helper");
19
19
  var _participantsState = require("./participants-state");
20
- var _utils = require("../helpers/utils");
20
+ var _telepointersHelper = require("./telepointers-helper");
21
21
  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; }
22
22
  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; }
23
23
  var logger = (0, _utils.createLogger)('PresenceService', 'pink');
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.telepointerFromStep = exports.telepointerCallback = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
- var _utils = require("../helpers/utils");
11
- var _experienceTypes = require("@atlaskit/ufo/experience-types");
12
10
  var _experience = require("@atlaskit/ufo/experience");
11
+ var _experienceTypes = require("@atlaskit/ufo/experience-types");
12
+ var _utils = require("../helpers/utils");
13
13
  var _types = require("../types");
14
14
  var logger = (0, _utils.createLogger)('Telepointer', 'green');
15
15
  var telepointerFromStep = exports.telepointerFromStep = function telepointerFromStep(participants, step) {
@@ -9,12 +9,12 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
11
  var _countBy = _interopRequireDefault(require("lodash/countBy"));
12
- var _const = require("../helpers/const");
13
- var _types = require("../types");
14
- var _ncsErrors = require("../errors/ncs-errors");
15
- var _utils = require("../helpers/utils");
16
12
  var _transactionAgentAttribution = require("@atlaskit/editor-common/transaction-agent-attribution");
17
13
  var _fg = require("@atlaskit/platform-feature-flags/fg");
14
+ var _ncsErrors = require("../errors/ncs-errors");
15
+ var _const = require("../helpers/const");
16
+ var _utils = require("../helpers/utils");
17
+ var _types = require("../types");
18
18
  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; }
19
19
  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; }
20
20
  var logger = (0, _utils.createLogger)('commit-step', 'black');
@@ -83,11 +83,14 @@ var CommitStepService = exports.CommitStepService = /*#__PURE__*/function () {
83
83
  return _objectSpread(_objectSpread({}, step.toJSON()), {}, {
84
84
  clientId: clientId,
85
85
  userId: userId
86
- }, agentAttribution ? _objectSpread({
87
- agentType: agentAttribution.agentType
88
- }, agentAttribution.agentId !== undefined ? {
89
- agentId: agentAttribution.agentId
90
- } : {}) : {});
86
+ }, agentAttribution ? {
87
+ agentId: agentAttribution.agentId,
88
+ agentName: agentAttribution.agentName,
89
+ agentNamedId: agentAttribution.agentNamedId,
90
+ agentSourceId: agentAttribution.agentSourceId,
91
+ agentType: agentAttribution.agentType,
92
+ isThirdPartyAgent: agentAttribution.isThirdParty
93
+ } : {});
91
94
  });
92
95
 
93
96
  // Mutate steps to ignore expand expand/collapse changes in live pages
@@ -15,26 +15,26 @@ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
15
15
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _uuid = require("uuid");
18
- var _fg = require("@atlaskit/platform-feature-flags/fg");
19
- var _emitter = require("../emitter");
20
- var _channel = require("../channel");
21
18
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
22
- var _utils = require("../helpers/utils");
19
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
23
20
  var _analyticsHelper = _interopRequireDefault(require("../analytics/analytics-helper"));
24
- var _telepointersHelper = require("../participants/telepointers-helper");
25
- var _customErrors = require("../errors/custom-errors");
26
- var _ncsErrors = require("../errors/ncs-errors");
27
- var _metadataService = require("../metadata/metadata-service");
21
+ var _performance = require("../analytics/performance");
22
+ var _api = require("../api/api");
23
+ var _nullApi = require("../api/null-api");
24
+ var _channel = require("../channel");
28
25
  var _documentService = require("../document/document-service");
29
26
  var _nullDocumentService = require("../document/null-document-service");
30
- var _namespaceService = require("../namespace/namespace-service");
31
- var _participantsService = require("../participants/participants-service");
27
+ var _emitter = require("../emitter");
28
+ var _customErrors = require("../errors/custom-errors");
32
29
  var _errorCodeMapper = require("../errors/error-code-mapper");
33
30
  var _internalErrors = require("../errors/internal-errors");
31
+ var _ncsErrors = require("../errors/ncs-errors");
34
32
  var _const = require("../helpers/const");
35
- var _api = require("../api/api");
36
- var _performance = require("../analytics/performance");
37
- var _nullApi = require("../api/null-api");
33
+ var _utils = require("../helpers/utils");
34
+ var _metadataService = require("../metadata/metadata-service");
35
+ var _namespaceService = require("../namespace/namespace-service");
36
+ var _participantsService = require("../participants/participants-service");
37
+ var _telepointersHelper = require("../participants/telepointers-helper");
38
38
  var _getOfflineStepsLength = require("./get-offline-steps-length");
39
39
  var _sleepDetector = require("./sleep-detector");
40
40
  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; }
@@ -9,9 +9,9 @@ exports.createSocketIOSocket = createSocketIOSocket;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _socket = require("socket.io-client");
11
11
  var _fg = require("@atlaskit/platform-feature-flags/fg");
12
- var _provider = require("./provider");
13
- var _utils = require("./helpers/utils");
14
12
  var _config = require("./config");
13
+ var _utils = require("./helpers/utils");
14
+ var _provider = require("./provider");
15
15
  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
16
  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
17
  function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path, documentAri) {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/collab-provider";
8
- var version = exports.version = "28.2.0";
8
+ var version = exports.version = "28.2.1";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -1,7 +1,7 @@
1
- import { EVENT_ACTION } from '../helpers/const';
2
- import { name as packageName, version as packageVersion } from '../version-wrapper';
3
1
  import { network } from '../connectivity/singleton';
4
2
  import { CustomError } from '../errors/custom-errors';
3
+ import { EVENT_ACTION } from '../helpers/const';
4
+ import { name as packageName, version as packageVersion } from '../version-wrapper';
5
5
  const EVENT_SUBJECT = 'collab';
6
6
  const loggableErrorName = ['RangeError', 'TypeError', 'TransformError', 'NodeNestingTransformError'];
7
7
  var COLLAB_SERVICE = /*#__PURE__*/function (COLLAB_SERVICE) {
@@ -1,5 +1,5 @@
1
- import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
2
1
  import { UFOExperience } from '@atlaskit/ufo/experience';
2
+ import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
3
3
  const createDocumentInitExperience = () => new UFOExperience('collab-provider.document-init', {
4
4
  type: ExperienceTypes.Load,
5
5
  performanceType: ExperiencePerformanceTypes.Custom,
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { getProduct, getSubProduct, createLogger } from '../helpers/utils';
3
2
  import { getActiveTraceHttpRequestHeaders } from '@atlaskit/react-ufo/get-active-trace-http-request-headers';
3
+ import { getProduct, getSubProduct, createLogger } from '../helpers/utils';
4
4
  const logger = createLogger('Api', 'blue');
5
5
  class AddCommentError extends Error {
6
6
  constructor(message, status, meta) {
@@ -1,17 +1,17 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { bind } from 'bind-event-listener';
2
3
  import { utils } from '@atlaskit/util-service-support';
3
- import { Emitter } from './emitter';
4
- import { createLogger, getProduct, getSubProduct } from './helpers/utils';
5
4
  import { MEASURE_NAME, startMeasure, stopMeasure } from './analytics/performance';
6
- import { EVENT_ACTION, EVENT_STATUS } from './helpers/const';
7
- import ReconnectHelper from './connectivity/reconnect-helper';
8
5
  import { createDocInitExp } from './analytics/ufo';
9
- import { socketIOReasons } from './disconnected-reason-mapper';
10
6
  import Network from './connectivity/network';
7
+ import ReconnectHelper from './connectivity/reconnect-helper';
8
+ import { socketIOReasons } from './disconnected-reason-mapper';
9
+ import { Emitter } from './emitter';
10
+ import { NotConnectedError, NotInitializedError } from './errors/custom-errors';
11
11
  import { INTERNAL_ERROR_CODE } from './errors/internal-errors';
12
12
  import { NCS_ERROR_CODE } from './errors/ncs-errors';
13
- import { NotConnectedError, NotInitializedError } from './errors/custom-errors';
14
- import { bind } from 'bind-event-listener';
13
+ import { EVENT_ACTION, EVENT_STATUS } from './helpers/const';
14
+ import { createLogger, getProduct, getSubProduct } from './helpers/utils';
15
15
  const logger = createLogger('Channel', 'green');
16
16
  export class Channel extends Emitter {
17
17
  constructor(config, analyticsHelper) {
@@ -1,25 +1,24 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ // oxlint-disable-next-line @atlassian/no-restricted-imports
3
+
2
4
  import throttle from 'lodash/throttle';
3
- import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
4
- import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
5
- import { Transaction } from '@atlaskit/editor-prosemirror/state';
6
5
  import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
6
+ import { Transaction } from '@atlaskit/editor-prosemirror/state';
7
+ import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
7
8
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
8
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
+ import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
9
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
- import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
11
12
  import { MEASURE_NAME, startMeasure, stopMeasure } from '../analytics/performance';
13
+ import { CantSyncUpError, UpdateDocumentError } from '../errors/custom-errors';
12
14
  import { INTERNAL_ERROR_CODE } from '../errors/internal-errors';
15
+ import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
13
16
  import { createLogger, getAgentProviderId, getDocAdfWithObfuscationFromJSON, getObfuscatedSteps, getStepUGCFreeDetails, normalizeAgentId, sleep } from '../helpers/utils';
14
17
  import { MAX_STEP_REJECTED_ERROR, MAX_STEP_REJECTED_ERROR_AGGRESSIVE } from '../provider';
15
18
  import { CommitStepService } from '../provider/commit-step';
16
- import { CantSyncUpError, UpdateDocumentError } from '../errors/custom-errors';
17
19
  import { catchupv2 } from './catchupv2';
18
- import { StepQueueState } from './step-queue-state';
19
20
  import { getConflictChanges } from './getConflictChanges';
20
-
21
- // oxlint-disable-next-line @atlassian/no-restricted-imports
22
-
21
+ import { StepQueueState } from './step-queue-state';
23
22
  const CATCHUP_THROTTLE = 1 * 1000; // 1 second
24
23
 
25
24
  const noop = () => {};
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { Provider } from '../provider/index';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { acquireSleepDetector, getMaxGapSince, onSuspension } from '../provider/sleep-detector';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { createSocketIOCollabProvider, createSocketIOSocket } from '../socket-io-provider';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { AcknowledgementResponseTypes } from '../types';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { name, nextMajorVersion, version } from '../version-wrapper';
@@ -1,7 +1,7 @@
1
+ import { PROVIDER_ERROR_CODE } from '@atlaskit/editor-common/collab';
1
2
  import { fg } from '@atlaskit/platform-feature-flags/fg';
2
- import { NCS_ERROR_CODE } from './ncs-errors';
3
3
  import { INTERNAL_ERROR_CODE } from './internal-errors';
4
- import { PROVIDER_ERROR_CODE } from '@atlaskit/editor-common/collab';
4
+ import { NCS_ERROR_CODE } from './ncs-errors';
5
5
 
6
6
  /*
7
7
  * Maps internal collab provider errors to an emitted error format
@@ -1,7 +1,6 @@
1
1
  import { scrubAdf } from '@atlaskit/adf-utils/scrub';
2
2
  import { sendableSteps } from '@atlaskit/prosemirror-collab';
3
3
  import { CustomError } from '../errors/custom-errors';
4
-
5
4
  // eslint-disable-next-line require-unicode-regexp
6
5
  const GCP_TENANT_PATTERN = /^.*-cdp-\w+\.jira-dev\.com$/;
7
6
  export const createLogger = (prefix, color = 'blue') =>
@@ -2,10 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { fg } from '@atlaskit/platform-feature-flags/fg';
3
3
  import { disconnectedReasonMapper } from '../disconnected-reason-mapper';
4
4
  import { EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
5
- import { telepointerFromStep } from './telepointers-helper';
5
+ import { createLogger, isAIProviderID } from '../helpers/utils';
6
6
  import { createParticipantFromPayload as enrichParticipant, fetchParticipants, PARTICIPANT_UPDATE_INTERVAL } from './participants-helper';
7
7
  import { ParticipantsState } from './participants-state';
8
- import { createLogger, isAIProviderID } from '../helpers/utils';
8
+ import { telepointerFromStep } from './telepointers-helper';
9
9
  const logger = createLogger('PresenceService', 'pink');
10
10
  const SEND_PRESENCE_INTERVAL = 150 * 1000; // 150 seconds
11
11
  const DEFAULT_FETCH_USERS_INTERVAL = 500; // 0.5 second
@@ -1,6 +1,6 @@
1
- import { createLogger } from '../helpers/utils';
2
- import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
3
1
  import { UFOExperience } from '@atlaskit/ufo/experience';
2
+ import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
3
+ import { createLogger } from '../helpers/utils';
4
4
  import { AcknowledgementResponseTypes } from '../types';
5
5
  const logger = createLogger('Telepointer', 'green');
6
6
  export const telepointerFromStep = (participants, step) => {
@@ -1,10 +1,10 @@
1
1
  import countBy from 'lodash/countBy';
2
- import { ADD_STEPS_TYPE, EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
3
- import { AcknowledgementResponseTypes } from '../types';
4
- import { NCS_ERROR_CODE } from '../errors/ncs-errors';
5
- import { createLogger } from '../helpers/utils';
6
2
  import { AGENT_ATTRIBUTION_META } from '@atlaskit/editor-common/transaction-agent-attribution';
7
3
  import { fg } from '@atlaskit/platform-feature-flags/fg';
4
+ import { NCS_ERROR_CODE } from '../errors/ncs-errors';
5
+ import { ADD_STEPS_TYPE, EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
6
+ import { createLogger } from '../helpers/utils';
7
+ import { AcknowledgementResponseTypes } from '../types';
8
8
  const logger = createLogger('commit-step', 'black');
9
9
  export const RESET_READYTOCOMMIT_INTERVAL_MS = 5000;
10
10
  export class CommitStepService {
@@ -70,10 +70,12 @@ export class CommitStepService {
70
70
  clientId,
71
71
  userId,
72
72
  ...(agentAttribution ? {
73
+ agentId: agentAttribution.agentId,
74
+ agentName: agentAttribution.agentName,
75
+ agentNamedId: agentAttribution.agentNamedId,
76
+ agentSourceId: agentAttribution.agentSourceId,
73
77
  agentType: agentAttribution.agentType,
74
- ...(agentAttribution.agentId !== undefined ? {
75
- agentId: agentAttribution.agentId
76
- } : {})
78
+ isThirdPartyAgent: agentAttribution.isThirdParty
77
79
  } : {})
78
80
  };
79
81
  });
@@ -1,26 +1,26 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
3
  import { v4 as uuidv4 } from 'uuid';
4
- import { fg } from '@atlaskit/platform-feature-flags/fg';
5
- import { Emitter } from '../emitter';
6
- import { Channel } from '../channel';
7
4
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
- import { createLogger, logObfuscatedSteps } from '../helpers/utils';
5
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
9
6
  import AnalyticsHelper from '../analytics/analytics-helper';
10
- import { telepointerCallback } from '../participants/telepointers-helper';
11
- import { CustomError, DestroyError, GetCurrentStateError, GetFinalAcknowledgedStateError, NotConnectedError, NotInitializedError, ProviderInitialisationError, SendTransactionError, SetEditorWidthError, SetMetadataError, SetTitleError } from '../errors/custom-errors';
12
- import { NCS_ERROR_CODE } from '../errors/ncs-errors';
13
- import { MetadataService } from '../metadata/metadata-service';
7
+ import { shouldTelepointerBeSampled } from '../analytics/performance';
8
+ import { Api } from '../api/api';
9
+ import { NullApi } from '../api/null-api';
10
+ import { Channel } from '../channel';
14
11
  import { DocumentService } from '../document/document-service';
15
12
  import { NullDocumentService } from '../document/null-document-service';
16
- import { NamespaceService } from '../namespace/namespace-service';
17
- import { ParticipantsService } from '../participants/participants-service';
13
+ import { Emitter } from '../emitter';
14
+ import { CustomError, DestroyError, GetCurrentStateError, GetFinalAcknowledgedStateError, NotConnectedError, NotInitializedError, ProviderInitialisationError, SendTransactionError, SetEditorWidthError, SetMetadataError, SetTitleError } from '../errors/custom-errors';
18
15
  import { errorCodeMapper } from '../errors/error-code-mapper';
19
16
  import { INTERNAL_ERROR_CODE } from '../errors/internal-errors';
17
+ import { NCS_ERROR_CODE } from '../errors/ncs-errors';
20
18
  import { EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
21
- import { Api } from '../api/api';
22
- import { shouldTelepointerBeSampled } from '../analytics/performance';
23
- import { NullApi } from '../api/null-api';
19
+ import { createLogger, logObfuscatedSteps } from '../helpers/utils';
20
+ import { MetadataService } from '../metadata/metadata-service';
21
+ import { NamespaceService } from '../namespace/namespace-service';
22
+ import { ParticipantsService } from '../participants/participants-service';
23
+ import { telepointerCallback } from '../participants/telepointers-helper';
24
24
  import { getOfflineStepsLength, getOfflineReplaceStepsLength } from './get-offline-steps-length';
25
25
  import { acquireSleepDetector, getMaxGapSince } from './sleep-detector';
26
26
  const logger = createLogger('Provider', 'black');
@@ -1,8 +1,8 @@
1
1
  import { io } from 'socket.io-client';
2
2
  import { fg } from '@atlaskit/platform-feature-flags/fg';
3
- import { Provider } from './provider';
4
- import { getProduct, getSubProduct, isGCPtenant } from './helpers/utils';
5
3
  import { SOCKET_IO_OPTIONS, SOCKET_IO_OPTIONS_WITH_HIGH_JITTER } from './config';
4
+ import { getProduct, getSubProduct, isGCPtenant } from './helpers/utils';
5
+ import { Provider } from './provider';
6
6
  export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path, documentAri) {
7
7
  const {
8
8
  pathname,
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "28.2.0";
2
+ export const version = "28.2.1";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -5,10 +5,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  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; }
7
7
  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) { _defineProperty(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; }
8
- import { EVENT_ACTION } from '../helpers/const';
9
- import { name as packageName, version as packageVersion } from '../version-wrapper';
10
8
  import { network } from '../connectivity/singleton';
11
9
  import { CustomError } from '../errors/custom-errors';
10
+ import { EVENT_ACTION } from '../helpers/const';
11
+ import { name as packageName, version as packageVersion } from '../version-wrapper';
12
12
  var EVENT_SUBJECT = 'collab';
13
13
  var loggableErrorName = ['RangeError', 'TypeError', 'TransformError', 'NodeNestingTransformError'];
14
14
  var COLLAB_SERVICE = /*#__PURE__*/function (COLLAB_SERVICE) {
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
3
2
  import { UFOExperience } from '@atlaskit/ufo/experience';
3
+ import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
4
4
  var createDocumentInitExperience = function createDocumentInitExperience() {
5
5
  return new UFOExperience('collab-provider.document-init', {
6
6
  type: ExperienceTypes.Load,
@@ -11,8 +11,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
11
11
  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) { _defineProperty(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; }
12
12
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
13
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
- import { getProduct, getSubProduct, createLogger } from '../helpers/utils';
15
14
  import { getActiveTraceHttpRequestHeaders } from '@atlaskit/react-ufo/get-active-trace-http-request-headers';
15
+ import { getProduct, getSubProduct, createLogger } from '../helpers/utils';
16
16
  var logger = createLogger('Api', 'blue');
17
17
  var AddCommentError = /*#__PURE__*/function (_Error) {
18
18
  function AddCommentError(message, status, meta) {
@@ -13,19 +13,19 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
13
13
  import _regeneratorRuntime from "@babel/runtime/regenerator";
14
14
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15
15
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
16
+ import { bind } from 'bind-event-listener';
16
17
  import { utils } from '@atlaskit/util-service-support';
17
- import { Emitter } from './emitter';
18
- import { createLogger, getProduct, getSubProduct } from './helpers/utils';
19
18
  import { MEASURE_NAME, startMeasure, stopMeasure } from './analytics/performance';
20
- import { EVENT_ACTION, EVENT_STATUS } from './helpers/const';
21
- import ReconnectHelper from './connectivity/reconnect-helper';
22
19
  import { createDocInitExp } from './analytics/ufo';
23
- import { socketIOReasons } from './disconnected-reason-mapper';
24
20
  import Network from './connectivity/network';
21
+ import ReconnectHelper from './connectivity/reconnect-helper';
22
+ import { socketIOReasons } from './disconnected-reason-mapper';
23
+ import { Emitter } from './emitter';
24
+ import { NotConnectedError, NotInitializedError } from './errors/custom-errors';
25
25
  import { INTERNAL_ERROR_CODE } from './errors/internal-errors';
26
26
  import { NCS_ERROR_CODE } from './errors/ncs-errors';
27
- import { NotConnectedError, NotInitializedError } from './errors/custom-errors';
28
- import { bind } from 'bind-event-listener';
27
+ import { EVENT_ACTION, EVENT_STATUS } from './helpers/const';
28
+ import { createLogger, getProduct, getSubProduct } from './helpers/utils';
29
29
  var logger = createLogger('Channel', 'green');
30
30
  export var Channel = /*#__PURE__*/function (_Emitter) {
31
31
  function Channel(config, analyticsHelper) {
@@ -9,27 +9,26 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
9
9
  import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  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; }
11
11
  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) { _defineProperty(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; }
12
+ // oxlint-disable-next-line @atlassian/no-restricted-imports
13
+
12
14
  import throttle from 'lodash/throttle';
13
- import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
14
- import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
15
- import { Transaction } from '@atlaskit/editor-prosemirror/state';
16
15
  import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
16
+ import { Transaction } from '@atlaskit/editor-prosemirror/state';
17
+ import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
17
18
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
18
19
  import { fg } from '@atlaskit/platform-feature-flags/fg';
20
+ import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
19
21
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
- import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
21
22
  import { MEASURE_NAME, startMeasure, stopMeasure } from '../analytics/performance';
23
+ import { CantSyncUpError, UpdateDocumentError } from '../errors/custom-errors';
22
24
  import { INTERNAL_ERROR_CODE } from '../errors/internal-errors';
25
+ import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
23
26
  import { createLogger, getAgentProviderId, getDocAdfWithObfuscationFromJSON, getObfuscatedSteps, getStepUGCFreeDetails, normalizeAgentId, sleep } from '../helpers/utils';
24
27
  import { MAX_STEP_REJECTED_ERROR, MAX_STEP_REJECTED_ERROR_AGGRESSIVE } from '../provider';
25
28
  import { CommitStepService } from '../provider/commit-step';
26
- import { CantSyncUpError, UpdateDocumentError } from '../errors/custom-errors';
27
29
  import { catchupv2 } from './catchupv2';
28
- import { StepQueueState } from './step-queue-state';
29
30
  import { getConflictChanges } from './getConflictChanges';
30
-
31
- // oxlint-disable-next-line @atlassian/no-restricted-imports
32
-
31
+ import { StepQueueState } from './step-queue-state';
33
32
  var CATCHUP_THROTTLE = 1 * 1000; // 1 second
34
33
 
35
34
  var noop = function noop() {};
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { Provider } from '../provider/index';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { acquireSleepDetector, getMaxGapSince, onSuspension } from '../provider/sleep-detector';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { createSocketIOCollabProvider, createSocketIOSocket } from '../socket-io-provider';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { AcknowledgementResponseTypes } from '../types';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { name, nextMajorVersion, version } from '../version-wrapper';
@@ -1,7 +1,7 @@
1
+ import { PROVIDER_ERROR_CODE } from '@atlaskit/editor-common/collab';
1
2
  import { fg } from '@atlaskit/platform-feature-flags/fg';
2
- import { NCS_ERROR_CODE } from './ncs-errors';
3
3
  import { INTERNAL_ERROR_CODE } from './internal-errors';
4
- import { PROVIDER_ERROR_CODE } from '@atlaskit/editor-common/collab';
4
+ import { NCS_ERROR_CODE } from './ncs-errors';
5
5
 
6
6
  /*
7
7
  * Maps internal collab provider errors to an emitted error format
@@ -6,7 +6,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
6
6
  import { scrubAdf } from '@atlaskit/adf-utils/scrub';
7
7
  import { sendableSteps } from '@atlaskit/prosemirror-collab';
8
8
  import { CustomError } from '../errors/custom-errors';
9
-
10
9
  // eslint-disable-next-line require-unicode-regexp
11
10
  var GCP_TENANT_PATTERN = /^.*-cdp-\w+\.jira-dev\.com$/;
12
11
  export var createLogger = function createLogger(prefix) {
@@ -9,10 +9,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
10
  import { disconnectedReasonMapper } from '../disconnected-reason-mapper';
11
11
  import { EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
12
- import { telepointerFromStep } from './telepointers-helper';
12
+ import { createLogger, isAIProviderID } from '../helpers/utils';
13
13
  import { createParticipantFromPayload as enrichParticipant, fetchParticipants, PARTICIPANT_UPDATE_INTERVAL } from './participants-helper';
14
14
  import { ParticipantsState } from './participants-state';
15
- import { createLogger, isAIProviderID } from '../helpers/utils';
15
+ import { telepointerFromStep } from './telepointers-helper';
16
16
  var logger = createLogger('PresenceService', 'pink');
17
17
  var SEND_PRESENCE_INTERVAL = 150 * 1000; // 150 seconds
18
18
  var DEFAULT_FETCH_USERS_INTERVAL = 500; // 0.5 second
@@ -1,8 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
- import { createLogger } from '../helpers/utils';
4
- import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
5
3
  import { UFOExperience } from '@atlaskit/ufo/experience';
4
+ import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
5
+ import { createLogger } from '../helpers/utils';
6
6
  import { AcknowledgementResponseTypes } from '../types';
7
7
  var logger = createLogger('Telepointer', 'green');
8
8
  export var telepointerFromStep = function telepointerFromStep(participants, step) {
@@ -4,12 +4,12 @@ import _createClass from "@babel/runtime/helpers/createClass";
4
4
  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; }
5
5
  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) { _defineProperty(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; }
6
6
  import countBy from 'lodash/countBy';
7
- import { ADD_STEPS_TYPE, EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
8
- import { AcknowledgementResponseTypes } from '../types';
9
- import { NCS_ERROR_CODE } from '../errors/ncs-errors';
10
- import { createLogger } from '../helpers/utils';
11
7
  import { AGENT_ATTRIBUTION_META } from '@atlaskit/editor-common/transaction-agent-attribution';
12
8
  import { fg } from '@atlaskit/platform-feature-flags/fg';
9
+ import { NCS_ERROR_CODE } from '../errors/ncs-errors';
10
+ import { ADD_STEPS_TYPE, EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
11
+ import { createLogger } from '../helpers/utils';
12
+ import { AcknowledgementResponseTypes } from '../types';
13
13
  var logger = createLogger('commit-step', 'black');
14
14
  export var RESET_READYTOCOMMIT_INTERVAL_MS = 5000;
15
15
  export var CommitStepService = /*#__PURE__*/function () {
@@ -76,11 +76,14 @@ export var CommitStepService = /*#__PURE__*/function () {
76
76
  return _objectSpread(_objectSpread({}, step.toJSON()), {}, {
77
77
  clientId: clientId,
78
78
  userId: userId
79
- }, agentAttribution ? _objectSpread({
80
- agentType: agentAttribution.agentType
81
- }, agentAttribution.agentId !== undefined ? {
82
- agentId: agentAttribution.agentId
83
- } : {}) : {});
79
+ }, agentAttribution ? {
80
+ agentId: agentAttribution.agentId,
81
+ agentName: agentAttribution.agentName,
82
+ agentNamedId: agentAttribution.agentNamedId,
83
+ agentSourceId: agentAttribution.agentSourceId,
84
+ agentType: agentAttribution.agentType,
85
+ isThirdPartyAgent: agentAttribution.isThirdParty
86
+ } : {});
84
87
  });
85
88
 
86
89
  // Mutate steps to ignore expand expand/collapse changes in live pages
@@ -14,26 +14,26 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
14
14
  function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
15
15
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
16
16
  import { v4 as uuidv4 } from 'uuid';
17
- import { fg } from '@atlaskit/platform-feature-flags/fg';
18
- import { Emitter } from '../emitter';
19
- import { Channel } from '../channel';
20
17
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
21
- import { createLogger, logObfuscatedSteps } from '../helpers/utils';
18
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
22
19
  import AnalyticsHelper from '../analytics/analytics-helper';
23
- import { telepointerCallback } from '../participants/telepointers-helper';
24
- import { CustomError, DestroyError, GetCurrentStateError, GetFinalAcknowledgedStateError, NotConnectedError, NotInitializedError, ProviderInitialisationError, SendTransactionError, SetEditorWidthError, SetMetadataError, SetTitleError } from '../errors/custom-errors';
25
- import { NCS_ERROR_CODE } from '../errors/ncs-errors';
26
- import { MetadataService } from '../metadata/metadata-service';
20
+ import { shouldTelepointerBeSampled } from '../analytics/performance';
21
+ import { Api } from '../api/api';
22
+ import { NullApi } from '../api/null-api';
23
+ import { Channel } from '../channel';
27
24
  import { DocumentService } from '../document/document-service';
28
25
  import { NullDocumentService } from '../document/null-document-service';
29
- import { NamespaceService } from '../namespace/namespace-service';
30
- import { ParticipantsService } from '../participants/participants-service';
26
+ import { Emitter } from '../emitter';
27
+ import { CustomError, DestroyError, GetCurrentStateError, GetFinalAcknowledgedStateError, NotConnectedError, NotInitializedError, ProviderInitialisationError, SendTransactionError, SetEditorWidthError, SetMetadataError, SetTitleError } from '../errors/custom-errors';
31
28
  import { errorCodeMapper } from '../errors/error-code-mapper';
32
29
  import { INTERNAL_ERROR_CODE } from '../errors/internal-errors';
30
+ import { NCS_ERROR_CODE } from '../errors/ncs-errors';
33
31
  import { EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
34
- import { Api } from '../api/api';
35
- import { shouldTelepointerBeSampled } from '../analytics/performance';
36
- import { NullApi } from '../api/null-api';
32
+ import { createLogger, logObfuscatedSteps } from '../helpers/utils';
33
+ import { MetadataService } from '../metadata/metadata-service';
34
+ import { NamespaceService } from '../namespace/namespace-service';
35
+ import { ParticipantsService } from '../participants/participants-service';
36
+ import { telepointerCallback } from '../participants/telepointers-helper';
37
37
  import { getOfflineStepsLength, getOfflineReplaceStepsLength } from './get-offline-steps-length';
38
38
  import { acquireSleepDetector, getMaxGapSince } from './sleep-detector';
39
39
  var logger = createLogger('Provider', 'black');
@@ -3,9 +3,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  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) { _defineProperty(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; }
4
4
  import { io } from 'socket.io-client';
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
- import { Provider } from './provider';
7
- import { getProduct, getSubProduct, isGCPtenant } from './helpers/utils';
8
6
  import { SOCKET_IO_OPTIONS, SOCKET_IO_OPTIONS_WITH_HIGH_JITTER } from './config';
7
+ import { getProduct, getSubProduct, isGCPtenant } from './helpers/utils';
8
+ import { Provider } from './provider';
9
9
  export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path, documentAri) {
10
10
  var _URL = new URL(url),
11
11
  pathname = _URL.pathname,
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "28.2.0";
2
+ export var version = "28.2.1";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,6 +1,6 @@
1
- import type { Config } from '../types';
2
1
  import type { Channel } from '../channel';
3
2
  import type { DocumentService } from '../document/document-service';
3
+ import type { Config } from '../types';
4
4
  interface Step {
5
5
  stepType: string;
6
6
  }
@@ -1,9 +1,9 @@
1
- import { Emitter } from './emitter';
2
- import type { Config, ChannelEvent, Catchupv2Response, ReconcileResponse, GenerateDiffStepsResponseBody } from './types';
3
- import type { CatchupEventReason } from './helpers/const';
4
1
  import type { Socket } from 'socket.io-client';
5
- import type AnalyticsHelper from './analytics/analytics-helper';
6
2
  import type { Metadata } from '@atlaskit/editor-common/collab';
3
+ import type AnalyticsHelper from './analytics/analytics-helper';
4
+ import { Emitter } from './emitter';
5
+ import type { CatchupEventReason } from './helpers/const';
6
+ import type { Config, ChannelEvent, Catchupv2Response, ReconcileResponse, GenerateDiffStepsResponseBody } from './types';
7
7
  export declare class Channel extends Emitter<ChannelEvent> {
8
8
  private readonly RATE_LIMIT_TYPE_NONE;
9
9
  private readonly RATE_LIMIT_TYPE_SOFT;
@@ -1,5 +1,5 @@
1
- import type { Catchupv2Options } from '../types';
2
1
  import type { StepJson } from '@atlaskit/editor-common/collab';
2
+ import type { Catchupv2Options } from '../types';
3
3
  export declare const catchupv2: (opt: Catchupv2Options) => Promise<boolean>;
4
4
  /**
5
5
  * Checks if we're out of sync with the backend because catchup failed to apply, and thus the doc should be reset.
@@ -1,18 +1,18 @@
1
+ import type { DebouncedFunc } from 'lodash';
2
+ import type { ADFEntity } from '@atlaskit/adf-utils/types';
1
3
  import type { ResolvedEditorState, SyncUpErrorFunction, CollabEvents, CollabInitPayload } from '@atlaskit/editor-common/collab';
2
- import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
4
+ import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
5
+ import type { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
3
6
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
7
  import { Transaction } from '@atlaskit/editor-prosemirror/state';
5
- import type { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
6
- import type { Catchupv2Response, ChannelEvent, GenerateDiffStepsResponseBody, ReconcileResponse, ReconnectionMetadata, StepsPayload } from '../types';
7
- import type { MetadataService } from '../metadata/metadata-service';
8
- import { CatchupEventReason } from '../helpers/const';
8
+ import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
9
9
  import type AnalyticsHelper from '../analytics/analytics-helper';
10
10
  import type { InternalError } from '../errors/internal-errors';
11
+ import { CatchupEventReason } from '../helpers/const';
12
+ import type { MetadataService } from '../metadata/metadata-service';
11
13
  import type { ParticipantsService } from '../participants/participants-service';
14
+ import type { Catchupv2Response, ChannelEvent, GenerateDiffStepsResponseBody, ReconcileResponse, ReconnectionMetadata, StepsPayload } from '../types';
12
15
  import type { DocumentServiceInterface } from './interface-document-service';
13
- import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
14
- import type { ADFEntity } from '@atlaskit/adf-utils/types';
15
- import type { DebouncedFunc } from 'lodash';
16
16
  /**
17
17
  *
18
18
  */
@@ -1,6 +1,6 @@
1
- import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
2
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
1
  import type { ConflictChanges } from '@atlaskit/editor-common/collab';
2
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
4
4
  import type { Rebaseable } from '@atlaskit/prosemirror-collab';
5
5
  interface Options {
6
6
  localSteps: readonly Rebaseable[];
@@ -1,8 +1,8 @@
1
1
  import type { ResolvedEditorState, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
2
- import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
2
+ import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
3
3
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
4
5
  import type { InternalError } from '../errors/internal-errors';
5
- import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
6
6
  export interface DocumentServiceInterface {
7
7
  getCurrentPmVersion: () => number;
8
8
  getCurrentState: () => Promise<ResolvedEditorState>;
@@ -1,6 +1,6 @@
1
1
  import type { ResolvedEditorState } from '@atlaskit/editor-common/collab';
2
- import type { DocumentServiceInterface } from './interface-document-service';
3
2
  import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
3
+ import type { DocumentServiceInterface } from './interface-document-service';
4
4
  export declare class NullDocumentService implements DocumentServiceInterface {
5
5
  setup: () => this;
6
6
  updateDocument(): void;
@@ -1,3 +1,3 @@
1
- import type { InternalError } from './internal-errors';
2
1
  import type { ProviderError } from '@atlaskit/editor-common/collab';
2
+ import type { InternalError } from './internal-errors';
3
3
  export declare const errorCodeMapper: (error: InternalError) => ProviderError | undefined;
@@ -1,11 +1,11 @@
1
1
  import type { ADFEntity } from '@atlaskit/adf-utils/types';
2
- import type { ProductInformation } from '../types';
3
- import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
4
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
2
  import type { StepJson } from '@atlaskit/editor-common/collab';
6
3
  import type { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
7
4
  import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
5
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
6
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
8
7
  import { CustomError } from '../errors/custom-errors';
8
+ import type { ProductInformation } from '../types';
9
9
  export declare const createLogger: (prefix: string, color?: string) => (msg: string, data?: any) => void;
10
10
  export declare function sleep(ms: number): Promise<any>;
11
11
  /**
@@ -1,5 +1,5 @@
1
- import type { ParticipantsMap } from './participants-helper';
2
1
  import type { ProviderParticipant } from '@atlaskit/editor-common/collab';
2
+ import type { ParticipantsMap } from './participants-helper';
3
3
  export type ParticipantFilter = {
4
4
  isHydrated: boolean;
5
5
  };
@@ -1,4 +1,4 @@
1
- import type { AcknowledgementPayload } from '../types';
2
1
  import type { CollabTelepointerPayload, StepJson, ProviderParticipant } from '@atlaskit/editor-common/collab';
2
+ import type { AcknowledgementPayload } from '../types';
3
3
  export declare const telepointerFromStep: (participants: ProviderParticipant[], step: StepJson) => CollabTelepointerPayload | undefined;
4
4
  export declare const telepointerCallback: (documentAri: string) => ((response: AcknowledgementPayload) => void);
@@ -1,10 +1,10 @@
1
- import type { ChannelEvent, StepsPayload } from '../types';
2
1
  import type { CollabEvents } from '@atlaskit/editor-common/collab';
2
+ import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
3
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
4
  import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
4
5
  import type AnalyticsHelper from '../analytics/analytics-helper';
5
6
  import type { InternalError } from '../errors/internal-errors';
6
- import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
7
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
7
+ import type { ChannelEvent, StepsPayload } from '../types';
8
8
  export declare const RESET_READYTOCOMMIT_INTERVAL_MS = 5000;
9
9
  export declare class CommitStepService {
10
10
  private broadcast;
@@ -1,4 +1,4 @@
1
- import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
2
1
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
3
3
  export declare function getOfflineStepsLength(steps: readonly ProseMirrorStep[] | undefined, origins: readonly Transaction[] | undefined): number | undefined;
4
4
  export declare function getOfflineReplaceStepsLength(steps: readonly ProseMirrorStep[] | undefined, origins: readonly Transaction[] | undefined): number | undefined;
@@ -1,11 +1,11 @@
1
+ import type { CollabEditProvider, CollabEvents, CollabTelepointerPayload, ResolvedEditorState, Metadata, CollabInitPayload, SyncUpErrorFunction, CollabPresenceActivityChangePayload, CollabActivityAIProviderChangedPayload, ProviderParticipant } from '@atlaskit/editor-common/collab';
2
+ import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
1
3
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
4
  import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
3
- import { Emitter } from '../emitter';
4
- import type { Config } from '../types';
5
- import type { CollabEditProvider, CollabEvents, CollabTelepointerPayload, ResolvedEditorState, Metadata, CollabInitPayload, SyncUpErrorFunction, CollabPresenceActivityChangePayload, CollabActivityAIProviderChangedPayload, ProviderParticipant } from '@atlaskit/editor-common/collab';
6
5
  import { Api } from '../api/api';
7
6
  import { NullApi } from '../api/null-api';
8
- import type { GetResolvedEditorStateReason } from '@atlaskit/editor-common/types';
7
+ import { Emitter } from '../emitter';
8
+ import type { Config } from '../types';
9
9
  export declare const MAX_STEP_REJECTED_ERROR = 15;
10
10
  export declare const MAX_STEP_REJECTED_ERROR_AGGRESSIVE = 2;
11
11
  export declare class Provider extends Emitter<CollabEvents> implements CollabEditProvider<CollabEvents> {
@@ -1,6 +1,6 @@
1
1
  import type { Socket } from 'socket.io-client';
2
+ import type AnalyticsHelper from './analytics/analytics-helper';
2
3
  import { Provider } from './provider';
3
4
  import type { Config, ProductInformation, InitAndAuthData, AuthCallback } from './types';
4
- import type AnalyticsHelper from './analytics/analytics-helper';
5
5
  export declare function createSocketIOSocket(url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string, documentAri?: string): Socket;
6
6
  export declare function createSocketIOCollabProvider(config: Omit<Config, 'createSocket'>): Provider;
@@ -1,13 +1,13 @@
1
+ import type { Manager, Socket as SocketIOSocket } from 'socket.io-client';
1
2
  import type { AnalyticsWebClient } from '@atlaskit/analytics-listeners/types';
2
3
  import type { AnonymousAsset } from '@atlaskit/anonymous-assets';
3
- import type { Manager, Socket as SocketIOSocket } from 'socket.io-client';
4
- import type { InternalError } from './errors/internal-errors';
4
+ import type { StepJson, CollabSendableSelection, Metadata, UserPermitType, PresenceActivity, CollabRecoveryRequiredPayload } from '@atlaskit/editor-common/collab';
5
5
  import type { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
6
- import type { BatchProps, GetUserType } from './participants/participants-helper';
6
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
7
7
  import type AnalyticsHelper from './analytics/analytics-helper';
8
- import type { StepJson, CollabSendableSelection, Metadata, UserPermitType, PresenceActivity, CollabRecoveryRequiredPayload } from '@atlaskit/editor-common/collab';
8
+ import type { InternalError } from './errors/internal-errors';
9
9
  import type { CatchupEventReason } from './helpers/const';
10
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
10
+ import type { BatchProps, GetUserType } from './participants/participants-helper';
11
11
  export interface CollabEventDisconnectedData {
12
12
  reason: 'CLIENT_DISCONNECT' | 'SERVER_DISCONNECT' | 'SOCKET_CLOSED' | 'SOCKET_ERROR' | 'SOCKET_TIMEOUT' | 'UNKNOWN_DISCONNECT';
13
13
  sid: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "28.2.1",
3
+ "version": "28.3.0",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -75,6 +75,6 @@
75
75
  }
76
76
  },
77
77
  "peerDependencies": {
78
- "@atlaskit/editor-common": "^123.1.0"
78
+ "@atlaskit/editor-common": "^123.2.0"
79
79
  }
80
80
  }