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

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 +55 -24
  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 +15 -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 +63 -307
  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 +325 -117
  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,71 +1,22 @@
1
- export function createContentIds(inserts?: import("./IdSet.js").IdSet, deletes?: import("./IdSet.js").IdSet): {
2
- inserts: idset.IdSet;
3
- deletes: idset.IdSet;
4
- };
5
- export function createContentIdsFromContentMap(contentMap: ContentMap): {
6
- inserts: idset.IdSet;
7
- deletes: idset.IdSet;
8
- };
9
- export function createContentIdsFromDoc(ydoc: import("./Doc.js").Doc): {
10
- inserts: idset.IdSet;
11
- deletes: idset.IdSet;
12
- };
13
- export function createContentIdsFromDocDiff(ydocPrev: import("./Doc.js").Doc, ydocNext: import("./Doc.js").Doc): {
14
- inserts: idset.IdSet;
15
- deletes: idset.IdSet;
16
- };
17
- export function excludeContentIds(content: ContentIds, excludeContent: ContentIds): {
18
- inserts: idset.IdSet;
19
- deletes: idset.IdSet;
20
- };
21
- export function excludeContentMap(content: ContentMap, excludeContent: ContentIds | ContentMap): {
22
- inserts: idmap.IdMap<any>;
23
- deletes: idmap.IdMap<any>;
24
- };
25
- export function mergeContentMaps(contents: Array<ContentMap>): {
26
- inserts: idmap.IdMap<any>;
27
- deletes: idmap.IdMap<any>;
28
- };
29
- export function mergeContentIds(contents: Array<ContentIds>): {
30
- inserts: idset.IdSet;
31
- deletes: idset.IdSet;
32
- };
33
- export function createContentMap(inserts: import("./IdMap.js").IdMap<any>, deletes: import("./IdMap.js").IdMap<any>): {
34
- inserts: idmap.IdMap<any>;
35
- deletes: idmap.IdMap<any>;
36
- };
37
- export function createContentMapFromContentIds(contentIds: ContentIds, insertAttrs: Array<idmap.ContentAttribute<any>>, deleteAttrs?: Array<idmap.ContentAttribute<any>>): {
38
- inserts: idmap.IdMap<any>;
39
- deletes: idmap.IdMap<any>;
40
- };
1
+ export function createContentIds(inserts?: IdSet, deletes?: IdSet): ContentIds;
2
+ export function createContentIdsFromContentMap(contentMap: ContentMap): import("./ids.js").ContentIds;
3
+ export function createContentIdsFromDoc(ydoc: import("./Doc.js").Doc): import("./ids.js").ContentIds;
4
+ export function createContentIdsFromDocDiff(ydocPrev: import("./Doc.js").Doc, ydocNext: import("./Doc.js").Doc): import("./ids.js").ContentIds;
5
+ export function excludeContentIds(content: ContentIds, excludeContent: ContentIds): import("./ids.js").ContentIds;
6
+ export function excludeContentMap(content: ContentMap, excludeContent: ContentIds | ContentMap): import("./ids.js").ContentMap;
7
+ export function mergeContentMaps(contents: Array<ContentMap>): import("./ids.js").ContentMap;
8
+ export function mergeContentIds(contents: Array<ContentIds>): import("./ids.js").ContentIds;
9
+ export function createContentMap(inserts: IdMap<any>, deletes: IdMap<any>): ContentMap;
10
+ export function createContentMapFromContentIds(contentIds: ContentIds, insertAttrs: Array<ContentAttribute<any>>, deleteAttrs?: Array<ContentAttribute<any>>): import("./ids.js").ContentMap;
41
11
  export function writeContentIds(encoder: import("./UpdateEncoder.js").IdSetEncoder, contentIds: ContentIds): void;
42
12
  export function encodeContentIds(contentIds: ContentIds): Uint8Array<ArrayBuffer>;
43
13
  export function readContentIds(decoder: import("./UpdateDecoder.js").IdSetDecoder): ContentIds;
44
- export function decodeContentIds(buf: Uint8Array<any>): ContentIds;
14
+ export function decodeContentIds(buf: Uint8Array<any>): import("./ids.js").ContentIds;
45
15
  export function writeContentMap(encoder: import("./UpdateEncoder.js").IdSetEncoder, contentMap: ContentMap): void;
46
16
  export function readContentMap(decoder: import("./UpdateDecoder.js").IdSetDecoder): ContentMap;
47
17
  export function encodeContentMap(contentMap: ContentMap): Uint8Array<ArrayBuffer>;
48
- export function intersectContentMap(mapA: ContentMap, mapB: ContentMap | ContentIds): {
49
- inserts: idmap.IdMap<any>;
50
- deletes: idmap.IdMap<any>;
51
- };
52
- export function intersectContentIds(setA: ContentIds, setB: ContentIds | ContentMap): {
53
- inserts: idset.IdSet;
54
- deletes: idset.IdSet;
55
- };
56
- export function decodeContentMap(buf: Uint8Array<any>): ContentMap;
57
- export function filterContentMap(contentMap: ContentMap, insertPredicate: (c: Array<idmap.ContentAttribute<any>>) => boolean, deletePredicate: (c: Array<idmap.ContentAttribute<any>>) => boolean): {
58
- inserts: idmap.IdMap<any>;
59
- deletes: idmap.IdMap<any>;
60
- };
61
- export type ContentIds = {
62
- inserts: import("./IdSet.js").IdSet;
63
- deletes: import("./IdSet.js").IdSet;
64
- };
65
- export type ContentMap = {
66
- inserts: import("./IdMap.js").IdMap<any>;
67
- deletes: import("./IdMap.js").IdMap<any>;
68
- };
69
- import * as idset from './IdSet.js';
70
- import * as idmap from './IdMap.js';
18
+ export function intersectContentMap(mapA: ContentMap, mapB: ContentMap | ContentIds): import("./ids.js").ContentMap;
19
+ export function intersectContentIds(setA: ContentIds, setB: ContentIds | ContentMap): import("./ids.js").ContentIds;
20
+ export function decodeContentMap(buf: Uint8Array<any>): import("./ids.js").ContentMap;
21
+ export function filterContentMap(contentMap: ContentMap, insertPredicate: (c: Array<ContentAttribute<any>>) => boolean, deletePredicate: (c: Array<ContentAttribute<any>>) => boolean): import("./ids.js").ContentMap;
71
22
  //# sourceMappingURL=meta.d.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,OAAO,oBAAoB,EAAE,YAAY,cACzC,UAAU,QAKpB;AAKM,6CAFI,UAAU,2BAMpB;AAQM,wCAHI,OAAO,oBAAoB,EAAE,YAAY,GACxC,UAAU,CAKrB;AAKM,sCAFI,UAAU,CAAC,GAAG,CAAC,iCAE4E;AAQ/F,yCAHI,OAAO,oBAAoB,EAAE,YAAY,cACzC,UAAU,QAKpB;AAQM,wCAHI,OAAO,oBAAoB,EAAE,YAAY,GACxC,UAAU,CAKrB;AAKM,6CAFI,UAAU,2BAMpB;AAMM,0CAHI,UAAU,QACV,UAAU,GAAC,UAAU,iCAK/B;AAMM,0CAHI,UAAU,QACV,UAAU,GAAC,UAAU,iCAK/B;AAKM,sCAFI,UAAU,CAAC,GAAG,CAAC,iCAE4E;AAQ/F,6CAJI,UAAU,mBACV,CAAC,CAAC,EAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAG,OAAO,mBACzC,CAAC,CAAC,EAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAG,OAAO,iCAEkJ"}
@@ -0,0 +1,99 @@
1
+ export const attributionJsonSchema: s.Schema<{
2
+ insert?: string[] | undefined;
3
+ insertAt?: number | undefined;
4
+ delete?: string[] | undefined;
5
+ deleteAt?: number | undefined;
6
+ format?: {
7
+ [x: string]: string[];
8
+ } | undefined;
9
+ formatAt?: number | undefined;
10
+ }>;
11
+ /**
12
+ * @todo rename this to `insertBy`, `insertAt`, ..
13
+ *
14
+ * @typedef {s.Unwrap<typeof attributionJsonSchema>} Attribution
15
+ */
16
+ /**
17
+ * @template T
18
+ */
19
+ export class AttributedContent<T> {
20
+ /**
21
+ * @param {AbstractContent} content
22
+ * @param {number} clock
23
+ * @param {boolean} deleted
24
+ * @param {Array<ContentAttribute<T>> | null} attrs
25
+ * @param {0|1|2} renderBehavior
26
+ */
27
+ constructor(content: AbstractContent, clock: number, deleted: boolean, attrs: Array<ContentAttribute<T>> | null, renderBehavior: 0 | 1 | 2);
28
+ content: import("../structs/Item.js").AbstractContent;
29
+ clock: number;
30
+ deleted: boolean;
31
+ attrs: import("./ids.js").ContentAttribute<T>[] | null;
32
+ render: boolean;
33
+ }
34
+ /**
35
+ * Abstract base class for renderers. A renderer renders Content (with Attributions) to a delta.
36
+ *
37
+ * Should fire an event when the attributions changed _after_ the original change happens. This
38
+ * Event will be used to update the attribution on the current content.
39
+ *
40
+ * @extends {ObservableV2<{change:(idset:IdSet,origin:any,local:boolean)=>void}>}
41
+ */
42
+ export class AbstractRenderer extends ObservableV2<{
43
+ change: (idset: IdSet, origin: any, local: boolean) => void;
44
+ }> {
45
+ constructor();
46
+ /**
47
+ * @param {Array<AttributedContent<any>>} _contents - where to write the result
48
+ * @param {number} _client
49
+ * @param {number} _clock
50
+ * @param {boolean} _deleted
51
+ * @param {AbstractContent} _content
52
+ * @param {0|1|2} _shouldRender - 0: if undeleted or attributed, render as a retain operation. 1: render only if undeleted or attributed. 2: render as insert operation (if unattributed and deleted, render as delete).
53
+ */
54
+ readContent(_contents: Array<AttributedContent<any>>, _client: number, _clock: number, _deleted: boolean, _content: AbstractContent, _shouldRender: 0 | 1 | 2): void;
55
+ /**
56
+ * Calculate the length of the attributed content. This is used by iterators that walk through the
57
+ * content.
58
+ *
59
+ * If the content is not countable, it should return 0.
60
+ *
61
+ * @param {Item} _item
62
+ * @return {number}
63
+ */
64
+ contentLength(_item: Item): number;
65
+ $type: s.Schema<AbstractRenderer>;
66
+ }
67
+ export const $renderer: s.Schema<AbstractRenderer>;
68
+ /**
69
+ * The default renderer. Renders content as-is, without looking up any attributions.
70
+ *
71
+ * @implements AbstractRenderer
72
+ *
73
+ * @extends {ObservableV2<{change:(idset:IdSet,origin:any,local:boolean)=>void}>}
74
+ */
75
+ export class BaseRenderer extends ObservableV2<{
76
+ change: (idset: IdSet, origin: any, local: boolean) => void;
77
+ }> implements AbstractRenderer {
78
+ constructor();
79
+ get $type(): s.Schema<AbstractRenderer>;
80
+ /**
81
+ * @param {Array<AttributedContent<any>>} contents - where to write the result
82
+ * @param {number} _client
83
+ * @param {number} clock
84
+ * @param {boolean} deleted
85
+ * @param {AbstractContent} content
86
+ * @param {0|1|2} shouldRender - whether this should render or just result in a `retain` operation
87
+ */
88
+ readContent(contents: Array<AttributedContent<any>>, _client: number, clock: number, deleted: boolean, content: AbstractContent, shouldRender: 0 | 1 | 2): void;
89
+ /**
90
+ * @param {Item} item
91
+ * @return {number}
92
+ */
93
+ contentLength(item: Item): number;
94
+ }
95
+ export const baseRenderer: BaseRenderer;
96
+ export type Attribution = s.Unwrap<typeof attributionJsonSchema>;
97
+ import * as s from 'lib0/schema';
98
+ import { ObservableV2 } from 'lib0/observable';
99
+ //# sourceMappingURL=renderer-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/renderer-helpers.js"],"names":[],"mappings":"AAIA;;;;;;;;;GAOE;AAEF;;;;GAIG;AAEH;;GAEG;AACH,+BAFa,CAAC;IAGZ;;;;;;OAMG;IACH,qBANW,eAAe,SACf,MAAM,WACN,OAAO,SACP,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,kBACjC,CAAC,GAAC,CAAC,GAAC,CAAC,EAQf;IALC,sDAAsB;IACtB,cAAkB;IAClB,iBAAsB;IACtB,uDAAkB;IAClB,gBAAwG;CAE3G;AAED;;;;;;;GAOG;AACH;YAFkC,CAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,GAAG,EAAC,KAAK,EAAC,OAAO,KAAG,IAAI;;;IAG5E;;;;;;;OAOG;IACH,uBAPW,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,WAC7B,MAAM,UACN,MAAM,YACN,OAAO,YACP,eAAe,iBACf,CAAC,GAAC,CAAC,GAAC,CAAC,QAIf;IAED;;;;;;;;OAQG;IACH,qBAHW,IAAI,GACH,MAAM,CAIjB;IAGsB,kCAAgC;CAFxD;AAED,mDAA4F;AAE5F;;;;;;GAMG;AACH;YAFkC,CAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,GAAG,EAAC,KAAK,EAAC,OAAO,KAAG,IAAI;cAF/D,gBAAgB;;IAK7B,wCAAiC;IAEjC;;;;;;;OAOG;IACH,sBAPW,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,WAC7B,MAAM,SACN,MAAM,WACN,OAAO,WACP,eAAe,gBACf,CAAC,GAAC,CAAC,GAAC,CAAC,QAMf;IAED;;;OAGG;IACH,oBAHW,IAAI,GACH,MAAM,CAIjB;CACF;AAED,wCAA8C;0BA7FjC,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC;mBAhBhC,aAAa;6BAEH,iBAAiB"}
@@ -0,0 +1,3 @@
1
+ export const $ydoc: s.Schema<Doc>;
2
+ import * as s from 'lib0/schema';
3
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/utils/schemas.js"],"names":[],"mappings":"AAEA,oBAAgC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAA6B;mBAFvD,aAAa"}
@@ -0,0 +1,18 @@
1
+ export function findIndexSS(structs: Array<Item | GC | Skip>, clock: number): number;
2
+ export function findIndexCleanStart(transaction: Transaction | null, structs: Array<Item | GC | Skip>, clock: number): number;
3
+ export function getItemCleanStart(transaction: Transaction, id: ID): Item;
4
+ export function getItemCleanEnd(transaction: Transaction, store: StructStore, id: ID): Item;
5
+ export function replaceStruct(tr: Transaction, struct: GC | Item, newStruct: GC | Item): void;
6
+ export function iterateStructs(transaction: Transaction, structs: Array<Item | GC>, clockStart: number, len: number, f: (arg0: GC | Item) => void): void;
7
+ export function iterateStructsWithoutSplits(structs: Array<Item | GC>, clockStart: number, len: number, f: (struct: GC | Item | Skip, offset: number, len: number) => void): void;
8
+ export function splitStruct(transaction: Transaction | null, leftStruct: Item | GC | Skip, diff: number): GC | Item | Skip;
9
+ export function nextID(transaction: Transaction): import("./ID.js").ID;
10
+ export function addChangedTypeToTransaction(transaction: Transaction, type: YType, parentSub: string | null): void;
11
+ export function tryToMergeWithLefts(structs: Array<GC | Item | Skip>, pos: number): number;
12
+ export function tryGcDeleteSet(tr: Transaction, ds: IdSet, gcFilter: (arg0: Item) => boolean): void;
13
+ export function tryMerge(ds: IdSet, store: StructStore): void;
14
+ export function tryGc(tr: Transaction, idset: IdSet, gcFilter: (arg0: Item) => boolean): void;
15
+ export function cleanupContextlessFormattingGap(transaction: Transaction, item: Item | null): 0 | undefined;
16
+ export function updateCurrentAttributes(currentAttributes: Map<string, any>, { key, value }: ContentFormat): void;
17
+ export function cleanupFormattingGap(transaction: Transaction, start: Item, curr: Item | null, startAttributes: Map<string, any>, currAttributes: Map<string, any>): number;
18
+ //# sourceMappingURL=transaction-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/transaction-helpers.js"],"names":[],"mappings":"AAqBO,qCAPI,KAAK,CAAC,IAAI,GAAC,EAAE,GAAC,IAAI,CAAC,SACnB,MAAM,GACL,MAAM,CAiCjB;AAOM,iDAJI,WAAW,OAAC,WACZ,KAAK,CAAC,IAAI,GAAC,EAAE,GAAC,IAAI,CAAC,SACnB,MAAM,UAUhB;AAYM,+CAPI,WAAW,MACX,EAAE,GACD,IAAI,CAQf;AAaM,6CARI,WAAW,SACX,WAAW,MACX,EAAE,GACD,IAAI,CAaf;AAWM,kCAPI,WAAW,UACX,EAAE,GAAC,IAAI,aACP,EAAE,GAAC,IAAI,QASjB;AAaM,4CARI,WAAW,WACX,KAAK,CAAC,IAAI,GAAC,EAAE,CAAC,cACd,MAAM,OACN,MAAM,KACN,CAAS,IAAO,EAAP,EAAE,GAAC,IAAI,KAAE,IAAI,QAkBhC;AAaM,qDAPI,KAAK,CAAC,IAAI,GAAC,EAAE,CAAC,cACd,MAAM,OACN,MAAM,KACN,CAAC,MAAM,EAAE,EAAE,GAAC,IAAI,GAAC,IAAI,EAAE,MAAM,EAAC,MAAM,EAAE,GAAG,EAAC,MAAM,KAAG,IAAI,QAkBjE;AAYM,yCARI,WAAW,OAAC,cACZ,IAAI,GAAC,EAAE,GAAC,IAAI,QACZ,MAAM,GACL,EAAE,GAAC,IAAI,GAAC,IAAI,CAavB;AAQM,oCALI,WAAW,wBAQrB;AAUM,yDAJI,WAAW,QACX,KAAK,aACL,MAAM,GAAC,IAAI,QAOrB;AAOM,6CAJI,KAAK,CAAC,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,OACvB,MAAM,GACL,MAAM,CAuBjB;AAOM,mCAJI,WAAW,MACX,KAAK,YACL,CAAS,IAAI,EAAJ,IAAI,KAAE,OAAO,QAwBhC;AAMM,6BAHI,KAAK,SACL,WAAW,QAqBrB;AAOM,0BAJI,WAAW,SACX,KAAK,YACL,CAAS,IAAI,EAAJ,IAAI,KAAE,OAAO,QAKhC;AAMM,6DAHI,WAAW,QACX,IAAI,GAAG,IAAI,iBAsBrB;AASM,2DANI,GAAG,CAAC,MAAM,EAAC,GAAG,CAAC,kBACf,aAAa,QAWvB;AAeM,kDATI,WAAW,SACX,IAAI,QACJ,IAAI,GAAC,IAAI,mBACT,GAAG,CAAC,MAAM,EAAC,GAAG,CAAC,kBACf,GAAG,CAAC,MAAM,EAAC,GAAG,CAAC,GACd,MAAM,CAqDjB"}
@@ -20,11 +20,11 @@ export function logUpdate(update: Uint8Array): void;
20
20
  export function logUpdateV2(update: Uint8Array, YDecoder?: typeof UpdateDecoderV2 | typeof UpdateDecoderV1): void;
21
21
  export function decodeUpdate(update: Uint8Array): {
22
22
  structs: (GC | Item | Skip)[];
23
- ds: idset.IdSet;
23
+ ds: import("./ids.js").IdSet;
24
24
  };
25
25
  export function decodeUpdateV2(update: Uint8Array, YDecoder?: typeof UpdateDecoderV2 | typeof UpdateDecoderV1): {
26
26
  structs: (GC | Item | Skip)[];
27
- ds: idset.IdSet;
27
+ ds: import("./ids.js").IdSet;
28
28
  };
29
29
  export class LazyStructWriter {
30
30
  /**
@@ -34,7 +34,7 @@ export class LazyStructWriter {
34
34
  currClient: number;
35
35
  startClock: number;
36
36
  written: number;
37
- encoder: UpdateEncoderV2 | UpdateEncoderV1;
37
+ encoder: UpdateEncoderV1 | UpdateEncoderV2;
38
38
  /**
39
39
  * We want to write operations lazily, but also we need to know beforehand how many operations we want to write for each client.
40
40
  *
@@ -50,24 +50,20 @@ export class LazyStructWriter {
50
50
  restEncoder: Uint8Array;
51
51
  }>;
52
52
  }
53
- export function mergeUpdates(updates: Array<Uint8Array<ArrayBuffer>>): Uint8Array<ArrayBuffer>;
54
53
  export function encodeStateVectorFromUpdateV2(update: Uint8Array, YEncoder?: typeof IdSetEncoderV1 | typeof IdSetEncoderV2, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2): Uint8Array<ArrayBuffer>;
55
54
  export function encodeStateVectorFromUpdate(update: Uint8Array): Uint8Array<ArrayBuffer>;
56
- export function createContentIdsFromUpdateV2(update: Uint8Array, YDecoder?: typeof UpdateDecoderV2 | typeof UpdateDecoderV1): import("./meta.js").ContentIds;
57
- export function createContentIdsFromUpdate(update: Uint8Array): import("./meta.js").ContentIds;
58
- export function sliceStruct(left: Item | GC | Skip, diff: number): Item | GC;
59
- export function mergeUpdatesV2(updates: Array<Uint8Array<ArrayBuffer>>, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2, YEncoder?: typeof UpdateEncoderV1 | typeof UpdateEncoderV2): Uint8Array<ArrayBuffer>;
60
- export function diffUpdateV2(update: Uint8Array, sv: Uint8Array, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2, YEncoder?: typeof UpdateEncoderV1 | typeof UpdateEncoderV2): Uint8Array<ArrayBuffer>;
61
- export function diffUpdate(update: Uint8Array<ArrayBuffer>, sv: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
55
+ export function createContentIdsFromUpdateV2(update: Uint8Array, YDecoder?: typeof UpdateDecoderV2 | typeof UpdateDecoderV1): ContentIds;
56
+ export function createContentIdsFromUpdate(update: Uint8Array): ContentIds;
57
+ export function sliceStruct(left: Item | GC | Skip, diff: number): Item | GC | Skip;
58
+ export function writeStructToLazyStructWriter(lazyWriter: LazyStructWriter, struct: Item | GC | Skip, offset: number, offsetEnd: number): void;
59
+ export function finishLazyStructWriting(lazyWriter: LazyStructWriter): void;
62
60
  export function convertUpdateFormat(update: Uint8Array, blockTransformer: (arg0: Item | GC | Skip) => Item | GC | Skip, YDecoder: typeof UpdateDecoderV2 | typeof UpdateDecoderV1, YEncoder: typeof UpdateEncoderV2 | typeof UpdateEncoderV1): Uint8Array<ArrayBuffer>;
63
61
  export function obfuscateUpdate(update: Uint8Array, opts?: ObfuscatorOptions): Uint8Array<ArrayBuffer>;
64
62
  export function obfuscateUpdateV2(update: Uint8Array, opts?: ObfuscatorOptions): Uint8Array<ArrayBuffer>;
65
63
  export function convertUpdateFormatV1ToV2(update: Uint8Array): Uint8Array<ArrayBuffer>;
66
64
  export function convertUpdateFormatV2ToV1(update: Uint8Array): Uint8Array<ArrayBuffer>;
67
- export function intersectUpdateWithContentIdsV2(update: Uint8Array, contentIds: import("./meta.js").ContentIds, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2, YEncoder?: typeof UpdateEncoderV1 | typeof UpdateEncoderV2): Uint8Array<ArrayBuffer>;
68
- export function intersectUpdateWithContentIds(update: Uint8Array, contentIds: import("./meta.js").ContentIds): Uint8Array<ArrayBuffer>;
69
- export function createDocFromUpdate(update: Uint8Array, opts?: import("./Doc.js").DocOpts): Doc;
70
- export function createDocFromUpdateV2(update: Uint8Array, opts?: import("./Doc.js").DocOpts): Doc;
65
+ export function intersectUpdateWithContentIdsV2(update: Uint8Array, contentIds: ContentIds, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2, YEncoder?: typeof UpdateEncoderV1 | typeof UpdateEncoderV2): Uint8Array<ArrayBuffer>;
66
+ export function intersectUpdateWithContentIds(update: Uint8Array, contentIds: ContentIds): Uint8Array<ArrayBuffer>;
71
67
  export type ObfuscatorOptions = {
72
68
  formatting?: boolean | undefined;
73
69
  subdocs?: boolean | undefined;
@@ -76,15 +72,13 @@ export type ObfuscatorOptions = {
76
72
  */
77
73
  name?: boolean | undefined;
78
74
  };
79
- import { GC } from '../internals.js';
80
- import { Item } from '../internals.js';
81
- import { Skip } from '../internals.js';
82
- import { UpdateDecoderV1 } from '../internals.js';
83
- import { UpdateDecoderV2 } from '../internals.js';
84
- import * as idset from './IdSet.js';
85
- import { UpdateEncoderV2 } from '../internals.js';
86
- import { UpdateEncoderV1 } from '../internals.js';
87
- import { IdSetEncoderV1 } from '../internals.js';
88
- import { IdSetEncoderV2 } from '../internals.js';
89
- import { Doc } from '../internals.js';
75
+ import { GC } from '../structs/GC.js';
76
+ import { Item } from '../structs/Item.js';
77
+ import { Skip } from '../structs/Skip.js';
78
+ import { UpdateDecoderV1 } from './UpdateDecoder.js';
79
+ import { UpdateDecoderV2 } from './UpdateDecoder.js';
80
+ import { UpdateEncoderV1 } from './UpdateEncoder.js';
81
+ import { UpdateEncoderV2 } from './UpdateEncoder.js';
82
+ import { IdSetEncoderV1 } from './UpdateEncoder.js';
83
+ import { IdSetEncoderV2 } from './UpdateEncoder.js';
90
84
  //# sourceMappingURL=updates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updates.d.ts","sourceRoot":"","sources":["../../../src/utils/updates.js"],"names":[],"mappings":"AA0FA;IACE;;;OAGG;IACH,qBAHW,eAAe,GAAG,eAAe,eACjC,OAAO,EAWjB;IARC,gDAA6C;IAC7C;;OAEG;IACH,MAFU,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE,CAEjB;IAChB,cAAiB;IACjB,qBAA8B;IAIhC;;OAEG;IACH,QAFY,IAAI,GAAG,EAAE,GAAG,IAAI,GAAE,IAAI,CAQjC;CACF;AAKM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H,0CAHI,UAAU,SACV,iBAAiB,2BAE4G;AAKjI,kDAFI,UAAU,2BAEiG;AAK/G,kDAFI,UAAU,2BAEiG;AAkB/G,wDANI,UAAU,cACV,UAAU,aACV,OAAO,eAAe,GAAG,OAAO,eAAe,aAC/C,OAAO,eAAe,GAAG,OAAO,eAAe,GAC9C,UAAU,CAAC,WAAW,CAAC,CAqClC;AASM,sDAJI,UAAU,cACV,UAAU,GACT,UAAU,CAAC,WAAW,CAAC,CAGoD;;;;;;;;;mBAjjBpE,kBAAkB;qBAY9B,oBAAoB;qBAIN,oBAAoB;gCAjBQ,oBAAoB;gCAApB,oBAAoB;gCADY,oBAAoB;gCAApB,oBAAoB;+BAApB,oBAAoB;+BAApB,oBAAoB"}
@@ -1,18 +1,19 @@
1
1
  export function warnPrematureAccess(): void;
2
+ export function createAttributionFromAttributionItems(attrs: Array<ContentAttribute<any>> | null, deleted: boolean): Attribution | null;
2
3
  export class ItemTextListPosition {
3
4
  /**
4
5
  * @param {Item|null} left
5
6
  * @param {Item|null} right
6
7
  * @param {number} index
7
8
  * @param {Map<string,any>} currentAttributes
8
- * @param {AbstractAttributionManager} am
9
+ * @param {AbstractRenderer} renderer
9
10
  */
10
- constructor(left: Item | null, right: Item | null, index: number, currentAttributes: Map<string, any>, am: AbstractAttributionManager);
11
+ constructor(left: Item | null, right: Item | null, index: number, currentAttributes: Map<string, any>, renderer: AbstractRenderer);
11
12
  left: Item | null;
12
13
  right: Item | null;
13
14
  index: number;
14
15
  currentAttributes: Map<string, any>;
15
- am: AbstractAttributionManager;
16
+ renderer: import("./utils/renderer-helpers.js").AbstractRenderer;
16
17
  /**
17
18
  * Only call this if you know that this.right is defined
18
19
  */
@@ -182,23 +183,24 @@ export class YType<DConf extends delta.DeltaConf = any> {
182
183
  *
183
184
  * @template {boolean} [Deep=false]
184
185
  *
185
- * @param {AbstractAttributionManager} am
186
186
  * @param {Object} [opts]
187
- * @param {import('./utils/IdSet.js').IdSet?} [opts.itemsToRender]
187
+ * @param {AbstractRenderer} [opts.renderer] - renders the content (with attributions); defaults to `baseRenderer`
188
+ * @param {IdSet?} [opts.itemsToRender]
188
189
  * @param {boolean} [opts.retainInserts] - if true, retain rendered inserts with attributions
189
190
  * @param {boolean} [opts.retainDeletes] - if true, retain rendered+attributed deletes only
190
- * @param {import('./utils/IdSet.js').IdSet?} [opts.deletedItems] - used for computing prevItem in attributes
191
+ * @param {IdSet?} [opts.deletedItems] - used for computing prevItem in attributes
191
192
  * @param {Map<YType,Set<string|null>>|null} [opts.modified] - set of types that should be rendered as modified children
192
193
  * @param {Deep} [opts.deep] - render child types as delta
193
194
  * @return {Deep extends true ? delta.Delta<DConf> : delta.Delta<DeltaConfDeltaToYType<DConf>>} The Delta representation of this type.
194
195
  *
195
196
  * @public
196
197
  */
197
- public toDelta<Deep extends boolean = false>(am?: AbstractAttributionManager, opts?: {
198
- itemsToRender?: import("./internals.js").IdSet | null | undefined;
198
+ public toDelta<Deep extends boolean = false>(opts?: {
199
+ renderer?: import("./utils/renderer-helpers.js").AbstractRenderer | undefined;
200
+ itemsToRender?: import("./utils/ids.js").IdSet | null | undefined;
199
201
  retainInserts?: boolean | undefined;
200
202
  retainDeletes?: boolean | undefined;
201
- deletedItems?: import("./internals.js").IdSet | null | undefined;
203
+ deletedItems?: import("./utils/ids.js").IdSet | null | undefined;
202
204
  modified?: Map<YType<any>, Set<string | null>> | null | undefined;
203
205
  deep?: Deep | undefined;
204
206
  }): Deep extends true ? delta.Delta<DConf> : delta.Delta<DeltaConfDeltaToYType<DConf>>;
@@ -206,19 +208,25 @@ export class YType<DConf extends delta.DeltaConf = any> {
206
208
  * Render the difference to another ydoc (which can be empty) and highlight the differences with
207
209
  * attributions.
208
210
  *
209
- * @param {AbstractAttributionManager} am
211
+ * @param {Object} [opts]
212
+ * @param {AbstractRenderer} [opts.renderer] - renders the content (with attributions); defaults to `baseRenderer`
210
213
  * @return {delta.Delta<DConf>}
211
214
  */
212
- toDeltaDeep(am?: AbstractAttributionManager): delta.Delta<DConf>;
215
+ toDeltaDeep(opts?: {
216
+ renderer?: import("./utils/renderer-helpers.js").AbstractRenderer | undefined;
217
+ }): delta.Delta<DConf>;
213
218
  /**
214
219
  * Apply a {@link Delta} on this shared type.
215
220
  *
216
221
  * @param {delta.DeltaAny} d The changes to apply on this element.
217
- * @param {AbstractAttributionManager} am
222
+ * @param {Object} [opts]
223
+ * @param {AbstractRenderer} [opts.renderer] - renders the content (with attributions); defaults to `baseRenderer`
218
224
  *
219
225
  * @public
220
226
  */
221
- public applyDelta(d: delta.DeltaAny, am?: AbstractAttributionManager): this;
227
+ public applyDelta(d: delta.DeltaAny, { renderer }?: {
228
+ renderer?: import("./utils/renderer-helpers.js").AbstractRenderer | undefined;
229
+ }): this;
222
230
  /**
223
231
  * Makes a copy of this data type that can be included somewhere else.
224
232
  *
@@ -441,7 +449,9 @@ export class YType<DConf extends delta.DeltaConf = any> {
441
449
  */
442
450
  [traits.EqualityTraitSymbol](other: this): boolean;
443
451
  }
444
- export function readYType(decoder: import("./utils/UpdateDecoder.js").UpdateDecoderV1 | import("./utils/UpdateDecoder.js").UpdateDecoderV2): YType;
452
+ export function $ytype<DConf extends import("lib0/delta").ReadableDeltaConf>(_dconf: DConf): s.Schema<YType<import("lib0/delta").ReadDeltaConf<DConf>>>;
453
+ export const $ytypeAny: s.Schema<YType<any>>;
454
+ export function computeModifiedFromItems(store: StructStore, items: IdSet): Map<YType<any>, Set<string | null>>;
445
455
  export function equalAttrs(a: any, b: any): boolean;
446
456
  export function typeListSlice(type: YType<any>, start: number, end: number): Array<any>;
447
457
  export function typeListGet(type: YType, index: number): any;
@@ -463,8 +473,9 @@ export function typeMapGetAll(parent: YType<any>): {
463
473
  [x: string]: any;
464
474
  } | null | undefined;
465
475
  };
466
- export function typeMapGetDelta<TypeDelta extends delta.DeltaBuilderAny>(d: TypeDelta, parent: YType, attrsToRender: Set<string | null> | null, am: import("./internals.js").AbstractAttributionManager, deep: boolean, modified?: Set<YType> | Map<YType, any> | null, deletedItems?: import("./utils/IdSet.js").IdSet | null, itemsToRender?: import("./utils/IdSet.js").IdSet | null, opts?: any, optsAll?: any): void;
476
+ export function typeMapGetDelta<TypeDelta extends delta.DeltaBuilderAny>(d: TypeDelta, parent: YType, attrsToRender: Set<string | null> | null, renderer: AbstractRenderer, deep: boolean, modified?: Set<YType> | Map<YType, any> | null, deletedItems?: IdSet | null, itemsToRender?: IdSet | null, opts?: any, optsAll?: any): void;
467
477
  export function typeMapHas(parent: YType<any>, key: string): boolean;
478
+ export function isVisible(item: Item, snapshot: Snapshot | undefined): boolean;
468
479
  export function typeMapGetSnapshot(parent: YType<any>, key: string, snapshot: Snapshot): {
469
480
  [x: string]: any;
470
481
  } | number | null | Array<any> | string | Uint8Array | YType<any> | undefined;
@@ -476,6 +487,23 @@ export function typeMapGetAllSnapshot(parent: YType<any>, snapshot: Snapshot): {
476
487
  export function createMapIterator(type: YType<any> & {
477
488
  _map: Map<string, Item>;
478
489
  }): IterableIterator<Array<any>>;
490
+ export function readContentType(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentType;
491
+ export function readContentString(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentString;
492
+ export function readContentJSON(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentJSON;
493
+ export function readContentFormat(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentFormat;
494
+ export function readContentEmbed(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentEmbed;
495
+ export function readContentDoc(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentDoc;
496
+ export function readContentAny(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentAny;
497
+ export function readContentBinary(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentBinary;
498
+ export function readContentDeleted(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentDeleted;
499
+ /**
500
+ * A lookup map for reading Item content.
501
+ *
502
+ * @type {Array<function(UpdateDecoderV1 | UpdateDecoderV2):AbstractContent>}
503
+ */
504
+ export const contentRefs: Array<(arg0: UpdateDecoderV1 | UpdateDecoderV2) => AbstractContent>;
505
+ export function readItemContent(decoder: UpdateDecoderV1 | UpdateDecoderV2, info: number): import("./structs/Item.js").AbstractContent;
506
+ export function readYType(decoder: UpdateDecoderV1 | UpdateDecoderV2): YType;
479
507
  export type YValue = {
480
508
  [x: string]: any;
481
509
  } | Array<any> | number | null | string | Uint8Array | bigint | YType<any>;
@@ -484,15 +512,18 @@ export type DeltaConfDeltaToYType<DConf extends delta.DeltaConf> = delta.DeltaCo
484
512
  children: DeltaToYType<delta.DeltaConfGetChildren<DConf>>;
485
513
  }>;
486
514
  export type DeltaToYType<Data extends unknown> = Exclude<Data, delta.DeltaAny> | (Extract<Data, delta.DeltaAny> extends delta.Delta<infer DConf> ? (unknown extends DConf ? YType<DConf> : never) : never);
487
- import { Item } from './internals.js';
488
- import { AbstractAttributionManager } from './internals.js';
489
- import { Transaction } from './internals.js';
490
- import { YEvent } from './internals.js';
515
+ import { Item } from './structs/Item.js';
516
+ import { YEvent } from './utils/YEvent.js';
491
517
  import * as delta from 'lib0/delta';
492
- import { Doc } from './internals.js';
493
- import { EventHandler } from './internals.js';
494
- import { Snapshot } from './internals.js';
495
- import { UpdateEncoderV1 } from './internals.js';
496
- import { UpdateEncoderV2 } from './internals.js';
497
518
  import * as traits from 'lib0/traits';
519
+ import * as s from 'lib0/schema';
520
+ import { ContentType } from './structs/Item.js';
521
+ import { ContentString } from './structs/Item.js';
522
+ import { ContentJSON } from './structs/Item.js';
523
+ import { ContentFormat } from './structs/Item.js';
524
+ import { ContentEmbed } from './structs/Item.js';
525
+ import { ContentDoc } from './structs/Item.js';
526
+ import { ContentAny } from './structs/Item.js';
527
+ import { ContentBinary } from './structs/Item.js';
528
+ import { ContentDeleted } from './structs/Item.js';
498
529
  //# sourceMappingURL=ytype.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ytype.d.ts","sourceRoot":"","sources":["../../src/ytype.js"],"names":[],"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AAa;4BAiBzB,mBAAmB;8BAAnB,mBAAmB;4BAAnB,mBAAmB;8BAAnB,mBAAmB;6BAAnB,mBAAmB;2BAAnB,mBAAmB;2BAAnB,mBAAmB;8BAAnB,mBAAmB;+BAAnB,mBAAmB"}
package/global.d.ts ADDED
@@ -0,0 +1,53 @@
1
+ declare type GC = import('./src/structs/GC.js').GC
2
+ declare type Item = import('./src/structs/Item.js').Item
3
+ declare type Skip = import('./src/structs/Skip.js').Skip
4
+ declare type IdRange = import('./src/utils/ids.js').IdRange
5
+ declare type IdSet = import('./src/utils/ids.js').IdSet
6
+ declare type IdMap<Attrs> = import('./src/utils/ids.js').IdMap<Attrs>
7
+ declare type AttrRanges<Attrs = any> = import('./src/utils/ids.js').AttrRanges<Attrs>
8
+ declare type AttrRange<Attrs = any> = import('./src/utils/ids.js').AttrRange<Attrs>
9
+ declare type ContentAttribute<V=any> = import('./src/utils/ids.js').ContentAttribute<V>
10
+ declare type ContentIds = import('./src/utils/ids.js').ContentIds
11
+ declare type ContentMap= import('./src/utils/ids.js').ContentMap
12
+
13
+
14
+ declare type BlockSet = import('./src/utils/BlockSet.js').BlockSet
15
+ declare type UpdateDecoderV1 = import('./src/utils/UpdateDecoder.js').UpdateDecoderV1
16
+ declare type UpdateDecoderV2 = import('./src/utils/UpdateDecoder.js').UpdateDecoderV2
17
+ declare type UpdateEncoderV1 = import('./src/utils/UpdateEncoder.js').UpdateEncoderV1
18
+ declare type UpdateEncoderV2 = import('./src/utils/UpdateEncoder.js').UpdateEncoderV2
19
+ declare type IdSetEncoderV1 = import('./src/utils/UpdateEncoder.js').IdSetEncoderV1
20
+ declare type IdSetEncoderV2 = import('./src/utils/UpdateEncoder.js').IdSetEncoderV2
21
+ declare type IdSetDecoderV1 = import('./src/utils/UpdateDecoder.js').IdSetDecoderV1
22
+ declare type IdSetDecoderV2 = import('./src/utils/UpdateDecoder.js').IdSetDecoderV2
23
+
24
+ declare type ID = import('./src/utils/ID.js').ID
25
+ declare type Transaction = import('./src/utils/Transaction.js').Transaction
26
+ declare type StructStore = import('./src/utils/StructStore.js').StructStore
27
+ declare type Doc = import('./src/utils/Doc.js').Doc
28
+ declare type YType<DConf extends import('lib0/delta').DeltaConf = any> = import('./src/ytype.js').YType<DConf>
29
+ declare type YEvent<DConf extends import('lib0/delta').DeltaConf> = import('./src/utils/YEvent.js').YEvent<DConf>
30
+ declare type EventHandler<ARG1=any,ARG2=any> = import('./src/utils/EventHandler.js').EventHandler<ARG1, ARG2>
31
+
32
+ declare type AbstractStruct = import('./src/structs/AbstractStruct.js').AbstractStruct
33
+ declare type AbstractContent = import('./src/structs/Item.js').AbstractContent
34
+ declare type ContentType = import('./src/structs/Item.js').ContentType
35
+ declare type ContentAny = import('./src/structs/Item.js').ContentAny
36
+ declare type ContentDoc = import('./src/structs/Item.js').ContentDoc
37
+ declare type ContentJSON = import('./src/structs/Item.js').ContentJSON
38
+ declare type ContentEmbed = import('./src/structs/Item.js').ContentEmbed
39
+ declare type ContentFormat = import('./src/structs/Item.js').ContentFormat
40
+ declare type ContentDeleted = import('./src/structs/Item.js').ContentDeleted
41
+ declare type ContentString = import('./src/structs/Item.js').ContentString
42
+
43
+ declare type DeltaConf = import('lib0/delta').DeltaConf
44
+ declare type Delta<DConf extends DeltaConf> = import('lib0/delta').Delta<DConf>
45
+
46
+ // @todo the below should have a separate Y/[mod] export
47
+ declare type StackItem = import('./src/utils/UndoManager.js').StackItem
48
+ declare type UndoManager = import('./src/utils/UndoManager.js').UndoManager
49
+ declare type AbstractRenderer = import('./src/utils/renderer-helpers.js').AbstractRenderer
50
+ declare type Attribution = import('./src/utils/renderer-helpers.js').Attribution
51
+ declare type AttributedContent<T = any> = import('./src/utils/renderer-helpers.js').AttributedContent<T>
52
+
53
+ declare type Snapshot = import('./src/utils/Snapshot.js').Snapshot