@contrail/documents 2.5.0-alpha.fe0fdf8 → 2.5.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
@@ -5,14 +5,16 @@ All notable changes to `@contrail/documents` are documented here.
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
  Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [2.5.0] - 2026-10-07
8
+ ## [2.5.0] - 2026-10-10
9
9
 
10
10
  Also shipped on the 1.x line as 1.22.0.
11
11
 
12
12
  ### Added
13
13
 
14
- - `DocumentChange.keepSortIndex`: set on an add to keep the sortIndex its element carries when no
15
- element holds it, instead of appending it on top.
14
+ - `clientCreatedOn` on `WriteTransactionRequest`, `DocumentTransactionPayload`, and
15
+ `DocumentTransactionMessage`: when the writing client created the transaction (ISO 8601, client
16
+ clock). The server stores it with the transaction and passes it through in the broadcast, so a
17
+ receiver can measure how long the edit took to reach it.
16
18
 
17
19
  ## [2.4.0] - 2026-09-26
18
20
 
@@ -19,5 +19,4 @@ export interface DocumentChange {
19
19
  targetSortIndex?: number;
20
20
  skipUndo?: boolean;
21
21
  gestureId?: string;
22
- keepSortIndex?: boolean;
23
22
  }
@@ -13,6 +13,7 @@ export type DocumentOperation = {
13
13
  export type DocumentElementPatch = Partial<Omit<DocumentElement, 'id' | 'documentId'>>;
14
14
  interface WriteTransactionRequestBase {
15
15
  clientTransactionId?: string;
16
+ clientCreatedOn?: string;
16
17
  }
17
18
  export interface InlineWriteTransactionRequest extends WriteTransactionRequestBase {
18
19
  operations: DocumentOperation[];
@@ -53,6 +54,7 @@ interface DocumentTransactionMessageBase {
53
54
  sequenceNumber: number;
54
55
  createdOn: string;
55
56
  clientTransactionId?: string;
57
+ clientCreatedOn?: string;
56
58
  }
57
59
  export type DocumentTransactionMessage = (DocumentTransactionMessageBase & {
58
60
  operations: DocumentOperation[];
@@ -68,6 +70,7 @@ export interface TransactionUploadTarget {
68
70
  }
69
71
  export type DocumentTransactionPayload = {
70
72
  clientTransactionId?: string;
73
+ clientCreatedOn?: string;
71
74
  } & ({
72
75
  operations: DocumentOperation[];
73
76
  operationsS3Key?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "2.5.0-alpha.fe0fdf8",
3
+ "version": "2.5.0",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",