@atlaskit/prosemirror-collab 0.22.96 → 1.0.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,37 @@
1
1
  # @atlaskit/prosemirror-collab
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 0.22.97
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+
3
35
  ## 0.22.96
4
36
 
5
37
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-collab",
3
- "version": "0.22.96",
3
+ "version": "1.0.0",
4
4
  "description": "Collaborative editing for ProseMirror - Atlassian Fork",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.ts",
25
17
  "atlassian": {
@@ -27,9 +19,9 @@
27
19
  "singleton": true
28
20
  },
29
21
  "dependencies": {
30
- "@atlaskit/adf-schema": "^54.0.0",
31
- "@atlaskit/editor-prosemirror": "^7.3.0",
32
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
22
+ "@atlaskit/adf-schema": "^55.0.0",
23
+ "@atlaskit/editor-prosemirror": "^8.0.0",
24
+ "@atlaskit/tmp-editor-statsig": "^104.0.0",
33
25
  "@babel/runtime": "^7.0.0",
34
26
  "uuid": "^3.1.0"
35
27
  },
@@ -1,52 +0,0 @@
1
- import type { Node } from '@atlaskit/editor-prosemirror/model';
2
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import { Plugin } from '@atlaskit/editor-prosemirror/state';
4
- import type { Step as ProseMirrorStep, Transform as ProseMirrorTransform } from '@atlaskit/editor-prosemirror/transform';
5
- export declare class Rebaseable {
6
- readonly step: ProseMirrorStep;
7
- readonly inverted: ProseMirrorStep;
8
- readonly origin: ProseMirrorTransform;
9
- constructor(step: ProseMirrorStep, inverted: ProseMirrorStep, origin: ProseMirrorTransform);
10
- }
11
- export declare function rebaseSteps(steps: readonly Rebaseable[], over: readonly ProseMirrorStep[], transform: ProseMirrorTransform): Rebaseable[];
12
- declare class CollabState {
13
- readonly version: number;
14
- readonly unconfirmed: readonly Rebaseable[];
15
- constructor(version: number, unconfirmed: readonly Rebaseable[]);
16
- }
17
- type CollabConfig = {
18
- clientID?: number | string | null;
19
- transformUnconfirmed?: (steps: Rebaseable[]) => Rebaseable[];
20
- version?: number;
21
- };
22
- export declare function collab(config?: CollabConfig): Plugin;
23
- /**
24
- * Get the document before the unconfirmed steps were applied.
25
- * This is used to facilitate tab syncing across multiple tabs while offline, by returning the document before the unconfirmed steps were
26
- * applied we can ensure each tab starts from the same doc.
27
- * @param state The editor state
28
- * @returns The document before the unconfirmed steps were applied
29
- */
30
- export declare function getDocBeforeUnconfirmedSteps(state: EditorState): Node;
31
- /**
32
- * Sync the document, version and unconfirmed steps from another source.
33
- * This is used to facilitate tab syncing across multiple tabs while offline, because we no longer have access to the central authority.
34
- *
35
- * @param state The editor state
36
- * @param version the version number of the last update received from the central authority
37
- * @param docJSON the document corresponding with the version
38
- * @param unconfirmedSteps the unconfirmed steps that havent been successfully sent to the server yet
39
- * @returns A transaction that represents the new state of the editor after receiving the new steps, doc and version
40
- */
41
- export declare function syncFromAnotherSource(state: EditorState, version: number, docJSON: any, unconfirmedSteps: readonly ProseMirrorStep[]): Transaction;
42
- export declare function receiveTransaction(state: EditorState, steps: readonly ProseMirrorStep[], clientIDs: readonly (string | number)[], options?: {
43
- mapSelectionBackward?: boolean;
44
- }): Transaction;
45
- export declare function sendableSteps(state: EditorState): {
46
- clientID: number | string;
47
- origins: readonly Transaction[];
48
- steps: readonly ProseMirrorStep[];
49
- version: number;
50
- } | null;
51
- export declare function getCollabState(state: EditorState): CollabState | undefined;
52
- export {};
@@ -1,24 +0,0 @@
1
- import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
2
- import type { Step as ProseMirrorStep, Transform as ProseMirrorTransform } from '@atlaskit/editor-prosemirror/transform';
3
- import type { Rebaseable } from './index';
4
- export declare const mapStep: (steps: readonly Rebaseable[], transform: ProseMirrorTransform, index: number, mapped: ProseMirrorStep | null) => ReplaceStep | undefined;
5
- /**
6
- * Determines if a step pairing is a move sequence (ie. drag + drop or cut + paste).
7
- *
8
- * We determine this if we have a deletion followed by insertion and their content matches
9
- *
10
- * @param previousStep
11
- * @param currentStep
12
- * @param previousRebaseable
13
- */
14
- export declare const isMoveSequence: (previousRebaseableStep: Rebaseable, currentStep: ProseMirrorStep) => boolean;
15
- /**
16
- * Update the replace step slice of the insert part of a move
17
- * to contain the slice of the current document rather than what was sliced originally.
18
- *
19
- * @param mapped
20
- * @param previousStep
21
- * @param transform
22
- * @returns Step to apply missing changes
23
- */
24
- export declare const createMoveMapStep: (mapped: ProseMirrorStep | null, previousStep: ProseMirrorStep, transform: ProseMirrorTransform, previousStepIndex: number) => ReplaceStep | undefined;