Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0c2b3347b | ||
|
|
6258ba1ce9 | ||
|
|
5a7ee74f68 | ||
|
|
29fb4a0aab | ||
|
|
4504196d5c | ||
|
|
0c8d29bfff | ||
|
|
43384e4148 | ||
|
|
a2b62b0a58 | ||
|
|
6febf51b1a |
@@ -15,6 +15,7 @@ suited for even large documents.
|
|||||||
|
|
||||||
* Demos: [https://github.com/yjs/yjs-demos](https://github.com/yjs/yjs-demos)
|
* Demos: [https://github.com/yjs/yjs-demos](https://github.com/yjs/yjs-demos)
|
||||||
* Discuss: [https://discuss.yjs.dev](https://discuss.yjs.dev)
|
* Discuss: [https://discuss.yjs.dev](https://discuss.yjs.dev)
|
||||||
|
* Chat: [Gitter](https://gitter.im/Yjs/community) | [Discord](https://discord.gg/T3nqMT6qbM)
|
||||||
* Benchmark Yjs vs. Automerge:
|
* Benchmark Yjs vs. Automerge:
|
||||||
[https://github.com/dmonad/crdt-benchmarks](https://github.com/dmonad/crdt-benchmarks)
|
[https://github.com/dmonad/crdt-benchmarks](https://github.com/dmonad/crdt-benchmarks)
|
||||||
* Podcast [**"Yjs Deep Dive into real time collaborative editing solutions":**](https://www.tag1consulting.com/blog/deep-dive-real-time-collaborative-editing-solutions-tagteamtalk-001-0)
|
* Podcast [**"Yjs Deep Dive into real time collaborative editing solutions":**](https://www.tag1consulting.com/blog/deep-dive-real-time-collaborative-editing-solutions-tagteamtalk-001-0)
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.5.37",
|
"version": "13.5.39",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.5.37",
|
"version": "13.5.39",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lib0": "^0.2.49"
|
"lib0": "^0.2.49"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.5.37",
|
"version": "13.5.39",
|
||||||
"description": "Shared Editing Library",
|
"description": "Shared Editing Library",
|
||||||
"main": "./dist/yjs.cjs",
|
"main": "./dist/yjs.cjs",
|
||||||
"module": "./dist/yjs.mjs",
|
"module": "./dist/yjs.mjs",
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
|
"types": "./dist/src/index.d.ts",
|
||||||
"import": "./dist/yjs.mjs",
|
"import": "./dist/yjs.mjs",
|
||||||
"require": "./dist/yjs.cjs"
|
"require": "./dist/yjs.cjs"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ export {
|
|||||||
diffUpdate,
|
diffUpdate,
|
||||||
diffUpdateV2,
|
diffUpdateV2,
|
||||||
convertUpdateFormatV1ToV2,
|
convertUpdateFormatV1ToV2,
|
||||||
convertUpdateFormatV2ToV1
|
convertUpdateFormatV2ToV1,
|
||||||
|
UpdateEncoderV1
|
||||||
} from './internals.js'
|
} from './internals.js'
|
||||||
|
|
||||||
const glo = /** @type {any} */ (typeof window !== 'undefined'
|
const glo = /** @type {any} */ (typeof window !== 'undefined'
|
||||||
@@ -101,9 +102,9 @@ const importIdentifier = '__ $YJS$ __'
|
|||||||
|
|
||||||
if (glo[importIdentifier] === true) {
|
if (glo[importIdentifier] === true) {
|
||||||
/**
|
/**
|
||||||
* Dear reader of this warning message. Please take this seriously.
|
* Dear reader of this message. Please take this seriously.
|
||||||
*
|
*
|
||||||
* If you see this message, please make sure that you only import one version of Yjs. In many cases,
|
* 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.
|
* 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
|
* 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.
|
* and others use the EcmaScript version of Yjs.
|
||||||
@@ -112,6 +113,6 @@ if (glo[importIdentifier] === true) {
|
|||||||
* e.g. `struct instanceof GC`. If you imported different versions of Yjs, it is impossible for us to
|
* 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.
|
* do the constructor checks anymore - which might break the CRDT algorithm.
|
||||||
*/
|
*/
|
||||||
console.warn('Yjs was already imported. Importing different versions of Yjs often leads to issues.')
|
console.error('Yjs was already imported. This breaks constructor checks and will lead to isssues!')
|
||||||
}
|
}
|
||||||
glo[importIdentifier] = true
|
glo[importIdentifier] = true
|
||||||
|
|||||||
@@ -195,12 +195,11 @@ export class UndoManager extends Observable {
|
|||||||
*/
|
*/
|
||||||
this.afterTransactionHandler = transaction => {
|
this.afterTransactionHandler = transaction => {
|
||||||
// Only track certain transactions
|
// Only track certain transactions
|
||||||
if (this.captureTransaction(transaction) && (
|
if (
|
||||||
|
!this.captureTransaction(transaction) ||
|
||||||
!this.scope.some(type => transaction.changedParentTypes.has(type)) ||
|
!this.scope.some(type => transaction.changedParentTypes.has(type)) ||
|
||||||
(
|
(!this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor)))
|
||||||
!this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor))
|
) {
|
||||||
)
|
|
||||||
)) {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const undoing = this.undoing
|
const undoing = this.undoing
|
||||||
|
|||||||
Reference in New Issue
Block a user