@atlaskit/prosemirror-collab 1.0.66 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/prosemirror-collab
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) -
8
+ Remove stale API report artifacts from published Platform packages.
9
+
10
+ ## 1.0.67
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 1.0.66
4
17
 
5
18
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -17,7 +17,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
17
17
  var _uuid = require("uuid");
18
18
  var _state = require("@atlaskit/editor-prosemirror/state");
19
19
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
20
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
21
21
  var _movedContent = require("./movedContent");
22
22
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
23
23
  var Rebaseable = exports.Rebaseable = /*#__PURE__*/(0, _createClass2.default)(function Rebaseable(step, inverted, origin) {
@@ -36,7 +36,7 @@ function rebaseSteps(steps, over, transform) {
36
36
  var result = [];
37
37
  for (var _i2 = 0, mapFrom = steps.length; _i2 < steps.length; _i2++) {
38
38
  var mapped = steps[_i2].step.map(transform.mapping.slice(mapFrom));
39
- var movedStep = (0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true) ? (0, _movedContent.mapStep)(steps, transform, _i2, mapped) : undefined;
39
+ var movedStep = (0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true) ? (0, _movedContent.mapStep)(steps, transform, _i2, mapped) : undefined;
40
40
  mapFrom--;
41
41
  if (mapped && !transform.maybeStep(mapped).failed) {
42
42
  // Open ticket for setMirror https://github.com/ProseMirror/prosemirror/issues/869
@@ -46,7 +46,7 @@ function rebaseSteps(steps, over, transform) {
46
46
  }
47
47
 
48
48
  // If the step is a "move" step - apply the additional step
49
- if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true)) {
49
+ if ((0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true)) {
50
50
  if (movedStep && !transform.maybeStep(movedStep).failed) {
51
51
  result.push(new Rebaseable(movedStep, movedStep.invert(transform.docs[transform.docs.length - 1]), transform));
52
52
  }
@@ -107,7 +107,7 @@ function collab() {
107
107
  apply: function apply(tr, collab) {
108
108
  var newState = tr.getMeta(collabKey);
109
109
  if (newState) {
110
- if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true) || (0, _expValEquals.expValEquals)('platform_editor_enable_single_player_step_merging', 'isEnabled', true)) {
110
+ if ((0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true) || (0, _expValEquals.expValEquals)('platform_editor_enable_single_player_step_merging', 'isEnabled', true)) {
111
111
  return new CollabState(newState.version, transformUnconfirmed(newState.unconfirmed));
112
112
  } else {
113
113
  return newState;
@@ -2,7 +2,7 @@
2
2
  import { v4 as uuidv4 } from 'uuid';
3
3
  import { Plugin, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
6
6
  import { mapStep } from './movedContent';
7
7
  export class Rebaseable {
8
8
  constructor(step, inverted, origin) {
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
  import { Plugin, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
8
8
  import { mapStep } from './movedContent';
9
9
  export var Rebaseable = /*#__PURE__*/_createClass(function Rebaseable(step, inverted, origin) {
10
10
  _classCallCheck(this, Rebaseable);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-collab",
3
- "version": "1.0.66",
3
+ "version": "1.1.0",
4
4
  "description": "Collaborative editing for ProseMirror - Atlassian Fork",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@atlaskit/adf-schema": "^57.2.0",
23
23
  "@atlaskit/editor-prosemirror": "^8.0.0",
24
- "@atlaskit/tmp-editor-statsig": "^167.0.0",
24
+ "@atlaskit/tmp-editor-statsig": "^168.0.0",
25
25
  "@babel/runtime": "^7.0.0",
26
26
  "uuid": "^3.1.0"
27
27
  },
package/report.api.md DELETED
@@ -1,86 +0,0 @@
1
- <!-- API Report Version: 2.3 -->
2
-
3
- ## API Report File for "@atlaskit/prosemirror-collab"
4
-
5
- > Do not edit this file. This report is auto-generated using
6
- > [API Extractor](https://api-extractor.com/).
7
- > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
8
-
9
- ### Table of contents
10
-
11
- - [Main Entry Types](#main-entry-types)
12
- - [Peer Dependencies](#peer-dependencies)
13
-
14
- ### Main Entry Types
15
-
16
- <!--SECTION START: Main Entry Types-->
17
-
18
- ```ts
19
- import { EditorState } from '@atlaskit/editor-prosemirror/state';
20
- import { Plugin as Plugin_2 } from '@atlaskit/editor-prosemirror/state';
21
- import type { Step } from '@atlaskit/editor-prosemirror/transform';
22
- import { Transaction } from '@atlaskit/editor-prosemirror/state';
23
- import type { Transform } from '@atlaskit/editor-prosemirror/transform';
24
-
25
- // @public (undocumented)
26
- export function collab(config?: CollabConfig): Plugin_2;
27
-
28
- // @public (undocumented)
29
- type CollabConfig = {
30
- version?: number;
31
- clientID?: null | number | string;
32
- };
33
-
34
- // @public (undocumented)
35
- export function getVersion(state: EditorState): number;
36
-
37
- // @public (undocumented)
38
- class Rebaseable {
39
- constructor(step: Step, inverted: Step, origin: Transform);
40
- // (undocumented)
41
- readonly inverted: Step;
42
- // (undocumented)
43
- readonly origin: Transform;
44
- // (undocumented)
45
- readonly step: Step;
46
- }
47
-
48
- // @public (undocumented)
49
- export function rebaseSteps(
50
- steps: readonly Rebaseable[],
51
- over: readonly Step[],
52
- transform: Transform,
53
- ): Rebaseable[];
54
-
55
- // @public (undocumented)
56
- export function receiveTransaction(
57
- state: EditorState,
58
- steps: readonly Step[],
59
- clientIDs: readonly (number | string)[],
60
- options?: {
61
- mapSelectionBackward?: boolean;
62
- },
63
- ): Transaction;
64
-
65
- // @public (undocumented)
66
- export function sendableSteps(state: EditorState): null | {
67
- version: number;
68
- steps: readonly Step[];
69
- clientID: number | string;
70
- origins: readonly Transaction[];
71
- };
72
-
73
- // (No @packageDocumentation comment for this package)
74
- ```
75
-
76
- <!--SECTION END: Main Entry Types-->
77
-
78
- ### Peer Dependencies
79
-
80
- <!--SECTION START: Peer Dependencies-->
81
-
82
- ```json
83
- {}
84
- ```
85
-
86
- <!--SECTION END: Peer Dependencies-->