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.
- package/README.md +1 -1
- package/broadcastchannel.js +1 -1
- package/buffer.d.ts +3 -3
- package/buffer.d.ts.map +1 -1
- package/buffer.js +1 -1
- package/coverage/tmp/coverage-27667-1761218530660-0.json +1 -0
- package/coverage/tmp/{coverage-20055-1752683207886-0.json → coverage-27668-1761218485882-0.json} +1 -1
- package/crypto/aes-gcm.d.ts +4 -4
- package/crypto/aes-gcm.d.ts.map +1 -1
- package/crypto/aes-gcm.js +6 -6
- package/crypto/common.d.ts +1 -1
- package/crypto/common.d.ts.map +1 -1
- package/crypto/common.js +1 -1
- package/crypto/ecdsa.d.ts +2 -2
- package/crypto/ecdsa.d.ts.map +1 -1
- package/crypto/ecdsa.js +4 -4
- package/crypto/rsa-oaep.d.ts +2 -2
- package/crypto/rsa-oaep.d.ts.map +1 -1
- package/crypto/rsa-oaep.js +3 -3
- package/decoding.d.ts +27 -14
- package/decoding.d.ts.map +1 -1
- package/decoding.js +12 -8
- package/delta/abstract-array.d.ts +166 -0
- package/delta/abstract-array.d.ts.map +1 -0
- package/delta/abstract-array.js +421 -0
- package/delta/abstract.d.ts +69 -0
- package/delta/abstract.d.ts.map +1 -0
- package/delta/abstract.js +102 -0
- package/delta/array.d.ts +23 -0
- package/delta/array.d.ts.map +1 -0
- package/delta/array.js +45 -0
- package/delta/array.test.d.ts +2 -0
- package/delta/array.test.d.ts.map +1 -0
- package/delta/binding.d.ts +105 -0
- package/delta/binding.d.ts.map +1 -0
- package/delta/binding.js +369 -0
- package/delta/binding.test.d.ts +5 -0
- package/delta/binding.test.d.ts.map +1 -0
- package/delta/d2.d.ts +705 -0
- package/delta/d2.d.ts.map +1 -0
- package/delta/d2.js +1309 -0
- package/delta/d2.test.d.ts +15 -0
- package/delta/d2.test.d.ts.map +1 -0
- package/delta/index.d.ts +14 -0
- package/delta/index.d.ts.map +1 -0
- package/delta/index.js +79 -0
- package/delta/map.d.ts +230 -0
- package/delta/map.d.ts.map +1 -0
- package/delta/map.js +304 -0
- package/delta/node.d.ts +119 -0
- package/delta/node.d.ts.map +1 -0
- package/delta/node.js +183 -0
- package/delta/node.test.d.ts +4 -0
- package/delta/node.test.d.ts.map +1 -0
- package/delta/ops.d.ts +466 -0
- package/delta/ops.d.ts.map +1 -0
- package/delta/ops.js +544 -0
- package/delta/readme.md +129 -0
- package/delta/text.d.ts +43 -0
- package/delta/text.d.ts.map +1 -0
- package/delta/text.js +54 -0
- package/delta/text.test.d.ts +6 -0
- package/delta/text.test.d.ts.map +1 -0
- package/delta/transformer.d.ts +164 -0
- package/delta/transformer.d.ts.map +1 -0
- package/delta/transformer.js +888 -0
- package/delta/transformer.test.d.ts +13 -0
- package/delta/transformer.test.d.ts.map +1 -0
- package/delta/value.d.ts +84 -0
- package/delta/value.d.ts.map +1 -0
- package/delta/value.js +168 -0
- package/dist/abstract-array.cjs +433 -0
- package/dist/abstract-array.cjs.map +1 -0
- package/dist/abstract.cjs +122 -0
- package/dist/abstract.cjs.map +1 -0
- package/dist/aes-gcm.cjs +12 -12
- package/dist/aes-gcm.cjs.map +1 -1
- package/dist/array.cjs +60 -17
- package/dist/array.cjs.map +1 -1
- package/dist/array2.cjs +26 -0
- package/dist/array2.cjs.map +1 -0
- package/dist/binding.cjs +398 -0
- package/dist/binding.cjs.map +1 -0
- package/dist/{broadcastchannel-2c4b0a1c.cjs → broadcastchannel-b4eaea6e.cjs} +4 -4
- package/dist/broadcastchannel-b4eaea6e.cjs.map +1 -0
- package/dist/broadcastchannel.cjs +12 -12
- package/dist/{buffer-a74f7330.cjs → buffer-adc4e6ea.cjs} +7 -7
- package/dist/buffer-adc4e6ea.cjs.map +1 -0
- package/dist/buffer.cjs +11 -11
- package/dist/buffer.d.ts +3 -3
- package/dist/buffer.d.ts.map +1 -1
- package/dist/cache.cjs +6 -6
- package/dist/common.cjs +1 -1
- package/dist/common.cjs.map +1 -1
- package/dist/component.cjs +14 -9
- package/dist/component.cjs.map +1 -1
- package/dist/crypto/aes-gcm.d.ts +4 -4
- package/dist/crypto/aes-gcm.d.ts.map +1 -1
- package/dist/crypto/common.d.ts +1 -1
- package/dist/crypto/common.d.ts.map +1 -1
- package/dist/crypto/ecdsa.d.ts +2 -2
- package/dist/crypto/ecdsa.d.ts.map +1 -1
- package/dist/crypto/rsa-oaep.d.ts +2 -2
- package/dist/crypto/rsa-oaep.d.ts.map +1 -1
- package/dist/d2.cjs +1347 -0
- package/dist/d2.cjs.map +1 -0
- package/dist/{decoding-2b136346.cjs → decoding-50b9ce38.cjs} +18 -14
- package/dist/decoding-50b9ce38.cjs.map +1 -0
- package/dist/decoding.cjs +6 -6
- package/dist/decoding.d.ts +27 -14
- package/dist/decoding.d.ts.map +1 -1
- package/dist/delta/abstract-array.d.ts +166 -0
- package/dist/delta/abstract-array.d.ts.map +1 -0
- package/dist/delta/abstract.d.ts +69 -0
- package/dist/delta/abstract.d.ts.map +1 -0
- package/dist/delta/array.d.ts +23 -0
- package/dist/delta/array.d.ts.map +1 -0
- package/dist/delta/array.test.d.ts +2 -0
- package/dist/delta/array.test.d.ts.map +1 -0
- package/dist/delta/binding.d.ts +105 -0
- package/dist/delta/binding.d.ts.map +1 -0
- package/dist/delta/binding.test.d.ts +5 -0
- package/dist/delta/binding.test.d.ts.map +1 -0
- package/dist/delta/d2.d.ts +705 -0
- package/dist/delta/d2.d.ts.map +1 -0
- package/dist/delta/d2.test.d.ts +15 -0
- package/dist/delta/d2.test.d.ts.map +1 -0
- package/dist/delta/index.d.ts +14 -0
- package/dist/delta/index.d.ts.map +1 -0
- package/dist/delta/map.d.ts +230 -0
- package/dist/delta/map.d.ts.map +1 -0
- package/dist/delta/node.d.ts +119 -0
- package/dist/delta/node.d.ts.map +1 -0
- package/dist/delta/node.test.d.ts +4 -0
- package/dist/delta/node.test.d.ts.map +1 -0
- package/dist/delta/ops.d.ts +466 -0
- package/dist/delta/ops.d.ts.map +1 -0
- package/dist/delta/text.d.ts +43 -0
- package/dist/delta/text.d.ts.map +1 -0
- package/dist/delta/text.test.d.ts +6 -0
- package/dist/delta/text.test.d.ts.map +1 -0
- package/dist/delta/transformer.d.ts +164 -0
- package/dist/delta/transformer.d.ts.map +1 -0
- package/dist/delta/transformer.test.d.ts +13 -0
- package/dist/delta/transformer.test.d.ts.map +1 -0
- package/dist/delta/value.d.ts +84 -0
- package/dist/delta/value.d.ts.map +1 -0
- package/dist/{diff-77c4cf8e.cjs → diff-f0776c15.cjs} +2 -2
- package/dist/{diff-77c4cf8e.cjs.map → diff-f0776c15.cjs.map} +1 -1
- package/dist/diff.cjs +3 -3
- package/dist/{dom-16daf1a0.cjs → dom-2b123630.cjs} +31 -2
- package/dist/dom-2b123630.cjs.map +1 -0
- package/dist/dom.cjs +17 -2
- package/dist/dom.cjs.map +1 -1
- package/dist/dom.d.ts +17 -0
- package/dist/dom.d.ts.map +1 -1
- package/dist/ecdsa.cjs +4 -4
- package/dist/ecdsa.cjs.map +1 -1
- package/dist/{encoding-1acb59c4.cjs → encoding-7f85922c.cjs} +5 -5
- package/dist/encoding-7f85922c.cjs.map +1 -0
- package/dist/encoding.cjs +4 -4
- package/dist/encoding.d.ts +6 -6
- package/dist/encoding.d.ts.map +1 -1
- package/dist/{environment-2de08e0e.cjs → environment-90227ead.cjs} +4 -4
- package/dist/{environment-2de08e0e.cjs.map → environment-90227ead.cjs.map} +1 -1
- package/dist/environment.cjs +5 -5
- package/dist/{error-8582d695.cjs → error-0c1f634f.cjs} +10 -2
- package/dist/error-0c1f634f.cjs.map +1 -0
- package/dist/error.cjs +2 -1
- package/dist/error.cjs.map +1 -1
- package/dist/error.d.ts +1 -0
- package/dist/error.d.ts.map +1 -1
- package/dist/{eventloop-b299a889.cjs → eventloop-a0168106.cjs} +2 -2
- package/dist/{eventloop-b299a889.cjs.map → eventloop-a0168106.cjs.map} +1 -1
- package/dist/eventloop.cjs +3 -3
- package/dist/{function-09b8292c.cjs → function-e7d18feb.cjs} +2 -2
- package/dist/{function-09b8292c.cjs.map → function-e7d18feb.cjs.map} +1 -1
- package/dist/function.cjs +2 -2
- package/dist/index.cjs +23 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index2.cjs +71 -0
- package/dist/index2.cjs.map +1 -0
- package/dist/{indexeddb-0cbb4d6f.cjs → indexeddb-46d1e737.cjs} +3 -3
- package/dist/{indexeddb-0cbb4d6f.cjs.map → indexeddb-46d1e737.cjs.map} +1 -1
- package/dist/indexeddb.cjs +5 -5
- package/dist/indexeddbV2.cjs +2 -1
- package/dist/indexeddbV2.cjs.map +1 -1
- package/dist/jwt.cjs +12 -12
- package/dist/list.cjs +39 -12
- package/dist/list.cjs.map +1 -1
- package/dist/list.d.ts +13 -3
- package/dist/list.d.ts.map +1 -1
- package/dist/logging.cjs +11 -9
- package/dist/logging.cjs.map +1 -1
- package/dist/logging.common.cjs +7 -7
- package/dist/logging.node.cjs +7 -7
- package/dist/{map-0dabcc55.cjs → map-24d263c0.cjs} +7 -1
- package/dist/map-24d263c0.cjs.map +1 -0
- package/dist/map.cjs +314 -7
- package/dist/map.cjs.map +1 -1
- package/dist/map.d.ts +1 -0
- package/dist/map.d.ts.map +1 -1
- package/dist/map2.cjs +15 -0
- package/dist/map2.cjs.map +1 -0
- package/dist/{math-08e068f9.cjs → math-96d5e8c4.cjs} +4 -2
- package/dist/math-96d5e8c4.cjs.map +1 -0
- package/dist/math.cjs +1 -1
- package/dist/math.d.ts.map +1 -1
- package/dist/metric.cjs +1 -1
- package/dist/node.cjs +206 -0
- package/dist/node.cjs.map +1 -0
- package/dist/{number-466d8922.cjs → number-1fb57bba.cjs} +2 -2
- package/dist/{number-466d8922.cjs.map → number-1fb57bba.cjs.map} +1 -1
- package/dist/number.cjs +2 -2
- package/dist/{object-491858d1.cjs → object-18980796.cjs} +12 -2
- package/dist/object-18980796.cjs.map +1 -0
- package/dist/object.cjs +3 -1
- package/dist/object.cjs.map +1 -1
- package/dist/object.d.ts +3 -0
- package/dist/object.d.ts.map +1 -1
- package/dist/observable.cjs +1 -1
- package/dist/ops.cjs +575 -0
- package/dist/ops.cjs.map +1 -0
- package/dist/patience.cjs +2 -2
- package/dist/performance.node.cjs +4 -4
- package/dist/pledge.cjs +2 -1
- package/dist/pledge.cjs.map +1 -1
- package/dist/{prng-24dfe0bf.cjs → prng-004c76e8.cjs} +5 -5
- package/dist/{prng-24dfe0bf.cjs.map → prng-004c76e8.cjs.map} +1 -1
- package/dist/prng.cjs +12 -12
- package/dist/prng.d.ts +1 -1
- package/dist/prng.d.ts.map +1 -1
- package/dist/{promise-7d13a97c.cjs → promise-cda7b9bb.cjs} +2 -2
- package/dist/{promise-7d13a97c.cjs.map → promise-cda7b9bb.cjs.map} +1 -1
- package/dist/promise.cjs +3 -3
- package/dist/rabin-gf2-polynomial.cjs +11 -11
- package/dist/rabin-uncached.cjs +11 -11
- package/dist/rabin.cjs +11 -11
- package/dist/random.cjs +1 -1
- package/dist/rsa-oaep.cjs +3 -3
- package/dist/rsa-oaep.cjs.map +1 -1
- package/dist/schema.cjs +572 -167
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.ts +326 -122
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.test.d.ts +5 -0
- package/dist/schema.test.d.ts.map +1 -1
- package/dist/{sort-b8702761.cjs → sort-812cc211.cjs} +2 -2
- package/dist/{sort-b8702761.cjs.map → sort-812cc211.cjs.map} +1 -1
- package/dist/sort.cjs +2 -2
- package/dist/{statistics-c2316dca.cjs → statistics-65f6114b.cjs} +2 -2
- package/dist/{statistics-c2316dca.cjs.map → statistics-65f6114b.cjs.map} +1 -1
- package/dist/statistics.cjs +2 -2
- package/dist/{string-b2827a90.cjs → string-fddc5f8b.cjs} +3 -3
- package/dist/string-fddc5f8b.cjs.map +1 -0
- package/dist/string.cjs +1 -1
- package/dist/string.d.ts +3 -3
- package/dist/string.d.ts.map +1 -1
- package/dist/testing.cjs +16 -16
- package/dist/text.cjs +79 -0
- package/dist/text.cjs.map +1 -0
- package/dist/{time-bc2081b9.cjs → time-d8438852.cjs} +2 -2
- package/dist/{time-bc2081b9.cjs.map → time-d8438852.cjs.map} +1 -1
- package/dist/time.cjs +2 -2
- package/dist/traits.cjs +22 -0
- package/dist/traits.cjs.map +1 -1
- package/dist/traits.d.ts +1 -0
- package/dist/traits.d.ts.map +1 -1
- package/dist/traits.test.d.ts.map +1 -1
- package/dist/transformer.cjs +930 -0
- package/dist/transformer.cjs.map +1 -0
- package/dist/url.cjs +2 -1
- package/dist/url.cjs.map +1 -1
- package/dist/value.cjs +187 -0
- package/dist/value.cjs.map +1 -0
- package/dist/webcrypto.d.ts +1 -1
- package/dist/webcrypto.d.ts.map +1 -1
- package/dist/{websocket-40a601d4.cjs → websocket-b073d0fc.cjs} +3 -3
- package/dist/{websocket-40a601d4.cjs.map → websocket-b073d0fc.cjs.map} +1 -1
- package/dist/websocket.cjs +4 -4
- package/dom.d.ts +17 -0
- package/dom.d.ts.map +1 -1
- package/dom.js +21 -0
- package/encoding.d.ts +6 -6
- package/encoding.d.ts.map +1 -1
- package/encoding.js +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.js +6 -0
- package/list.d.ts +13 -3
- package/list.d.ts.map +1 -1
- package/list.js +36 -8
- package/map.d.ts +1 -0
- package/map.d.ts.map +1 -1
- package/map.js +6 -0
- package/math.d.ts.map +1 -1
- package/math.js +3 -1
- package/object.d.ts +3 -0
- package/object.d.ts.map +1 -1
- package/object.js +9 -1
- package/package.json +9 -3
- package/prng.d.ts +1 -1
- package/prng.d.ts.map +1 -1
- package/prng.js +1 -1
- package/schema.d.ts +326 -122
- package/schema.d.ts.map +1 -1
- package/schema.js +513 -141
- package/schema.test.d.ts +5 -0
- package/schema.test.d.ts.map +1 -1
- package/string.d.ts +3 -3
- package/string.d.ts.map +1 -1
- package/string.js +2 -2
- package/test.html +1 -0
- package/test.js +13 -1
- package/traits.d.ts +1 -0
- package/traits.d.ts.map +1 -1
- package/traits.js +21 -0
- package/traits.test.d.ts.map +1 -1
- package/webcrypto.d.ts +1 -1
- package/webcrypto.d.ts.map +1 -1
- package/coverage/tmp/coverage-20054-1752683240888-0.json +0 -1
- package/dist/broadcastchannel-2c4b0a1c.cjs.map +0 -1
- package/dist/buffer-a74f7330.cjs.map +0 -1
- package/dist/decoding-2b136346.cjs.map +0 -1
- package/dist/dom-16daf1a0.cjs.map +0 -1
- package/dist/encoding-1acb59c4.cjs.map +0 -1
- package/dist/error-8582d695.cjs.map +0 -1
- package/dist/map-0dabcc55.cjs.map +0 -1
- package/dist/math-08e068f9.cjs.map +0 -1
- package/dist/object-491858d1.cjs.map +0 -1
- package/dist/string-b2827a90.cjs.map +0 -1
package/dist/ops.cjs
ADDED
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var abstract = require('./abstract.cjs');
|
|
6
|
+
var object = require('./object-18980796.cjs');
|
|
7
|
+
var traits = require('./traits.cjs');
|
|
8
|
+
var _function = require('./function-e7d18feb.cjs');
|
|
9
|
+
var schema = require('./schema.cjs');
|
|
10
|
+
var list = require('./list.cjs');
|
|
11
|
+
require('./error-0c1f634f.cjs');
|
|
12
|
+
require('./array-78849c95.cjs');
|
|
13
|
+
require('./set-5b47859e.cjs');
|
|
14
|
+
require('./environment-90227ead.cjs');
|
|
15
|
+
require('./map-24d263c0.cjs');
|
|
16
|
+
require('./string-fddc5f8b.cjs');
|
|
17
|
+
require('./conditions-f5c0c102.cjs');
|
|
18
|
+
require('./storage.cjs');
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @template {any} Content
|
|
22
|
+
* @typedef {TextOp|InsertOp<Content>|RetainOp|DeleteOp|(Content extends d.AbstractDelta ? ModifyOp<Extract<Content,d.AbstractDelta>> : never)} AbstractDeltaArrayOps
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @template Content
|
|
27
|
+
* @template {boolean} [WithText=false]
|
|
28
|
+
* @typedef {InsertOp<Content>|RetainOp|DeleteOp|(Content extends d.AbstractDelta ? ModifyOp<Extract<Content,d.AbstractDelta>> : never)|(WithText extends true ? TextOp : never)} DeltaArrayOps
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @template Embeds
|
|
33
|
+
* @typedef {TextOp|InsertOp<Embeds>|RetainOp|DeleteOp|(Embeds extends d.AbstractDelta ? ModifyOp<Extract<Embeds,d.AbstractDelta>> : never)} DeltaTextOps
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @template {any} Content
|
|
38
|
+
* @typedef {AbstractDeltaArrayOps<Content>} NodeChildrenOps
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef {s.Unwrap<$anyOp>} DeltaOps
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @typedef {MapInsertOp<any>|MapDeleteOp<any>|MapModifyOp<any>} DeltaMapOps
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @typedef {MapInsertOp<any,''>|MapDeleteOp<any,''>|MapModifyOp<any,''>} DeltaValueOps
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @typedef {{ [key: string]: any }} FormattingAttributes
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @typedef {{ insert: string|object, attributes?: { [key: string]: any }, attribution?: d.Attribution } | { delete: number } | { retain: number, attributes?: { [key:string]: any }, attribution?: d.Attribution } | { modify: object }} DeltaJsonOp
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @template {{[key:string]: any} | null} Attrs
|
|
63
|
+
* @param {Attrs} attrs
|
|
64
|
+
* @return {Attrs}
|
|
65
|
+
*/
|
|
66
|
+
const _cloneAttrs = attrs => attrs == null ? attrs : { ...attrs };
|
|
67
|
+
/**
|
|
68
|
+
* @template {any} MaybeDelta
|
|
69
|
+
* @param {MaybeDelta} maybeDelta
|
|
70
|
+
* @return {MaybeDelta}
|
|
71
|
+
*/
|
|
72
|
+
const _cloneMaybeDelta = maybeDelta => abstract.$delta.check(maybeDelta) ? maybeDelta.clone() : maybeDelta;
|
|
73
|
+
|
|
74
|
+
class TextOp extends list.ListNode {
|
|
75
|
+
/**
|
|
76
|
+
* @param {string} insert
|
|
77
|
+
* @param {FormattingAttributes|null} attributes
|
|
78
|
+
* @param {d.Attribution|null} attribution
|
|
79
|
+
*/
|
|
80
|
+
constructor (insert, attributes, attribution) {
|
|
81
|
+
super();
|
|
82
|
+
this.insert = insert;
|
|
83
|
+
this.attributes = attributes;
|
|
84
|
+
this.attribution = attribution;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @return {'insert'}
|
|
89
|
+
*/
|
|
90
|
+
get type () {
|
|
91
|
+
return 'insert'
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
get length () {
|
|
95
|
+
return this.insert.length
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Remove a part of the operation (similar to Array.splice)
|
|
100
|
+
*
|
|
101
|
+
* @param {number} offset
|
|
102
|
+
* @param {number} len
|
|
103
|
+
*/
|
|
104
|
+
_splice (offset, len) {
|
|
105
|
+
this.insert = this.insert.slice(0, offset) + this.insert.slice(offset + len);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @return {DeltaJsonOp}
|
|
110
|
+
*/
|
|
111
|
+
toJSON () {
|
|
112
|
+
return object.assign({ insert: this.insert }, this.attributes ? { attributes: this.attributes } : ({}), this.attribution ? { attribution: this.attribution } : ({}))
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @param {TextOp} other
|
|
117
|
+
*/
|
|
118
|
+
[traits.EqualityTraitSymbol] (other) {
|
|
119
|
+
return _function.equalityDeep(this.insert, other.insert) && _function.equalityDeep(this.attributes, other.attributes) && _function.equalityDeep(this.attribution, other.attribution)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @return {TextOp}
|
|
124
|
+
*/
|
|
125
|
+
clone () {
|
|
126
|
+
return new TextOp(this.insert, _cloneAttrs(this.attributes), _cloneAttrs(this.attribution))
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @template {any} ArrayContent
|
|
132
|
+
*/
|
|
133
|
+
class InsertOp extends list.ListNode {
|
|
134
|
+
/**
|
|
135
|
+
* @param {Array<ArrayContent>} insert
|
|
136
|
+
* @param {FormattingAttributes|null} attributes
|
|
137
|
+
* @param {d.Attribution|null} attribution
|
|
138
|
+
*/
|
|
139
|
+
constructor (insert, attributes, attribution) {
|
|
140
|
+
super();
|
|
141
|
+
this.insert = insert;
|
|
142
|
+
this.attributes = attributes;
|
|
143
|
+
this.attribution = attribution;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @return {'insert'}
|
|
148
|
+
*/
|
|
149
|
+
get type () {
|
|
150
|
+
return 'insert'
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
get length () {
|
|
154
|
+
return this.insert.length
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Remove a part of the operation (similar to Array.splice)
|
|
159
|
+
*
|
|
160
|
+
* @param {number} offset
|
|
161
|
+
* @param {number} len
|
|
162
|
+
*/
|
|
163
|
+
_splice (offset, len) {
|
|
164
|
+
this.insert.splice(offset, len);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @return {DeltaJsonOp}
|
|
169
|
+
*/
|
|
170
|
+
toJSON () {
|
|
171
|
+
return object.assign({ insert: this.insert.map(ins => abstract.$delta.check(ins) ? ins.toJSON() : ins) }, this.attributes ? { attributes: this.attributes } : ({}), this.attribution ? { attribution: this.attribution } : ({}))
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @param {InsertOp<ArrayContent>} other
|
|
176
|
+
*/
|
|
177
|
+
[traits.EqualityTraitSymbol] (other) {
|
|
178
|
+
return _function.equalityDeep(this.insert, other.insert) && _function.equalityDeep(this.attributes, other.attributes) && _function.equalityDeep(this.attribution, other.attribution)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @return {InsertOp<ArrayContent>}
|
|
183
|
+
*/
|
|
184
|
+
clone () {
|
|
185
|
+
return new InsertOp(this.insert.slice(), _cloneAttrs(this.attributes), _cloneAttrs(this.attribution))
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
class DeleteOp extends list.ListNode {
|
|
190
|
+
/**
|
|
191
|
+
* @param {number} len
|
|
192
|
+
*/
|
|
193
|
+
constructor (len) {
|
|
194
|
+
super();
|
|
195
|
+
this.delete = len;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @return {'delete'}
|
|
200
|
+
*/
|
|
201
|
+
get type () {
|
|
202
|
+
return 'delete'
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
get length () {
|
|
206
|
+
return 0
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Remove a part of the operation (similar to Array.splice)
|
|
211
|
+
*
|
|
212
|
+
* @param {number} offset
|
|
213
|
+
* @param {number} len
|
|
214
|
+
*/
|
|
215
|
+
_splice (offset, len) {
|
|
216
|
+
this.delete -= len;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @return {DeltaJsonOp}
|
|
221
|
+
*/
|
|
222
|
+
toJSON () {
|
|
223
|
+
return { delete: this.delete }
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @param {DeleteOp} other
|
|
228
|
+
*/
|
|
229
|
+
[traits.EqualityTraitSymbol] (other) {
|
|
230
|
+
return this.delete === other.delete
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
clone () {
|
|
234
|
+
return new DeleteOp(this.delete)
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
class RetainOp extends list.ListNode {
|
|
239
|
+
/**
|
|
240
|
+
* @param {number} retain
|
|
241
|
+
* @param {FormattingAttributes|null} attributes
|
|
242
|
+
* @param {d.Attribution|null} attribution
|
|
243
|
+
*/
|
|
244
|
+
constructor (retain, attributes, attribution) {
|
|
245
|
+
super();
|
|
246
|
+
this.retain = retain;
|
|
247
|
+
this.attributes = attributes;
|
|
248
|
+
this.attribution = attribution;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @return {'retain'}
|
|
253
|
+
*/
|
|
254
|
+
get type () {
|
|
255
|
+
return 'retain'
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
get length () {
|
|
259
|
+
return this.retain
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Remove a part of the operation (similar to Array.splice)
|
|
264
|
+
*
|
|
265
|
+
* @param {number} _offset
|
|
266
|
+
* @param {number} len
|
|
267
|
+
*/
|
|
268
|
+
_splice (_offset, len) {
|
|
269
|
+
this.retain -= len;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @return {DeltaJsonOp}
|
|
274
|
+
*/
|
|
275
|
+
toJSON () {
|
|
276
|
+
return object.assign({ retain: this.retain }, this.attributes ? { attributes: this.attributes } : {}, this.attribution ? { attribution: this.attribution } : {})
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @param {RetainOp} other
|
|
281
|
+
*/
|
|
282
|
+
[traits.EqualityTraitSymbol] (other) {
|
|
283
|
+
return this.retain === other.retain && _function.equalityDeep(this.attributes, other.attributes) && _function.equalityDeep(this.attribution, other.attribution)
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
clone () {
|
|
287
|
+
return new RetainOp(this.retain, _cloneAttrs(this.attributes), _cloneAttrs(this.attribution))
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Delta that can be applied on a YType Embed
|
|
293
|
+
*
|
|
294
|
+
* @template {{ toJSON(): any } & traits.EqualityTrait & { clone: any }} DTypes
|
|
295
|
+
*/
|
|
296
|
+
class ModifyOp extends list.ListNode {
|
|
297
|
+
/**
|
|
298
|
+
* @param {DTypes} delta
|
|
299
|
+
* @param {FormattingAttributes|null} attributes
|
|
300
|
+
* @param {d.Attribution|null} attribution
|
|
301
|
+
*/
|
|
302
|
+
constructor (delta, attributes, attribution) {
|
|
303
|
+
super();
|
|
304
|
+
this.modify = delta;
|
|
305
|
+
this.attributes = attributes;
|
|
306
|
+
this.attribution = attribution;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* @return {'modify'}
|
|
311
|
+
*/
|
|
312
|
+
get type () {
|
|
313
|
+
return 'modify'
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
get length () {
|
|
317
|
+
return 1
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Remove a part of the operation (similar to Array.splice)
|
|
322
|
+
*
|
|
323
|
+
* @param {number} _offset
|
|
324
|
+
* @param {number} len
|
|
325
|
+
*/
|
|
326
|
+
_splice (_offset, len) {
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @return {DeltaJsonOp}
|
|
331
|
+
*/
|
|
332
|
+
toJSON () {
|
|
333
|
+
return object.assign({ modify: this.modify.toJSON() }, this.attributes ? { attributes: this.attributes } : {}, this.attribution ? { attribution: this.attribution } : {})
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @param {ModifyOp<any>} other
|
|
338
|
+
*/
|
|
339
|
+
[traits.EqualityTraitSymbol] (other) {
|
|
340
|
+
return this.modify[traits.EqualityTraitSymbol](other.modify) && _function.equalityDeep(this.attributes, other.attributes) && _function.equalityDeep(this.attribution, other.attribution)
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* @return {ModifyOp<DTypes>}
|
|
345
|
+
*/
|
|
346
|
+
clone () {
|
|
347
|
+
return new ModifyOp(this.modify.clone(), _cloneAttrs(this.attributes), _cloneAttrs(this.attribution))
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @template V
|
|
353
|
+
* @template [K=string]
|
|
354
|
+
*/
|
|
355
|
+
class MapInsertOp {
|
|
356
|
+
/**
|
|
357
|
+
* @param {K} key
|
|
358
|
+
* @param {V} value
|
|
359
|
+
* @param {V|undefined} prevValue
|
|
360
|
+
* @param {s.TypeOf<d.$attribution>?} attribution
|
|
361
|
+
*/
|
|
362
|
+
constructor (key, value, prevValue, attribution) {
|
|
363
|
+
/**
|
|
364
|
+
* @type {K}
|
|
365
|
+
*/
|
|
366
|
+
this.key = key;
|
|
367
|
+
/**
|
|
368
|
+
* @type {V}
|
|
369
|
+
*/
|
|
370
|
+
this.value = value;
|
|
371
|
+
/**
|
|
372
|
+
* @type {V|undefined}
|
|
373
|
+
*/
|
|
374
|
+
this.prevValue = prevValue;
|
|
375
|
+
this.attribution = attribution;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* @return {'insert'}
|
|
380
|
+
*/
|
|
381
|
+
get type () { return 'insert' }
|
|
382
|
+
|
|
383
|
+
toJSON () {
|
|
384
|
+
return {
|
|
385
|
+
type: this.type,
|
|
386
|
+
value: abstract.$delta.check(this.value) ? this.value.toJSON() : this.value,
|
|
387
|
+
attribution: this.attribution
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* @param {MapInsertOp<V>} other
|
|
393
|
+
*/
|
|
394
|
+
[traits.EqualityTraitSymbol] (other) {
|
|
395
|
+
return this.key === other.key && _function.equalityDeep(this.value, other.value) && _function.equalityDeep(this.attribution, other.attribution)
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* @return {MapInsertOp<V,K>}
|
|
400
|
+
*/
|
|
401
|
+
clone () {
|
|
402
|
+
return new MapInsertOp(this.key, _cloneMaybeDelta(this.value), _cloneMaybeDelta(this.prevValue), _cloneAttrs(this.attribution))
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @template V
|
|
408
|
+
* @template [K=string]
|
|
409
|
+
*/
|
|
410
|
+
class MapDeleteOp {
|
|
411
|
+
/**
|
|
412
|
+
* @param {K} key
|
|
413
|
+
* @param {V|undefined} prevValue
|
|
414
|
+
* @param {s.TypeOf<d.$attribution>?} attribution
|
|
415
|
+
*/
|
|
416
|
+
constructor (key, prevValue, attribution) {
|
|
417
|
+
/**
|
|
418
|
+
* @type {K}
|
|
419
|
+
*/
|
|
420
|
+
this.key = key;
|
|
421
|
+
/**
|
|
422
|
+
* @type {V|undefined}
|
|
423
|
+
*/
|
|
424
|
+
this.prevValue = prevValue;
|
|
425
|
+
this.attribution = attribution;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
get value () { return undefined }
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* @type {'delete'}
|
|
432
|
+
*/
|
|
433
|
+
get type () { return 'delete' }
|
|
434
|
+
|
|
435
|
+
toJSON () {
|
|
436
|
+
return {
|
|
437
|
+
type: this.type,
|
|
438
|
+
attribution: this.attribution
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @param {MapDeleteOp<V>} other
|
|
444
|
+
*/
|
|
445
|
+
[traits.EqualityTraitSymbol] (other) {
|
|
446
|
+
return this.key === other.key && _function.equalityDeep(this.attribution, other.attribution)
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
clone () {
|
|
450
|
+
return new MapDeleteOp(this.key, _cloneMaybeDelta(this.prevValue), _cloneAttrs(this.attribution))
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @template {d.AbstractDelta} Modifiers
|
|
456
|
+
* @template [K=string]
|
|
457
|
+
*/
|
|
458
|
+
class MapModifyOp {
|
|
459
|
+
/**
|
|
460
|
+
* @param {K} key
|
|
461
|
+
* @param {Modifiers} delta
|
|
462
|
+
*/
|
|
463
|
+
constructor (key, delta) {
|
|
464
|
+
/**
|
|
465
|
+
* @type {K}
|
|
466
|
+
*/
|
|
467
|
+
this.key = key;
|
|
468
|
+
/**
|
|
469
|
+
* @type {Modifiers}
|
|
470
|
+
*/
|
|
471
|
+
this.value = delta;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* @type {'modify'}
|
|
476
|
+
*/
|
|
477
|
+
get type () { return 'modify' }
|
|
478
|
+
|
|
479
|
+
toJSON () {
|
|
480
|
+
return {
|
|
481
|
+
type: this.type,
|
|
482
|
+
value: this.value.toJSON()
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* @param {MapModifyOp<Modifiers>} other
|
|
488
|
+
*/
|
|
489
|
+
[traits.EqualityTraitSymbol] (other) {
|
|
490
|
+
return this.key === other.key && this.value[traits.EqualityTraitSymbol](other.value)
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @return {MapModifyOp<Modifiers,K>}
|
|
495
|
+
*/
|
|
496
|
+
clone () {
|
|
497
|
+
return new MapModifyOp(this.key, this.value.clone())
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
const $deltaMapChangeJson = schema.$union(
|
|
502
|
+
schema.$object({ type: schema.$literal('insert'), value: schema.$any, attribution: abstract.$attribution.nullable.optional }),
|
|
503
|
+
schema.$object({ type: schema.$literal('modify'), value: schema.$any }),
|
|
504
|
+
schema.$object({ type: schema.$literal('delete'), attribution: abstract.$attribution.nullable.optional })
|
|
505
|
+
);
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* @type {s.Schema<MapDeleteOp<any> | DeleteOp>}
|
|
509
|
+
*/
|
|
510
|
+
const $deleteOp = schema.$custom(o => o != null && (o.constructor === DeleteOp || o.constructor === MapDeleteOp));
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* @type {s.Schema<MapInsertOp<any> | InsertOp<any>>}
|
|
514
|
+
*/
|
|
515
|
+
const $insertOp = schema.$custom(o => o != null && (o.constructor === MapInsertOp || o.constructor === InsertOp));
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* @template Content
|
|
519
|
+
* @param {s.Schema<Content>} $content
|
|
520
|
+
* @return {s.Schema<MapInsertOp<Content> | InsertOp<Content>>}
|
|
521
|
+
*/
|
|
522
|
+
const $insertOpWith = $content => schema.$custom(o =>
|
|
523
|
+
o != null && (
|
|
524
|
+
(o.constructor === MapInsertOp && $content.check(/** @type {MapInsertOp<Content>} */ (o).value)) ||
|
|
525
|
+
(o.constructor === InsertOp && /** @type {InsertOp<Content>} */ (o).insert.every(ins => $content.check(ins)))
|
|
526
|
+
)
|
|
527
|
+
);
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @type {s.Schema<TextOp>}
|
|
531
|
+
*/
|
|
532
|
+
const $textOp = schema.$constructedBy(TextOp);
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* @type {s.Schema<RetainOp>}
|
|
536
|
+
*/
|
|
537
|
+
const $retainOp = schema.$constructedBy(RetainOp);
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* @type {s.Schema<MapModifyOp<any> | ModifyOp<any>>}
|
|
541
|
+
*/
|
|
542
|
+
const $modifyOp = schema.$custom(o => o != null && (o.constructor === MapModifyOp || o.constructor === ModifyOp));
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* @template {d.AbstractDelta} Modify
|
|
546
|
+
* @param {s.Schema<Modify>} $content
|
|
547
|
+
* @return {s.Schema<MapModifyOp<Modify> | ModifyOp<Modify>>}
|
|
548
|
+
*/
|
|
549
|
+
const $modifyOpWith = $content => schema.$custom(o =>
|
|
550
|
+
o != null && (
|
|
551
|
+
(o.constructor === MapModifyOp && $content.check(/** @type {MapModifyOp<Modify>} */ (o).value)) ||
|
|
552
|
+
(o.constructor === ModifyOp && $content.check(/** @type {ModifyOp<Modify>} */ (o).modify))
|
|
553
|
+
)
|
|
554
|
+
);
|
|
555
|
+
|
|
556
|
+
const $anyOp = schema.$union($insertOp, $deleteOp, $textOp, $modifyOp);
|
|
557
|
+
|
|
558
|
+
exports.$anyOp = $anyOp;
|
|
559
|
+
exports.$deleteOp = $deleteOp;
|
|
560
|
+
exports.$deltaMapChangeJson = $deltaMapChangeJson;
|
|
561
|
+
exports.$insertOp = $insertOp;
|
|
562
|
+
exports.$insertOpWith = $insertOpWith;
|
|
563
|
+
exports.$modifyOp = $modifyOp;
|
|
564
|
+
exports.$modifyOpWith = $modifyOpWith;
|
|
565
|
+
exports.$retainOp = $retainOp;
|
|
566
|
+
exports.$textOp = $textOp;
|
|
567
|
+
exports.DeleteOp = DeleteOp;
|
|
568
|
+
exports.InsertOp = InsertOp;
|
|
569
|
+
exports.MapDeleteOp = MapDeleteOp;
|
|
570
|
+
exports.MapInsertOp = MapInsertOp;
|
|
571
|
+
exports.MapModifyOp = MapModifyOp;
|
|
572
|
+
exports.ModifyOp = ModifyOp;
|
|
573
|
+
exports.RetainOp = RetainOp;
|
|
574
|
+
exports.TextOp = TextOp;
|
|
575
|
+
//# sourceMappingURL=ops.cjs.map
|
package/dist/ops.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ops.cjs","sources":["../delta/ops.js"],"sourcesContent":["import * as d from './abstract.js'\nimport * as object from '../object.js'\nimport * as traits from '../traits.js'\nimport * as fun from '../function.js'\nimport * as s from '../schema.js'\nimport * as list from '../list.js'\n\n/**\n * @template {any} Content\n * @typedef {TextOp|InsertOp<Content>|RetainOp|DeleteOp|(Content extends d.AbstractDelta ? ModifyOp<Extract<Content,d.AbstractDelta>> : never)} AbstractDeltaArrayOps\n */\n\n/**\n * @template Content\n * @template {boolean} [WithText=false]\n * @typedef {InsertOp<Content>|RetainOp|DeleteOp|(Content extends d.AbstractDelta ? ModifyOp<Extract<Content,d.AbstractDelta>> : never)|(WithText extends true ? TextOp : never)} DeltaArrayOps\n */\n\n/**\n * @template Embeds\n * @typedef {TextOp|InsertOp<Embeds>|RetainOp|DeleteOp|(Embeds extends d.AbstractDelta ? ModifyOp<Extract<Embeds,d.AbstractDelta>> : never)} DeltaTextOps\n */\n\n/**\n * @template {any} Content\n * @typedef {AbstractDeltaArrayOps<Content>} NodeChildrenOps\n */\n\n/**\n * @typedef {s.Unwrap<$anyOp>} DeltaOps\n */\n\n/**\n * @typedef {MapInsertOp<any>|MapDeleteOp<any>|MapModifyOp<any>} DeltaMapOps\n */\n\n/**\n * @typedef {MapInsertOp<any,''>|MapDeleteOp<any,''>|MapModifyOp<any,''>} DeltaValueOps\n */\n\n/**\n * @typedef {{ [key: string]: any }} FormattingAttributes\n */\n\n/**\n * @typedef {{ insert: string|object, attributes?: { [key: string]: any }, attribution?: d.Attribution } | { delete: number } | { retain: number, attributes?: { [key:string]: any }, attribution?: d.Attribution } | { modify: object }} DeltaJsonOp\n */\n\n/**\n * @template {{[key:string]: any} | null} Attrs\n * @param {Attrs} attrs\n * @return {Attrs}\n */\nconst _cloneAttrs = attrs => attrs == null ? attrs : { ...attrs }\n/**\n * @template {any} MaybeDelta\n * @param {MaybeDelta} maybeDelta\n * @return {MaybeDelta}\n */\nconst _cloneMaybeDelta = maybeDelta => d.$delta.check(maybeDelta) ? maybeDelta.clone() : maybeDelta\n\nexport class TextOp extends list.ListNode {\n /**\n * @param {string} insert\n * @param {FormattingAttributes|null} attributes\n * @param {d.Attribution|null} attribution\n */\n constructor (insert, attributes, attribution) {\n super()\n this.insert = insert\n this.attributes = attributes\n this.attribution = attribution\n }\n\n /**\n * @return {'insert'}\n */\n get type () {\n return 'insert'\n }\n\n get length () {\n return this.insert.length\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} offset\n * @param {number} len\n */\n _splice (offset, len) {\n this.insert = this.insert.slice(0, offset) + this.insert.slice(offset + len)\n }\n\n /**\n * @return {DeltaJsonOp}\n */\n toJSON () {\n return object.assign({ insert: this.insert }, this.attributes ? { attributes: this.attributes } : ({}), this.attribution ? { attribution: this.attribution } : ({}))\n }\n\n /**\n * @param {TextOp} other\n */\n [traits.EqualityTraitSymbol] (other) {\n return fun.equalityDeep(this.insert, other.insert) && fun.equalityDeep(this.attributes, other.attributes) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n /**\n * @return {TextOp}\n */\n clone () {\n return new TextOp(this.insert, _cloneAttrs(this.attributes), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template {any} ArrayContent\n */\nexport class InsertOp extends list.ListNode {\n /**\n * @param {Array<ArrayContent>} insert\n * @param {FormattingAttributes|null} attributes\n * @param {d.Attribution|null} attribution\n */\n constructor (insert, attributes, attribution) {\n super()\n this.insert = insert\n this.attributes = attributes\n this.attribution = attribution\n }\n\n /**\n * @return {'insert'}\n */\n get type () {\n return 'insert'\n }\n\n get length () {\n return this.insert.length\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} offset\n * @param {number} len\n */\n _splice (offset, len) {\n this.insert.splice(offset, len)\n }\n\n /**\n * @return {DeltaJsonOp}\n */\n toJSON () {\n return object.assign({ insert: this.insert.map(ins => d.$delta.check(ins) ? ins.toJSON() : ins) }, this.attributes ? { attributes: this.attributes } : ({}), this.attribution ? { attribution: this.attribution } : ({}))\n }\n\n /**\n * @param {InsertOp<ArrayContent>} other\n */\n [traits.EqualityTraitSymbol] (other) {\n return fun.equalityDeep(this.insert, other.insert) && fun.equalityDeep(this.attributes, other.attributes) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n /**\n * @return {InsertOp<ArrayContent>}\n */\n clone () {\n return new InsertOp(this.insert.slice(), _cloneAttrs(this.attributes), _cloneAttrs(this.attribution))\n }\n}\n\nexport class DeleteOp extends list.ListNode {\n /**\n * @param {number} len\n */\n constructor (len) {\n super()\n this.delete = len\n }\n\n /**\n * @return {'delete'}\n */\n get type () {\n return 'delete'\n }\n\n get length () {\n return 0\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} offset\n * @param {number} len\n */\n _splice (offset, len) {\n this.delete -= len\n }\n\n /**\n * @return {DeltaJsonOp}\n */\n toJSON () {\n return { delete: this.delete }\n }\n\n /**\n * @param {DeleteOp} other\n */\n [traits.EqualityTraitSymbol] (other) {\n return this.delete === other.delete\n }\n\n clone () {\n return new DeleteOp(this.delete)\n }\n}\n\nexport class RetainOp extends list.ListNode {\n /**\n * @param {number} retain\n * @param {FormattingAttributes|null} attributes\n * @param {d.Attribution|null} attribution\n */\n constructor (retain, attributes, attribution) {\n super()\n this.retain = retain\n this.attributes = attributes\n this.attribution = attribution\n }\n\n /**\n * @return {'retain'}\n */\n get type () {\n return 'retain'\n }\n\n get length () {\n return this.retain\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} _offset\n * @param {number} len\n */\n _splice (_offset, len) {\n this.retain -= len\n }\n\n /**\n * @return {DeltaJsonOp}\n */\n toJSON () {\n return object.assign({ retain: this.retain }, this.attributes ? { attributes: this.attributes } : {}, this.attribution ? { attribution: this.attribution } : {})\n }\n\n /**\n * @param {RetainOp} other\n */\n [traits.EqualityTraitSymbol] (other) {\n return this.retain === other.retain && fun.equalityDeep(this.attributes, other.attributes) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n clone () {\n return new RetainOp(this.retain, _cloneAttrs(this.attributes), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * Delta that can be applied on a YType Embed\n *\n * @template {{ toJSON(): any } & traits.EqualityTrait & { clone: any }} DTypes\n */\nexport class ModifyOp extends list.ListNode {\n /**\n * @param {DTypes} delta\n * @param {FormattingAttributes|null} attributes\n * @param {d.Attribution|null} attribution\n */\n constructor (delta, attributes, attribution) {\n super()\n this.modify = delta\n this.attributes = attributes\n this.attribution = attribution\n }\n\n /**\n * @return {'modify'}\n */\n get type () {\n return 'modify'\n }\n\n get length () {\n return 1\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} _offset\n * @param {number} len\n */\n _splice (_offset, len) {\n }\n\n /**\n * @return {DeltaJsonOp}\n */\n toJSON () {\n return object.assign({ modify: this.modify.toJSON() }, this.attributes ? { attributes: this.attributes } : {}, this.attribution ? { attribution: this.attribution } : {})\n }\n\n /**\n * @param {ModifyOp<any>} other\n */\n [traits.EqualityTraitSymbol] (other) {\n return this.modify[traits.EqualityTraitSymbol](other.modify) && fun.equalityDeep(this.attributes, other.attributes) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n /**\n * @return {ModifyOp<DTypes>}\n */\n clone () {\n return new ModifyOp(this.modify.clone(), _cloneAttrs(this.attributes), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template V\n * @template [K=string]\n */\nexport class MapInsertOp {\n /**\n * @param {K} key\n * @param {V} value\n * @param {V|undefined} prevValue\n * @param {s.TypeOf<d.$attribution>?} attribution\n */\n constructor (key, value, prevValue, attribution) {\n /**\n * @type {K}\n */\n this.key = key\n /**\n * @type {V}\n */\n this.value = value\n /**\n * @type {V|undefined}\n */\n this.prevValue = prevValue\n this.attribution = attribution\n }\n\n /**\n * @return {'insert'}\n */\n get type () { return 'insert' }\n\n toJSON () {\n return {\n type: this.type,\n value: d.$delta.check(this.value) ? this.value.toJSON() : this.value,\n attribution: this.attribution\n }\n }\n\n /**\n * @param {MapInsertOp<V>} other\n */\n [traits.EqualityTraitSymbol] (other) {\n return this.key === other.key && fun.equalityDeep(this.value, other.value) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n /**\n * @return {MapInsertOp<V,K>}\n */\n clone () {\n return new MapInsertOp(this.key, _cloneMaybeDelta(this.value), _cloneMaybeDelta(this.prevValue), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template V\n * @template [K=string]\n */\nexport class MapDeleteOp {\n /**\n * @param {K} key\n * @param {V|undefined} prevValue\n * @param {s.TypeOf<d.$attribution>?} attribution\n */\n constructor (key, prevValue, attribution) {\n /**\n * @type {K}\n */\n this.key = key\n /**\n * @type {V|undefined}\n */\n this.prevValue = prevValue\n this.attribution = attribution\n }\n\n get value () { return undefined }\n\n /**\n * @type {'delete'}\n */\n get type () { return 'delete' }\n\n toJSON () {\n return {\n type: this.type,\n attribution: this.attribution\n }\n }\n\n /**\n * @param {MapDeleteOp<V>} other\n */\n [traits.EqualityTraitSymbol] (other) {\n return this.key === other.key && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n clone () {\n return new MapDeleteOp(this.key, _cloneMaybeDelta(this.prevValue), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template {d.AbstractDelta} Modifiers\n * @template [K=string]\n */\nexport class MapModifyOp {\n /**\n * @param {K} key\n * @param {Modifiers} delta\n */\n constructor (key, delta) {\n /**\n * @type {K}\n */\n this.key = key\n /**\n * @type {Modifiers}\n */\n this.value = delta\n }\n\n /**\n * @type {'modify'}\n */\n get type () { return 'modify' }\n\n toJSON () {\n return {\n type: this.type,\n value: this.value.toJSON()\n }\n }\n\n /**\n * @param {MapModifyOp<Modifiers>} other\n */\n [traits.EqualityTraitSymbol] (other) {\n return this.key === other.key && this.value[traits.EqualityTraitSymbol](other.value)\n }\n\n /**\n * @return {MapModifyOp<Modifiers,K>}\n */\n clone () {\n return new MapModifyOp(this.key, this.value.clone())\n }\n}\n\nexport const $deltaMapChangeJson = s.$union(\n s.$object({ type: s.$literal('insert'), value: s.$any, attribution: d.$attribution.nullable.optional }),\n s.$object({ type: s.$literal('modify'), value: s.$any }),\n s.$object({ type: s.$literal('delete'), attribution: d.$attribution.nullable.optional })\n)\n\n/**\n * @type {s.Schema<MapDeleteOp<any> | DeleteOp>}\n */\nexport const $deleteOp = s.$custom(o => o != null && (o.constructor === DeleteOp || o.constructor === MapDeleteOp))\n\n/**\n * @type {s.Schema<MapInsertOp<any> | InsertOp<any>>}\n */\nexport const $insertOp = s.$custom(o => o != null && (o.constructor === MapInsertOp || o.constructor === InsertOp))\n\n/**\n * @template Content\n * @param {s.Schema<Content>} $content\n * @return {s.Schema<MapInsertOp<Content> | InsertOp<Content>>}\n */\nexport const $insertOpWith = $content => s.$custom(o =>\n o != null && (\n (o.constructor === MapInsertOp && $content.check(/** @type {MapInsertOp<Content>} */ (o).value)) ||\n (o.constructor === InsertOp && /** @type {InsertOp<Content>} */ (o).insert.every(ins => $content.check(ins)))\n )\n)\n\n/**\n * @type {s.Schema<TextOp>}\n */\nexport const $textOp = s.$constructedBy(TextOp)\n\n/**\n * @type {s.Schema<RetainOp>}\n */\nexport const $retainOp = s.$constructedBy(RetainOp)\n\n/**\n * @type {s.Schema<MapModifyOp<any> | ModifyOp<any>>}\n */\nexport const $modifyOp = s.$custom(o => o != null && (o.constructor === MapModifyOp || o.constructor === ModifyOp))\n\n/**\n * @template {d.AbstractDelta} Modify\n * @param {s.Schema<Modify>} $content\n * @return {s.Schema<MapModifyOp<Modify> | ModifyOp<Modify>>}\n */\nexport const $modifyOpWith = $content => s.$custom(o =>\n o != null && (\n (o.constructor === MapModifyOp && $content.check(/** @type {MapModifyOp<Modify>} */ (o).value)) ||\n (o.constructor === ModifyOp && $content.check(/** @type {ModifyOp<Modify>} */ (o).modify))\n )\n)\n\nexport const $anyOp = s.$union($insertOp, $deleteOp, $textOp, $modifyOp)\n"],"names":["d.$delta","list.ListNode","object.assign","traits.EqualityTraitSymbol","fun.equalityDeep","s.$union","s.$object","s.$literal","s.$any","d.$attribution","s.$custom","s.$constructedBy"],"mappings":";;;;;;;;;;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,KAAK,IAAI,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,EAAE,GAAG,KAAK,GAAE;AACjE;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,UAAU,IAAIA,eAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,GAAG,WAAU;AACnG;AACO,MAAM,MAAM,SAASC,aAAa,CAAC;AAC1C;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE;AAChD,IAAI,KAAK,GAAE;AACX,IAAI,IAAI,CAAC,MAAM,GAAG,OAAM;AACxB,IAAI,IAAI,CAAC,UAAU,GAAG,WAAU;AAChC,IAAI,IAAI,CAAC,WAAW,GAAG,YAAW;AAClC,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE,IAAI,IAAI,CAAC,GAAG;AACd,IAAI,OAAO,QAAQ;AACnB,GAAG;AACH;AACA,EAAE,IAAI,MAAM,CAAC,GAAG;AAChB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM;AAC7B,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE;AACxB,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,C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X,IAAI,CAAC,CAAC,CAAC,WAAW,KAAK,WAAW,IAAI,QAAQ,CAAC,KAAK,oCAAoC,CAAC,CAAC,EAAE,KAAK,CAAC;AAClG,OAAO,CAAC,CAAC,WAAW,KAAK,QAAQ,IAAI,QAAQ,CAAC,KAAK,iCAAiC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAChG,GAAG;AACH,EAAC;AACD;AACY,MAAC,MAAM,GAAGL,aAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/patience.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var map = require('./map-
|
|
6
|
-
var math = require('./math-
|
|
5
|
+
var map = require('./map-24d263c0.cjs');
|
|
6
|
+
var math = require('./math-96d5e8c4.cjs');
|
|
7
7
|
var array = require('./array-78849c95.cjs');
|
|
8
8
|
require('./set-5b47859e.cjs');
|
|
9
9
|
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var node_perf_hooks = require('node:perf_hooks');
|
|
6
|
-
var _function = require('./function-
|
|
7
|
-
var time = require('./time-
|
|
6
|
+
var _function = require('./function-e7d18feb.cjs');
|
|
7
|
+
var time = require('./time-d8438852.cjs');
|
|
8
8
|
require('./array-78849c95.cjs');
|
|
9
9
|
require('./set-5b47859e.cjs');
|
|
10
|
-
require('./object-
|
|
10
|
+
require('./object-18980796.cjs');
|
|
11
11
|
require('./traits.cjs');
|
|
12
12
|
require('./metric.cjs');
|
|
13
|
-
require('./math-
|
|
13
|
+
require('./math-96d5e8c4.cjs');
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @type {typeof performance.measure}
|
package/dist/pledge.cjs
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var queue = require('./queue.cjs');
|
|
6
|
-
var object = require('./object-
|
|
6
|
+
var object = require('./object-18980796.cjs');
|
|
7
|
+
require('./traits.cjs');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @experimental Use of this module is not encouraged!
|