Comparing version 13.6.4 to 13.6.5
{ | ||
"name": "yjs", | ||
"version": "13.6.4", | ||
"version": "13.6.5", | ||
"description": "Shared Editing Library", | ||
@@ -5,0 +5,0 @@ "main": "./dist/yjs.cjs", |
@@ -94,2 +94,3 @@ | ||
| [Slate](https://github.com/ianstormtaylor/slate) | ✔ | [slate-yjs](https://github.com/bitphinix/slate-yjs) | [demo](https://bitphinix.github.io/slate-yjs-example) | | ||
| [BlockSuite](https://github.com/toeverything/blocksuite) | ✔ | (native) | [demo](https://blocksuite-toeverything.vercel.app/?init) | | ||
| [valtio](https://github.com/pmndrs/valtio) | | [valtio-yjs](https://github.com/dai-shi/valtio-yjs) | [demo](https://codesandbox.io/s/valtio-yjs-demo-ox3iy) | | ||
@@ -96,0 +97,0 @@ | [immer](https://github.com/immerjs/immer) | | [immer-yjs](https://github.com/sep2/immer-yjs) | [demo](https://codesandbox.io/s/immer-yjs-demo-6e0znb) | |
@@ -338,3 +338,3 @@ | ||
if (ds1.clients.size !== ds2.clients.size) return false | ||
ds1.clients.forEach((deleteItems1, client) => { | ||
for (const [client, deleteItems1] of ds1.clients.entries()) { | ||
const deleteItems2 = /** @type {Array<import('../internals.js').DeleteItem>} */ (ds2.clients.get(client)) | ||
@@ -349,4 +349,4 @@ if (deleteItems2 === undefined || deleteItems1.length !== deleteItems2.length) return false | ||
} | ||
}) | ||
} | ||
return true | ||
} |
@@ -278,26 +278,26 @@ | ||
// deep observe events | ||
transaction.changedParentTypes.forEach((events, type) => | ||
fs.push(() => { | ||
// We need to think about the possibility that the user transforms the | ||
// Y.Doc in the event. | ||
if (type._item === null || !type._item.deleted) { | ||
events = events | ||
.filter(event => | ||
event.target._item === null || !event.target._item.deleted | ||
) | ||
events | ||
.forEach(event => { | ||
event.currentTarget = type | ||
}) | ||
// sort events by path length so that top-level events are fired first. | ||
events | ||
.sort((event1, event2) => event1.path.length - event2.path.length) | ||
// We don't need to check for events.length | ||
// because we know it has at least one element | ||
callEventHandlerListeners(type._dEH, events, transaction) | ||
} | ||
}) | ||
) | ||
fs.push(() => doc.emit('afterTransaction', [transaction, doc])) | ||
transaction.changedParentTypes.forEach((events, type) => { | ||
// We need to think about the possibility that the user transforms the | ||
// Y.Doc in the event. | ||
if (type._dEH.l.length > 0 && (type._item === null || !type._item.deleted)) { | ||
events = events | ||
.filter(event => | ||
event.target._item === null || !event.target._item.deleted | ||
) | ||
events | ||
.forEach(event => { | ||
event.currentTarget = type | ||
// path is relative to the current target | ||
event._path = null | ||
}) | ||
// sort events by path length so that top-level events are fired first. | ||
events | ||
.sort((event1, event2) => event1.path.length - event2.path.length) | ||
// We don't need to check for events.length | ||
// because we know it has at least one element | ||
callEventHandlerListeners(type._dEH, events, transaction) | ||
} | ||
}) | ||
}) | ||
fs.push(() => doc.emit('afterTransaction', [transaction, doc])) | ||
callAll(fs, []) | ||
@@ -304,0 +304,0 @@ if (transaction._needFormattingCleanup) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2229082
1151