forked from quic-issues/427e7578-d7bf-49c8-aee9-2dd999e25316
implemented frontend including separate message system; started to implement backend
This commit is contained in:
23
yjs-poll/node_modules/yjs/LICENSE
generated
vendored
Normal file
23
yjs-poll/node_modules/yjs/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023
|
||||
- Kevin Jahns <kevin.jahns@protonmail.com>.
|
||||
- Chair of Computer Science 5 (Databases & Information Systems), RWTH Aachen University, Germany
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
1394
yjs-poll/node_modules/yjs/README.md
generated
vendored
Normal file
1394
yjs-poll/node_modules/yjs/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
yjs-poll/node_modules/yjs/dist/src/index.d.ts
generated
vendored
Normal file
2
yjs-poll/node_modules/yjs/dist/src/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { Doc, Transaction, YArray as Array, YMap as Map, YText as Text, YXmlText as XmlText, YXmlHook as XmlHook, YXmlElement as XmlElement, YXmlFragment as XmlFragment, YXmlEvent, YMapEvent, YArrayEvent, YTextEvent, YEvent, Item, AbstractStruct, GC, Skip, ContentBinary, ContentDeleted, ContentDoc, ContentEmbed, ContentFormat, ContentJSON, ContentAny, ContentString, ContentType, AbstractType, getTypeChildren, createRelativePositionFromTypeIndex, createRelativePositionFromJSON, createAbsolutePositionFromRelativePosition, compareRelativePositions, AbsolutePosition, RelativePosition, ID, createID, compareIDs, getState, Snapshot, createSnapshot, createDeleteSet, createDeleteSetFromStructStore, cleanupYTextFormatting, snapshot, emptySnapshot, findRootTypeKey, findIndexSS, getItem, getItemCleanStart, getItemCleanEnd, typeListToArraySnapshot, typeMapGetSnapshot, typeMapGetAllSnapshot, createDocFromSnapshot, iterateDeletedStructs, applyUpdate, applyUpdateV2, readUpdate, readUpdateV2, encodeStateAsUpdate, encodeStateAsUpdateV2, encodeStateVector, UndoManager, decodeSnapshot, encodeSnapshot, decodeSnapshotV2, encodeSnapshotV2, decodeStateVector, logUpdate, logUpdateV2, decodeUpdate, decodeUpdateV2, relativePositionToJSON, isDeleted, isParentOf, equalSnapshots, PermanentUserData, tryGc, transact, AbstractConnector, logType, mergeUpdates, mergeUpdatesV2, parseUpdateMeta, parseUpdateMetaV2, encodeStateVectorFromUpdate, encodeStateVectorFromUpdateV2, encodeRelativePosition, decodeRelativePosition, diffUpdate, diffUpdateV2, convertUpdateFormatV1ToV2, convertUpdateFormatV2ToV1, obfuscateUpdate, obfuscateUpdateV2, UpdateEncoderV1, UpdateEncoderV2, UpdateDecoderV1, UpdateDecoderV2, equalDeleteSets, mergeDeleteSets, snapshotContainsUpdate } from "./internals.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/index.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":""}
|
||||
41
yjs-poll/node_modules/yjs/dist/src/internals.d.ts
generated
vendored
Normal file
41
yjs-poll/node_modules/yjs/dist/src/internals.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
export * from "./utils/AbstractConnector.js";
|
||||
export * from "./utils/DeleteSet.js";
|
||||
export * from "./utils/Doc.js";
|
||||
export * from "./utils/UpdateDecoder.js";
|
||||
export * from "./utils/UpdateEncoder.js";
|
||||
export * from "./utils/encoding.js";
|
||||
export * from "./utils/EventHandler.js";
|
||||
export * from "./utils/ID.js";
|
||||
export * from "./utils/isParentOf.js";
|
||||
export * from "./utils/logging.js";
|
||||
export * from "./utils/PermanentUserData.js";
|
||||
export * from "./utils/RelativePosition.js";
|
||||
export * from "./utils/Snapshot.js";
|
||||
export * from "./utils/StructStore.js";
|
||||
export * from "./utils/Transaction.js";
|
||||
export * from "./utils/UndoManager.js";
|
||||
export * from "./utils/updates.js";
|
||||
export * from "./utils/YEvent.js";
|
||||
export * from "./types/AbstractType.js";
|
||||
export * from "./types/YArray.js";
|
||||
export * from "./types/YMap.js";
|
||||
export * from "./types/YText.js";
|
||||
export * from "./types/YXmlFragment.js";
|
||||
export * from "./types/YXmlElement.js";
|
||||
export * from "./types/YXmlEvent.js";
|
||||
export * from "./types/YXmlHook.js";
|
||||
export * from "./types/YXmlText.js";
|
||||
export * from "./structs/AbstractStruct.js";
|
||||
export * from "./structs/GC.js";
|
||||
export * from "./structs/ContentBinary.js";
|
||||
export * from "./structs/ContentDeleted.js";
|
||||
export * from "./structs/ContentDoc.js";
|
||||
export * from "./structs/ContentEmbed.js";
|
||||
export * from "./structs/ContentFormat.js";
|
||||
export * from "./structs/ContentJSON.js";
|
||||
export * from "./structs/ContentAny.js";
|
||||
export * from "./structs/ContentString.js";
|
||||
export * from "./structs/ContentType.js";
|
||||
export * from "./structs/Item.js";
|
||||
export * from "./structs/Skip.js";
|
||||
//# sourceMappingURL=internals.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/internals.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/internals.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["../../src/internals.js"],"names":[],"mappings":""}
|
||||
37
yjs-poll/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts
generated
vendored
Normal file
37
yjs-poll/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
export class AbstractStruct {
|
||||
/**
|
||||
* @param {ID} id
|
||||
* @param {number} length
|
||||
*/
|
||||
constructor(id: ID, length: number);
|
||||
id: ID;
|
||||
length: number;
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
get deleted(): boolean;
|
||||
/**
|
||||
* Merge this struct with the item to the right.
|
||||
* This method is already assuming that `this.id.clock + this.length === this.id.clock`.
|
||||
* Also this method does *not* remove right from StructStore!
|
||||
* @param {AbstractStruct} right
|
||||
* @return {boolean} whether this merged with right
|
||||
*/
|
||||
mergeWith(right: AbstractStruct): boolean;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
|
||||
* @param {number} offset
|
||||
* @param {number} encodingRef
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number, encodingRef: number): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {number} offset
|
||||
*/
|
||||
integrate(transaction: Transaction, offset: number): void;
|
||||
}
|
||||
import { ID } from "../utils/ID.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
//# sourceMappingURL=AbstractStruct.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AbstractStruct.d.ts","sourceRoot":"","sources":["../../../src/structs/AbstractStruct.js"],"names":[],"mappings":"AAMA;IACE;;;OAGG;IACH,gBAHW,EAAE,UACF,MAAM,EAKhB;IAFC,OAAY;IACZ,eAAoB;IAGtB;;OAEG;IACH,uBAEC;IAED;;;;;;OAMG;IACH,iBAHW,cAAc,GACb,OAAO,CAIlB;IAED;;;;OAIG;IACH,eAJW,eAAe,GAAG,eAAe,UACjC,MAAM,eACN,MAAM,QAIhB;IAED;;;OAGG;IACH,uBAHW,WAAW,UACX,MAAM,QAIhB;CACF"}
|
||||
67
yjs-poll/node_modules/yjs/dist/src/structs/ContentAny.d.ts
generated
vendored
Normal file
67
yjs-poll/node_modules/yjs/dist/src/structs/ContentAny.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
export class ContentAny {
|
||||
/**
|
||||
* @param {Array<any>} arr
|
||||
*/
|
||||
constructor(arr: Array<any>);
|
||||
/**
|
||||
* @type {Array<any>}
|
||||
*/
|
||||
arr: Array<any>;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentAny}
|
||||
*/
|
||||
copy(): ContentAny;
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentAny}
|
||||
*/
|
||||
splice(offset: number): ContentAny;
|
||||
/**
|
||||
* @param {ContentAny} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: ContentAny): boolean;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentAny(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentAny;
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=ContentAny.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentAny.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentAny.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentAny.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentAny.js"],"names":[],"mappings":"AASA;IACE;;OAEG;IACH,iBAFW,MAAM,GAAG,CAAC,EAQpB;IALC;;OAEG;IACH,KAFU,MAAM,GAAG,CAAC,CAEN;IAIhB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,UAAU,CAIrB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,UAAU,CAMrB;IAED;;;OAGG;IACH,iBAHW,UAAU,GACT,OAAO,CAKlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,UAFW,WAAW,QAET;IACb;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAShB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAMM,wCAHI,eAAe,GAAG,eAAe,GAChC,UAAU,CASrB"}
|
||||
64
yjs-poll/node_modules/yjs/dist/src/structs/ContentBinary.d.ts
generated
vendored
Normal file
64
yjs-poll/node_modules/yjs/dist/src/structs/ContentBinary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
export class ContentBinary {
|
||||
/**
|
||||
* @param {Uint8Array} content
|
||||
*/
|
||||
constructor(content: Uint8Array);
|
||||
content: Uint8Array;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentBinary}
|
||||
*/
|
||||
copy(): ContentBinary;
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentBinary}
|
||||
*/
|
||||
splice(offset: number): ContentBinary;
|
||||
/**
|
||||
* @param {ContentBinary} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: ContentBinary): boolean;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentBinary(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentBinary;
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=ContentBinary.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentBinary.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentBinary.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentBinary.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentBinary.js"],"names":[],"mappings":"AAMA;IACE;;OAEG;IACH,qBAFW,UAAU,EAIpB;IADC,oBAAsB;IAGxB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,aAAa,CAIxB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,aAAa,CAIxB;IAED;;;OAGG;IACH,iBAHW,aAAa,GACZ,OAAO,CAIlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,UAFW,WAAW,QAET;IACb;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAMM,2CAHI,eAAe,GAAG,eAAe,GAChC,aAAa,CAEuD"}
|
||||
64
yjs-poll/node_modules/yjs/dist/src/structs/ContentDeleted.d.ts
generated
vendored
Normal file
64
yjs-poll/node_modules/yjs/dist/src/structs/ContentDeleted.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
export class ContentDeleted {
|
||||
/**
|
||||
* @param {number} len
|
||||
*/
|
||||
constructor(len: number);
|
||||
len: number;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentDeleted}
|
||||
*/
|
||||
copy(): ContentDeleted;
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentDeleted}
|
||||
*/
|
||||
splice(offset: number): ContentDeleted;
|
||||
/**
|
||||
* @param {ContentDeleted} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: ContentDeleted): boolean;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentDeleted(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentDeleted;
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=ContentDeleted.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentDeleted.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentDeleted.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentDeleted.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentDeleted.js"],"names":[],"mappings":"AAKA;IACE;;OAEG;IACH,iBAFW,MAAM,EAIhB;IADC,YAAc;IAGhB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,cAAc,CAIzB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,cAAc,CAMzB;IAED;;;OAGG;IACH,iBAHW,cAAc,GACb,OAAO,CAKlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAKd;IAED;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,UAFW,WAAW,QAET;IACb;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,4CAHI,eAAe,GAAG,eAAe,GAChC,cAAc,CAEwD"}
|
||||
72
yjs-poll/node_modules/yjs/dist/src/structs/ContentDoc.d.ts
generated
vendored
Normal file
72
yjs-poll/node_modules/yjs/dist/src/structs/ContentDoc.d.ts
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class ContentDoc {
|
||||
/**
|
||||
* @param {Doc} doc
|
||||
*/
|
||||
constructor(doc: Doc);
|
||||
/**
|
||||
* @type {Doc}
|
||||
*/
|
||||
doc: Doc;
|
||||
opts: any;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentDoc}
|
||||
*/
|
||||
copy(): ContentDoc;
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentDoc}
|
||||
*/
|
||||
splice(offset: number): ContentDoc;
|
||||
/**
|
||||
* @param {ContentDoc} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: ContentDoc): boolean;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentDoc(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentDoc;
|
||||
import { Doc } from "../utils/Doc.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=ContentDoc.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentDoc.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentDoc.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentDoc.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentDoc.js"],"names":[],"mappings":"AAYA;;GAEG;AACH;IACE;;OAEG;IACH,iBAFW,GAAG,EAwBb;IAlBC;;OAEG;IACH,KAFU,GAAG,CAEC;IAKd,UAAgB;IAYlB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,UAAU,CAIrB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,UAAU,CAIrB;IAED;;;OAGG;IACH,iBAHW,UAAU,GACT,OAAO,CAIlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QASd;IAED;;OAEG;IACH,oBAFW,WAAW,QAQrB;IAED;;OAEG;IACH,UAFW,WAAW,QAER;IAEd;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAKhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,wCAHI,eAAe,GAAG,eAAe,GAChC,UAAU,CAE6F"}
|
||||
67
yjs-poll/node_modules/yjs/dist/src/structs/ContentEmbed.d.ts
generated
vendored
Normal file
67
yjs-poll/node_modules/yjs/dist/src/structs/ContentEmbed.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class ContentEmbed {
|
||||
/**
|
||||
* @param {Object} embed
|
||||
*/
|
||||
constructor(embed: Object);
|
||||
embed: Object;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentEmbed}
|
||||
*/
|
||||
copy(): ContentEmbed;
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentEmbed}
|
||||
*/
|
||||
splice(offset: number): ContentEmbed;
|
||||
/**
|
||||
* @param {ContentEmbed} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: ContentEmbed): boolean;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentEmbed(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentEmbed;
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=ContentEmbed.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentEmbed.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentEmbed.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentEmbed.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentEmbed.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACE;;OAEG;IACH,mBAFW,MAAM,EAIhB;IADC,cAAkB;IAGpB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,YAAY,CAIvB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,YAAY,CAIvB;IAED;;;OAGG;IACH,iBAHW,YAAY,GACX,OAAO,CAIlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,UAFW,WAAW,QAET;IACb;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,0CAHI,eAAe,GAAG,eAAe,GAChC,YAAY,CAEuD"}
|
||||
69
yjs-poll/node_modules/yjs/dist/src/structs/ContentFormat.d.ts
generated
vendored
Normal file
69
yjs-poll/node_modules/yjs/dist/src/structs/ContentFormat.d.ts
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class ContentFormat {
|
||||
/**
|
||||
* @param {string} key
|
||||
* @param {Object} value
|
||||
*/
|
||||
constructor(key: string, value: Object);
|
||||
key: string;
|
||||
value: Object;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentFormat}
|
||||
*/
|
||||
copy(): ContentFormat;
|
||||
/**
|
||||
* @param {number} _offset
|
||||
* @return {ContentFormat}
|
||||
*/
|
||||
splice(_offset: number): ContentFormat;
|
||||
/**
|
||||
* @param {ContentFormat} _right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(_right: ContentFormat): boolean;
|
||||
/**
|
||||
* @param {Transaction} _transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(_transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentFormat(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentFormat;
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=ContentFormat.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentFormat.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentFormat.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentFormat.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentFormat.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACE;;;OAGG;IACH,iBAHW,MAAM,SACN,MAAM,EAKhB;IAFC,YAAc;IACd,cAAkB;IAGpB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,aAAa,CAIxB;IAED;;;OAGG;IACH,gBAHW,MAAM,GACL,aAAa,CAIxB;IAED;;;OAGG;IACH,kBAHW,aAAa,GACZ,OAAO,CAIlB;IAED;;;OAGG;IACH,wBAHW,WAAW,QACX,IAAI,QAOd;IAED;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,UAFW,WAAW,QAET;IACb;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAKhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAMM,2CAHI,eAAe,GAAG,eAAe,GAChC,aAAa,CAE2E"}
|
||||
70
yjs-poll/node_modules/yjs/dist/src/structs/ContentJSON.d.ts
generated
vendored
Normal file
70
yjs-poll/node_modules/yjs/dist/src/structs/ContentJSON.d.ts
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class ContentJSON {
|
||||
/**
|
||||
* @param {Array<any>} arr
|
||||
*/
|
||||
constructor(arr: Array<any>);
|
||||
/**
|
||||
* @type {Array<any>}
|
||||
*/
|
||||
arr: Array<any>;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentJSON}
|
||||
*/
|
||||
copy(): ContentJSON;
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentJSON}
|
||||
*/
|
||||
splice(offset: number): ContentJSON;
|
||||
/**
|
||||
* @param {ContentJSON} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: ContentJSON): boolean;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentJSON(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentJSON;
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=ContentJSON.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentJSON.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentJSON.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentJSON.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentJSON.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IACE;;OAEG;IACH,iBAFW,MAAM,GAAG,CAAC,EAOpB;IAJC;;OAEG;IACH,KAFU,MAAM,GAAG,CAAC,CAEN;IAGhB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,WAAW,CAItB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,WAAW,CAMtB;IAED;;;OAGG;IACH,iBAHW,WAAW,GACV,OAAO,CAKlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,UAFW,WAAW,QAET;IACb;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAShB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,yCAHI,eAAe,GAAG,eAAe,GAChC,WAAW,CActB"}
|
||||
70
yjs-poll/node_modules/yjs/dist/src/structs/ContentString.d.ts
generated
vendored
Normal file
70
yjs-poll/node_modules/yjs/dist/src/structs/ContentString.d.ts
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class ContentString {
|
||||
/**
|
||||
* @param {string} str
|
||||
*/
|
||||
constructor(str: string);
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
str: string;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentString}
|
||||
*/
|
||||
copy(): ContentString;
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentString}
|
||||
*/
|
||||
splice(offset: number): ContentString;
|
||||
/**
|
||||
* @param {ContentString} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: ContentString): boolean;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentString(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentString;
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=ContentString.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentString.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentString.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentString.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentString.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IACE;;OAEG;IACH,iBAFW,MAAM,EAOhB;IAJC;;OAEG;IACH,KAFU,MAAM,CAEF;IAGhB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,aAAa,CAIxB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,aAAa,CAiBxB;IAED;;;OAGG;IACH,iBAHW,aAAa,GACZ,OAAO,CAKlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAEiB;IAChC;;OAEG;IACH,oBAFW,WAAW,QAEC;IACvB;;OAEG;IACH,UAFW,WAAW,QAET;IACb;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,2CAHI,eAAe,GAAG,eAAe,GAChC,aAAa,CAE0D"}
|
||||
83
yjs-poll/node_modules/yjs/dist/src/structs/ContentType.d.ts
generated
vendored
Normal file
83
yjs-poll/node_modules/yjs/dist/src/structs/ContentType.d.ts
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* @type {Array<function(UpdateDecoderV1 | UpdateDecoderV2):AbstractType<any>>}
|
||||
* @private
|
||||
*/
|
||||
export const typeRefs: Array<(arg0: UpdateDecoderV1 | UpdateDecoderV2) => AbstractType<any>>;
|
||||
export const YArrayRefID: 0;
|
||||
export const YMapRefID: 1;
|
||||
export const YTextRefID: 2;
|
||||
export const YXmlElementRefID: 3;
|
||||
export const YXmlFragmentRefID: 4;
|
||||
export const YXmlHookRefID: 5;
|
||||
export const YXmlTextRefID: 6;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class ContentType {
|
||||
/**
|
||||
* @param {AbstractType<any>} type
|
||||
*/
|
||||
constructor(type: AbstractType<any>);
|
||||
/**
|
||||
* @type {AbstractType<any>}
|
||||
*/
|
||||
type: AbstractType<any>;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {ContentType}
|
||||
*/
|
||||
copy(): ContentType;
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentType}
|
||||
*/
|
||||
splice(offset: number): ContentType;
|
||||
/**
|
||||
* @param {ContentType} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: ContentType): boolean;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate(transaction: Transaction, item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc(store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
export function readContentType(decoder: UpdateDecoderV1 | UpdateDecoderV2): ContentType;
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Item } from "./Item.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
//# sourceMappingURL=ContentType.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentType.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/ContentType.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentType.d.ts","sourceRoot":"","sources":["../../../src/structs/ContentType.js"],"names":[],"mappings":"AAaA;;;GAGG;AACH,uBAHU,aAAe,eAAe,GAAG,eAAe,KAAE,aAAa,GAAG,CAAC,CAAC,CAW7E;AAED,4BAA4B;AAC5B,0BAA0B;AAC1B,2BAA2B;AAC3B,iCAAiC;AACjC,kCAAkC;AAClC,8BAA8B;AAC9B,8BAA8B;AAE9B;;GAEG;AACH;IACE;;OAEG;IACH,kBAFW,aAAa,GAAG,CAAC,EAO3B;IAJC;;OAEG;IACH,MAFU,aAAa,GAAG,CAAC,CAEX;IAGlB;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,WAAW,CAItB;IAED;;;OAGG;IACH,eAHW,MAAM,GACL,WAAW,CAItB;IAED;;;OAGG;IACH,iBAHW,WAAW,GACV,OAAO,CAIlB;IAED;;;OAGG;IACH,uBAHW,WAAW,QACX,IAAI,QAId;IAED;;OAEG;IACH,oBAFW,WAAW,QAyBrB;IAED;;OAEG;IACH,UAFW,WAAW,QAgBrB;IAED;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF;AAQM,yCAHI,eAAe,GAAG,eAAe,GAChC,WAAW,CAE4E"}
|
||||
29
yjs-poll/node_modules/yjs/dist/src/structs/GC.d.ts
generated
vendored
Normal file
29
yjs-poll/node_modules/yjs/dist/src/structs/GC.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
export const structGCRefNumber: 0;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class GC extends AbstractStruct {
|
||||
delete(): void;
|
||||
/**
|
||||
* @param {GC} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: GC): boolean;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {StructStore} store
|
||||
* @return {null | number}
|
||||
*/
|
||||
getMissing(transaction: Transaction, store: StructStore): null | number;
|
||||
}
|
||||
import { AbstractStruct } from "./AbstractStruct.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
//# sourceMappingURL=GC.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/GC.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/GC.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"GC.d.ts","sourceRoot":"","sources":["../../../src/structs/GC.js"],"names":[],"mappings":"AAMA,kCAAkC;AAElC;;GAEG;AACH;IAKE,eAAY;IAEZ;;;OAGG;IACH,iBAHW,EAAE,GACD,OAAO,CAQlB;IAcD;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAKhB;IAED;;;;OAIG;IACH,wBAJW,WAAW,SACX,WAAW,GACV,IAAI,GAAG,MAAM,CAIxB;CACF"}
|
||||
218
yjs-poll/node_modules/yjs/dist/src/structs/Item.d.ts
generated
vendored
Normal file
218
yjs-poll/node_modules/yjs/dist/src/structs/Item.d.ts
generated
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
export function followRedone(store: StructStore, id: ID): {
|
||||
item: Item;
|
||||
diff: number;
|
||||
};
|
||||
export function keepItem(item: Item | null, keep: boolean): void;
|
||||
export function splitItem(transaction: Transaction, leftItem: Item, diff: number): Item;
|
||||
export function redoItem(transaction: Transaction, item: Item, redoitems: Set<Item>, itemsToDelete: DeleteSet, ignoreRemoteMapChanges: boolean, um: import('../utils/UndoManager.js').UndoManager): Item | null;
|
||||
/**
|
||||
* Abstract class that represents any content.
|
||||
*/
|
||||
export class Item extends AbstractStruct {
|
||||
/**
|
||||
* @param {ID} id
|
||||
* @param {Item | null} left
|
||||
* @param {ID | null} origin
|
||||
* @param {Item | null} right
|
||||
* @param {ID | null} rightOrigin
|
||||
* @param {AbstractType<any>|ID|null} parent Is a type if integrated, is null if it is possible to copy parent from left or right, is ID before integration to search for it.
|
||||
* @param {string | null} parentSub
|
||||
* @param {AbstractContent} content
|
||||
*/
|
||||
constructor(id: ID, left: Item | null, origin: ID | null, right: Item | null, rightOrigin: ID | null, parent: AbstractType<any> | ID | null, parentSub: string | null, content: AbstractContent);
|
||||
/**
|
||||
* The item that was originally to the left of this item.
|
||||
* @type {ID | null}
|
||||
*/
|
||||
origin: ID | null;
|
||||
/**
|
||||
* The item that is currently to the left of this item.
|
||||
* @type {Item | null}
|
||||
*/
|
||||
left: Item | null;
|
||||
/**
|
||||
* The item that is currently to the right of this item.
|
||||
* @type {Item | null}
|
||||
*/
|
||||
right: Item | null;
|
||||
/**
|
||||
* The item that was originally to the right of this item.
|
||||
* @type {ID | null}
|
||||
*/
|
||||
rightOrigin: ID | null;
|
||||
/**
|
||||
* @type {AbstractType<any>|ID|null}
|
||||
*/
|
||||
parent: AbstractType<any> | ID | null;
|
||||
/**
|
||||
* If the parent refers to this item with some kind of key (e.g. YMap, the
|
||||
* key is specified here. The key is then used to refer to the list in which
|
||||
* to insert this item. If `parentSub = null` type._start is the list in
|
||||
* which to insert to. Otherwise it is `parent._map`.
|
||||
* @type {String | null}
|
||||
*/
|
||||
parentSub: string | null;
|
||||
/**
|
||||
* If this type's effect is redone this type refers to the type that undid
|
||||
* this operation.
|
||||
* @type {ID | null}
|
||||
*/
|
||||
redone: ID | null;
|
||||
/**
|
||||
* @type {AbstractContent}
|
||||
*/
|
||||
content: AbstractContent;
|
||||
/**
|
||||
* bit1: keep
|
||||
* bit2: countable
|
||||
* bit3: deleted
|
||||
* bit4: mark - mark node as fast-search-marker
|
||||
* @type {number} byte
|
||||
*/
|
||||
info: number;
|
||||
/**
|
||||
* This is used to mark the item as an indexed fast-search marker
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
set marker(arg: boolean);
|
||||
get marker(): boolean;
|
||||
set keep(arg: boolean);
|
||||
/**
|
||||
* If true, do not garbage collect this Item.
|
||||
*/
|
||||
get keep(): boolean;
|
||||
get countable(): boolean;
|
||||
set deleted(arg: boolean);
|
||||
/**
|
||||
* Whether this item was deleted or not.
|
||||
* @type {Boolean}
|
||||
*/
|
||||
get deleted(): boolean;
|
||||
markDeleted(): void;
|
||||
/**
|
||||
* Return the creator clientID of the missing op or define missing items and return null.
|
||||
*
|
||||
* @param {Transaction} transaction
|
||||
* @param {StructStore} store
|
||||
* @return {null | number}
|
||||
*/
|
||||
getMissing(transaction: Transaction, store: StructStore): null | number;
|
||||
/**
|
||||
* Returns the next non-deleted item
|
||||
*/
|
||||
get next(): Item | null;
|
||||
/**
|
||||
* Returns the previous non-deleted item
|
||||
*/
|
||||
get prev(): Item | null;
|
||||
/**
|
||||
* Computes the last content address of this Item.
|
||||
*/
|
||||
get lastId(): ID;
|
||||
/**
|
||||
* Try to merge two items
|
||||
*
|
||||
* @param {Item} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: Item): boolean;
|
||||
/**
|
||||
* Mark this Item as deleted.
|
||||
*
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete(transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
* @param {boolean} parentGCd
|
||||
*/
|
||||
gc(store: StructStore, parentGCd: boolean): void;
|
||||
/**
|
||||
* Transform the properties of this type to binary and write it to an
|
||||
* BinaryEncoder.
|
||||
*
|
||||
* This is called when this Item is sent to a remote peer.
|
||||
*
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
}
|
||||
export function readItemContent(decoder: UpdateDecoderV1 | UpdateDecoderV2, info: number): AbstractContent;
|
||||
/**
|
||||
* A lookup map for reading Item content.
|
||||
*
|
||||
* @type {Array<function(UpdateDecoderV1 | UpdateDecoderV2):AbstractContent>}
|
||||
*/
|
||||
export const contentRefs: Array<(arg0: UpdateDecoderV1 | UpdateDecoderV2) => AbstractContent>;
|
||||
/**
|
||||
* Do not implement this class!
|
||||
*/
|
||||
export class AbstractContent {
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength(): number;
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent(): Array<any>;
|
||||
/**
|
||||
* Should return false if this Item is some kind of meta information
|
||||
* (e.g. format information).
|
||||
*
|
||||
* * Whether this Item should be addressable via `yarray.get(i)`
|
||||
* * Whether this Item should be counted when computing yarray.length
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable(): boolean;
|
||||
/**
|
||||
* @return {AbstractContent}
|
||||
*/
|
||||
copy(): AbstractContent;
|
||||
/**
|
||||
* @param {number} _offset
|
||||
* @return {AbstractContent}
|
||||
*/
|
||||
splice(_offset: number): AbstractContent;
|
||||
/**
|
||||
* @param {AbstractContent} _right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(_right: AbstractContent): boolean;
|
||||
/**
|
||||
* @param {Transaction} _transaction
|
||||
* @param {Item} _item
|
||||
*/
|
||||
integrate(_transaction: Transaction, _item: Item): void;
|
||||
/**
|
||||
* @param {Transaction} _transaction
|
||||
*/
|
||||
delete(_transaction: Transaction): void;
|
||||
/**
|
||||
* @param {StructStore} _store
|
||||
*/
|
||||
gc(_store: StructStore): void;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} _encoder
|
||||
* @param {number} _offset
|
||||
*/
|
||||
write(_encoder: UpdateEncoderV1 | UpdateEncoderV2, _offset: number): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef(): number;
|
||||
}
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
import { ID } from "../utils/ID.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { DeleteSet } from "../utils/DeleteSet.js";
|
||||
import { AbstractStruct } from "./AbstractStruct.js";
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=Item.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/Item.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/Item.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../src/structs/Item.js"],"names":[],"mappings":"AAsCO,oCAJI,WAAW,MACX,EAAE;UACK,IAAI;UAAO,MAAM;EAoBlC;AAWM,+BAHI,IAAI,GAAC,IAAI,QACT,OAAO,QAOjB;AAYM,uCARI,WAAW,YACX,IAAI,QACJ,MAAM,GACL,IAAI,CAyCf;AAsBM,sCAXI,WAAW,QACX,IAAI,aACJ,IAAI,IAAI,CAAC,iBACT,SAAS,0BACT,OAAO,MACP,OAAO,yBAAyB,EAAE,WAAW,GAE5C,IAAI,GAAC,IAAI,CAsGpB;AAED;;GAEG;AACH;IACE;;;;;;;;;OASG;IACH,gBATW,EAAE,QACF,IAAI,GAAG,IAAI,UACX,EAAE,GAAG,IAAI,SACT,IAAI,GAAG,IAAI,eACX,EAAE,GAAG,IAAI,UACT,aAAa,GAAG,CAAC,GAAC,EAAE,GAAC,IAAI,aACzB,MAAM,GAAG,IAAI,WACb,eAAe,EAsDzB;IAlDC;;;OAGG;IACH,QAFU,EAAE,GAAG,IAAI,CAEC;IACpB;;;OAGG;IACH,MAFU,IAAI,GAAG,IAAI,CAEL;IAChB;;;OAGG;IACH,OAFU,IAAI,GAAG,IAAI,CAEH;IAClB;;;OAGG;IACH,aAFU,EAAE,GAAG,IAAI,CAEW;IAC9B;;OAEG;IACH,QAFU,aAAa,GAAG,CAAC,GAAC,EAAE,GAAC,IAAI,CAEf;IACpB;;;;;;OAMG;IACH,WAFU,SAAS,IAAI,CAEG;IAC1B;;;;OAIG;IACH,QAFU,EAAE,GAAG,IAAI,CAED;IAClB;;OAEG;IACH,SAFU,eAAe,CAEH;IACtB;;;;;;OAMG;IACH,MAFU,MAAM,CAEwC;IAG1D;;;;OAIG;IACH,yBAIC;IAED,sBAEC;IASD,uBAIC;IAXD;;OAEG;IACH,oBAEC;IAQD,yBAEC;IAUD,0BAIC;IAZD;;;OAGG;IACH,uBAEC;IAQD,oBAEC;IAED;;;;;;OAMG;IACH,wBAJW,WAAW,SACX,WAAW,GACV,IAAI,GAAG,MAAM,CA2CxB;IA0HD;;OAEG;IACH,wBAMC;IAED;;OAEG;IACH,wBAMC;IAED;;OAEG;IACH,iBAGC;IAED;;;;;OAKG;IACH,iBAHW,IAAI,GACH,OAAO,CAwClB;IAED;;;;OAIG;IACH,oBAFW,WAAW,QAcrB;IAED;;;OAGG;IACH,UAHW,WAAW,aACX,OAAO,QAYjB;IAED;;;;;;;;OAQG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QA6ChB;CACF;AAMM,yCAHI,eAAe,GAAG,eAAe,QACjC,MAAM,mBAE0E;AAE3F;;;;GAIG;AACH,0BAFU,aAAe,eAAe,GAAG,eAAe,KAAE,eAAe,CAAC,CAc3E;AAED;;GAEG;AACH;IACE;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;;;;;;;OAQG;IACH,eAFY,OAAO,CAIlB;IAED;;OAEG;IACH,QAFY,eAAe,CAI1B;IAED;;;OAGG;IACH,gBAHW,MAAM,GACL,eAAe,CAI1B;IAED;;;OAGG;IACH,kBAHW,eAAe,GACd,OAAO,CAIlB;IAED;;;OAGG;IACH,wBAHW,WAAW,SACX,IAAI,QAId;IAED;;OAEG;IACH,qBAFW,WAAW,QAIrB;IAED;;OAEG;IACH,WAFW,WAAW,QAIrB;IAED;;;OAGG;IACH,gBAHW,eAAe,GAAG,eAAe,WACjC,MAAM,QAIhB;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;CACF"}
|
||||
29
yjs-poll/node_modules/yjs/dist/src/structs/Skip.d.ts
generated
vendored
Normal file
29
yjs-poll/node_modules/yjs/dist/src/structs/Skip.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
export const structSkipRefNumber: 10;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class Skip extends AbstractStruct {
|
||||
delete(): void;
|
||||
/**
|
||||
* @param {Skip} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith(right: Skip): boolean;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write(encoder: UpdateEncoderV1 | UpdateEncoderV2, offset: number): void;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {StructStore} store
|
||||
* @return {null | number}
|
||||
*/
|
||||
getMissing(transaction: Transaction, store: StructStore): null | number;
|
||||
}
|
||||
import { AbstractStruct } from "./AbstractStruct.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { StructStore } from "../utils/StructStore.js";
|
||||
//# sourceMappingURL=Skip.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/structs/Skip.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/structs/Skip.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Skip.d.ts","sourceRoot":"","sources":["../../../src/structs/Skip.js"],"names":[],"mappings":"AAOA,qCAAqC;AAErC;;GAEG;AACH;IAKE,eAAY;IAEZ;;;OAGG;IACH,iBAHW,IAAI,GACH,OAAO,CAQlB;IAWD;;;OAGG;IACH,eAHW,eAAe,GAAG,eAAe,UACjC,MAAM,QAMhB;IAED;;;;OAIG;IACH,wBAJW,WAAW,SACX,WAAW,GACV,IAAI,GAAG,MAAM,CAIxB;CACF"}
|
||||
173
yjs-poll/node_modules/yjs/dist/src/types/AbstractType.d.ts
generated
vendored
Normal file
173
yjs-poll/node_modules/yjs/dist/src/types/AbstractType.d.ts
generated
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
export function warnPrematureAccess(): void;
|
||||
export class ArraySearchMarker {
|
||||
/**
|
||||
* @param {Item} p
|
||||
* @param {number} index
|
||||
*/
|
||||
constructor(p: Item, index: number);
|
||||
p: Item;
|
||||
index: number;
|
||||
timestamp: number;
|
||||
}
|
||||
export function findMarker(yarray: AbstractType<any>, index: number): ArraySearchMarker | null;
|
||||
export function updateMarkerChanges(searchMarker: Array<ArraySearchMarker>, index: number, len: number): void;
|
||||
export function getTypeChildren(t: AbstractType<any>): Array<Item>;
|
||||
export function callTypeObservers<EventType>(type: AbstractType<EventType>, transaction: Transaction, event: EventType): void;
|
||||
/**
|
||||
* @template EventType
|
||||
* Abstract Yjs Type class
|
||||
*/
|
||||
export class AbstractType<EventType> {
|
||||
/**
|
||||
* @type {Item|null}
|
||||
*/
|
||||
_item: Item | null;
|
||||
/**
|
||||
* @type {Map<string,Item>}
|
||||
*/
|
||||
_map: Map<string, Item>;
|
||||
/**
|
||||
* @type {Item|null}
|
||||
*/
|
||||
_start: Item | null;
|
||||
/**
|
||||
* @type {Doc|null}
|
||||
*/
|
||||
doc: Doc | null;
|
||||
_length: number;
|
||||
/**
|
||||
* Event handlers
|
||||
* @type {EventHandler<EventType,Transaction>}
|
||||
*/
|
||||
_eH: EventHandler<EventType, Transaction>;
|
||||
/**
|
||||
* Deep event handlers
|
||||
* @type {EventHandler<Array<YEvent<any>>,Transaction>}
|
||||
*/
|
||||
_dEH: EventHandler<Array<YEvent<any>>, Transaction>;
|
||||
/**
|
||||
* @type {null | Array<ArraySearchMarker>}
|
||||
*/
|
||||
_searchMarker: null | Array<ArraySearchMarker>;
|
||||
/**
|
||||
* @return {AbstractType<any>|null}
|
||||
*/
|
||||
get parent(): AbstractType<any> | null;
|
||||
/**
|
||||
* Integrate this type into the Yjs instance.
|
||||
*
|
||||
* * Save this struct in the os
|
||||
* * This type is sent to other client
|
||||
* * Observer functions are fired
|
||||
*
|
||||
* @param {Doc} y The Yjs instance
|
||||
* @param {Item|null} item
|
||||
*/
|
||||
_integrate(y: Doc, item: Item | null): void;
|
||||
/**
|
||||
* @return {AbstractType<EventType>}
|
||||
*/
|
||||
_copy(): AbstractType<EventType>;
|
||||
/**
|
||||
* Makes a copy of this data type that can be included somewhere else.
|
||||
*
|
||||
* Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
|
||||
*
|
||||
* @return {AbstractType<EventType>}
|
||||
*/
|
||||
clone(): AbstractType<EventType>;
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} _encoder
|
||||
*/
|
||||
_write(_encoder: UpdateEncoderV1 | UpdateEncoderV2): void;
|
||||
/**
|
||||
* The first non-deleted item
|
||||
*/
|
||||
get _first(): Item | null;
|
||||
/**
|
||||
* Creates YEvent and calls all type observers.
|
||||
* Must be implemented by each type.
|
||||
*
|
||||
* @param {Transaction} transaction
|
||||
* @param {Set<null|string>} _parentSubs Keys changed on this type. `null` if list was modified.
|
||||
*/
|
||||
_callObserver(transaction: Transaction, _parentSubs: Set<null | string>): void;
|
||||
/**
|
||||
* Observe all events that are created on this type.
|
||||
*
|
||||
* @param {function(EventType, Transaction):void} f Observer function
|
||||
*/
|
||||
observe(f: (arg0: EventType, arg1: Transaction) => void): void;
|
||||
/**
|
||||
* Observe all events that are created by this type and its children.
|
||||
*
|
||||
* @param {function(Array<YEvent<any>>,Transaction):void} f Observer function
|
||||
*/
|
||||
observeDeep(f: (arg0: Array<YEvent<any>>, arg1: Transaction) => void): void;
|
||||
/**
|
||||
* Unregister an observer function.
|
||||
*
|
||||
* @param {function(EventType,Transaction):void} f Observer function
|
||||
*/
|
||||
unobserve(f: (arg0: EventType, arg1: Transaction) => void): void;
|
||||
/**
|
||||
* Unregister an observer function.
|
||||
*
|
||||
* @param {function(Array<YEvent<any>>,Transaction):void} f Observer function
|
||||
*/
|
||||
unobserveDeep(f: (arg0: Array<YEvent<any>>, arg1: Transaction) => void): void;
|
||||
/**
|
||||
* @abstract
|
||||
* @return {any}
|
||||
*/
|
||||
toJSON(): any;
|
||||
}
|
||||
export function typeListSlice(type: AbstractType<any>, start: number, end: number): Array<any>;
|
||||
export function typeListToArray(type: AbstractType<any>): Array<any>;
|
||||
export function typeListToArraySnapshot(type: AbstractType<any>, snapshot: Snapshot): Array<any>;
|
||||
export function typeListForEach(type: AbstractType<any>, f: (arg0: any, arg1: number, arg2: any) => void): void;
|
||||
export function typeListMap<C, R>(type: AbstractType<any>, f: (arg0: C, arg1: number, arg2: AbstractType<any>) => R): R[];
|
||||
export function typeListCreateIterator(type: AbstractType<any>): IterableIterator<any>;
|
||||
export function typeListForEachSnapshot(type: AbstractType<any>, f: (arg0: any, arg1: number, arg2: AbstractType<any>) => void, snapshot: Snapshot): void;
|
||||
export function typeListGet(type: AbstractType<any>, index: number): any;
|
||||
export function typeListInsertGenericsAfter(transaction: Transaction, parent: AbstractType<any>, referenceItem: Item | null, content: Array<{
|
||||
[x: string]: any;
|
||||
} | Array<any> | boolean | number | null | string | Uint8Array>): void;
|
||||
export function typeListInsertGenerics(transaction: Transaction, parent: AbstractType<any>, index: number, content: Array<{
|
||||
[x: string]: any;
|
||||
} | Array<any> | number | null | string | Uint8Array>): void;
|
||||
export function typeListPushGenerics(transaction: Transaction, parent: AbstractType<any>, content: Array<{
|
||||
[x: string]: any;
|
||||
} | Array<any> | number | null | string | Uint8Array>): void;
|
||||
export function typeListDelete(transaction: Transaction, parent: AbstractType<any>, index: number, length: number): void;
|
||||
export function typeMapDelete(transaction: Transaction, parent: AbstractType<any>, key: string): void;
|
||||
export function typeMapSet(transaction: Transaction, parent: AbstractType<any>, key: string, value: Object | number | null | Array<any> | string | Uint8Array | AbstractType<any>): void;
|
||||
export function typeMapGet(parent: AbstractType<any>, key: string): {
|
||||
[x: string]: any;
|
||||
} | number | null | Array<any> | string | Uint8Array | AbstractType<any> | undefined;
|
||||
export function typeMapGetAll(parent: AbstractType<any>): {
|
||||
[x: string]: {
|
||||
[x: string]: any;
|
||||
} | number | null | Array<any> | string | Uint8Array | AbstractType<any> | undefined;
|
||||
};
|
||||
export function typeMapHas(parent: AbstractType<any>, key: string): boolean;
|
||||
export function typeMapGetSnapshot(parent: AbstractType<any>, key: string, snapshot: Snapshot): {
|
||||
[x: string]: any;
|
||||
} | number | null | Array<any> | string | Uint8Array | AbstractType<any> | undefined;
|
||||
export function typeMapGetAllSnapshot(parent: AbstractType<any>, snapshot: Snapshot): {
|
||||
[x: string]: {
|
||||
[x: string]: any;
|
||||
} | number | null | Array<any> | string | Uint8Array | AbstractType<any> | undefined;
|
||||
};
|
||||
export function createMapIterator(type: AbstractType<any> & {
|
||||
_map: Map<string, Item>;
|
||||
}): IterableIterator<Array<any>>;
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { Doc } from "../utils/Doc.js";
|
||||
import { EventHandler } from "../utils/EventHandler.js";
|
||||
import { YEvent } from "../utils/YEvent.js";
|
||||
import { UpdateEncoderV1 } from "../utils/UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "../utils/UpdateEncoder.js";
|
||||
import { Snapshot } from "../utils/Snapshot.js";
|
||||
//# sourceMappingURL=AbstractType.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/AbstractType.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/AbstractType.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AbstractType.d.ts","sourceRoot":"","sources":["../../../src/types/AbstractType.js"],"names":[],"mappings":"AAwBO,4CAAiH;AAaxH;IACE;;;OAGG;IACH,eAHW,IAAI,SACJ,MAAM,EAOhB;IAHC,QAAU;IACV,cAAkB;IAClB,kBAA8C;CAEjD;AAqDM,mCAHI,aAAa,GAAG,CAAC,SACjB,MAAM,4BAyEhB;AAWM,kDAJI,MAAM,iBAAiB,CAAC,SACxB,MAAM,OACN,MAAM,QAiChB;AAQM,mCAHI,aAAa,GAAG,CAAC,GAChB,MAAM,IAAI,CAAC,CAWtB;AAWM,yFAHI,WAAW,0BAerB;AAED;;;GAGG;AACH;IAEI;;OAEG;IACH,OAFU,IAAI,GAAC,IAAI,CAEF;IACjB;;OAEG;IACH,MAFU,IAAI,MAAM,EAAC,IAAI,CAAC,CAEL;IACrB;;OAEG;IACH,QAFU,IAAI,GAAC,IAAI,CAED;IAClB;;OAEG;IACH,KAFU,GAAG,GAAC,IAAI,CAEH;IACf,gBAAgB;IAChB;;;OAGG;IACH,KAFU,aAAa,SAAS,EAAC,WAAW,CAAC,CAEd;IAC/B;;;OAGG;IACH,MAFU,aAAa,MAAM,OAAO,GAAG,CAAC,CAAC,EAAC,WAAW,CAAC,CAEtB;IAChC;;OAEG;IACH,eAFU,IAAI,GAAG,MAAM,iBAAiB,CAAC,CAEhB;IAG3B;;OAEG;IACH,uCAEC;IAED;;;;;;;;;OASG;IACH,cAHW,GAAG,QACH,IAAI,GAAC,IAAI,QAKnB;IAED;;OAEG;IACH,SAFY,aAAa,SAAS,CAAC,CAIlC;IAED;;;;;;OAMG;IACH,SAFY,aAAa,SAAS,CAAC,CAIlC;IAED;;OAEG;IACH,iBAFW,eAAe,GAAG,eAAe,QAEvB;IAErB;;OAEG;IACH,0BAMC;IAED;;;;;;OAMG;IACH,2BAHW,WAAW,eACX,IAAI,IAAI,GAAC,MAAM,CAAC,QAM1B;IAED;;;;OAIG;IACH,kBAFoB,SAAS,QAAE,WAAW,KAAE,IAAI,QAI/C;IAED;;;;OAIG;IACH,sBAFoB,MAAM,OAAO,GAAG,CAAC,CAAC,QAAC,WAAW,KAAE,IAAI,QAIvD;IAED;;;;OAIG;IACH,oBAFoB,SAAS,QAAC,WAAW,KAAE,IAAI,QAI9C;IAED;;;;OAIG;IACH,wBAFoB,MAAM,OAAO,GAAG,CAAC,CAAC,QAAC,WAAW,KAAE,IAAI,QAIvD;IAED;;;OAGG;IACH,UAFY,GAAG,CAEH;CACb;AAWM,oCARI,aAAa,GAAG,CAAC,SACjB,MAAM,OACN,MAAM,GACL,MAAM,GAAG,CAAC,CAgCrB;AASM,sCANI,aAAa,GAAG,CAAC,GAChB,MAAM,GAAG,CAAC,CAmBrB;AAUM,8CAPI,aAAa,GAAG,CAAC,YACjB,QAAQ,GACP,MAAM,GAAG,CAAC,CAkBrB;AAWM,sCANI,aAAa,GAAG,CAAC,YACR,GAAG,QAAC,MAAM,QAAC,GAAG,KAAE,IAAI,QAkBvC;AAWM,wCAPI,aAAa,GAAG,CAAC,qBACN,MAAM,QAAC,aAAa,GAAG,CAAC,aAe7C;AASM,6CANI,aAAa,GAAG,CAAC,GAChB,iBAAiB,GAAG,CAAC,CA6ChC;AAaM,8CAPI,aAAa,GAAG,CAAC,YACR,GAAG,QAAC,MAAM,QAAC,aAAa,GAAG,CAAC,KAAE,IAAI,YAC3C,QAAQ,QAiBlB;AAUM,kCAPI,aAAa,GAAG,CAAC,SACjB,MAAM,GACL,GAAG,CAqBd;AAWM,yDARI,WAAW,UACX,aAAa,GAAG,CAAC,iBACjB,IAAI,kBACJ,MAAM;QAAO,MAAM,GAAC,GAAG;IAAE,MAAM,GAAG,CAAC,GAAC,OAAO,GAAC,MAAM,GAAC,IAAI,GAAC,MAAM,GAAC,UAAU,CAAC,QA0DpF;AAaM,oDARI,WAAW,UACX,aAAa,GAAG,CAAC,SACjB,MAAM,WACN,MAAM;QAAO,MAAM,GAAC,GAAG;IAAE,MAAM,GAAG,CAAC,GAAC,MAAM,GAAC,IAAI,GAAC,MAAM,GAAC,UAAU,CAAC,QA4C5E;AAaM,kDAPI,WAAW,UACX,aAAa,GAAG,CAAC,WACjB,MAAM;QAAO,MAAM,GAAC,GAAG;IAAE,MAAM,GAAG,CAAC,GAAC,MAAM,GAAC,IAAI,GAAC,MAAM,GAAC,UAAU,CAAC,QAe5E;AAWM,4CARI,WAAW,UACX,aAAa,GAAG,CAAC,SACjB,MAAM,UACN,MAAM,QAyChB;AAUM,2CAPI,WAAW,UACX,aAAa,GAAG,CAAC,OACjB,MAAM,QAUhB;AAWM,wCARI,WAAW,UACX,aAAa,GAAG,CAAC,OACjB,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,MAAM,GAAG,CAAC,GAAC,MAAM,GAAC,UAAU,GAAC,aAAa,GAAG,CAAC,QAsC3E;AAUM,mCAPI,aAAa,GAAG,CAAC,OACjB,MAAM,GACL;QAAO,MAAM,GAAC,GAAG;IAAE,MAAM,GAAC,IAAI,GAAC,MAAM,GAAG,CAAC,GAAC,MAAM,GAAC,UAAU,GAAC,aAAa,GAAG,CAAC,GAAC,SAAS,CASlG;AASM,sCANI,aAAa,GAAG,CAAC;QACT,MAAM,GAAC;YAAO,MAAM,GAAC,GAAG;QAAE,MAAM,GAAC,IAAI,GAAC,MAAM,GAAG,CAAC,GAAC,MAAM,GAAC,UAAU,GAAC,aAAa,GAAG,CAAC,GAAC,SAAS;EAiBhH;AAUM,mCAPI,aAAa,GAAG,CAAC,OACjB,MAAM,GACL,OAAO,CASlB;AAWM,2CARI,aAAa,GAAG,CAAC,OACjB,MAAM,YACN,QAAQ,GACP;QAAO,MAAM,GAAC,GAAG;IAAE,MAAM,GAAC,IAAI,GAAC,MAAM,GAAG,CAAC,GAAC,MAAM,GAAC,UAAU,GAAC,aAAa,GAAG,CAAC,GAAC,SAAS,CAWlG;AAUM,8CAPI,aAAa,GAAG,CAAC,YACjB,QAAQ;QACA,MAAM,GAAC;YAAO,MAAM,GAAC,GAAG;QAAE,MAAM,GAAC,IAAI,GAAC,MAAM,GAAG,CAAC,GAAC,MAAM,GAAC,UAAU,GAAC,aAAa,GAAG,CAAC,GAAC,SAAS;EAuBhH;AASM,wCANI,aAAa,GAAG,CAAC,GAAG;IAAE,IAAI,EAAE,IAAI,MAAM,EAAE,IAAI,CAAC,CAAA;CAAE,GAC9C,iBAAiB,MAAM,GAAG,CAAC,CAAC,CAQvC"}
|
||||
154
yjs-poll/node_modules/yjs/dist/src/types/YArray.d.ts
generated
vendored
Normal file
154
yjs-poll/node_modules/yjs/dist/src/types/YArray.d.ts
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
/**
|
||||
* Event that describes the changes on a YArray
|
||||
* @template T
|
||||
* @extends YEvent<YArray<T>>
|
||||
*/
|
||||
export class YArrayEvent<T> extends YEvent<YArray<T>> {
|
||||
constructor(target: YArray<T>, transaction: Transaction);
|
||||
}
|
||||
/**
|
||||
* A shared Array implementation.
|
||||
* @template T
|
||||
* @extends AbstractType<YArrayEvent<T>>
|
||||
* @implements {Iterable<T>}
|
||||
*/
|
||||
export class YArray<T> extends AbstractType<YArrayEvent<T>> implements Iterable<T> {
|
||||
/**
|
||||
* Construct a new YArray containing the specified items.
|
||||
* @template {Object<string,any>|Array<any>|number|null|string|Uint8Array} T
|
||||
* @param {Array<T>} items
|
||||
* @return {YArray<T>}
|
||||
*/
|
||||
static from<T_1 extends string | number | any[] | Uint8Array | {
|
||||
[x: string]: any;
|
||||
} | null>(items: T_1[]): YArray<T_1>;
|
||||
/**
|
||||
* @type {Array<any>?}
|
||||
* @private
|
||||
*/
|
||||
private _prelimContent;
|
||||
/**
|
||||
* @type {Array<ArraySearchMarker>}
|
||||
*/
|
||||
_searchMarker: Array<ArraySearchMarker>;
|
||||
/**
|
||||
* Integrate this type into the Yjs instance.
|
||||
*
|
||||
* * Save this struct in the os
|
||||
* * This type is sent to other client
|
||||
* * Observer functions are fired
|
||||
*
|
||||
* @param {Doc} y The Yjs instance
|
||||
* @param {Item} item
|
||||
*/
|
||||
_integrate(y: Doc, item: Item): void;
|
||||
/**
|
||||
* @return {YArray<T>}
|
||||
*/
|
||||
_copy(): YArray<T>;
|
||||
/**
|
||||
* Makes a copy of this data type that can be included somewhere else.
|
||||
*
|
||||
* Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
|
||||
*
|
||||
* @return {YArray<T>}
|
||||
*/
|
||||
clone(): YArray<T>;
|
||||
get length(): number;
|
||||
/**
|
||||
* Inserts new content at an index.
|
||||
*
|
||||
* Important: This function expects an array of content. Not just a content
|
||||
* object. The reason for this "weirdness" is that inserting several elements
|
||||
* is very efficient when it is done as a single operation.
|
||||
*
|
||||
* @example
|
||||
* // Insert character 'a' at position 0
|
||||
* yarray.insert(0, ['a'])
|
||||
* // Insert numbers 1, 2 at position 1
|
||||
* yarray.insert(1, [1, 2])
|
||||
*
|
||||
* @param {number} index The index to insert content at.
|
||||
* @param {Array<T>} content The array of content
|
||||
*/
|
||||
insert(index: number, content: Array<T>): void;
|
||||
/**
|
||||
* Appends content to this YArray.
|
||||
*
|
||||
* @param {Array<T>} content Array of content to append.
|
||||
*
|
||||
* @todo Use the following implementation in all types.
|
||||
*/
|
||||
push(content: Array<T>): void;
|
||||
/**
|
||||
* Prepends content to this YArray.
|
||||
*
|
||||
* @param {Array<T>} content Array of content to prepend.
|
||||
*/
|
||||
unshift(content: Array<T>): void;
|
||||
/**
|
||||
* Deletes elements starting from an index.
|
||||
*
|
||||
* @param {number} index Index at which to start deleting elements
|
||||
* @param {number} length The number of elements to remove. Defaults to 1.
|
||||
*/
|
||||
delete(index: number, length?: number): void;
|
||||
/**
|
||||
* Returns the i-th element from a YArray.
|
||||
*
|
||||
* @param {number} index The index of the element to return from the YArray
|
||||
* @return {T}
|
||||
*/
|
||||
get(index: number): T;
|
||||
/**
|
||||
* Transforms this YArray to a JavaScript Array.
|
||||
*
|
||||
* @return {Array<T>}
|
||||
*/
|
||||
toArray(): Array<T>;
|
||||
/**
|
||||
* Returns a portion of this YArray into a JavaScript Array selected
|
||||
* from start to end (end not included).
|
||||
*
|
||||
* @param {number} [start]
|
||||
* @param {number} [end]
|
||||
* @return {Array<T>}
|
||||
*/
|
||||
slice(start?: number | undefined, end?: number | undefined): Array<T>;
|
||||
/**
|
||||
* Transforms this Shared Type to a JSON object.
|
||||
*
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
toJSON(): Array<any>;
|
||||
/**
|
||||
* Returns an Array with the result of calling a provided function on every
|
||||
* element of this YArray.
|
||||
*
|
||||
* @template M
|
||||
* @param {function(T,number,YArray<T>):M} f Function that produces an element of the new Array
|
||||
* @return {Array<M>} A new array with each element being the result of the
|
||||
* callback function
|
||||
*/
|
||||
map<M>(f: (arg0: T, arg1: number, arg2: YArray<T>) => M): M[];
|
||||
/**
|
||||
* Executes a provided function once on every element of this YArray.
|
||||
*
|
||||
* @param {function(T,number,YArray<T>):void} f A function to execute on every element of this YArray.
|
||||
*/
|
||||
forEach(f: (arg0: T, arg1: number, arg2: YArray<T>) => void): void;
|
||||
/**
|
||||
* @return {IterableIterator<T>}
|
||||
*/
|
||||
[Symbol.iterator](): IterableIterator<T>;
|
||||
}
|
||||
export function readYArray(_decoder: UpdateDecoderV1 | UpdateDecoderV2): YArray<any>;
|
||||
import { YEvent } from "../utils/YEvent.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { AbstractType } from "./AbstractType.js";
|
||||
import { ArraySearchMarker } from "./AbstractType.js";
|
||||
import { Doc } from "../utils/Doc.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=YArray.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/YArray.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/YArray.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YArray.d.ts","sourceRoot":"","sources":["../../../src/types/YArray.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH;IATkI,yDAgDjI;CAvCyC;AAE1C;;;;;GAKG;AACH,gFAFyB,CAAC;IAgBxB;;;;;OAKG;IACH;;yCAOC;IAxBC;;;OAGG;IACH,uBAAwB;IACxB;;OAEG;IACH,eAFU,MAAM,iBAAiB,CAAC,CAEX;IAkBzB;;;;;;;;;OASG;IACH,cAHW,GAAG,QACH,IAAI,QAMd;IAED;;OAEG;IACH,SAFY,OAAO,CAAC,CAAC,CAIpB;IAED;;;;;;OAMG;IACH,SAFY,OAAO,CAAC,CAAC,CAWpB;IAED,qBAGC;IAaD;;;;;;;;;;;;;;;OAeG;IACH,cAHW,MAAM,WACN,MAAM,CAAC,CAAC,QAUlB;IAED;;;;;;OAMG;IACH,cAJW,MAAM,CAAC,CAAC,QAYlB;IAED;;;;OAIG;IACH,iBAFW,MAAM,CAAC,CAAC,QAIlB;IAED;;;;;OAKG;IACH,cAHW,MAAM,WACN,MAAM,QAUhB;IAED;;;;;OAKG;IACH,WAHW,MAAM,GACL,CAAC,CAIZ;IAED;;;;OAIG;IACH,WAFY,MAAM,CAAC,CAAC,CAInB;IAED;;;;;;;OAOG;IACH,6DAFY,MAAM,CAAC,CAAC,CAInB;IAED;;;;OAIG;IACH,UAFY,MAAM,GAAG,CAAC,CAIrB;IAED;;;;;;;;OAQG;IACH,iBAJoB,CAAC,QAAC,MAAM,QAAC,OAAO,CAAC,CAAC,aAMrC;IAED;;;;OAIG;IACH,kBAFoB,CAAC,QAAC,MAAM,QAAC,OAAO,CAAC,CAAC,KAAE,IAAI,QAI3C;IAED;;OAEG;IACH,qBAFY,iBAAiB,CAAC,CAAC,CAI9B;CAQF;AAQM,qCALI,eAAe,GAAG,eAAe,eAKM"}
|
||||
142
yjs-poll/node_modules/yjs/dist/src/types/YMap.d.ts
generated
vendored
Normal file
142
yjs-poll/node_modules/yjs/dist/src/types/YMap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
/**
|
||||
* @template T
|
||||
* @extends YEvent<YMap<T>>
|
||||
* Event that describes the changes on a YMap.
|
||||
*/
|
||||
export class YMapEvent<T> extends YEvent<YMap<T>> {
|
||||
/**
|
||||
* @param {YMap<T>} ymap The YArray that changed.
|
||||
* @param {Transaction} transaction
|
||||
* @param {Set<any>} subs The keys that changed.
|
||||
*/
|
||||
constructor(ymap: YMap<T>, transaction: Transaction, subs: Set<any>);
|
||||
keysChanged: Set<any>;
|
||||
}
|
||||
/**
|
||||
* @template MapType
|
||||
* A shared Map implementation.
|
||||
*
|
||||
* @extends AbstractType<YMapEvent<MapType>>
|
||||
* @implements {Iterable<[string, MapType]>}
|
||||
*/
|
||||
export class YMap<MapType> extends AbstractType<YMapEvent<MapType>> implements Iterable<[string, MapType]> {
|
||||
/**
|
||||
*
|
||||
* @param {Iterable<readonly [string, any]>=} entries - an optional iterable to initialize the YMap
|
||||
*/
|
||||
constructor(entries?: Iterable<readonly [string, any]> | undefined);
|
||||
/**
|
||||
* @type {Map<string,any>?}
|
||||
* @private
|
||||
*/
|
||||
private _prelimContent;
|
||||
/**
|
||||
* Integrate this type into the Yjs instance.
|
||||
*
|
||||
* * Save this struct in the os
|
||||
* * This type is sent to other client
|
||||
* * Observer functions are fired
|
||||
*
|
||||
* @param {Doc} y The Yjs instance
|
||||
* @param {Item} item
|
||||
*/
|
||||
_integrate(y: Doc, item: Item): void;
|
||||
/**
|
||||
* @return {YMap<MapType>}
|
||||
*/
|
||||
_copy(): YMap<MapType>;
|
||||
/**
|
||||
* Makes a copy of this data type that can be included somewhere else.
|
||||
*
|
||||
* Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
|
||||
*
|
||||
* @return {YMap<MapType>}
|
||||
*/
|
||||
clone(): YMap<MapType>;
|
||||
/**
|
||||
* Transforms this Shared Type to a JSON object.
|
||||
*
|
||||
* @return {Object<string,any>}
|
||||
*/
|
||||
toJSON(): {
|
||||
[x: string]: any;
|
||||
};
|
||||
/**
|
||||
* Returns the size of the YMap (count of key/value pairs)
|
||||
*
|
||||
* @return {number}
|
||||
*/
|
||||
get size(): number;
|
||||
/**
|
||||
* Returns the keys for each element in the YMap Type.
|
||||
*
|
||||
* @return {IterableIterator<string>}
|
||||
*/
|
||||
keys(): IterableIterator<string>;
|
||||
/**
|
||||
* Returns the values for each element in the YMap Type.
|
||||
*
|
||||
* @return {IterableIterator<MapType>}
|
||||
*/
|
||||
values(): IterableIterator<MapType>;
|
||||
/**
|
||||
* Returns an Iterator of [key, value] pairs
|
||||
*
|
||||
* @return {IterableIterator<[string, MapType]>}
|
||||
*/
|
||||
entries(): IterableIterator<[string, MapType]>;
|
||||
/**
|
||||
* Executes a provided function on once on every key-value pair.
|
||||
*
|
||||
* @param {function(MapType,string,YMap<MapType>):void} f A function to execute on every element of this YArray.
|
||||
*/
|
||||
forEach(f: (arg0: MapType, arg1: string, arg2: YMap<MapType>) => void): void;
|
||||
/**
|
||||
* Remove a specified element from this YMap.
|
||||
*
|
||||
* @param {string} key The key of the element to remove.
|
||||
*/
|
||||
delete(key: string): void;
|
||||
/**
|
||||
* Adds or updates an element with a specified key and value.
|
||||
* @template {MapType} VAL
|
||||
*
|
||||
* @param {string} key The key of the element to add to this YMap
|
||||
* @param {VAL} value The value of the element to add
|
||||
* @return {VAL}
|
||||
*/
|
||||
set<VAL extends MapType>(key: string, value: VAL): VAL;
|
||||
/**
|
||||
* Returns a specified element from this YMap.
|
||||
*
|
||||
* @param {string} key
|
||||
* @return {MapType|undefined}
|
||||
*/
|
||||
get(key: string): MapType | undefined;
|
||||
/**
|
||||
* Returns a boolean indicating whether the specified key exists or not.
|
||||
*
|
||||
* @param {string} key The key to test.
|
||||
* @return {boolean}
|
||||
*/
|
||||
has(key: string): boolean;
|
||||
/**
|
||||
* Removes all elements from this YMap.
|
||||
*/
|
||||
clear(): void;
|
||||
/**
|
||||
* Returns an Iterator of [key, value] pairs
|
||||
*
|
||||
* @return {IterableIterator<[string, MapType]>}
|
||||
*/
|
||||
[Symbol.iterator](): IterableIterator<[string, MapType]>;
|
||||
}
|
||||
export function readYMap(_decoder: UpdateDecoderV1 | UpdateDecoderV2): YMap<any>;
|
||||
import { YEvent } from "../utils/YEvent.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { AbstractType } from "./AbstractType.js";
|
||||
import { Doc } from "../utils/Doc.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=YMap.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/YMap.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/YMap.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YMap.d.ts","sourceRoot":"","sources":["../../../src/types/YMap.js"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH;IACE;;;;OAIG;IACH,kBAJW,KAAK,CAAC,CAAC,eACP,WAAW,QACX,IAAI,GAAG,CAAC,EAKlB;IADC,sBAAuB;CAE1B;AAED;;;;;;GAMG;AACH,wFAFyB,CAAC,MAAM,EAAE,OAAO,CAAC;IAGxC;;;OAGG;IACH,sBAFW,SAAS,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,cAe1C;IAXC;;;OAGG;IACH,uBAA0B;IAS5B;;;;;;;;;OASG;IACH,cAHW,GAAG,QACH,IAAI,QAQd;IAED;;OAEG;IACH,SAFY,KAAK,OAAO,CAAC,CAIxB;IAED;;;;;;OAMG;IACH,SAFY,KAAK,OAAO,CAAC,CAWxB;IAYD;;;;OAIG;IACH;YAFmB,MAAM,GAAC,GAAG;MAe5B;IAED;;;;OAIG;IACH,mBAEC;IAED;;;;OAIG;IACH,QAFY,iBAAiB,MAAM,CAAC,CAInC;IAED;;;;OAIG;IACH,UAFY,iBAAiB,OAAO,CAAC,CAIpC;IAED;;;;OAIG;IACH,WAFY,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAI9C;IAED;;;;OAIG;IACH,kBAFoB,OAAO,QAAC,MAAM,QAAC,KAAK,OAAO,CAAC,KAAE,IAAI,QASrD;IAWD;;;;OAIG;IACH,YAFW,MAAM,QAUhB;IAED;;;;;;;OAOG;IACH,8BAJW,MAAM,mBAahB;IAED;;;;;OAKG;IACH,SAHW,MAAM,GACL,OAAO,GAAC,SAAS,CAI5B;IAED;;;;;OAKG;IACH,SAHW,MAAM,GACL,OAAO,CAIlB;IAED;;OAEG;IACH,cAUC;IA5ED;;;;OAIG;IACH,qBAFY,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAI9C;CA6EF;AAQM,mCALI,eAAe,GAAG,eAAe,aAKE"}
|
||||
261
yjs-poll/node_modules/yjs/dist/src/types/YText.d.ts
generated
vendored
Normal file
261
yjs-poll/node_modules/yjs/dist/src/types/YText.d.ts
generated
vendored
Normal file
@@ -0,0 +1,261 @@
|
||||
export class ItemTextListPosition {
|
||||
/**
|
||||
* @param {Item|null} left
|
||||
* @param {Item|null} right
|
||||
* @param {number} index
|
||||
* @param {Map<string,any>} currentAttributes
|
||||
*/
|
||||
constructor(left: Item | null, right: Item | null, index: number, currentAttributes: Map<string, any>);
|
||||
left: Item | null;
|
||||
right: Item | null;
|
||||
index: number;
|
||||
currentAttributes: Map<string, any>;
|
||||
/**
|
||||
* Only call this if you know that this.right is defined
|
||||
*/
|
||||
forward(): void;
|
||||
}
|
||||
export function cleanupYTextFormatting(type: YText): number;
|
||||
export function cleanupYTextAfterTransaction(transaction: Transaction): void;
|
||||
/**
|
||||
* The Quill Delta format represents changes on a text document with
|
||||
* formatting information. For more information visit {@link https://quilljs.com/docs/delta/|Quill Delta}
|
||||
*
|
||||
* @example
|
||||
* {
|
||||
* ops: [
|
||||
* { insert: 'Gandalf', attributes: { bold: true } },
|
||||
* { insert: ' the ' },
|
||||
* { insert: 'Grey', attributes: { color: '#cccccc' } }
|
||||
* ]
|
||||
* }
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Attributes that can be assigned to a selection of text.
|
||||
*
|
||||
* @example
|
||||
* {
|
||||
* bold: true,
|
||||
* font-size: '40px'
|
||||
* }
|
||||
*
|
||||
* @typedef {Object} TextAttributes
|
||||
*/
|
||||
/**
|
||||
* @extends YEvent<YText>
|
||||
* Event that describes the changes on a YText type.
|
||||
*/
|
||||
export class YTextEvent extends YEvent<YText> {
|
||||
/**
|
||||
* @param {YText} ytext
|
||||
* @param {Transaction} transaction
|
||||
* @param {Set<any>} subs The keys that changed
|
||||
*/
|
||||
constructor(ytext: YText, transaction: Transaction, subs: Set<any>);
|
||||
/**
|
||||
* Whether the children changed.
|
||||
* @type {Boolean}
|
||||
* @private
|
||||
*/
|
||||
private childListChanged;
|
||||
/**
|
||||
* Set of all changed attributes.
|
||||
* @type {Set<string>}
|
||||
*/
|
||||
keysChanged: Set<string>;
|
||||
/**
|
||||
* Compute the changes in the delta format.
|
||||
* A {@link https://quilljs.com/docs/delta/|Quill Delta}) that represents the changes on the document.
|
||||
*
|
||||
* @type {Array<{insert?:string|object|AbstractType<any>, delete?:number, retain?:number, attributes?: Object<string,any>}>}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public get delta(): {
|
||||
insert?: string | object | AbstractType<any> | undefined;
|
||||
delete?: number | undefined;
|
||||
retain?: number | undefined;
|
||||
attributes?: {
|
||||
[x: string]: any;
|
||||
} | undefined;
|
||||
}[];
|
||||
}
|
||||
/**
|
||||
* Type that represents text with formatting information.
|
||||
*
|
||||
* This type replaces y-richtext as this implementation is able to handle
|
||||
* block formats (format information on a paragraph), embeds (complex elements
|
||||
* like pictures and videos), and text formats (**bold**, *italic*).
|
||||
*
|
||||
* @extends AbstractType<YTextEvent>
|
||||
*/
|
||||
export class YText extends AbstractType<YTextEvent> {
|
||||
/**
|
||||
* @param {String} [string] The initial value of the YText.
|
||||
*/
|
||||
constructor(string?: string | undefined);
|
||||
/**
|
||||
* Array of pending operations on this type
|
||||
* @type {Array<function():void>?}
|
||||
*/
|
||||
_pending: (() => void)[] | null;
|
||||
/**
|
||||
* Whether this YText contains formatting attributes.
|
||||
* This flag is updated when a formatting item is integrated (see ContentFormat.integrate)
|
||||
*/
|
||||
_hasFormatting: boolean;
|
||||
/**
|
||||
* Number of characters of this text type.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
get length(): number;
|
||||
/**
|
||||
* @param {Doc} y
|
||||
* @param {Item} item
|
||||
*/
|
||||
_integrate(y: Doc, item: Item): void;
|
||||
_copy(): YText;
|
||||
/**
|
||||
* Makes a copy of this data type that can be included somewhere else.
|
||||
*
|
||||
* Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
|
||||
*
|
||||
* @return {YText}
|
||||
*/
|
||||
clone(): YText;
|
||||
/**
|
||||
* Returns the unformatted string representation of this YText type.
|
||||
*
|
||||
* @return {string}
|
||||
* @public
|
||||
*/
|
||||
public toJSON(): string;
|
||||
/**
|
||||
* Apply a {@link Delta} on this shared YText type.
|
||||
*
|
||||
* @param {Array<any>} delta The changes to apply on this element.
|
||||
* @param {object} opts
|
||||
* @param {boolean} [opts.sanitize] Sanitize input delta. Removes ending newlines if set to true.
|
||||
*
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public applyDelta(delta: Array<any>, { sanitize }?: {
|
||||
sanitize?: boolean | undefined;
|
||||
}): void;
|
||||
/**
|
||||
* Returns the Delta representation of this YText type.
|
||||
*
|
||||
* @param {Snapshot} [snapshot]
|
||||
* @param {Snapshot} [prevSnapshot]
|
||||
* @param {function('removed' | 'added', ID):any} [computeYChange]
|
||||
* @return {any} The Delta representation of this type.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public toDelta(snapshot?: Snapshot | undefined, prevSnapshot?: Snapshot | undefined, computeYChange?: ((arg0: 'removed' | 'added', arg1: ID) => any) | undefined): any;
|
||||
/**
|
||||
* Insert text at a given index.
|
||||
*
|
||||
* @param {number} index The index at which to start inserting.
|
||||
* @param {String} text The text to insert at the specified position.
|
||||
* @param {TextAttributes} [attributes] Optionally define some formatting
|
||||
* information to apply on the inserted
|
||||
* Text.
|
||||
* @public
|
||||
*/
|
||||
public insert(index: number, text: string, attributes?: Object | undefined): void;
|
||||
/**
|
||||
* Inserts an embed at a index.
|
||||
*
|
||||
* @param {number} index The index to insert the embed at.
|
||||
* @param {Object | AbstractType<any>} embed The Object that represents the embed.
|
||||
* @param {TextAttributes} [attributes] Attribute information to apply on the
|
||||
* embed
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public insertEmbed(index: number, embed: Object | AbstractType<any>, attributes?: Object | undefined): void;
|
||||
/**
|
||||
* Deletes text starting from an index.
|
||||
*
|
||||
* @param {number} index Index at which to start deleting.
|
||||
* @param {number} length The number of characters to remove. Defaults to 1.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public delete(index: number, length: number): void;
|
||||
/**
|
||||
* Assigns properties to a range of text.
|
||||
*
|
||||
* @param {number} index The position where to start formatting.
|
||||
* @param {number} length The amount of characters to assign properties to.
|
||||
* @param {TextAttributes} attributes Attribute information to apply on the
|
||||
* text.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public format(index: number, length: number, attributes: TextAttributes): void;
|
||||
/**
|
||||
* Removes an attribute.
|
||||
*
|
||||
* @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
|
||||
*
|
||||
* @param {String} attributeName The attribute name that is to be removed.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public removeAttribute(attributeName: string): void;
|
||||
/**
|
||||
* Sets or updates an attribute.
|
||||
*
|
||||
* @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
|
||||
*
|
||||
* @param {String} attributeName The attribute name that is to be set.
|
||||
* @param {any} attributeValue The attribute value that is to be set.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public setAttribute(attributeName: string, attributeValue: any): void;
|
||||
/**
|
||||
* Returns an attribute value that belongs to the attribute name.
|
||||
*
|
||||
* @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
|
||||
*
|
||||
* @param {String} attributeName The attribute name that identifies the
|
||||
* queried value.
|
||||
* @return {any} The queried attribute value.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getAttribute(attributeName: string): any;
|
||||
/**
|
||||
* Returns all attribute name/value pairs in a JSON Object.
|
||||
*
|
||||
* @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
|
||||
*
|
||||
* @return {Object<string, any>} A JSON Object that describes the attributes.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getAttributes(): {
|
||||
[x: string]: any;
|
||||
};
|
||||
}
|
||||
export function readYText(_decoder: UpdateDecoderV1 | UpdateDecoderV2): YText;
|
||||
/**
|
||||
* Attributes that can be assigned to a selection of text.
|
||||
*/
|
||||
export type TextAttributes = Object;
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
import { YEvent } from "../utils/YEvent.js";
|
||||
import { AbstractType } from "./AbstractType.js";
|
||||
import { Doc } from "../utils/Doc.js";
|
||||
import { Snapshot } from "../utils/Snapshot.js";
|
||||
import { ID } from "../utils/ID.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=YText.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/YText.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/YText.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YText.d.ts","sourceRoot":"","sources":["../../../src/types/YText.js"],"names":[],"mappings":"AA2CA;IACE;;;;;OAKG;IACH,kBALW,IAAI,GAAC,IAAI,SACT,IAAI,GAAC,IAAI,SACT,MAAM,qBACN,IAAI,MAAM,EAAC,GAAG,CAAC,EAOzB;IAJC,kBAAgB;IAChB,mBAAkB;IAClB,cAAkB;IAClB,oCAA0C;IAG5C;;OAEG;IACH,gBAkBC;CACF;AAsXM,6CAHI,KAAK,GACJ,MAAM,CA0BjB;AAQM,0DAFI,WAAW,QA4CrB;AAyCD;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;IAUI;AAEJ;;;GAGG;AACH;IACE;;;;OAIG;IACH,mBAJW,KAAK,eACL,WAAW,QACX,IAAI,GAAG,CAAC,EAsBlB;IAlBC;;;;OAIG;IACH,yBAA6B;IAC7B;;;OAGG;IACH,aAFU,IAAI,MAAM,CAAC,CAEO;IA6B9B;;;;;;;OAOG;IACH;;;;;;;QAwLC;CACF;AAED;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH,yCAgBC;IAdC;;;OAGG;IACH,iBAF2B,IAAI,WAE2C;IAK1E;;;OAGG;IACH,wBAA2B;IAG7B;;;;OAIG;IACH,qBAGC;IAED;;;OAGG;IACH,cAHW,GAAG,QACH,IAAI,QAUd;IAED,eAEC;IAED;;;;;;OAMG;IACH,SAFY,KAAK,CAMhB;IAuCD;;;;;OAKG;IACH,iBAHY,MAAM,CAKjB;IAED;;;;;;;;;OASG;IACH,yBAPW,MAAM,GAAG,CAAC;QAEK,QAAQ;aA+BjC;IAED;;;;;;;;;OASG;IACH,8GALoB,SAAS,GAAG,OAAO,QAAE,EAAE,KAAE,GAAG,gBACpC,GAAG,CA2Gd;IAED;;;;;;;;;OASG;IACH,qBAPW,MAAM,uDAyBhB;IAED;;;;;;;;;OASG;IACH,0BAPW,MAAM,SACN,MAAM,GAAG,aAAa,GAAG,CAAC,yCAgBpC;IAED;;;;;;;OAOG;IACH,qBALW,MAAM,UACN,MAAM,QAgBhB;IAED;;;;;;;;;OASG;IACH,qBAPW,MAAM,UACN,MAAM,cACN,cAAc,QAqBxB;IAED;;;;;;;;OAQG;IACH,oDAQC;IAED;;;;;;;;;OASG;IACH,2DAJW,GAAG,QAYb;IAED;;;;;;;;;;OAUG;IACH,4CAJY,GAAG,CAMd;IAED;;;;;;;;OAQG;IACH;YAJmB,MAAM,GAAE,GAAG;MAM7B;CAQF;AASM,oCANI,eAAe,GAAG,eAAe,GAChC,KAAK,CAK+B;;;;6BAjsBlC,MAAM"}
|
||||
108
yjs-poll/node_modules/yjs/dist/src/types/YXmlElement.d.ts
generated
vendored
Normal file
108
yjs-poll/node_modules/yjs/dist/src/types/YXmlElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* @typedef {Object|number|null|Array<any>|string|Uint8Array|AbstractType<any>} ValueTypes
|
||||
*/
|
||||
/**
|
||||
* An YXmlElement imitates the behavior of a
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element
|
||||
*
|
||||
* * An YXmlElement has attributes (key value pairs)
|
||||
* * An YXmlElement has childElements that must inherit from YXmlElement
|
||||
*
|
||||
* @template {{ [key: string]: ValueTypes }} [KV={ [key: string]: string }]
|
||||
*/
|
||||
export class YXmlElement<KV extends {
|
||||
[key: string]: ValueTypes;
|
||||
} = {
|
||||
[key: string]: string;
|
||||
}> extends YXmlFragment {
|
||||
constructor(nodeName?: string);
|
||||
nodeName: string;
|
||||
/**
|
||||
* @type {Map<string, any>|null}
|
||||
*/
|
||||
_prelimAttrs: Map<string, any> | null;
|
||||
/**
|
||||
* @type {YXmlElement|YXmlText|null}
|
||||
*/
|
||||
get nextSibling(): YXmlElement<{
|
||||
[key: string]: string;
|
||||
}> | YXmlText | null;
|
||||
/**
|
||||
* @type {YXmlElement|YXmlText|null}
|
||||
*/
|
||||
get prevSibling(): YXmlElement<{
|
||||
[key: string]: string;
|
||||
}> | YXmlText | null;
|
||||
/**
|
||||
* Creates an Item with the same effect as this Item (without position effect)
|
||||
*
|
||||
* @return {YXmlElement}
|
||||
*/
|
||||
_copy(): YXmlElement;
|
||||
/**
|
||||
* Makes a copy of this data type that can be included somewhere else.
|
||||
*
|
||||
* Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
|
||||
*
|
||||
* @return {YXmlElement<KV>}
|
||||
*/
|
||||
clone(): YXmlElement<KV>;
|
||||
/**
|
||||
* Removes an attribute from this YXmlElement.
|
||||
*
|
||||
* @param {string} attributeName The attribute name that is to be removed.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public removeAttribute(attributeName: string): void;
|
||||
/**
|
||||
* Sets or updates an attribute.
|
||||
*
|
||||
* @template {keyof KV & string} KEY
|
||||
*
|
||||
* @param {KEY} attributeName The attribute name that is to be set.
|
||||
* @param {KV[KEY]} attributeValue The attribute value that is to be set.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public setAttribute<KEY extends keyof KV & string>(attributeName: KEY, attributeValue: KV[KEY]): void;
|
||||
/**
|
||||
* Returns an attribute value that belongs to the attribute name.
|
||||
*
|
||||
* @template {keyof KV & string} KEY
|
||||
*
|
||||
* @param {KEY} attributeName The attribute name that identifies the
|
||||
* queried value.
|
||||
* @return {KV[KEY]|undefined} The queried attribute value.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getAttribute<KEY_1 extends keyof KV & string>(attributeName: KEY_1): KV[KEY_1] | undefined;
|
||||
/**
|
||||
* Returns whether an attribute exists
|
||||
*
|
||||
* @param {string} attributeName The attribute name to check for existence.
|
||||
* @return {boolean} whether the attribute exists.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public hasAttribute(attributeName: string): boolean;
|
||||
/**
|
||||
* Returns all attribute name/value pairs in a JSON Object.
|
||||
*
|
||||
* @param {Snapshot} [snapshot]
|
||||
* @return {{ [Key in Extract<keyof KV,string>]?: KV[Key]}} A JSON Object that describes the attributes.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getAttributes(snapshot?: Snapshot | undefined): { [Key in Extract<keyof KV, string>]?: KV[Key] | undefined; };
|
||||
}
|
||||
export function readYXmlElement(decoder: UpdateDecoderV1 | UpdateDecoderV2): YXmlElement;
|
||||
export type ValueTypes = Object | number | null | Array<any> | string | Uint8Array | AbstractType<any>;
|
||||
import { YXmlFragment } from "./YXmlFragment.js";
|
||||
import { YXmlText } from "./YXmlText.js";
|
||||
import { Snapshot } from "../utils/Snapshot.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
import { AbstractType } from "./AbstractType.js";
|
||||
//# sourceMappingURL=YXmlElement.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlElement.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlElement.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YXmlElement.d.ts","sourceRoot":"","sources":["../../../src/types/YXmlElement.js"],"names":[],"mappings":"AAgBA;;GAEG;AAEH;;;;;;;;GAQG;AACH;;;;;IACE,+BAOC;IALC,iBAAwB;IACxB;;OAEG;IACH,cAFU,IAAI,MAAM,EAAE,GAAG,CAAC,GAAC,IAAI,CAEF;IAG/B;;OAEG;IACH;;yBAGC;IAED;;OAEG;IACH;;yBAGC;IAoBD;;;;OAIG;IACH,SAFY,WAAW,CAItB;IAED;;;;;;OAMG;IACH,SAFY,YAAY,EAAE,CAAC,CAc1B;IA6BD;;;;;;OAMG;IACH,sCAJW,MAAM,QAYhB;IAED;;;;;;;;;OASG;IACH,sGAQC;IAED;;;;;;;;;;OAUG;IACH,kGAEC;IAED;;;;;;;OAOG;IACH,mCALW,MAAM,GACL,OAAO,CAMlB;IAED;;;;;;;OAOG;IACH,qHAEC;CA+CF;AAQM,yCALI,eAAe,GAAG,eAAe,GAChC,WAAW,CAIqD;yBAlP/D,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,MAAM,GAAG,CAAC,GAAC,MAAM,GAAC,UAAU,GAAC,aAAa,GAAG,CAAC"}
|
||||
33
yjs-poll/node_modules/yjs/dist/src/types/YXmlEvent.d.ts
generated
vendored
Normal file
33
yjs-poll/node_modules/yjs/dist/src/types/YXmlEvent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @extends YEvent<YXmlElement|YXmlText|YXmlFragment>
|
||||
* An Event that describes changes on a YXml Element or Yxml Fragment
|
||||
*/
|
||||
export class YXmlEvent extends YEvent<YXmlElement<{
|
||||
[key: string]: string;
|
||||
}> | YXmlFragment | YXmlText> {
|
||||
/**
|
||||
* @param {YXmlElement|YXmlText|YXmlFragment} target The target on which the event is created.
|
||||
* @param {Set<string|null>} subs The set of changed attributes. `null` is included if the
|
||||
* child list changed.
|
||||
* @param {Transaction} transaction The transaction instance with which the
|
||||
* change was created.
|
||||
*/
|
||||
constructor(target: YXmlElement | YXmlText | YXmlFragment, subs: Set<string | null>, transaction: Transaction);
|
||||
/**
|
||||
* Whether the children changed.
|
||||
* @type {Boolean}
|
||||
* @private
|
||||
*/
|
||||
private childListChanged;
|
||||
/**
|
||||
* Set of all changed attributes.
|
||||
* @type {Set<string>}
|
||||
*/
|
||||
attributesChanged: Set<string>;
|
||||
}
|
||||
import { YXmlElement } from "./YXmlElement.js";
|
||||
import { YXmlFragment } from "./YXmlFragment.js";
|
||||
import { YXmlText } from "./YXmlText.js";
|
||||
import { YEvent } from "../utils/YEvent.js";
|
||||
import { Transaction } from "../utils/Transaction.js";
|
||||
//# sourceMappingURL=YXmlEvent.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlEvent.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlEvent.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YXmlEvent.d.ts","sourceRoot":"","sources":["../../../src/types/YXmlEvent.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH;;;IACE;;;;;;OAMG;IACH,oBANW,WAAW,GAAC,QAAQ,GAAC,YAAY,QACjC,IAAI,MAAM,GAAC,IAAI,CAAC,eAEhB,WAAW,EAuBrB;IAlBC;;;;OAIG;IACH,yBAA6B;IAC7B;;;OAGG;IACH,mBAFU,IAAI,MAAM,CAAC,CAEa;CASrC"}
|
||||
253
yjs-poll/node_modules/yjs/dist/src/types/YXmlFragment.d.ts
generated
vendored
Normal file
253
yjs-poll/node_modules/yjs/dist/src/types/YXmlFragment.d.ts
generated
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
/**
|
||||
* Define the elements to which a set of CSS queries apply.
|
||||
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors|CSS_Selectors}
|
||||
*
|
||||
* @example
|
||||
* query = '.classSelector'
|
||||
* query = 'nodeSelector'
|
||||
* query = '#idSelector'
|
||||
*
|
||||
* @typedef {string} CSS_Selector
|
||||
*/
|
||||
/**
|
||||
* Dom filter function.
|
||||
*
|
||||
* @callback domFilter
|
||||
* @param {string} nodeName The nodeName of the element
|
||||
* @param {Map} attributes The map of attributes.
|
||||
* @return {boolean} Whether to include the Dom node in the YXmlElement.
|
||||
*/
|
||||
/**
|
||||
* Represents a subset of the nodes of a YXmlElement / YXmlFragment and a
|
||||
* position within them.
|
||||
*
|
||||
* Can be created with {@link YXmlFragment#createTreeWalker}
|
||||
*
|
||||
* @public
|
||||
* @implements {Iterable<YXmlElement|YXmlText|YXmlElement|YXmlHook>}
|
||||
*/
|
||||
export class YXmlTreeWalker implements Iterable<YXmlElement | YXmlText | YXmlElement | YXmlHook> {
|
||||
/**
|
||||
* @param {YXmlFragment | YXmlElement} root
|
||||
* @param {function(AbstractType<any>):boolean} [f]
|
||||
*/
|
||||
constructor(root: YXmlFragment | YXmlElement, f?: ((arg0: AbstractType<any>) => boolean) | undefined);
|
||||
_filter: (arg0: AbstractType<any>) => boolean;
|
||||
_root: YXmlElement<{
|
||||
[key: string]: string;
|
||||
}> | YXmlFragment;
|
||||
/**
|
||||
* @type {Item}
|
||||
*/
|
||||
_currentNode: Item;
|
||||
_firstCall: boolean;
|
||||
/**
|
||||
* Get the next node.
|
||||
*
|
||||
* @return {IteratorResult<YXmlElement|YXmlText|YXmlHook>} The next node.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public next(): IteratorResult<YXmlElement | YXmlText | YXmlHook>;
|
||||
[Symbol.iterator](): YXmlTreeWalker;
|
||||
}
|
||||
/**
|
||||
* Represents a list of {@link YXmlElement}.and {@link YXmlText} types.
|
||||
* A YxmlFragment is similar to a {@link YXmlElement}, but it does not have a
|
||||
* nodeName and it does not have attributes. Though it can be bound to a DOM
|
||||
* element - in this case the attributes and the nodeName are not shared.
|
||||
*
|
||||
* @public
|
||||
* @extends AbstractType<YXmlEvent>
|
||||
*/
|
||||
export class YXmlFragment extends AbstractType<YXmlEvent> {
|
||||
constructor();
|
||||
/**
|
||||
* @type {Array<any>|null}
|
||||
*/
|
||||
_prelimContent: Array<any> | null;
|
||||
/**
|
||||
* @type {YXmlElement|YXmlText|null}
|
||||
*/
|
||||
get firstChild(): YXmlElement<{
|
||||
[key: string]: string;
|
||||
}> | YXmlText | null;
|
||||
/**
|
||||
* Integrate this type into the Yjs instance.
|
||||
*
|
||||
* * Save this struct in the os
|
||||
* * This type is sent to other client
|
||||
* * Observer functions are fired
|
||||
*
|
||||
* @param {Doc} y The Yjs instance
|
||||
* @param {Item} item
|
||||
*/
|
||||
_integrate(y: Doc, item: Item): void;
|
||||
_copy(): YXmlFragment;
|
||||
/**
|
||||
* Makes a copy of this data type that can be included somewhere else.
|
||||
*
|
||||
* Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
|
||||
*
|
||||
* @return {YXmlFragment}
|
||||
*/
|
||||
clone(): YXmlFragment;
|
||||
get length(): number;
|
||||
/**
|
||||
* Create a subtree of childNodes.
|
||||
*
|
||||
* @example
|
||||
* const walker = elem.createTreeWalker(dom => dom.nodeName === 'div')
|
||||
* for (let node in walker) {
|
||||
* // `node` is a div node
|
||||
* nop(node)
|
||||
* }
|
||||
*
|
||||
* @param {function(AbstractType<any>):boolean} filter Function that is called on each child element and
|
||||
* returns a Boolean indicating whether the child
|
||||
* is to be included in the subtree.
|
||||
* @return {YXmlTreeWalker} A subtree and a position within it.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public createTreeWalker(filter: (arg0: AbstractType<any>) => boolean): YXmlTreeWalker;
|
||||
/**
|
||||
* Returns the first YXmlElement that matches the query.
|
||||
* Similar to DOM's {@link querySelector}.
|
||||
*
|
||||
* Query support:
|
||||
* - tagname
|
||||
* TODO:
|
||||
* - id
|
||||
* - attribute
|
||||
*
|
||||
* @param {CSS_Selector} query The query on the children.
|
||||
* @return {YXmlElement|YXmlText|YXmlHook|null} The first element that matches the query or null.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public querySelector(query: CSS_Selector): YXmlElement | YXmlText | YXmlHook | null;
|
||||
/**
|
||||
* Returns all YXmlElements that match the query.
|
||||
* Similar to Dom's {@link querySelectorAll}.
|
||||
*
|
||||
* @todo Does not yet support all queries. Currently only query by tagName.
|
||||
*
|
||||
* @param {CSS_Selector} query The query on the children
|
||||
* @return {Array<YXmlElement|YXmlText|YXmlHook|null>} The elements that match this query.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public querySelectorAll(query: CSS_Selector): Array<YXmlElement | YXmlText | YXmlHook | null>;
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
toJSON(): string;
|
||||
/**
|
||||
* Creates a Dom Element that mirrors this YXmlElement.
|
||||
*
|
||||
* @param {Document} [_document=document] The document object (you must define
|
||||
* this when calling this method in
|
||||
* nodejs)
|
||||
* @param {Object<string, any>} [hooks={}] Optional property to customize how hooks
|
||||
* are presented in the DOM
|
||||
* @param {any} [binding] You should not set this property. This is
|
||||
* used if DomBinding wants to create a
|
||||
* association to the created DOM type.
|
||||
* @return {Node} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public toDOM(_document?: Document | undefined, hooks?: {
|
||||
[x: string]: any;
|
||||
} | undefined, binding?: any): Node;
|
||||
/**
|
||||
* Inserts new content at an index.
|
||||
*
|
||||
* @example
|
||||
* // Insert character 'a' at position 0
|
||||
* xml.insert(0, [new Y.XmlText('text')])
|
||||
*
|
||||
* @param {number} index The index to insert content at
|
||||
* @param {Array<YXmlElement|YXmlText>} content The array of content
|
||||
*/
|
||||
insert(index: number, content: Array<YXmlElement | YXmlText>): void;
|
||||
/**
|
||||
* Inserts new content at an index.
|
||||
*
|
||||
* @example
|
||||
* // Insert character 'a' at position 0
|
||||
* xml.insert(0, [new Y.XmlText('text')])
|
||||
*
|
||||
* @param {null|Item|YXmlElement|YXmlText} ref The index to insert content at
|
||||
* @param {Array<YXmlElement|YXmlText>} content The array of content
|
||||
*/
|
||||
insertAfter(ref: null | Item | YXmlElement | YXmlText, content: Array<YXmlElement | YXmlText>): void;
|
||||
/**
|
||||
* Deletes elements starting from an index.
|
||||
*
|
||||
* @param {number} index Index at which to start deleting elements
|
||||
* @param {number} [length=1] The number of elements to remove. Defaults to 1.
|
||||
*/
|
||||
delete(index: number, length?: number | undefined): void;
|
||||
/**
|
||||
* Transforms this YArray to a JavaScript Array.
|
||||
*
|
||||
* @return {Array<YXmlElement|YXmlText|YXmlHook>}
|
||||
*/
|
||||
toArray(): Array<YXmlElement | YXmlText | YXmlHook>;
|
||||
/**
|
||||
* Appends content to this YArray.
|
||||
*
|
||||
* @param {Array<YXmlElement|YXmlText>} content Array of content to append.
|
||||
*/
|
||||
push(content: Array<YXmlElement | YXmlText>): void;
|
||||
/**
|
||||
* Prepends content to this YArray.
|
||||
*
|
||||
* @param {Array<YXmlElement|YXmlText>} content Array of content to prepend.
|
||||
*/
|
||||
unshift(content: Array<YXmlElement | YXmlText>): void;
|
||||
/**
|
||||
* Returns the i-th element from a YArray.
|
||||
*
|
||||
* @param {number} index The index of the element to return from the YArray
|
||||
* @return {YXmlElement|YXmlText}
|
||||
*/
|
||||
get(index: number): YXmlElement | YXmlText;
|
||||
/**
|
||||
* Returns a portion of this YXmlFragment into a JavaScript Array selected
|
||||
* from start to end (end not included).
|
||||
*
|
||||
* @param {number} [start]
|
||||
* @param {number} [end]
|
||||
* @return {Array<YXmlElement|YXmlText>}
|
||||
*/
|
||||
slice(start?: number | undefined, end?: number | undefined): Array<YXmlElement | YXmlText>;
|
||||
/**
|
||||
* Executes a provided function on once on every child element.
|
||||
*
|
||||
* @param {function(YXmlElement|YXmlText,number, typeof self):void} f A function to execute on every element of this YArray.
|
||||
*/
|
||||
forEach(f: (arg0: YXmlElement | YXmlText, arg1: number, arg2: typeof self) => void): void;
|
||||
}
|
||||
export function readYXmlFragment(_decoder: UpdateDecoderV1 | UpdateDecoderV2): YXmlFragment;
|
||||
/**
|
||||
* Define the elements to which a set of CSS queries apply.
|
||||
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors|CSS_Selectors}
|
||||
*/
|
||||
export type CSS_Selector = string;
|
||||
/**
|
||||
* Dom filter function.
|
||||
*/
|
||||
export type domFilter = (nodeName: string, attributes: Map<any, any>) => boolean;
|
||||
import { YXmlElement } from "./YXmlElement.js";
|
||||
import { YXmlText } from "./YXmlText.js";
|
||||
import { YXmlHook } from "./YXmlHook.js";
|
||||
import { AbstractType } from "./AbstractType.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { YXmlEvent } from "./YXmlEvent.js";
|
||||
import { Doc } from "../utils/Doc.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=YXmlFragment.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlFragment.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlFragment.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YXmlFragment.d.ts","sourceRoot":"","sources":["../../../src/types/YXmlFragment.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;GAUG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;GAQG;AACH,gDAFyB,WAAW,GAAC,QAAQ,GAAC,WAAW,GAAC,QAAQ;IAGhE;;;OAGG;IACH,kBAHW,YAAY,GAAG,WAAW,cACjB,aAAa,GAAG,CAAC,KAAE,OAAO,eAW7C;IARC,gBAHkB,aAAa,GAAG,CAAC,KAAE,OAAO,CAG5B;IAChB;;sBAAiB;IACjB;;OAEG;IACH,cAFU,IAAI,CAEuC;IACrD,oBAAsB;IAQxB;;;;;;OAMG;IACH,eAJY,eAAe,WAAW,GAAC,QAAQ,GAAC,QAAQ,CAAC,CA0CxD;IAjDD,oCAEC;CAgDF;AAED;;;;;;;;GAQG;AACH;IACE,cAMC;IAJC;;OAEG;IACH,gBAFU,MAAM,GAAG,CAAC,GAAC,IAAI,CAED;IAG1B;;OAEG;IACH;;yBAGC;IAED;;;;;;;;;OASG;IACH,cAHW,GAAG,QACH,IAAI,QAMd;IAED,sBAEC;IAED;;;;;;OAMG;IACH,SAFY,YAAY,CAOvB;IAED,qBAGC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,uCAPoB,aAAa,GAAG,CAAC,KAAE,OAAO,GAGlC,cAAc,CAMzB;IAED;;;;;;;;;;;;;;OAcG;IACH,4BALW,YAAY,GACX,WAAW,GAAC,QAAQ,GAAC,QAAQ,GAAC,IAAI,CAc7C;IAED;;;;;;;;;;OAUG;IACH,+BALW,YAAY,GACX,MAAM,WAAW,GAAC,QAAQ,GAAC,QAAQ,GAAC,IAAI,CAAC,CAQpD;IAqBD;;OAEG;IACH,UAFY,MAAM,CAIjB;IAED;;;;;;;;;;;;;;OAcG;IACH;;6BAPW,GAAG,GAGF,IAAI,CAaf;IAED;;;;;;;;;OASG;IACH,cAHW,MAAM,WACN,MAAM,WAAW,GAAC,QAAQ,CAAC,QAWrC;IAED;;;;;;;;;OASG;IACH,iBAHW,IAAI,GAAC,IAAI,GAAC,WAAW,GAAC,QAAQ,WAC9B,MAAM,WAAW,GAAC,QAAQ,CAAC,QAgBrC;IAED;;;;;OAKG;IACH,cAHW,MAAM,qCAYhB;IAED;;;;OAIG;IACH,WAFY,MAAM,WAAW,GAAC,QAAQ,GAAC,QAAQ,CAAC,CAI/C;IAED;;;;OAIG;IACH,cAFW,MAAM,WAAW,GAAC,QAAQ,CAAC,QAIrC;IAED;;;;OAIG;IACH,iBAFW,MAAM,WAAW,GAAC,QAAQ,CAAC,QAIrC;IAED;;;;;OAKG;IACH,WAHW,MAAM,GACL,WAAW,GAAC,QAAQ,CAI/B;IAED;;;;;;;OAOG;IACH,6DAFY,MAAM,WAAW,GAAC,QAAQ,CAAC,CAItC;IAED;;;;OAIG;IACH,kBAFoB,WAAW,GAAC,QAAQ,QAAC,MAAM,QAAE,WAAW,KAAE,IAAI,QAIjE;CAaF;AASM,2CANI,eAAe,GAAG,eAAe,GAChC,YAAY,CAKsC;;;;;2BA7ZjD,MAAM;;;;mCAOR,MAAM,gCAEL,OAAO"}
|
||||
50
yjs-poll/node_modules/yjs/dist/src/types/YXmlHook.d.ts
generated
vendored
Normal file
50
yjs-poll/node_modules/yjs/dist/src/types/YXmlHook.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* You can manage binding to a custom type with YXmlHook.
|
||||
*
|
||||
* @extends {YMap<any>}
|
||||
*/
|
||||
export class YXmlHook extends YMap<any> {
|
||||
/**
|
||||
* @param {string} hookName nodeName of the Dom Node.
|
||||
*/
|
||||
constructor(hookName: string);
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
hookName: string;
|
||||
/**
|
||||
* Creates an Item with the same effect as this Item (without position effect)
|
||||
*/
|
||||
_copy(): YXmlHook;
|
||||
/**
|
||||
* Makes a copy of this data type that can be included somewhere else.
|
||||
*
|
||||
* Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
|
||||
*
|
||||
* @return {YXmlHook}
|
||||
*/
|
||||
clone(): YXmlHook;
|
||||
/**
|
||||
* Creates a Dom Element that mirrors this YXmlElement.
|
||||
*
|
||||
* @param {Document} [_document=document] The document object (you must define
|
||||
* this when calling this method in
|
||||
* nodejs)
|
||||
* @param {Object.<string, any>} [hooks] Optional property to customize how hooks
|
||||
* are presented in the DOM
|
||||
* @param {any} [binding] You should not set this property. This is
|
||||
* used if DomBinding wants to create a
|
||||
* association to the created DOM type
|
||||
* @return {Element} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public toDOM(_document?: Document | undefined, hooks?: {
|
||||
[x: string]: any;
|
||||
} | undefined, binding?: any): Element;
|
||||
}
|
||||
export function readYXmlHook(decoder: UpdateDecoderV1 | UpdateDecoderV2): YXmlHook;
|
||||
import { YMap } from "./YMap.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=YXmlHook.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlHook.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlHook.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YXmlHook.d.ts","sourceRoot":"","sources":["../../../src/types/YXmlHook.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH;IACE;;OAEG;IACH,sBAFW,MAAM,EAQhB;IAJC;;OAEG;IACH,UAFU,MAAM,CAEQ;IAG1B;;OAEG;IACH,kBAEC;IAED;;;;;;OAMG;IACH,SAFY,QAAQ,CAQnB;IAED;;;;;;;;;;;;;;OAcG;IACH;;6BAPW,GAAG,GAGF,OAAO,CAiBlB;CAcF;AASM,sCANI,eAAe,GAAG,eAAe,GAChC,QAAQ,CAMa"}
|
||||
52
yjs-poll/node_modules/yjs/dist/src/types/YXmlText.d.ts
generated
vendored
Normal file
52
yjs-poll/node_modules/yjs/dist/src/types/YXmlText.d.ts
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Represents text in a Dom Element. In the future this type will also handle
|
||||
* simple formatting information like bold and italic.
|
||||
*/
|
||||
export class YXmlText extends YText {
|
||||
/**
|
||||
* @type {YXmlElement|YXmlText|null}
|
||||
*/
|
||||
get nextSibling(): YXmlElement<{
|
||||
[key: string]: string;
|
||||
}> | YXmlText | null;
|
||||
/**
|
||||
* @type {YXmlElement|YXmlText|null}
|
||||
*/
|
||||
get prevSibling(): YXmlElement<{
|
||||
[key: string]: string;
|
||||
}> | YXmlText | null;
|
||||
_copy(): YXmlText;
|
||||
/**
|
||||
* Makes a copy of this data type that can be included somewhere else.
|
||||
*
|
||||
* Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
|
||||
*
|
||||
* @return {YXmlText}
|
||||
*/
|
||||
clone(): YXmlText;
|
||||
/**
|
||||
* Creates a Dom Element that mirrors this YXmlText.
|
||||
*
|
||||
* @param {Document} [_document=document] The document object (you must define
|
||||
* this when calling this method in
|
||||
* nodejs)
|
||||
* @param {Object<string, any>} [hooks] Optional property to customize how hooks
|
||||
* are presented in the DOM
|
||||
* @param {any} [binding] You should not set this property. This is
|
||||
* used if DomBinding wants to create a
|
||||
* association to the created DOM type.
|
||||
* @return {Text} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public toDOM(_document?: Document | undefined, hooks?: {
|
||||
[x: string]: any;
|
||||
} | undefined, binding?: any): Text;
|
||||
toString(): any;
|
||||
}
|
||||
export function readYXmlText(decoder: UpdateDecoderV1 | UpdateDecoderV2): YXmlText;
|
||||
import { YText } from "./YText.js";
|
||||
import { YXmlElement } from "./YXmlElement.js";
|
||||
import { UpdateDecoderV1 } from "../utils/UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "../utils/UpdateDecoder.js";
|
||||
//# sourceMappingURL=YXmlText.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlText.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/types/YXmlText.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YXmlText.d.ts","sourceRoot":"","sources":["../../../src/types/YXmlText.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH;IACE;;OAEG;IACH;;yBAGC;IAED;;OAEG;IACH;;yBAGC;IAED,kBAEC;IAED;;;;;;OAMG;IACH,SAFY,QAAQ,CAMnB;IAED;;;;;;;;;;;;;;OAcG;IACH;;6BAPW,GAAG,GAGF,IAAI,CAUf;IAED,gBAgCC;CAeF;AASM,sCANI,eAAe,GAAG,eAAe,GAChC,QAAQ,CAKiC"}
|
||||
20
yjs-poll/node_modules/yjs/dist/src/utils/AbstractConnector.d.ts
generated
vendored
Normal file
20
yjs-poll/node_modules/yjs/dist/src/utils/AbstractConnector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* This is an abstract interface that all Connectors should implement to keep them interchangeable.
|
||||
*
|
||||
* @note This interface is experimental and it is not advised to actually inherit this class.
|
||||
* It just serves as typing information.
|
||||
*
|
||||
* @extends {ObservableV2<any>}
|
||||
*/
|
||||
export class AbstractConnector extends ObservableV2<any> {
|
||||
/**
|
||||
* @param {Doc} ydoc
|
||||
* @param {any} awareness
|
||||
*/
|
||||
constructor(ydoc: Doc, awareness: any);
|
||||
doc: Doc;
|
||||
awareness: any;
|
||||
}
|
||||
import { ObservableV2 } from "lib0/observable";
|
||||
import { Doc } from "./Doc.js";
|
||||
//# sourceMappingURL=AbstractConnector.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/AbstractConnector.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/AbstractConnector.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AbstractConnector.d.ts","sourceRoot":"","sources":["../../../src/utils/AbstractConnector.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH;IACE;;;OAGG;IACH,kBAHW,GAAG,aACH,GAAG,EAMb;IAFC,SAAe;IACf,eAA0B;CAE7B"}
|
||||
50
yjs-poll/node_modules/yjs/dist/src/utils/DeleteSet.d.ts
generated
vendored
Normal file
50
yjs-poll/node_modules/yjs/dist/src/utils/DeleteSet.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
export class DeleteItem {
|
||||
/**
|
||||
* @param {number} clock
|
||||
* @param {number} len
|
||||
*/
|
||||
constructor(clock: number, len: number);
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
clock: number;
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
len: number;
|
||||
}
|
||||
/**
|
||||
* We no longer maintain a DeleteStore. DeleteSet is a temporary object that is created when needed.
|
||||
* - When created in a transaction, it must only be accessed after sorting, and merging
|
||||
* - This DeleteSet is send to other clients
|
||||
* - We do not create a DeleteSet when we send a sync message. The DeleteSet message is created directly from StructStore
|
||||
* - We read a DeleteSet as part of a sync/update message. In this case the DeleteSet is already sorted and merged.
|
||||
*/
|
||||
export class DeleteSet {
|
||||
/**
|
||||
* @type {Map<number,Array<DeleteItem>>}
|
||||
*/
|
||||
clients: Map<number, Array<DeleteItem>>;
|
||||
}
|
||||
export function iterateDeletedStructs(transaction: Transaction, ds: DeleteSet, f: (arg0: GC | Item) => void): void;
|
||||
export function findIndexDS(dis: Array<DeleteItem>, clock: number): number | null;
|
||||
export function isDeleted(ds: DeleteSet, id: ID): boolean;
|
||||
export function sortAndMergeDeleteSet(ds: DeleteSet): void;
|
||||
export function mergeDeleteSets(dss: Array<DeleteSet>): DeleteSet;
|
||||
export function addToDeleteSet(ds: DeleteSet, client: number, clock: number, length: number): void;
|
||||
export function createDeleteSet(): DeleteSet;
|
||||
export function createDeleteSetFromStructStore(ss: StructStore): DeleteSet;
|
||||
export function writeDeleteSet(encoder: DSEncoderV1 | DSEncoderV2, ds: DeleteSet): void;
|
||||
export function readDeleteSet(decoder: DSDecoderV1 | DSDecoderV2): DeleteSet;
|
||||
export function readAndApplyDeleteSet(decoder: DSDecoderV1 | DSDecoderV2, transaction: Transaction, store: StructStore): Uint8Array | null;
|
||||
export function equalDeleteSets(ds1: DeleteSet, ds2: DeleteSet): boolean;
|
||||
import { Transaction } from "./Transaction.js";
|
||||
import { GC } from "../structs/GC.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { ID } from "./ID.js";
|
||||
import { StructStore } from "./StructStore.js";
|
||||
import { DSEncoderV1 } from "./UpdateEncoder.js";
|
||||
import { DSEncoderV2 } from "./UpdateEncoder.js";
|
||||
import { DSDecoderV1 } from "./UpdateDecoder.js";
|
||||
import { DSDecoderV2 } from "./UpdateDecoder.js";
|
||||
//# sourceMappingURL=DeleteSet.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/DeleteSet.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/DeleteSet.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DeleteSet.d.ts","sourceRoot":"","sources":["../../../src/utils/DeleteSet.js"],"names":[],"mappings":"AAeA;IACE;;;OAGG;IACH,mBAHW,MAAM,OACN,MAAM,EAWhB;IARC;;OAEG;IACH,OAFU,MAAM,CAEE;IAClB;;OAEG;IACH,KAFU,MAAM,CAEF;CAEjB;AAED;;;;;;GAMG;AACH;IAEI;;OAEG;IACH,SAFU,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC,CAAC,CAEf;CAE3B;AAWM,mDANI,WAAW,MACX,SAAS,YACA,EAAE,GAAC,IAAI,KAAE,IAAI,QAc7B;AAUG,iCAPI,MAAM,UAAU,CAAC,SACjB,MAAM,GACL,MAAM,GAAC,IAAI,CAsBtB;AAUM,8BAPI,SAAS,MACT,EAAE,GACD,OAAO,CAQlB;AAQM,0CALI,SAAS,QA2BnB;AAMM,qCAHI,MAAM,SAAS,CAAC,GACf,SAAS,CAsBpB;AAWM,mCARI,SAAS,UACT,MAAM,SACN,MAAM,UACN,MAAM,QAOhB;AAEM,6CAA6C;AAS7C,mDANI,WAAW,GACV,SAAS,CA8BpB;AASM,wCANI,WAAW,GAAG,WAAW,MACzB,SAAS,QAsBnB;AASM,uCANI,WAAW,GAAG,WAAW,GACxB,SAAS,CAoBpB;AAeM,+CARI,WAAW,GAAG,WAAW,eACzB,WAAW,SACX,WAAW,GACV,UAAU,GAAC,IAAI,CA2D1B;AAMM,qCAHI,SAAS,OACT,SAAS,WAgBnB"}
|
||||
250
yjs-poll/node_modules/yjs/dist/src/utils/Doc.d.ts
generated
vendored
Normal file
250
yjs-poll/node_modules/yjs/dist/src/utils/Doc.d.ts
generated
vendored
Normal file
@@ -0,0 +1,250 @@
|
||||
export const generateNewClientId: typeof random.uint32;
|
||||
/**
|
||||
* @typedef {Object} DocOpts
|
||||
* @property {boolean} [DocOpts.gc=true] Disable garbage collection (default: gc=true)
|
||||
* @property {function(Item):boolean} [DocOpts.gcFilter] Will be called before an Item is garbage collected. Return false to keep the Item.
|
||||
* @property {string} [DocOpts.guid] Define a globally unique identifier for this document
|
||||
* @property {string | null} [DocOpts.collectionid] Associate this document with a collection. This only plays a role if your provider has a concept of collection.
|
||||
* @property {any} [DocOpts.meta] Any kind of meta information you want to associate with this document. If this is a subdocument, remote peers will store the meta information as well.
|
||||
* @property {boolean} [DocOpts.autoLoad] If a subdocument, automatically load document. If this is a subdocument, remote peers will load the document as well automatically.
|
||||
* @property {boolean} [DocOpts.shouldLoad] Whether the document should be synced by the provider now. This is toggled to true when you call ydoc.load()
|
||||
*/
|
||||
/**
|
||||
* @typedef {Object} DocEvents
|
||||
* @property {function(Doc):void} DocEvents.destroy
|
||||
* @property {function(Doc):void} DocEvents.load
|
||||
* @property {function(boolean, Doc):void} DocEvents.sync
|
||||
* @property {function(Uint8Array, any, Doc, Transaction):void} DocEvents.update
|
||||
* @property {function(Uint8Array, any, Doc, Transaction):void} DocEvents.updateV2
|
||||
* @property {function(Doc):void} DocEvents.beforeAllTransactions
|
||||
* @property {function(Transaction, Doc):void} DocEvents.beforeTransaction
|
||||
* @property {function(Transaction, Doc):void} DocEvents.beforeObserverCalls
|
||||
* @property {function(Transaction, Doc):void} DocEvents.afterTransaction
|
||||
* @property {function(Transaction, Doc):void} DocEvents.afterTransactionCleanup
|
||||
* @property {function(Doc, Array<Transaction>):void} DocEvents.afterAllTransactions
|
||||
* @property {function({ loaded: Set<Doc>, added: Set<Doc>, removed: Set<Doc> }, Doc, Transaction):void} DocEvents.subdocs
|
||||
*/
|
||||
/**
|
||||
* A Yjs instance handles the state of shared data.
|
||||
* @extends ObservableV2<DocEvents>
|
||||
*/
|
||||
export class Doc extends ObservableV2<DocEvents> {
|
||||
/**
|
||||
* @param {DocOpts} opts configuration
|
||||
*/
|
||||
constructor({ guid, collectionid, gc, gcFilter, meta, autoLoad, shouldLoad }?: DocOpts);
|
||||
gc: boolean;
|
||||
gcFilter: (arg0: Item) => boolean;
|
||||
clientID: number;
|
||||
guid: string;
|
||||
collectionid: string | null;
|
||||
/**
|
||||
* @type {Map<string, AbstractType<YEvent<any>>>}
|
||||
*/
|
||||
share: Map<string, AbstractType<YEvent<any>>>;
|
||||
store: StructStore;
|
||||
/**
|
||||
* @type {Transaction | null}
|
||||
*/
|
||||
_transaction: Transaction | null;
|
||||
/**
|
||||
* @type {Array<Transaction>}
|
||||
*/
|
||||
_transactionCleanups: Array<Transaction>;
|
||||
/**
|
||||
* @type {Set<Doc>}
|
||||
*/
|
||||
subdocs: Set<Doc>;
|
||||
/**
|
||||
* If this document is a subdocument - a document integrated into another document - then _item is defined.
|
||||
* @type {Item?}
|
||||
*/
|
||||
_item: Item | null;
|
||||
shouldLoad: boolean;
|
||||
autoLoad: boolean;
|
||||
meta: any;
|
||||
/**
|
||||
* This is set to true when the persistence provider loaded the document from the database or when the `sync` event fires.
|
||||
* Note that not all providers implement this feature. Provider authors are encouraged to fire the `load` event when the doc content is loaded from the database.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
isLoaded: boolean;
|
||||
/**
|
||||
* This is set to true when the connection provider has successfully synced with a backend.
|
||||
* Note that when using peer-to-peer providers this event may not provide very useful.
|
||||
* Also note that not all providers implement this feature. Provider authors are encouraged to fire
|
||||
* the `sync` event when the doc has been synced (with `true` as a parameter) or if connection is
|
||||
* lost (with false as a parameter).
|
||||
*/
|
||||
isSynced: boolean;
|
||||
isDestroyed: boolean;
|
||||
/**
|
||||
* Promise that resolves once the document has been loaded from a persistence provider.
|
||||
*/
|
||||
whenLoaded: Promise<any>;
|
||||
whenSynced: Promise<any>;
|
||||
/**
|
||||
* Notify the parent document that you request to load data into this subdocument (if it is a subdocument).
|
||||
*
|
||||
* `load()` might be used in the future to request any provider to load the most current data.
|
||||
*
|
||||
* It is safe to call `load()` multiple times.
|
||||
*/
|
||||
load(): void;
|
||||
getSubdocs(): Set<Doc>;
|
||||
getSubdocGuids(): Set<string>;
|
||||
/**
|
||||
* Changes that happen inside of a transaction are bundled. This means that
|
||||
* the observer fires _after_ the transaction is finished and that all changes
|
||||
* that happened inside of the transaction are sent as one message to the
|
||||
* other peers.
|
||||
*
|
||||
* @template T
|
||||
* @param {function(Transaction):T} f The function that should be executed as a transaction
|
||||
* @param {any} [origin] Origin of who started the transaction. Will be stored on transaction.origin
|
||||
* @return T
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public transact<T>(f: (arg0: Transaction) => T, origin?: any): T;
|
||||
/**
|
||||
* Define a shared data type.
|
||||
*
|
||||
* Multiple calls of `ydoc.get(name, TypeConstructor)` yield the same result
|
||||
* and do not overwrite each other. I.e.
|
||||
* `ydoc.get(name, Y.Array) === ydoc.get(name, Y.Array)`
|
||||
*
|
||||
* After this method is called, the type is also available on `ydoc.share.get(name)`.
|
||||
*
|
||||
* *Best Practices:*
|
||||
* Define all types right after the Y.Doc instance is created and store them in a separate object.
|
||||
* Also use the typed methods `getText(name)`, `getArray(name)`, ..
|
||||
*
|
||||
* @template {typeof AbstractType<any>} Type
|
||||
* @example
|
||||
* const ydoc = new Y.Doc(..)
|
||||
* const appState = {
|
||||
* document: ydoc.getText('document')
|
||||
* comments: ydoc.getArray('comments')
|
||||
* }
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {Type} TypeConstructor The constructor of the type definition. E.g. Y.Text, Y.Array, Y.Map, ...
|
||||
* @return {InstanceType<Type>} The created type. Constructed with TypeConstructor
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public get<Type extends {
|
||||
new (): AbstractType<any>;
|
||||
}>(name: string, TypeConstructor?: Type): InstanceType<Type>;
|
||||
/**
|
||||
* @template T
|
||||
* @param {string} [name]
|
||||
* @return {YArray<T>}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getArray<T_1>(name?: string | undefined): YArray<T_1>;
|
||||
/**
|
||||
* @param {string} [name]
|
||||
* @return {YText}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getText(name?: string | undefined): YText;
|
||||
/**
|
||||
* @template T
|
||||
* @param {string} [name]
|
||||
* @return {YMap<T>}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getMap<T_2>(name?: string | undefined): YMap<T_2>;
|
||||
/**
|
||||
* @param {string} [name]
|
||||
* @return {YXmlElement}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getXmlElement(name?: string | undefined): YXmlElement;
|
||||
/**
|
||||
* @param {string} [name]
|
||||
* @return {YXmlFragment}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public getXmlFragment(name?: string | undefined): YXmlFragment;
|
||||
/**
|
||||
* Converts the entire document into a js object, recursively traversing each yjs type
|
||||
* Doesn't log types that have not been defined (using ydoc.getType(..)).
|
||||
*
|
||||
* @deprecated Do not use this method and rather call toJSON directly on the shared types.
|
||||
*
|
||||
* @return {Object<string, any>}
|
||||
*/
|
||||
toJSON(): {
|
||||
[x: string]: any;
|
||||
};
|
||||
}
|
||||
export type DocOpts = {
|
||||
/**
|
||||
* Disable garbage collection (default: gc=true)
|
||||
*/
|
||||
gc?: boolean | undefined;
|
||||
/**
|
||||
* Will be called before an Item is garbage collected. Return false to keep the Item.
|
||||
*/
|
||||
gcFilter?: ((arg0: Item) => boolean) | undefined;
|
||||
/**
|
||||
* Define a globally unique identifier for this document
|
||||
*/
|
||||
guid?: string | undefined;
|
||||
/**
|
||||
* Associate this document with a collection. This only plays a role if your provider has a concept of collection.
|
||||
*/
|
||||
collectionid?: string | null | undefined;
|
||||
/**
|
||||
* Any kind of meta information you want to associate with this document. If this is a subdocument, remote peers will store the meta information as well.
|
||||
*/
|
||||
meta?: any;
|
||||
/**
|
||||
* If a subdocument, automatically load document. If this is a subdocument, remote peers will load the document as well automatically.
|
||||
*/
|
||||
autoLoad?: boolean | undefined;
|
||||
/**
|
||||
* Whether the document should be synced by the provider now. This is toggled to true when you call ydoc.load()
|
||||
*/
|
||||
shouldLoad?: boolean | undefined;
|
||||
};
|
||||
export type DocEvents = {
|
||||
destroy: (arg0: Doc) => void;
|
||||
load: (arg0: Doc) => void;
|
||||
sync: (arg0: boolean, arg1: Doc) => void;
|
||||
update: (arg0: Uint8Array, arg1: any, arg2: Doc, arg3: Transaction) => void;
|
||||
updateV2: (arg0: Uint8Array, arg1: any, arg2: Doc, arg3: Transaction) => void;
|
||||
beforeAllTransactions: (arg0: Doc) => void;
|
||||
beforeTransaction: (arg0: Transaction, arg1: Doc) => void;
|
||||
beforeObserverCalls: (arg0: Transaction, arg1: Doc) => void;
|
||||
afterTransaction: (arg0: Transaction, arg1: Doc) => void;
|
||||
afterTransactionCleanup: (arg0: Transaction, arg1: Doc) => void;
|
||||
afterAllTransactions: (arg0: Doc, arg1: Array<Transaction>) => void;
|
||||
subdocs: (arg0: {
|
||||
loaded: Set<Doc>;
|
||||
added: Set<Doc>;
|
||||
removed: Set<Doc>;
|
||||
}, arg1: Doc, arg2: Transaction) => void;
|
||||
};
|
||||
import * as random from "lib0/random";
|
||||
import { ObservableV2 } from "lib0/observable";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
import { YEvent } from "./YEvent.js";
|
||||
import { StructStore } from "./StructStore.js";
|
||||
import { Transaction } from "./Transaction.js";
|
||||
import { YArray } from "../types/YArray.js";
|
||||
import { YText } from "../types/YText.js";
|
||||
import { YMap } from "../types/YMap.js";
|
||||
import { YXmlElement } from "../types/YXmlElement.js";
|
||||
import { YXmlFragment } from "../types/YXmlFragment.js";
|
||||
//# sourceMappingURL=Doc.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/Doc.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/Doc.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Doc.d.ts","sourceRoot":"","sources":["../../../src/utils/Doc.js"],"names":[],"mappings":"AAsBA,uDAAgD;AAEhD;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;GAGG;AACH;IACE;;OAEG;IACH,+EAFW,OAAO,EAsFjB;IAlFC,YAAY;IACZ,iBAnCmB,IAAI,KAAE,OAAO,CAmCR;IACxB,iBAAqC;IACrC,aAAgB;IAChB,4BAAgC;IAChC;;OAEG;IACH,OAFU,IAAI,MAAM,EAAE,aAAa,OAAO,GAAG,CAAC,CAAC,CAAC,CAE1B;IACtB,mBAA8B;IAC9B;;OAEG;IACH,cAFU,WAAW,GAAG,IAAI,CAEJ;IACxB;;OAEG;IACH,sBAFU,MAAM,WAAW,CAAC,CAEE;IAC9B;;OAEG;IACH,SAFU,IAAI,GAAG,CAAC,CAEM;IACxB;;;OAGG;IACH,OAFU,IAAI,QAEG;IACjB,oBAA4B;IAC5B,kBAAwB;IACxB,UAAgB;IAChB;;;;;OAKG;IACH,UAFU,OAAO,CAEI;IACrB;;;;;;OAMG;IACH,kBAAqB;IACrB,qBAAwB;IACxB;;OAEG;IACH,yBAKE;IAeE,yBAAwC;IAe9C;;;;;;OAMG;IACH,aAQC;IAED,uBAEC;IAED,8BAEC;IAED;;;;;;;;;;;;OAYG;IACH,6BANoB,WAAW,iBACpB,GAAG,KAOb;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH;;aANW,MAAM,8CAsChB;IAED;;;;;;OAMG;IACH,6DAEC;IAED;;;;;OAKG;IACH,2CAJY,KAAK,CAMhB;IAED;;;;;;OAMG;IACH,yDAEC;IAED;;;;;OAKG;IACH,iDAJY,WAAW,CAMtB;IAED;;;;;OAKG;IACH,kDAJY,YAAY,CAMvB;IAED;;;;;;;OAOG;IACH;YAFmB,MAAM,GAAE,GAAG;MAa7B;CA2BF;;;;;;;;;uBA/TsB,IAAI,KAAE,OAAO;;;;;;;;;;;;WAGtB,GAAG;;;;;;;;;;;oBAOM,GAAG,KAAE,IAAI;iBACT,GAAG,KAAE,IAAI;iBACT,OAAO,QAAE,GAAG,KAAE,IAAI;mBAClB,UAAU,QAAE,GAAG,QAAE,GAAG,QAAE,WAAW,KAAE,IAAI;qBACvC,UAAU,QAAE,GAAG,QAAE,GAAG,QAAE,WAAW,KAAE,IAAI;kCACvC,GAAG,KAAE,IAAI;8BACT,WAAW,QAAE,GAAG,KAAE,IAAI;gCACtB,WAAW,QAAE,GAAG,KAAE,IAAI;6BACtB,WAAW,QAAE,GAAG,KAAE,IAAI;oCACtB,WAAW,QAAE,GAAG,KAAE,IAAI;iCACtB,GAAG,QAAE,MAAM,WAAW,CAAC,KAAE,IAAI;oBAC7B;QAAE,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC;QAAC,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC;QAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAA;KAAE,QAAE,GAAG,QAAE,WAAW,KAAE,IAAI"}
|
||||
19
yjs-poll/node_modules/yjs/dist/src/utils/EventHandler.d.ts
generated
vendored
Normal file
19
yjs-poll/node_modules/yjs/dist/src/utils/EventHandler.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* General event handler implementation.
|
||||
*
|
||||
* @template ARG0, ARG1
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export class EventHandler<ARG0, ARG1> {
|
||||
/**
|
||||
* @type {Array<function(ARG0, ARG1):void>}
|
||||
*/
|
||||
l: ((arg0: ARG0, arg1: ARG1) => void)[];
|
||||
}
|
||||
export function createEventHandler<ARG0, ARG1>(): EventHandler<ARG0, ARG1>;
|
||||
export function addEventHandlerListener<ARG0, ARG1>(eventHandler: EventHandler<ARG0, ARG1>, f: (arg0: ARG0, arg1: ARG1) => void): number;
|
||||
export function removeEventHandlerListener<ARG0, ARG1>(eventHandler: EventHandler<ARG0, ARG1>, f: (arg0: ARG0, arg1: ARG1) => void): void;
|
||||
export function removeAllEventHandlerListeners<ARG0, ARG1>(eventHandler: EventHandler<ARG0, ARG1>): void;
|
||||
export function callEventHandlerListeners<ARG0, ARG1>(eventHandler: EventHandler<ARG0, ARG1>, arg0: ARG0, arg1: ARG1): void;
|
||||
//# sourceMappingURL=EventHandler.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/EventHandler.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/EventHandler.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"EventHandler.d.ts","sourceRoot":"","sources":["../../../src/utils/EventHandler.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH;IAEI;;OAEG;IACH,WAFyB,IAAI,QAAE,IAAI,KAAE,IAAI,IAE9B;CAEd;AASM,2EAAmD;AAanD,2HALwB,IAAI,UAMX;AAajB,8HANwB,IAAI,QAalC;AAUM,yGAEN;AAcM,4HACkC"}
|
||||
26
yjs-poll/node_modules/yjs/dist/src/utils/ID.d.ts
generated
vendored
Normal file
26
yjs-poll/node_modules/yjs/dist/src/utils/ID.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
export class ID {
|
||||
/**
|
||||
* @param {number} client client id
|
||||
* @param {number} clock unique per client id, continuous number
|
||||
*/
|
||||
constructor(client: number, clock: number);
|
||||
/**
|
||||
* Client id
|
||||
* @type {number}
|
||||
*/
|
||||
client: number;
|
||||
/**
|
||||
* unique per client id, continuous number
|
||||
* @type {number}
|
||||
*/
|
||||
clock: number;
|
||||
}
|
||||
export function compareIDs(a: ID | null, b: ID | null): boolean;
|
||||
export function createID(client: number, clock: number): ID;
|
||||
export function writeID(encoder: encoding.Encoder, id: ID): void;
|
||||
export function readID(decoder: decoding.Decoder): ID;
|
||||
export function findRootTypeKey(type: AbstractType<any>): string;
|
||||
import * as encoding from "lib0/encoding";
|
||||
import * as decoding from "lib0/decoding";
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
//# sourceMappingURL=ID.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/ID.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/ID.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ID.d.ts","sourceRoot":"","sources":["../../../src/utils/ID.js"],"names":[],"mappings":"AAMA;IACE;;;OAGG;IACH,oBAHW,MAAM,SACN,MAAM,EAahB;IAVC;;;OAGG;IACH,QAFU,MAAM,CAEI;IACpB;;;OAGG;IACH,OAFU,MAAM,CAEE;CAErB;AASM,8BANI,EAAE,GAAG,IAAI,KACT,EAAE,GAAG,IAAI,GACR,OAAO,CAIsG;AASlH,iCANI,MAAM,SACN,MAAM,MAK+C;AASzD,iCANI,SAAS,OAAO,MAChB,EAAE,QAQZ;AAaM,gCANI,SAAS,OAAO,GACf,EAAE,CAM0D;AAajE,sCANI,aAAa,GAAG,CAAC,GAChB,MAAM,CAajB"}
|
||||
42
yjs-poll/node_modules/yjs/dist/src/utils/PermanentUserData.d.ts
generated
vendored
Normal file
42
yjs-poll/node_modules/yjs/dist/src/utils/PermanentUserData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
export class PermanentUserData {
|
||||
/**
|
||||
* @param {Doc} doc
|
||||
* @param {YMap<any>} [storeType]
|
||||
*/
|
||||
constructor(doc: Doc, storeType?: YMap<any> | undefined);
|
||||
yusers: YMap<any>;
|
||||
doc: Doc;
|
||||
/**
|
||||
* Maps from clientid to userDescription
|
||||
*
|
||||
* @type {Map<number,string>}
|
||||
*/
|
||||
clients: Map<number, string>;
|
||||
dss: Map<string, DeleteSet>;
|
||||
/**
|
||||
* @param {Doc} doc
|
||||
* @param {number} clientid
|
||||
* @param {string} userDescription
|
||||
* @param {Object} conf
|
||||
* @param {function(Transaction, DeleteSet):boolean} [conf.filter]
|
||||
*/
|
||||
setUserMapping(doc: Doc, clientid: number, userDescription: string, { filter }?: {
|
||||
filter?: ((arg0: Transaction, arg1: DeleteSet) => boolean) | undefined;
|
||||
}): void;
|
||||
/**
|
||||
* @param {number} clientid
|
||||
* @return {any}
|
||||
*/
|
||||
getUserByClientId(clientid: number): any;
|
||||
/**
|
||||
* @param {ID} id
|
||||
* @return {string | null}
|
||||
*/
|
||||
getUserByDeletedId(id: ID): string | null;
|
||||
}
|
||||
import { YMap } from "../types/YMap.js";
|
||||
import { Doc } from "./Doc.js";
|
||||
import { DeleteSet } from "./DeleteSet.js";
|
||||
import { Transaction } from "./Transaction.js";
|
||||
import { ID } from "./ID.js";
|
||||
//# sourceMappingURL=PermanentUserData.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/PermanentUserData.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/PermanentUserData.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"PermanentUserData.d.ts","sourceRoot":"","sources":["../../../src/utils/PermanentUserData.js"],"names":[],"mappings":"AAaA;IACE;;;OAGG;IACH,iBAHW,GAAG,qCAmDb;IA3CC,kBAAuB;IACvB,SAAc;IACd;;;;OAIG;IACH,SAFU,IAAI,MAAM,EAAC,MAAM,CAAC,CAEJ;IACxB,4BAAc;IAqChB;;;;;;OAMG;IACH,oBANW,GAAG,YACH,MAAM,mBACN,MAAM;QAE0C,MAAM,WAA7C,WAAW,QAAE,SAAS,KAAE,OAAO;aA6ClD;IAED;;;OAGG;IACH,4BAHW,MAAM,GACL,GAAG,CAId;IAED;;;OAGG;IACH,uBAHW,EAAE,GACD,MAAM,GAAG,IAAI,CASxB;CACF"}
|
||||
91
yjs-poll/node_modules/yjs/dist/src/utils/RelativePosition.d.ts
generated
vendored
Normal file
91
yjs-poll/node_modules/yjs/dist/src/utils/RelativePosition.d.ts
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* A relative position is based on the Yjs model and is not affected by document changes.
|
||||
* E.g. If you place a relative position before a certain character, it will always point to this character.
|
||||
* If you place a relative position at the end of a type, it will always point to the end of the type.
|
||||
*
|
||||
* A numeric position is often unsuited for user selections, because it does not change when content is inserted
|
||||
* before or after.
|
||||
*
|
||||
* ```Insert(0, 'x')('a|bc') = 'xa|bc'``` Where | is the relative position.
|
||||
*
|
||||
* One of the properties must be defined.
|
||||
*
|
||||
* @example
|
||||
* // Current cursor position is at position 10
|
||||
* const relativePosition = createRelativePositionFromIndex(yText, 10)
|
||||
* // modify yText
|
||||
* yText.insert(0, 'abc')
|
||||
* yText.delete(3, 10)
|
||||
* // Compute the cursor position
|
||||
* const absolutePosition = createAbsolutePositionFromRelativePosition(y, relativePosition)
|
||||
* absolutePosition.type === yText // => true
|
||||
* console.log('cursor location is ' + absolutePosition.index) // => cursor location is 3
|
||||
*
|
||||
*/
|
||||
export class RelativePosition {
|
||||
/**
|
||||
* @param {ID|null} type
|
||||
* @param {string|null} tname
|
||||
* @param {ID|null} item
|
||||
* @param {number} assoc
|
||||
*/
|
||||
constructor(type: ID | null, tname: string | null, item: ID | null, assoc?: number);
|
||||
/**
|
||||
* @type {ID|null}
|
||||
*/
|
||||
type: ID | null;
|
||||
/**
|
||||
* @type {string|null}
|
||||
*/
|
||||
tname: string | null;
|
||||
/**
|
||||
* @type {ID | null}
|
||||
*/
|
||||
item: ID | null;
|
||||
/**
|
||||
* A relative position is associated to a specific character. By default
|
||||
* assoc >= 0, the relative position is associated to the character
|
||||
* after the meant position.
|
||||
* I.e. position 1 in 'ab' is associated to character 'b'.
|
||||
*
|
||||
* If assoc < 0, then the relative position is associated to the character
|
||||
* before the meant position.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
assoc: number;
|
||||
}
|
||||
export function relativePositionToJSON(rpos: RelativePosition): any;
|
||||
export function createRelativePositionFromJSON(json: any): RelativePosition;
|
||||
export class AbsolutePosition {
|
||||
/**
|
||||
* @param {AbstractType<any>} type
|
||||
* @param {number} index
|
||||
* @param {number} [assoc]
|
||||
*/
|
||||
constructor(type: AbstractType<any>, index: number, assoc?: number | undefined);
|
||||
/**
|
||||
* @type {AbstractType<any>}
|
||||
*/
|
||||
type: AbstractType<any>;
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
index: number;
|
||||
assoc: number;
|
||||
}
|
||||
export function createAbsolutePosition(type: AbstractType<any>, index: number, assoc?: number | undefined): AbsolutePosition;
|
||||
export function createRelativePosition(type: AbstractType<any>, item: ID | null, assoc?: number | undefined): RelativePosition;
|
||||
export function createRelativePositionFromTypeIndex(type: AbstractType<any>, index: number, assoc?: number | undefined): RelativePosition;
|
||||
export function writeRelativePosition(encoder: encoding.Encoder, rpos: RelativePosition): encoding.Encoder;
|
||||
export function encodeRelativePosition(rpos: RelativePosition): Uint8Array;
|
||||
export function readRelativePosition(decoder: decoding.Decoder): RelativePosition;
|
||||
export function decodeRelativePosition(uint8Array: Uint8Array): RelativePosition;
|
||||
export function createAbsolutePositionFromRelativePosition(rpos: RelativePosition, doc: Doc, followUndoneDeletions?: boolean): AbsolutePosition | null;
|
||||
export function compareRelativePositions(a: RelativePosition | null, b: RelativePosition | null): boolean;
|
||||
import { ID } from "./ID.js";
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
import * as encoding from "lib0/encoding";
|
||||
import * as decoding from "lib0/decoding";
|
||||
import { Doc } from "./Doc.js";
|
||||
//# sourceMappingURL=RelativePosition.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/RelativePosition.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/RelativePosition.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"RelativePosition.d.ts","sourceRoot":"","sources":["../../../src/utils/RelativePosition.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IACE;;;;;OAKG;IACH,kBALW,EAAE,GAAC,IAAI,SACP,MAAM,GAAC,IAAI,QACX,EAAE,GAAC,IAAI,UACP,MAAM,EA2BhB;IAxBC;;OAEG;IACH,MAFU,EAAE,GAAC,IAAI,CAED;IAChB;;OAEG;IACH,OAFU,MAAM,GAAC,IAAI,CAEH;IAClB;;OAEG;IACH,MAFU,EAAE,GAAG,IAAI,CAEH;IAChB;;;;;;;;;;OAUG;IACH,OAFU,MAAM,CAEE;CAErB;AAMM,6CAHI,gBAAgB,GACf,GAAG,CAiBd;AAQM,qDALI,GAAG,GACF,gBAAgB,CAIuP;AAEnR;IACE;;;;OAIG;IACH,kBAJW,aAAa,GAAG,CAAC,SACjB,MAAM,8BAahB;IATC;;OAEG;IACH,MAFU,aAAa,GAAG,CAAC,CAEX;IAChB;;OAEG;IACH,OAFU,MAAM,CAEE;IAClB,cAAkB;CAErB;AASM,6CANI,aAAa,GAAG,CAAC,SACjB,MAAM,gDAKyF;AASnG,6CANI,aAAa,GAAG,CAAC,QACjB,EAAE,GAAC,IAAI,gDAcjB;AAYM,0DAPI,aAAa,GAAG,CAAC,SACjB,MAAM,+BAEL,gBAAgB,CA4B3B;AAQM,+CALI,SAAS,OAAO,QAChB,gBAAgB,oBAsB1B;AAMM,6CAHI,gBAAgB,GACf,UAAU,CAMrB;AAQM,8CALI,SAAS,OAAO,GACf,gBAAgB,CAwB3B;AAMM,mDAHI,UAAU,GACT,gBAAgB,CAEgF;AAgCrG,iEAPI,gBAAgB,OAChB,GAAG,0BACH,OAAO,GACN,gBAAgB,GAAC,IAAI,CAyDhC;AASM,4CANI,gBAAgB,GAAC,IAAI,KACrB,gBAAgB,GAAC,IAAI,GACpB,OAAO,CAMlB"}
|
||||
40
yjs-poll/node_modules/yjs/dist/src/utils/Snapshot.d.ts
generated
vendored
Normal file
40
yjs-poll/node_modules/yjs/dist/src/utils/Snapshot.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
export class Snapshot {
|
||||
/**
|
||||
* @param {DeleteSet} ds
|
||||
* @param {Map<number,number>} sv state map
|
||||
*/
|
||||
constructor(ds: DeleteSet, sv: Map<number, number>);
|
||||
/**
|
||||
* @type {DeleteSet}
|
||||
*/
|
||||
ds: DeleteSet;
|
||||
/**
|
||||
* State Map
|
||||
* @type {Map<number,number>}
|
||||
*/
|
||||
sv: Map<number, number>;
|
||||
}
|
||||
export function equalSnapshots(snap1: Snapshot, snap2: Snapshot): boolean;
|
||||
export function encodeSnapshotV2(snapshot: Snapshot, encoder?: DSEncoderV1 | DSEncoderV2 | undefined): Uint8Array;
|
||||
export function encodeSnapshot(snapshot: Snapshot): Uint8Array;
|
||||
export function decodeSnapshotV2(buf: Uint8Array, decoder?: DSDecoderV1 | DSDecoderV2 | undefined): Snapshot;
|
||||
export function decodeSnapshot(buf: Uint8Array): Snapshot;
|
||||
export function createSnapshot(ds: DeleteSet, sm: Map<number, number>): Snapshot;
|
||||
export const emptySnapshot: Snapshot;
|
||||
export function snapshot(doc: Doc): Snapshot;
|
||||
export function isVisible(item: Item, snapshot: Snapshot | undefined): boolean;
|
||||
export function splitSnapshotAffectedStructs(transaction: Transaction, snapshot: Snapshot): void;
|
||||
export function createDocFromSnapshot(originDoc: Doc, snapshot: Snapshot, newDoc?: Doc | undefined): Doc;
|
||||
export function snapshotContainsUpdateV2(snapshot: Snapshot, update: Uint8Array, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2 | undefined): boolean;
|
||||
export function snapshotContainsUpdate(snapshot: Snapshot, update: Uint8Array): boolean;
|
||||
import { DeleteSet } from "./DeleteSet.js";
|
||||
import { DSEncoderV1 } from "./UpdateEncoder.js";
|
||||
import { DSEncoderV2 } from "./UpdateEncoder.js";
|
||||
import { DSDecoderV1 } from "./UpdateDecoder.js";
|
||||
import { DSDecoderV2 } from "./UpdateDecoder.js";
|
||||
import { Doc } from "./Doc.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { Transaction } from "./Transaction.js";
|
||||
import { UpdateDecoderV1 } from "./UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "./UpdateDecoder.js";
|
||||
//# sourceMappingURL=Snapshot.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/Snapshot.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/Snapshot.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Snapshot.d.ts","sourceRoot":"","sources":["../../../src/utils/Snapshot.js"],"names":[],"mappings":"AA2BA;IACE;;;OAGG;IACH,gBAHW,SAAS,MACT,IAAI,MAAM,EAAC,MAAM,CAAC,EAY5B;IATC;;OAEG;IACH,IAFU,SAAS,CAEP;IACZ;;;OAGG;IACH,IAFU,IAAI,MAAM,EAAC,MAAM,CAAC,CAEhB;CAEf;AAOM,sCAJI,QAAQ,SACR,QAAQ,GACP,OAAO,CA6BlB;AAOM,2CAJI,QAAQ,oDAEP,UAAU,CAMrB;AAMM,yCAHI,QAAQ,GACP,UAAU,CAEiE;AAOhF,sCAJI,UAAU,oDAET,QAAQ,CAInB;AAMM,oCAHI,UAAU,GACT,QAAQ,CAEoF;AAOjG,mCAJI,SAAS,MACT,IAAI,MAAM,EAAC,MAAM,CAAC,GACjB,QAAQ,CAE0C;AAE9D,qCAAyE;AAMlE,8BAHI,GAAG,GACF,QAAQ,CAE+F;AAS5G,gCANI,IAAI,YACJ,QAAQ,GAAC,SAAS,WAOoG;AAM1H,0DAHI,WAAW,YACX,QAAQ,QAelB;AAgBM,iDALI,GAAG,YACH,QAAQ,6BAEP,GAAG,CA0Cd;AAOM,mDAJI,QAAQ,UACR,UAAU,mFAepB;AAMM,iDAHI,QAAQ,UACR,UAAU,WAEkG"}
|
||||
34
yjs-poll/node_modules/yjs/dist/src/utils/StructStore.d.ts
generated
vendored
Normal file
34
yjs-poll/node_modules/yjs/dist/src/utils/StructStore.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
export class StructStore {
|
||||
/**
|
||||
* @type {Map<number,Array<GC|Item>>}
|
||||
*/
|
||||
clients: Map<number, Array<GC | Item>>;
|
||||
/**
|
||||
* @type {null | { missing: Map<number, number>, update: Uint8Array }}
|
||||
*/
|
||||
pendingStructs: {
|
||||
missing: Map<number, number>;
|
||||
update: Uint8Array;
|
||||
} | null;
|
||||
/**
|
||||
* @type {null | Uint8Array}
|
||||
*/
|
||||
pendingDs: null | Uint8Array;
|
||||
}
|
||||
export function getStateVector(store: StructStore): Map<number, number>;
|
||||
export function getState(store: StructStore, client: number): number;
|
||||
export function integrityCheck(store: StructStore): void;
|
||||
export function addStruct(store: StructStore, struct: GC | Item): void;
|
||||
export function findIndexSS(structs: Array<Item | GC>, clock: number): number;
|
||||
export function find(store: StructStore, id: ID): GC | Item;
|
||||
export function getItem(arg0: StructStore, arg1: ID): Item;
|
||||
export function findIndexCleanStart(transaction: Transaction, structs: Array<Item | GC>, clock: number): number;
|
||||
export function getItemCleanStart(transaction: Transaction, id: ID): Item;
|
||||
export function getItemCleanEnd(transaction: Transaction, store: StructStore, id: ID): Item;
|
||||
export function replaceStruct(store: StructStore, struct: GC | Item, newStruct: GC | Item): void;
|
||||
export function iterateStructs(transaction: Transaction, structs: Array<Item | GC>, clockStart: number, len: number, f: (arg0: GC | Item) => void): void;
|
||||
import { GC } from "../structs/GC.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { ID } from "./ID.js";
|
||||
import { Transaction } from "./Transaction.js";
|
||||
//# sourceMappingURL=StructStore.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/StructStore.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/StructStore.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"StructStore.d.ts","sourceRoot":"","sources":["../../../src/utils/StructStore.js"],"names":[],"mappings":"AASA;IAEI;;OAEG;IACH,SAFU,IAAI,MAAM,EAAC,MAAM,EAAE,GAAC,IAAI,CAAC,CAAC,CAEZ;IACxB;;OAEG;IACH;iBAF4B,IAAI,MAAM,EAAE,MAAM,CAAC;gBAAU,UAAU;aAEzC;IAC1B;;OAEG;IACH,WAFU,IAAI,GAAG,UAAU,CAEN;CAExB;AAYM,sCANI,WAAW,GACV,IAAI,MAAM,EAAC,MAAM,CAAC,CAY7B;AAUM,gCAPI,WAAW,UACX,MAAM,GACL,MAAM,CAYjB;AAQM,sCALI,WAAW,QAerB;AASM,iCANI,WAAW,UACX,EAAE,GAAC,IAAI,QAiBjB;AAWM,qCAPI,MAAM,IAAI,GAAC,EAAE,CAAC,SACd,MAAM,GACL,MAAM,CAiCjB;AAYM,4BAPI,WAAW,MACX,EAAE,GACD,EAAE,GAAC,IAAI,CAYlB;AAOiC,8BAAS,WAAW,QAAC,EAAE,GAAE,IAAI,CAAA;AAOxD,iDAJI,WAAW,WACX,MAAM,IAAI,GAAC,EAAE,CAAC,SACd,MAAM,UAUhB;AAYM,+CAPI,WAAW,MACX,EAAE,GACD,IAAI,CAQf;AAaM,6CARI,WAAW,SACX,WAAW,MACX,EAAE,GACD,IAAI,CAiBf;AAWM,qCAPI,WAAW,UACX,EAAE,GAAC,IAAI,aACP,EAAE,GAAC,IAAI,QAQjB;AAaM,4CARI,WAAW,WACX,MAAM,IAAI,GAAC,EAAE,CAAC,cACd,MAAM,OACN,MAAM,YACG,EAAE,GAAC,IAAI,KAAE,IAAI,QAkBhC"}
|
||||
115
yjs-poll/node_modules/yjs/dist/src/utils/Transaction.d.ts
generated
vendored
Normal file
115
yjs-poll/node_modules/yjs/dist/src/utils/Transaction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
/**
|
||||
* A transaction is created for every change on the Yjs model. It is possible
|
||||
* to bundle changes on the Yjs model in a single transaction to
|
||||
* minimize the number on messages sent and the number of observer calls.
|
||||
* If possible the user of this library should bundle as many changes as
|
||||
* possible. Here is an example to illustrate the advantages of bundling:
|
||||
*
|
||||
* @example
|
||||
* const ydoc = new Y.Doc()
|
||||
* const map = ydoc.getMap('map')
|
||||
* // Log content when change is triggered
|
||||
* map.observe(() => {
|
||||
* console.log('change triggered')
|
||||
* })
|
||||
* // Each change on the map type triggers a log message:
|
||||
* map.set('a', 0) // => "change triggered"
|
||||
* map.set('b', 0) // => "change triggered"
|
||||
* // When put in a transaction, it will trigger the log after the transaction:
|
||||
* ydoc.transact(() => {
|
||||
* map.set('a', 1)
|
||||
* map.set('b', 1)
|
||||
* }) // => "change triggered"
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export class Transaction {
|
||||
/**
|
||||
* @param {Doc} doc
|
||||
* @param {any} origin
|
||||
* @param {boolean} local
|
||||
*/
|
||||
constructor(doc: Doc, origin: any, local: boolean);
|
||||
/**
|
||||
* The Yjs instance.
|
||||
* @type {Doc}
|
||||
*/
|
||||
doc: Doc;
|
||||
/**
|
||||
* Describes the set of deleted items by ids
|
||||
* @type {DeleteSet}
|
||||
*/
|
||||
deleteSet: DeleteSet;
|
||||
/**
|
||||
* Holds the state before the transaction started.
|
||||
* @type {Map<Number,Number>}
|
||||
*/
|
||||
beforeState: Map<number, number>;
|
||||
/**
|
||||
* Holds the state after the transaction.
|
||||
* @type {Map<Number,Number>}
|
||||
*/
|
||||
afterState: Map<number, number>;
|
||||
/**
|
||||
* All types that were directly modified (property added or child
|
||||
* inserted/deleted). New types are not included in this Set.
|
||||
* Maps from type to parentSubs (`item.parentSub = null` for YArray)
|
||||
* @type {Map<AbstractType<YEvent<any>>,Set<String|null>>}
|
||||
*/
|
||||
changed: Map<AbstractType<YEvent<any>>, Set<string | null>>;
|
||||
/**
|
||||
* Stores the events for the types that observe also child elements.
|
||||
* It is mainly used by `observeDeep`.
|
||||
* @type {Map<AbstractType<YEvent<any>>,Array<YEvent<any>>>}
|
||||
*/
|
||||
changedParentTypes: Map<AbstractType<YEvent<any>>, Array<YEvent<any>>>;
|
||||
/**
|
||||
* @type {Array<AbstractStruct>}
|
||||
*/
|
||||
_mergeStructs: Array<AbstractStruct>;
|
||||
/**
|
||||
* @type {any}
|
||||
*/
|
||||
origin: any;
|
||||
/**
|
||||
* Stores meta information on the transaction
|
||||
* @type {Map<any,any>}
|
||||
*/
|
||||
meta: Map<any, any>;
|
||||
/**
|
||||
* Whether this change originates from this doc.
|
||||
* @type {boolean}
|
||||
*/
|
||||
local: boolean;
|
||||
/**
|
||||
* @type {Set<Doc>}
|
||||
*/
|
||||
subdocsAdded: Set<Doc>;
|
||||
/**
|
||||
* @type {Set<Doc>}
|
||||
*/
|
||||
subdocsRemoved: Set<Doc>;
|
||||
/**
|
||||
* @type {Set<Doc>}
|
||||
*/
|
||||
subdocsLoaded: Set<Doc>;
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
_needFormattingCleanup: boolean;
|
||||
}
|
||||
export function writeUpdateMessageFromTransaction(encoder: UpdateEncoderV1 | UpdateEncoderV2, transaction: Transaction): boolean;
|
||||
export function nextID(transaction: Transaction): import("./ID.js").ID;
|
||||
export function addChangedTypeToTransaction(transaction: Transaction, type: AbstractType<YEvent<any>>, parentSub: string | null): void;
|
||||
export function tryGc(ds: DeleteSet, store: StructStore, gcFilter: (arg0: Item) => boolean): void;
|
||||
export function transact<T>(doc: Doc, f: (arg0: Transaction) => T, origin?: any, local?: boolean): T;
|
||||
import { Doc } from "./Doc.js";
|
||||
import { DeleteSet } from "./DeleteSet.js";
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
import { YEvent } from "./YEvent.js";
|
||||
import { AbstractStruct } from "../structs/AbstractStruct.js";
|
||||
import { UpdateEncoderV1 } from "./UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "./UpdateEncoder.js";
|
||||
import { StructStore } from "./StructStore.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
//# sourceMappingURL=Transaction.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/Transaction.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/Transaction.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/utils/Transaction.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IACE;;;;OAIG;IACH,iBAJW,GAAG,UACH,GAAG,SACH,OAAO,EAsEjB;IAnEC;;;OAGG;IACH,KAFU,GAAG,CAEC;IACd;;;OAGG;IACH,WAFU,SAAS,CAEa;IAChC;;;OAGG;IACH,aAFU,mBAAkB,CAEgB;IAC5C;;;OAGG;IACH,YAFU,mBAAkB,CAED;IAC3B;;;;;OAKG;IACH,SAFU,IAAI,aAAa,OAAO,GAAG,CAAC,CAAC,EAAC,IAAI,SAAO,IAAI,CAAC,CAAC,CAEjC;IACxB;;;;OAIG;IACH,oBAFU,IAAI,aAAa,OAAO,GAAG,CAAC,CAAC,EAAC,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC,CAExB;IACnC;;OAEG;IACH,eAFU,MAAM,cAAc,CAAC,CAER;IACvB;;OAEG;IACH,QAFU,GAAG,CAEO;IACpB;;;OAGG;IACH,MAFU,IAAI,GAAG,EAAC,GAAG,CAAC,CAED;IACrB;;;OAGG;IACH,OAFU,OAAO,CAEC;IAClB;;OAEG;IACH,cAFU,IAAI,GAAG,CAAC,CAEW;IAC7B;;OAEG;IACH,gBAFU,IAAI,GAAG,CAAC,CAEa;IAC/B;;OAEG;IACH,eAFU,IAAI,GAAG,CAAC,CAEY;IAC9B;;OAEG;IACH,wBAFU,OAAO,CAEkB;CAEtC;AAOM,2DAJI,eAAe,GAAG,eAAe,eACjC,WAAW,GACV,OAAO,CAUlB;AAQM,oCALI,WAAW,wBAQrB;AAUM,yDAJI,WAAW,QACX,aAAa,OAAO,GAAG,CAAC,CAAC,aACzB,MAAM,GAAC,IAAI,QAOrB;AAuFM,0BAJI,SAAS,SACT,WAAW,mBACF,IAAI,KAAE,OAAO,QAKhC;AA8JM,iCAPI,GAAG,YACM,WAAW,iBACpB,GAAG,sBAyCb"}
|
||||
189
yjs-poll/node_modules/yjs/dist/src/utils/UndoManager.d.ts
generated
vendored
Normal file
189
yjs-poll/node_modules/yjs/dist/src/utils/UndoManager.d.ts
generated
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
export class StackItem {
|
||||
/**
|
||||
* @param {DeleteSet} deletions
|
||||
* @param {DeleteSet} insertions
|
||||
*/
|
||||
constructor(deletions: DeleteSet, insertions: DeleteSet);
|
||||
insertions: DeleteSet;
|
||||
deletions: DeleteSet;
|
||||
/**
|
||||
* Use this to save and restore metadata like selection range
|
||||
*/
|
||||
meta: Map<any, any>;
|
||||
}
|
||||
/**
|
||||
* @typedef {Object} UndoManagerOptions
|
||||
* @property {number} [UndoManagerOptions.captureTimeout=500]
|
||||
* @property {function(Transaction):boolean} [UndoManagerOptions.captureTransaction] Do not capture changes of a Transaction if result false.
|
||||
* @property {function(Item):boolean} [UndoManagerOptions.deleteFilter=()=>true] Sometimes
|
||||
* it is necessary to filter what an Undo/Redo operation can delete. If this
|
||||
* filter returns false, the type/item won't be deleted even it is in the
|
||||
* undo/redo scope.
|
||||
* @property {Set<any>} [UndoManagerOptions.trackedOrigins=new Set([null])]
|
||||
* @property {boolean} [ignoreRemoteMapChanges] Experimental. By default, the UndoManager will never overwrite remote changes. Enable this property to enable overwriting remote changes on key-value changes (Y.Map, properties on Y.Xml, etc..).
|
||||
* @property {Doc} [doc] The document that this UndoManager operates on. Only needed if typeScope is empty.
|
||||
*/
|
||||
/**
|
||||
* @typedef {Object} StackItemEvent
|
||||
* @property {StackItem} StackItemEvent.stackItem
|
||||
* @property {any} StackItemEvent.origin
|
||||
* @property {'undo'|'redo'} StackItemEvent.type
|
||||
* @property {Map<AbstractType<YEvent<any>>,Array<YEvent<any>>>} StackItemEvent.changedParentTypes
|
||||
*/
|
||||
/**
|
||||
* Fires 'stack-item-added' event when a stack item was added to either the undo- or
|
||||
* the redo-stack. You may store additional stack information via the
|
||||
* metadata property on `event.stackItem.meta` (it is a `Map` of metadata properties).
|
||||
* Fires 'stack-item-popped' event when a stack item was popped from either the
|
||||
* undo- or the redo-stack. You may restore the saved stack information from `event.stackItem.meta`.
|
||||
*
|
||||
* @extends {ObservableV2<{'stack-item-added':function(StackItemEvent, UndoManager):void, 'stack-item-popped': function(StackItemEvent, UndoManager):void, 'stack-cleared': function({ undoStackCleared: boolean, redoStackCleared: boolean }):void, 'stack-item-updated': function(StackItemEvent, UndoManager):void }>}
|
||||
*/
|
||||
export class UndoManager extends ObservableV2<{
|
||||
'stack-item-added': (arg0: StackItemEvent, arg1: UndoManager) => void;
|
||||
'stack-item-popped': (arg0: StackItemEvent, arg1: UndoManager) => void;
|
||||
'stack-cleared': (arg0: {
|
||||
undoStackCleared: boolean;
|
||||
redoStackCleared: boolean;
|
||||
}) => void;
|
||||
'stack-item-updated': (arg0: StackItemEvent, arg1: UndoManager) => void;
|
||||
}> {
|
||||
/**
|
||||
* @param {Doc|AbstractType<any>|Array<AbstractType<any>>} typeScope Limits the scope of the UndoManager. If this is set to a ydoc instance, all changes on that ydoc will be undone. If set to a specific type, only changes on that type or its children will be undone. Also accepts an array of types.
|
||||
* @param {UndoManagerOptions} options
|
||||
*/
|
||||
constructor(typeScope: Doc | AbstractType<any> | Array<AbstractType<any>>, { captureTimeout, captureTransaction, deleteFilter, trackedOrigins, ignoreRemoteMapChanges, doc }?: UndoManagerOptions);
|
||||
/**
|
||||
* @type {Array<AbstractType<any> | Doc>}
|
||||
*/
|
||||
scope: Array<AbstractType<any> | Doc>;
|
||||
doc: Doc;
|
||||
deleteFilter: (arg0: Item) => boolean;
|
||||
trackedOrigins: Set<any>;
|
||||
captureTransaction: (arg0: Transaction) => boolean;
|
||||
/**
|
||||
* @type {Array<StackItem>}
|
||||
*/
|
||||
undoStack: Array<StackItem>;
|
||||
/**
|
||||
* @type {Array<StackItem>}
|
||||
*/
|
||||
redoStack: Array<StackItem>;
|
||||
/**
|
||||
* Whether the client is currently undoing (calling UndoManager.undo)
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
undoing: boolean;
|
||||
redoing: boolean;
|
||||
/**
|
||||
* The currently popped stack item if UndoManager.undoing or UndoManager.redoing
|
||||
*
|
||||
* @type {StackItem|null}
|
||||
*/
|
||||
currStackItem: StackItem | null;
|
||||
lastChange: number;
|
||||
ignoreRemoteMapChanges: boolean;
|
||||
captureTimeout: number;
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
afterTransactionHandler: (transaction: Transaction) => void;
|
||||
/**
|
||||
* Extend the scope.
|
||||
*
|
||||
* @param {Array<AbstractType<any> | Doc> | AbstractType<any> | Doc} ytypes
|
||||
*/
|
||||
addToScope(ytypes: Array<AbstractType<any> | Doc> | AbstractType<any> | Doc): void;
|
||||
/**
|
||||
* @param {any} origin
|
||||
*/
|
||||
addTrackedOrigin(origin: any): void;
|
||||
/**
|
||||
* @param {any} origin
|
||||
*/
|
||||
removeTrackedOrigin(origin: any): void;
|
||||
clear(clearUndoStack?: boolean, clearRedoStack?: boolean): void;
|
||||
/**
|
||||
* UndoManager merges Undo-StackItem if they are created within time-gap
|
||||
* smaller than `options.captureTimeout`. Call `um.stopCapturing()` so that the next
|
||||
* StackItem won't be merged.
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* // without stopCapturing
|
||||
* ytext.insert(0, 'a')
|
||||
* ytext.insert(1, 'b')
|
||||
* um.undo()
|
||||
* ytext.toString() // => '' (note that 'ab' was removed)
|
||||
* // with stopCapturing
|
||||
* ytext.insert(0, 'a')
|
||||
* um.stopCapturing()
|
||||
* ytext.insert(0, 'b')
|
||||
* um.undo()
|
||||
* ytext.toString() // => 'a' (note that only 'b' was removed)
|
||||
*
|
||||
*/
|
||||
stopCapturing(): void;
|
||||
/**
|
||||
* Undo last changes on type.
|
||||
*
|
||||
* @return {StackItem?} Returns StackItem if a change was applied
|
||||
*/
|
||||
undo(): StackItem | null;
|
||||
/**
|
||||
* Redo last undo operation.
|
||||
*
|
||||
* @return {StackItem?} Returns StackItem if a change was applied
|
||||
*/
|
||||
redo(): StackItem | null;
|
||||
/**
|
||||
* Are undo steps available?
|
||||
*
|
||||
* @return {boolean} `true` if undo is possible
|
||||
*/
|
||||
canUndo(): boolean;
|
||||
/**
|
||||
* Are redo steps available?
|
||||
*
|
||||
* @return {boolean} `true` if redo is possible
|
||||
*/
|
||||
canRedo(): boolean;
|
||||
}
|
||||
export type UndoManagerOptions = {
|
||||
captureTimeout?: number | undefined;
|
||||
/**
|
||||
* Do not capture changes of a Transaction if result false.
|
||||
*/
|
||||
captureTransaction?: ((arg0: Transaction) => boolean) | undefined;
|
||||
/**
|
||||
* Sometimes
|
||||
* it is necessary to filter what an Undo/Redo operation can delete. If this
|
||||
* filter returns false, the type/item won't be deleted even it is in the
|
||||
* undo/redo scope.
|
||||
*/
|
||||
deleteFilter?: ((arg0: Item) => boolean) | undefined;
|
||||
trackedOrigins?: Set<any> | undefined;
|
||||
/**
|
||||
* Experimental. By default, the UndoManager will never overwrite remote changes. Enable this property to enable overwriting remote changes on key-value changes (Y.Map, properties on Y.Xml, etc..).
|
||||
*/
|
||||
ignoreRemoteMapChanges?: boolean | undefined;
|
||||
/**
|
||||
* The document that this UndoManager operates on. Only needed if typeScope is empty.
|
||||
*/
|
||||
doc?: Doc | undefined;
|
||||
};
|
||||
export type StackItemEvent = {
|
||||
stackItem: StackItem;
|
||||
origin: any;
|
||||
type: 'undo' | 'redo';
|
||||
changedParentTypes: Map<AbstractType<YEvent<any>>, Array<YEvent<any>>>;
|
||||
};
|
||||
import { DeleteSet } from "./DeleteSet.js";
|
||||
import { ObservableV2 } from "lib0/observable";
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
import { Doc } from "./Doc.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { Transaction } from "./Transaction.js";
|
||||
import { YEvent } from "./YEvent.js";
|
||||
//# sourceMappingURL=UndoManager.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/UndoManager.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/UndoManager.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"UndoManager.d.ts","sourceRoot":"","sources":["../../../src/utils/UndoManager.js"],"names":[],"mappings":"AAoBA;IACE;;;OAGG;IACH,uBAHW,SAAS,cACT,SAAS,EASnB;IANC,sBAA4B;IAC5B,qBAA0B;IAC1B;;OAEG;IACH,oBAAqB;CAExB;AAgGD;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH;+BAFuD,cAAc,QAAE,WAAW,KAAE,IAAI;gCAAgC,cAAc,QAAE,WAAW,KAAE,IAAI;4BAA4B;QAAE,gBAAgB,EAAE,OAAO,CAAC;QAAC,gBAAgB,EAAE,OAAO,CAAA;KAAE,KAAE,IAAI;iCAAiC,cAAc,QAAE,WAAW,KAAE,IAAI;;IAGnT;;;OAGG;IACH,uBAHW,GAAG,GAAC,aAAa,GAAG,CAAC,GAAC,MAAM,aAAa,GAAG,CAAC,CAAC,sGAC9C,kBAAkB,EA6G5B;IAlGC;;OAEG;IACH,OAFU,MAAM,aAAa,GAAG,CAAC,GAAG,GAAG,CAAC,CAEzB;IACf,SAAc;IAEd,qBA9CmB,IAAI,KAAE,OAAO,CA8CA;IAEhC,yBAAoC;IACpC,2BAlDmB,WAAW,KAAE,OAAO,CAkDK;IAC5C;;OAEG;IACH,WAFU,MAAM,SAAS,CAAC,CAEP;IACnB;;OAEG;IACH,WAFU,MAAM,SAAS,CAAC,CAEP;IACnB;;;;OAIG;IACH,SAFU,OAAO,CAEG;IACpB,iBAAoB;IACpB;;;;OAIG;IACH,eAFU,SAAS,GAAC,IAAI,CAEC;IACzB,mBAAmB;IACnB,gCAAoD;IACpD,uBAAoC;IACpC;;OAEG;IACH,uCAFW,WAAW,UA0DrB;IAOH;;;;OAIG;IACH,mBAFW,MAAM,aAAa,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,aAAa,GAAG,CAAC,GAAG,GAAG,QAYlE;IAED;;OAEG;IACH,yBAFW,GAAG,QAIb;IAED;;OAEG;IACH,4BAFW,GAAG,QAIb;IAED,gEAcC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,sBAEC;IAED;;;;OAIG;IACH,QAFY,SAAS,QAWpB;IAED;;;;OAIG;IACH,QAFY,SAAS,QAWpB;IAED;;;;OAIG;IACH,WAFY,OAAO,CAIlB;IAED;;;;OAIG;IACH,WAFY,OAAO,CAIlB;CAOF;;;;;;iCA3QsB,WAAW,KAAE,OAAO;;;;;;;2BACpB,IAAI,KAAE,OAAO;;;;;;;;;;;;eAWtB,SAAS;YACT,GAAG;UACH,MAAM,GAAC,MAAM;wBACb,IAAI,aAAa,OAAO,GAAG,CAAC,CAAC,EAAC,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC"}
|
||||
167
yjs-poll/node_modules/yjs/dist/src/utils/UpdateDecoder.d.ts
generated
vendored
Normal file
167
yjs-poll/node_modules/yjs/dist/src/utils/UpdateDecoder.d.ts
generated
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
export class DSDecoderV1 {
|
||||
/**
|
||||
* @param {decoding.Decoder} decoder
|
||||
*/
|
||||
constructor(decoder: decoding.Decoder);
|
||||
restDecoder: decoding.Decoder;
|
||||
resetDsCurVal(): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
readDsClock(): number;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
readDsLen(): number;
|
||||
}
|
||||
export class UpdateDecoderV1 extends DSDecoderV1 {
|
||||
/**
|
||||
* @return {ID}
|
||||
*/
|
||||
readLeftID(): ID;
|
||||
/**
|
||||
* @return {ID}
|
||||
*/
|
||||
readRightID(): ID;
|
||||
/**
|
||||
* Read the next client id.
|
||||
* Use this in favor of readID whenever possible to reduce the number of objects created.
|
||||
*/
|
||||
readClient(): number;
|
||||
/**
|
||||
* @return {number} info An unsigned 8-bit integer
|
||||
*/
|
||||
readInfo(): number;
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
readString(): string;
|
||||
/**
|
||||
* @return {boolean} isKey
|
||||
*/
|
||||
readParentInfo(): boolean;
|
||||
/**
|
||||
* @return {number} info An unsigned 8-bit integer
|
||||
*/
|
||||
readTypeRef(): number;
|
||||
/**
|
||||
* Write len of a struct - well suited for Opt RLE encoder.
|
||||
*
|
||||
* @return {number} len
|
||||
*/
|
||||
readLen(): number;
|
||||
/**
|
||||
* @return {any}
|
||||
*/
|
||||
readAny(): any;
|
||||
/**
|
||||
* @return {Uint8Array}
|
||||
*/
|
||||
readBuf(): Uint8Array;
|
||||
/**
|
||||
* Legacy implementation uses JSON parse. We use any-decoding in v2.
|
||||
*
|
||||
* @return {any}
|
||||
*/
|
||||
readJSON(): any;
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
readKey(): string;
|
||||
}
|
||||
export class DSDecoderV2 {
|
||||
/**
|
||||
* @param {decoding.Decoder} decoder
|
||||
*/
|
||||
constructor(decoder: decoding.Decoder);
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private dsCurrVal;
|
||||
restDecoder: decoding.Decoder;
|
||||
resetDsCurVal(): void;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
readDsClock(): number;
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
readDsLen(): number;
|
||||
}
|
||||
export class UpdateDecoderV2 extends DSDecoderV2 {
|
||||
/**
|
||||
* List of cached keys. If the keys[id] does not exist, we read a new key
|
||||
* from stringEncoder and push it to keys.
|
||||
*
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
keys: Array<string>;
|
||||
keyClockDecoder: decoding.IntDiffOptRleDecoder;
|
||||
clientDecoder: decoding.UintOptRleDecoder;
|
||||
leftClockDecoder: decoding.IntDiffOptRleDecoder;
|
||||
rightClockDecoder: decoding.IntDiffOptRleDecoder;
|
||||
infoDecoder: decoding.RleDecoder<number>;
|
||||
stringDecoder: decoding.StringDecoder;
|
||||
parentInfoDecoder: decoding.RleDecoder<number>;
|
||||
typeRefDecoder: decoding.UintOptRleDecoder;
|
||||
lenDecoder: decoding.UintOptRleDecoder;
|
||||
/**
|
||||
* @return {ID}
|
||||
*/
|
||||
readLeftID(): ID;
|
||||
/**
|
||||
* @return {ID}
|
||||
*/
|
||||
readRightID(): ID;
|
||||
/**
|
||||
* Read the next client id.
|
||||
* Use this in favor of readID whenever possible to reduce the number of objects created.
|
||||
*/
|
||||
readClient(): number;
|
||||
/**
|
||||
* @return {number} info An unsigned 8-bit integer
|
||||
*/
|
||||
readInfo(): number;
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
readString(): string;
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
readParentInfo(): boolean;
|
||||
/**
|
||||
* @return {number} An unsigned 8-bit integer
|
||||
*/
|
||||
readTypeRef(): number;
|
||||
/**
|
||||
* Write len of a struct - well suited for Opt RLE encoder.
|
||||
*
|
||||
* @return {number}
|
||||
*/
|
||||
readLen(): number;
|
||||
/**
|
||||
* @return {any}
|
||||
*/
|
||||
readAny(): any;
|
||||
/**
|
||||
* @return {Uint8Array}
|
||||
*/
|
||||
readBuf(): Uint8Array;
|
||||
/**
|
||||
* This is mainly here for legacy purposes.
|
||||
*
|
||||
* Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.
|
||||
*
|
||||
* @return {any}
|
||||
*/
|
||||
readJSON(): any;
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
readKey(): string;
|
||||
}
|
||||
import * as decoding from "lib0/decoding";
|
||||
import { ID } from "./ID.js";
|
||||
//# sourceMappingURL=UpdateDecoder.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/UpdateDecoder.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/UpdateDecoder.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"UpdateDecoder.d.ts","sourceRoot":"","sources":["../../../src/utils/UpdateDecoder.js"],"names":[],"mappings":"AAMA;IACE;;OAEG;IACH,qBAFW,SAAS,OAAO,EAI1B;IADC,8BAA0B;IAG5B,sBAEC;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;OAEG;IACH,aAFY,MAAM,CAIjB;CACF;AAED;IACE;;OAEG;IACH,cAFY,EAAE,CAIb;IAED;;OAEG;IACH,eAFY,EAAE,CAIb;IAED;;;OAGG;IACH,qBAEC;IAED;;OAEG;IACH,YAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,CAIjB;IAED;;OAEG;IACH,kBAFY,OAAO,CAIlB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,WAFY,MAAM,CAIjB;IAED;;OAEG;IACH,WAFY,GAAG,CAId;IAED;;OAEG;IACH,WAFY,UAAU,CAIrB;IAED;;;;OAIG;IACH,YAFY,GAAG,CAId;IAED;;OAEG;IACH,WAFY,MAAM,CAIjB;CACF;AAED;IACE;;OAEG;IACH,qBAFW,SAAS,OAAO,EAQ1B;IALC;;OAEG;IACH,kBAAkB;IAClB,8BAA0B;IAG5B,sBAEC;IAED;;OAEG;IACH,eAFY,MAAM,CAKjB;IAED;;OAEG;IACH,aAFY,MAAM,CAMjB;CACF;AAED;IAMI;;;;;OAKG;IACH,MAFU,MAAM,MAAM,CAAC,CAET;IAEd,+CAA6F;IAC7F,0CAAwF;IACxF,gDAA8F;IAC9F,iDAA+F;IAC/F,yCAAmG;IACnG,sCAAoF;IACpF,+CAAyG;IACzG,2CAAyF;IACzF,uCAAqF;IAGvF;;OAEG;IACH,cAFY,EAAE,CAIb;IAED;;OAEG;IACH,eAFY,EAAE,CAIb;IAED;;;OAGG;IACH,qBAEC;IAED;;OAEG;IACH,YAFY,MAAM,CAIjB;IAED;;OAEG;IACH,cAFY,MAAM,CAIjB;IAED;;OAEG;IACH,kBAFY,OAAO,CAIlB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,WAFY,MAAM,CAIjB;IAED;;OAEG;IACH,WAFY,GAAG,CAId;IAED;;OAEG;IACH,WAFY,UAAU,CAIrB;IAED;;;;;;OAMG;IACH,YAFY,GAAG,CAId;IAED;;OAEG;IACH,WAFY,MAAM,CAWjB;CACF"}
|
||||
164
yjs-poll/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts
generated
vendored
Normal file
164
yjs-poll/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts
generated
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
export class DSEncoderV1 {
|
||||
restEncoder: encoding.Encoder;
|
||||
toUint8Array(): Uint8Array;
|
||||
resetDsCurVal(): void;
|
||||
/**
|
||||
* @param {number} clock
|
||||
*/
|
||||
writeDsClock(clock: number): void;
|
||||
/**
|
||||
* @param {number} len
|
||||
*/
|
||||
writeDsLen(len: number): void;
|
||||
}
|
||||
export class UpdateEncoderV1 extends DSEncoderV1 {
|
||||
/**
|
||||
* @param {ID} id
|
||||
*/
|
||||
writeLeftID(id: ID): void;
|
||||
/**
|
||||
* @param {ID} id
|
||||
*/
|
||||
writeRightID(id: ID): void;
|
||||
/**
|
||||
* Use writeClient and writeClock instead of writeID if possible.
|
||||
* @param {number} client
|
||||
*/
|
||||
writeClient(client: number): void;
|
||||
/**
|
||||
* @param {number} info An unsigned 8-bit integer
|
||||
*/
|
||||
writeInfo(info: number): void;
|
||||
/**
|
||||
* @param {string} s
|
||||
*/
|
||||
writeString(s: string): void;
|
||||
/**
|
||||
* @param {boolean} isYKey
|
||||
*/
|
||||
writeParentInfo(isYKey: boolean): void;
|
||||
/**
|
||||
* @param {number} info An unsigned 8-bit integer
|
||||
*/
|
||||
writeTypeRef(info: number): void;
|
||||
/**
|
||||
* Write len of a struct - well suited for Opt RLE encoder.
|
||||
*
|
||||
* @param {number} len
|
||||
*/
|
||||
writeLen(len: number): void;
|
||||
/**
|
||||
* @param {any} any
|
||||
*/
|
||||
writeAny(any: any): void;
|
||||
/**
|
||||
* @param {Uint8Array} buf
|
||||
*/
|
||||
writeBuf(buf: Uint8Array): void;
|
||||
/**
|
||||
* @param {any} embed
|
||||
*/
|
||||
writeJSON(embed: any): void;
|
||||
/**
|
||||
* @param {string} key
|
||||
*/
|
||||
writeKey(key: string): void;
|
||||
}
|
||||
export class DSEncoderV2 {
|
||||
restEncoder: encoding.Encoder;
|
||||
dsCurrVal: number;
|
||||
toUint8Array(): Uint8Array;
|
||||
resetDsCurVal(): void;
|
||||
/**
|
||||
* @param {number} clock
|
||||
*/
|
||||
writeDsClock(clock: number): void;
|
||||
/**
|
||||
* @param {number} len
|
||||
*/
|
||||
writeDsLen(len: number): void;
|
||||
}
|
||||
export class UpdateEncoderV2 extends DSEncoderV2 {
|
||||
/**
|
||||
* @type {Map<string,number>}
|
||||
*/
|
||||
keyMap: Map<string, number>;
|
||||
/**
|
||||
* Refers to the next unique key-identifier to me used.
|
||||
* See writeKey method for more information.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
keyClock: number;
|
||||
keyClockEncoder: encoding.IntDiffOptRleEncoder;
|
||||
clientEncoder: encoding.UintOptRleEncoder;
|
||||
leftClockEncoder: encoding.IntDiffOptRleEncoder;
|
||||
rightClockEncoder: encoding.IntDiffOptRleEncoder;
|
||||
infoEncoder: encoding.RleEncoder<number>;
|
||||
stringEncoder: encoding.StringEncoder;
|
||||
parentInfoEncoder: encoding.RleEncoder<number>;
|
||||
typeRefEncoder: encoding.UintOptRleEncoder;
|
||||
lenEncoder: encoding.UintOptRleEncoder;
|
||||
/**
|
||||
* @param {ID} id
|
||||
*/
|
||||
writeLeftID(id: ID): void;
|
||||
/**
|
||||
* @param {ID} id
|
||||
*/
|
||||
writeRightID(id: ID): void;
|
||||
/**
|
||||
* @param {number} client
|
||||
*/
|
||||
writeClient(client: number): void;
|
||||
/**
|
||||
* @param {number} info An unsigned 8-bit integer
|
||||
*/
|
||||
writeInfo(info: number): void;
|
||||
/**
|
||||
* @param {string} s
|
||||
*/
|
||||
writeString(s: string): void;
|
||||
/**
|
||||
* @param {boolean} isYKey
|
||||
*/
|
||||
writeParentInfo(isYKey: boolean): void;
|
||||
/**
|
||||
* @param {number} info An unsigned 8-bit integer
|
||||
*/
|
||||
writeTypeRef(info: number): void;
|
||||
/**
|
||||
* Write len of a struct - well suited for Opt RLE encoder.
|
||||
*
|
||||
* @param {number} len
|
||||
*/
|
||||
writeLen(len: number): void;
|
||||
/**
|
||||
* @param {any} any
|
||||
*/
|
||||
writeAny(any: any): void;
|
||||
/**
|
||||
* @param {Uint8Array} buf
|
||||
*/
|
||||
writeBuf(buf: Uint8Array): void;
|
||||
/**
|
||||
* This is mainly here for legacy purposes.
|
||||
*
|
||||
* Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.
|
||||
*
|
||||
* @param {any} embed
|
||||
*/
|
||||
writeJSON(embed: any): void;
|
||||
/**
|
||||
* Property keys are often reused. For example, in y-prosemirror the key `bold` might
|
||||
* occur very often. For a 3d application, the key `position` might occur very often.
|
||||
*
|
||||
* We cache these keys in a Map and refer to them via a unique number.
|
||||
*
|
||||
* @param {string} key
|
||||
*/
|
||||
writeKey(key: string): void;
|
||||
}
|
||||
import * as encoding from "lib0/encoding";
|
||||
import { ID } from "./ID.js";
|
||||
//# sourceMappingURL=UpdateEncoder.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"UpdateEncoder.d.ts","sourceRoot":"","sources":["../../../src/utils/UpdateEncoder.js"],"names":[],"mappings":"AAOA;IAEI,8BAA2C;IAG7C,2BAEC;IAED,sBAEC;IAED;;OAEG;IACH,oBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,gBAFW,MAAM,QAIhB;CACF;AAED;IACE;;OAEG;IACH,gBAFW,EAAE,QAKZ;IAED;;OAEG;IACH,iBAFW,EAAE,QAKZ;IAED;;;OAGG;IACH,oBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,gBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,eAFW,MAAM,QAIhB;IAED;;OAEG;IACH,wBAFW,OAAO,QAIjB;IAED;;OAEG;IACH,mBAFW,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAFW,MAAM,QAIhB;IAED;;OAEG;IACH,cAFW,GAAG,QAIb;IAED;;OAEG;IACH,cAFW,UAAU,QAIpB;IAED;;OAEG;IACH,iBAFW,GAAG,QAIb;IAED;;OAEG;IACH,cAFW,MAAM,QAIhB;CACF;AAED;IAEI,8BAA2C;IAC3C,kBAAkB;IAGpB,2BAEC;IAED,sBAEC;IAED;;OAEG;IACH,oBAFW,MAAM,QAMhB;IAED;;OAEG;IACH,gBAFW,MAAM,QAQhB;CACF;AAED;IAGI;;OAEG;IACH,QAFU,IAAI,MAAM,EAAC,MAAM,CAAC,CAEL;IACvB;;;;;OAKG;IACH,UAFU,MAAM,CAEC;IACjB,+CAA0D;IAC1D,0CAAqD;IACrD,gDAA2D;IAC3D,iDAA4D;IAC5D,yCAA+D;IAC/D,sCAAiD;IACjD,+CAAqE;IACrE,2CAAsD;IACtD,uCAAkD;IAoBpD;;OAEG;IACH,gBAFW,EAAE,QAKZ;IAED;;OAEG;IACH,iBAFW,EAAE,QAKZ;IAED;;OAEG;IACH,oBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,gBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,eAFW,MAAM,QAIhB;IAED;;OAEG;IACH,wBAFW,OAAO,QAIjB;IAED;;OAEG;IACH,mBAFW,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAFW,MAAM,QAIhB;IAED;;OAEG;IACH,cAFW,GAAG,QAIb;IAED;;OAEG;IACH,cAFW,UAAU,QAIpB;IAED;;;;;;OAMG;IACH,iBAFW,GAAG,QAIb;IAED;;;;;;;OAOG;IACH,cAFW,MAAM,QAwBhB;CACF"}
|
||||
133
yjs-poll/node_modules/yjs/dist/src/utils/YEvent.d.ts
generated
vendored
Normal file
133
yjs-poll/node_modules/yjs/dist/src/utils/YEvent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
/**
|
||||
* @template {AbstractType<any>} T
|
||||
* YEvent describes the changes on a YType.
|
||||
*/
|
||||
export class YEvent<T extends AbstractType<any>> {
|
||||
/**
|
||||
* @param {T} target The changed type.
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
constructor(target: T, transaction: Transaction);
|
||||
/**
|
||||
* The type on which this event was created on.
|
||||
* @type {T}
|
||||
*/
|
||||
target: T;
|
||||
/**
|
||||
* The current target on which the observe callback is called.
|
||||
* @type {AbstractType<any>}
|
||||
*/
|
||||
currentTarget: AbstractType<any>;
|
||||
/**
|
||||
* The transaction that triggered this event.
|
||||
* @type {Transaction}
|
||||
*/
|
||||
transaction: Transaction;
|
||||
/**
|
||||
* @type {Object|null}
|
||||
*/
|
||||
_changes: Object | null;
|
||||
/**
|
||||
* @type {null | Map<string, { action: 'add' | 'update' | 'delete', oldValue: any }>}
|
||||
*/
|
||||
_keys: Map<string, {
|
||||
action: 'add' | 'update' | 'delete';
|
||||
oldValue: any;
|
||||
}> | null;
|
||||
/**
|
||||
* @type {null | Array<{ insert?: string | Array<any> | object | AbstractType<any>, retain?: number, delete?: number, attributes?: Object<string, any> }>}
|
||||
*/
|
||||
_delta: {
|
||||
insert?: string | object | any[] | AbstractType<any> | undefined;
|
||||
retain?: number | undefined;
|
||||
delete?: number | undefined;
|
||||
attributes?: {
|
||||
[x: string]: any;
|
||||
} | undefined;
|
||||
}[] | null;
|
||||
/**
|
||||
* @type {Array<string|number>|null}
|
||||
*/
|
||||
_path: Array<string | number> | null;
|
||||
/**
|
||||
* Computes the path from `y` to the changed type.
|
||||
*
|
||||
* @todo v14 should standardize on path: Array<{parent, index}> because that is easier to work with.
|
||||
*
|
||||
* The following property holds:
|
||||
* @example
|
||||
* let type = y
|
||||
* event.path.forEach(dir => {
|
||||
* type = type.get(dir)
|
||||
* })
|
||||
* type === event.target // => true
|
||||
*/
|
||||
get path(): (string | number)[];
|
||||
/**
|
||||
* Check if a struct is deleted by this event.
|
||||
*
|
||||
* In contrast to change.deleted, this method also returns true if the struct was added and then deleted.
|
||||
*
|
||||
* @param {AbstractStruct} struct
|
||||
* @return {boolean}
|
||||
*/
|
||||
deletes(struct: AbstractStruct): boolean;
|
||||
/**
|
||||
* @type {Map<string, { action: 'add' | 'update' | 'delete', oldValue: any }>}
|
||||
*/
|
||||
get keys(): Map<string, {
|
||||
action: 'add' | 'update' | 'delete';
|
||||
oldValue: any;
|
||||
}>;
|
||||
/**
|
||||
* This is a computed property. Note that this can only be safely computed during the
|
||||
* event call. Computing this property after other changes happened might result in
|
||||
* unexpected behavior (incorrect computation of deltas). A safe way to collect changes
|
||||
* is to store the `changes` or the `delta` object. Avoid storing the `transaction` object.
|
||||
*
|
||||
* @type {Array<{insert?: string | Array<any> | object | AbstractType<any>, retain?: number, delete?: number, attributes?: Object<string, any>}>}
|
||||
*/
|
||||
get delta(): {
|
||||
insert?: string | object | any[] | AbstractType<any> | undefined;
|
||||
retain?: number | undefined;
|
||||
delete?: number | undefined;
|
||||
attributes?: {
|
||||
[x: string]: any;
|
||||
} | undefined;
|
||||
}[];
|
||||
/**
|
||||
* Check if a struct is added by this event.
|
||||
*
|
||||
* In contrast to change.deleted, this method also returns true if the struct was added and then deleted.
|
||||
*
|
||||
* @param {AbstractStruct} struct
|
||||
* @return {boolean}
|
||||
*/
|
||||
adds(struct: AbstractStruct): boolean;
|
||||
/**
|
||||
* This is a computed property. Note that this can only be safely computed during the
|
||||
* event call. Computing this property after other changes happened might result in
|
||||
* unexpected behavior (incorrect computation of deltas). A safe way to collect changes
|
||||
* is to store the `changes` or the `delta` object. Avoid storing the `transaction` object.
|
||||
*
|
||||
* @type {{added:Set<Item>,deleted:Set<Item>,keys:Map<string,{action:'add'|'update'|'delete',oldValue:any}>,delta:Array<{insert?:Array<any>|string, delete?:number, retain?:number}>}}
|
||||
*/
|
||||
get changes(): {
|
||||
added: Set<Item>;
|
||||
deleted: Set<Item>;
|
||||
keys: Map<string, {
|
||||
action: 'add' | 'update' | 'delete';
|
||||
oldValue: any;
|
||||
}>;
|
||||
delta: Array<{
|
||||
insert?: Array<any> | string;
|
||||
delete?: number;
|
||||
retain?: number;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
import { Transaction } from "./Transaction.js";
|
||||
import { AbstractStruct } from "../structs/AbstractStruct.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
//# sourceMappingURL=YEvent.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/YEvent.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/YEvent.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"YEvent.d.ts","sourceRoot":"","sources":["../../../src/utils/YEvent.js"],"names":[],"mappings":"AAWA;;;GAGG;AACH;IACE;;;OAGG;IACH,oBAHW,CAAC,eACD,WAAW,EAkCrB;IA/BC;;;OAGG;IACH,QAFU,CAAC,CAES;IACpB;;;OAGG;IACH,eAFU,aAAa,GAAG,CAAC,CAEA;IAC3B;;;OAGG;IACH,aAFU,WAAW,CAES;IAC9B;;OAEG;IACH,UAFU,MAAM,GAAC,IAAI,CAED;IACpB;;OAEG;IACH;gBAFuC,KAAK,GAAG,QAAQ,GAAG,QAAQ;kBAAY,GAAG;cAEhE;IACjB;;OAEG;IACH;;;;;;;eAAkB;IAClB;;OAEG;IACH,OAFU,MAAM,MAAM,GAAC,MAAM,CAAC,GAAC,IAAI,CAElB;IAGnB;;;;;;;;;;;;OAYG;IACH,gCAEC;IAED;;;;;;;OAOG;IACH,gBAHW,cAAc,GACb,OAAO,CAIlB;IAED;;OAEG;IACH;gBAFgC,KAAK,GAAG,QAAQ,GAAG,QAAQ;kBAAY,GAAG;OAqDzE;IAED;;;;;;;OAOG;IACH;;;;;;;QAEC;IAED;;;;;;;OAOG;IACH,aAHW,cAAc,GACb,OAAO,CAIlB;IAED;;;;;;;OAOG;IACH;eAFiB,IAAI,IAAI,CAAC;iBAAS,IAAI,IAAI,CAAC;cAAM,IAAI,MAAM,EAAC;YAAC,MAAM,EAAC,KAAK,GAAC,QAAQ,GAAC,QAAQ,CAAC;YAAA,QAAQ,EAAC,GAAG,CAAA;SAAC,CAAC;eAAO,MAAM;YAAC,MAAM,CAAC,EAAC,MAAM,GAAG,CAAC,GAAC,MAAM,CAAC;YAAC,MAAM,CAAC,EAAC,MAAM,CAAC;YAAC,MAAM,CAAC,EAAC,MAAM,CAAA;SAAC,CAAC;MAkEnL;CACF"}
|
||||
34
yjs-poll/node_modules/yjs/dist/src/utils/encoding.d.ts
generated
vendored
Normal file
34
yjs-poll/node_modules/yjs/dist/src/utils/encoding.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
export function writeClientsStructs(encoder: UpdateEncoderV1 | UpdateEncoderV2, store: StructStore, _sm: Map<number, number>): void;
|
||||
export function readClientsStructRefs(decoder: UpdateDecoderV1 | UpdateDecoderV2, doc: Doc): Map<number, {
|
||||
i: number;
|
||||
refs: Array<Item | GC>;
|
||||
}>;
|
||||
export function writeStructsFromTransaction(encoder: UpdateEncoderV1 | UpdateEncoderV2, transaction: Transaction): void;
|
||||
export function readUpdateV2(decoder: decoding.Decoder, ydoc: Doc, transactionOrigin?: any, structDecoder?: UpdateDecoderV1 | UpdateDecoderV2 | undefined): void;
|
||||
export function readUpdate(decoder: decoding.Decoder, ydoc: Doc, transactionOrigin?: any): void;
|
||||
export function applyUpdateV2(ydoc: Doc, update: Uint8Array, transactionOrigin?: any, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2 | undefined): void;
|
||||
export function applyUpdate(ydoc: Doc, update: Uint8Array, transactionOrigin?: any): void;
|
||||
export function writeStateAsUpdate(encoder: UpdateEncoderV1 | UpdateEncoderV2, doc: Doc, targetStateVector?: Map<number, number> | undefined): void;
|
||||
export function encodeStateAsUpdateV2(doc: Doc, encodedTargetStateVector?: Uint8Array | undefined, encoder?: UpdateEncoderV2 | UpdateEncoderV1 | undefined): Uint8Array;
|
||||
export function encodeStateAsUpdate(doc: Doc, encodedTargetStateVector?: Uint8Array | undefined): Uint8Array;
|
||||
export function readStateVector(decoder: DSDecoderV1 | DSDecoderV2): Map<number, number>;
|
||||
export function decodeStateVector(decodedState: Uint8Array): Map<number, number>;
|
||||
export function writeStateVector(encoder: DSEncoderV1 | DSEncoderV2, sv: Map<number, number>): DSEncoderV1 | DSEncoderV2;
|
||||
export function writeDocumentStateVector(encoder: DSEncoderV1 | DSEncoderV2, doc: Doc): DSEncoderV1 | DSEncoderV2;
|
||||
export function encodeStateVectorV2(doc: Doc | Map<number, number>, encoder?: DSEncoderV1 | DSEncoderV2 | undefined): Uint8Array;
|
||||
export function encodeStateVector(doc: Doc | Map<number, number>): Uint8Array;
|
||||
import { UpdateEncoderV1 } from "./UpdateEncoder.js";
|
||||
import { UpdateEncoderV2 } from "./UpdateEncoder.js";
|
||||
import { StructStore } from "./StructStore.js";
|
||||
import { UpdateDecoderV1 } from "./UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "./UpdateDecoder.js";
|
||||
import { Doc } from "./Doc.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { GC } from "../structs/GC.js";
|
||||
import { Transaction } from "./Transaction.js";
|
||||
import * as decoding from "lib0/decoding";
|
||||
import { DSDecoderV1 } from "./UpdateDecoder.js";
|
||||
import { DSDecoderV2 } from "./UpdateDecoder.js";
|
||||
import { DSEncoderV1 } from "./UpdateEncoder.js";
|
||||
import { DSEncoderV2 } from "./UpdateEncoder.js";
|
||||
//# sourceMappingURL=encoding.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/encoding.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/encoding.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/utils/encoding.js"],"names":[],"mappings":"AAgFO,6CAPI,eAAe,GAAG,eAAe,SACjC,WAAW,OACX,IAAI,MAAM,EAAC,MAAM,CAAC,QA0B5B;AAUM,+CAPI,eAAe,GAAG,eAAe,OACjC,GAAG,GACF,IAAI,MAAM,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,GAAG,EAAE,CAAC,CAAA;CAAE,CAAC,CA2F7D;AA0KM,qDANI,eAAe,GAAG,eAAe,eACjC,WAAW,QAK2H;AAc1I,sCAPI,SAAS,OAAO,QAChB,GAAG,sBACH,GAAG,uEAwEgB;AAavB,oCANI,SAAS,OAAO,QAChB,GAAG,sBACH,GAAG,QAI8H;AAcrI,oCAPI,GAAG,UACH,UAAU,sBACV,GAAG,gFAQb;AAaM,kCANI,GAAG,UACH,UAAU,sBACV,GAAG,QAIiH;AAYxH,4CANI,eAAe,GAAG,eAAe,OACjC,GAAG,6DAQb;AAeM,2CAPI,GAAG,+GAGF,UAAU,CAuBrB;AAcM,yCANI,GAAG,sDAEF,UAAU,CAI2H;AAU1I,yCALI,WAAW,GAAG,WAAW,GACxB,IAAI,MAAM,EAAC,MAAM,CAAC,CAa7B;AAoBM,gDALI,UAAU,GACT,IAAI,MAAM,EAAC,MAAM,CAAC,CAIyF;AAOhH,0CAJI,WAAW,GAAG,WAAW,MACzB,IAAI,MAAM,EAAC,MAAM,CAAC,6BAU5B;AAQM,kDALI,WAAW,GAAG,WAAW,OACzB,GAAG,6BAIgG;AAWvG,yCANI,GAAG,GAAC,IAAI,MAAM,EAAC,MAAM,CAAC,oDAErB,UAAU,CAWrB;AAUM,uCALI,GAAG,GAAC,IAAI,MAAM,EAAC,MAAM,CAAC,GACrB,UAAU,CAI6D"}
|
||||
4
yjs-poll/node_modules/yjs/dist/src/utils/isParentOf.d.ts
generated
vendored
Normal file
4
yjs-poll/node_modules/yjs/dist/src/utils/isParentOf.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export function isParentOf(parent: AbstractType<any>, child: Item | null): boolean;
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
//# sourceMappingURL=isParentOf.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/isParentOf.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/isParentOf.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isParentOf.d.ts","sourceRoot":"","sources":["../../../src/utils/isParentOf.js"],"names":[],"mappings":"AAYO,mCAPI,aAAa,GAAG,CAAC,SACjB,IAAI,GAAC,IAAI,WAcnB"}
|
||||
3
yjs-poll/node_modules/yjs/dist/src/utils/logging.d.ts
generated
vendored
Normal file
3
yjs-poll/node_modules/yjs/dist/src/utils/logging.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export function logType(type: AbstractType<any>): void;
|
||||
import { AbstractType } from "../types/AbstractType.js";
|
||||
//# sourceMappingURL=logging.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/logging.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/logging.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../../src/utils/logging.js"],"names":[],"mappings":"AAWO,8BAFI,aAAa,GAAG,CAAC,QAW3B"}
|
||||
89
yjs-poll/node_modules/yjs/dist/src/utils/updates.d.ts
generated
vendored
Normal file
89
yjs-poll/node_modules/yjs/dist/src/utils/updates.d.ts
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
export class LazyStructReader {
|
||||
/**
|
||||
* @param {UpdateDecoderV1 | UpdateDecoderV2} decoder
|
||||
* @param {boolean} filterSkips
|
||||
*/
|
||||
constructor(decoder: UpdateDecoderV1 | UpdateDecoderV2, filterSkips: boolean);
|
||||
gen: Generator<GC | Item | Skip, void, unknown>;
|
||||
/**
|
||||
* @type {null | Item | Skip | GC}
|
||||
*/
|
||||
curr: null | Item | Skip | GC;
|
||||
done: boolean;
|
||||
filterSkips: boolean;
|
||||
/**
|
||||
* @return {Item | GC | Skip |null}
|
||||
*/
|
||||
next(): Item | GC | Skip | null;
|
||||
}
|
||||
export function logUpdate(update: Uint8Array): void;
|
||||
export function logUpdateV2(update: Uint8Array, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2 | undefined): void;
|
||||
export function decodeUpdate(update: Uint8Array): {
|
||||
structs: (GC | Item | Skip)[];
|
||||
ds: import("./DeleteSet.js").DeleteSet;
|
||||
};
|
||||
export function decodeUpdateV2(update: Uint8Array, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2 | undefined): {
|
||||
structs: (GC | Item | Skip)[];
|
||||
ds: import("./DeleteSet.js").DeleteSet;
|
||||
};
|
||||
export class LazyStructWriter {
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
*/
|
||||
constructor(encoder: UpdateEncoderV1 | UpdateEncoderV2);
|
||||
currClient: number;
|
||||
startClock: number;
|
||||
written: number;
|
||||
encoder: UpdateEncoderV2 | UpdateEncoderV1;
|
||||
/**
|
||||
* We want to write operations lazily, but also we need to know beforehand how many operations we want to write for each client.
|
||||
*
|
||||
* This kind of meta-information (#clients, #structs-per-client-written) is written to the restEncoder.
|
||||
*
|
||||
* We fragment the restEncoder and store a slice of it per-client until we know how many clients there are.
|
||||
* When we flush (toUint8Array) we write the restEncoder using the fragments and the meta-information.
|
||||
*
|
||||
* @type {Array<{ written: number, restEncoder: Uint8Array }>}
|
||||
*/
|
||||
clientStructs: {
|
||||
written: number;
|
||||
restEncoder: Uint8Array;
|
||||
}[];
|
||||
}
|
||||
export function mergeUpdates(updates: Array<Uint8Array>): Uint8Array;
|
||||
export function encodeStateVectorFromUpdateV2(update: Uint8Array, YEncoder?: typeof DSEncoderV1 | typeof DSEncoderV2, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2): Uint8Array;
|
||||
export function encodeStateVectorFromUpdate(update: Uint8Array): Uint8Array;
|
||||
export function parseUpdateMetaV2(update: Uint8Array, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2): {
|
||||
from: Map<number, number>;
|
||||
to: Map<number, number>;
|
||||
};
|
||||
export function parseUpdateMeta(update: Uint8Array): {
|
||||
from: Map<number, number>;
|
||||
to: Map<number, number>;
|
||||
};
|
||||
export function mergeUpdatesV2(updates: Array<Uint8Array>, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2 | undefined, YEncoder?: typeof UpdateEncoderV2 | typeof UpdateEncoderV1 | undefined): Uint8Array;
|
||||
export function diffUpdateV2(update: Uint8Array, sv: Uint8Array, YDecoder?: typeof UpdateDecoderV1 | typeof UpdateDecoderV2 | undefined, YEncoder?: typeof UpdateEncoderV2 | typeof UpdateEncoderV1 | undefined): Uint8Array;
|
||||
export function diffUpdate(update: Uint8Array, sv: Uint8Array): Uint8Array;
|
||||
export function convertUpdateFormat(update: Uint8Array, blockTransformer: (arg0: Item | GC | Skip) => Item | GC | Skip, YDecoder: typeof UpdateDecoderV2 | typeof UpdateDecoderV1, YEncoder: typeof UpdateEncoderV2 | typeof UpdateEncoderV1): Uint8Array;
|
||||
export function obfuscateUpdate(update: Uint8Array, opts?: ObfuscatorOptions | undefined): Uint8Array;
|
||||
export function obfuscateUpdateV2(update: Uint8Array, opts?: ObfuscatorOptions | undefined): Uint8Array;
|
||||
export function convertUpdateFormatV1ToV2(update: Uint8Array): Uint8Array;
|
||||
export function convertUpdateFormatV2ToV1(update: Uint8Array): Uint8Array;
|
||||
export type ObfuscatorOptions = {
|
||||
formatting?: boolean | undefined;
|
||||
subdocs?: boolean | undefined;
|
||||
/**
|
||||
* Whether to obfuscate nodeName / hookName
|
||||
*/
|
||||
yxml?: boolean | undefined;
|
||||
};
|
||||
import { GC } from "../structs/GC.js";
|
||||
import { Item } from "../structs/Item.js";
|
||||
import { Skip } from "../structs/Skip.js";
|
||||
import { UpdateDecoderV1 } from "./UpdateDecoder.js";
|
||||
import { UpdateDecoderV2 } from "./UpdateDecoder.js";
|
||||
import { UpdateEncoderV2 } from "./UpdateEncoder.js";
|
||||
import { UpdateEncoderV1 } from "./UpdateEncoder.js";
|
||||
import { DSEncoderV1 } from "./UpdateEncoder.js";
|
||||
import { DSEncoderV2 } from "./UpdateEncoder.js";
|
||||
//# sourceMappingURL=updates.d.ts.map
|
||||
1
yjs-poll/node_modules/yjs/dist/src/utils/updates.d.ts.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/src/utils/updates.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"updates.d.ts","sourceRoot":"","sources":["../../../src/utils/updates.js"],"names":[],"mappings":"AAmFA;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;AAMM,kCAHI,UAAU,QAGkD;AAOhE,oCAJI,UAAU,gFAcpB;AAMM,qCAHI,UAAU;;;EAG0D;AAOxE,uCAJI,UAAU;;;EAepB;AAED;IACE;;OAEG;IACH,qBAFW,eAAe,GAAG,eAAe,EAkB3C;IAfC,mBAAmB;IACnB,mBAAmB;IACnB,gBAAgB;IAChB,2CAAsB;IACtB;;;;;;;;;OASG;IACH;iBAF2B,MAAM;qBAAe,UAAU;QAEnC;CAE1B;AAMM,sCAHI,MAAM,UAAU,CAAC,GAChB,UAAU,CAE0E;AAQzF,sDALI,UAAU,aACV,kBAAkB,GAAG,kBAAkB,aACvC,sBAAsB,GAAG,sBAAsB,GAC9C,UAAU,CAgDrB;AAMM,oDAHI,UAAU,GACT,UAAU,CAEkG;AAOjH,0CAJI,UAAU,aACV,sBAAsB,GAAG,sBAAsB;UACtC,IAAI,MAAM,EAAC,MAAM,CAAC;QAAM,IAAI,MAAM,EAAC,MAAM,CAAC;EAkC7D;AAMM,wCAHI,UAAU,GACT;IAAE,IAAI,EAAE,IAAI,MAAM,EAAC,MAAM,CAAC,CAAC;IAAC,EAAE,EAAE,IAAI,MAAM,EAAC,MAAM,CAAC,CAAA;CAAE,CAEmB;AA0C5E,wCALI,MAAM,UAAU,CAAC,mJAGhB,UAAU,CAgIrB;AAQM,qCALI,UAAU,MACV,UAAU,8JAsCpB;AAMM,mCAHI,UAAU,MACV,UAAU,cAE+E;AAwE7F,4CALI,UAAU,2BACD,IAAI,GAAC,EAAE,GAAC,IAAI,KAAE,IAAI,GAAC,EAAE,GAAC,IAAI,YACnC,sBAAsB,GAAG,sBAAsB,YAC/C,sBAAsB,GAAG,sBAAsB,cAczD;AAmHM,wCAHI,UAAU,oDAGiH;AAM/H,0CAHI,UAAU,oDAGmH;AAKjI,kDAFI,UAAU,cAEiG;AAK/G,kDAFI,UAAU,cAEiG"}
|
||||
457
yjs-poll/node_modules/yjs/dist/testHelper.mjs
generated
vendored
Normal file
457
yjs-poll/node_modules/yjs/dist/testHelper.mjs
generated
vendored
Normal file
@@ -0,0 +1,457 @@
|
||||
import * as t from 'lib0/testing';
|
||||
import * as prng from 'lib0/prng';
|
||||
import * as encoding from 'lib0/encoding';
|
||||
import * as decoding from 'lib0/decoding';
|
||||
import * as syncProtocol from 'y-protocols/sync';
|
||||
import * as object from 'lib0/object';
|
||||
import * as map from 'lib0/map';
|
||||
import * as Y from 'yjs';
|
||||
export * from 'yjs';
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
// @ts-ignore
|
||||
window.Y = Y; // eslint-disable-line
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {TestYInstance} y // publish message created by `y` to all other online clients
|
||||
* @param {Uint8Array} m
|
||||
*/
|
||||
const broadcastMessage = (y, m) => {
|
||||
if (y.tc.onlineConns.has(y)) {
|
||||
y.tc.onlineConns.forEach(remoteYInstance => {
|
||||
if (remoteYInstance !== y) {
|
||||
remoteYInstance._receive(m, y);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
let useV2 = false;
|
||||
|
||||
const encV1 = {
|
||||
encodeStateAsUpdate: Y.encodeStateAsUpdate,
|
||||
mergeUpdates: Y.mergeUpdates,
|
||||
applyUpdate: Y.applyUpdate,
|
||||
logUpdate: Y.logUpdate,
|
||||
updateEventName: /** @type {'update'} */ ('update'),
|
||||
diffUpdate: Y.diffUpdate
|
||||
};
|
||||
|
||||
const encV2 = {
|
||||
encodeStateAsUpdate: Y.encodeStateAsUpdateV2,
|
||||
mergeUpdates: Y.mergeUpdatesV2,
|
||||
applyUpdate: Y.applyUpdateV2,
|
||||
logUpdate: Y.logUpdateV2,
|
||||
updateEventName: /** @type {'updateV2'} */ ('updateV2'),
|
||||
diffUpdate: Y.diffUpdateV2
|
||||
};
|
||||
|
||||
let enc = encV1;
|
||||
|
||||
const useV1Encoding = () => {
|
||||
useV2 = false;
|
||||
enc = encV1;
|
||||
};
|
||||
|
||||
const useV2Encoding = () => {
|
||||
console.error('sync protocol doesnt support v2 protocol yet, fallback to v1 encoding'); // @Todo
|
||||
useV2 = false;
|
||||
enc = encV1;
|
||||
};
|
||||
|
||||
class TestYInstance extends Y.Doc {
|
||||
/**
|
||||
* @param {TestConnector} testConnector
|
||||
* @param {number} clientID
|
||||
*/
|
||||
constructor (testConnector, clientID) {
|
||||
super();
|
||||
this.userID = clientID; // overwriting clientID
|
||||
/**
|
||||
* @type {TestConnector}
|
||||
*/
|
||||
this.tc = testConnector;
|
||||
/**
|
||||
* @type {Map<TestYInstance, Array<Uint8Array>>}
|
||||
*/
|
||||
this.receiving = new Map();
|
||||
testConnector.allConns.add(this);
|
||||
/**
|
||||
* The list of received updates.
|
||||
* We are going to merge them later using Y.mergeUpdates and check if the resulting document is correct.
|
||||
* @type {Array<Uint8Array>}
|
||||
*/
|
||||
this.updates = [];
|
||||
// set up observe on local model
|
||||
this.on(enc.updateEventName, /** @param {Uint8Array} update @param {any} origin */ (update, origin) => {
|
||||
if (origin !== testConnector) {
|
||||
const encoder = encoding.createEncoder();
|
||||
syncProtocol.writeUpdate(encoder, update);
|
||||
broadcastMessage(this, encoding.toUint8Array(encoder));
|
||||
}
|
||||
this.updates.push(update);
|
||||
});
|
||||
this.connect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect from TestConnector.
|
||||
*/
|
||||
disconnect () {
|
||||
this.receiving = new Map();
|
||||
this.tc.onlineConns.delete(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append yourself to the list of known Y instances in testconnector.
|
||||
* Also initiate sync with all clients.
|
||||
*/
|
||||
connect () {
|
||||
if (!this.tc.onlineConns.has(this)) {
|
||||
this.tc.onlineConns.add(this);
|
||||
const encoder = encoding.createEncoder();
|
||||
syncProtocol.writeSyncStep1(encoder, this);
|
||||
// publish SyncStep1
|
||||
broadcastMessage(this, encoding.toUint8Array(encoder));
|
||||
this.tc.onlineConns.forEach(remoteYInstance => {
|
||||
if (remoteYInstance !== this) {
|
||||
// remote instance sends instance to this instance
|
||||
const encoder = encoding.createEncoder();
|
||||
syncProtocol.writeSyncStep1(encoder, remoteYInstance);
|
||||
this._receive(encoding.toUint8Array(encoder), remoteYInstance);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Receive a message from another client. This message is only appended to the list of receiving messages.
|
||||
* TestConnector decides when this client actually reads this message.
|
||||
*
|
||||
* @param {Uint8Array} message
|
||||
* @param {TestYInstance} remoteClient
|
||||
*/
|
||||
_receive (message, remoteClient) {
|
||||
map.setIfUndefined(this.receiving, remoteClient, () => /** @type {Array<Uint8Array>} */ ([])).push(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Keeps track of TestYInstances.
|
||||
*
|
||||
* The TestYInstances add/remove themselves from the list of connections maiained in this object.
|
||||
* I think it makes sense. Deal with it.
|
||||
*/
|
||||
class TestConnector {
|
||||
/**
|
||||
* @param {prng.PRNG} gen
|
||||
*/
|
||||
constructor (gen) {
|
||||
/**
|
||||
* @type {Set<TestYInstance>}
|
||||
*/
|
||||
this.allConns = new Set();
|
||||
/**
|
||||
* @type {Set<TestYInstance>}
|
||||
*/
|
||||
this.onlineConns = new Set();
|
||||
/**
|
||||
* @type {prng.PRNG}
|
||||
*/
|
||||
this.prng = gen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Y instance and add it to the list of connections
|
||||
* @param {number} clientID
|
||||
*/
|
||||
createY (clientID) {
|
||||
return new TestYInstance(this, clientID)
|
||||
}
|
||||
|
||||
/**
|
||||
* Choose random connection and flush a random message from a random sender.
|
||||
*
|
||||
* If this function was unable to flush a message, because there are no more messages to flush, it returns false. true otherwise.
|
||||
* @return {boolean}
|
||||
*/
|
||||
flushRandomMessage () {
|
||||
const gen = this.prng;
|
||||
const conns = Array.from(this.onlineConns).filter(conn => conn.receiving.size > 0);
|
||||
if (conns.length > 0) {
|
||||
const receiver = prng.oneOf(gen, conns);
|
||||
const [sender, messages] = prng.oneOf(gen, Array.from(receiver.receiving));
|
||||
const m = messages.shift();
|
||||
if (messages.length === 0) {
|
||||
receiver.receiving.delete(sender);
|
||||
}
|
||||
if (m === undefined) {
|
||||
return this.flushRandomMessage()
|
||||
}
|
||||
const encoder = encoding.createEncoder();
|
||||
// console.log('receive (' + sender.userID + '->' + receiver.userID + '):\n', syncProtocol.stringifySyncMessage(decoding.createDecoder(m), receiver))
|
||||
// do not publish data created when this function is executed (could be ss2 or update message)
|
||||
syncProtocol.readSyncMessage(decoding.createDecoder(m), encoder, receiver, receiver.tc);
|
||||
if (encoding.length(encoder) > 0) {
|
||||
// send reply message
|
||||
sender._receive(encoding.toUint8Array(encoder), receiver);
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean} True iff this function actually flushed something
|
||||
*/
|
||||
flushAllMessages () {
|
||||
let didSomething = false;
|
||||
while (this.flushRandomMessage()) {
|
||||
didSomething = true;
|
||||
}
|
||||
return didSomething
|
||||
}
|
||||
|
||||
reconnectAll () {
|
||||
this.allConns.forEach(conn => conn.connect());
|
||||
}
|
||||
|
||||
disconnectAll () {
|
||||
this.allConns.forEach(conn => conn.disconnect());
|
||||
}
|
||||
|
||||
syncAll () {
|
||||
this.reconnectAll();
|
||||
this.flushAllMessages();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean} Whether it was possible to disconnect a random connection.
|
||||
*/
|
||||
disconnectRandom () {
|
||||
if (this.onlineConns.size === 0) {
|
||||
return false
|
||||
}
|
||||
prng.oneOf(this.prng, Array.from(this.onlineConns)).disconnect();
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean} Whether it was possible to reconnect a random connection.
|
||||
*/
|
||||
reconnectRandom () {
|
||||
/**
|
||||
* @type {Array<TestYInstance>}
|
||||
*/
|
||||
const reconnectable = [];
|
||||
this.allConns.forEach(conn => {
|
||||
if (!this.onlineConns.has(conn)) {
|
||||
reconnectable.push(conn);
|
||||
}
|
||||
});
|
||||
if (reconnectable.length === 0) {
|
||||
return false
|
||||
}
|
||||
prng.oneOf(this.prng, reconnectable).connect();
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @param {t.TestCase} tc
|
||||
* @param {{users?:number}} conf
|
||||
* @param {InitTestObjectCallback<T>} [initTestObject]
|
||||
* @return {{testObjects:Array<any>,testConnector:TestConnector,users:Array<TestYInstance>,array0:Y.Array<any>,array1:Y.Array<any>,array2:Y.Array<any>,map0:Y.Map<any>,map1:Y.Map<any>,map2:Y.Map<any>,map3:Y.Map<any>,text0:Y.Text,text1:Y.Text,text2:Y.Text,xml0:Y.XmlElement,xml1:Y.XmlElement,xml2:Y.XmlElement}}
|
||||
*/
|
||||
const init = (tc, { users = 5 } = {}, initTestObject) => {
|
||||
/**
|
||||
* @type {Object<string,any>}
|
||||
*/
|
||||
const result = {
|
||||
users: []
|
||||
};
|
||||
const gen = tc.prng;
|
||||
// choose an encoding approach at random
|
||||
if (prng.bool(gen)) {
|
||||
useV2Encoding();
|
||||
} else {
|
||||
useV1Encoding();
|
||||
}
|
||||
|
||||
const testConnector = new TestConnector(gen);
|
||||
result.testConnector = testConnector;
|
||||
for (let i = 0; i < users; i++) {
|
||||
const y = testConnector.createY(i);
|
||||
y.clientID = i;
|
||||
result.users.push(y);
|
||||
result['array' + i] = y.getArray('array');
|
||||
result['map' + i] = y.getMap('map');
|
||||
result['xml' + i] = y.get('xml', Y.XmlElement);
|
||||
result['text' + i] = y.getText('text');
|
||||
}
|
||||
testConnector.syncAll();
|
||||
result.testObjects = result.users.map(initTestObject || (() => null));
|
||||
useV1Encoding();
|
||||
return /** @type {any} */ (result)
|
||||
};
|
||||
|
||||
/**
|
||||
* 1. reconnect and flush all
|
||||
* 2. user 0 gc
|
||||
* 3. get type content
|
||||
* 4. disconnect & reconnect all (so gc is propagated)
|
||||
* 5. compare os, ds, ss
|
||||
*
|
||||
* @param {Array<TestYInstance>} users
|
||||
*/
|
||||
const compare = users => {
|
||||
users.forEach(u => u.connect());
|
||||
while (users[0].tc.flushAllMessages()) {} // eslint-disable-line
|
||||
// For each document, merge all received document updates with Y.mergeUpdates and create a new document which will be added to the list of "users"
|
||||
// This ensures that mergeUpdates works correctly
|
||||
const mergedDocs = users.map(user => {
|
||||
const ydoc = new Y.Doc();
|
||||
enc.applyUpdate(ydoc, enc.mergeUpdates(user.updates));
|
||||
return ydoc
|
||||
});
|
||||
users.push(.../** @type {any} */(mergedDocs));
|
||||
const userArrayValues = users.map(u => u.getArray('array').toJSON());
|
||||
const userMapValues = users.map(u => u.getMap('map').toJSON());
|
||||
const userXmlValues = users.map(u => u.get('xml', Y.XmlElement).toString());
|
||||
const userTextValues = users.map(u => u.getText('text').toDelta());
|
||||
for (const u of users) {
|
||||
t.assert(u.store.pendingDs === null);
|
||||
t.assert(u.store.pendingStructs === null);
|
||||
}
|
||||
// Test Array iterator
|
||||
t.compare(users[0].getArray('array').toArray(), Array.from(users[0].getArray('array')));
|
||||
// Test Map iterator
|
||||
const ymapkeys = Array.from(users[0].getMap('map').keys());
|
||||
t.assert(ymapkeys.length === Object.keys(userMapValues[0]).length);
|
||||
ymapkeys.forEach(key => t.assert(object.hasProperty(userMapValues[0], key)));
|
||||
/**
|
||||
* @type {Object<string,any>}
|
||||
*/
|
||||
const mapRes = {};
|
||||
for (const [k, v] of users[0].getMap('map')) {
|
||||
mapRes[k] = v instanceof Y.AbstractType ? v.toJSON() : v;
|
||||
}
|
||||
t.compare(userMapValues[0], mapRes);
|
||||
// Compare all users
|
||||
for (let i = 0; i < users.length - 1; i++) {
|
||||
t.compare(userArrayValues[i].length, users[i].getArray('array').length);
|
||||
t.compare(userArrayValues[i], userArrayValues[i + 1]);
|
||||
t.compare(userMapValues[i], userMapValues[i + 1]);
|
||||
t.compare(userXmlValues[i], userXmlValues[i + 1]);
|
||||
t.compare(userTextValues[i].map(/** @param {any} a */ a => typeof a.insert === 'string' ? a.insert : ' ').join('').length, users[i].getText('text').length);
|
||||
t.compare(userTextValues[i], userTextValues[i + 1], '', (_constructor, a, b) => {
|
||||
if (a instanceof Y.AbstractType) {
|
||||
t.compare(a.toJSON(), b.toJSON());
|
||||
} else if (a !== b) {
|
||||
t.fail('Deltas dont match');
|
||||
}
|
||||
return true
|
||||
});
|
||||
t.compare(Y.encodeStateVector(users[i]), Y.encodeStateVector(users[i + 1]));
|
||||
Y.equalDeleteSets(Y.createDeleteSetFromStructStore(users[i].store), Y.createDeleteSetFromStructStore(users[i + 1].store));
|
||||
compareStructStores(users[i].store, users[i + 1].store);
|
||||
t.compare(Y.encodeSnapshot(Y.snapshot(users[i])), Y.encodeSnapshot(Y.snapshot(users[i + 1])));
|
||||
}
|
||||
users.map(u => u.destroy());
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Y.Item?} a
|
||||
* @param {Y.Item?} b
|
||||
* @return {boolean}
|
||||
*/
|
||||
const compareItemIDs = (a, b) => a === b || (a !== null && b != null && Y.compareIDs(a.id, b.id));
|
||||
|
||||
/**
|
||||
* @param {import('../src/internals.js').StructStore} ss1
|
||||
* @param {import('../src/internals.js').StructStore} ss2
|
||||
*/
|
||||
const compareStructStores = (ss1, ss2) => {
|
||||
t.assert(ss1.clients.size === ss2.clients.size);
|
||||
for (const [client, structs1] of ss1.clients) {
|
||||
const structs2 = /** @type {Array<Y.AbstractStruct>} */ (ss2.clients.get(client));
|
||||
t.assert(structs2 !== undefined && structs1.length === structs2.length);
|
||||
for (let i = 0; i < structs1.length; i++) {
|
||||
const s1 = structs1[i];
|
||||
const s2 = structs2[i];
|
||||
// checks for abstract struct
|
||||
if (
|
||||
s1.constructor !== s2.constructor ||
|
||||
!Y.compareIDs(s1.id, s2.id) ||
|
||||
s1.deleted !== s2.deleted ||
|
||||
// @ts-ignore
|
||||
s1.length !== s2.length
|
||||
) {
|
||||
t.fail('Structs dont match');
|
||||
}
|
||||
if (s1 instanceof Y.Item) {
|
||||
if (
|
||||
!(s2 instanceof Y.Item) ||
|
||||
!((s1.left === null && s2.left === null) || (s1.left !== null && s2.left !== null && Y.compareIDs(s1.left.lastId, s2.left.lastId))) ||
|
||||
!compareItemIDs(s1.right, s2.right) ||
|
||||
!Y.compareIDs(s1.origin, s2.origin) ||
|
||||
!Y.compareIDs(s1.rightOrigin, s2.rightOrigin) ||
|
||||
s1.parentSub !== s2.parentSub
|
||||
) {
|
||||
return t.fail('Items dont match')
|
||||
}
|
||||
// make sure that items are connected correctly
|
||||
t.assert(s1.left === null || s1.left.right === s1);
|
||||
t.assert(s1.right === null || s1.right.left === s1);
|
||||
t.assert(s2.left === null || s2.left.right === s2);
|
||||
t.assert(s2.right === null || s2.right.left === s2);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @callback InitTestObjectCallback
|
||||
* @param {TestYInstance} y
|
||||
* @return {T}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @param {t.TestCase} tc
|
||||
* @param {Array<function(Y.Doc,prng.PRNG,T):void>} mods
|
||||
* @param {number} iterations
|
||||
* @param {InitTestObjectCallback<T>} [initTestObject]
|
||||
*/
|
||||
const applyRandomTests = (tc, mods, iterations, initTestObject) => {
|
||||
const gen = tc.prng;
|
||||
const result = init(tc, { users: 5 }, initTestObject);
|
||||
const { testConnector, users } = result;
|
||||
for (let i = 0; i < iterations; i++) {
|
||||
if (prng.int32(gen, 0, 100) <= 2) {
|
||||
// 2% chance to disconnect/reconnect a random user
|
||||
if (prng.bool(gen)) {
|
||||
testConnector.disconnectRandom();
|
||||
} else {
|
||||
testConnector.reconnectRandom();
|
||||
}
|
||||
} else if (prng.int32(gen, 0, 100) <= 1) {
|
||||
// 1% chance to flush all
|
||||
testConnector.flushAllMessages();
|
||||
} else if (prng.int32(gen, 0, 100) <= 50) {
|
||||
// 50% chance to flush a random message
|
||||
testConnector.flushRandomMessage();
|
||||
}
|
||||
const user = prng.int32(gen, 0, users.length - 1);
|
||||
const test = prng.oneOf(gen, mods);
|
||||
test(users[user], gen, result.testObjects[user]);
|
||||
}
|
||||
compare(users);
|
||||
return result
|
||||
};
|
||||
|
||||
export { TestConnector, TestYInstance, applyRandomTests, compare, compareItemIDs, compareStructStores, enc, encV1, encV2, init, useV2 };
|
||||
//# sourceMappingURL=testHelper.mjs.map
|
||||
10434
yjs-poll/node_modules/yjs/dist/yjs.cjs
generated
vendored
Normal file
10434
yjs-poll/node_modules/yjs/dist/yjs.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
yjs-poll/node_modules/yjs/dist/yjs.cjs.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/yjs.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
10295
yjs-poll/node_modules/yjs/dist/yjs.mjs
generated
vendored
Normal file
10295
yjs-poll/node_modules/yjs/dist/yjs.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
yjs-poll/node_modules/yjs/dist/yjs.mjs.map
generated
vendored
Normal file
1
yjs-poll/node_modules/yjs/dist/yjs.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
99
yjs-poll/node_modules/yjs/package.json
generated
vendored
Normal file
99
yjs-poll/node_modules/yjs/package.json
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "13.6.29",
|
||||
"description": "Shared Editing Library",
|
||||
"main": "./dist/yjs.cjs",
|
||||
"module": "./dist/yjs.mjs",
|
||||
"types": "./dist/src/index.d.ts",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"funding": {
|
||||
"type": "GitHub Sponsors ❤",
|
||||
"url": "https://github.com/sponsors/dmonad"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -rf dist docs",
|
||||
"test": "npm run dist && NODE_ENV=development node ./dist/tests.cjs --repetition-time 50",
|
||||
"test-extensive": "npm run lint && npm run dist && node ./dist/tests.cjs --production --repetition-time 10000",
|
||||
"dist": "npm run clean && rollup -c && tsc",
|
||||
"watch": "rollup -wc",
|
||||
"lint": "markdownlint README.md && standard && tsc",
|
||||
"docs": "rm -rf docs; jsdoc --configure ./.jsdoc.json --verbose --readme ./README.md --package ./package.json || true",
|
||||
"serve-docs": "npm run docs && http-server ./docs/",
|
||||
"preversion": "npm run lint && PRODUCTION=1 npm run dist && npm run docs && node ./dist/tests.cjs --repetition-time 1000 && test -e dist/src/index.d.ts && test -e dist/yjs.cjs && test -e dist/yjs.cjs",
|
||||
"debug": "concurrently 'http-server -o test.html' 'npm run watch'",
|
||||
"trace-deopt": "clear && rollup -c && node --trace-deopt dist/test.cjs",
|
||||
"trace-opt": "clear && rollup -c && node --trace-opt dist/test.cjs"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/src/index.d.ts",
|
||||
"module": "./dist/yjs.mjs",
|
||||
"import": "./dist/yjs.mjs",
|
||||
"require": "./dist/yjs.cjs"
|
||||
},
|
||||
"./src/index.js": "./src/index.js",
|
||||
"./tests/testHelper.js": "./tests/testHelper.js",
|
||||
"./testHelper": "./dist/testHelper.mjs",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"dist/yjs.*",
|
||||
"dist/src",
|
||||
"src",
|
||||
"tests/testHelper.js",
|
||||
"dist/testHelper.mjs",
|
||||
"sponsor-y.js"
|
||||
],
|
||||
"dictionaries": {
|
||||
"test": "tests"
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [
|
||||
"/dist",
|
||||
"/node_modules",
|
||||
"/docs"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yjs/yjs.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Yjs",
|
||||
"CRDT",
|
||||
"offline",
|
||||
"offline-first",
|
||||
"shared-editing",
|
||||
"concurrency",
|
||||
"collaboration"
|
||||
],
|
||||
"author": "Kevin Jahns",
|
||||
"email": "kevin.jahns@protonmail.com",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/yjs/yjs/issues"
|
||||
},
|
||||
"homepage": "https://docs.yjs.dev",
|
||||
"dependencies": {
|
||||
"lib0": "^0.2.99"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^24.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@types/node": "^18.15.5",
|
||||
"concurrently": "^3.6.1",
|
||||
"http-server": "^0.12.3",
|
||||
"jsdoc": "^3.6.7",
|
||||
"markdownlint-cli": "^0.41.0",
|
||||
"rollup": "^3.20.0",
|
||||
"standard": "^16.0.4",
|
||||
"tui-jsdoc-template": "^1.2.2",
|
||||
"typescript": "^4.9.5",
|
||||
"y-protocols": "^1.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"npm": ">=8.0.0",
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
}
|
||||
135
yjs-poll/node_modules/yjs/src/index.js
generated
vendored
Normal file
135
yjs-poll/node_modules/yjs/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
/** eslint-env browser */
|
||||
|
||||
export {
|
||||
Doc,
|
||||
Transaction,
|
||||
YArray as Array,
|
||||
YMap as Map,
|
||||
YText as Text,
|
||||
YXmlText as XmlText,
|
||||
YXmlHook as XmlHook,
|
||||
YXmlElement as XmlElement,
|
||||
YXmlFragment as XmlFragment,
|
||||
YXmlEvent,
|
||||
YMapEvent,
|
||||
YArrayEvent,
|
||||
YTextEvent,
|
||||
YEvent,
|
||||
Item,
|
||||
AbstractStruct,
|
||||
GC,
|
||||
Skip,
|
||||
ContentBinary,
|
||||
ContentDeleted,
|
||||
ContentDoc,
|
||||
ContentEmbed,
|
||||
ContentFormat,
|
||||
ContentJSON,
|
||||
ContentAny,
|
||||
ContentString,
|
||||
ContentType,
|
||||
AbstractType,
|
||||
getTypeChildren,
|
||||
createRelativePositionFromTypeIndex,
|
||||
createRelativePositionFromJSON,
|
||||
createAbsolutePositionFromRelativePosition,
|
||||
compareRelativePositions,
|
||||
AbsolutePosition,
|
||||
RelativePosition,
|
||||
ID,
|
||||
createID,
|
||||
compareIDs,
|
||||
getState,
|
||||
Snapshot,
|
||||
createSnapshot,
|
||||
createDeleteSet,
|
||||
createDeleteSetFromStructStore,
|
||||
cleanupYTextFormatting,
|
||||
snapshot,
|
||||
emptySnapshot,
|
||||
findRootTypeKey,
|
||||
findIndexSS,
|
||||
getItem,
|
||||
getItemCleanStart,
|
||||
getItemCleanEnd,
|
||||
typeListToArraySnapshot,
|
||||
typeMapGetSnapshot,
|
||||
typeMapGetAllSnapshot,
|
||||
createDocFromSnapshot,
|
||||
iterateDeletedStructs,
|
||||
applyUpdate,
|
||||
applyUpdateV2,
|
||||
readUpdate,
|
||||
readUpdateV2,
|
||||
encodeStateAsUpdate,
|
||||
encodeStateAsUpdateV2,
|
||||
encodeStateVector,
|
||||
UndoManager,
|
||||
decodeSnapshot,
|
||||
encodeSnapshot,
|
||||
decodeSnapshotV2,
|
||||
encodeSnapshotV2,
|
||||
decodeStateVector,
|
||||
logUpdate,
|
||||
logUpdateV2,
|
||||
decodeUpdate,
|
||||
decodeUpdateV2,
|
||||
relativePositionToJSON,
|
||||
isDeleted,
|
||||
isParentOf,
|
||||
equalSnapshots,
|
||||
PermanentUserData, // @TODO experimental
|
||||
tryGc,
|
||||
transact,
|
||||
AbstractConnector,
|
||||
logType,
|
||||
mergeUpdates,
|
||||
mergeUpdatesV2,
|
||||
parseUpdateMeta,
|
||||
parseUpdateMetaV2,
|
||||
encodeStateVectorFromUpdate,
|
||||
encodeStateVectorFromUpdateV2,
|
||||
encodeRelativePosition,
|
||||
decodeRelativePosition,
|
||||
diffUpdate,
|
||||
diffUpdateV2,
|
||||
convertUpdateFormatV1ToV2,
|
||||
convertUpdateFormatV2ToV1,
|
||||
obfuscateUpdate,
|
||||
obfuscateUpdateV2,
|
||||
UpdateEncoderV1,
|
||||
UpdateEncoderV2,
|
||||
UpdateDecoderV1,
|
||||
UpdateDecoderV2,
|
||||
equalDeleteSets,
|
||||
mergeDeleteSets,
|
||||
snapshotContainsUpdate
|
||||
} from './internals.js'
|
||||
|
||||
const glo = /** @type {any} */ (typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
// @ts-ignore
|
||||
: typeof global !== 'undefined' ? global : {})
|
||||
|
||||
const importIdentifier = '__ $YJS$ __'
|
||||
|
||||
if (glo[importIdentifier] === true) {
|
||||
/**
|
||||
* Dear reader of this message. Please take this seriously.
|
||||
*
|
||||
* If you see this message, make sure that you only import one version of Yjs. In many cases,
|
||||
* your package manager installs two versions of Yjs that are used by different packages within your project.
|
||||
* Another reason for this message is that some parts of your project use the commonjs version of Yjs
|
||||
* and others use the EcmaScript version of Yjs.
|
||||
*
|
||||
* This often leads to issues that are hard to debug. We often need to perform constructor checks,
|
||||
* e.g. `struct instanceof GC`. If you imported different versions of Yjs, it is impossible for us to
|
||||
* do the constructor checks anymore - which might break the CRDT algorithm.
|
||||
*
|
||||
* https://github.com/yjs/yjs/issues/438
|
||||
*/
|
||||
console.error('Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438')
|
||||
}
|
||||
glo[importIdentifier] = true
|
||||
42
yjs-poll/node_modules/yjs/src/internals.js
generated
vendored
Normal file
42
yjs-poll/node_modules/yjs/src/internals.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
export * from './utils/AbstractConnector.js'
|
||||
export * from './utils/DeleteSet.js'
|
||||
export * from './utils/Doc.js'
|
||||
export * from './utils/UpdateDecoder.js'
|
||||
export * from './utils/UpdateEncoder.js'
|
||||
export * from './utils/encoding.js'
|
||||
export * from './utils/EventHandler.js'
|
||||
export * from './utils/ID.js'
|
||||
export * from './utils/isParentOf.js'
|
||||
export * from './utils/logging.js'
|
||||
export * from './utils/PermanentUserData.js'
|
||||
export * from './utils/RelativePosition.js'
|
||||
export * from './utils/Snapshot.js'
|
||||
export * from './utils/StructStore.js'
|
||||
export * from './utils/Transaction.js'
|
||||
export * from './utils/UndoManager.js'
|
||||
export * from './utils/updates.js'
|
||||
export * from './utils/YEvent.js'
|
||||
|
||||
export * from './types/AbstractType.js'
|
||||
export * from './types/YArray.js'
|
||||
export * from './types/YMap.js'
|
||||
export * from './types/YText.js'
|
||||
export * from './types/YXmlFragment.js'
|
||||
export * from './types/YXmlElement.js'
|
||||
export * from './types/YXmlEvent.js'
|
||||
export * from './types/YXmlHook.js'
|
||||
export * from './types/YXmlText.js'
|
||||
|
||||
export * from './structs/AbstractStruct.js'
|
||||
export * from './structs/GC.js'
|
||||
export * from './structs/ContentBinary.js'
|
||||
export * from './structs/ContentDeleted.js'
|
||||
export * from './structs/ContentDoc.js'
|
||||
export * from './structs/ContentEmbed.js'
|
||||
export * from './structs/ContentFormat.js'
|
||||
export * from './structs/ContentJSON.js'
|
||||
export * from './structs/ContentAny.js'
|
||||
export * from './structs/ContentString.js'
|
||||
export * from './structs/ContentType.js'
|
||||
export * from './structs/Item.js'
|
||||
export * from './structs/Skip.js'
|
||||
51
yjs-poll/node_modules/yjs/src/structs/AbstractStruct.js
generated
vendored
Normal file
51
yjs-poll/node_modules/yjs/src/structs/AbstractStruct.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
import {
|
||||
UpdateEncoderV1, UpdateEncoderV2, ID, Transaction // eslint-disable-line
|
||||
} from '../internals.js'
|
||||
|
||||
import * as error from 'lib0/error'
|
||||
|
||||
export class AbstractStruct {
|
||||
/**
|
||||
* @param {ID} id
|
||||
* @param {number} length
|
||||
*/
|
||||
constructor (id, length) {
|
||||
this.id = id
|
||||
this.length = length
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
get deleted () {
|
||||
throw error.methodUnimplemented()
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge this struct with the item to the right.
|
||||
* This method is already assuming that `this.id.clock + this.length === this.id.clock`.
|
||||
* Also this method does *not* remove right from StructStore!
|
||||
* @param {AbstractStruct} right
|
||||
* @return {boolean} whether this merged with right
|
||||
*/
|
||||
mergeWith (right) {
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
|
||||
* @param {number} offset
|
||||
* @param {number} encodingRef
|
||||
*/
|
||||
write (encoder, offset, encodingRef) {
|
||||
throw error.methodUnimplemented()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {number} offset
|
||||
*/
|
||||
integrate (transaction, offset) {
|
||||
throw error.methodUnimplemented()
|
||||
}
|
||||
}
|
||||
114
yjs-poll/node_modules/yjs/src/structs/ContentAny.js
generated
vendored
Normal file
114
yjs-poll/node_modules/yjs/src/structs/ContentAny.js
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
import {
|
||||
UpdateEncoderV1, UpdateEncoderV2, UpdateDecoderV1, UpdateDecoderV2, Transaction, Item, StructStore // eslint-disable-line
|
||||
} from '../internals.js'
|
||||
|
||||
import * as env from 'lib0/environment'
|
||||
import * as object from 'lib0/object'
|
||||
|
||||
const isDevMode = env.getVariable('node_env') === 'development'
|
||||
|
||||
export class ContentAny {
|
||||
/**
|
||||
* @param {Array<any>} arr
|
||||
*/
|
||||
constructor (arr) {
|
||||
/**
|
||||
* @type {Array<any>}
|
||||
*/
|
||||
this.arr = arr
|
||||
isDevMode && object.deepFreeze(arr)
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength () {
|
||||
return this.arr.length
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent () {
|
||||
return this.arr
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable () {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {ContentAny}
|
||||
*/
|
||||
copy () {
|
||||
return new ContentAny(this.arr)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentAny}
|
||||
*/
|
||||
splice (offset) {
|
||||
const right = new ContentAny(this.arr.slice(offset))
|
||||
this.arr = this.arr.slice(0, offset)
|
||||
return right
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ContentAny} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith (right) {
|
||||
this.arr = this.arr.concat(right.arr)
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate (transaction, item) {}
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete (transaction) {}
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc (store) {}
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write (encoder, offset) {
|
||||
const len = this.arr.length
|
||||
encoder.writeLen(len - offset)
|
||||
for (let i = offset; i < len; i++) {
|
||||
const c = this.arr[i]
|
||||
encoder.writeAny(c)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef () {
|
||||
return 8
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {UpdateDecoderV1 | UpdateDecoderV2} decoder
|
||||
* @return {ContentAny}
|
||||
*/
|
||||
export const readContentAny = decoder => {
|
||||
const len = decoder.readLen()
|
||||
const cs = []
|
||||
for (let i = 0; i < len; i++) {
|
||||
cs.push(decoder.readAny())
|
||||
}
|
||||
return new ContentAny(cs)
|
||||
}
|
||||
92
yjs-poll/node_modules/yjs/src/structs/ContentBinary.js
generated
vendored
Normal file
92
yjs-poll/node_modules/yjs/src/structs/ContentBinary.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import {
|
||||
UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Item, Transaction // eslint-disable-line
|
||||
} from '../internals.js'
|
||||
|
||||
import * as error from 'lib0/error'
|
||||
|
||||
export class ContentBinary {
|
||||
/**
|
||||
* @param {Uint8Array} content
|
||||
*/
|
||||
constructor (content) {
|
||||
this.content = content
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength () {
|
||||
return 1
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent () {
|
||||
return [this.content]
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable () {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {ContentBinary}
|
||||
*/
|
||||
copy () {
|
||||
return new ContentBinary(this.content)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentBinary}
|
||||
*/
|
||||
splice (offset) {
|
||||
throw error.methodUnimplemented()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ContentBinary} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith (right) {
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate (transaction, item) {}
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete (transaction) {}
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc (store) {}
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write (encoder, offset) {
|
||||
encoder.writeBuf(this.content)
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef () {
|
||||
return 3
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {UpdateDecoderV1 | UpdateDecoderV2 } decoder
|
||||
* @return {ContentBinary}
|
||||
*/
|
||||
export const readContentBinary = decoder => new ContentBinary(decoder.readBuf())
|
||||
100
yjs-poll/node_modules/yjs/src/structs/ContentDeleted.js
generated
vendored
Normal file
100
yjs-poll/node_modules/yjs/src/structs/ContentDeleted.js
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
import {
|
||||
addToDeleteSet,
|
||||
UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Item, Transaction // eslint-disable-line
|
||||
} from '../internals.js'
|
||||
|
||||
export class ContentDeleted {
|
||||
/**
|
||||
* @param {number} len
|
||||
*/
|
||||
constructor (len) {
|
||||
this.len = len
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength () {
|
||||
return this.len
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent () {
|
||||
return []
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable () {
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {ContentDeleted}
|
||||
*/
|
||||
copy () {
|
||||
return new ContentDeleted(this.len)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentDeleted}
|
||||
*/
|
||||
splice (offset) {
|
||||
const right = new ContentDeleted(this.len - offset)
|
||||
this.len = offset
|
||||
return right
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ContentDeleted} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith (right) {
|
||||
this.len += right.len
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate (transaction, item) {
|
||||
addToDeleteSet(transaction.deleteSet, item.id.client, item.id.clock, this.len)
|
||||
item.markDeleted()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete (transaction) {}
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc (store) {}
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write (encoder, offset) {
|
||||
encoder.writeLen(this.len - offset)
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef () {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {UpdateDecoderV1 | UpdateDecoderV2 } decoder
|
||||
* @return {ContentDeleted}
|
||||
*/
|
||||
export const readContentDeleted = decoder => new ContentDeleted(decoder.readLen())
|
||||
140
yjs-poll/node_modules/yjs/src/structs/ContentDoc.js
generated
vendored
Normal file
140
yjs-poll/node_modules/yjs/src/structs/ContentDoc.js
generated
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
import {
|
||||
Doc, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Transaction, Item // eslint-disable-line
|
||||
} from '../internals.js'
|
||||
|
||||
import * as error from 'lib0/error'
|
||||
|
||||
/**
|
||||
* @param {string} guid
|
||||
* @param {Object<string, any>} opts
|
||||
*/
|
||||
const createDocFromOpts = (guid, opts) => new Doc({ guid, ...opts, shouldLoad: opts.shouldLoad || opts.autoLoad || false })
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class ContentDoc {
|
||||
/**
|
||||
* @param {Doc} doc
|
||||
*/
|
||||
constructor (doc) {
|
||||
if (doc._item) {
|
||||
console.error('This document was already integrated as a sub-document. You should create a second instance instead with the same guid.')
|
||||
}
|
||||
/**
|
||||
* @type {Doc}
|
||||
*/
|
||||
this.doc = doc
|
||||
/**
|
||||
* @type {any}
|
||||
*/
|
||||
const opts = {}
|
||||
this.opts = opts
|
||||
if (!doc.gc) {
|
||||
opts.gc = false
|
||||
}
|
||||
if (doc.autoLoad) {
|
||||
opts.autoLoad = true
|
||||
}
|
||||
if (doc.meta !== null) {
|
||||
opts.meta = doc.meta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength () {
|
||||
return 1
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent () {
|
||||
return [this.doc]
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable () {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {ContentDoc}
|
||||
*/
|
||||
copy () {
|
||||
return new ContentDoc(createDocFromOpts(this.doc.guid, this.opts))
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentDoc}
|
||||
*/
|
||||
splice (offset) {
|
||||
throw error.methodUnimplemented()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ContentDoc} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith (right) {
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate (transaction, item) {
|
||||
// this needs to be reflected in doc.destroy as well
|
||||
this.doc._item = item
|
||||
transaction.subdocsAdded.add(this.doc)
|
||||
if (this.doc.shouldLoad) {
|
||||
transaction.subdocsLoaded.add(this.doc)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete (transaction) {
|
||||
if (transaction.subdocsAdded.has(this.doc)) {
|
||||
transaction.subdocsAdded.delete(this.doc)
|
||||
} else {
|
||||
transaction.subdocsRemoved.add(this.doc)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc (store) { }
|
||||
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write (encoder, offset) {
|
||||
encoder.writeString(this.doc.guid)
|
||||
encoder.writeAny(this.opts)
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef () {
|
||||
return 9
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {UpdateDecoderV1 | UpdateDecoderV2} decoder
|
||||
* @return {ContentDoc}
|
||||
*/
|
||||
export const readContentDoc = decoder => new ContentDoc(createDocFromOpts(decoder.readString(), decoder.readAny()))
|
||||
97
yjs-poll/node_modules/yjs/src/structs/ContentEmbed.js
generated
vendored
Normal file
97
yjs-poll/node_modules/yjs/src/structs/ContentEmbed.js
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
import {
|
||||
UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Item, Transaction // eslint-disable-line
|
||||
} from '../internals.js'
|
||||
|
||||
import * as error from 'lib0/error'
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class ContentEmbed {
|
||||
/**
|
||||
* @param {Object} embed
|
||||
*/
|
||||
constructor (embed) {
|
||||
this.embed = embed
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getLength () {
|
||||
return 1
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Array<any>}
|
||||
*/
|
||||
getContent () {
|
||||
return [this.embed]
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCountable () {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {ContentEmbed}
|
||||
*/
|
||||
copy () {
|
||||
return new ContentEmbed(this.embed)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @return {ContentEmbed}
|
||||
*/
|
||||
splice (offset) {
|
||||
throw error.methodUnimplemented()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ContentEmbed} right
|
||||
* @return {boolean}
|
||||
*/
|
||||
mergeWith (right) {
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
* @param {Item} item
|
||||
*/
|
||||
integrate (transaction, item) {}
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
*/
|
||||
delete (transaction) {}
|
||||
/**
|
||||
* @param {StructStore} store
|
||||
*/
|
||||
gc (store) {}
|
||||
/**
|
||||
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
||||
* @param {number} offset
|
||||
*/
|
||||
write (encoder, offset) {
|
||||
encoder.writeJSON(this.embed)
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
getRef () {
|
||||
return 5
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {UpdateDecoderV1 | UpdateDecoderV2} decoder
|
||||
* @return {ContentEmbed}
|
||||
*/
|
||||
export const readContentEmbed = decoder => new ContentEmbed(decoder.readJSON())
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user