lib0 0.2.112 → 0.2.115-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.
Files changed (331) hide show
  1. package/README.md +1 -1
  2. package/broadcastchannel.js +1 -1
  3. package/buffer.d.ts +3 -3
  4. package/buffer.d.ts.map +1 -1
  5. package/buffer.js +1 -1
  6. package/coverage/tmp/coverage-27667-1761218530660-0.json +1 -0
  7. package/coverage/tmp/{coverage-20055-1752683207886-0.json → coverage-27668-1761218485882-0.json} +1 -1
  8. package/crypto/aes-gcm.d.ts +4 -4
  9. package/crypto/aes-gcm.d.ts.map +1 -1
  10. package/crypto/aes-gcm.js +6 -6
  11. package/crypto/common.d.ts +1 -1
  12. package/crypto/common.d.ts.map +1 -1
  13. package/crypto/common.js +1 -1
  14. package/crypto/ecdsa.d.ts +2 -2
  15. package/crypto/ecdsa.d.ts.map +1 -1
  16. package/crypto/ecdsa.js +4 -4
  17. package/crypto/rsa-oaep.d.ts +2 -2
  18. package/crypto/rsa-oaep.d.ts.map +1 -1
  19. package/crypto/rsa-oaep.js +3 -3
  20. package/decoding.d.ts +27 -14
  21. package/decoding.d.ts.map +1 -1
  22. package/decoding.js +12 -8
  23. package/delta/abstract-array.d.ts +166 -0
  24. package/delta/abstract-array.d.ts.map +1 -0
  25. package/delta/abstract-array.js +421 -0
  26. package/delta/abstract.d.ts +69 -0
  27. package/delta/abstract.d.ts.map +1 -0
  28. package/delta/abstract.js +102 -0
  29. package/delta/array.d.ts +23 -0
  30. package/delta/array.d.ts.map +1 -0
  31. package/delta/array.js +45 -0
  32. package/delta/array.test.d.ts +2 -0
  33. package/delta/array.test.d.ts.map +1 -0
  34. package/delta/binding.d.ts +105 -0
  35. package/delta/binding.d.ts.map +1 -0
  36. package/delta/binding.js +369 -0
  37. package/delta/binding.test.d.ts +5 -0
  38. package/delta/binding.test.d.ts.map +1 -0
  39. package/delta/d2.d.ts +705 -0
  40. package/delta/d2.d.ts.map +1 -0
  41. package/delta/d2.js +1309 -0
  42. package/delta/d2.test.d.ts +15 -0
  43. package/delta/d2.test.d.ts.map +1 -0
  44. package/delta/index.d.ts +14 -0
  45. package/delta/index.d.ts.map +1 -0
  46. package/delta/index.js +79 -0
  47. package/delta/map.d.ts +230 -0
  48. package/delta/map.d.ts.map +1 -0
  49. package/delta/map.js +304 -0
  50. package/delta/node.d.ts +119 -0
  51. package/delta/node.d.ts.map +1 -0
  52. package/delta/node.js +183 -0
  53. package/delta/node.test.d.ts +4 -0
  54. package/delta/node.test.d.ts.map +1 -0
  55. package/delta/ops.d.ts +466 -0
  56. package/delta/ops.d.ts.map +1 -0
  57. package/delta/ops.js +544 -0
  58. package/delta/readme.md +129 -0
  59. package/delta/text.d.ts +43 -0
  60. package/delta/text.d.ts.map +1 -0
  61. package/delta/text.js +54 -0
  62. package/delta/text.test.d.ts +6 -0
  63. package/delta/text.test.d.ts.map +1 -0
  64. package/delta/transformer.d.ts +164 -0
  65. package/delta/transformer.d.ts.map +1 -0
  66. package/delta/transformer.js +888 -0
  67. package/delta/transformer.test.d.ts +13 -0
  68. package/delta/transformer.test.d.ts.map +1 -0
  69. package/delta/value.d.ts +84 -0
  70. package/delta/value.d.ts.map +1 -0
  71. package/delta/value.js +168 -0
  72. package/dist/abstract-array.cjs +433 -0
  73. package/dist/abstract-array.cjs.map +1 -0
  74. package/dist/abstract.cjs +122 -0
  75. package/dist/abstract.cjs.map +1 -0
  76. package/dist/aes-gcm.cjs +12 -12
  77. package/dist/aes-gcm.cjs.map +1 -1
  78. package/dist/array.cjs +60 -17
  79. package/dist/array.cjs.map +1 -1
  80. package/dist/array2.cjs +26 -0
  81. package/dist/array2.cjs.map +1 -0
  82. package/dist/binding.cjs +398 -0
  83. package/dist/binding.cjs.map +1 -0
  84. package/dist/{broadcastchannel-2c4b0a1c.cjs → broadcastchannel-b4eaea6e.cjs} +4 -4
  85. package/dist/broadcastchannel-b4eaea6e.cjs.map +1 -0
  86. package/dist/broadcastchannel.cjs +12 -12
  87. package/dist/{buffer-a74f7330.cjs → buffer-adc4e6ea.cjs} +7 -7
  88. package/dist/buffer-adc4e6ea.cjs.map +1 -0
  89. package/dist/buffer.cjs +11 -11
  90. package/dist/buffer.d.ts +3 -3
  91. package/dist/buffer.d.ts.map +1 -1
  92. package/dist/cache.cjs +6 -6
  93. package/dist/common.cjs +1 -1
  94. package/dist/common.cjs.map +1 -1
  95. package/dist/component.cjs +14 -9
  96. package/dist/component.cjs.map +1 -1
  97. package/dist/crypto/aes-gcm.d.ts +4 -4
  98. package/dist/crypto/aes-gcm.d.ts.map +1 -1
  99. package/dist/crypto/common.d.ts +1 -1
  100. package/dist/crypto/common.d.ts.map +1 -1
  101. package/dist/crypto/ecdsa.d.ts +2 -2
  102. package/dist/crypto/ecdsa.d.ts.map +1 -1
  103. package/dist/crypto/rsa-oaep.d.ts +2 -2
  104. package/dist/crypto/rsa-oaep.d.ts.map +1 -1
  105. package/dist/d2.cjs +1347 -0
  106. package/dist/d2.cjs.map +1 -0
  107. package/dist/{decoding-2b136346.cjs → decoding-50b9ce38.cjs} +18 -14
  108. package/dist/decoding-50b9ce38.cjs.map +1 -0
  109. package/dist/decoding.cjs +6 -6
  110. package/dist/decoding.d.ts +27 -14
  111. package/dist/decoding.d.ts.map +1 -1
  112. package/dist/delta/abstract-array.d.ts +166 -0
  113. package/dist/delta/abstract-array.d.ts.map +1 -0
  114. package/dist/delta/abstract.d.ts +69 -0
  115. package/dist/delta/abstract.d.ts.map +1 -0
  116. package/dist/delta/array.d.ts +23 -0
  117. package/dist/delta/array.d.ts.map +1 -0
  118. package/dist/delta/array.test.d.ts +2 -0
  119. package/dist/delta/array.test.d.ts.map +1 -0
  120. package/dist/delta/binding.d.ts +105 -0
  121. package/dist/delta/binding.d.ts.map +1 -0
  122. package/dist/delta/binding.test.d.ts +5 -0
  123. package/dist/delta/binding.test.d.ts.map +1 -0
  124. package/dist/delta/d2.d.ts +705 -0
  125. package/dist/delta/d2.d.ts.map +1 -0
  126. package/dist/delta/d2.test.d.ts +15 -0
  127. package/dist/delta/d2.test.d.ts.map +1 -0
  128. package/dist/delta/index.d.ts +14 -0
  129. package/dist/delta/index.d.ts.map +1 -0
  130. package/dist/delta/map.d.ts +230 -0
  131. package/dist/delta/map.d.ts.map +1 -0
  132. package/dist/delta/node.d.ts +119 -0
  133. package/dist/delta/node.d.ts.map +1 -0
  134. package/dist/delta/node.test.d.ts +4 -0
  135. package/dist/delta/node.test.d.ts.map +1 -0
  136. package/dist/delta/ops.d.ts +466 -0
  137. package/dist/delta/ops.d.ts.map +1 -0
  138. package/dist/delta/text.d.ts +43 -0
  139. package/dist/delta/text.d.ts.map +1 -0
  140. package/dist/delta/text.test.d.ts +6 -0
  141. package/dist/delta/text.test.d.ts.map +1 -0
  142. package/dist/delta/transformer.d.ts +164 -0
  143. package/dist/delta/transformer.d.ts.map +1 -0
  144. package/dist/delta/transformer.test.d.ts +13 -0
  145. package/dist/delta/transformer.test.d.ts.map +1 -0
  146. package/dist/delta/value.d.ts +84 -0
  147. package/dist/delta/value.d.ts.map +1 -0
  148. package/dist/{diff-77c4cf8e.cjs → diff-f0776c15.cjs} +2 -2
  149. package/dist/{diff-77c4cf8e.cjs.map → diff-f0776c15.cjs.map} +1 -1
  150. package/dist/diff.cjs +3 -3
  151. package/dist/{dom-16daf1a0.cjs → dom-2b123630.cjs} +31 -2
  152. package/dist/dom-2b123630.cjs.map +1 -0
  153. package/dist/dom.cjs +17 -2
  154. package/dist/dom.cjs.map +1 -1
  155. package/dist/dom.d.ts +17 -0
  156. package/dist/dom.d.ts.map +1 -1
  157. package/dist/ecdsa.cjs +4 -4
  158. package/dist/ecdsa.cjs.map +1 -1
  159. package/dist/{encoding-1acb59c4.cjs → encoding-7f85922c.cjs} +5 -5
  160. package/dist/encoding-7f85922c.cjs.map +1 -0
  161. package/dist/encoding.cjs +4 -4
  162. package/dist/encoding.d.ts +6 -6
  163. package/dist/encoding.d.ts.map +1 -1
  164. package/dist/{environment-2de08e0e.cjs → environment-90227ead.cjs} +4 -4
  165. package/dist/{environment-2de08e0e.cjs.map → environment-90227ead.cjs.map} +1 -1
  166. package/dist/environment.cjs +5 -5
  167. package/dist/{error-8582d695.cjs → error-0c1f634f.cjs} +10 -2
  168. package/dist/error-0c1f634f.cjs.map +1 -0
  169. package/dist/error.cjs +2 -1
  170. package/dist/error.cjs.map +1 -1
  171. package/dist/error.d.ts +1 -0
  172. package/dist/error.d.ts.map +1 -1
  173. package/dist/{eventloop-b299a889.cjs → eventloop-a0168106.cjs} +2 -2
  174. package/dist/{eventloop-b299a889.cjs.map → eventloop-a0168106.cjs.map} +1 -1
  175. package/dist/eventloop.cjs +3 -3
  176. package/dist/{function-09b8292c.cjs → function-e7d18feb.cjs} +2 -2
  177. package/dist/{function-09b8292c.cjs.map → function-e7d18feb.cjs.map} +1 -1
  178. package/dist/function.cjs +2 -2
  179. package/dist/index.cjs +23 -22
  180. package/dist/index.cjs.map +1 -1
  181. package/dist/index2.cjs +71 -0
  182. package/dist/index2.cjs.map +1 -0
  183. package/dist/{indexeddb-0cbb4d6f.cjs → indexeddb-46d1e737.cjs} +3 -3
  184. package/dist/{indexeddb-0cbb4d6f.cjs.map → indexeddb-46d1e737.cjs.map} +1 -1
  185. package/dist/indexeddb.cjs +5 -5
  186. package/dist/indexeddbV2.cjs +2 -1
  187. package/dist/indexeddbV2.cjs.map +1 -1
  188. package/dist/jwt.cjs +12 -12
  189. package/dist/list.cjs +39 -12
  190. package/dist/list.cjs.map +1 -1
  191. package/dist/list.d.ts +13 -3
  192. package/dist/list.d.ts.map +1 -1
  193. package/dist/logging.cjs +11 -9
  194. package/dist/logging.cjs.map +1 -1
  195. package/dist/logging.common.cjs +7 -7
  196. package/dist/logging.node.cjs +7 -7
  197. package/dist/{map-0dabcc55.cjs → map-24d263c0.cjs} +7 -1
  198. package/dist/map-24d263c0.cjs.map +1 -0
  199. package/dist/map.cjs +314 -7
  200. package/dist/map.cjs.map +1 -1
  201. package/dist/map.d.ts +1 -0
  202. package/dist/map.d.ts.map +1 -1
  203. package/dist/map2.cjs +15 -0
  204. package/dist/map2.cjs.map +1 -0
  205. package/dist/{math-08e068f9.cjs → math-96d5e8c4.cjs} +4 -2
  206. package/dist/math-96d5e8c4.cjs.map +1 -0
  207. package/dist/math.cjs +1 -1
  208. package/dist/math.d.ts.map +1 -1
  209. package/dist/metric.cjs +1 -1
  210. package/dist/node.cjs +206 -0
  211. package/dist/node.cjs.map +1 -0
  212. package/dist/{number-466d8922.cjs → number-1fb57bba.cjs} +2 -2
  213. package/dist/{number-466d8922.cjs.map → number-1fb57bba.cjs.map} +1 -1
  214. package/dist/number.cjs +2 -2
  215. package/dist/{object-491858d1.cjs → object-18980796.cjs} +12 -2
  216. package/dist/object-18980796.cjs.map +1 -0
  217. package/dist/object.cjs +3 -1
  218. package/dist/object.cjs.map +1 -1
  219. package/dist/object.d.ts +3 -0
  220. package/dist/object.d.ts.map +1 -1
  221. package/dist/observable.cjs +1 -1
  222. package/dist/ops.cjs +575 -0
  223. package/dist/ops.cjs.map +1 -0
  224. package/dist/patience.cjs +2 -2
  225. package/dist/performance.node.cjs +4 -4
  226. package/dist/pledge.cjs +2 -1
  227. package/dist/pledge.cjs.map +1 -1
  228. package/dist/{prng-24dfe0bf.cjs → prng-004c76e8.cjs} +5 -5
  229. package/dist/{prng-24dfe0bf.cjs.map → prng-004c76e8.cjs.map} +1 -1
  230. package/dist/prng.cjs +12 -12
  231. package/dist/prng.d.ts +1 -1
  232. package/dist/prng.d.ts.map +1 -1
  233. package/dist/{promise-7d13a97c.cjs → promise-cda7b9bb.cjs} +2 -2
  234. package/dist/{promise-7d13a97c.cjs.map → promise-cda7b9bb.cjs.map} +1 -1
  235. package/dist/promise.cjs +3 -3
  236. package/dist/rabin-gf2-polynomial.cjs +11 -11
  237. package/dist/rabin-uncached.cjs +11 -11
  238. package/dist/rabin.cjs +11 -11
  239. package/dist/random.cjs +1 -1
  240. package/dist/rsa-oaep.cjs +3 -3
  241. package/dist/rsa-oaep.cjs.map +1 -1
  242. package/dist/schema.cjs +572 -167
  243. package/dist/schema.cjs.map +1 -1
  244. package/dist/schema.d.ts +326 -122
  245. package/dist/schema.d.ts.map +1 -1
  246. package/dist/schema.test.d.ts +5 -0
  247. package/dist/schema.test.d.ts.map +1 -1
  248. package/dist/{sort-b8702761.cjs → sort-812cc211.cjs} +2 -2
  249. package/dist/{sort-b8702761.cjs.map → sort-812cc211.cjs.map} +1 -1
  250. package/dist/sort.cjs +2 -2
  251. package/dist/{statistics-c2316dca.cjs → statistics-65f6114b.cjs} +2 -2
  252. package/dist/{statistics-c2316dca.cjs.map → statistics-65f6114b.cjs.map} +1 -1
  253. package/dist/statistics.cjs +2 -2
  254. package/dist/{string-b2827a90.cjs → string-fddc5f8b.cjs} +3 -3
  255. package/dist/string-fddc5f8b.cjs.map +1 -0
  256. package/dist/string.cjs +1 -1
  257. package/dist/string.d.ts +3 -3
  258. package/dist/string.d.ts.map +1 -1
  259. package/dist/testing.cjs +16 -16
  260. package/dist/text.cjs +79 -0
  261. package/dist/text.cjs.map +1 -0
  262. package/dist/{time-bc2081b9.cjs → time-d8438852.cjs} +2 -2
  263. package/dist/{time-bc2081b9.cjs.map → time-d8438852.cjs.map} +1 -1
  264. package/dist/time.cjs +2 -2
  265. package/dist/traits.cjs +22 -0
  266. package/dist/traits.cjs.map +1 -1
  267. package/dist/traits.d.ts +1 -0
  268. package/dist/traits.d.ts.map +1 -1
  269. package/dist/traits.test.d.ts.map +1 -1
  270. package/dist/transformer.cjs +930 -0
  271. package/dist/transformer.cjs.map +1 -0
  272. package/dist/url.cjs +2 -1
  273. package/dist/url.cjs.map +1 -1
  274. package/dist/value.cjs +187 -0
  275. package/dist/value.cjs.map +1 -0
  276. package/dist/webcrypto.d.ts +1 -1
  277. package/dist/webcrypto.d.ts.map +1 -1
  278. package/dist/{websocket-40a601d4.cjs → websocket-b073d0fc.cjs} +3 -3
  279. package/dist/{websocket-40a601d4.cjs.map → websocket-b073d0fc.cjs.map} +1 -1
  280. package/dist/websocket.cjs +4 -4
  281. package/dom.d.ts +17 -0
  282. package/dom.d.ts.map +1 -1
  283. package/dom.js +21 -0
  284. package/encoding.d.ts +6 -6
  285. package/encoding.d.ts.map +1 -1
  286. package/encoding.js +1 -1
  287. package/error.d.ts +1 -0
  288. package/error.d.ts.map +1 -1
  289. package/error.js +6 -0
  290. package/list.d.ts +13 -3
  291. package/list.d.ts.map +1 -1
  292. package/list.js +36 -8
  293. package/map.d.ts +1 -0
  294. package/map.d.ts.map +1 -1
  295. package/map.js +6 -0
  296. package/math.d.ts.map +1 -1
  297. package/math.js +3 -1
  298. package/object.d.ts +3 -0
  299. package/object.d.ts.map +1 -1
  300. package/object.js +9 -1
  301. package/package.json +9 -3
  302. package/prng.d.ts +1 -1
  303. package/prng.d.ts.map +1 -1
  304. package/prng.js +1 -1
  305. package/schema.d.ts +326 -122
  306. package/schema.d.ts.map +1 -1
  307. package/schema.js +513 -141
  308. package/schema.test.d.ts +5 -0
  309. package/schema.test.d.ts.map +1 -1
  310. package/string.d.ts +3 -3
  311. package/string.d.ts.map +1 -1
  312. package/string.js +2 -2
  313. package/test.html +1 -0
  314. package/test.js +13 -1
  315. package/traits.d.ts +1 -0
  316. package/traits.d.ts.map +1 -1
  317. package/traits.js +21 -0
  318. package/traits.test.d.ts.map +1 -1
  319. package/webcrypto.d.ts +1 -1
  320. package/webcrypto.d.ts.map +1 -1
  321. package/coverage/tmp/coverage-20054-1752683240888-0.json +0 -1
  322. package/dist/broadcastchannel-2c4b0a1c.cjs.map +0 -1
  323. package/dist/buffer-a74f7330.cjs.map +0 -1
  324. package/dist/decoding-2b136346.cjs.map +0 -1
  325. package/dist/dom-16daf1a0.cjs.map +0 -1
  326. package/dist/encoding-1acb59c4.cjs.map +0 -1
  327. package/dist/error-8582d695.cjs.map +0 -1
  328. package/dist/map-0dabcc55.cjs.map +0 -1
  329. package/dist/math-08e068f9.cjs.map +0 -1
  330. package/dist/object-491858d1.cjs.map +0 -1
  331. package/dist/string-b2827a90.cjs.map +0 -1
@@ -0,0 +1,421 @@
1
+ import * as s from '../schema.js'
2
+ import * as d from './abstract.js'
3
+ import * as traits from '../traits.js'
4
+ import * as object from '../object.js'
5
+ import * as fun from '../function.js'
6
+ import * as array from '../array.js'
7
+ import * as dops from './ops.js'
8
+ import * as error from '../error.js'
9
+ import * as math from '../math.js'
10
+ import { InsertOp, DeleteOp, RetainOp, ModifyOp, TextOp } from './ops.js'
11
+
12
+ /**
13
+ * @typedef {Array<dops.DeltaJsonOp>} DeltaJson
14
+ */
15
+
16
+ /**
17
+ * @template {'array' | 'text' | 'custom'} Type
18
+ * @template {dops.AbstractDeltaArrayOps<any>} OPS
19
+ * @extends {d.AbstractDelta}
20
+ */
21
+ export class AbstractDeltaArray extends d.AbstractDelta {
22
+ /**
23
+ * @param {Type} type
24
+ */
25
+ constructor (type) {
26
+ super()
27
+ this.type = type
28
+ /**
29
+ * @type {Array<OPS>}
30
+ */
31
+ this.ops = []
32
+ }
33
+
34
+ isEmpty () {
35
+ return this.ops.length === 0
36
+ }
37
+
38
+ /**
39
+ * @template M
40
+ * @param {(d:OPS) => dops.AbstractDeltaArrayOps<M>} f
41
+ * @return {AbstractDeltaArrayBuilder<Type,M>}
42
+ */
43
+ map (f) {
44
+ const d = /** @type {AbstractDeltaArrayBuilder<Type,any>} */ (new /** @type {any} */ (this.constructor)(this.type))
45
+ d.ops = this.ops.map(f)
46
+ d.lastOp = d.ops[d.ops.length - 1] ?? null
47
+ return d
48
+ }
49
+
50
+ /**
51
+ *
52
+ * Iterate through the changes. There are two approches to iterate through the changes. The
53
+ * following examples achieve the same thing:
54
+ *
55
+ * @example
56
+ * d.forEach((op, index) => {
57
+ * if (op instanceof delta.InsertArrayOp) {
58
+ * op.insert
59
+ * } else if (op instanceof delta.RetainOp ) {
60
+ * op.retain
61
+ * } else if (op instanceof delta.DeleteOp) {
62
+ * op.delete
63
+ * }
64
+ * })
65
+ *
66
+ * The second approach doesn't require instanceof checks.
67
+ *
68
+ * @example
69
+ * d.forEach(null,
70
+ * (insertOp, index) => insertOp.insert,
71
+ * (retainOp, index) => insertOp.retain
72
+ * (deleteOp, index) => insertOp.delete
73
+ * )
74
+ *
75
+ * @param {null|((d:OPS,index:number)=>void)} f
76
+ * @param {null|((insertOp:Extract<OPS,InsertOp<any>|TextOp>,index:number)=>void)} insertHandler
77
+ * @param {null|((retainOp:RetainOp,index:number)=>void)} retainHandler
78
+ * @param {null|((deleteOp:DeleteOp,index:number)=>void)} deleteHandler
79
+ * @param {null|((modifyOp:OPS extends ModifyOp<infer M> ? ModifyOp<M> : never,index:number)=>void)} modifyHandler
80
+ */
81
+ forEach (f = null, insertHandler = null, retainHandler = null, deleteHandler = null, modifyHandler = null) {
82
+ for (
83
+ let i = 0, index = 0, op = this.ops[i];
84
+ i < this.ops.length;
85
+ i++, index += op.length, op = this.ops[i]
86
+ ) {
87
+ f?.(op, index)
88
+ switch (op.constructor) {
89
+ case RetainOp:
90
+ retainHandler?.(/** @type {RetainOp} */ (op), index)
91
+ break
92
+ case DeleteOp:
93
+ deleteHandler?.(/** @type {DeleteOp} */ (op), index)
94
+ break
95
+ case ModifyOp:
96
+ modifyHandler?.(/** @type {any}) */ (op), index)
97
+ break
98
+ default:
99
+ insertHandler?.(/** @type {any} */ (op), index)
100
+ }
101
+ }
102
+ }
103
+
104
+ /**
105
+ * @param {AbstractDeltaArray<Type, OPS>} other
106
+ * @return {boolean}
107
+ */
108
+ equals (other) {
109
+ return this[traits.EqualityTraitSymbol](other)
110
+ }
111
+
112
+ /**
113
+ * @returns {DeltaJson}
114
+ */
115
+ toJSON () {
116
+ return this.ops.map(o => o.toJSON())
117
+ }
118
+
119
+ get size () {
120
+ return this.ops.length
121
+ }
122
+
123
+ /**
124
+ * @param {AbstractDeltaArray<Type,OPS>} other
125
+ */
126
+ [traits.EqualityTraitSymbol] (other) {
127
+ return fun.equalityDeep(this.ops, other.ops)
128
+ }
129
+ }
130
+
131
+ /**
132
+ * @template {'text' | 'array' | 'custom'} Type
133
+ * @template {dops.AbstractDeltaArrayOps<any>} OPS
134
+ * @extends {AbstractDeltaArray<Type,OPS>}
135
+ */
136
+ export class AbstractDeltaArrayBuilder extends AbstractDeltaArray {
137
+ /**
138
+ * @param {Type} type
139
+ * @param {s.Schema<OPS extends dops.AbstractDeltaArrayOps<infer V> ? V : never>} $insert
140
+ */
141
+ constructor (type, $insert) {
142
+ super(type)
143
+ this.$insert = $insert
144
+ /**
145
+ * @type {dops.FormattingAttributes?}
146
+ */
147
+ this.usedAttributes = null
148
+ /**
149
+ * @type {d.Attribution?}
150
+ */
151
+ this.usedAttribution = null
152
+ /**
153
+ * @type {dops.AbstractDeltaArrayOps<any>?}
154
+ */
155
+ this.lastOp = null
156
+ }
157
+
158
+ /**
159
+ * @return {this}
160
+ */
161
+ clone () {
162
+ const d = /** @type {this} */ (new AbstractDeltaArrayBuilder(this.type, this.$insert))
163
+ d.ops = /** @type {OPS[]} */ (this.ops.map(op => op.clone()))
164
+ d.origin = this.origin
165
+ d.isDiff = this.isDiff
166
+ return d
167
+ }
168
+
169
+ /**
170
+ * @param {dops.FormattingAttributes?} attributes
171
+ * @return {this}
172
+ */
173
+ useAttributes (attributes) {
174
+ this.usedAttributes = attributes
175
+ return this
176
+ }
177
+
178
+ /**
179
+ * @param {string} name
180
+ * @param {any} value
181
+ */
182
+ updateUsedAttributes (name, value) {
183
+ if (value == null) {
184
+ this.usedAttributes = object.assign({}, this.usedAttributes)
185
+ delete this.usedAttributes?.[name]
186
+ if (object.isEmpty(this.usedAttributes)) {
187
+ this.usedAttributes = null
188
+ }
189
+ } else if (!fun.equalityDeep(this.usedAttributes?.[name], value)) {
190
+ this.usedAttributes = object.assign({}, this.usedAttributes)
191
+ this.usedAttributes[name] = value
192
+ }
193
+ return this
194
+ }
195
+
196
+ /**
197
+ * @template {keyof d.Attribution} NAME
198
+ * @param {NAME} name
199
+ * @param {d.Attribution[NAME]?} value
200
+ */
201
+ updateUsedAttribution (name, value) {
202
+ if (value == null) {
203
+ this.usedAttribution = object.assign({}, this.usedAttribution)
204
+ delete this.usedAttribution?.[name]
205
+ if (object.isEmpty(this.usedAttribution)) {
206
+ this.usedAttribution = null
207
+ }
208
+ } else if (!fun.equalityDeep(this.usedAttribution?.[name], value)) {
209
+ this.usedAttribution = object.assign({}, this.usedAttribution)
210
+ this.usedAttribution[name] = value
211
+ }
212
+ return this
213
+ }
214
+
215
+ /**
216
+ * @param {d.Attribution?} attribution
217
+ */
218
+ useAttribution (attribution) {
219
+ this.usedAttribution = attribution
220
+ return this
221
+ }
222
+
223
+ /**
224
+ * @param {(OPS extends TextOp ? string : never) | (OPS extends InsertOp<infer Content> ? Array<Content> : never) } insert
225
+ * @param {dops.FormattingAttributes?} attributes
226
+ * @param {d.Attribution?} attribution
227
+ * @return {this}
228
+ */
229
+ insert (insert, attributes = null, attribution = null) {
230
+ const mergedAttributes = d.mergeAttrs(this.usedAttributes, attributes)
231
+ const mergedAttribution = d.mergeAttrs(this.usedAttribution, attribution)
232
+ /**
233
+ * @param {TextOp | InsertOp<any>} lastOp
234
+ */
235
+ const checkMergedEquals = lastOp => (mergedAttributes === lastOp.attributes || fun.equalityDeep(mergedAttributes, lastOp.attributes)) && (mergedAttribution === lastOp.attribution || fun.equalityDeep(mergedAttribution, lastOp.attribution))
236
+ if (s.$string.check(insert)) {
237
+ if (dops.$textOp.check(this.lastOp) && checkMergedEquals(this.lastOp)) {
238
+ this.lastOp.insert += insert
239
+ } else if (insert.length > 0) {
240
+ this.ops.push(this.lastOp = /** @type {OPS} */ (new TextOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)))
241
+ }
242
+ } else if (array.isArray(insert)) {
243
+ insert.forEach(/** @param {any} ins */ ins => this.$insert.expect(ins))
244
+ if (dops.$insertOp.check(this.lastOp) && checkMergedEquals(this.lastOp)) {
245
+ this.lastOp.insert.push(...insert)
246
+ } else if (insert.length > 0) {
247
+ this.ops.push(this.lastOp = /** @type {OPS} */ (new InsertOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)))
248
+ }
249
+ }
250
+ return this
251
+ }
252
+
253
+ /**
254
+ * @param {OPS extends ModifyOp<infer Mod> ? Mod : never } modify
255
+ * @param {dops.FormattingAttributes?} attributes
256
+ * @param {d.Attribution?} attribution
257
+ * @return {this}
258
+ */
259
+ modify (modify, attributes = null, attribution = null) {
260
+ const mergedAttributes = d.mergeAttrs(this.usedAttributes, attributes)
261
+ const mergedAttribution = d.mergeAttrs(this.usedAttribution, attribution)
262
+ this.ops.push(this.lastOp = /** @type {OPS} */ (new ModifyOp(modify, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)))
263
+ return this
264
+ }
265
+
266
+ /**
267
+ * @param {number} retain
268
+ * @param {dops.FormattingAttributes?} attributes
269
+ * @param {d.Attribution?} attribution
270
+ * @return {this}
271
+ */
272
+ retain (retain, attributes = null, attribution = null) {
273
+ const mergedAttributes = d.mergeAttrs(this.usedAttributes, attributes)
274
+ const mergedAttribution = d.mergeAttrs(this.usedAttribution, attribution)
275
+ if (this.lastOp instanceof RetainOp && fun.equalityDeep(mergedAttributes, this.lastOp.attributes) && fun.equalityDeep(mergedAttribution, this.lastOp.attribution)) {
276
+ this.lastOp.retain += retain
277
+ } else if (retain > 0) {
278
+ // @ts-ignore
279
+ this.ops.push(this.lastOp = new RetainOp(retain, mergedAttributes, mergedAttribution))
280
+ }
281
+ return this
282
+ }
283
+
284
+ /**
285
+ * @param {number} len
286
+ * @return {this}
287
+ */
288
+ delete (len) {
289
+ if (this.lastOp instanceof DeleteOp) {
290
+ this.lastOp.delete += len
291
+ } else if (len > 0) {
292
+ // @ts-ignore
293
+ this.ops.push(this.lastOp = new DeleteOp(len))
294
+ }
295
+ return this
296
+ }
297
+
298
+ /**
299
+ * @todo this is basically untested and is in dire need of randomized testing.
300
+ * @param {AbstractDeltaArray<Type, OPS>} other
301
+ */
302
+ apply (other) {
303
+ let opsI = 0
304
+ let offset = 0
305
+ other.forEach(
306
+ null,
307
+ insertOp => {
308
+ const o = this.ops[opsI]
309
+ if (offset === 0) {
310
+ this.ops.splice(opsI, 0, /** @type {OPS} */ (insertOp.clone()))
311
+ opsI++
312
+ } else {
313
+ const cpy = o.clone()
314
+ cpy._splice(0, offset)
315
+ o._splice(offset, o.length - offset)
316
+ this.ops.splice(opsI + 1, 0, /** @type {OPS} */ (insertOp.clone()), /** @type {OPS} */ (cpy))
317
+ opsI += 2
318
+ offset = 0
319
+ }
320
+ },
321
+ retainOp => {
322
+ let skipLen = retainOp.length
323
+ let o = this.ops[opsI]
324
+ while (o.length - offset <= skipLen) {
325
+ skipLen -= o.length - offset
326
+ o = this.ops[++opsI]
327
+ offset = 0
328
+ }
329
+ offset = skipLen
330
+ },
331
+ deleteOp => {
332
+ let remainingLen = deleteOp.length
333
+ while (remainingLen > 0) {
334
+ const o = this.ops[opsI]
335
+ if (o instanceof DeleteOp) {
336
+ const delLen = o.length - offset
337
+ // the same content can't be deleted twice, remove duplicated deletes
338
+ if (delLen >= remainingLen) {
339
+ offset = 0
340
+ opsI++
341
+ } else {
342
+ offset += remainingLen
343
+ }
344
+ remainingLen -= delLen
345
+ } else { // insert / embed / retain / modify ⇒ replace
346
+ // case1: delete o fully
347
+ // case2: delete some part of beginning
348
+ // case3: delete some part of end
349
+ // case4: delete some part of center
350
+ const delLen = math.min(o.length - offset, remainingLen)
351
+ if (o.length === delLen) {
352
+ // case 1
353
+ offset = 0
354
+ this.ops.splice(opsI, 1)
355
+ } else if (offset === 0) {
356
+ // case 2
357
+ offset = 0
358
+ o._splice(0, delLen)
359
+ } else if (offset + delLen === o.length) {
360
+ // case 3
361
+ o._splice(offset, delLen)
362
+ offset = 0
363
+ opsI++
364
+ } else {
365
+ // case 4
366
+ o._splice(offset, delLen)
367
+ }
368
+ remainingLen -= delLen
369
+ }
370
+ }
371
+ },
372
+ modifyOp => {
373
+ if (opsI >= this.ops.length) {
374
+ this.ops.push(/** @type {OPS} */ (modifyOp.clone()))
375
+ return
376
+ }
377
+ let o = this.ops[opsI]
378
+ if (dops.$modifyOp.check(o)) {
379
+ o.modify.apply(modifyOp.modify)
380
+ } else if (dops.$insertOp.check(o)) {
381
+ const d = o.insert[offset]
382
+ d.apply(modifyOp.modify)
383
+ } else if (dops.$retainOp.check(o)) {
384
+ if (offset > 0) {
385
+ const cpy = o.clone()
386
+ cpy._splice(0, offset)
387
+ o._splice(offset, o.length - offset)
388
+ this.ops.splice(opsI + 1, 0, /** @type {OPS} */ (cpy))
389
+ opsI++
390
+ o = /** @type {OPS} */ (cpy)
391
+ offset = 0
392
+ }
393
+ if (o.length === 1) {
394
+ this.ops[opsI] = /** @type {OPS} */ (modifyOp.clone())
395
+ opsI++
396
+ } else {
397
+ this.ops.splice(opsI, 0, /** @type {OPS} */ (modifyOp.clone()))
398
+ o._splice(0, 1)
399
+ opsI++
400
+ }
401
+ } else if (dops.$deleteOp.check(o)) {
402
+ // nop
403
+ } else {
404
+ error.unexpectedCase()
405
+ }
406
+ }
407
+ )
408
+ this.lastOp = this.ops[this.ops.length - 1]
409
+ }
410
+
411
+ /**
412
+ * @return {Type extends 'array' ? (OPS extends dops.InsertOp<infer C> ? import('./array.js').DeltaArray<C> : never) : (Type extends 'text' ? (OPS extends dops.DeltaTextOps<infer Embeds> ? import('./text.js').DeltaText<Embeds> : never) : AbstractDeltaArray<Type,OPS>)}
413
+ */
414
+ done () {
415
+ while (this.lastOp != null && this.lastOp instanceof RetainOp && this.lastOp.attributes === null && this.lastOp.attribution === null) {
416
+ this.ops.pop()
417
+ this.lastOp = this.ops[this.ops.length - 1] ?? null
418
+ }
419
+ return /** @type {any} */ (this)
420
+ }
421
+ }
@@ -0,0 +1,69 @@
1
+ export const $attribution: s.Schema<{
2
+ insert?: string[] | undefined;
3
+ insertAt?: number | undefined;
4
+ delete?: string[] | undefined;
5
+ deleteAt?: number | undefined;
6
+ attributes?: {
7
+ [x: string]: string[];
8
+ } | undefined;
9
+ attributesAt?: number | undefined;
10
+ } & {}>;
11
+ /**
12
+ * @typedef {s.TypeOf<$attribution>} Attribution
13
+ */
14
+ /**
15
+ * @implements {traits.EqualityTrait}
16
+ */
17
+ export class AbstractDelta implements traits.EqualityTrait {
18
+ remote: boolean;
19
+ /**
20
+ * @type {any} origin
21
+ */
22
+ origin: any;
23
+ isDiff: boolean;
24
+ /**
25
+ * @return {any}
26
+ */
27
+ toJSON(): any;
28
+ /**
29
+ * @return {boolean}
30
+ */
31
+ isEmpty(): boolean;
32
+ /**
33
+ * @param {AbstractDelta} other
34
+ * @param {boolean} priority
35
+ */
36
+ rebase(other: AbstractDelta, priority: boolean): void;
37
+ /**
38
+ * @param {AbstractDelta} other
39
+ */
40
+ apply(other: AbstractDelta): void;
41
+ /**
42
+ * @return {this}
43
+ */
44
+ clone(): this;
45
+ /**
46
+ * @param {any} _other
47
+ * @return {boolean}
48
+ */
49
+ [traits.EqualityTraitSymbol](_other: any): boolean;
50
+ }
51
+ export const $delta: s.Schema<AbstractDelta>;
52
+ export const $$delta: s.Schema<s.$InstanceOf<AbstractDelta>>;
53
+ export function mergeAttrs<T extends {
54
+ [key: string]: any;
55
+ }>(a: T | null, b: T | null): T | null;
56
+ export function mergeDeltas<D extends AbstractDelta | null>(a: D, b: D): D;
57
+ export type Attribution = s.TypeOf<s.Schema<{
58
+ insert?: string[] | undefined;
59
+ insertAt?: number | undefined;
60
+ delete?: string[] | undefined;
61
+ deleteAt?: number | undefined;
62
+ attributes?: {
63
+ [x: string]: string[];
64
+ } | undefined;
65
+ attributesAt?: number | undefined;
66
+ } & {}>>;
67
+ import * as s from '../schema.js';
68
+ import * as traits from '../traits.js';
69
+ //# sourceMappingURL=abstract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstract.d.ts","sourceRoot":"","sources":["abstract.js"],"names":[],"mappings":"AAKA;;;;;;;;;QAOE;AAEF;;GAEG;AAEH;;GAEG;AACH,sCAFgB,MAAM,CAAC,aAAa;IAIhC,gBAAmB;IACnB;;OAEG;IACH,QAFU,GAAG,CAEK;IAClB,gBAAkB;IAGpB;;OAEG;IACH,UAFY,GAAG,CAId;IAED;;OAEG;IACH,WAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,cAHW,aAAa,YACb,OAAO,QAIjB;IAED;;OAEG;IACH,aAFW,aAAa,QAIvB;IAED;;OAEG;IACH,SAFY,IAAI,CAIf;IAED;;;OAGG;IACH,qCAHW,GAAG,GACF,OAAO,CAIlB;CACF;AAED,6CAAkD;AAClD,sBAAkC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAuF;AASxJ,2BAJ+B,CAAC,SAA1B;IAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAG,KAC1B,CAAC,GAAG,IAAI,KACR,CAAC,GAAG,IAAI,YAE0F;AAQtG,4BALuB,CAAC,SAAjB,aAAa,OAAE,KAClB,CAAC,KACD,CAAC,GACA,CAAC,CASZ;0BAtFY,CAAC,CAAC,MAAM;;;;;;;;;QAAc;mBAZhB,cAAc;wBAFT,cAAc"}
@@ -0,0 +1,102 @@
1
+ import * as object from '../object.js'
2
+ import * as traits from '../traits.js'
3
+ import * as error from '../error.js'
4
+ import * as s from '../schema.js'
5
+
6
+ export const $attribution = s.$object({
7
+ insert: s.$array(s.$string).optional,
8
+ insertAt: s.$number.optional,
9
+ delete: s.$array(s.$string).optional,
10
+ deleteAt: s.$number.optional,
11
+ attributes: s.$record(s.$string, s.$array(s.$string)).optional,
12
+ attributesAt: s.$number.optional
13
+ })
14
+
15
+ /**
16
+ * @typedef {s.TypeOf<$attribution>} Attribution
17
+ */
18
+
19
+ /**
20
+ * @implements {traits.EqualityTrait}
21
+ */
22
+ export class AbstractDelta {
23
+ constructor () {
24
+ this.remote = false
25
+ /**
26
+ * @type {any} origin
27
+ */
28
+ this.origin = null
29
+ this.isDiff = true
30
+ }
31
+
32
+ /**
33
+ * @return {any}
34
+ */
35
+ toJSON () {
36
+ error.methodUnimplemented()
37
+ }
38
+
39
+ /**
40
+ * @return {boolean}
41
+ */
42
+ isEmpty () {
43
+ error.methodUnimplemented()
44
+ }
45
+
46
+ /**
47
+ * @param {AbstractDelta} other
48
+ * @param {boolean} priority
49
+ */
50
+ rebase (other, priority) {
51
+ error.methodUnimplemented()
52
+ }
53
+
54
+ /**
55
+ * @param {AbstractDelta} other
56
+ */
57
+ apply (other) {
58
+ error.methodUnimplemented()
59
+ }
60
+
61
+ /**
62
+ * @return {this}
63
+ */
64
+ clone () {
65
+ error.methodUnimplemented()
66
+ }
67
+
68
+ /**
69
+ * @param {any} _other
70
+ * @return {boolean}
71
+ */
72
+ [traits.EqualityTraitSymbol] (_other) {
73
+ error.methodUnimplemented()
74
+ }
75
+ }
76
+
77
+ export const $delta = s.$instanceOf(AbstractDelta)
78
+ export const $$delta = /** @type {s.Schema<s.$InstanceOf<AbstractDelta>>} */ (s.$constructedBy(s.$InstanceOf, s => s.shape.prototype instanceof AbstractDelta))
79
+
80
+ /**
81
+ * Helper function to merge attribution and attributes. The latter input "wins".
82
+ *
83
+ * @template {{ [key: string]: any }} T
84
+ * @param {T | null} a
85
+ * @param {T | null} b
86
+ */
87
+ export const mergeAttrs = (a, b) => object.isEmpty(a) ? b : (object.isEmpty(b) ? a : object.assign({}, a, b))
88
+
89
+ /**
90
+ * @template {AbstractDelta?} D
91
+ * @param {D} a
92
+ * @param {D} b
93
+ * @return {D}
94
+ */
95
+ export const mergeDeltas = (a, b) => {
96
+ if (a != null && b != null) {
97
+ const c = /** @type {D & AbstractDelta} */ (a.clone())
98
+ c.apply(b)
99
+ return c
100
+ }
101
+ return a == null ? b : (a || null)
102
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @template ArrayContent
3
+ * @template {boolean} [WithText=false]
4
+ * @extends AbstractDeltaArrayBuilder<'array', import('./ops.js').DeltaArrayOps<ArrayContent,WithText>>
5
+ */
6
+ export class DeltaArray<ArrayContent, WithText extends boolean = false> extends AbstractDeltaArrayBuilder<"array", ops.DeltaArrayOps<ArrayContent, WithText>> {
7
+ /**
8
+ * @param {s.Schema<ArrayContent>} $insert
9
+ * @param {WithText} withText
10
+ */
11
+ constructor($insert: s.Schema<ArrayContent>, withText: WithText);
12
+ withText: WithText;
13
+ }
14
+ export function $array<ArrayContent, WithText extends boolean = false>($insert: s.Schema<ArrayContent>, withText?: WithText): s.Schema<DeltaArray<ArrayContent, WithText>>;
15
+ /**
16
+ * @type {s.Schema<DeltaArray<any,any>>}
17
+ */
18
+ export const $arrayAny: s.Schema<DeltaArray<any, any>>;
19
+ export function array<V = any, WithText extends boolean = any>($insert?: s.Schema<V>, withText?: WithText): DeltaArray<V, WithText>;
20
+ import * as ops from './ops.js';
21
+ import { AbstractDeltaArrayBuilder } from './abstract-array.js';
22
+ import * as s from '../schema.js';
23
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["array.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAJa,YAAY,EACD,QAAQ,SAAnB,OAAS;IAIpB;;;OAGG;IACH,qBAHW,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,YACtB,QAAQ,EAKlB;IADC,mBAAwB;CAE3B;AASM,uBANM,YAAY,EACD,QAAQ,SAAnB,OAAS,mBACX,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,aACtB,QAAQ,GACP,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAMpD;AACJ;;GAEG;AACH,wBAFU,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAC,GAAG,CAAC,CAAC,CAEwE;AASxG,sBANO,CAAC,QACS,QAAQ,SAAnB,OAAS,kBACX,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,aACX,QAAQ,GACP,UAAU,CAAC,CAAC,EAAC,QAAQ,CAAC,CAEoG;qBA1CjH,UAAU;0CADW,qBAAqB;mBAD5C,cAAc"}
package/delta/array.js ADDED
@@ -0,0 +1,45 @@
1
+ import * as s from '../schema.js'
2
+ import { AbstractDeltaArrayBuilder } from './abstract-array.js'
3
+ import * as ops from './ops.js'
4
+
5
+ /**
6
+ * @template ArrayContent
7
+ * @template {boolean} [WithText=false]
8
+ * @extends AbstractDeltaArrayBuilder<'array', import('./ops.js').DeltaArrayOps<ArrayContent,WithText>>
9
+ */
10
+ export class DeltaArray extends AbstractDeltaArrayBuilder {
11
+ /**
12
+ * @param {s.Schema<ArrayContent>} $insert
13
+ * @param {WithText} withText
14
+ */
15
+ constructor ($insert, withText) {
16
+ super('array', $insert)
17
+ this.withText = withText
18
+ }
19
+ }
20
+
21
+ /**
22
+ * @template ArrayContent
23
+ * @template {boolean} [WithText=false]
24
+ * @param {s.Schema<ArrayContent>} $insert
25
+ * @param {WithText} [withText]
26
+ * @return {s.Schema<DeltaArray<ArrayContent, WithText>>}
27
+ */
28
+ export const $array = ($insert, withText) => /** @type {any} */ (s.$instanceOf(AbstractDeltaArrayBuilder, o => o.type === 'array' && o.ops.every(op => {
29
+ if (ops.$textOp.check(op)) return !!withText
30
+ if (ops.$insertOp.check(op)) return op.insert.every(opi => $insert.check(opi))
31
+ return true
32
+ })))
33
+ /**
34
+ * @type {s.Schema<DeltaArray<any,any>>}
35
+ */
36
+ export const $arrayAny = /** @type {any} */ (s.$instanceOf(AbstractDeltaArrayBuilder, o => o.type === 'array'))
37
+
38
+ /**
39
+ * @template [V=any]
40
+ * @template {boolean} [WithText=any]
41
+ * @param {s.Schema<V>} $insert
42
+ * @param {WithText} [withText]
43
+ * @return {DeltaArray<V,WithText>}
44
+ */
45
+ export const array = ($insert = s.$any, withText) => /** @type {DeltaArray<V,WithText>} */ (new DeltaArray($insert, withText ?? true))
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=array.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.test.d.ts","sourceRoot":"","sources":["array.test.js"],"names":[],"mappings":""}