| 'use strict'; | ||
| var Skip = require('./Skip-CpmLMm7q.js'); | ||
| require('lib0/function'); | ||
| require('lib0/decoding'); | ||
| require('lib0/binary'); | ||
| require('lib0/map'); | ||
| /** eslint-env browser */ | ||
| 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; | ||
| var Y = /*#__PURE__*/Object.freeze({ | ||
| __proto__: null, | ||
| AbsolutePosition: Skip.AbsolutePosition, | ||
| AbstractAttributionManager: Skip.AbstractAttributionManager, | ||
| AbstractConnector: Skip.AbstractConnector, | ||
| AbstractStruct: Skip.AbstractStruct, | ||
| AbstractType: Skip.AbstractType, | ||
| Array: Skip.YArray, | ||
| Attribution: Skip.AttributionItem, | ||
| ContentAny: Skip.ContentAny, | ||
| ContentBinary: Skip.ContentBinary, | ||
| ContentDeleted: Skip.ContentDeleted, | ||
| ContentDoc: Skip.ContentDoc, | ||
| ContentEmbed: Skip.ContentEmbed, | ||
| ContentFormat: Skip.ContentFormat, | ||
| ContentJSON: Skip.ContentJSON, | ||
| ContentString: Skip.ContentString, | ||
| ContentType: Skip.ContentType, | ||
| DiffAttributionManager: Skip.DiffAttributionManager, | ||
| Doc: Skip.Doc, | ||
| GC: Skip.GC, | ||
| ID: Skip.ID, | ||
| IdMap: Skip.IdMap, | ||
| IdSet: Skip.IdSet, | ||
| Item: Skip.Item, | ||
| Map: Skip.YMap, | ||
| RelativePosition: Skip.RelativePosition, | ||
| Skip: Skip.Skip, | ||
| Snapshot: Skip.Snapshot, | ||
| Text: Skip.YText, | ||
| Transaction: Skip.Transaction, | ||
| TwosetAttributionManager: Skip.TwosetAttributionManager, | ||
| UndoManager: Skip.UndoManager, | ||
| UpdateDecoderV1: Skip.UpdateDecoderV1, | ||
| UpdateDecoderV2: Skip.UpdateDecoderV2, | ||
| UpdateEncoderV1: Skip.UpdateEncoderV1, | ||
| UpdateEncoderV2: Skip.UpdateEncoderV2, | ||
| XmlElement: Skip.YXmlElement, | ||
| XmlFragment: Skip.YXmlFragment, | ||
| XmlHook: Skip.YXmlHook, | ||
| XmlText: Skip.YXmlText, | ||
| YEvent: Skip.YEvent, | ||
| applyUpdate: Skip.applyUpdate, | ||
| applyUpdateV2: Skip.applyUpdateV2, | ||
| cleanupYTextFormatting: Skip.cleanupYTextFormatting, | ||
| cloneDoc: Skip.cloneDoc, | ||
| compareIDs: Skip.compareIDs, | ||
| compareRelativePositions: Skip.compareRelativePositions, | ||
| convertUpdateFormatV1ToV2: Skip.convertUpdateFormatV1ToV2, | ||
| convertUpdateFormatV2ToV1: Skip.convertUpdateFormatV2ToV1, | ||
| createAbsolutePositionFromRelativePosition: Skip.createAbsolutePositionFromRelativePosition, | ||
| createAttributionItem: Skip.createAttributionItem, | ||
| createAttributionManagerFromDiff: Skip.createAttributionManagerFromDiff, | ||
| createDeleteSetFromStructStore: Skip.createDeleteSetFromStructStore, | ||
| createDocFromSnapshot: Skip.createDocFromSnapshot, | ||
| createID: Skip.createID, | ||
| createIdMap: Skip.createIdMap, | ||
| createIdMapFromIdSet: Skip.createIdMapFromIdSet, | ||
| createIdSet: Skip.createIdSet, | ||
| createInsertionSetFromStructStore: Skip.createInsertSetFromStructStore, | ||
| createRelativePositionFromJSON: Skip.createRelativePositionFromJSON, | ||
| createRelativePositionFromTypeIndex: Skip.createRelativePositionFromTypeIndex, | ||
| createSnapshot: Skip.createSnapshot, | ||
| decodeIdMap: Skip.decodeIdMap, | ||
| decodeRelativePosition: Skip.decodeRelativePosition, | ||
| decodeSnapshot: Skip.decodeSnapshot, | ||
| decodeSnapshotV2: Skip.decodeSnapshotV2, | ||
| decodeStateVector: Skip.decodeStateVector, | ||
| decodeUpdate: Skip.decodeUpdate, | ||
| decodeUpdateV2: Skip.decodeUpdateV2, | ||
| diffDocsToDelta: Skip.diffDocsToDelta, | ||
| diffIdMap: Skip.diffIdMap, | ||
| diffIdSet: Skip.diffIdSet, | ||
| diffUpdate: Skip.diffUpdate, | ||
| diffUpdateV2: Skip.diffUpdateV2, | ||
| emptySnapshot: Skip.emptySnapshot, | ||
| encodeIdMap: Skip.encodeIdMap, | ||
| encodeRelativePosition: Skip.encodeRelativePosition, | ||
| encodeSnapshot: Skip.encodeSnapshot, | ||
| encodeSnapshotV2: Skip.encodeSnapshotV2, | ||
| encodeStateAsUpdate: Skip.encodeStateAsUpdate, | ||
| encodeStateAsUpdateV2: Skip.encodeStateAsUpdateV2, | ||
| encodeStateVector: Skip.encodeStateVector, | ||
| encodeStateVectorFromUpdate: Skip.encodeStateVectorFromUpdate, | ||
| encodeStateVectorFromUpdateV2: Skip.encodeStateVectorFromUpdateV2, | ||
| equalIdSets: Skip.equalIdSets, | ||
| equalSnapshots: Skip.equalSnapshots, | ||
| findIndexSS: Skip.findIndexSS, | ||
| findRootTypeKey: Skip.findRootTypeKey, | ||
| getItem: Skip.getItem, | ||
| getItemCleanEnd: Skip.getItemCleanEnd, | ||
| getItemCleanStart: Skip.getItemCleanStart, | ||
| getState: Skip.getState, | ||
| getTypeChildren: Skip.getTypeChildren, | ||
| insertIntoIdMap: Skip.insertIntoIdMap, | ||
| insertIntoIdSet: Skip.insertIntoIdSet, | ||
| isParentOf: Skip.isParentOf, | ||
| iterateStructsByIdSet: Skip.iterateStructsByIdSet, | ||
| logType: Skip.logType, | ||
| logUpdate: Skip.logUpdate, | ||
| logUpdateV2: Skip.logUpdateV2, | ||
| mergeIdMaps: Skip.mergeIdMaps, | ||
| mergeIdSets: Skip.mergeIdSets, | ||
| mergeUpdates: Skip.mergeUpdates, | ||
| mergeUpdatesV2: Skip.mergeUpdatesV2, | ||
| noAttributionsManager: Skip.noAttributionsManager, | ||
| obfuscateUpdate: Skip.obfuscateUpdate, | ||
| obfuscateUpdateV2: Skip.obfuscateUpdateV2, | ||
| readIdMap: Skip.readIdMap, | ||
| readIdSet: Skip.readIdSet, | ||
| readUpdate: Skip.readUpdate, | ||
| readUpdateIdRanges: Skip.readUpdateIdRanges, | ||
| readUpdateIdRangesV2: Skip.readUpdateIdRangesV2, | ||
| readUpdateV2: Skip.readUpdateV2, | ||
| relativePositionToJSON: Skip.relativePositionToJSON, | ||
| snapshot: Skip.snapshot, | ||
| snapshotContainsUpdate: Skip.snapshotContainsUpdate, | ||
| transact: Skip.transact, | ||
| tryGc: Skip.tryGc, | ||
| typeListToArraySnapshot: Skip.typeListToArraySnapshot, | ||
| typeMapGetAllSnapshot: Skip.typeMapGetAllSnapshot, | ||
| typeMapGetSnapshot: Skip.typeMapGetSnapshot | ||
| }); | ||
| exports.Y = Y; | ||
| //# sourceMappingURL=index-B8_EfGwa.js.map |
| {"version":3,"file":"index-B8_EfGwa.js","sources":["../src/index.js"],"sourcesContent":["/** eslint-env browser */\n\nexport {\n Doc,\n Transaction,\n YArray as Array,\n YMap as Map,\n YText as Text,\n YXmlText as XmlText,\n YXmlHook as XmlHook,\n YXmlElement as XmlElement,\n YXmlFragment as XmlFragment,\n YEvent,\n Item,\n AbstractStruct,\n GC,\n Skip,\n ContentBinary,\n ContentDeleted,\n ContentDoc,\n ContentEmbed,\n ContentFormat,\n ContentJSON,\n ContentAny,\n ContentString,\n ContentType,\n AbstractType,\n getTypeChildren,\n createRelativePositionFromTypeIndex,\n createRelativePositionFromJSON,\n createAbsolutePositionFromRelativePosition,\n compareRelativePositions,\n AbsolutePosition,\n RelativePosition,\n ID,\n createID,\n compareIDs,\n getState,\n Snapshot,\n createSnapshot,\n cleanupYTextFormatting,\n snapshot,\n emptySnapshot,\n findRootTypeKey,\n findIndexSS,\n getItem,\n getItemCleanStart,\n getItemCleanEnd,\n typeListToArraySnapshot,\n typeMapGetSnapshot,\n typeMapGetAllSnapshot,\n createDocFromSnapshot,\n applyUpdate,\n applyUpdateV2,\n readUpdate,\n readUpdateV2,\n encodeStateAsUpdate,\n encodeStateAsUpdateV2,\n encodeStateVector,\n UndoManager,\n decodeSnapshot,\n encodeSnapshot,\n decodeSnapshotV2,\n encodeSnapshotV2,\n decodeStateVector,\n logUpdate,\n logUpdateV2,\n decodeUpdate,\n decodeUpdateV2,\n relativePositionToJSON,\n isParentOf,\n equalSnapshots,\n tryGc,\n transact,\n AbstractConnector,\n logType,\n mergeUpdates,\n mergeUpdatesV2,\n encodeStateVectorFromUpdate,\n encodeStateVectorFromUpdateV2,\n encodeRelativePosition,\n decodeRelativePosition,\n diffUpdate,\n diffUpdateV2,\n convertUpdateFormatV1ToV2,\n convertUpdateFormatV2ToV1,\n obfuscateUpdate,\n obfuscateUpdateV2,\n UpdateEncoderV1,\n UpdateEncoderV2,\n UpdateDecoderV1,\n UpdateDecoderV2,\n snapshotContainsUpdate,\n // idset\n IdSet,\n equalIdSets,\n createDeleteSetFromStructStore,\n IdMap,\n createIdMap,\n createAttributionItem,\n createInsertSetFromStructStore as createInsertionSetFromStructStore,\n diffIdMap,\n diffIdSet,\n AttributionItem as Attribution,\n encodeIdMap,\n createIdMapFromIdSet,\n TwosetAttributionManager,\n noAttributionsManager,\n AbstractAttributionManager,\n iterateStructsByIdSet,\n createAttributionManagerFromDiff,\n DiffAttributionManager,\n createIdSet,\n mergeIdSets,\n cloneDoc,\n readUpdateIdRanges,\n readUpdateIdRangesV2,\n insertIntoIdMap,\n insertIntoIdSet,\n mergeIdMaps,\n readIdMap,\n readIdSet,\n decodeIdMap,\n diffDocsToDelta\n} from './internals.js'\n\nconst glo = /** @type {any} */ (typeof globalThis !== 'undefined'\n ? globalThis\n : typeof window !== 'undefined'\n ? window\n // @ts-ignore\n : typeof global !== 'undefined' ? global : {})\n\nconst importIdentifier = '__ $YJS$ __'\n\nif (glo[importIdentifier] === true) {\n /**\n * Dear reader of this message. Please take this seriously.\n *\n * If you see this message, make sure that you only import one version of Yjs. In many cases,\n * your package manager installs two versions of Yjs that are used by different packages within your project.\n * Another reason for this message is that some parts of your project use the commonjs version of Yjs\n * and others use the EcmaScript version of Yjs.\n *\n * This often leads to issues that are hard to debug. We often need to perform constructor checks,\n * e.g. `struct instanceof GC`. If you imported different versions of Yjs, it is impossible for us to\n * do the constructor checks anymore - which might break the CRDT algorithm.\n *\n * https://github.com/yjs/yjs/issues/438\n */\n console.error('Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438')\n}\nglo[importIdentifier] = true\n"],"names":[],"mappings":";;;;;;;;AAAA;;;AA8HA,MAAM,GAAG,uBAAuB,OAAO,UAAU,KAAK;AACtD,IAAI;AACJ,IAAI,OAAO,MAAM,KAAK;AACtB,MAAM;AACN;AACA,MAAM,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,EAAE;;AAEjD,MAAM,gBAAgB,GAAG;;AAEzB,IAAI,GAAG,CAAC,gBAAgB,CAAC,KAAK,IAAI,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,KAAK,CAAC,2HAA2H;AAC3I;AACA,GAAG,CAAC,gBAAgB,CAAC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
| import { ah as AbsolutePosition, bF as AbstractAttributionManager, A as AbstractConnector, cy as AbstractStruct, bU as AbstractType, cf as YArray, bl as AttributionItem, cN as ContentAny, cB as ContentBinary, cD as ContentDeleted, cF as ContentDoc, cH as ContentEmbed, cJ as ContentFormat, cL as ContentJSON, cP as ContentString, cZ as ContentType, bJ as DiffAttributionManager, D as Doc, cA as GC, a6 as ID, bt as IdMap, b as IdSet, d4 as Item, ch as YMap, ae as RelativePosition, d9 as Skip, ar as Snapshot, co as YText, aS as Transaction, bG as TwosetAttributionManager, aZ as UndoManager, U as UpdateDecoderV1, C as UpdateDecoderV2, F as UpdateEncoderV1, H as UpdateEncoderV2, cs as YXmlElement, cq as YXmlFragment, cu as YXmlHook, cw as YXmlText, bh as YEvent, Q as applyUpdate, P as applyUpdateV2, cl as cleanupYTextFormatting, y as cloneDoc, a7 as compareIDs, aq as compareRelativePositions, bf as convertUpdateFormatV1ToV2, bg as convertUpdateFormatV2ToV1, ap as createAbsolutePositionFromRelativePosition, bm as createAttributionItem, bK as createAttributionManagerFromDiff, q as createDeleteSetFromStructStore, aC as createDocFromSnapshot, a8 as createID, by as createIdMap, bs as createIdMapFromIdSet, p as createIdSet, s as createInsertSetFromStructStore, ag as createRelativePositionFromJSON, ak as createRelativePositionFromTypeIndex, ax as createSnapshot, bx as decodeIdMap, ao as decodeRelativePosition, aw as decodeSnapshot, av as decodeSnapshotV2, W as decodeStateVector, b1 as decodeUpdate, b2 as decodeUpdateV2, bN as diffDocsToDelta, bA as diffIdMap, j as diffIdSet, bb as diffUpdate, ba as diffUpdateV2, ay as emptySnapshot, bv as encodeIdMap, am as encodeRelativePosition, au as encodeSnapshot, at as encodeSnapshotV2, T as encodeStateAsUpdate, S as encodeStateAsUpdateV2, $ as encodeStateVector, b6 as encodeStateVectorFromUpdate, b5 as encodeStateVectorFromUpdateV2, v as equalIdSets, as as equalSnapshots, aK as findIndexSS, ab as findRootTypeKey, aM as getItem, aP as getItemCleanEnd, aO as getItemCleanStart, aH as getState, bS as getTypeChildren, bz as insertIntoIdMap, g as insertIntoIdSet, ac as isParentOf, i as iterateStructsByIdSet, ad as logType, a$ as logUpdate, b0 as logUpdateV2, br as mergeIdMaps, m as mergeIdSets, b4 as mergeUpdates, b9 as mergeUpdatesV2, bI as noAttributionsManager, bd as obfuscateUpdate, be as obfuscateUpdateV2, bw as readIdMap, t as readIdSet, O as readUpdate, b8 as readUpdateIdRanges, b7 as readUpdateIdRangesV2, N as readUpdateV2, af as relativePositionToJSON, az as snapshot, aE as snapshotContainsUpdate, aX as transact, aW as tryGc, bY as typeListToArraySnapshot, cd as typeMapGetAllSnapshot, cc as typeMapGetSnapshot } from './Skip-CtOOBRkz.js'; | ||
| import 'lib0/function'; | ||
| import 'lib0/decoding'; | ||
| import 'lib0/binary'; | ||
| import 'lib0/map'; | ||
| /** eslint-env browser */ | ||
| 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; | ||
| var Y = /*#__PURE__*/Object.freeze({ | ||
| __proto__: null, | ||
| AbsolutePosition: AbsolutePosition, | ||
| AbstractAttributionManager: AbstractAttributionManager, | ||
| AbstractConnector: AbstractConnector, | ||
| AbstractStruct: AbstractStruct, | ||
| AbstractType: AbstractType, | ||
| Array: YArray, | ||
| Attribution: AttributionItem, | ||
| ContentAny: ContentAny, | ||
| ContentBinary: ContentBinary, | ||
| ContentDeleted: ContentDeleted, | ||
| ContentDoc: ContentDoc, | ||
| ContentEmbed: ContentEmbed, | ||
| ContentFormat: ContentFormat, | ||
| ContentJSON: ContentJSON, | ||
| ContentString: ContentString, | ||
| ContentType: ContentType, | ||
| DiffAttributionManager: DiffAttributionManager, | ||
| Doc: Doc, | ||
| GC: GC, | ||
| ID: ID, | ||
| IdMap: IdMap, | ||
| IdSet: IdSet, | ||
| Item: Item, | ||
| Map: YMap, | ||
| RelativePosition: RelativePosition, | ||
| Skip: Skip, | ||
| Snapshot: Snapshot, | ||
| Text: YText, | ||
| Transaction: Transaction, | ||
| TwosetAttributionManager: TwosetAttributionManager, | ||
| UndoManager: UndoManager, | ||
| UpdateDecoderV1: UpdateDecoderV1, | ||
| UpdateDecoderV2: UpdateDecoderV2, | ||
| UpdateEncoderV1: UpdateEncoderV1, | ||
| UpdateEncoderV2: UpdateEncoderV2, | ||
| XmlElement: YXmlElement, | ||
| XmlFragment: YXmlFragment, | ||
| XmlHook: YXmlHook, | ||
| XmlText: YXmlText, | ||
| YEvent: YEvent, | ||
| applyUpdate: applyUpdate, | ||
| applyUpdateV2: applyUpdateV2, | ||
| cleanupYTextFormatting: cleanupYTextFormatting, | ||
| cloneDoc: cloneDoc, | ||
| compareIDs: compareIDs, | ||
| compareRelativePositions: compareRelativePositions, | ||
| convertUpdateFormatV1ToV2: convertUpdateFormatV1ToV2, | ||
| convertUpdateFormatV2ToV1: convertUpdateFormatV2ToV1, | ||
| createAbsolutePositionFromRelativePosition: createAbsolutePositionFromRelativePosition, | ||
| createAttributionItem: createAttributionItem, | ||
| createAttributionManagerFromDiff: createAttributionManagerFromDiff, | ||
| createDeleteSetFromStructStore: createDeleteSetFromStructStore, | ||
| createDocFromSnapshot: createDocFromSnapshot, | ||
| createID: createID, | ||
| createIdMap: createIdMap, | ||
| createIdMapFromIdSet: createIdMapFromIdSet, | ||
| createIdSet: createIdSet, | ||
| createInsertionSetFromStructStore: createInsertSetFromStructStore, | ||
| createRelativePositionFromJSON: createRelativePositionFromJSON, | ||
| createRelativePositionFromTypeIndex: createRelativePositionFromTypeIndex, | ||
| createSnapshot: createSnapshot, | ||
| decodeIdMap: decodeIdMap, | ||
| decodeRelativePosition: decodeRelativePosition, | ||
| decodeSnapshot: decodeSnapshot, | ||
| decodeSnapshotV2: decodeSnapshotV2, | ||
| decodeStateVector: decodeStateVector, | ||
| decodeUpdate: decodeUpdate, | ||
| decodeUpdateV2: decodeUpdateV2, | ||
| diffDocsToDelta: diffDocsToDelta, | ||
| diffIdMap: diffIdMap, | ||
| diffIdSet: diffIdSet, | ||
| diffUpdate: diffUpdate, | ||
| diffUpdateV2: diffUpdateV2, | ||
| emptySnapshot: emptySnapshot, | ||
| encodeIdMap: encodeIdMap, | ||
| encodeRelativePosition: encodeRelativePosition, | ||
| encodeSnapshot: encodeSnapshot, | ||
| encodeSnapshotV2: encodeSnapshotV2, | ||
| encodeStateAsUpdate: encodeStateAsUpdate, | ||
| encodeStateAsUpdateV2: encodeStateAsUpdateV2, | ||
| encodeStateVector: encodeStateVector, | ||
| encodeStateVectorFromUpdate: encodeStateVectorFromUpdate, | ||
| encodeStateVectorFromUpdateV2: encodeStateVectorFromUpdateV2, | ||
| equalIdSets: equalIdSets, | ||
| equalSnapshots: equalSnapshots, | ||
| findIndexSS: findIndexSS, | ||
| findRootTypeKey: findRootTypeKey, | ||
| getItem: getItem, | ||
| getItemCleanEnd: getItemCleanEnd, | ||
| getItemCleanStart: getItemCleanStart, | ||
| getState: getState, | ||
| getTypeChildren: getTypeChildren, | ||
| insertIntoIdMap: insertIntoIdMap, | ||
| insertIntoIdSet: insertIntoIdSet, | ||
| isParentOf: isParentOf, | ||
| iterateStructsByIdSet: iterateStructsByIdSet, | ||
| logType: logType, | ||
| logUpdate: logUpdate, | ||
| logUpdateV2: logUpdateV2, | ||
| mergeIdMaps: mergeIdMaps, | ||
| mergeIdSets: mergeIdSets, | ||
| mergeUpdates: mergeUpdates, | ||
| mergeUpdatesV2: mergeUpdatesV2, | ||
| noAttributionsManager: noAttributionsManager, | ||
| obfuscateUpdate: obfuscateUpdate, | ||
| obfuscateUpdateV2: obfuscateUpdateV2, | ||
| readIdMap: readIdMap, | ||
| readIdSet: readIdSet, | ||
| readUpdate: readUpdate, | ||
| readUpdateIdRanges: readUpdateIdRanges, | ||
| readUpdateIdRangesV2: readUpdateIdRangesV2, | ||
| readUpdateV2: readUpdateV2, | ||
| relativePositionToJSON: relativePositionToJSON, | ||
| snapshot: snapshot, | ||
| snapshotContainsUpdate: snapshotContainsUpdate, | ||
| transact: transact, | ||
| tryGc: tryGc, | ||
| typeListToArraySnapshot: typeListToArraySnapshot, | ||
| typeMapGetAllSnapshot: typeMapGetAllSnapshot, | ||
| typeMapGetSnapshot: typeMapGetSnapshot | ||
| }); | ||
| export { Y }; | ||
| //# sourceMappingURL=index-Czf9BAS1.js.map |
| {"version":3,"file":"index-Czf9BAS1.js","sources":["../src/index.js"],"sourcesContent":["/** eslint-env browser */\n\nexport {\n Doc,\n Transaction,\n YArray as Array,\n YMap as Map,\n YText as Text,\n YXmlText as XmlText,\n YXmlHook as XmlHook,\n YXmlElement as XmlElement,\n YXmlFragment as XmlFragment,\n YEvent,\n Item,\n AbstractStruct,\n GC,\n Skip,\n ContentBinary,\n ContentDeleted,\n ContentDoc,\n ContentEmbed,\n ContentFormat,\n ContentJSON,\n ContentAny,\n ContentString,\n ContentType,\n AbstractType,\n getTypeChildren,\n createRelativePositionFromTypeIndex,\n createRelativePositionFromJSON,\n createAbsolutePositionFromRelativePosition,\n compareRelativePositions,\n AbsolutePosition,\n RelativePosition,\n ID,\n createID,\n compareIDs,\n getState,\n Snapshot,\n createSnapshot,\n cleanupYTextFormatting,\n snapshot,\n emptySnapshot,\n findRootTypeKey,\n findIndexSS,\n getItem,\n getItemCleanStart,\n getItemCleanEnd,\n typeListToArraySnapshot,\n typeMapGetSnapshot,\n typeMapGetAllSnapshot,\n createDocFromSnapshot,\n applyUpdate,\n applyUpdateV2,\n readUpdate,\n readUpdateV2,\n encodeStateAsUpdate,\n encodeStateAsUpdateV2,\n encodeStateVector,\n UndoManager,\n decodeSnapshot,\n encodeSnapshot,\n decodeSnapshotV2,\n encodeSnapshotV2,\n decodeStateVector,\n logUpdate,\n logUpdateV2,\n decodeUpdate,\n decodeUpdateV2,\n relativePositionToJSON,\n isParentOf,\n equalSnapshots,\n tryGc,\n transact,\n AbstractConnector,\n logType,\n mergeUpdates,\n mergeUpdatesV2,\n encodeStateVectorFromUpdate,\n encodeStateVectorFromUpdateV2,\n encodeRelativePosition,\n decodeRelativePosition,\n diffUpdate,\n diffUpdateV2,\n convertUpdateFormatV1ToV2,\n convertUpdateFormatV2ToV1,\n obfuscateUpdate,\n obfuscateUpdateV2,\n UpdateEncoderV1,\n UpdateEncoderV2,\n UpdateDecoderV1,\n UpdateDecoderV2,\n snapshotContainsUpdate,\n // idset\n IdSet,\n equalIdSets,\n createDeleteSetFromStructStore,\n IdMap,\n createIdMap,\n createAttributionItem,\n createInsertSetFromStructStore as createInsertionSetFromStructStore,\n diffIdMap,\n diffIdSet,\n AttributionItem as Attribution,\n encodeIdMap,\n createIdMapFromIdSet,\n TwosetAttributionManager,\n noAttributionsManager,\n AbstractAttributionManager,\n iterateStructsByIdSet,\n createAttributionManagerFromDiff,\n DiffAttributionManager,\n createIdSet,\n mergeIdSets,\n cloneDoc,\n readUpdateIdRanges,\n readUpdateIdRangesV2,\n insertIntoIdMap,\n insertIntoIdSet,\n mergeIdMaps,\n readIdMap,\n readIdSet,\n decodeIdMap,\n diffDocsToDelta\n} from './internals.js'\n\nconst glo = /** @type {any} */ (typeof globalThis !== 'undefined'\n ? globalThis\n : typeof window !== 'undefined'\n ? window\n // @ts-ignore\n : typeof global !== 'undefined' ? global : {})\n\nconst importIdentifier = '__ $YJS$ __'\n\nif (glo[importIdentifier] === true) {\n /**\n * Dear reader of this message. Please take this seriously.\n *\n * If you see this message, make sure that you only import one version of Yjs. In many cases,\n * your package manager installs two versions of Yjs that are used by different packages within your project.\n * Another reason for this message is that some parts of your project use the commonjs version of Yjs\n * and others use the EcmaScript version of Yjs.\n *\n * This often leads to issues that are hard to debug. We often need to perform constructor checks,\n * e.g. `struct instanceof GC`. If you imported different versions of Yjs, it is impossible for us to\n * do the constructor checks anymore - which might break the CRDT algorithm.\n *\n * https://github.com/yjs/yjs/issues/438\n */\n console.error('Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438')\n}\nglo[importIdentifier] = true\n"],"names":[],"mappings":";;;;;;AAAA;;;AA8HA,MAAM,GAAG,uBAAuB,OAAO,UAAU,KAAK;AACtD,IAAI;AACJ,IAAI,OAAO,MAAM,KAAK;AACtB,MAAM;AACN;AACA,MAAM,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,EAAE;;AAEjD,MAAM,gBAAgB,GAAG;;AAEzB,IAAI,GAAG,CAAC,gBAAgB,CAAC,KAAK,IAAI,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,KAAK,CAAC,2HAA2H;AAC3I;AACA,GAAG,CAAC,gBAAgB,CAAC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| export function diffDocsToDelta(v1: Doc, v2: Doc, { am }?: { | ||
| am?: import("./AttributionManager.js").DiffAttributionManager | undefined; | ||
| }): delta.DeltaBuilderAny; | ||
| import { Doc } from '../internals.js'; | ||
| import * as delta from 'lib0/delta'; | ||
| //# sourceMappingURL=delta-helpers.d.ts.map |
| {"version":3,"file":"delta-helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/delta-helpers.js"],"names":[],"mappings":"AAmBO,oCAJI,GAAG,MACH,GAAG;;IACF,KAAK,CAAC,eAAe,CAoChC;oBA5CM,iBAAiB;uBACD,YAAY"} |
| import { | ||
| createInsertSetFromStructStore, | ||
| createDeleteSetFromStructStore, | ||
| createAttributionManagerFromDiff, | ||
| diffIdSet, | ||
| mergeIdSets, | ||
| Item, | ||
| AbstractType, Doc, // eslint-disable-line | ||
| iterateStructsByIdSet | ||
| } from '../internals.js' | ||
| import * as delta from 'lib0/delta' | ||
| import * as map from 'lib0/map' | ||
| import * as set from 'lib0/set' | ||
| /** | ||
| * @param {Doc} v1 | ||
| * @param {Doc} v2 | ||
| * @return {delta.DeltaBuilderAny} | ||
| */ | ||
| export const diffDocsToDelta = (v1, v2, { am = createAttributionManagerFromDiff(v1, v2) } = {}) => { | ||
| const d = delta.create() | ||
| v2.transact(tr => { | ||
| v2.share.forEach((type, typename) => { | ||
| const insertDiff = diffIdSet(createInsertSetFromStructStore(v2.store, false), createInsertSetFromStructStore(v1.store, false)) | ||
| const deleteDiff = diffIdSet(createDeleteSetFromStructStore(v2.store), createDeleteSetFromStructStore(v1.store)) | ||
| // don't render items that have been inserted and then deleted | ||
| const insertsOnly = diffIdSet(insertDiff, deleteDiff) | ||
| const deletesOnly = diffIdSet(deleteDiff, insertDiff) | ||
| const itemsToRender = mergeIdSets([insertsOnly, deleteDiff]) | ||
| /** | ||
| * @type {Map<AbstractType, Set<string|null>>} | ||
| */ | ||
| const changedTypes = new Map() | ||
| iterateStructsByIdSet(tr, itemsToRender, /** @param {any} item */ item => { | ||
| while (item instanceof Item) { | ||
| const parent = /** @type {AbstractType} */ (item.parent) | ||
| const conf = map.setIfUndefined(changedTypes, parent, set.create) | ||
| if (conf.has(item.parentSub)) break // has already been marked as modified | ||
| conf.add(item.parentSub) | ||
| item = parent._item | ||
| } | ||
| }) | ||
| const typeConf = changedTypes.get(type) | ||
| if (typeConf) { | ||
| // @ts-ignore | ||
| const shareDelta = type.getContent(am, { | ||
| itemsToRender, retainDeletes: true, renderAttrs: /** @type {Set<string>} */ (changedTypes.get(type)), renderChildren: typeConf.has(null), deletedItems: deletesOnly, modified: changedTypes, deep: true | ||
| }) | ||
| d.update(typename, shareDelta) | ||
| } | ||
| }) | ||
| }) | ||
| return d | ||
| } |
| 'use strict'; | ||
| var Skip = require('./Skip-vvIEGjAV.js'); | ||
| var Skip = require('./Skip-CpmLMm7q.js'); | ||
| require('lib0/observable'); | ||
@@ -151,2 +151,3 @@ require('lib0/array'); | ||
| exports.deleteText = Skip.deleteText; | ||
| exports.diffDocsToDelta = Skip.diffDocsToDelta; | ||
| exports.diffIdMap = Skip.diffIdMap; | ||
@@ -153,0 +154,0 @@ exports.diffIdSet = Skip.diffIdSet; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"internals.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} | ||
| {"version":3,"file":"internals.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
@@ -1,2 +0,2 @@ | ||
| export { ah as AbsolutePosition, bF as AbstractAttributionManager, A as AbstractConnector, d6 as AbstractContent, cx as AbstractStruct, bT as AbstractType, bO as ArraySearchMarker, bo as AttrRange, bq as AttrRanges, bE as AttributedContent, bl as AttributionItem, cM as ContentAny, cA as ContentBinary, cC as ContentDeleted, cE as ContentDoc, cG as ContentEmbed, cI as ContentFormat, cK as ContentJSON, cO as ContentString, cY as ContentType, z as DSDecoderV1, B as DSDecoderV2, bJ as DiffAttributionManager, D as Doc, a0 as EventHandler, cz as GC, a6 as ID, bt as IdMap, I as IdRange, a as IdRanges, b as IdSet, E as IdSetEncoderV1, G as IdSetEncoderV2, d3 as Item, ci as ItemTextListPosition, a_ as LazyStructReader, b3 as LazyStructWriter, M as MaybeIdRange, bH as NoAttributionsManager, ae as RelativePosition, d8 as Skip, ar as Snapshot, bL as SnapshotAttributionManager, aY as StackItem, bk as StructSet, aF as StructStore, aS as Transaction, bG as TwosetAttributionManager, aZ as UndoManager, U as UpdateDecoderV1, C as UpdateDecoderV2, F as UpdateEncoderV1, H as UpdateEncoderV2, ce as YArray, cR as YArrayRefID, bh as YEvent, cg as YMap, cS as YMapRefID, cn as YText, cT as YTextRefID, cr as YXmlElement, cU as YXmlElementRefID, cp as YXmlFragment, cV as YXmlFragmentRefID, ct as YXmlHook, cW as YXmlHookRefID, cv as YXmlText, cX as YXmlTextRefID, r as _createInsertSliceFromStructs, _ as _deleteRangeFromIdSet, h as _diffSet, e as _insertIntoIdSet, k as _intersectSets, aV as addChangedTypeToTransaction, a2 as addEventHandlerListener, aJ as addStruct, o as addStructToIdSet, n as addToIdSet, Q as applyUpdate, P as applyUpdateV2, bC as attributionJsonSchema, a5 as callEventHandlerListeners, bS as callTypeObservers, cl as cleanupYTextAfterTransaction, ck as cleanupYTextFormatting, y as cloneDoc, a7 as compareIDs, aq as compareRelativePositions, d5 as contentRefs, bc as convertUpdateFormat, bf as convertUpdateFormatV1ToV2, bg as convertUpdateFormatV2ToV1, ai as createAbsolutePosition, ap as createAbsolutePositionFromRelativePosition, bD as createAttributionFromAttributionItems, bm as createAttributionItem, bK as createAttributionManagerFromDiff, bM as createAttributionManagerFromSnapshots, q as createDeleteSetFromStructStore, aC as createDocFromSnapshot, a1 as createEventHandler, a8 as createID, by as createIdMap, bs as createIdMapFromIdSet, p as createIdSet, s as createInsertSetFromStructStore, cd as createMapIterator, bp as createMaybeAttrRange, c as createMaybeIdRange, aj as createRelativePosition, ag as createRelativePositionFromJSON, ak as createRelativePositionFromTypeIndex, ax as createSnapshot, bx as decodeIdMap, ao as decodeRelativePosition, aw as decodeSnapshot, av as decodeSnapshotV2, W as decodeStateVector, b1 as decodeUpdate, b2 as decodeUpdateV2, cm as deleteText, bA as diffIdMap, j as diffIdSet, bb as diffUpdate, ba as diffUpdateV2, ay as emptySnapshot, bv as encodeIdMap, am as encodeRelativePosition, au as encodeSnapshot, at as encodeSnapshotV2, T as encodeStateAsUpdate, S as encodeStateAsUpdateV2, $ as encodeStateVector, b6 as encodeStateVectorFromUpdate, b5 as encodeStateVectorFromUpdateV2, Z as encodeStateVectorV2, bU as equalAttrs, v as equalIdSets, as as equalSnapshots, aL as find, aN as findIndexCleanStart, f as findIndexInIdRanges, aK as findIndexSS, bP as findMarker, d as findRangeStartInIdRanges, ab as findRootTypeKey, c_ as followRedone, x as generateNewClientId, aM as getItem, aP as getItemCleanEnd, aO as getItemCleanStart, aH as getState, aG as getStateVector, bR as getTypeChildren, bn as idmapAttrsEqual, bz as insertIntoIdMap, g as insertIntoIdSet, cj as insertText, aI as integrityCheck, bB as intersectMaps, l as intersectSets, ac as isParentOf, aA as isVisible, aR as iterateStructs, i as iterateStructsByIdSet, c$ as keepItem, ad as logType, a$ as logUpdate, b0 as logUpdateV2, br as mergeIdMaps, m as mergeIdSets, b4 as mergeUpdates, b9 as mergeUpdatesV2, aU as nextID, bI as noAttributionsManager, bd as obfuscateUpdate, be as obfuscateUpdateV2, u as readAndApplyDeleteSet, cN as readContentAny, cB as readContentBinary, cD as readContentDeleted, cF as readContentDoc, cH as readContentEmbed, cJ as readContentFormat, cL as readContentJSON, cP as readContentString, cZ as readContentType, aa as readID, bw as readIdMap, t as readIdSet, d4 as readItemContent, an as readRelativePosition, V as readStateVector, bi as readStructSet, O as readUpdate, b8 as readUpdateIdRanges, b7 as readUpdateIdRangesV2, N as readUpdateV2, cf as readYArray, ch as readYMap, co as readYText, cs as readYXmlElement, cq as readYXmlFragment, cu as readYXmlHook, cw as readYXmlText, d2 as redoItem, af as relativePositionToJSON, a4 as removeAllEventHandlerListeners, a3 as removeEventHandlerListener, bj as removeRangesFromStructSet, aQ as replaceStruct, az as snapshot, aE as snapshotContainsUpdate, aD as snapshotContainsUpdateV2, d0 as splitItem, aB as splitSnapshotAffectedStructs, d1 as splitStruct, cy as structGCRefNumber, d7 as structSkipRefNumber, aX as transact, aW as tryGc, b_ as typeListCreateIterator, c4 as typeListDelete, bY as typeListForEach, b$ as typeListForEachSnapshot, c0 as typeListGet, c2 as typeListInsertGenerics, c1 as typeListInsertGenericsAfter, bZ as typeListMap, c3 as typeListPushGenerics, bV as typeListSlice, bW as typeListToArray, bX as typeListToArraySnapshot, c5 as typeMapDelete, c7 as typeMapGet, c8 as typeMapGetAll, cc as typeMapGetAllSnapshot, c9 as typeMapGetDelta, cb as typeMapGetSnapshot, ca as typeMapHas, c6 as typeMapSet, cQ as typeRefs, bQ as updateMarkerChanges, bN as warnPrematureAccess, J as writeClientsStructs, Y as writeDocumentStateVector, a9 as writeID, bu as writeIdMap, w as writeIdSet, al as writeRelativePosition, R as writeStateAsUpdate, X as writeStateVector, K as writeStructsFromIdSet, L as writeStructsFromTransaction, aT as writeUpdateMessageFromTransaction } from './Skip-CPEp7KWv.js'; | ||
| export { ah as AbsolutePosition, bF as AbstractAttributionManager, A as AbstractConnector, d7 as AbstractContent, cy as AbstractStruct, bU as AbstractType, bP as ArraySearchMarker, bo as AttrRange, bq as AttrRanges, bE as AttributedContent, bl as AttributionItem, cN as ContentAny, cB as ContentBinary, cD as ContentDeleted, cF as ContentDoc, cH as ContentEmbed, cJ as ContentFormat, cL as ContentJSON, cP as ContentString, cZ as ContentType, z as DSDecoderV1, B as DSDecoderV2, bJ as DiffAttributionManager, D as Doc, a0 as EventHandler, cA as GC, a6 as ID, bt as IdMap, I as IdRange, a as IdRanges, b as IdSet, E as IdSetEncoderV1, G as IdSetEncoderV2, d4 as Item, cj as ItemTextListPosition, a_ as LazyStructReader, b3 as LazyStructWriter, M as MaybeIdRange, bH as NoAttributionsManager, ae as RelativePosition, d9 as Skip, ar as Snapshot, bL as SnapshotAttributionManager, aY as StackItem, bk as StructSet, aF as StructStore, aS as Transaction, bG as TwosetAttributionManager, aZ as UndoManager, U as UpdateDecoderV1, C as UpdateDecoderV2, F as UpdateEncoderV1, H as UpdateEncoderV2, cf as YArray, cS as YArrayRefID, bh as YEvent, ch as YMap, cT as YMapRefID, co as YText, cU as YTextRefID, cs as YXmlElement, cV as YXmlElementRefID, cq as YXmlFragment, cW as YXmlFragmentRefID, cu as YXmlHook, cX as YXmlHookRefID, cw as YXmlText, cY as YXmlTextRefID, r as _createInsertSliceFromStructs, _ as _deleteRangeFromIdSet, h as _diffSet, e as _insertIntoIdSet, k as _intersectSets, aV as addChangedTypeToTransaction, a2 as addEventHandlerListener, aJ as addStruct, o as addStructToIdSet, n as addToIdSet, Q as applyUpdate, P as applyUpdateV2, bC as attributionJsonSchema, a5 as callEventHandlerListeners, bT as callTypeObservers, cm as cleanupYTextAfterTransaction, cl as cleanupYTextFormatting, y as cloneDoc, a7 as compareIDs, aq as compareRelativePositions, d6 as contentRefs, bc as convertUpdateFormat, bf as convertUpdateFormatV1ToV2, bg as convertUpdateFormatV2ToV1, ai as createAbsolutePosition, ap as createAbsolutePositionFromRelativePosition, bD as createAttributionFromAttributionItems, bm as createAttributionItem, bK as createAttributionManagerFromDiff, bM as createAttributionManagerFromSnapshots, q as createDeleteSetFromStructStore, aC as createDocFromSnapshot, a1 as createEventHandler, a8 as createID, by as createIdMap, bs as createIdMapFromIdSet, p as createIdSet, s as createInsertSetFromStructStore, ce as createMapIterator, bp as createMaybeAttrRange, c as createMaybeIdRange, aj as createRelativePosition, ag as createRelativePositionFromJSON, ak as createRelativePositionFromTypeIndex, ax as createSnapshot, bx as decodeIdMap, ao as decodeRelativePosition, aw as decodeSnapshot, av as decodeSnapshotV2, W as decodeStateVector, b1 as decodeUpdate, b2 as decodeUpdateV2, cn as deleteText, bN as diffDocsToDelta, bA as diffIdMap, j as diffIdSet, bb as diffUpdate, ba as diffUpdateV2, ay as emptySnapshot, bv as encodeIdMap, am as encodeRelativePosition, au as encodeSnapshot, at as encodeSnapshotV2, T as encodeStateAsUpdate, S as encodeStateAsUpdateV2, $ as encodeStateVector, b6 as encodeStateVectorFromUpdate, b5 as encodeStateVectorFromUpdateV2, Z as encodeStateVectorV2, bV as equalAttrs, v as equalIdSets, as as equalSnapshots, aL as find, aN as findIndexCleanStart, f as findIndexInIdRanges, aK as findIndexSS, bQ as findMarker, d as findRangeStartInIdRanges, ab as findRootTypeKey, c$ as followRedone, x as generateNewClientId, aM as getItem, aP as getItemCleanEnd, aO as getItemCleanStart, aH as getState, aG as getStateVector, bS as getTypeChildren, bn as idmapAttrsEqual, bz as insertIntoIdMap, g as insertIntoIdSet, ck as insertText, aI as integrityCheck, bB as intersectMaps, l as intersectSets, ac as isParentOf, aA as isVisible, aR as iterateStructs, i as iterateStructsByIdSet, d0 as keepItem, ad as logType, a$ as logUpdate, b0 as logUpdateV2, br as mergeIdMaps, m as mergeIdSets, b4 as mergeUpdates, b9 as mergeUpdatesV2, aU as nextID, bI as noAttributionsManager, bd as obfuscateUpdate, be as obfuscateUpdateV2, u as readAndApplyDeleteSet, cO as readContentAny, cC as readContentBinary, cE as readContentDeleted, cG as readContentDoc, cI as readContentEmbed, cK as readContentFormat, cM as readContentJSON, cQ as readContentString, c_ as readContentType, aa as readID, bw as readIdMap, t as readIdSet, d5 as readItemContent, an as readRelativePosition, V as readStateVector, bi as readStructSet, O as readUpdate, b8 as readUpdateIdRanges, b7 as readUpdateIdRangesV2, N as readUpdateV2, cg as readYArray, ci as readYMap, cp as readYText, ct as readYXmlElement, cr as readYXmlFragment, cv as readYXmlHook, cx as readYXmlText, d3 as redoItem, af as relativePositionToJSON, a4 as removeAllEventHandlerListeners, a3 as removeEventHandlerListener, bj as removeRangesFromStructSet, aQ as replaceStruct, az as snapshot, aE as snapshotContainsUpdate, aD as snapshotContainsUpdateV2, d1 as splitItem, aB as splitSnapshotAffectedStructs, d2 as splitStruct, cz as structGCRefNumber, d8 as structSkipRefNumber, aX as transact, aW as tryGc, b$ as typeListCreateIterator, c5 as typeListDelete, bZ as typeListForEach, c0 as typeListForEachSnapshot, c1 as typeListGet, c3 as typeListInsertGenerics, c2 as typeListInsertGenericsAfter, b_ as typeListMap, c4 as typeListPushGenerics, bW as typeListSlice, bX as typeListToArray, bY as typeListToArraySnapshot, c6 as typeMapDelete, c8 as typeMapGet, c9 as typeMapGetAll, cd as typeMapGetAllSnapshot, ca as typeMapGetDelta, cc as typeMapGetSnapshot, cb as typeMapHas, c7 as typeMapSet, cR as typeRefs, bR as updateMarkerChanges, bO as warnPrematureAccess, J as writeClientsStructs, Y as writeDocumentStateVector, a9 as writeID, bu as writeIdMap, w as writeIdSet, al as writeRelativePosition, R as writeStateAsUpdate, X as writeStateVector, K as writeStructsFromIdSet, L as writeStructsFromTransaction, aT as writeUpdateMessageFromTransaction } from './Skip-CtOOBRkz.js'; | ||
| import 'lib0/observable'; | ||
@@ -3,0 +3,0 @@ import 'lib0/array'; |
@@ -1,2 +0,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, 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, cleanupYTextFormatting, snapshot, emptySnapshot, findRootTypeKey, findIndexSS, getItem, getItemCleanStart, getItemCleanEnd, typeListToArraySnapshot, typeMapGetSnapshot, typeMapGetAllSnapshot, createDocFromSnapshot, applyUpdate, applyUpdateV2, readUpdate, readUpdateV2, encodeStateAsUpdate, encodeStateAsUpdateV2, encodeStateVector, UndoManager, decodeSnapshot, encodeSnapshot, decodeSnapshotV2, encodeSnapshotV2, decodeStateVector, logUpdate, logUpdateV2, decodeUpdate, decodeUpdateV2, relativePositionToJSON, isParentOf, equalSnapshots, tryGc, transact, AbstractConnector, logType, mergeUpdates, mergeUpdatesV2, encodeStateVectorFromUpdate, encodeStateVectorFromUpdateV2, encodeRelativePosition, decodeRelativePosition, diffUpdate, diffUpdateV2, convertUpdateFormatV1ToV2, convertUpdateFormatV2ToV1, obfuscateUpdate, obfuscateUpdateV2, UpdateEncoderV1, UpdateEncoderV2, UpdateDecoderV1, UpdateDecoderV2, snapshotContainsUpdate, IdSet, equalIdSets, createDeleteSetFromStructStore, IdMap, createIdMap, createAttributionItem, createInsertSetFromStructStore as createInsertionSetFromStructStore, diffIdMap, diffIdSet, AttributionItem as Attribution, encodeIdMap, createIdMapFromIdSet, TwosetAttributionManager, noAttributionsManager, AbstractAttributionManager, iterateStructsByIdSet, createAttributionManagerFromDiff, DiffAttributionManager, createIdSet, mergeIdSets, cloneDoc, readUpdateIdRanges, readUpdateIdRangesV2, insertIntoIdMap, insertIntoIdSet, mergeIdMaps, readIdMap, readIdSet, decodeIdMap } from "./internals.js"; | ||
| export { Doc, Transaction, YArray as Array, YMap as Map, YText as Text, YXmlText as XmlText, YXmlHook as XmlHook, YXmlElement as XmlElement, YXmlFragment as XmlFragment, 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, cleanupYTextFormatting, snapshot, emptySnapshot, findRootTypeKey, findIndexSS, getItem, getItemCleanStart, getItemCleanEnd, typeListToArraySnapshot, typeMapGetSnapshot, typeMapGetAllSnapshot, createDocFromSnapshot, applyUpdate, applyUpdateV2, readUpdate, readUpdateV2, encodeStateAsUpdate, encodeStateAsUpdateV2, encodeStateVector, UndoManager, decodeSnapshot, encodeSnapshot, decodeSnapshotV2, encodeSnapshotV2, decodeStateVector, logUpdate, logUpdateV2, decodeUpdate, decodeUpdateV2, relativePositionToJSON, isParentOf, equalSnapshots, tryGc, transact, AbstractConnector, logType, mergeUpdates, mergeUpdatesV2, encodeStateVectorFromUpdate, encodeStateVectorFromUpdateV2, encodeRelativePosition, decodeRelativePosition, diffUpdate, diffUpdateV2, convertUpdateFormatV1ToV2, convertUpdateFormatV2ToV1, obfuscateUpdate, obfuscateUpdateV2, UpdateEncoderV1, UpdateEncoderV2, UpdateDecoderV1, UpdateDecoderV2, snapshotContainsUpdate, IdSet, equalIdSets, createDeleteSetFromStructStore, IdMap, createIdMap, createAttributionItem, createInsertSetFromStructStore as createInsertionSetFromStructStore, diffIdMap, diffIdSet, AttributionItem as Attribution, encodeIdMap, createIdMapFromIdSet, TwosetAttributionManager, noAttributionsManager, AbstractAttributionManager, iterateStructsByIdSet, createAttributionManagerFromDiff, DiffAttributionManager, createIdSet, mergeIdSets, cloneDoc, readUpdateIdRanges, readUpdateIdRangesV2, insertIntoIdMap, insertIntoIdSet, mergeIdMaps, readIdMap, readIdSet, decodeIdMap, diffDocsToDelta } from "./internals.js"; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -21,2 +21,3 @@ export * from "./utils/AbstractConnector.js"; | ||
| export * from "./utils/AttributionManager.js"; | ||
| export * from "./utils/delta-helpers.js"; | ||
| export * from "./types/AbstractType.js"; | ||
@@ -23,0 +24,0 @@ export * from "./types/YArray.js"; |
@@ -10,7 +10,7 @@ 'use strict'; | ||
| var map = require('lib0/map'); | ||
| var yjs = require('./index-BQN5CtgT.js'); | ||
| var yjs = require('./index-B8_EfGwa.js'); | ||
| var math = require('lib0/math'); | ||
| var list = require('lib0/list'); | ||
| var delta = require('lib0/delta'); | ||
| var Skip = require('./Skip-vvIEGjAV.js'); | ||
| var Skip = require('./Skip-CpmLMm7q.js'); | ||
| require('lib0/function'); | ||
@@ -714,2 +714,3 @@ require('lib0/binary'); | ||
| exports.decodeUpdateV2 = Skip.decodeUpdateV2; | ||
| exports.diffDocsToDelta = Skip.diffDocsToDelta; | ||
| exports.diffIdMap = Skip.diffIdMap; | ||
@@ -716,0 +717,0 @@ exports.diffIdSet = Skip.diffIdSet; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"testHelper.cjs","sources":["../tests/testHelper.js"],"sourcesContent":["import * as t from 'lib0/testing'\nimport * as prng from 'lib0/prng'\nimport * as encoding from 'lib0/encoding'\nimport * as decoding from 'lib0/decoding'\nimport * as syncProtocol from '@y/protocols/sync'\nimport * as object from 'lib0/object'\nimport * as map from 'lib0/map'\nimport * as Y from '../src/index.js'\nimport * as math from 'lib0/math'\nimport * as list from 'lib0/list'\nimport * as delta from 'lib0/delta'\nimport {\n createIdSet, createIdMap, addToIdSet, encodeIdMap\n} from '../src/internals.js'\n\nexport * from '../src/index.js'\n\nif (typeof window !== 'undefined') {\n // @ts-ignore\n window.Y = Y // eslint-disable-line\n}\n\n/**\n * @param {TestYInstance} y // publish message created by `y` to all other online clients\n * @param {Uint8Array} m\n */\nconst broadcastMessage = (y, m) => {\n if (y.tc.onlineConns.has(y)) {\n y.tc.onlineConns.forEach(remoteYInstance => {\n if (remoteYInstance !== y) {\n remoteYInstance._receive(m, y)\n }\n })\n }\n}\n\nexport let useV2 = false\n\nexport const encV1 = {\n encodeStateAsUpdate: Y.encodeStateAsUpdate,\n mergeUpdates: Y.mergeUpdates,\n applyUpdate: Y.applyUpdate,\n logUpdate: Y.logUpdate,\n updateEventName: /** @type {'update'} */ ('update'),\n diffUpdate: Y.diffUpdate\n}\n\nexport const encV2 = {\n encodeStateAsUpdate: Y.encodeStateAsUpdateV2,\n mergeUpdates: Y.mergeUpdatesV2,\n applyUpdate: Y.applyUpdateV2,\n logUpdate: Y.logUpdateV2,\n updateEventName: /** @type {'updateV2'} */ ('updateV2'),\n diffUpdate: Y.diffUpdateV2\n}\n\nexport let enc = encV1\n\nconst useV1Encoding = () => {\n useV2 = false\n enc = encV1\n}\n\nconst useV2Encoding = () => {\n console.error('sync protocol doesnt support v2 protocol yet, fallback to v1 encoding') // @Todo\n useV2 = false\n enc = encV1\n}\n\nexport class TestYInstance extends Y.Doc {\n /**\n * @param {TestConnector} testConnector\n * @param {number} clientID\n */\n constructor (testConnector, clientID) {\n super()\n this.userID = clientID // overwriting clientID\n /**\n * @type {TestConnector}\n */\n this.tc = testConnector\n /**\n * @type {Map<TestYInstance, Array<Uint8Array>>}\n */\n this.receiving = new Map()\n testConnector.allConns.add(this)\n /**\n * The list of received updates.\n * We are going to merge them later using Y.mergeUpdates and check if the resulting document is correct.\n * @type {Array<Uint8Array<ArrayBuffer>>}\n */\n this.updates = []\n // set up observe on local model\n this.on(enc.updateEventName, (update, origin) => {\n if (origin !== testConnector) {\n const encoder = encoding.createEncoder()\n syncProtocol.writeUpdate(encoder, update)\n broadcastMessage(this, encoding.toUint8Array(encoder))\n }\n this.updates.push(update)\n })\n this.connect()\n }\n\n /**\n * Disconnect from TestConnector.\n */\n disconnect () {\n this.receiving = new Map()\n this.tc.onlineConns.delete(this)\n }\n\n /**\n * Append yourself to the list of known Y instances in testconnector.\n * Also initiate sync with all clients.\n */\n connect () {\n if (!this.tc.onlineConns.has(this)) {\n this.tc.onlineConns.add(this)\n const encoder = encoding.createEncoder()\n syncProtocol.writeSyncStep1(encoder, this)\n // publish SyncStep1\n broadcastMessage(this, encoding.toUint8Array(encoder))\n this.tc.onlineConns.forEach(remoteYInstance => {\n if (remoteYInstance !== this) {\n // remote instance sends instance to this instance\n const encoder = encoding.createEncoder()\n syncProtocol.writeSyncStep1(encoder, remoteYInstance)\n this._receive(encoding.toUint8Array(encoder), remoteYInstance)\n }\n })\n }\n }\n\n /**\n * Receive a message from another client. This message is only appended to the list of receiving messages.\n * TestConnector decides when this client actually reads this message.\n *\n * @param {Uint8Array} message\n * @param {TestYInstance} remoteClient\n */\n _receive (message, remoteClient) {\n map.setIfUndefined(this.receiving, remoteClient, () => /** @type {Array<Uint8Array>} */ ([])).push(message)\n }\n}\n\n/**\n * Keeps track of TestYInstances.\n *\n * The TestYInstances add/remove themselves from the list of connections maiained in this object.\n * I think it makes sense. Deal with it.\n */\nexport class TestConnector {\n /**\n * @param {prng.PRNG} gen\n */\n constructor (gen) {\n /**\n * @type {Set<TestYInstance>}\n */\n this.allConns = new Set()\n /**\n * @type {Set<TestYInstance>}\n */\n this.onlineConns = new Set()\n /**\n * @type {prng.PRNG}\n */\n this.prng = gen\n }\n\n /**\n * Create a new Y instance and add it to the list of connections\n * @param {number} clientID\n */\n createY (clientID) {\n return new TestYInstance(this, clientID)\n }\n\n /**\n * Choose random connection and flush a random message from a random sender.\n *\n * If this function was unable to flush a message, because there are no more messages to flush, it returns false. true otherwise.\n * @return {boolean}\n */\n flushRandomMessage () {\n const gen = this.prng\n const conns = Array.from(this.onlineConns).filter(conn => conn.receiving.size > 0)\n if (conns.length > 0) {\n const receiver = prng.oneOf(gen, conns)\n const [sender, messages] = prng.oneOf(gen, Array.from(receiver.receiving))\n const m = messages.shift()\n if (messages.length === 0) {\n receiver.receiving.delete(sender)\n }\n if (m === undefined) {\n return this.flushRandomMessage()\n }\n const encoder = encoding.createEncoder()\n // console.log('receive (' + sender.userID + '->' + receiver.userID + '):\\n', syncProtocol.stringifySyncMessage(decoding.createDecoder(m), receiver))\n // do not publish data created when this function is executed (could be ss2 or update message)\n syncProtocol.readSyncMessage(decoding.createDecoder(m), encoder, receiver, receiver.tc)\n if (encoding.length(encoder) > 0) {\n // send reply message\n sender._receive(encoding.toUint8Array(encoder), receiver)\n }\n return true\n }\n return false\n }\n\n /**\n * @return {boolean} True iff this function actually flushed something\n */\n flushAllMessages () {\n let didSomething = false\n while (this.flushRandomMessage()) {\n didSomething = true\n }\n return didSomething\n }\n\n reconnectAll () {\n this.allConns.forEach(conn => conn.connect())\n }\n\n disconnectAll () {\n this.allConns.forEach(conn => conn.disconnect())\n }\n\n syncAll () {\n this.reconnectAll()\n this.flushAllMessages()\n }\n\n /**\n * @return {boolean} Whether it was possible to disconnect a random connection.\n */\n disconnectRandom () {\n if (this.onlineConns.size === 0) {\n return false\n }\n prng.oneOf(this.prng, Array.from(this.onlineConns)).disconnect()\n return true\n }\n\n /**\n * @return {boolean} Whether it was possible to reconnect a random connection.\n */\n reconnectRandom () {\n /**\n * @type {Array<TestYInstance>}\n */\n const reconnectable = []\n this.allConns.forEach(conn => {\n if (!this.onlineConns.has(conn)) {\n reconnectable.push(conn)\n }\n })\n if (reconnectable.length === 0) {\n return false\n }\n prng.oneOf(this.prng, reconnectable).connect()\n return true\n }\n}\n\n/**\n * @template T\n * @param {t.TestCase} tc\n * @param {{users?:number}} conf\n * @param {InitTestObjectCallback<T>} [initTestObject]\n * @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}}\n */\nexport const init = (tc, { users = 5 } = {}, initTestObject) => {\n /**\n * @type {Object<string,any>}\n */\n const result = {\n users: []\n }\n const gen = tc.prng\n // choose an encoding approach at random\n if (prng.bool(gen)) {\n useV2Encoding()\n } else {\n useV1Encoding()\n }\n\n const testConnector = new TestConnector(gen)\n result.testConnector = testConnector\n for (let i = 0; i < users; i++) {\n const y = testConnector.createY(i)\n y.clientID = i\n result.users.push(y)\n result['array' + i] = y.getArray('array')\n result['map' + i] = y.getMap('map')\n result['xml' + i] = y.get('xml', Y.XmlElement)\n result['text' + i] = y.getText('text')\n }\n testConnector.syncAll()\n result.testObjects = result.users.map(initTestObject || (() => null))\n useV1Encoding()\n return /** @type {any} */ (result)\n}\n\n/**\n * @param {Y.IdSet} idSet1\n * @param {Y.IdSet} idSet2\n */\nexport const compareIdSets = (idSet1, idSet2) => {\n t.assert(idSet1.clients.size === idSet2.clients.size)\n for (const [client, _items1] of idSet1.clients.entries()) {\n const items1 = _items1.getIds()\n const items2 = idSet2.clients.get(client)?.getIds()\n t.assert(items2 !== undefined && items1.length === items2.length)\n for (let i = 0; i < items1.length; i++) {\n const di1 = items1[i]\n const di2 = /** @type {Array<import('../src/utils/IdSet.js').IdRange>} */ (items2)[i]\n t.assert(di1.clock === di2.clock && di1.len === di2.len)\n }\n }\n return true\n}\n\n/**\n * only use for testing\n *\n * @template T\n * @param {Array<Y.Attribution<T>>} attrs\n * @param {Y.Attribution<T>} attr\n *\n */\nconst _idmapAttrsHas = (attrs, attr) => {\n const hash = attr.hash()\n return attrs.find(a => a.hash() === hash)\n}\n\n/**\n * only use for testing\n *\n * @template T\n * @param {Array<Y.Attribution<T>>} a\n * @param {Array<Y.Attribution<T>>} b\n */\nexport const _idmapAttrsEqual = (a, b) => a.length === b.length && a.every(v => _idmapAttrsHas(b, v))\n\n/**\n * Ensure that all attributes exist. Also create a copy and compare it to the original.\n *\n * @template T\n * @param {Y.IdMap<T>} idmap\n */\nexport const validateIdMap = idmap => {\n const copy = Y.createIdMap()\n idmap.clients.forEach((ranges, client) => {\n ranges.getIds().forEach(range => {\n range.attrs.forEach(attr => {\n t.assert(idmap.attrs.has(attr))\n t.assert(idmap.attrsH.get(attr.hash()) === attr)\n copy.add(client, range.clock, range.len, range.attrs.slice())\n })\n })\n t.assert(copy.clients.get(client)?.getIds().length === ranges.getIds().length)\n })\n t.assert(idmap.attrsH.size === idmap.attrs.size)\n}\n\n/**\n * @template T\n * @param {Y.IdMap<T>} idmap1\n * @param {Y.IdMap<T>} idmap2\n */\nexport const compareIdmaps = (idmap1, idmap2) => {\n t.assert(idmap1.clients.size === idmap2.clients.size)\n for (const [client, _items1] of idmap1.clients.entries()) {\n const items1 = _items1.getIds()\n const items2 = idmap2.clients.get(client)?.getIds()\n t.assert(items2 !== undefined && items1.length === items2.length)\n for (let i = 0; i < items1.length; i++) {\n const di1 = items1[i]\n const di2 = /** @type {Array<import('../src/utils/IdMap.js').AttrRange<T>>} */ (items2)[i]\n t.assert(di1.clock === di2.clock && di1.len === di2.len && _idmapAttrsEqual(di1.attrs, di2.attrs))\n }\n }\n validateIdMap(idmap1)\n validateIdMap(idmap2)\n}\n\n/**\n * @param {prng.PRNG} gen\n * @param {number} clients\n * @param {number} clockRange (max clock - exclusive - by each client)\n */\nexport const createRandomIdSet = (gen, clients, clockRange) => {\n const maxOpLen = 5\n const numOfOps = math.ceil((clients * clockRange) / maxOpLen)\n const idset = createIdSet()\n for (let i = 0; i < numOfOps; i++) {\n const client = prng.uint32(gen, 0, clients - 1)\n const clockStart = prng.uint32(gen, 0, clockRange)\n const len = prng.uint32(gen, 0, clockRange - clockStart)\n addToIdSet(idset, client, clockStart, len)\n }\n if (idset.clients.size === clients && clients > 1 && prng.bool(gen)) {\n idset.clients.delete(prng.uint32(gen, 0, clients))\n }\n return idset\n}\n\n/**\n * @template T\n * @param {prng.PRNG} gen\n * @param {number} clients\n * @param {number} clockRange (max clock - exclusive - by each client)\n * @param {Array<T>} attrChoices (max clock - exclusive - by each client)\n * @return {Y.IdMap<T>}\n */\nexport const createRandomIdMap = (gen, clients, clockRange, attrChoices) => {\n const maxOpLen = 5\n const numOfOps = math.ceil((clients * clockRange) / maxOpLen)\n const idMap = createIdMap()\n for (let i = 0; i < numOfOps; i++) {\n const client = prng.uint32(gen, 0, clients - 1)\n const clockStart = prng.uint32(gen, 0, clockRange)\n const len = prng.uint32(gen, 0, clockRange - clockStart)\n const attrs = [prng.oneOf(gen, attrChoices)]\n // maybe add another attr\n if (prng.bool(gen)) {\n const a = prng.oneOf(gen, attrChoices)\n if (attrs.find(attr => attr === a) == null) {\n attrs.push(a)\n }\n }\n idMap.add(client, clockStart, len, attrs.map(v => Y.createAttributionItem('', v)))\n }\n t.info(`Created IdMap with ${numOfOps} ranges and ${attrChoices.length} different attributes. Encoded size: ${encodeIdMap(idMap).byteLength}`)\n return idMap\n}\n\n/**\n * 1. reconnect and flush all\n * 2. user 0 gc\n * 3. get type content\n * 4. disconnect & reconnect all (so gc is propagated)\n * 5. compare os, ds, ss\n *\n * @param {Array<TestYInstance>} users\n */\nexport const compare = users => {\n users.forEach(u => u.connect())\n while (users[0].tc.flushAllMessages()) {} // eslint-disable-line\n // 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\"\n // This ensures that mergeUpdates works correctly\n const mergedDocs = users.map(user => {\n const ydoc = new Y.Doc()\n enc.applyUpdate(ydoc, enc.mergeUpdates(user.updates))\n return ydoc\n })\n users.push(.../** @type {any} */(mergedDocs))\n const userArrayValues = users.map(u => u.getArray('array').toJSON())\n const userMapValues = users.map(u => u.getMap('map').toJSON())\n // @todo fix type error here\n // @ts-ignore\n const userXmlValues = users.map(u => /** @type {Y.XmlElement} */ (u.get('xml', Y.XmlElement)).toString())\n const userTextValues = users.map(u => u.getText('text').getContentDeep())\n for (const u of users) {\n t.assert(u.store.pendingDs === null)\n t.assert(u.store.pendingStructs === null)\n }\n // Test Array iterator\n t.compare(users[0].getArray('array').toArray(), Array.from(users[0].getArray('array')))\n // Test Map iterator\n const ymapkeys = Array.from(users[0].getMap('map').keys())\n t.assert(ymapkeys.length === Object.keys(userMapValues[0]).length)\n ymapkeys.forEach(key => t.assert(object.hasProperty(userMapValues[0], key)))\n /**\n * @type {Object<string,any>}\n */\n const mapRes = {}\n for (const [k, v] of users[0].getMap('map')) {\n mapRes[k] = v instanceof Y.AbstractType ? v.toJSON() : v\n }\n t.compare(userMapValues[0], mapRes)\n // Compare all users\n for (let i = 0; i < users.length - 1; i++) {\n t.compare(userArrayValues[i].length, users[i].getArray('array').length)\n t.compare(userArrayValues[i], userArrayValues[i + 1])\n t.compare(userMapValues[i], userMapValues[i + 1])\n t.compare(userXmlValues[i], userXmlValues[i + 1])\n t.compare(list.toArray(userTextValues[i].children).map(a => (delta.$textOp.check(a) || delta.$insertOp.check(a)) ? a.insert.length : 0).reduce((a, b) => a + b, 0), users[i].getText('text').length)\n t.compare(userTextValues[i], userTextValues[i + 1], '', (_constructor, a, b) => {\n if (a instanceof Y.AbstractType) {\n t.compare(a.toJSON(), b.toJSON())\n } else if (a !== b) {\n t.fail('Deltas dont match')\n }\n return true\n })\n t.compare(Y.encodeStateVector(users[i]), Y.encodeStateVector(users[i + 1]))\n Y.equalIdSets(Y.createDeleteSetFromStructStore(users[i].store), Y.createDeleteSetFromStructStore(users[i + 1].store))\n compareStructStores(users[i].store, users[i + 1].store)\n t.compare(Y.encodeSnapshot(Y.snapshot(users[i])), Y.encodeSnapshot(Y.snapshot(users[i + 1])))\n }\n users.forEach(user => {\n compareIdSets(user.store.ds, Y.createDeleteSetFromStructStore(user.store))\n })\n users.map(u => u.destroy())\n}\n\n/**\n * @param {Y.Item?} a\n * @param {Y.Item?} b\n * @return {boolean}\n */\nexport const compareItemIDs = (a, b) => a === b || (a !== null && b != null && Y.compareIDs(a.id, b.id))\n\n/**\n * @param {import('../src/internals.js').StructStore} ss1\n * @param {import('../src/internals.js').StructStore} ss2\n */\nexport const compareStructStores = (ss1, ss2) => {\n t.assert(ss1.clients.size === ss2.clients.size)\n for (const [client, structs1] of ss1.clients) {\n const structs2 = /** @type {Array<Y.AbstractStruct>} */ (ss2.clients.get(client))\n t.assert(structs2 !== undefined && structs1.length === structs2.length)\n for (let i = 0; i < structs1.length; i++) {\n const s1 = structs1[i]\n const s2 = structs2[i]\n // checks for abstract struct\n if (\n s1.constructor !== s2.constructor ||\n !Y.compareIDs(s1.id, s2.id) ||\n s1.deleted !== s2.deleted ||\n // @ts-ignore\n s1.length !== s2.length\n ) {\n t.fail('Structs dont match')\n }\n if (s1 instanceof Y.Item) {\n if (\n !(s2 instanceof Y.Item) ||\n !((s1.left === null && s2.left === null) || (s1.left !== null && s2.left !== null && Y.compareIDs(s1.left.lastId, s2.left.lastId))) ||\n !compareItemIDs(s1.right, s2.right) ||\n !Y.compareIDs(s1.origin, s2.origin) ||\n !Y.compareIDs(s1.rightOrigin, s2.rightOrigin) ||\n s1.parentSub !== s2.parentSub\n ) {\n return t.fail('Items dont match')\n }\n // make sure that items are connected correctly\n t.assert(s1.left === null || s1.left.right === s1)\n t.assert(s1.right === null || s1.right.left === s1)\n t.assert(s2.left === null || s2.left.right === s2)\n t.assert(s2.right === null || s2.right.left === s2)\n }\n }\n }\n}\n\n/**\n * @template T\n * @callback InitTestObjectCallback\n * @param {TestYInstance} y\n * @return {T}\n */\n\n/**\n * @template T\n * @param {t.TestCase} tc\n * @param {Array<function(Y.Doc,prng.PRNG,T):void>} mods\n * @param {number} iterations\n * @param {InitTestObjectCallback<T>} [initTestObject]\n */\nexport const applyRandomTests = (tc, mods, iterations, initTestObject) => {\n const gen = tc.prng\n const result = init(tc, { users: 5 }, initTestObject)\n const { testConnector, users } = result\n for (let i = 0; i < iterations; i++) {\n if (prng.int32(gen, 0, 100) <= 2) {\n // 2% chance to disconnect/reconnect a random user\n if (prng.bool(gen)) {\n testConnector.disconnectRandom()\n } else {\n testConnector.reconnectRandom()\n }\n } else if (prng.int32(gen, 0, 100) <= 1) {\n // 1% chance to flush all\n testConnector.flushAllMessages()\n } else if (prng.int32(gen, 0, 100) <= 50) {\n // 50% chance to flush a random message\n testConnector.flushRandomMessage()\n }\n const user = prng.int32(gen, 0, users.length - 1)\n const test = prng.oneOf(gen, mods)\n test(users[user], gen, result.testObjects[user])\n }\n compare(users)\n return result\n}\n"],"names":["Y","useV2","Y.encodeStateAsUpdate","Y.mergeUpdates","Y.applyUpdate","Y.logUpdate","Y.diffUpdate","Y.encodeStateAsUpdateV2","Y.mergeUpdatesV2","Y.applyUpdateV2","Y.logUpdateV2","Y.diffUpdateV2","enc","Y.Doc","encoding","syncProtocol","map","prng","decoding","Y.XmlElement","t","Y.createIdMap","math","createIdSet","addToIdSet","createIdMap","Y.createAttributionItem","encodeIdMap","object","Y.AbstractType","list","delta","Y.encodeStateVector","Y.equalIdSets","Y.createDeleteSetFromStructStore","Y.encodeSnapshot","Y.snapshot","Y.compareIDs","Y.Item"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACnC;AACA,EAAE,MAAM,CAAC,CAAC,GAAGA,MAAC;AACd;;AAEA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AACnC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;AAC/B,IAAI,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,eAAe,IAAI;AAChD,MAAM,IAAI,eAAe,KAAK,CAAC,EAAE;AACjC,QAAQ,eAAe,CAAC,QAAQ,C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AGA,eAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC;AACpD,IAAI,MAAM,IAAI,GAAGA,eAAI,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI;AACrC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;AACnD,EAAE;AACF,EAAE,OAAO,CAAC,KAAK;AACf,EAAE,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} | ||
| {"version":3,"file":"testHelper.cjs","sources":["../tests/testHelper.js"],"sourcesContent":["import * as t from 'lib0/testing'\nimport * as prng from 'lib0/prng'\nimport * as encoding from 'lib0/encoding'\nimport * as decoding from 'lib0/decoding'\nimport * as syncProtocol from '@y/protocols/sync'\nimport * as object from 'lib0/object'\nimport * as map from 'lib0/map'\nimport * as Y from '../src/index.js'\nimport * as math from 'lib0/math'\nimport * as list from 'lib0/list'\nimport * as delta from 'lib0/delta'\nimport {\n createIdSet, createIdMap, addToIdSet, encodeIdMap\n} from '../src/internals.js'\n\nexport * from '../src/index.js'\n\nif (typeof window !== 'undefined') {\n // @ts-ignore\n window.Y = Y // eslint-disable-line\n}\n\n/**\n * @param {TestYInstance} y // publish message created by `y` to all other online clients\n * @param {Uint8Array} m\n */\nconst broadcastMessage = (y, m) => {\n if (y.tc.onlineConns.has(y)) {\n y.tc.onlineConns.forEach(remoteYInstance => {\n if (remoteYInstance !== y) {\n remoteYInstance._receive(m, y)\n }\n })\n }\n}\n\nexport let useV2 = false\n\nexport const encV1 = {\n encodeStateAsUpdate: Y.encodeStateAsUpdate,\n mergeUpdates: Y.mergeUpdates,\n applyUpdate: Y.applyUpdate,\n logUpdate: Y.logUpdate,\n updateEventName: /** @type {'update'} */ ('update'),\n diffUpdate: Y.diffUpdate\n}\n\nexport const encV2 = {\n encodeStateAsUpdate: Y.encodeStateAsUpdateV2,\n mergeUpdates: Y.mergeUpdatesV2,\n applyUpdate: Y.applyUpdateV2,\n logUpdate: Y.logUpdateV2,\n updateEventName: /** @type {'updateV2'} */ ('updateV2'),\n diffUpdate: Y.diffUpdateV2\n}\n\nexport let enc = encV1\n\nconst useV1Encoding = () => {\n useV2 = false\n enc = encV1\n}\n\nconst useV2Encoding = () => {\n console.error('sync protocol doesnt support v2 protocol yet, fallback to v1 encoding') // @Todo\n useV2 = false\n enc = encV1\n}\n\nexport class TestYInstance extends Y.Doc {\n /**\n * @param {TestConnector} testConnector\n * @param {number} clientID\n */\n constructor (testConnector, clientID) {\n super()\n this.userID = clientID // overwriting clientID\n /**\n * @type {TestConnector}\n */\n this.tc = testConnector\n /**\n * @type {Map<TestYInstance, Array<Uint8Array>>}\n */\n this.receiving = new Map()\n testConnector.allConns.add(this)\n /**\n * The list of received updates.\n * We are going to merge them later using Y.mergeUpdates and check if the resulting document is correct.\n * @type {Array<Uint8Array<ArrayBuffer>>}\n */\n this.updates = []\n // set up observe on local model\n this.on(enc.updateEventName, (update, origin) => {\n if (origin !== testConnector) {\n const encoder = encoding.createEncoder()\n syncProtocol.writeUpdate(encoder, update)\n broadcastMessage(this, encoding.toUint8Array(encoder))\n }\n this.updates.push(update)\n })\n this.connect()\n }\n\n /**\n * Disconnect from TestConnector.\n */\n disconnect () {\n this.receiving = new Map()\n this.tc.onlineConns.delete(this)\n }\n\n /**\n * Append yourself to the list of known Y instances in testconnector.\n * Also initiate sync with all clients.\n */\n connect () {\n if (!this.tc.onlineConns.has(this)) {\n this.tc.onlineConns.add(this)\n const encoder = encoding.createEncoder()\n syncProtocol.writeSyncStep1(encoder, this)\n // publish SyncStep1\n broadcastMessage(this, encoding.toUint8Array(encoder))\n this.tc.onlineConns.forEach(remoteYInstance => {\n if (remoteYInstance !== this) {\n // remote instance sends instance to this instance\n const encoder = encoding.createEncoder()\n syncProtocol.writeSyncStep1(encoder, remoteYInstance)\n this._receive(encoding.toUint8Array(encoder), remoteYInstance)\n }\n })\n }\n }\n\n /**\n * Receive a message from another client. This message is only appended to the list of receiving messages.\n * TestConnector decides when this client actually reads this message.\n *\n * @param {Uint8Array} message\n * @param {TestYInstance} remoteClient\n */\n _receive (message, remoteClient) {\n map.setIfUndefined(this.receiving, remoteClient, () => /** @type {Array<Uint8Array>} */ ([])).push(message)\n }\n}\n\n/**\n * Keeps track of TestYInstances.\n *\n * The TestYInstances add/remove themselves from the list of connections maiained in this object.\n * I think it makes sense. Deal with it.\n */\nexport class TestConnector {\n /**\n * @param {prng.PRNG} gen\n */\n constructor (gen) {\n /**\n * @type {Set<TestYInstance>}\n */\n this.allConns = new Set()\n /**\n * @type {Set<TestYInstance>}\n */\n this.onlineConns = new Set()\n /**\n * @type {prng.PRNG}\n */\n this.prng = gen\n }\n\n /**\n * Create a new Y instance and add it to the list of connections\n * @param {number} clientID\n */\n createY (clientID) {\n return new TestYInstance(this, clientID)\n }\n\n /**\n * Choose random connection and flush a random message from a random sender.\n *\n * If this function was unable to flush a message, because there are no more messages to flush, it returns false. true otherwise.\n * @return {boolean}\n */\n flushRandomMessage () {\n const gen = this.prng\n const conns = Array.from(this.onlineConns).filter(conn => conn.receiving.size > 0)\n if (conns.length > 0) {\n const receiver = prng.oneOf(gen, conns)\n const [sender, messages] = prng.oneOf(gen, Array.from(receiver.receiving))\n const m = messages.shift()\n if (messages.length === 0) {\n receiver.receiving.delete(sender)\n }\n if (m === undefined) {\n return this.flushRandomMessage()\n }\n const encoder = encoding.createEncoder()\n // console.log('receive (' + sender.userID + '->' + receiver.userID + '):\\n', syncProtocol.stringifySyncMessage(decoding.createDecoder(m), receiver))\n // do not publish data created when this function is executed (could be ss2 or update message)\n syncProtocol.readSyncMessage(decoding.createDecoder(m), encoder, receiver, receiver.tc)\n if (encoding.length(encoder) > 0) {\n // send reply message\n sender._receive(encoding.toUint8Array(encoder), receiver)\n }\n return true\n }\n return false\n }\n\n /**\n * @return {boolean} True iff this function actually flushed something\n */\n flushAllMessages () {\n let didSomething = false\n while (this.flushRandomMessage()) {\n didSomething = true\n }\n return didSomething\n }\n\n reconnectAll () {\n this.allConns.forEach(conn => conn.connect())\n }\n\n disconnectAll () {\n this.allConns.forEach(conn => conn.disconnect())\n }\n\n syncAll () {\n this.reconnectAll()\n this.flushAllMessages()\n }\n\n /**\n * @return {boolean} Whether it was possible to disconnect a random connection.\n */\n disconnectRandom () {\n if (this.onlineConns.size === 0) {\n return false\n }\n prng.oneOf(this.prng, Array.from(this.onlineConns)).disconnect()\n return true\n }\n\n /**\n * @return {boolean} Whether it was possible to reconnect a random connection.\n */\n reconnectRandom () {\n /**\n * @type {Array<TestYInstance>}\n */\n const reconnectable = []\n this.allConns.forEach(conn => {\n if (!this.onlineConns.has(conn)) {\n reconnectable.push(conn)\n }\n })\n if (reconnectable.length === 0) {\n return false\n }\n prng.oneOf(this.prng, reconnectable).connect()\n return true\n }\n}\n\n/**\n * @template T\n * @param {t.TestCase} tc\n * @param {{users?:number}} conf\n * @param {InitTestObjectCallback<T>} [initTestObject]\n * @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}}\n */\nexport const init = (tc, { users = 5 } = {}, initTestObject) => {\n /**\n * @type {Object<string,any>}\n */\n const result = {\n users: []\n }\n const gen = tc.prng\n // choose an encoding approach at random\n if (prng.bool(gen)) {\n useV2Encoding()\n } else {\n useV1Encoding()\n }\n\n const testConnector = new TestConnector(gen)\n result.testConnector = testConnector\n for (let i = 0; i < users; i++) {\n const y = testConnector.createY(i)\n y.clientID = i\n result.users.push(y)\n result['array' + i] = y.getArray('array')\n result['map' + i] = y.getMap('map')\n result['xml' + i] = y.get('xml', Y.XmlElement)\n result['text' + i] = y.getText('text')\n }\n testConnector.syncAll()\n result.testObjects = result.users.map(initTestObject || (() => null))\n useV1Encoding()\n return /** @type {any} */ (result)\n}\n\n/**\n * @param {Y.IdSet} idSet1\n * @param {Y.IdSet} idSet2\n */\nexport const compareIdSets = (idSet1, idSet2) => {\n t.assert(idSet1.clients.size === idSet2.clients.size)\n for (const [client, _items1] of idSet1.clients.entries()) {\n const items1 = _items1.getIds()\n const items2 = idSet2.clients.get(client)?.getIds()\n t.assert(items2 !== undefined && items1.length === items2.length)\n for (let i = 0; i < items1.length; i++) {\n const di1 = items1[i]\n const di2 = /** @type {Array<import('../src/utils/IdSet.js').IdRange>} */ (items2)[i]\n t.assert(di1.clock === di2.clock && di1.len === di2.len)\n }\n }\n return true\n}\n\n/**\n * only use for testing\n *\n * @template T\n * @param {Array<Y.Attribution<T>>} attrs\n * @param {Y.Attribution<T>} attr\n *\n */\nconst _idmapAttrsHas = (attrs, attr) => {\n const hash = attr.hash()\n return attrs.find(a => a.hash() === hash)\n}\n\n/**\n * only use for testing\n *\n * @template T\n * @param {Array<Y.Attribution<T>>} a\n * @param {Array<Y.Attribution<T>>} b\n */\nexport const _idmapAttrsEqual = (a, b) => a.length === b.length && a.every(v => _idmapAttrsHas(b, v))\n\n/**\n * Ensure that all attributes exist. Also create a copy and compare it to the original.\n *\n * @template T\n * @param {Y.IdMap<T>} idmap\n */\nexport const validateIdMap = idmap => {\n const copy = Y.createIdMap()\n idmap.clients.forEach((ranges, client) => {\n ranges.getIds().forEach(range => {\n range.attrs.forEach(attr => {\n t.assert(idmap.attrs.has(attr))\n t.assert(idmap.attrsH.get(attr.hash()) === attr)\n copy.add(client, range.clock, range.len, range.attrs.slice())\n })\n })\n t.assert(copy.clients.get(client)?.getIds().length === ranges.getIds().length)\n })\n t.assert(idmap.attrsH.size === idmap.attrs.size)\n}\n\n/**\n * @template T\n * @param {Y.IdMap<T>} idmap1\n * @param {Y.IdMap<T>} idmap2\n */\nexport const compareIdmaps = (idmap1, idmap2) => {\n t.assert(idmap1.clients.size === idmap2.clients.size)\n for (const [client, _items1] of idmap1.clients.entries()) {\n const items1 = _items1.getIds()\n const items2 = idmap2.clients.get(client)?.getIds()\n t.assert(items2 !== undefined && items1.length === items2.length)\n for (let i = 0; i < items1.length; i++) {\n const di1 = items1[i]\n const di2 = /** @type {Array<import('../src/utils/IdMap.js').AttrRange<T>>} */ (items2)[i]\n t.assert(di1.clock === di2.clock && di1.len === di2.len && _idmapAttrsEqual(di1.attrs, di2.attrs))\n }\n }\n validateIdMap(idmap1)\n validateIdMap(idmap2)\n}\n\n/**\n * @param {prng.PRNG} gen\n * @param {number} clients\n * @param {number} clockRange (max clock - exclusive - by each client)\n */\nexport const createRandomIdSet = (gen, clients, clockRange) => {\n const maxOpLen = 5\n const numOfOps = math.ceil((clients * clockRange) / maxOpLen)\n const idset = createIdSet()\n for (let i = 0; i < numOfOps; i++) {\n const client = prng.uint32(gen, 0, clients - 1)\n const clockStart = prng.uint32(gen, 0, clockRange)\n const len = prng.uint32(gen, 0, clockRange - clockStart)\n addToIdSet(idset, client, clockStart, len)\n }\n if (idset.clients.size === clients && clients > 1 && prng.bool(gen)) {\n idset.clients.delete(prng.uint32(gen, 0, clients))\n }\n return idset\n}\n\n/**\n * @template T\n * @param {prng.PRNG} gen\n * @param {number} clients\n * @param {number} clockRange (max clock - exclusive - by each client)\n * @param {Array<T>} attrChoices (max clock - exclusive - by each client)\n * @return {Y.IdMap<T>}\n */\nexport const createRandomIdMap = (gen, clients, clockRange, attrChoices) => {\n const maxOpLen = 5\n const numOfOps = math.ceil((clients * clockRange) / maxOpLen)\n const idMap = createIdMap()\n for (let i = 0; i < numOfOps; i++) {\n const client = prng.uint32(gen, 0, clients - 1)\n const clockStart = prng.uint32(gen, 0, clockRange)\n const len = prng.uint32(gen, 0, clockRange - clockStart)\n const attrs = [prng.oneOf(gen, attrChoices)]\n // maybe add another attr\n if (prng.bool(gen)) {\n const a = prng.oneOf(gen, attrChoices)\n if (attrs.find(attr => attr === a) == null) {\n attrs.push(a)\n }\n }\n idMap.add(client, clockStart, len, attrs.map(v => Y.createAttributionItem('', v)))\n }\n t.info(`Created IdMap with ${numOfOps} ranges and ${attrChoices.length} different attributes. Encoded size: ${encodeIdMap(idMap).byteLength}`)\n return idMap\n}\n\n/**\n * 1. reconnect and flush all\n * 2. user 0 gc\n * 3. get type content\n * 4. disconnect & reconnect all (so gc is propagated)\n * 5. compare os, ds, ss\n *\n * @param {Array<TestYInstance>} users\n */\nexport const compare = users => {\n users.forEach(u => u.connect())\n while (users[0].tc.flushAllMessages()) {} // eslint-disable-line\n // 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\"\n // This ensures that mergeUpdates works correctly\n const mergedDocs = users.map(user => {\n const ydoc = new Y.Doc()\n enc.applyUpdate(ydoc, enc.mergeUpdates(user.updates))\n return ydoc\n })\n users.push(.../** @type {any} */(mergedDocs))\n const userArrayValues = users.map(u => u.getArray('array').toJSON())\n const userMapValues = users.map(u => u.getMap('map').toJSON())\n // @todo fix type error here\n // @ts-ignore\n const userXmlValues = users.map(u => /** @type {Y.XmlElement} */ (u.get('xml', Y.XmlElement)).toString())\n const userTextValues = users.map(u => u.getText('text').getContentDeep())\n for (const u of users) {\n t.assert(u.store.pendingDs === null)\n t.assert(u.store.pendingStructs === null)\n }\n // Test Array iterator\n t.compare(users[0].getArray('array').toArray(), Array.from(users[0].getArray('array')))\n // Test Map iterator\n const ymapkeys = Array.from(users[0].getMap('map').keys())\n t.assert(ymapkeys.length === Object.keys(userMapValues[0]).length)\n ymapkeys.forEach(key => t.assert(object.hasProperty(userMapValues[0], key)))\n /**\n * @type {Object<string,any>}\n */\n const mapRes = {}\n for (const [k, v] of users[0].getMap('map')) {\n mapRes[k] = v instanceof Y.AbstractType ? v.toJSON() : v\n }\n t.compare(userMapValues[0], mapRes)\n // Compare all users\n for (let i = 0; i < users.length - 1; i++) {\n t.compare(userArrayValues[i].length, users[i].getArray('array').length)\n t.compare(userArrayValues[i], userArrayValues[i + 1])\n t.compare(userMapValues[i], userMapValues[i + 1])\n t.compare(userXmlValues[i], userXmlValues[i + 1])\n t.compare(list.toArray(userTextValues[i].children).map(a => (delta.$textOp.check(a) || delta.$insertOp.check(a)) ? a.insert.length : 0).reduce((a, b) => a + b, 0), users[i].getText('text').length)\n t.compare(userTextValues[i], userTextValues[i + 1], '', (_constructor, a, b) => {\n if (a instanceof Y.AbstractType) {\n t.compare(a.toJSON(), b.toJSON())\n } else if (a !== b) {\n t.fail('Deltas dont match')\n }\n return true\n })\n t.compare(Y.encodeStateVector(users[i]), Y.encodeStateVector(users[i + 1]))\n Y.equalIdSets(Y.createDeleteSetFromStructStore(users[i].store), Y.createDeleteSetFromStructStore(users[i + 1].store))\n compareStructStores(users[i].store, users[i + 1].store)\n t.compare(Y.encodeSnapshot(Y.snapshot(users[i])), Y.encodeSnapshot(Y.snapshot(users[i + 1])))\n }\n users.forEach(user => {\n compareIdSets(user.store.ds, Y.createDeleteSetFromStructStore(user.store))\n })\n users.map(u => u.destroy())\n}\n\n/**\n * @param {Y.Item?} a\n * @param {Y.Item?} b\n * @return {boolean}\n */\nexport const compareItemIDs = (a, b) => a === b || (a !== null && b != null && Y.compareIDs(a.id, b.id))\n\n/**\n * @param {import('../src/internals.js').StructStore} ss1\n * @param {import('../src/internals.js').StructStore} ss2\n */\nexport const compareStructStores = (ss1, ss2) => {\n t.assert(ss1.clients.size === ss2.clients.size)\n for (const [client, structs1] of ss1.clients) {\n const structs2 = /** @type {Array<Y.AbstractStruct>} */ (ss2.clients.get(client))\n t.assert(structs2 !== undefined && structs1.length === structs2.length)\n for (let i = 0; i < structs1.length; i++) {\n const s1 = structs1[i]\n const s2 = structs2[i]\n // checks for abstract struct\n if (\n s1.constructor !== s2.constructor ||\n !Y.compareIDs(s1.id, s2.id) ||\n s1.deleted !== s2.deleted ||\n // @ts-ignore\n s1.length !== s2.length\n ) {\n t.fail('Structs dont match')\n }\n if (s1 instanceof Y.Item) {\n if (\n !(s2 instanceof Y.Item) ||\n !((s1.left === null && s2.left === null) || (s1.left !== null && s2.left !== null && Y.compareIDs(s1.left.lastId, s2.left.lastId))) ||\n !compareItemIDs(s1.right, s2.right) ||\n !Y.compareIDs(s1.origin, s2.origin) ||\n !Y.compareIDs(s1.rightOrigin, s2.rightOrigin) ||\n s1.parentSub !== s2.parentSub\n ) {\n return t.fail('Items dont match')\n }\n // make sure that items are connected correctly\n t.assert(s1.left === null || s1.left.right === s1)\n t.assert(s1.right === null || s1.right.left === s1)\n t.assert(s2.left === null || s2.left.right === s2)\n t.assert(s2.right === null || s2.right.left === s2)\n }\n }\n }\n}\n\n/**\n * @template T\n * @callback InitTestObjectCallback\n * @param {TestYInstance} y\n * @return {T}\n */\n\n/**\n * @template T\n * @param {t.TestCase} tc\n * @param {Array<function(Y.Doc,prng.PRNG,T):void>} mods\n * @param {number} iterations\n * @param {InitTestObjectCallback<T>} [initTestObject]\n */\nexport const applyRandomTests = (tc, mods, iterations, initTestObject) => {\n const gen = tc.prng\n const result = init(tc, { users: 5 }, initTestObject)\n const { testConnector, users } = result\n for (let i = 0; i < iterations; i++) {\n if (prng.int32(gen, 0, 100) <= 2) {\n // 2% chance to disconnect/reconnect a random user\n if (prng.bool(gen)) {\n testConnector.disconnectRandom()\n } else {\n testConnector.reconnectRandom()\n }\n } else if (prng.int32(gen, 0, 100) <= 1) {\n // 1% chance to flush all\n testConnector.flushAllMessages()\n } else if (prng.int32(gen, 0, 100) <= 50) {\n // 50% chance to flush a random message\n testConnector.flushRandomMessage()\n }\n const user = prng.int32(gen, 0, users.length - 1)\n const test = prng.oneOf(gen, mods)\n test(users[user], gen, result.testObjects[user])\n }\n compare(users)\n return result\n}\n"],"names":["Y","useV2","Y.encodeStateAsUpdate","Y.mergeUpdates","Y.applyUpdate","Y.logUpdate","Y.diffUpdate","Y.encodeStateAsUpdateV2","Y.mergeUpdatesV2","Y.applyUpdateV2","Y.logUpdateV2","Y.diffUpdateV2","enc","Y.Doc","encoding","syncProtocol","map","prng","decoding","Y.XmlElement","t","Y.createIdMap","math","createIdSet","addToIdSet","createIdMap","Y.createAttributionItem","encodeIdMap","object","Y.AbstractType","list","delta","Y.encodeStateVector","Y.equalIdSets","Y.createDeleteSetFromStructStore","Y.encodeSnapshot","Y.snapshot","Y.compareIDs","Y.Item"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACnC;AACA,EAAE,MAAM,CAAC,CAAC,GAAGA,MAAC;AACd;;AAEA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AACnC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;AAC/B,IAAI,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,eAAe,IAAI;AAChD,MAAM,IAAI,eAAe,KAAK,CAAC,EAAE;AACjC,QAAQ,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;AACrC,MAAM;AACN,IAAI,CAAC;AACL,EAAE;AACF;;AAEWC,aAAK,GAAG;;AAEP,MAAC,KAAK,GAAG;AACrB,EAAE,mBAAmB,EAAEC,wBAAqB;AAC5C,EAAE,YAAY,EAAEC,iBAAc;AAC9B,EAAE,WAAW,EAAEC,gBAAa;AAC5B,EAAE,SAAS,EAAEC,cAAW;AACxB,EAAE,eAAe,2BAA2B,QAAQ,CAAC;AACrD,EAAE,UAAU,EAAEC;AACd;;AAEY,MAAC,KAAK,GAAG;AACrB,EAAE,mBAAmB,EAAEC,0BAAuB;AAC9C,EAAE,YAAY,EAAEC,mBAAgB;AAChC,EAAE,WAAW,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
@@ -8,8 +8,8 @@ import * as t from 'lib0/testing'; | ||
| import * as map from 'lib0/map'; | ||
| import { Y } from './index-BQzo_pY0.js'; | ||
| import { Y } from './index-Czf9BAS1.js'; | ||
| import * as math from 'lib0/math'; | ||
| import * as list from 'lib0/list'; | ||
| import * as delta from 'lib0/delta'; | ||
| import { bb as diffUpdate, a$ as logUpdate, Q as applyUpdate, b4 as mergeUpdates, T as encodeStateAsUpdate, ba as diffUpdateV2, b0 as logUpdateV2, P as applyUpdateV2, b9 as mergeUpdatesV2, S as encodeStateAsUpdateV2, a7 as compareIDs, D as Doc, cr as YXmlElement, by as createIdMap, n as addToIdSet, p as createIdSet, bm as createAttributionItem, bv as encodeIdMap, bT as AbstractType, $ as encodeStateVector, v as equalIdSets, q as createDeleteSetFromStructStore, au as encodeSnapshot, az as snapshot, d3 as Item } from './Skip-CPEp7KWv.js'; | ||
| export { ah as AbsolutePosition, bF as AbstractAttributionManager, A as AbstractConnector, cx as AbstractStruct, ce as Array, bl as Attribution, cM as ContentAny, cA as ContentBinary, cC as ContentDeleted, cE as ContentDoc, cG as ContentEmbed, cI as ContentFormat, cK as ContentJSON, cO as ContentString, cY as ContentType, bJ as DiffAttributionManager, cz as GC, a6 as ID, bt as IdMap, b as IdSet, cg as Map, ae as RelativePosition, d8 as Skip, ar as Snapshot, cn as Text, aS as Transaction, bG as TwosetAttributionManager, aZ as UndoManager, U as UpdateDecoderV1, C as UpdateDecoderV2, F as UpdateEncoderV1, H as UpdateEncoderV2, cp as XmlFragment, ct as XmlHook, cv as XmlText, bh as YEvent, ck as cleanupYTextFormatting, y as cloneDoc, aq as compareRelativePositions, bf as convertUpdateFormatV1ToV2, bg as convertUpdateFormatV2ToV1, ap as createAbsolutePositionFromRelativePosition, bK as createAttributionManagerFromDiff, aC as createDocFromSnapshot, a8 as createID, bs as createIdMapFromIdSet, s as createInsertionSetFromStructStore, ag as createRelativePositionFromJSON, ak as createRelativePositionFromTypeIndex, ax as createSnapshot, bx as decodeIdMap, ao as decodeRelativePosition, aw as decodeSnapshot, av as decodeSnapshotV2, W as decodeStateVector, b1 as decodeUpdate, b2 as decodeUpdateV2, bA as diffIdMap, j as diffIdSet, ay as emptySnapshot, am as encodeRelativePosition, at as encodeSnapshotV2, b6 as encodeStateVectorFromUpdate, b5 as encodeStateVectorFromUpdateV2, as as equalSnapshots, aK as findIndexSS, ab as findRootTypeKey, aM as getItem, aP as getItemCleanEnd, aO as getItemCleanStart, aH as getState, bR as getTypeChildren, bz as insertIntoIdMap, g as insertIntoIdSet, ac as isParentOf, i as iterateStructsByIdSet, ad as logType, br as mergeIdMaps, m as mergeIdSets, bI as noAttributionsManager, bd as obfuscateUpdate, be as obfuscateUpdateV2, bw as readIdMap, t as readIdSet, O as readUpdate, b8 as readUpdateIdRanges, b7 as readUpdateIdRangesV2, N as readUpdateV2, af as relativePositionToJSON, aE as snapshotContainsUpdate, aX as transact, aW as tryGc, bX as typeListToArraySnapshot, cc as typeMapGetAllSnapshot, cb as typeMapGetSnapshot } from './Skip-CPEp7KWv.js'; | ||
| import { bb as diffUpdate, a$ as logUpdate, Q as applyUpdate, b4 as mergeUpdates, T as encodeStateAsUpdate, ba as diffUpdateV2, b0 as logUpdateV2, P as applyUpdateV2, b9 as mergeUpdatesV2, S as encodeStateAsUpdateV2, a7 as compareIDs, D as Doc, cs as YXmlElement, by as createIdMap, n as addToIdSet, p as createIdSet, bm as createAttributionItem, bv as encodeIdMap, bU as AbstractType, $ as encodeStateVector, v as equalIdSets, q as createDeleteSetFromStructStore, au as encodeSnapshot, az as snapshot, d4 as Item } from './Skip-CtOOBRkz.js'; | ||
| export { ah as AbsolutePosition, bF as AbstractAttributionManager, A as AbstractConnector, cy as AbstractStruct, cf as Array, bl as Attribution, cN as ContentAny, cB as ContentBinary, cD as ContentDeleted, cF as ContentDoc, cH as ContentEmbed, cJ as ContentFormat, cL as ContentJSON, cP as ContentString, cZ as ContentType, bJ as DiffAttributionManager, cA as GC, a6 as ID, bt as IdMap, b as IdSet, ch as Map, ae as RelativePosition, d9 as Skip, ar as Snapshot, co as Text, aS as Transaction, bG as TwosetAttributionManager, aZ as UndoManager, U as UpdateDecoderV1, C as UpdateDecoderV2, F as UpdateEncoderV1, H as UpdateEncoderV2, cq as XmlFragment, cu as XmlHook, cw as XmlText, bh as YEvent, cl as cleanupYTextFormatting, y as cloneDoc, aq as compareRelativePositions, bf as convertUpdateFormatV1ToV2, bg as convertUpdateFormatV2ToV1, ap as createAbsolutePositionFromRelativePosition, bK as createAttributionManagerFromDiff, aC as createDocFromSnapshot, a8 as createID, bs as createIdMapFromIdSet, s as createInsertionSetFromStructStore, ag as createRelativePositionFromJSON, ak as createRelativePositionFromTypeIndex, ax as createSnapshot, bx as decodeIdMap, ao as decodeRelativePosition, aw as decodeSnapshot, av as decodeSnapshotV2, W as decodeStateVector, b1 as decodeUpdate, b2 as decodeUpdateV2, bN as diffDocsToDelta, bA as diffIdMap, j as diffIdSet, ay as emptySnapshot, am as encodeRelativePosition, at as encodeSnapshotV2, b6 as encodeStateVectorFromUpdate, b5 as encodeStateVectorFromUpdateV2, as as equalSnapshots, aK as findIndexSS, ab as findRootTypeKey, aM as getItem, aP as getItemCleanEnd, aO as getItemCleanStart, aH as getState, bS as getTypeChildren, bz as insertIntoIdMap, g as insertIntoIdSet, ac as isParentOf, i as iterateStructsByIdSet, ad as logType, br as mergeIdMaps, m as mergeIdSets, bI as noAttributionsManager, bd as obfuscateUpdate, be as obfuscateUpdateV2, bw as readIdMap, t as readIdSet, O as readUpdate, b8 as readUpdateIdRanges, b7 as readUpdateIdRangesV2, N as readUpdateV2, af as relativePositionToJSON, aE as snapshotContainsUpdate, aX as transact, aW as tryGc, bY as typeListToArraySnapshot, cd as typeMapGetAllSnapshot, cc as typeMapGetSnapshot } from './Skip-CtOOBRkz.js'; | ||
| import 'lib0/function'; | ||
@@ -16,0 +16,0 @@ import 'lib0/binary'; |
@@ -5,3 +5,4 @@ export function testRelativePositions(_tc: t.TestCase): void; | ||
| export function testInsertionsIntoAttributedContent(_tc: t.TestCase): void; | ||
| export function testYdocDiff(): void; | ||
| import * as t from 'lib0/testing'; | ||
| //# sourceMappingURL=attribution.tests.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"attribution.tests.d.ts","sourceRoot":"","sources":["../../tests/attribution.tests.js"],"names":[],"mappings":"AAcO,2CAFI,CAAC,CAAC,QAAQ,QAepB;AAKM,0CAFI,CAAC,CAAC,QAAQ,QAqBpB;AAKM,4DAFI,CAAC,CAAC,QAAQ,QAepB;AAKM,yDAFI,CAAC,CAAC,QAAQ,QAepB;mBA/EkB,cAAc"} | ||
| {"version":3,"file":"attribution.tests.d.ts","sourceRoot":"","sources":["../../tests/attribution.tests.js"],"names":[],"mappings":"AAcO,2CAFI,CAAC,CAAC,QAAQ,QAepB;AAKM,0CAFI,CAAC,CAAC,QAAQ,QAqBpB;AAKM,4DAFI,CAAC,CAAC,QAAQ,QAepB;AAKM,yDAFI,CAAC,CAAC,QAAQ,QAepB;AAEM,qCAoBN;mBArGkB,cAAc"} |
+3
-2
| 'use strict'; | ||
| var Skip = require('./Skip-vvIEGjAV.js'); | ||
| var Skip = require('./Skip-CpmLMm7q.js'); | ||
| require('lib0/function'); | ||
@@ -8,3 +8,3 @@ require('lib0/decoding'); | ||
| require('lib0/map'); | ||
| require('./index-BQN5CtgT.js'); | ||
| require('./index-B8_EfGwa.js'); | ||
| require('lib0/observable'); | ||
@@ -100,2 +100,3 @@ require('lib0/array'); | ||
| exports.decodeUpdateV2 = Skip.decodeUpdateV2; | ||
| exports.diffDocsToDelta = Skip.diffDocsToDelta; | ||
| exports.diffIdMap = Skip.diffIdMap; | ||
@@ -102,0 +103,0 @@ exports.diffIdSet = Skip.diffIdSet; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"yjs.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} | ||
| {"version":3,"file":"yjs.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
+2
-2
@@ -1,2 +0,2 @@ | ||
| export { ah as AbsolutePosition, bF as AbstractAttributionManager, A as AbstractConnector, cx as AbstractStruct, bT as AbstractType, ce as Array, bl as Attribution, cM as ContentAny, cA as ContentBinary, cC as ContentDeleted, cE as ContentDoc, cG as ContentEmbed, cI as ContentFormat, cK as ContentJSON, cO as ContentString, cY as ContentType, bJ as DiffAttributionManager, D as Doc, cz as GC, a6 as ID, bt as IdMap, b as IdSet, d3 as Item, cg as Map, ae as RelativePosition, d8 as Skip, ar as Snapshot, cn as Text, aS as Transaction, bG as TwosetAttributionManager, aZ as UndoManager, U as UpdateDecoderV1, C as UpdateDecoderV2, F as UpdateEncoderV1, H as UpdateEncoderV2, cr as XmlElement, cp as XmlFragment, ct as XmlHook, cv as XmlText, bh as YEvent, Q as applyUpdate, P as applyUpdateV2, ck as cleanupYTextFormatting, y as cloneDoc, a7 as compareIDs, aq as compareRelativePositions, bf as convertUpdateFormatV1ToV2, bg as convertUpdateFormatV2ToV1, ap as createAbsolutePositionFromRelativePosition, bm as createAttributionItem, bK as createAttributionManagerFromDiff, q as createDeleteSetFromStructStore, aC as createDocFromSnapshot, a8 as createID, by as createIdMap, bs as createIdMapFromIdSet, p as createIdSet, s as createInsertionSetFromStructStore, ag as createRelativePositionFromJSON, ak as createRelativePositionFromTypeIndex, ax as createSnapshot, bx as decodeIdMap, ao as decodeRelativePosition, aw as decodeSnapshot, av as decodeSnapshotV2, W as decodeStateVector, b1 as decodeUpdate, b2 as decodeUpdateV2, bA as diffIdMap, j as diffIdSet, bb as diffUpdate, ba as diffUpdateV2, ay as emptySnapshot, bv as encodeIdMap, am as encodeRelativePosition, au as encodeSnapshot, at as encodeSnapshotV2, T as encodeStateAsUpdate, S as encodeStateAsUpdateV2, $ as encodeStateVector, b6 as encodeStateVectorFromUpdate, b5 as encodeStateVectorFromUpdateV2, v as equalIdSets, as as equalSnapshots, aK as findIndexSS, ab as findRootTypeKey, aM as getItem, aP as getItemCleanEnd, aO as getItemCleanStart, aH as getState, bR as getTypeChildren, bz as insertIntoIdMap, g as insertIntoIdSet, ac as isParentOf, i as iterateStructsByIdSet, ad as logType, a$ as logUpdate, b0 as logUpdateV2, br as mergeIdMaps, m as mergeIdSets, b4 as mergeUpdates, b9 as mergeUpdatesV2, bI as noAttributionsManager, bd as obfuscateUpdate, be as obfuscateUpdateV2, bw as readIdMap, t as readIdSet, O as readUpdate, b8 as readUpdateIdRanges, b7 as readUpdateIdRangesV2, N as readUpdateV2, af as relativePositionToJSON, az as snapshot, aE as snapshotContainsUpdate, aX as transact, aW as tryGc, bX as typeListToArraySnapshot, cc as typeMapGetAllSnapshot, cb as typeMapGetSnapshot } from './Skip-CPEp7KWv.js'; | ||
| export { ah as AbsolutePosition, bF as AbstractAttributionManager, A as AbstractConnector, cy as AbstractStruct, bU as AbstractType, cf as Array, bl as Attribution, cN as ContentAny, cB as ContentBinary, cD as ContentDeleted, cF as ContentDoc, cH as ContentEmbed, cJ as ContentFormat, cL as ContentJSON, cP as ContentString, cZ as ContentType, bJ as DiffAttributionManager, D as Doc, cA as GC, a6 as ID, bt as IdMap, b as IdSet, d4 as Item, ch as Map, ae as RelativePosition, d9 as Skip, ar as Snapshot, co as Text, aS as Transaction, bG as TwosetAttributionManager, aZ as UndoManager, U as UpdateDecoderV1, C as UpdateDecoderV2, F as UpdateEncoderV1, H as UpdateEncoderV2, cs as XmlElement, cq as XmlFragment, cu as XmlHook, cw as XmlText, bh as YEvent, Q as applyUpdate, P as applyUpdateV2, cl as cleanupYTextFormatting, y as cloneDoc, a7 as compareIDs, aq as compareRelativePositions, bf as convertUpdateFormatV1ToV2, bg as convertUpdateFormatV2ToV1, ap as createAbsolutePositionFromRelativePosition, bm as createAttributionItem, bK as createAttributionManagerFromDiff, q as createDeleteSetFromStructStore, aC as createDocFromSnapshot, a8 as createID, by as createIdMap, bs as createIdMapFromIdSet, p as createIdSet, s as createInsertionSetFromStructStore, ag as createRelativePositionFromJSON, ak as createRelativePositionFromTypeIndex, ax as createSnapshot, bx as decodeIdMap, ao as decodeRelativePosition, aw as decodeSnapshot, av as decodeSnapshotV2, W as decodeStateVector, b1 as decodeUpdate, b2 as decodeUpdateV2, bN as diffDocsToDelta, bA as diffIdMap, j as diffIdSet, bb as diffUpdate, ba as diffUpdateV2, ay as emptySnapshot, bv as encodeIdMap, am as encodeRelativePosition, au as encodeSnapshot, at as encodeSnapshotV2, T as encodeStateAsUpdate, S as encodeStateAsUpdateV2, $ as encodeStateVector, b6 as encodeStateVectorFromUpdate, b5 as encodeStateVectorFromUpdateV2, v as equalIdSets, as as equalSnapshots, aK as findIndexSS, ab as findRootTypeKey, aM as getItem, aP as getItemCleanEnd, aO as getItemCleanStart, aH as getState, bS as getTypeChildren, bz as insertIntoIdMap, g as insertIntoIdSet, ac as isParentOf, i as iterateStructsByIdSet, ad as logType, a$ as logUpdate, b0 as logUpdateV2, br as mergeIdMaps, m as mergeIdSets, b4 as mergeUpdates, b9 as mergeUpdatesV2, bI as noAttributionsManager, bd as obfuscateUpdate, be as obfuscateUpdateV2, bw as readIdMap, t as readIdSet, O as readUpdate, b8 as readUpdateIdRanges, b7 as readUpdateIdRangesV2, N as readUpdateV2, af as relativePositionToJSON, az as snapshot, aE as snapshotContainsUpdate, aX as transact, aW as tryGc, bY as typeListToArraySnapshot, cd as typeMapGetAllSnapshot, cc as typeMapGetSnapshot } from './Skip-CtOOBRkz.js'; | ||
| import 'lib0/function'; | ||
@@ -6,3 +6,3 @@ import 'lib0/decoding'; | ||
| import 'lib0/map'; | ||
| import './index-BQzo_pY0.js'; | ||
| import './index-Czf9BAS1.js'; | ||
| import 'lib0/observable'; | ||
@@ -9,0 +9,0 @@ import 'lib0/array'; |
+1
-1
| { | ||
| "name": "yjs", | ||
| "version": "14.0.0-13", | ||
| "version": "14.0.0-14", | ||
| "description": "Shared Editing Library", | ||
@@ -5,0 +5,0 @@ "main": "./dist/yjs.cjs", |
+9
-5
@@ -240,11 +240,15 @@ | ||
| </dd> | ||
| <dt><a href="https://github.com/drifting-in-space/y-sweet">y-sweet</a> ⭐</dt> | ||
| <dt><a href="https://github.com/ueberdosis/hocuspocus">Hocuspocus</a> ⭐</dt> | ||
| <dd> | ||
| A standalone extensible yjs server with sqlite persistence, webhooks, auth and more. | ||
| </dd> | ||
| <dt><a href="https://github.com/nperez0111/teleportal">teleportal</a></dt> | ||
| <dd> | ||
| Build your own Y.js sync server: any storage, any JS runtime, any transport. | ||
| </dd> | ||
| <dt><a href="https://github.com/drifting-in-space/y-sweet">y-sweet</a></dt> | ||
| <dd> | ||
| A standalone yjs server with persistence to S3 or filesystem. They offer a | ||
| <a href="https://y-sweet.cloud">cloud service</a> as well. | ||
| </dd> | ||
| <dt><a href="https://github.com/ueberdosis/hocuspocus">Hocuspocus</a> ⭐</dt> | ||
| <dd> | ||
| A standalone extensible yjs server with sqlite persistence, webhooks, auth and more. | ||
| </dd> | ||
| <dt><a href="https://docs.superviz.com/collaboration/integrations/YJS/overview">@superviz/yjs</a></dt> | ||
@@ -251,0 +255,0 @@ <dd> |
+2
-1
@@ -123,3 +123,4 @@ /** eslint-env browser */ | ||
| readIdSet, | ||
| decodeIdMap | ||
| decodeIdMap, | ||
| diffDocsToDelta | ||
| } from './internals.js' | ||
@@ -126,0 +127,0 @@ |
+1
-0
@@ -21,2 +21,3 @@ export * from './utils/AbstractConnector.js' | ||
| export * from './utils/AttributionManager.js' | ||
| export * from './utils/delta-helpers.js' | ||
@@ -23,0 +24,0 @@ export * from './types/AbstractType.js' |
@@ -1354,3 +1354,3 @@ import { | ||
| } else { | ||
| attrsToRender.forEach(key => renderAttrs(/** @type {Item} */ (parent._map.get(key)), key)) | ||
| attrsToRender.forEach(key => key != null && renderAttrs(/** @type {Item} */ (parent._map.get(key)), key)) | ||
| } | ||
@@ -1357,0 +1357,0 @@ } |
| 'use strict'; | ||
| var Skip = require('./Skip-vvIEGjAV.js'); | ||
| require('lib0/function'); | ||
| require('lib0/decoding'); | ||
| require('lib0/binary'); | ||
| require('lib0/map'); | ||
| /** eslint-env browser */ | ||
| 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; | ||
| var Y = /*#__PURE__*/Object.freeze({ | ||
| __proto__: null, | ||
| AbsolutePosition: Skip.AbsolutePosition, | ||
| AbstractAttributionManager: Skip.AbstractAttributionManager, | ||
| AbstractConnector: Skip.AbstractConnector, | ||
| AbstractStruct: Skip.AbstractStruct, | ||
| AbstractType: Skip.AbstractType, | ||
| Array: Skip.YArray, | ||
| Attribution: Skip.AttributionItem, | ||
| ContentAny: Skip.ContentAny, | ||
| ContentBinary: Skip.ContentBinary, | ||
| ContentDeleted: Skip.ContentDeleted, | ||
| ContentDoc: Skip.ContentDoc, | ||
| ContentEmbed: Skip.ContentEmbed, | ||
| ContentFormat: Skip.ContentFormat, | ||
| ContentJSON: Skip.ContentJSON, | ||
| ContentString: Skip.ContentString, | ||
| ContentType: Skip.ContentType, | ||
| DiffAttributionManager: Skip.DiffAttributionManager, | ||
| Doc: Skip.Doc, | ||
| GC: Skip.GC, | ||
| ID: Skip.ID, | ||
| IdMap: Skip.IdMap, | ||
| IdSet: Skip.IdSet, | ||
| Item: Skip.Item, | ||
| Map: Skip.YMap, | ||
| RelativePosition: Skip.RelativePosition, | ||
| Skip: Skip.Skip, | ||
| Snapshot: Skip.Snapshot, | ||
| Text: Skip.YText, | ||
| Transaction: Skip.Transaction, | ||
| TwosetAttributionManager: Skip.TwosetAttributionManager, | ||
| UndoManager: Skip.UndoManager, | ||
| UpdateDecoderV1: Skip.UpdateDecoderV1, | ||
| UpdateDecoderV2: Skip.UpdateDecoderV2, | ||
| UpdateEncoderV1: Skip.UpdateEncoderV1, | ||
| UpdateEncoderV2: Skip.UpdateEncoderV2, | ||
| XmlElement: Skip.YXmlElement, | ||
| XmlFragment: Skip.YXmlFragment, | ||
| XmlHook: Skip.YXmlHook, | ||
| XmlText: Skip.YXmlText, | ||
| YEvent: Skip.YEvent, | ||
| applyUpdate: Skip.applyUpdate, | ||
| applyUpdateV2: Skip.applyUpdateV2, | ||
| cleanupYTextFormatting: Skip.cleanupYTextFormatting, | ||
| cloneDoc: Skip.cloneDoc, | ||
| compareIDs: Skip.compareIDs, | ||
| compareRelativePositions: Skip.compareRelativePositions, | ||
| convertUpdateFormatV1ToV2: Skip.convertUpdateFormatV1ToV2, | ||
| convertUpdateFormatV2ToV1: Skip.convertUpdateFormatV2ToV1, | ||
| createAbsolutePositionFromRelativePosition: Skip.createAbsolutePositionFromRelativePosition, | ||
| createAttributionItem: Skip.createAttributionItem, | ||
| createAttributionManagerFromDiff: Skip.createAttributionManagerFromDiff, | ||
| createDeleteSetFromStructStore: Skip.createDeleteSetFromStructStore, | ||
| createDocFromSnapshot: Skip.createDocFromSnapshot, | ||
| createID: Skip.createID, | ||
| createIdMap: Skip.createIdMap, | ||
| createIdMapFromIdSet: Skip.createIdMapFromIdSet, | ||
| createIdSet: Skip.createIdSet, | ||
| createInsertionSetFromStructStore: Skip.createInsertSetFromStructStore, | ||
| createRelativePositionFromJSON: Skip.createRelativePositionFromJSON, | ||
| createRelativePositionFromTypeIndex: Skip.createRelativePositionFromTypeIndex, | ||
| createSnapshot: Skip.createSnapshot, | ||
| decodeIdMap: Skip.decodeIdMap, | ||
| decodeRelativePosition: Skip.decodeRelativePosition, | ||
| decodeSnapshot: Skip.decodeSnapshot, | ||
| decodeSnapshotV2: Skip.decodeSnapshotV2, | ||
| decodeStateVector: Skip.decodeStateVector, | ||
| decodeUpdate: Skip.decodeUpdate, | ||
| decodeUpdateV2: Skip.decodeUpdateV2, | ||
| diffIdMap: Skip.diffIdMap, | ||
| diffIdSet: Skip.diffIdSet, | ||
| diffUpdate: Skip.diffUpdate, | ||
| diffUpdateV2: Skip.diffUpdateV2, | ||
| emptySnapshot: Skip.emptySnapshot, | ||
| encodeIdMap: Skip.encodeIdMap, | ||
| encodeRelativePosition: Skip.encodeRelativePosition, | ||
| encodeSnapshot: Skip.encodeSnapshot, | ||
| encodeSnapshotV2: Skip.encodeSnapshotV2, | ||
| encodeStateAsUpdate: Skip.encodeStateAsUpdate, | ||
| encodeStateAsUpdateV2: Skip.encodeStateAsUpdateV2, | ||
| encodeStateVector: Skip.encodeStateVector, | ||
| encodeStateVectorFromUpdate: Skip.encodeStateVectorFromUpdate, | ||
| encodeStateVectorFromUpdateV2: Skip.encodeStateVectorFromUpdateV2, | ||
| equalIdSets: Skip.equalIdSets, | ||
| equalSnapshots: Skip.equalSnapshots, | ||
| findIndexSS: Skip.findIndexSS, | ||
| findRootTypeKey: Skip.findRootTypeKey, | ||
| getItem: Skip.getItem, | ||
| getItemCleanEnd: Skip.getItemCleanEnd, | ||
| getItemCleanStart: Skip.getItemCleanStart, | ||
| getState: Skip.getState, | ||
| getTypeChildren: Skip.getTypeChildren, | ||
| insertIntoIdMap: Skip.insertIntoIdMap, | ||
| insertIntoIdSet: Skip.insertIntoIdSet, | ||
| isParentOf: Skip.isParentOf, | ||
| iterateStructsByIdSet: Skip.iterateStructsByIdSet, | ||
| logType: Skip.logType, | ||
| logUpdate: Skip.logUpdate, | ||
| logUpdateV2: Skip.logUpdateV2, | ||
| mergeIdMaps: Skip.mergeIdMaps, | ||
| mergeIdSets: Skip.mergeIdSets, | ||
| mergeUpdates: Skip.mergeUpdates, | ||
| mergeUpdatesV2: Skip.mergeUpdatesV2, | ||
| noAttributionsManager: Skip.noAttributionsManager, | ||
| obfuscateUpdate: Skip.obfuscateUpdate, | ||
| obfuscateUpdateV2: Skip.obfuscateUpdateV2, | ||
| readIdMap: Skip.readIdMap, | ||
| readIdSet: Skip.readIdSet, | ||
| readUpdate: Skip.readUpdate, | ||
| readUpdateIdRanges: Skip.readUpdateIdRanges, | ||
| readUpdateIdRangesV2: Skip.readUpdateIdRangesV2, | ||
| readUpdateV2: Skip.readUpdateV2, | ||
| relativePositionToJSON: Skip.relativePositionToJSON, | ||
| snapshot: Skip.snapshot, | ||
| snapshotContainsUpdate: Skip.snapshotContainsUpdate, | ||
| transact: Skip.transact, | ||
| tryGc: Skip.tryGc, | ||
| typeListToArraySnapshot: Skip.typeListToArraySnapshot, | ||
| typeMapGetAllSnapshot: Skip.typeMapGetAllSnapshot, | ||
| typeMapGetSnapshot: Skip.typeMapGetSnapshot | ||
| }); | ||
| exports.Y = Y; | ||
| //# sourceMappingURL=index-BQN5CtgT.js.map |
| {"version":3,"file":"index-BQN5CtgT.js","sources":["../src/index.js"],"sourcesContent":["/** eslint-env browser */\n\nexport {\n Doc,\n Transaction,\n YArray as Array,\n YMap as Map,\n YText as Text,\n YXmlText as XmlText,\n YXmlHook as XmlHook,\n YXmlElement as XmlElement,\n YXmlFragment as XmlFragment,\n YEvent,\n Item,\n AbstractStruct,\n GC,\n Skip,\n ContentBinary,\n ContentDeleted,\n ContentDoc,\n ContentEmbed,\n ContentFormat,\n ContentJSON,\n ContentAny,\n ContentString,\n ContentType,\n AbstractType,\n getTypeChildren,\n createRelativePositionFromTypeIndex,\n createRelativePositionFromJSON,\n createAbsolutePositionFromRelativePosition,\n compareRelativePositions,\n AbsolutePosition,\n RelativePosition,\n ID,\n createID,\n compareIDs,\n getState,\n Snapshot,\n createSnapshot,\n cleanupYTextFormatting,\n snapshot,\n emptySnapshot,\n findRootTypeKey,\n findIndexSS,\n getItem,\n getItemCleanStart,\n getItemCleanEnd,\n typeListToArraySnapshot,\n typeMapGetSnapshot,\n typeMapGetAllSnapshot,\n createDocFromSnapshot,\n applyUpdate,\n applyUpdateV2,\n readUpdate,\n readUpdateV2,\n encodeStateAsUpdate,\n encodeStateAsUpdateV2,\n encodeStateVector,\n UndoManager,\n decodeSnapshot,\n encodeSnapshot,\n decodeSnapshotV2,\n encodeSnapshotV2,\n decodeStateVector,\n logUpdate,\n logUpdateV2,\n decodeUpdate,\n decodeUpdateV2,\n relativePositionToJSON,\n isParentOf,\n equalSnapshots,\n tryGc,\n transact,\n AbstractConnector,\n logType,\n mergeUpdates,\n mergeUpdatesV2,\n encodeStateVectorFromUpdate,\n encodeStateVectorFromUpdateV2,\n encodeRelativePosition,\n decodeRelativePosition,\n diffUpdate,\n diffUpdateV2,\n convertUpdateFormatV1ToV2,\n convertUpdateFormatV2ToV1,\n obfuscateUpdate,\n obfuscateUpdateV2,\n UpdateEncoderV1,\n UpdateEncoderV2,\n UpdateDecoderV1,\n UpdateDecoderV2,\n snapshotContainsUpdate,\n // idset\n IdSet,\n equalIdSets,\n createDeleteSetFromStructStore,\n IdMap,\n createIdMap,\n createAttributionItem,\n createInsertSetFromStructStore as createInsertionSetFromStructStore,\n diffIdMap,\n diffIdSet,\n AttributionItem as Attribution,\n encodeIdMap,\n createIdMapFromIdSet,\n TwosetAttributionManager,\n noAttributionsManager,\n AbstractAttributionManager,\n iterateStructsByIdSet,\n createAttributionManagerFromDiff,\n DiffAttributionManager,\n createIdSet,\n mergeIdSets,\n cloneDoc,\n readUpdateIdRanges,\n readUpdateIdRangesV2,\n insertIntoIdMap,\n insertIntoIdSet,\n mergeIdMaps,\n readIdMap,\n readIdSet,\n decodeIdMap\n} from './internals.js'\n\nconst glo = /** @type {any} */ (typeof globalThis !== 'undefined'\n ? globalThis\n : typeof window !== 'undefined'\n ? window\n // @ts-ignore\n : typeof global !== 'undefined' ? global : {})\n\nconst importIdentifier = '__ $YJS$ __'\n\nif (glo[importIdentifier] === true) {\n /**\n * Dear reader of this message. Please take this seriously.\n *\n * If you see this message, make sure that you only import one version of Yjs. In many cases,\n * your package manager installs two versions of Yjs that are used by different packages within your project.\n * Another reason for this message is that some parts of your project use the commonjs version of Yjs\n * and others use the EcmaScript version of Yjs.\n *\n * This often leads to issues that are hard to debug. We often need to perform constructor checks,\n * e.g. `struct instanceof GC`. If you imported different versions of Yjs, it is impossible for us to\n * do the constructor checks anymore - which might break the CRDT algorithm.\n *\n * https://github.com/yjs/yjs/issues/438\n */\n console.error('Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438')\n}\nglo[importIdentifier] = true\n"],"names":[],"mappings":";;;;;;;;AAAA;;;AA6HA,MAAM,GAAG,uBAAuB,OAAO,UAAU,KAAK;AACtD,IAAI;AACJ,IAAI,OAAO,MAAM,KAAK;AACtB,MAAM;AACN;AACA,MAAM,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,EAAE;;AAEjD,MAAM,gBAAgB,GAAG;;AAEzB,IAAI,GAAG,CAAC,gBAAgB,CAAC,KAAK,IAAI,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,KAAK,CAAC,2HAA2H;AAC3I;AACA,GAAG,CAAC,gBAAgB,CAAC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
| import { ah as AbsolutePosition, bF as AbstractAttributionManager, A as AbstractConnector, cx as AbstractStruct, bT as AbstractType, ce as YArray, bl as AttributionItem, cM as ContentAny, cA as ContentBinary, cC as ContentDeleted, cE as ContentDoc, cG as ContentEmbed, cI as ContentFormat, cK as ContentJSON, cO as ContentString, cY as ContentType, bJ as DiffAttributionManager, D as Doc, cz as GC, a6 as ID, bt as IdMap, b as IdSet, d3 as Item, cg as YMap, ae as RelativePosition, d8 as Skip, ar as Snapshot, cn as YText, aS as Transaction, bG as TwosetAttributionManager, aZ as UndoManager, U as UpdateDecoderV1, C as UpdateDecoderV2, F as UpdateEncoderV1, H as UpdateEncoderV2, cr as YXmlElement, cp as YXmlFragment, ct as YXmlHook, cv as YXmlText, bh as YEvent, Q as applyUpdate, P as applyUpdateV2, ck as cleanupYTextFormatting, y as cloneDoc, a7 as compareIDs, aq as compareRelativePositions, bf as convertUpdateFormatV1ToV2, bg as convertUpdateFormatV2ToV1, ap as createAbsolutePositionFromRelativePosition, bm as createAttributionItem, bK as createAttributionManagerFromDiff, q as createDeleteSetFromStructStore, aC as createDocFromSnapshot, a8 as createID, by as createIdMap, bs as createIdMapFromIdSet, p as createIdSet, s as createInsertSetFromStructStore, ag as createRelativePositionFromJSON, ak as createRelativePositionFromTypeIndex, ax as createSnapshot, bx as decodeIdMap, ao as decodeRelativePosition, aw as decodeSnapshot, av as decodeSnapshotV2, W as decodeStateVector, b1 as decodeUpdate, b2 as decodeUpdateV2, bA as diffIdMap, j as diffIdSet, bb as diffUpdate, ba as diffUpdateV2, ay as emptySnapshot, bv as encodeIdMap, am as encodeRelativePosition, au as encodeSnapshot, at as encodeSnapshotV2, T as encodeStateAsUpdate, S as encodeStateAsUpdateV2, $ as encodeStateVector, b6 as encodeStateVectorFromUpdate, b5 as encodeStateVectorFromUpdateV2, v as equalIdSets, as as equalSnapshots, aK as findIndexSS, ab as findRootTypeKey, aM as getItem, aP as getItemCleanEnd, aO as getItemCleanStart, aH as getState, bR as getTypeChildren, bz as insertIntoIdMap, g as insertIntoIdSet, ac as isParentOf, i as iterateStructsByIdSet, ad as logType, a$ as logUpdate, b0 as logUpdateV2, br as mergeIdMaps, m as mergeIdSets, b4 as mergeUpdates, b9 as mergeUpdatesV2, bI as noAttributionsManager, bd as obfuscateUpdate, be as obfuscateUpdateV2, bw as readIdMap, t as readIdSet, O as readUpdate, b8 as readUpdateIdRanges, b7 as readUpdateIdRangesV2, N as readUpdateV2, af as relativePositionToJSON, az as snapshot, aE as snapshotContainsUpdate, aX as transact, aW as tryGc, bX as typeListToArraySnapshot, cc as typeMapGetAllSnapshot, cb as typeMapGetSnapshot } from './Skip-CPEp7KWv.js'; | ||
| import 'lib0/function'; | ||
| import 'lib0/decoding'; | ||
| import 'lib0/binary'; | ||
| import 'lib0/map'; | ||
| /** eslint-env browser */ | ||
| 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; | ||
| var Y = /*#__PURE__*/Object.freeze({ | ||
| __proto__: null, | ||
| AbsolutePosition: AbsolutePosition, | ||
| AbstractAttributionManager: AbstractAttributionManager, | ||
| AbstractConnector: AbstractConnector, | ||
| AbstractStruct: AbstractStruct, | ||
| AbstractType: AbstractType, | ||
| Array: YArray, | ||
| Attribution: AttributionItem, | ||
| ContentAny: ContentAny, | ||
| ContentBinary: ContentBinary, | ||
| ContentDeleted: ContentDeleted, | ||
| ContentDoc: ContentDoc, | ||
| ContentEmbed: ContentEmbed, | ||
| ContentFormat: ContentFormat, | ||
| ContentJSON: ContentJSON, | ||
| ContentString: ContentString, | ||
| ContentType: ContentType, | ||
| DiffAttributionManager: DiffAttributionManager, | ||
| Doc: Doc, | ||
| GC: GC, | ||
| ID: ID, | ||
| IdMap: IdMap, | ||
| IdSet: IdSet, | ||
| Item: Item, | ||
| Map: YMap, | ||
| RelativePosition: RelativePosition, | ||
| Skip: Skip, | ||
| Snapshot: Snapshot, | ||
| Text: YText, | ||
| Transaction: Transaction, | ||
| TwosetAttributionManager: TwosetAttributionManager, | ||
| UndoManager: UndoManager, | ||
| UpdateDecoderV1: UpdateDecoderV1, | ||
| UpdateDecoderV2: UpdateDecoderV2, | ||
| UpdateEncoderV1: UpdateEncoderV1, | ||
| UpdateEncoderV2: UpdateEncoderV2, | ||
| XmlElement: YXmlElement, | ||
| XmlFragment: YXmlFragment, | ||
| XmlHook: YXmlHook, | ||
| XmlText: YXmlText, | ||
| YEvent: YEvent, | ||
| applyUpdate: applyUpdate, | ||
| applyUpdateV2: applyUpdateV2, | ||
| cleanupYTextFormatting: cleanupYTextFormatting, | ||
| cloneDoc: cloneDoc, | ||
| compareIDs: compareIDs, | ||
| compareRelativePositions: compareRelativePositions, | ||
| convertUpdateFormatV1ToV2: convertUpdateFormatV1ToV2, | ||
| convertUpdateFormatV2ToV1: convertUpdateFormatV2ToV1, | ||
| createAbsolutePositionFromRelativePosition: createAbsolutePositionFromRelativePosition, | ||
| createAttributionItem: createAttributionItem, | ||
| createAttributionManagerFromDiff: createAttributionManagerFromDiff, | ||
| createDeleteSetFromStructStore: createDeleteSetFromStructStore, | ||
| createDocFromSnapshot: createDocFromSnapshot, | ||
| createID: createID, | ||
| createIdMap: createIdMap, | ||
| createIdMapFromIdSet: createIdMapFromIdSet, | ||
| createIdSet: createIdSet, | ||
| createInsertionSetFromStructStore: createInsertSetFromStructStore, | ||
| createRelativePositionFromJSON: createRelativePositionFromJSON, | ||
| createRelativePositionFromTypeIndex: createRelativePositionFromTypeIndex, | ||
| createSnapshot: createSnapshot, | ||
| decodeIdMap: decodeIdMap, | ||
| decodeRelativePosition: decodeRelativePosition, | ||
| decodeSnapshot: decodeSnapshot, | ||
| decodeSnapshotV2: decodeSnapshotV2, | ||
| decodeStateVector: decodeStateVector, | ||
| decodeUpdate: decodeUpdate, | ||
| decodeUpdateV2: decodeUpdateV2, | ||
| diffIdMap: diffIdMap, | ||
| diffIdSet: diffIdSet, | ||
| diffUpdate: diffUpdate, | ||
| diffUpdateV2: diffUpdateV2, | ||
| emptySnapshot: emptySnapshot, | ||
| encodeIdMap: encodeIdMap, | ||
| encodeRelativePosition: encodeRelativePosition, | ||
| encodeSnapshot: encodeSnapshot, | ||
| encodeSnapshotV2: encodeSnapshotV2, | ||
| encodeStateAsUpdate: encodeStateAsUpdate, | ||
| encodeStateAsUpdateV2: encodeStateAsUpdateV2, | ||
| encodeStateVector: encodeStateVector, | ||
| encodeStateVectorFromUpdate: encodeStateVectorFromUpdate, | ||
| encodeStateVectorFromUpdateV2: encodeStateVectorFromUpdateV2, | ||
| equalIdSets: equalIdSets, | ||
| equalSnapshots: equalSnapshots, | ||
| findIndexSS: findIndexSS, | ||
| findRootTypeKey: findRootTypeKey, | ||
| getItem: getItem, | ||
| getItemCleanEnd: getItemCleanEnd, | ||
| getItemCleanStart: getItemCleanStart, | ||
| getState: getState, | ||
| getTypeChildren: getTypeChildren, | ||
| insertIntoIdMap: insertIntoIdMap, | ||
| insertIntoIdSet: insertIntoIdSet, | ||
| isParentOf: isParentOf, | ||
| iterateStructsByIdSet: iterateStructsByIdSet, | ||
| logType: logType, | ||
| logUpdate: logUpdate, | ||
| logUpdateV2: logUpdateV2, | ||
| mergeIdMaps: mergeIdMaps, | ||
| mergeIdSets: mergeIdSets, | ||
| mergeUpdates: mergeUpdates, | ||
| mergeUpdatesV2: mergeUpdatesV2, | ||
| noAttributionsManager: noAttributionsManager, | ||
| obfuscateUpdate: obfuscateUpdate, | ||
| obfuscateUpdateV2: obfuscateUpdateV2, | ||
| readIdMap: readIdMap, | ||
| readIdSet: readIdSet, | ||
| readUpdate: readUpdate, | ||
| readUpdateIdRanges: readUpdateIdRanges, | ||
| readUpdateIdRangesV2: readUpdateIdRangesV2, | ||
| readUpdateV2: readUpdateV2, | ||
| relativePositionToJSON: relativePositionToJSON, | ||
| snapshot: snapshot, | ||
| snapshotContainsUpdate: snapshotContainsUpdate, | ||
| transact: transact, | ||
| tryGc: tryGc, | ||
| typeListToArraySnapshot: typeListToArraySnapshot, | ||
| typeMapGetAllSnapshot: typeMapGetAllSnapshot, | ||
| typeMapGetSnapshot: typeMapGetSnapshot | ||
| }); | ||
| export { Y }; | ||
| //# sourceMappingURL=index-BQzo_pY0.js.map |
| {"version":3,"file":"index-BQzo_pY0.js","sources":["../src/index.js"],"sourcesContent":["/** eslint-env browser */\n\nexport {\n Doc,\n Transaction,\n YArray as Array,\n YMap as Map,\n YText as Text,\n YXmlText as XmlText,\n YXmlHook as XmlHook,\n YXmlElement as XmlElement,\n YXmlFragment as XmlFragment,\n YEvent,\n Item,\n AbstractStruct,\n GC,\n Skip,\n ContentBinary,\n ContentDeleted,\n ContentDoc,\n ContentEmbed,\n ContentFormat,\n ContentJSON,\n ContentAny,\n ContentString,\n ContentType,\n AbstractType,\n getTypeChildren,\n createRelativePositionFromTypeIndex,\n createRelativePositionFromJSON,\n createAbsolutePositionFromRelativePosition,\n compareRelativePositions,\n AbsolutePosition,\n RelativePosition,\n ID,\n createID,\n compareIDs,\n getState,\n Snapshot,\n createSnapshot,\n cleanupYTextFormatting,\n snapshot,\n emptySnapshot,\n findRootTypeKey,\n findIndexSS,\n getItem,\n getItemCleanStart,\n getItemCleanEnd,\n typeListToArraySnapshot,\n typeMapGetSnapshot,\n typeMapGetAllSnapshot,\n createDocFromSnapshot,\n applyUpdate,\n applyUpdateV2,\n readUpdate,\n readUpdateV2,\n encodeStateAsUpdate,\n encodeStateAsUpdateV2,\n encodeStateVector,\n UndoManager,\n decodeSnapshot,\n encodeSnapshot,\n decodeSnapshotV2,\n encodeSnapshotV2,\n decodeStateVector,\n logUpdate,\n logUpdateV2,\n decodeUpdate,\n decodeUpdateV2,\n relativePositionToJSON,\n isParentOf,\n equalSnapshots,\n tryGc,\n transact,\n AbstractConnector,\n logType,\n mergeUpdates,\n mergeUpdatesV2,\n encodeStateVectorFromUpdate,\n encodeStateVectorFromUpdateV2,\n encodeRelativePosition,\n decodeRelativePosition,\n diffUpdate,\n diffUpdateV2,\n convertUpdateFormatV1ToV2,\n convertUpdateFormatV2ToV1,\n obfuscateUpdate,\n obfuscateUpdateV2,\n UpdateEncoderV1,\n UpdateEncoderV2,\n UpdateDecoderV1,\n UpdateDecoderV2,\n snapshotContainsUpdate,\n // idset\n IdSet,\n equalIdSets,\n createDeleteSetFromStructStore,\n IdMap,\n createIdMap,\n createAttributionItem,\n createInsertSetFromStructStore as createInsertionSetFromStructStore,\n diffIdMap,\n diffIdSet,\n AttributionItem as Attribution,\n encodeIdMap,\n createIdMapFromIdSet,\n TwosetAttributionManager,\n noAttributionsManager,\n AbstractAttributionManager,\n iterateStructsByIdSet,\n createAttributionManagerFromDiff,\n DiffAttributionManager,\n createIdSet,\n mergeIdSets,\n cloneDoc,\n readUpdateIdRanges,\n readUpdateIdRangesV2,\n insertIntoIdMap,\n insertIntoIdSet,\n mergeIdMaps,\n readIdMap,\n readIdSet,\n decodeIdMap\n} from './internals.js'\n\nconst glo = /** @type {any} */ (typeof globalThis !== 'undefined'\n ? globalThis\n : typeof window !== 'undefined'\n ? window\n // @ts-ignore\n : typeof global !== 'undefined' ? global : {})\n\nconst importIdentifier = '__ $YJS$ __'\n\nif (glo[importIdentifier] === true) {\n /**\n * Dear reader of this message. Please take this seriously.\n *\n * If you see this message, make sure that you only import one version of Yjs. In many cases,\n * your package manager installs two versions of Yjs that are used by different packages within your project.\n * Another reason for this message is that some parts of your project use the commonjs version of Yjs\n * and others use the EcmaScript version of Yjs.\n *\n * This often leads to issues that are hard to debug. We often need to perform constructor checks,\n * e.g. `struct instanceof GC`. If you imported different versions of Yjs, it is impossible for us to\n * do the constructor checks anymore - which might break the CRDT algorithm.\n *\n * https://github.com/yjs/yjs/issues/438\n */\n console.error('Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438')\n}\nglo[importIdentifier] = true\n"],"names":[],"mappings":";;;;;;AAAA;;;AA6HA,MAAM,GAAG,uBAAuB,OAAO,UAAU,KAAK;AACtD,IAAI;AACJ,IAAI,OAAO,MAAM,KAAK;AACtB,MAAM;AACN;AACA,MAAM,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,EAAE;;AAEjD,MAAM,gBAAgB,GAAG;;AAEzB,IAAI,GAAG,CAAC,gBAAgB,CAAC,KAAK,IAAI,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,KAAK,CAAC,2HAA2H;AAC3I;AACA,GAAG,CAAC,gBAAgB,CAAC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
2886492
0.51%193
1.58%41582
0.36%1407
0.29%1
Infinity%