@y/y 14.0.0-rc.2 → 14.0.0-rc.21

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.
Files changed (166) hide show
  1. package/README.md +36 -12
  2. package/dist/src/index.d.ts +24 -1
  3. package/dist/src/index.d.ts.map +1 -1
  4. package/dist/src/structs/AbstractStruct.d.ts +14 -17
  5. package/dist/src/structs/AbstractStruct.d.ts.map +1 -1
  6. package/dist/src/structs/GC.d.ts +9 -14
  7. package/dist/src/structs/GC.d.ts.map +1 -1
  8. package/dist/src/structs/Item.d.ts +569 -31
  9. package/dist/src/structs/Item.d.ts.map +1 -1
  10. package/dist/src/structs/Skip.d.ts +9 -11
  11. package/dist/src/structs/Skip.d.ts.map +1 -1
  12. package/dist/src/utils/BlockSet.d.ts +8 -7
  13. package/dist/src/utils/BlockSet.d.ts.map +1 -1
  14. package/dist/src/utils/Doc.d.ts +4 -9
  15. package/dist/src/utils/Doc.d.ts.map +1 -1
  16. package/dist/src/utils/ID.d.ts +0 -1
  17. package/dist/src/utils/ID.d.ts.map +1 -1
  18. package/dist/src/utils/RelativePosition.d.ts +2 -5
  19. package/dist/src/utils/RelativePosition.d.ts.map +1 -1
  20. package/dist/src/utils/Renderer.d.ts +144 -0
  21. package/dist/src/utils/Renderer.d.ts.map +1 -0
  22. package/dist/src/utils/Snapshot.d.ts +7 -11
  23. package/dist/src/utils/Snapshot.d.ts.map +1 -1
  24. package/dist/src/utils/StructStore.d.ts +45 -23
  25. package/dist/src/utils/StructStore.d.ts.map +1 -1
  26. package/dist/src/utils/Transaction.d.ts +11 -21
  27. package/dist/src/utils/Transaction.d.ts.map +1 -1
  28. package/dist/src/utils/UndoManager.d.ts +13 -14
  29. package/dist/src/utils/UndoManager.d.ts.map +1 -1
  30. package/dist/src/utils/UpdateDecoder.d.ts +1 -1
  31. package/dist/src/utils/UpdateDecoder.d.ts.map +1 -1
  32. package/dist/src/utils/UpdateEncoder.d.ts +0 -1
  33. package/dist/src/utils/UpdateEncoder.d.ts.map +1 -1
  34. package/dist/src/utils/YEvent.d.ts +22 -26
  35. package/dist/src/utils/YEvent.d.ts.map +1 -1
  36. package/dist/src/utils/content-helper.d.ts +2 -0
  37. package/dist/src/utils/content-helper.d.ts.map +1 -0
  38. package/dist/src/utils/delta-helpers.d.ts +2 -3
  39. package/dist/src/utils/delta-helpers.d.ts.map +1 -1
  40. package/dist/src/utils/encoding-helpers.d.ts +6 -0
  41. package/dist/src/utils/encoding-helpers.d.ts.map +1 -0
  42. package/dist/src/utils/encoding.d.ts +16 -18
  43. package/dist/src/utils/encoding.d.ts.map +1 -1
  44. package/dist/src/utils/ids.d.ts +331 -0
  45. package/dist/src/utils/ids.d.ts.map +1 -0
  46. package/dist/src/utils/isParentOf.d.ts +1 -2
  47. package/dist/src/utils/isParentOf.d.ts.map +1 -1
  48. package/dist/src/utils/logging.d.ts +0 -1
  49. package/dist/src/utils/logging.d.ts.map +1 -1
  50. package/dist/src/utils/meta.d.ts +15 -64
  51. package/dist/src/utils/meta.d.ts.map +1 -1
  52. package/dist/src/utils/renderer-helpers.d.ts +99 -0
  53. package/dist/src/utils/renderer-helpers.d.ts.map +1 -0
  54. package/dist/src/utils/schemas.d.ts +3 -0
  55. package/dist/src/utils/schemas.d.ts.map +1 -0
  56. package/dist/src/utils/transaction-helpers.d.ts +18 -0
  57. package/dist/src/utils/transaction-helpers.d.ts.map +1 -0
  58. package/dist/src/utils/updates.d.ts +19 -25
  59. package/dist/src/utils/updates.d.ts.map +1 -1
  60. package/dist/src/ytype.d.ts +144 -41
  61. package/dist/src/ytype.d.ts.map +1 -1
  62. package/global.d.ts +53 -0
  63. package/package.json +12 -16
  64. package/src/index.js +32 -124
  65. package/src/structs/AbstractStruct.js +21 -16
  66. package/src/structs/GC.js +15 -20
  67. package/src/structs/Item.js +992 -318
  68. package/src/structs/Skip.js +16 -19
  69. package/src/utils/BlockSet.js +20 -20
  70. package/src/utils/Doc.js +18 -29
  71. package/src/utils/ID.js +0 -2
  72. package/src/utils/RelativePosition.js +15 -25
  73. package/src/utils/{AttributionManager.js → Renderer.js} +42 -197
  74. package/src/utils/Snapshot.js +15 -37
  75. package/src/utils/StructStore.js +89 -227
  76. package/src/utils/Transaction.js +89 -321
  77. package/src/utils/UndoManager.js +157 -19
  78. package/src/utils/UpdateDecoder.js +2 -3
  79. package/src/utils/UpdateEncoder.js +0 -4
  80. package/src/utils/YEvent.js +20 -26
  81. package/src/utils/content-helper.js +0 -0
  82. package/src/utils/delta-helpers.js +21 -42
  83. package/src/utils/encoding-helpers.js +110 -0
  84. package/src/utils/encoding.js +197 -122
  85. package/src/utils/ids.js +1527 -0
  86. package/src/utils/isParentOf.js +2 -4
  87. package/src/utils/logging.js +0 -4
  88. package/src/utils/meta.js +57 -46
  89. package/src/utils/renderer-helpers.js +110 -0
  90. package/src/utils/schemas.js +3 -0
  91. package/src/utils/transaction-helpers.js +413 -0
  92. package/src/utils/updates.js +24 -146
  93. package/src/ytype.js +626 -255
  94. package/tests/testHelper.js +10 -12
  95. package/dist/src/internals.d.ts +0 -36
  96. package/dist/src/internals.d.ts.map +0 -1
  97. package/dist/src/structs/ContentAny.d.ts +0 -67
  98. package/dist/src/structs/ContentAny.d.ts.map +0 -1
  99. package/dist/src/structs/ContentBinary.d.ts +0 -64
  100. package/dist/src/structs/ContentBinary.d.ts.map +0 -1
  101. package/dist/src/structs/ContentDeleted.d.ts +0 -64
  102. package/dist/src/structs/ContentDeleted.d.ts.map +0 -1
  103. package/dist/src/structs/ContentDoc.d.ts +0 -72
  104. package/dist/src/structs/ContentDoc.d.ts.map +0 -1
  105. package/dist/src/structs/ContentEmbed.d.ts +0 -67
  106. package/dist/src/structs/ContentEmbed.d.ts.map +0 -1
  107. package/dist/src/structs/ContentFormat.d.ts +0 -69
  108. package/dist/src/structs/ContentFormat.d.ts.map +0 -1
  109. package/dist/src/structs/ContentJSON.d.ts +0 -70
  110. package/dist/src/structs/ContentJSON.d.ts.map +0 -1
  111. package/dist/src/structs/ContentString.d.ts +0 -70
  112. package/dist/src/structs/ContentString.d.ts.map +0 -1
  113. package/dist/src/structs/ContentType.d.ts +0 -77
  114. package/dist/src/structs/ContentType.d.ts.map +0 -1
  115. package/dist/src/utils/AttributionManager.d.ts +0 -238
  116. package/dist/src/utils/AttributionManager.d.ts.map +0 -1
  117. package/dist/src/utils/IdMap.d.ts +0 -164
  118. package/dist/src/utils/IdMap.d.ts.map +0 -1
  119. package/dist/src/utils/IdSet.d.ts +0 -163
  120. package/dist/src/utils/IdSet.d.ts.map +0 -1
  121. package/dist/tests/IdMap.tests.d.ts +0 -9
  122. package/dist/tests/IdMap.tests.d.ts.map +0 -1
  123. package/dist/tests/IdSet.tests.d.ts +0 -9
  124. package/dist/tests/IdSet.tests.d.ts.map +0 -1
  125. package/dist/tests/attribution.tests.d.ts +0 -9
  126. package/dist/tests/attribution.tests.d.ts.map +0 -1
  127. package/dist/tests/compatibility.tests.d.ts +0 -5
  128. package/dist/tests/compatibility.tests.d.ts.map +0 -1
  129. package/dist/tests/delta.tests.d.ts +0 -7
  130. package/dist/tests/delta.tests.d.ts.map +0 -1
  131. package/dist/tests/doc.tests.d.ts +0 -13
  132. package/dist/tests/doc.tests.d.ts.map +0 -1
  133. package/dist/tests/encoding.tests.d.ts +0 -5
  134. package/dist/tests/encoding.tests.d.ts.map +0 -1
  135. package/dist/tests/index.d.ts +0 -2
  136. package/dist/tests/index.d.ts.map +0 -1
  137. package/dist/tests/relativePositions.tests.d.ts +0 -11
  138. package/dist/tests/relativePositions.tests.d.ts.map +0 -1
  139. package/dist/tests/snapshot.tests.d.ts +0 -14
  140. package/dist/tests/snapshot.tests.d.ts.map +0 -1
  141. package/dist/tests/testHelper.d.ts +0 -171
  142. package/dist/tests/testHelper.d.ts.map +0 -1
  143. package/dist/tests/undo-redo.tests.d.ts +0 -27
  144. package/dist/tests/undo-redo.tests.d.ts.map +0 -1
  145. package/dist/tests/updates.tests.d.ts +0 -26
  146. package/dist/tests/updates.tests.d.ts.map +0 -1
  147. package/dist/tests/y-array.tests.d.ts +0 -43
  148. package/dist/tests/y-array.tests.d.ts.map +0 -1
  149. package/dist/tests/y-map.tests.d.ts +0 -42
  150. package/dist/tests/y-map.tests.d.ts.map +0 -1
  151. package/dist/tests/y-text.tests.d.ts +0 -49
  152. package/dist/tests/y-text.tests.d.ts.map +0 -1
  153. package/dist/tests/y-xml.tests.d.ts +0 -14
  154. package/dist/tests/y-xml.tests.d.ts.map +0 -1
  155. package/src/internals.js +0 -35
  156. package/src/structs/ContentAny.js +0 -115
  157. package/src/structs/ContentBinary.js +0 -93
  158. package/src/structs/ContentDeleted.js +0 -101
  159. package/src/structs/ContentDoc.js +0 -141
  160. package/src/structs/ContentEmbed.js +0 -98
  161. package/src/structs/ContentFormat.js +0 -105
  162. package/src/structs/ContentJSON.js +0 -119
  163. package/src/structs/ContentString.js +0 -113
  164. package/src/structs/ContentType.js +0 -152
  165. package/src/utils/IdMap.js +0 -673
  166. package/src/utils/IdSet.js +0 -825
@@ -1,3 +1,4 @@
1
+ import * as Y from '../src/index.js'
1
2
  import * as t from 'lib0/testing'
2
3
  import * as prng from 'lib0/prng'
3
4
  import * as encoding from 'lib0/encoding'
@@ -5,13 +6,10 @@ import * as decoding from 'lib0/decoding'
5
6
  import * as syncProtocol from '@y/protocols/sync'
6
7
  import * as object from 'lib0/object'
7
8
  import * as map from 'lib0/map'
8
- import * as Y from '../src/index.js'
9
9
  import * as math from 'lib0/math'
10
10
  import * as list from 'lib0/list'
11
11
  import * as delta from 'lib0/delta'
12
- import {
13
- createIdSet, createIdMap, addToIdSet, encodeIdMap
14
- } from '../src/internals.js'
12
+ import { createIdSet, createIdMap, encodeIdMap } from '../src/utils/ids.js'
15
13
 
16
14
  export * from '../src/index.js'
17
15
 
@@ -121,14 +119,14 @@ export class TestYInstance extends Y.Doc {
121
119
  if (!this.tc.onlineConns.has(this)) {
122
120
  this.tc.onlineConns.add(this)
123
121
  const encoder = encoding.createEncoder()
124
- syncProtocol.writeSyncStep1(encoder, this)
122
+ syncProtocol.writeSyncStep1(encoder, /** @type {any} */ (this))
125
123
  // publish SyncStep1
126
124
  broadcastMessage(this, encoding.toUint8Array(encoder))
127
125
  this.tc.onlineConns.forEach(remoteYInstance => {
128
126
  if (remoteYInstance !== this) {
129
127
  // remote instance sends instance to this instance
130
128
  const encoder = encoding.createEncoder()
131
- syncProtocol.writeSyncStep1(encoder, remoteYInstance)
129
+ syncProtocol.writeSyncStep1(encoder, /** @type {any} */ (remoteYInstance))
132
130
  this._receive(encoding.toUint8Array(encoder), remoteYInstance)
133
131
  }
134
132
  })
@@ -202,7 +200,7 @@ export class TestConnector {
202
200
  const encoder = encoding.createEncoder()
203
201
  // console.log('receive (' + sender.userID + '->' + receiver.userID + '):\n', syncProtocol.stringifySyncMessage(decoding.createDecoder(m), receiver))
204
202
  // do not publish data created when this function is executed (could be ss2 or update message)
205
- syncProtocol.readSyncMessage(decoding.createDecoder(m), encoder, receiver, receiver.tc)
203
+ syncProtocol.readSyncMessage(decoding.createDecoder(m), encoder, /** @type {any} */ (receiver), receiver.tc)
206
204
  if (encoding.length(encoder) > 0) {
207
205
  // send reply message
208
206
  sender._receive(encoding.toUint8Array(encoder), receiver)
@@ -319,7 +317,7 @@ export const compareIdSets = (idSet1, idSet2) => {
319
317
  t.assert(items2 !== undefined && items1.length === items2.length)
320
318
  for (let i = 0; i < items1.length; i++) {
321
319
  const di1 = items1[i]
322
- const di2 = /** @type {Array<import('../src/utils/IdSet.js').IdRange>} */ (items2)[i]
320
+ const di2 = /** @type {Array<import('../src/utils/ids.js').IdRange>} */ (items2)[i]
323
321
  t.assert(di1.clock === di2.clock && di1.len === di2.len)
324
322
  }
325
323
  }
@@ -382,7 +380,7 @@ export const compareIdmaps = (idmap1, idmap2) => {
382
380
  t.assert(items2 !== undefined && items1.length === items2.length)
383
381
  for (let i = 0; i < items1.length; i++) {
384
382
  const di1 = items1[i]
385
- const di2 = /** @type {Array<import('../src/utils/IdMap.js').AttrRange<T>>} */ (items2)[i]
383
+ const di2 = /** @type {Array<import('../src/utils/ids.js').AttrRange<T>>} */ (items2)[i]
386
384
  t.assert(di1.clock === di2.clock && di1.len === di2.len && _idmapAttrsEqual(di1.attrs, di2.attrs))
387
385
  }
388
386
  }
@@ -403,7 +401,7 @@ export const createRandomIdSet = (gen, clients, clockRange) => {
403
401
  const client = prng.uint32(gen, 0, clients - 1)
404
402
  const clockStart = prng.uint32(gen, 0, clockRange)
405
403
  const len = prng.uint32(gen, 0, clockRange - clockStart)
406
- addToIdSet(idset, client, clockStart, len)
404
+ idset.add(client, clockStart, len)
407
405
  }
408
406
  if (idset.clients.size === clients && clients > 1 && prng.bool(gen)) {
409
407
  idset.clients.delete(prng.uint32(gen, 0, clients))
@@ -509,8 +507,8 @@ export const compare = users => {
509
507
  export const compareItemIDs = (a, b) => a === b || (a !== null && b != null && Y.compareIDs(a.id, b.id))
510
508
 
511
509
  /**
512
- * @param {import('../src/internals.js').StructStore} ss1
513
- * @param {import('../src/internals.js').StructStore} ss2
510
+ * @param {StructStore} ss1
511
+ * @param {StructStore} ss2
514
512
  */
515
513
  export const compareStructStores = (ss1, ss2) => {
516
514
  t.assert(ss1.clients.size === ss2.clients.size)
@@ -1,36 +0,0 @@
1
- export * from "./utils/IdSet.js";
2
- export * from "./utils/Doc.js";
3
- export * from "./utils/UpdateDecoder.js";
4
- export * from "./utils/UpdateEncoder.js";
5
- export * from "./utils/encoding.js";
6
- export * from "./utils/EventHandler.js";
7
- export * from "./utils/ID.js";
8
- export * from "./utils/isParentOf.js";
9
- export * from "./utils/logging.js";
10
- export * from "./utils/RelativePosition.js";
11
- export * from "./utils/Snapshot.js";
12
- export * from "./utils/StructStore.js";
13
- export * from "./utils/Transaction.js";
14
- export * from "./utils/UndoManager.js";
15
- export * from "./utils/updates.js";
16
- export * from "./utils/YEvent.js";
17
- export * from "./utils/BlockSet.js";
18
- export * from "./utils/IdMap.js";
19
- export * from "./utils/AttributionManager.js";
20
- export * from "./utils/delta-helpers.js";
21
- export * from "./utils/meta.js";
22
- export * from "./ytype.js";
23
- export * from "./structs/AbstractStruct.js";
24
- export * from "./structs/GC.js";
25
- export * from "./structs/ContentBinary.js";
26
- export * from "./structs/ContentDeleted.js";
27
- export * from "./structs/ContentDoc.js";
28
- export * from "./structs/ContentEmbed.js";
29
- export * from "./structs/ContentFormat.js";
30
- export * from "./structs/ContentJSON.js";
31
- export * from "./structs/ContentAny.js";
32
- export * from "./structs/ContentString.js";
33
- export * from "./structs/ContentType.js";
34
- export * from "./structs/Item.js";
35
- export * from "./structs/Skip.js";
36
- //# sourceMappingURL=internals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["../../src/internals.js"],"names":[],"mappings":""}
@@ -1,67 +0,0 @@
1
- export class ContentAny {
2
- /**
3
- * @param {Array<any>} arr
4
- */
5
- constructor(arr: Array<any>);
6
- /**
7
- * @type {Array<any>}
8
- */
9
- arr: Array<any>;
10
- /**
11
- * @return {number}
12
- */
13
- getLength(): number;
14
- /**
15
- * @return {Array<any>}
16
- */
17
- getContent(): Array<any>;
18
- /**
19
- * @return {boolean}
20
- */
21
- isCountable(): boolean;
22
- /**
23
- * @return {ContentAny}
24
- */
25
- copy(): ContentAny;
26
- /**
27
- * @param {number} offset
28
- * @return {ContentAny}
29
- */
30
- splice(offset: number): ContentAny;
31
- /**
32
- * @param {ContentAny} right
33
- * @return {boolean}
34
- */
35
- mergeWith(right: ContentAny): boolean;
36
- /**
37
- * @param {Transaction} transaction
38
- * @param {Item} item
39
- */
40
- integrate(transaction: Transaction, item: Item): void;
41
- /**
42
- * @param {Transaction} transaction
43
- */
44
- delete(transaction: Transaction): void;
45
- /**
46
- * @param {Transaction} _tr
47
- */
48
- gc(_tr: Transaction): void;
49
- /**
50
- * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
51
- * @param {number} offset
52
- * @param {number} offsetEnd
53
- */
54
- write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number, offsetEnd: number): void;
55
- /**
56
- * @return {number}
57
- */
58
- getRef(): number;
59
- }
60
- export function readContentAny(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentAny;
61
- import { Transaction } from '../internals.js';
62
- import { Item } from '../internals.js';
63
- import { UpdateEncoderV1 } from '../internals.js';
64
- import { UpdateEncoderV2 } from '../internals.js';
65
- import { UpdateDecoderV1 } from '../internals.js';
66
- import { UpdateDecoderV2 } from '../internals.js';
67
- //# sourceMappingURL=ContentAny.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentAny.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentAny.js"],"names":[],"mappings":"AASA;IACE;;OAEG;IACH,iBAFW,KAAK,CAAC,GAAG,CAAC,EAQpB;IALC;;OAEG;IACH,KAFU,KAAK,CAAC,GAAG,CAAC,CAEN;IAIhB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,KAAK,CAAC,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,UAAU,CAIrB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,UAAU,CAMrB;IAED;;;OAGG;IACH,iBAHW,UAAU,GACT,OAAO,CAKlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,QAFW,WAAW,QAEX;IACX;;;;OAIG;IACH,eAJW,eAAe,GAAG,eAAe,UACjC,MAAM,aACN,MAAM,QAShB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAMM,wCAHI,eAAe,GAAG,eAAe,GAChC,UAAU,CASrB;4BAhHM,iBAAiB;qBAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB"}
@@ -1,64 +0,0 @@
1
- export class ContentBinary {
2
- /**
3
- * @param {Uint8Array} content
4
- */
5
- constructor(content: Uint8Array);
6
- content: Uint8Array<ArrayBufferLike>;
7
- /**
8
- * @return {number}
9
- */
10
- getLength(): number;
11
- /**
12
- * @return {Array<any>}
13
- */
14
- getContent(): Array<any>;
15
- /**
16
- * @return {boolean}
17
- */
18
- isCountable(): boolean;
19
- /**
20
- * @return {ContentBinary}
21
- */
22
- copy(): ContentBinary;
23
- /**
24
- * @param {number} offset
25
- * @return {ContentBinary}
26
- */
27
- splice(offset: number): ContentBinary;
28
- /**
29
- * @param {ContentBinary} right
30
- * @return {boolean}
31
- */
32
- mergeWith(right: ContentBinary): boolean;
33
- /**
34
- * @param {Transaction} transaction
35
- * @param {Item} item
36
- */
37
- integrate(transaction: Transaction, item: Item): void;
38
- /**
39
- * @param {Transaction} transaction
40
- */
41
- delete(transaction: Transaction): void;
42
- /**
43
- * @param {Transaction} _tr
44
- */
45
- gc(_tr: Transaction): void;
46
- /**
47
- * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
48
- * @param {number} _offset
49
- * @param {number} _offsetEnd
50
- */
51
- write(encoder: UpdateEncoderV1 | UpdateEncoderV2, _offset: number, _offsetEnd: number): void;
52
- /**
53
- * @return {number}
54
- */
55
- getRef(): number;
56
- }
57
- export function readContentBinary(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentBinary;
58
- import { Transaction } from '../internals.js';
59
- import { Item } from '../internals.js';
60
- import { UpdateEncoderV1 } from '../internals.js';
61
- import { UpdateEncoderV2 } from '../internals.js';
62
- import { UpdateDecoderV1 } from '../internals.js';
63
- import { UpdateDecoderV2 } from '../internals.js';
64
- //# sourceMappingURL=ContentBinary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentBinary.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentBinary.js"],"names":[],"mappings":"AAMA;IACE;;OAEG;IACH,qBAFW,UAAU,EAIpB;IADC,qCAAsB;IAGxB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,KAAK,CAAC,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,aAAa,CAIxB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,aAAa,CAIxB;IAED;;;OAGG;IACH,iBAHW,aAAa,GACZ,OAAO,CAIlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,QAFW,WAAW,QAEX;IACX;;;;OAIG;IACH,eAJW,eAAe,GAAG,eAAe,WACjC,MAAM,cACN,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAMM,2CAHI,eAAe,GAAG,eAAe,GAChC,aAAa,CAEuD;4BA1FzE,iBAAiB;qBAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB"}
@@ -1,64 +0,0 @@
1
- export class ContentDeleted {
2
- /**
3
- * @param {number} len
4
- */
5
- constructor(len: number);
6
- len: number;
7
- /**
8
- * @return {number}
9
- */
10
- getLength(): number;
11
- /**
12
- * @return {Array<any>}
13
- */
14
- getContent(): Array<any>;
15
- /**
16
- * @return {boolean}
17
- */
18
- isCountable(): boolean;
19
- /**
20
- * @return {ContentDeleted}
21
- */
22
- copy(): ContentDeleted;
23
- /**
24
- * @param {number} offset
25
- * @return {ContentDeleted}
26
- */
27
- splice(offset: number): ContentDeleted;
28
- /**
29
- * @param {ContentDeleted} right
30
- * @return {boolean}
31
- */
32
- mergeWith(right: ContentDeleted): boolean;
33
- /**
34
- * @param {Transaction} transaction
35
- * @param {Item} item
36
- */
37
- integrate(transaction: Transaction, item: Item): void;
38
- /**
39
- * @param {Transaction} _transaction
40
- */
41
- delete(_transaction: Transaction): void;
42
- /**
43
- * @param {Transaction} _tr
44
- */
45
- gc(_tr: Transaction): void;
46
- /**
47
- * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
48
- * @param {number} offset
49
- * @param {number} offsetEnd
50
- */
51
- write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number, offsetEnd: number): void;
52
- /**
53
- * @return {number}
54
- */
55
- getRef(): number;
56
- }
57
- export function readContentDeleted(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentDeleted;
58
- import { Transaction } from '../internals.js';
59
- import { Item } from '../internals.js';
60
- import { UpdateEncoderV1 } from '../internals.js';
61
- import { UpdateEncoderV2 } from '../internals.js';
62
- import { UpdateDecoderV1 } from '../internals.js';
63
- import { UpdateDecoderV2 } from '../internals.js';
64
- //# sourceMappingURL=ContentDeleted.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentDeleted.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentDeleted.js"],"names":[],"mappings":"AAKA;IACE;;OAEG;IACH,iBAFW,MAAM,EAIhB;IADC,YAAc;IAGhB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,KAAK,CAAC,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,cAAc,CAIzB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,cAAc,CAMzB;IAED;;;OAGG;IACH,iBAHW,cAAc,GACb,OAAO,CAKlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAKd;IAED;;OAEG;IACH,qBAFW,WAAW,QAEE;IACxB;;OAEG;IACH,QAFW,WAAW,QAEX;IACX;;;;OAIG;IACH,eAJW,eAAe,GAAG,eAAe,UACjC,MAAM,aACN,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,4CAHI,eAAe,GAAG,eAAe,GAChC,cAAc,CAEwD;4BAjG3E,iBAAiB;qBAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB"}
@@ -1,72 +0,0 @@
1
- /**
2
- * @private
3
- */
4
- export class ContentDoc {
5
- /**
6
- * @param {Doc} doc
7
- */
8
- constructor(doc: Doc);
9
- /**
10
- * @type {Doc}
11
- */
12
- doc: Doc;
13
- opts: any;
14
- /**
15
- * @return {number}
16
- */
17
- getLength(): number;
18
- /**
19
- * @return {Array<any>}
20
- */
21
- getContent(): Array<any>;
22
- /**
23
- * @return {boolean}
24
- */
25
- isCountable(): boolean;
26
- /**
27
- * @return {ContentDoc}
28
- */
29
- copy(): ContentDoc;
30
- /**
31
- * @param {number} offset
32
- * @return {ContentDoc}
33
- */
34
- splice(offset: number): ContentDoc;
35
- /**
36
- * @param {ContentDoc} right
37
- * @return {boolean}
38
- */
39
- mergeWith(right: ContentDoc): boolean;
40
- /**
41
- * @param {Transaction} transaction
42
- * @param {Item} item
43
- */
44
- integrate(transaction: Transaction, item: Item): void;
45
- /**
46
- * @param {Transaction} transaction
47
- */
48
- delete(transaction: Transaction): void;
49
- /**
50
- * @param {Transaction} _tr
51
- */
52
- gc(_tr: Transaction): void;
53
- /**
54
- * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
55
- * @param {number} _offset
56
- * @param {number} _offsetEnd
57
- */
58
- write(encoder: UpdateEncoderV1 | UpdateEncoderV2, _offset: number, _offsetEnd: number): void;
59
- /**
60
- * @return {number}
61
- */
62
- getRef(): number;
63
- }
64
- export function readContentDoc(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentDoc;
65
- import { Doc } from '../internals.js';
66
- import { Transaction } from '../internals.js';
67
- import { Item } from '../internals.js';
68
- import { UpdateEncoderV1 } from '../internals.js';
69
- import { UpdateEncoderV2 } from '../internals.js';
70
- import { UpdateDecoderV1 } from '../internals.js';
71
- import { UpdateDecoderV2 } from '../internals.js';
72
- //# sourceMappingURL=ContentDoc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentDoc.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentDoc.js"],"names":[],"mappings":"AAYA;;GAEG;AACH;IACE;;OAEG;IACH,iBAFW,GAAG,EAwBb;IAlBC;;OAEG;IACH,KAFU,GAAG,CAEC;IAKd,UAAgB;IAYlB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,KAAK,CAAC,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,UAAU,CAIrB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,UAAU,CAIrB;IAED;;;OAGG;IACH,iBAHW,UAAU,GACT,OAAO,CAIlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QASd;IAED;;OAEG;IACH,oBAFW,WAAW,QAQrB;IAED;;OAEG;IACH,QAFW,WAAW,QAEX;IAEX;;;;OAIG;IACH,eAJW,eAAe,GAAG,eAAe,WACjC,MAAM,cACN,MAAM,QAKhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,wCAHI,eAAe,GAAG,eAAe,GAChC,UAAU,CAE6F;oBA1I5G,iBAAiB;4BAAjB,iBAAiB;qBAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB"}
@@ -1,67 +0,0 @@
1
- /**
2
- * @private
3
- */
4
- export class ContentEmbed {
5
- /**
6
- * @param {Object} embed
7
- */
8
- constructor(embed: Object);
9
- embed: Object;
10
- /**
11
- * @return {number}
12
- */
13
- getLength(): number;
14
- /**
15
- * @return {Array<any>}
16
- */
17
- getContent(): Array<any>;
18
- /**
19
- * @return {boolean}
20
- */
21
- isCountable(): boolean;
22
- /**
23
- * @return {ContentEmbed}
24
- */
25
- copy(): ContentEmbed;
26
- /**
27
- * @param {number} offset
28
- * @return {ContentEmbed}
29
- */
30
- splice(offset: number): ContentEmbed;
31
- /**
32
- * @param {ContentEmbed} right
33
- * @return {boolean}
34
- */
35
- mergeWith(right: ContentEmbed): boolean;
36
- /**
37
- * @param {Transaction} transaction
38
- * @param {Item} item
39
- */
40
- integrate(transaction: Transaction, item: Item): void;
41
- /**
42
- * @param {Transaction} transaction
43
- */
44
- delete(transaction: Transaction): void;
45
- /**
46
- * @param {Transaction} _tr
47
- */
48
- gc(_tr: Transaction): void;
49
- /**
50
- * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
51
- * @param {number} _offset
52
- * @param {number} _offsetEnd
53
- */
54
- write(encoder: UpdateEncoderV1 | UpdateEncoderV2, _offset: number, _offsetEnd: number): void;
55
- /**
56
- * @return {number}
57
- */
58
- getRef(): number;
59
- }
60
- export function readContentEmbed(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentEmbed;
61
- import { Transaction } from '../internals.js';
62
- import { Item } from '../internals.js';
63
- import { UpdateEncoderV1 } from '../internals.js';
64
- import { UpdateEncoderV2 } from '../internals.js';
65
- import { UpdateDecoderV1 } from '../internals.js';
66
- import { UpdateDecoderV2 } from '../internals.js';
67
- //# sourceMappingURL=ContentEmbed.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentEmbed.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentEmbed.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACE;;OAEG;IACH,mBAFW,MAAM,EAIhB;IADC,cAAkB;IAGpB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,KAAK,CAAC,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,YAAY,CAIvB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,YAAY,CAIvB;IAED;;;OAGG;IACH,iBAHW,YAAY,GACX,OAAO,CAIlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,QAFW,WAAW,QAEX;IACX;;;;OAIG;IACH,eAJW,eAAe,GAAG,eAAe,WACjC,MAAM,cACN,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,0CAHI,eAAe,GAAG,eAAe,GAChC,YAAY,CAEuD;4BA/FxE,iBAAiB;qBAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB"}
@@ -1,69 +0,0 @@
1
- /**
2
- * @private
3
- */
4
- export class ContentFormat {
5
- /**
6
- * @param {string} key
7
- * @param {Object} value
8
- */
9
- constructor(key: string, value: Object);
10
- key: string;
11
- value: Object;
12
- /**
13
- * @return {number}
14
- */
15
- getLength(): number;
16
- /**
17
- * @return {Array<any>}
18
- */
19
- getContent(): Array<any>;
20
- /**
21
- * @return {boolean}
22
- */
23
- isCountable(): boolean;
24
- /**
25
- * @return {ContentFormat}
26
- */
27
- copy(): ContentFormat;
28
- /**
29
- * @param {number} _offset
30
- * @return {ContentFormat}
31
- */
32
- splice(_offset: number): ContentFormat;
33
- /**
34
- * @param {ContentFormat} _right
35
- * @return {boolean}
36
- */
37
- mergeWith(_right: ContentFormat): boolean;
38
- /**
39
- * @param {Transaction} _transaction
40
- * @param {Item} item
41
- */
42
- integrate(_transaction: Transaction, item: Item): void;
43
- /**
44
- * @param {Transaction} _transaction
45
- */
46
- delete(_transaction: Transaction): void;
47
- /**
48
- * @param {Transaction} _tr
49
- */
50
- gc(_tr: Transaction): void;
51
- /**
52
- * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
53
- * @param {number} _offset
54
- * @param {number} _offsetEnd
55
- */
56
- write(encoder: UpdateEncoderV1 | UpdateEncoderV2, _offset: number, _offsetEnd: number): void;
57
- /**
58
- * @return {number}
59
- */
60
- getRef(): number;
61
- }
62
- export function readContentFormat(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentFormat;
63
- import { Transaction } from '../internals.js';
64
- import { Item } from '../internals.js';
65
- import { UpdateEncoderV1 } from '../internals.js';
66
- import { UpdateEncoderV2 } from '../internals.js';
67
- import { UpdateDecoderV1 } from '../internals.js';
68
- import { UpdateDecoderV2 } from '../internals.js';
69
- //# sourceMappingURL=ContentFormat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentFormat.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentFormat.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACE;;;OAGG;IACH,iBAHW,MAAM,SACN,MAAM,EAKhB;IAFC,YAAc;IACd,cAAkB;IAGpB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,KAAK,CAAC,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,aAAa,CAIxB;IAED;;;OAGG;IACH,gBAHW,MAAM,GACL,aAAa,CAIxB;IAED;;;OAGG;IACH,kBAHW,aAAa,GACZ,OAAO,CAIlB;IAED;;;OAGG;IACH,wBAHW,WAAW,QACX,IAAI,QAOd;IAED;;OAEG;IACH,qBAFW,WAAW,QAEE;IACxB;;OAEG;IACH,QAFW,WAAW,QAEX;IACX;;;;OAIG;IACH,eAJW,eAAe,GAAG,eAAe,WACjC,MAAM,cACN,MAAM,QAKhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAMM,2CAHI,eAAe,GAAG,eAAe,GAChC,aAAa,CAE2E;4BAtG7F,iBAAiB;qBAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB"}
@@ -1,70 +0,0 @@
1
- /**
2
- * @private
3
- */
4
- export class ContentJSON {
5
- /**
6
- * @param {Array<any>} arr
7
- */
8
- constructor(arr: Array<any>);
9
- /**
10
- * @type {Array<any>}
11
- */
12
- arr: Array<any>;
13
- /**
14
- * @return {number}
15
- */
16
- getLength(): number;
17
- /**
18
- * @return {Array<any>}
19
- */
20
- getContent(): Array<any>;
21
- /**
22
- * @return {boolean}
23
- */
24
- isCountable(): boolean;
25
- /**
26
- * @return {ContentJSON}
27
- */
28
- copy(): ContentJSON;
29
- /**
30
- * @param {number} offset
31
- * @return {ContentJSON}
32
- */
33
- splice(offset: number): ContentJSON;
34
- /**
35
- * @param {ContentJSON} right
36
- * @return {boolean}
37
- */
38
- mergeWith(right: ContentJSON): boolean;
39
- /**
40
- * @param {Transaction} transaction
41
- * @param {Item} item
42
- */
43
- integrate(transaction: Transaction, item: Item): void;
44
- /**
45
- * @param {Transaction} transaction
46
- */
47
- delete(transaction: Transaction): void;
48
- /**
49
- * @param {Transaction} _tr
50
- */
51
- gc(_tr: Transaction): void;
52
- /**
53
- * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
54
- * @param {number} offset
55
- * @param {number} offsetEnd
56
- */
57
- write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number, offsetEnd: number): void;
58
- /**
59
- * @return {number}
60
- */
61
- getRef(): number;
62
- }
63
- export function readContentJSON(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentJSON;
64
- import { Transaction } from '../internals.js';
65
- import { Item } from '../internals.js';
66
- import { UpdateEncoderV1 } from '../internals.js';
67
- import { UpdateEncoderV2 } from '../internals.js';
68
- import { UpdateDecoderV1 } from '../internals.js';
69
- import { UpdateDecoderV2 } from '../internals.js';
70
- //# sourceMappingURL=ContentJSON.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentJSON.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentJSON.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IACE;;OAEG;IACH,iBAFW,KAAK,CAAC,GAAG,CAAC,EAOpB;IAJC;;OAEG;IACH,KAFU,KAAK,CAAC,GAAG,CAAC,CAEN;IAGhB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,KAAK,CAAC,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,WAAW,CAItB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,WAAW,CAMtB;IAED;;;OAGG;IACH,iBAHW,WAAW,GACV,OAAO,CAKlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,QAFW,WAAW,QAEX;IACX;;;;OAIG;IACH,eAJW,eAAe,GAAG,eAAe,UACjC,MAAM,aACN,MAAM,QAShB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,yCAHI,eAAe,GAAG,eAAe,GAChC,WAAW,CActB;4BApHM,iBAAiB;qBAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB;gCAAjB,iBAAiB"}