@atlaskit/collab-provider 9.7.3 → 9.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 9.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) - [ED-19233] Import prosemirror libraries from internal facade package
8
+
3
9
  ## 9.7.3
4
10
 
5
11
  ### Patch Changes
@@ -10,7 +10,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
  var _const = require("../helpers/const");
12
12
  var _utils = require("../helpers/utils");
13
- var _prosemirrorTransform = require("prosemirror-transform");
13
+ var _transform = require("@atlaskit/editor-prosemirror/transform");
14
14
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
15
15
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
16
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
@@ -114,11 +114,11 @@ var catchup = /*#__PURE__*/function () {
114
114
  inverted = _ref2.inverted;
115
115
  // Due to @types/prosemirror-transform mismatch with the actual
116
116
  // constructor, hack to set the `inverted`.
117
- var stepMap = new _prosemirrorTransform.StepMap(ranges);
117
+ var stepMap = new _transform.StepMap(ranges);
118
118
  stepMap.inverted = inverted;
119
119
  return stepMap;
120
120
  }); // create Mapping used for Step.map
121
- mapping = new _prosemirrorTransform.Mapping(stepMaps);
121
+ mapping = new _transform.Mapping(stepMaps);
122
122
  logger("".concat(_unconfirmedSteps.length, " unconfirmed steps before rebased: ").concat(JSON.stringify(_unconfirmedSteps)));
123
123
  newUnconfirmedSteps = rebaseSteps(_unconfirmedSteps, mapping);
124
124
  if ((newUnconfirmedSteps === null || newUnconfirmedSteps === void 0 ? void 0 : newUnconfirmedSteps.length) < _unconfirmedSteps.length) {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/collab-provider";
8
8
  exports.name = name;
9
- var version = "9.7.3";
9
+ var version = "9.7.4";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "9.7.3",
3
+ "version": "9.7.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
2
2
  import { createLogger } from '../helpers/utils';
3
- import { StepMap, Mapping } from 'prosemirror-transform';
3
+ import { StepMap, Mapping } from '@atlaskit/editor-prosemirror/transform';
4
4
  const logger = createLogger('Catchup', 'red');
5
5
 
6
6
  /**
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "9.7.3";
2
+ export const version = "9.7.4";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "9.7.3",
3
+ "version": "9.7.4",
4
4
  "sideEffects": false
5
5
  }
@@ -5,7 +5,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
5
5
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
6
  import { EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
7
7
  import { createLogger } from '../helpers/utils';
8
- import { StepMap, Mapping } from 'prosemirror-transform';
8
+ import { StepMap, Mapping } from '@atlaskit/editor-prosemirror/transform';
9
9
  var logger = createLogger('Catchup', 'red');
10
10
 
11
11
  /**
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "9.7.3";
2
+ export var version = "9.7.4";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "9.7.3",
3
+ "version": "9.7.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import type { CatchupOptions } from '../types';
2
- import { Mapping, Step } from 'prosemirror-transform';
2
+ import { Mapping, Step } from '@atlaskit/editor-prosemirror/transform';
3
3
  /**
4
4
  * Rebase the steps based on the mapping pipeline.
5
5
  * Some steps could be lost, if they are no longer
@@ -2,10 +2,10 @@
2
2
  import AnalyticsHelper from '../analytics/analytics-helper';
3
3
  import { CatchupResponse, ChannelEvent, StepsPayload } from '../types';
4
4
  import type { SyncUpErrorFunction, ResolvedEditorState } from '@atlaskit/editor-common/collab';
5
- import type { Step as ProseMirrorStep } from 'prosemirror-transform';
5
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
6
6
  import type { MetadataService } from '../metadata/metadata-service';
7
7
  import type { CollabEvents, CollabInitPayload } from '@atlaskit/editor-common/collab';
8
- import type { EditorState, Transaction } from 'prosemirror-state';
8
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
9
9
  import { ParticipantsService } from '../participants/participants-service';
10
10
  import type { InternalError } from '../errors/error-types';
11
11
  export declare class DocumentService {
@@ -1,5 +1,5 @@
1
1
  import type { ProductInformation } from '../types';
2
- import type { Step as ProseMirrorStep } from 'prosemirror-transform';
2
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  export declare const createLogger: (prefix: string, color?: string) => (msg: string, data?: any) => void;
4
4
  export declare function sleep(ms: number): Promise<unknown>;
5
5
  export declare const getProduct: (productInfo?: ProductInformation) => string;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="lodash" />
2
2
  import { ChannelEvent, StepsPayload } from '../types';
3
3
  import type { CollabCommitStatusEventPayload, CollabEvents } from '@atlaskit/editor-common/collab';
4
- import type { Step as ProseMirrorStep } from 'prosemirror-transform';
4
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
5
5
  import AnalyticsHelper from '../analytics/analytics-helper';
6
6
  import type { InternalError } from '../errors/error-types';
7
7
  export declare const commitStep: ({ broadcast, steps, version, userId, clientId, onStepsAdded, onErrorHandled, analyticsHelper, emit, }: {
@@ -1,5 +1,5 @@
1
- import type { EditorState, Transaction } from 'prosemirror-state';
2
- import type { Step as ProseMirrorStep } from 'prosemirror-transform';
1
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  import { Emitter } from '../emitter';
4
4
  import type { Config } from '../types';
5
5
  import type { CollabEditProvider, CollabEvents, CollabTelepointerPayload, ResolvedEditorState, Metadata, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
@@ -1,4 +1,4 @@
1
- import type { Step } from 'prosemirror-transform';
1
+ import type { Step } from '@atlaskit/editor-prosemirror/transform';
2
2
  import type { AnalyticsWebClient } from '@atlaskit/analytics-listeners';
3
3
  import type { Manager } from 'socket.io-client';
4
4
  import type { InternalError } from './errors/error-types';
@@ -1,5 +1,5 @@
1
1
  import type { CatchupOptions } from '../types';
2
- import { Mapping, Step } from 'prosemirror-transform';
2
+ import { Mapping, Step } from '@atlaskit/editor-prosemirror/transform';
3
3
  /**
4
4
  * Rebase the steps based on the mapping pipeline.
5
5
  * Some steps could be lost, if they are no longer
@@ -2,10 +2,10 @@
2
2
  import AnalyticsHelper from '../analytics/analytics-helper';
3
3
  import { CatchupResponse, ChannelEvent, StepsPayload } from '../types';
4
4
  import type { SyncUpErrorFunction, ResolvedEditorState } from '@atlaskit/editor-common/collab';
5
- import type { Step as ProseMirrorStep } from 'prosemirror-transform';
5
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
6
6
  import type { MetadataService } from '../metadata/metadata-service';
7
7
  import type { CollabEvents, CollabInitPayload } from '@atlaskit/editor-common/collab';
8
- import type { EditorState, Transaction } from 'prosemirror-state';
8
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
9
9
  import { ParticipantsService } from '../participants/participants-service';
10
10
  import type { InternalError } from '../errors/error-types';
11
11
  export declare class DocumentService {
@@ -1,5 +1,5 @@
1
1
  import type { ProductInformation } from '../types';
2
- import type { Step as ProseMirrorStep } from 'prosemirror-transform';
2
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  export declare const createLogger: (prefix: string, color?: string) => (msg: string, data?: any) => void;
4
4
  export declare function sleep(ms: number): Promise<unknown>;
5
5
  export declare const getProduct: (productInfo?: ProductInformation) => string;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="lodash" />
2
2
  import { ChannelEvent, StepsPayload } from '../types';
3
3
  import type { CollabCommitStatusEventPayload, CollabEvents } from '@atlaskit/editor-common/collab';
4
- import type { Step as ProseMirrorStep } from 'prosemirror-transform';
4
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
5
5
  import AnalyticsHelper from '../analytics/analytics-helper';
6
6
  import type { InternalError } from '../errors/error-types';
7
7
  export declare const commitStep: ({ broadcast, steps, version, userId, clientId, onStepsAdded, onErrorHandled, analyticsHelper, emit, }: {
@@ -1,5 +1,5 @@
1
- import type { EditorState, Transaction } from 'prosemirror-state';
2
- import type { Step as ProseMirrorStep } from 'prosemirror-transform';
1
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  import { Emitter } from '../emitter';
4
4
  import type { Config } from '../types';
5
5
  import type { CollabEditProvider, CollabEvents, CollabTelepointerPayload, ResolvedEditorState, Metadata, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
@@ -1,4 +1,4 @@
1
- import type { Step } from 'prosemirror-transform';
1
+ import type { Step } from '@atlaskit/editor-prosemirror/transform';
2
2
  import type { AnalyticsWebClient } from '@atlaskit/analytics-listeners';
3
3
  import type { Manager } from 'socket.io-client';
4
4
  import type { InternalError } from './errors/error-types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "9.7.3",
3
+ "version": "9.7.4",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,15 +36,15 @@
36
36
  "dependencies": {
37
37
  "@atlaskit/analytics-gas-types": "^5.1.0",
38
38
  "@atlaskit/analytics-listeners": "^8.7.0",
39
- "@atlaskit/editor-common": "^74.24.0",
39
+ "@atlaskit/editor-common": "^74.29.0",
40
40
  "@atlaskit/editor-json-transformer": "^8.10.0",
41
+ "@atlaskit/editor-prosemirror": "1.0.2",
41
42
  "@atlaskit/prosemirror-collab": "^0.2.0",
42
43
  "@atlaskit/ufo": "^0.2.0",
43
44
  "@atlaskit/util-service-support": "^6.2.0",
44
45
  "@babel/runtime": "^7.0.0",
45
46
  "eventemitter2": "^4.1.0",
46
47
  "lodash": "^4.17.21",
47
- "prosemirror-transform": "1.3.2",
48
48
  "socket.io-client": "^4.7.1"
49
49
  },
50
50
  "techstack": {
@@ -62,12 +62,10 @@
62
62
  }
63
63
  },
64
64
  "devDependencies": {
65
- "@atlaskit/adf-schema": "^26.2.0",
65
+ "@atlaskit/adf-schema": "^26.4.0",
66
66
  "@atlaskit/analytics-listeners": "^8.7.0",
67
67
  "@atlaskit/editor-test-helpers": "^18.10.0",
68
68
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
69
- "prosemirror-model": "1.16.0",
70
- "prosemirror-state": "1.3.4",
71
69
  "typescript": "~4.9.5"
72
70
  },
73
71
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
package/report.api.md CHANGED
@@ -34,7 +34,7 @@ import { CollabParticipant } from '@atlaskit/editor-common/collab';
34
34
  import { CollabPresencePayload } from '@atlaskit/editor-common/collab';
35
35
  import { CollabSendableSelection } from '@atlaskit/editor-common/collab';
36
36
  import { CollabTelepointerPayload } from '@atlaskit/editor-common/collab';
37
- import type { EditorState } from 'prosemirror-state';
37
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
38
38
  import { JSONDocNode } from '@atlaskit/editor-json-transformer';
39
39
  import type { Manager } from 'socket.io-client';
40
40
  import type { Metadata as Metadata_2 } from '@atlaskit/editor-common/collab';
@@ -43,9 +43,9 @@ import { PROVIDER_ERROR_CODE } from '@atlaskit/editor-common/collab';
43
43
  import { ProviderError } from '@atlaskit/editor-common/collab';
44
44
  import { ProviderParticipant } from '@atlaskit/editor-common/collab';
45
45
  import { ResolvedEditorState } from '@atlaskit/editor-common/collab';
46
- import type { Step } from 'prosemirror-transform';
46
+ import type { Step } from '@atlaskit/editor-prosemirror/transform';
47
47
  import { SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
48
- import type { Transaction } from 'prosemirror-state';
48
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
49
49
 
50
50
  // @public (undocumented)
51
51
  type AuthCallback = (cb: (data: InitAndAuthData) => void) => void;
@@ -23,7 +23,7 @@ import { CollabParticipant } from '@atlaskit/editor-common/collab';
23
23
  import { CollabPresencePayload } from '@atlaskit/editor-common/collab';
24
24
  import { CollabSendableSelection } from '@atlaskit/editor-common/collab';
25
25
  import { CollabTelepointerPayload } from '@atlaskit/editor-common/collab';
26
- import type { EditorState } from 'prosemirror-state';
26
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
27
27
  import { JSONDocNode } from '@atlaskit/editor-json-transformer';
28
28
  import type { Manager } from 'socket.io-client';
29
29
  import type { Metadata as Metadata_2 } from '@atlaskit/editor-common/collab';
@@ -32,9 +32,9 @@ import { PROVIDER_ERROR_CODE } from '@atlaskit/editor-common/collab';
32
32
  import { ProviderError } from '@atlaskit/editor-common/collab';
33
33
  import { ProviderParticipant } from '@atlaskit/editor-common/collab';
34
34
  import { ResolvedEditorState } from '@atlaskit/editor-common/collab';
35
- import type { Step } from 'prosemirror-transform';
35
+ import type { Step } from '@atlaskit/editor-prosemirror/transform';
36
36
  import { SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
37
- import type { Transaction } from 'prosemirror-state';
37
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
38
38
 
39
39
  // @public (undocumented)
40
40
  type AuthCallback = (cb: (data: InitAndAuthData) => void) => void;