@atlaskit/collab-provider 39.1.8 → 39.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 39.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 39.1.9
10
+
11
+ ### Patch Changes
12
+
13
+ - [`202f9b8386f13`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/202f9b8386f13) -
14
+ Migrate attributed version history checks to the platform_editor_attributed_version_history
15
+ experiment.
16
+ - Updated dependencies
17
+
3
18
  ## 39.1.8
4
19
 
5
20
  ### Patch Changes
@@ -16,6 +16,7 @@ var _JSONTransformer = require("@atlaskit/editor-json-transformer/JSONTransforme
16
16
  var _state = require("@atlaskit/editor-prosemirror/state");
17
17
  var _transformOverride = require("@atlaskit/editor-prosemirror/transform-override");
18
18
  var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
19
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
19
20
  var _fg = require("@atlaskit/platform-feature-flags/fg");
20
21
  var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
21
22
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -1028,7 +1029,7 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
1028
1029
  agentId = _ref10.agentId,
1029
1030
  agentName = _ref10.agentName,
1030
1031
  agentNamedId = _ref10.agentNamedId;
1031
- return _this3.participantsService.upsertAIProviderParticipantLocally(providerId, agentType, (0, _fg.fg)('confluence_ncs_step_diffing_version_history') ? {
1032
+ return _this3.participantsService.upsertAIProviderParticipantLocally(providerId, agentType, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_attributed_version_history') ? {
1032
1033
  agentId: agentId,
1033
1034
  agentName: agentName,
1034
1035
  agentNamedId: agentNamedId
@@ -95,7 +95,7 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
95
95
  sessionId: "".concat(providerId, "::").concat(defaultPresenceData.sessionId),
96
96
  userId: providerId,
97
97
  clientId: "".concat(providerId, "::").concat(defaultPresenceData.clientId)
98
- }, (0, _fg.fg)('confluence_ncs_step_diffing_version_history') && (0, _utils.isAIProviderID)(providerId) ? _objectSpread({
98
+ }, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_attributed_version_history') && (0, _utils.isAIProviderID)(providerId) ? _objectSpread({
99
99
  // Match the bare agent AAID used by step attribution rather than the synthetic
100
100
  // per-editor-session provider ID, so telepointer and diff colours share a seed.
101
101
  presenceId: providerId.slice('agent:'.length)
@@ -154,9 +154,9 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
154
154
  var sessionId = payload.sessionId;
155
155
  var existing = _this.participantsState.getBySessionId(sessionId);
156
156
  var hasAgentTypeChanged = (existing === null || existing === void 0 ? void 0 : existing.agentType) !== agentType;
157
- var agentId = (0, _fg.fg)('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentId = identity.agentId) === null || _identity$agentId === void 0 ? void 0 : _identity$agentId.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentId) : undefined;
158
- var name = (0, _fg.fg)('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentName = identity.agentName) === null || _identity$agentName === void 0 ? void 0 : _identity$agentName.trim()) || (existing === null || existing === void 0 ? void 0 : existing.name) || '' : '';
159
- var agentNamedId = (0, _fg.fg)('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentNamedI = identity.agentNamedId) === null || _identity$agentNamedI === void 0 ? void 0 : _identity$agentNamedI.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentNamedId) : undefined;
157
+ var agentId = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 || (_identity$agentId = identity.agentId) === null || _identity$agentId === void 0 ? void 0 : _identity$agentId.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentId) : undefined;
158
+ var name = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 || (_identity$agentName = identity.agentName) === null || _identity$agentName === void 0 ? void 0 : _identity$agentName.trim()) || (existing === null || existing === void 0 ? void 0 : existing.name) || '' : '';
159
+ var agentNamedId = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 || (_identity$agentNamedI = identity.agentNamedId) === null || _identity$agentNamedI === void 0 ? void 0 : _identity$agentNamedI.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentNamedId) : undefined;
160
160
  var wasInactive = existing ? Date.now() - existing.lastActive >= AGENT_PRESENCE_INACTIVE_MS : false;
161
161
  var participant = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload), (0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents') ? {
162
162
  presenceActivity: 'editor'
@@ -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 = "39.1.7";
8
+ var version = exports.version = "39.1.9";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -6,6 +6,7 @@ import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransform
6
6
  import { Transaction } from '@atlaskit/editor-prosemirror/state';
7
7
  import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
8
8
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
9
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
10
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
11
  import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
11
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -896,7 +897,7 @@ export class DocumentService {
896
897
  agentId,
897
898
  agentName,
898
899
  agentNamedId
899
- }, providerId) => this.participantsService.upsertAIProviderParticipantLocally(providerId, agentType, fg('confluence_ncs_step_diffing_version_history') ? {
900
+ }, providerId) => this.participantsService.upsertAIProviderParticipantLocally(providerId, agentType, isExperimentEnabled('platform_editor_attributed_version_history') ? {
900
901
  agentId,
901
902
  agentName,
902
903
  agentNamedId
@@ -79,7 +79,7 @@ export class ParticipantsService {
79
79
  sessionId: `${providerId}::${defaultPresenceData.sessionId}`,
80
80
  userId: providerId,
81
81
  clientId: `${providerId}::${defaultPresenceData.clientId}`,
82
- ...(fg('confluence_ncs_step_diffing_version_history') && isAIProviderID(providerId) ? {
82
+ ...(isExperimentEnabled('platform_editor_attributed_version_history') && isAIProviderID(providerId) ? {
83
83
  // Match the bare agent AAID used by step attribution rather than the synthetic
84
84
  // per-editor-session provider ID, so telepointer and diff colours share a seed.
85
85
  presenceId: providerId.slice('agent:'.length),
@@ -141,9 +141,9 @@ export class ParticipantsService {
141
141
  } = payload;
142
142
  const existing = this.participantsState.getBySessionId(sessionId);
143
143
  const hasAgentTypeChanged = (existing === null || existing === void 0 ? void 0 : existing.agentType) !== agentType;
144
- const agentId = fg('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 ? void 0 : (_identity$agentId = identity.agentId) === null || _identity$agentId === void 0 ? void 0 : _identity$agentId.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentId) : undefined;
145
- const name = fg('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 ? void 0 : (_identity$agentName = identity.agentName) === null || _identity$agentName === void 0 ? void 0 : _identity$agentName.trim()) || (existing === null || existing === void 0 ? void 0 : existing.name) || '' : '';
146
- const agentNamedId = fg('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 ? void 0 : (_identity$agentNamedI = identity.agentNamedId) === null || _identity$agentNamedI === void 0 ? void 0 : _identity$agentNamedI.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentNamedId) : undefined;
144
+ const agentId = isExperimentEnabled('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 ? void 0 : (_identity$agentId = identity.agentId) === null || _identity$agentId === void 0 ? void 0 : _identity$agentId.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentId) : undefined;
145
+ const name = isExperimentEnabled('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 ? void 0 : (_identity$agentName = identity.agentName) === null || _identity$agentName === void 0 ? void 0 : _identity$agentName.trim()) || (existing === null || existing === void 0 ? void 0 : existing.name) || '' : '';
146
+ const agentNamedId = isExperimentEnabled('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 ? void 0 : (_identity$agentNamedI = identity.agentNamedId) === null || _identity$agentNamedI === void 0 ? void 0 : _identity$agentNamedI.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentNamedId) : undefined;
147
147
  const wasInactive = existing ? Date.now() - existing.lastActive >= AGENT_PRESENCE_INACTIVE_MS : false;
148
148
  const participant = {
149
149
  ...payload,
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "39.1.7";
2
+ export const version = "39.1.9";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -16,6 +16,7 @@ import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransform
16
16
  import { Transaction } from '@atlaskit/editor-prosemirror/state';
17
17
  import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform-override';
18
18
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
19
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
19
20
  import { fg } from '@atlaskit/platform-feature-flags/fg';
20
21
  import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
21
22
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -1023,7 +1024,7 @@ export var DocumentService = /*#__PURE__*/function () {
1023
1024
  agentId = _ref10.agentId,
1024
1025
  agentName = _ref10.agentName,
1025
1026
  agentNamedId = _ref10.agentNamedId;
1026
- return _this3.participantsService.upsertAIProviderParticipantLocally(providerId, agentType, fg('confluence_ncs_step_diffing_version_history') ? {
1027
+ return _this3.participantsService.upsertAIProviderParticipantLocally(providerId, agentType, isExperimentEnabled('platform_editor_attributed_version_history') ? {
1027
1028
  agentId: agentId,
1028
1029
  agentName: agentName,
1029
1030
  agentNamedId: agentNamedId
@@ -88,7 +88,7 @@ export var ParticipantsService = /*#__PURE__*/function () {
88
88
  sessionId: "".concat(providerId, "::").concat(defaultPresenceData.sessionId),
89
89
  userId: providerId,
90
90
  clientId: "".concat(providerId, "::").concat(defaultPresenceData.clientId)
91
- }, fg('confluence_ncs_step_diffing_version_history') && isAIProviderID(providerId) ? _objectSpread({
91
+ }, isExperimentEnabled('platform_editor_attributed_version_history') && isAIProviderID(providerId) ? _objectSpread({
92
92
  // Match the bare agent AAID used by step attribution rather than the synthetic
93
93
  // per-editor-session provider ID, so telepointer and diff colours share a seed.
94
94
  presenceId: providerId.slice('agent:'.length)
@@ -147,9 +147,9 @@ export var ParticipantsService = /*#__PURE__*/function () {
147
147
  var sessionId = payload.sessionId;
148
148
  var existing = _this.participantsState.getBySessionId(sessionId);
149
149
  var hasAgentTypeChanged = (existing === null || existing === void 0 ? void 0 : existing.agentType) !== agentType;
150
- var agentId = fg('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentId = identity.agentId) === null || _identity$agentId === void 0 ? void 0 : _identity$agentId.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentId) : undefined;
151
- var name = fg('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentName = identity.agentName) === null || _identity$agentName === void 0 ? void 0 : _identity$agentName.trim()) || (existing === null || existing === void 0 ? void 0 : existing.name) || '' : '';
152
- var agentNamedId = fg('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentNamedI = identity.agentNamedId) === null || _identity$agentNamedI === void 0 ? void 0 : _identity$agentNamedI.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentNamedId) : undefined;
150
+ var agentId = isExperimentEnabled('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 || (_identity$agentId = identity.agentId) === null || _identity$agentId === void 0 ? void 0 : _identity$agentId.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentId) : undefined;
151
+ var name = isExperimentEnabled('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 || (_identity$agentName = identity.agentName) === null || _identity$agentName === void 0 ? void 0 : _identity$agentName.trim()) || (existing === null || existing === void 0 ? void 0 : existing.name) || '' : '';
152
+ var agentNamedId = isExperimentEnabled('platform_editor_attributed_version_history') ? (identity === null || identity === void 0 || (_identity$agentNamedI = identity.agentNamedId) === null || _identity$agentNamedI === void 0 ? void 0 : _identity$agentNamedI.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentNamedId) : undefined;
153
153
  var wasInactive = existing ? Date.now() - existing.lastActive >= AGENT_PRESENCE_INACTIVE_MS : false;
154
154
  var participant = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload), isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? {
155
155
  presenceActivity: 'editor'
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "39.1.7";
2
+ export var version = "39.1.9";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "39.1.8",
3
+ "version": "39.1.10",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  "@atlaskit/platform-feature-flags": "^2.2.0",
31
31
  "@atlaskit/prosemirror-collab": "^1.1.0",
32
32
  "@atlaskit/react-ufo": "^8.4.0",
33
- "@atlaskit/tmp-editor-statsig": "^257.0.0",
33
+ "@atlaskit/tmp-editor-statsig": "^259.0.0",
34
34
  "@atlaskit/ufo": "^2.0.0",
35
35
  "@atlaskit/util-service-support": "^7.4.0",
36
36
  "@babel/runtime": "^7.0.0",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@atlaskit/adf-schema": "^57.7.0",
46
- "@atlaskit/editor-common": "^134.8.0",
46
+ "@atlaskit/editor-common": "^134.9.0",
47
47
  "@atlaskit/editor-test-helpers": "workspace:^",
48
48
  "@atlassian/a11y-jest-testing": "^0.17.0",
49
49
  "@atlassian/experiment-test-utils": "^0.2.0",
@@ -53,10 +53,6 @@
53
53
  "platform_editor_collab_empty_catchup_steps": {
54
54
  "type": "boolean"
55
55
  },
56
- "confluence_ncs_step_diffing_version_history": {
57
- "type": "boolean",
58
- "referenceOnly": true
59
- },
60
56
  "platform_move_presence_agents": {
61
57
  "type": "boolean",
62
58
  "referenceOnly": true
@@ -73,6 +69,6 @@
73
69
  }
74
70
  },
75
71
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^134.8.0"
72
+ "@atlaskit/editor-common": "^134.9.0"
77
73
  }
78
74
  }