From 7bdf94167afea659d9df4a6ad9619aa93a7ad442 Mon Sep 17 00:00:00 2001 From: GQ Date: Mon, 31 Jul 2023 15:05:33 +0800 Subject: [PATCH 001/152] fix comment --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e1ee0903..d1accf24 100644 --- a/README.md +++ b/README.md @@ -1033,7 +1033,7 @@ doc.transact(() => { ytext.insert(0, 'abc') }, 41) undoManager.undo() -ytext.toString() // => '' (not tracked because 41 is not an instance of +ytext.toString() // => 'abc' (not tracked because 41 is not an instance of // `trackedTransactionorigins`) ytext.delete(0, 3) // revert change From 171d801e0a9167ec0485fda530a26c35b8a56b50 Mon Sep 17 00:00:00 2001 From: Jesse Jackson Date: Thu, 5 Oct 2023 00:41:48 -0500 Subject: [PATCH 002/152] docs(readme): fix typo Update link text for Swift bindings: from "yrb" to "yswift" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 199e926e..5ded062b 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ language bindings to other languages * [yrs](https://github.com/y-crdt/y-crdt/tree/main/yrs) - Rust interface * [ypy](https://github.com/y-crdt/ypy) - Python binding * [yrb](https://github.com/y-crdt/yrb) - Ruby binding - * [yrb](https://github.com/y-crdt/yswift) - Swift binding + * [yswift](https://github.com/y-crdt/yswift) - Swift binding * [yffi](https://github.com/y-crdt/y-crdt/tree/main/yffi) - C-FFI * [ywasm](https://github.com/y-crdt/y-crdt/tree/main/ywasm) - WASM binding * [ycs](https://github.com/yjs/ycs) - .Net compatible C# implementation. From e6afc51b849e2d40b483107b2d74ac96095827ef Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Sat, 7 Oct 2023 20:46:52 +0200 Subject: [PATCH 003/152] add documentation on V2 events --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 199e926e..a33cbc65 100644 --- a/README.md +++ b/README.md @@ -697,7 +697,8 @@ type. Doesn't log types that have not been defined (using on('update', function(updateMessage:Uint8Array, origin:any, Y.Doc):void)
Listen to document updates. Document updates must be transmitted to all other -peers. You can apply document updates in any order and multiple times. +peers. You can apply document updates in any order and multiple times. Use `updateV2` +to receive V2 events.
on('beforeTransaction', function(Y.Transaction, Y.Doc):void)
Emitted before each transaction.
@@ -822,8 +823,10 @@ Yjs implements two update formats. By default you are using the V1 update format You can opt-in into the V2 update format wich provides much better compression. It is not yet used by all providers. However, you can already use it if you are building your own provider. All below functions are available with the -suffix "V2". E.g. `Y.applyUpdate` ⇒ `Y.applyUpdateV2`. We also support conversion -functions between both formats: `Y.convertUpdateFormatV1ToV2` & `Y.convertUpdateFormatV2ToV1`. +suffix "V2". E.g. `Y.applyUpdate` ⇒ `Y.applyUpdateV2`. Also when listening to updates +you need to specifically need listen for V2 events e.g. `yDoc.on('updateV2', …)`. +We also support conversion functions between both formats: +`Y.convertUpdateFormatV1ToV2` & `Y.convertUpdateFormatV2ToV1`. #### Update API From e7572d61c6b3334bdfd77fe2100b0372d1d56107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 22 Oct 2023 11:03:25 +0200 Subject: [PATCH 004/152] Only emit "load" when sync is set to true --- src/utils/Doc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Doc.js b/src/utils/Doc.js index d07dd56e..ddde1d54 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -113,7 +113,7 @@ export class Doc extends Observable { this.whenSynced = provideSyncedPromise() } this.isSynced = isSynced === undefined || isSynced === true - if (!this.isLoaded) { + if (this.isSynced && !this.isLoaded) { this.emit('load', []) } }) From 25bef2308fc8ae2de0e762ce8b50fc8a908e1045 Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Wed, 25 Oct 2023 15:00:48 +0100 Subject: [PATCH 005/152] Fix typing of `Y.Map` iterators Signed-off-by: Andrew Haines --- src/types/YMap.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/types/YMap.js b/src/types/YMap.js index e2dd7a49..3e1a975e 100644 --- a/src/types/YMap.js +++ b/src/types/YMap.js @@ -41,7 +41,7 @@ export class YMapEvent extends YEvent { * A shared Map implementation. * * @extends AbstractType> - * @implements {Iterable} + * @implements {Iterable<[string, MapType]>} */ export class YMap extends AbstractType { /** @@ -152,7 +152,7 @@ export class YMap extends AbstractType { /** * Returns the values for each element in the YMap Type. * - * @return {IterableIterator} + * @return {IterableIterator} */ values () { return iterator.iteratorMap(createMapIterator(this._map), /** @param {any} v */ v => v[1].content.getContent()[v[1].length - 1]) @@ -161,10 +161,10 @@ export class YMap extends AbstractType { /** * Returns an Iterator of [key, value] pairs * - * @return {IterableIterator} + * @return {IterableIterator<[string, MapType]>} */ entries () { - return iterator.iteratorMap(createMapIterator(this._map), /** @param {any} v */ v => [v[0], v[1].content.getContent()[v[1].length - 1]]) + return iterator.iteratorMap(createMapIterator(this._map), /** @param {any} v */ v => /** @type {any} */ ([v[0], v[1].content.getContent()[v[1].length - 1]])) } /** @@ -183,7 +183,7 @@ export class YMap extends AbstractType { /** * Returns an Iterator of [key, value] pairs * - * @return {IterableIterator} + * @return {IterableIterator<[string, MapType]>} */ [Symbol.iterator] () { return this.entries() From f52569b8fa97c1e4c44599b06b160220b91f3f6a Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Mon, 30 Oct 2023 19:41:09 -0500 Subject: [PATCH 006/152] fix: remove unused if-statement check --- src/utils/encoding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/encoding.js b/src/utils/encoding.js index 83e1b91f..a86f7b42 100644 --- a/src/utils/encoding.js +++ b/src/utils/encoding.js @@ -251,7 +251,7 @@ const integrateStructs = (transaction, store, clientsStructRefs) => { return nextStructsTarget } let curStructsTarget = getNextStructTarget() - if (curStructsTarget === null && stack.length === 0) { + if (curStructsTarget === null) { return null } From e5f286cf897c216553b2f00332b2705e13efc357 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Mon, 6 Nov 2023 16:49:33 -0600 Subject: [PATCH 007/152] feat: expose some types --- src/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.js b/src/index.js index 781e8eb4..be7ca25e 100644 --- a/src/index.js +++ b/src/index.js @@ -18,8 +18,10 @@ export { Item, AbstractStruct, GC, + Skip, ContentBinary, ContentDeleted, + ContentDoc, ContentEmbed, ContentFormat, ContentJSON, @@ -93,6 +95,9 @@ export { obfuscateUpdate, obfuscateUpdateV2, UpdateEncoderV1, + UpdateEncoderV2, + UpdateDecoderV1, + UpdateDecoderV2, equalDeleteSets, snapshotContainsUpdate } from './internals.js' From a3d69bba729091121f7f58c1c0693c6736298dfe Mon Sep 17 00:00:00 2001 From: Siddhartha Gunti Date: Tue, 7 Nov 2023 18:54:22 +0530 Subject: [PATCH 008/152] Adding www.btw.so to the platforms who use Yjs Repo here: https://github.com/btw-so/btw --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 199e926e..da0ed4f6 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%2 * [LegendKeeper](https://legendkeeper.com) Collaborative campaign planner and worldbuilding app for tabletop RPGs. * [IllumiDesk](https://illumidesk.com/) Build courses and content with A.I. +* [btw](https://www.btw.so) Open-source Medium alternative ## Table of Contents From 37236fa31f9db3d9bd4d27aaba028713b2d1b98a Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 20 Nov 2023 12:39:51 +0100 Subject: [PATCH 009/152] update license. closes #471 --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index c8c5c6da..f55e8b48 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) -Copyright (c) 2014 - - Kevin Jahns . +Copyright (c) 2023 + - Kevin Jahns . - Chair of Computer Science 5 (Databases & Information Systems), RWTH Aachen University, Germany Permission is hereby granted, free of charge, to any person obtaining a copy From 9f8c55885f8cbacd0d5380a3dcd0d6129568f6ba Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 20 Nov 2023 12:46:12 +0100 Subject: [PATCH 010/152] update github workflow --- .github/workflows/node.js.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d7aaca98..023ba5d2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,16 +16,16 @@ jobs: strategy: matrix: - node-version: [16.x, 18.x] + node-version: [16.x, 20.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - run: npm ci - run: npm run lint - - run: npm run test-extensive + - run: npm run test env: CI: true From c2e70764004d6e485da41fa8ca8a384c541a3de1 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 20 Nov 2023 12:53:58 +0100 Subject: [PATCH 011/152] add iterator type checks --- tests/y-map.tests.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/y-map.tests.js b/tests/y-map.tests.js index 346bd746..70b3e3b1 100644 --- a/tests/y-map.tests.js +++ b/tests/y-map.tests.js @@ -8,6 +8,31 @@ import * as Y from '../src/index.js' import * as t from 'lib0/testing' import * as prng from 'lib0/prng' +/** + * @param {t.TestCase} _tc + */ +export const testIterators = _tc => { + const ydoc = new Y.Doc() + /** + * @type {Y.Map} + */ + const ymap = ydoc.getMap() + // we are only checking if the type assumptions are correct + /** + * @type {Array} + */ + const vals = Array.from(ymap.values()) + /** + * @type {Array<[string,number]>} + */ + const entries = Array.from(ymap.entries()) + /** + * @type {Array} + */ + const keys = Array.from(ymap.keys()) + console.log(vals, entries, keys) +} + /** * Computing event changes after transaction should result in an error. See yjs#539 * From 013b2b68868578b54ce88b37f5592dec538e0880 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 20 Nov 2023 12:56:27 +0100 Subject: [PATCH 012/152] 13.6.9 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e7e7879..89a6a501 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.8", + "version": "13.6.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.8", + "version": "13.6.9", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index eaeac95b..6fb61eec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.8", + "version": "13.6.9", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 2c0daeb0711042cc8f41f8c7010025516acff933 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 21 Nov 2023 12:24:21 +0100 Subject: [PATCH 013/152] implement snapshot API for yxml.getAttributes. implements #543 --- src/index.js | 1 + src/types/AbstractType.js | 28 ++++++++++++++++++++++++++++ src/types/YXmlElement.js | 8 +++++--- tests/snapshot.tests.js | 15 +++++++++++++++ 4 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index be7ca25e..ae96b747 100644 --- a/src/index.js +++ b/src/index.js @@ -52,6 +52,7 @@ export { getItem, typeListToArraySnapshot, typeMapGetSnapshot, + typeMapGetAllSnapshot, createDocFromSnapshot, iterateDeletedStructs, applyUpdate, diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 3163b8da..8aef5dc4 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -925,6 +925,34 @@ export const typeMapGetSnapshot = (parent, key, snapshot) => { return v !== null && isVisible(v, snapshot) ? v.content.getContent()[v.length - 1] : undefined } +/** + * @param {AbstractType} parent + * @param {Snapshot} snapshot + * @return {Object|number|null|Array|string|Uint8Array|AbstractType|undefined>} + * + * @private + * @function + */ +export const typeMapGetAllSnapshot = (parent, snapshot) => { + /** + * @type {Object} + */ + const res = {} + parent._map.forEach((value, key) => { + /** + * @type {Item|null} + */ + let v = value + while (v !== null && (!snapshot.sv.has(v.id.client) || v.id.clock >= (snapshot.sv.get(v.id.client) || 0))) { + v = v.left + } + if (v !== null && isVisible(v, snapshot)) { + res[key] = v.content.getContent()[v.length - 1] + } + }) + return res +} + /** * @param {Map} map * @return {IterableIterator>} diff --git a/src/types/YXmlElement.js b/src/types/YXmlElement.js index 92088cdd..7b18be69 100644 --- a/src/types/YXmlElement.js +++ b/src/types/YXmlElement.js @@ -8,9 +8,10 @@ import { typeMapSet, typeMapGet, typeMapGetAll, + typeMapGetAllSnapshot, typeListForEach, YXmlElementRefID, - YXmlText, ContentType, AbstractType, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Doc, Item // eslint-disable-line + Snapshot, YXmlText, ContentType, AbstractType, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Doc, Item // eslint-disable-line } from '../internals.js' /** @@ -192,12 +193,13 @@ export class YXmlElement extends YXmlFragment { /** * Returns all attribute name/value pairs in a JSON Object. * + * @param {Snapshot} [snapshot] * @return {{ [Key in Extract]?: KV[Key]}} A JSON Object that describes the attributes. * * @public */ - getAttributes () { - return /** @type {any} */ (typeMapGetAll(this)) + getAttributes (snapshot) { + return /** @type {any} */ (snapshot ? typeMapGetAllSnapshot(this, snapshot) : typeMapGetAll(this)) } /** diff --git a/tests/snapshot.tests.js b/tests/snapshot.tests.js index d72e7ba7..4f3ecd47 100644 --- a/tests/snapshot.tests.js +++ b/tests/snapshot.tests.js @@ -14,6 +14,21 @@ export const testBasic = _tc => { t.assert(restored.getText().toString() === 'world!') } +/** + * @param {t.TestCase} _tc + */ +export const testBasicXmlAttributes = _tc => { + const ydoc = new Y.Doc({ gc: false }) + const yxml = ydoc.getMap().set('el', new Y.XmlElement('div')) + const snapshot1 = Y.snapshot(ydoc) + yxml.setAttribute('a', '1') + const snapshot2 = Y.snapshot(ydoc) + yxml.setAttribute('a', '2') + t.compare(yxml.getAttributes(), { a: '2' }) + t.compare(yxml.getAttributes(snapshot2), { a: '1' }) + t.compare(yxml.getAttributes(snapshot1), {}) +} + /** * @param {t.TestCase} _tc */ From 1d4f2e5435116c2f437e6a2fefe2132fe5abaf81 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 21 Nov 2023 12:29:49 +0100 Subject: [PATCH 014/152] 13.6.10 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 89a6a501..41934864 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.9", + "version": "13.6.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.9", + "version": "13.6.10", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index 6fb61eec..bdefe320 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.9", + "version": "13.6.10", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 28ccd5e0dda2c819c8c96e534b88714f6322de5c Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 21 Nov 2023 19:55:29 +0100 Subject: [PATCH 015/152] add providers (also mention some y-crdt based providers) --- README.md | 67 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 95ce9e29..97e5557a 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,19 @@ and storing shared data for offline usage is quite a hassle. **Providers** manage all that for you and are the perfect starting point for your collaborative app. +> This list of providers is incomplete. Please open PRs to add your providers to +> this list! + +#### Connection Providers +
+
y-websocket
+
+A module that contains a simple websocket backend and a websocket client that +connects to that backend. The backend can be extended to persist updates in a +leveldb database. y-sweet and ypy-websocket (see below) are +compatible to the y-wesocket protocol. +
y-webrtc
Propagates document updates peer-to-peer using WebRTC. The peers exchange @@ -119,17 +131,22 @@ are available. Communication over the signaling servers can be encrypted by providing a shared secret, keeping the connection information and the shared document private.
-
y-websocket
+
@liveblocks/yjs
-A module that contains a simple websocket backend and a websocket client that -connects to that backend. The backend can be extended to persist updates in a -leveldb database. +Liveblocks Yjs provides a fully +hosted WebSocket infrastructure and persisted data store for Yjs +documents. No configuration or maintenance is required. It also features +Yjs webhook events, REST API to read and update Yjs documents, and a +browser DevTools extension.
-
y-indexeddb
+
y-sweet
-Efficiently persists document updates to the browsers indexeddb database. -The document is immediately available and only diffs need to be synced through the -network provider. +A standalone yjs server with persistence to S3 or filesystem. They offer a +cloud service as well. +
+
PartyKit
+
+Cloud service for building multiplayer apps.
y-libp2p
@@ -144,14 +161,6 @@ Also includes a peer-sync mechanism to catch up on missed updates. an append-only log of CRDT local updates (hypercore). Multifeed manages and sync hypercores and y-dat listens to changes and applies them to the Yjs document.
-
@liveblocks/yjs
-
-Liveblocks Yjs provides a fully -hosted WebSocket infrastructure and persisted data store for Yjs -documents. No configuration or maintenance is required. It also features -Yjs webhook events, REST API to read and update Yjs documents, and a -browser DevTools extension. -
Matrix-CRDT
Use Matrix as an off-the-shelf backend for @@ -160,17 +169,37 @@ Use Matrix as transport and storage of Yjs updates, so you can focus building your client app and Matrix can provide powerful features like Authentication, Authorization, Federation, hosting (self-hosting or SaaS) and even End-to-End Encryption (E2EE). -
+ +
yrb-actioncable
+
+An ActionCable companion for Yjs clients. There is a fitting +redis extension as well. +
+
ypy-websocket
+
+Websocket backend, written in Python. +
+
+ +#### Persistence Providers + +
+
y-indexeddb
+
+Efficiently persists document updates to the browsers indexeddb database. +The document is immediately available and only diffs need to be synced through the +network provider. +
y-mongodb-provider
Adds persistent storage to a server with MongoDB. Can be used with the y-websocket provider. -
+
@toeverything/y-indexeddb
Like y-indexeddb, but with sub-documents support and fully TypeScript. -
+
# Ports From fe36ffd122a6f2384293098afd52d2c0025fce2a Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 28 Nov 2023 16:22:37 +0100 Subject: [PATCH 016/152] add AWS Sagemaker, JupyterLab, JupyterCAD as users --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 97e5557a..a9ecabae 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,9 @@ on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%2 * [Slidebeamer](https://slidebeamer.com/) Presentation app. * [BlockSurvey](https://blocksurvey.io) End-to-end encryption for your forms/surveys. * [Skiff](https://skiff.org/) Private, decentralized workspace. +* [JupyterLab](https://jupyter.org/) Collaborative computational Notebooks +* [JupyterCad](https://jupytercad.readthedocs.io/en/latest/) Extension to + JupyterLab that enables collaborative editing of 3d FreeCAD Models. * [Hyperquery](https://hyperquery.ai/) A collaborative data workspace for sharing analyses, documentation, spreadsheets, and dashboards. * [Nosgestesclimat](https://nosgestesclimat.fr/groupe) The french carbon @@ -66,6 +69,8 @@ on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%2 worldbuilding app for tabletop RPGs. * [IllumiDesk](https://illumidesk.com/) Build courses and content with A.I. * [btw](https://www.btw.so) Open-source Medium alternative +* [AWS SageMaker](https://aws.amazon.com/sagemaker/) Tools for building Machine + Learning Models ## Table of Contents From 221cb81dbf6eb114cd7d55ac2cb8966f14e27eed Mon Sep 17 00:00:00 2001 From: Kevin Barrett Date: Thu, 30 Nov 2023 16:51:23 -0500 Subject: [PATCH 017/152] add screen.garden as user --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a9ecabae..75f9aca7 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%2 * [btw](https://www.btw.so) Open-source Medium alternative * [AWS SageMaker](https://aws.amazon.com/sagemaker/) Tools for building Machine Learning Models +* [screen.garden](https://screen.garden) Collaborative backend for PKM apps. ## Table of Contents From 77bd74127d6c6376fdc6bff20c9ee487704b5975 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 11 Dec 2023 16:37:23 +0100 Subject: [PATCH 018/152] Update who-is-using (Cargo.site) --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a9ecabae..74bac143 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,12 @@ on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%2 * [AFFiNE](https://affine.pro/) A local-first, privacy-first, open source knowledge base. 🏅 -* [Dynaboard](https://dynaboard.com/) Build web apps collaboratively. :star2: -* [Sana](https://sanalabs.com/) A learning platform with collaborative text - editing powered by Yjs. +* [Cargo](https://cargo.site/) Site builder for designers and artists :star2: +* [Gitbook](https://gitbook.com) Knowledge management for technical teams :star2: +* [Evernote](https://evernote.com) Note-taking app :star2: +* [Lessonspace](https://thelessonspace.com) Enterprise platform for virtual + classrooms and online training :star2: +* [Dynaboard](https://dynaboard.com/) Build web apps collaboratively. :star: * [Relm](https://www.relm.us/) A collaborative gameworld for teamwork and community. :star: * [Room.sh](https://room.sh/) A meeting application with integrated @@ -47,6 +50,8 @@ on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%2 Nimbus Web. :star: * [Pluxbox RadioManager](https://getradiomanager.com/) A web-based app to collaboratively organize radio broadcasts. :star: +* [Sana](https://sanalabs.com/) A learning platform with collaborative text + editing powered by Yjs. * [Serenity Notes](https://www.serenity.re/en/notes) End-to-end encrypted collaborative notes app. * [PRSM](https://prsm.uk/) Collaborative mind-mapping and system visualisation. *[(source)](https://github.com/micrology/prsm)* From cf78ce12b254569a134eeb342496745ee98fd695 Mon Sep 17 00:00:00 2001 From: lukasz jazwa Date: Thu, 14 Dec 2023 21:55:53 +0100 Subject: [PATCH 019/152] Updated readme.md with Professional Support section --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 74bac143..6041a79d 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,11 @@ Otherwise you can find help on our community [discussion board](https://discuss. Please contribute to the project financially - especially if your company relies on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=d42f2d)](https://github.com/sponsors/dmonad) +## Professional Support + +* [Support Contract with the Maintainer](https://github.com/sponsors/dmonad) - By contributing financially to the open-source Yjs project, you can receive professional support directly from the author. This includes the opportunity for weekly video calls to discuss your specific challenges. +* [Synergy Codes](https://synergycodes.com/yjs-services/) - Specializing in consulting and developing real-time collaborative editing solutions for visual apps, Synergy Codes focuses on interactive diagrams, complex graphs, charts, and various data visualization types. Their expertise empowers developers to build engaging and interactive visual experiences leveraging the power of Yjs. See their work in action at [Visual Collaboration Showcase](https://yjs-diagram.synergy.codes/). + ## Who is using Yjs * [AFFiNE](https://affine.pro/) A local-first, privacy-first, open source From 0241fd3c4080cc9d22bf364dd9a01a400b723cc7 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Sat, 23 Dec 2023 11:16:57 +0100 Subject: [PATCH 020/152] Update README.md with mobx-keystone binding --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 74bac143..52cc1a89 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ are implemented in separate modules. | [valtio](https://github.com/pmndrs/valtio) | | [valtio-yjs](https://github.com/dai-shi/valtio-yjs) | [demo](https://codesandbox.io/s/valtio-yjs-demo-ox3iy) | | [immer](https://github.com/immerjs/immer) | | [immer-yjs](https://github.com/sep2/immer-yjs) | [demo](https://codesandbox.io/s/immer-yjs-demo-6e0znb) | | React / Vue / Svelte / MobX | | [SyncedStore](https://syncedstore.org) | [demo](https://syncedstore.org/docs/react) | +| [mobx-keystone](https://mobx-keystone.js.org/) | | [mobx-keystone-yjs](https://github.com/xaviergonz/mobx-keystone/tree/master/packages/mobx-keystone-yjs) | [demo](https://mobx-keystone.js.org/examples/yjs-binding) | ### Providers From 7a8ca6eaa57bb328bf739157d60ffedef876f96f Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 15 Jan 2024 14:04:03 +0100 Subject: [PATCH 021/152] add linear as a user of Yjs --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4004a434..7c6552ae 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%2 * [btw](https://www.btw.so) Open-source Medium alternative * [AWS SageMaker](https://aws.amazon.com/sagemaker/) Tools for building Machine Learning Models +* [linear](https://linear.app) Streamline issues, projects, and product roadmaps. ## Table of Contents From 1cb52dc863e6fb6a7d87a775d9f7273b4404dbb7 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 21 Jan 2024 11:27:12 +0100 Subject: [PATCH 022/152] fix Y.Text formatting issue - closes #606 --- README.md | 13 +++++++++-- src/internals.js | 1 - src/structs/AbstractStruct.js | 1 - src/structs/ContentDeleted.js | 1 - src/structs/ContentDoc.js | 1 - src/structs/ContentEmbed.js | 1 - src/structs/ContentFormat.js | 1 - src/structs/ContentType.js | 1 - src/structs/GC.js | 1 - src/structs/Item.js | 1 - src/structs/Skip.js | 1 - src/types/AbstractType.js | 1 - src/types/YMap.js | 1 - src/types/YText.js | 22 +++++++++--------- src/types/YXmlEvent.js | 1 - src/types/YXmlHook.js | 1 - src/types/YXmlText.js | 1 - src/utils/AbstractConnector.js | 1 - src/utils/DeleteSet.js | 1 - src/utils/ID.js | 1 - src/utils/PermanentUserData.js | 1 - src/utils/RelativePosition.js | 1 - src/utils/Snapshot.js | 1 - src/utils/StructStore.js | 1 - src/utils/Transaction.js | 1 - src/utils/UpdateEncoder.js | 1 - src/utils/YEvent.js | 1 - src/utils/encoding.js | 1 - src/utils/isParentOf.js | 1 - src/utils/logging.js | 1 - src/utils/updates.js | 1 - tests/compatibility.tests.js | 1 - tests/doc.tests.js | 1 - tests/relativePositions.tests.js | 1 - tests/testHelper.js | 1 - tests/undo-redo.tests.js | 40 ++++++++++++++++++++++++++++++++ 36 files changed, 62 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 7c6552ae..6f85686b 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,17 @@ on Yjs. [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%2 ## Professional Support -* [Support Contract with the Maintainer](https://github.com/sponsors/dmonad) - By contributing financially to the open-source Yjs project, you can receive professional support directly from the author. This includes the opportunity for weekly video calls to discuss your specific challenges. -* [Synergy Codes](https://synergycodes.com/yjs-services/) - Specializing in consulting and developing real-time collaborative editing solutions for visual apps, Synergy Codes focuses on interactive diagrams, complex graphs, charts, and various data visualization types. Their expertise empowers developers to build engaging and interactive visual experiences leveraging the power of Yjs. See their work in action at [Visual Collaboration Showcase](https://yjs-diagram.synergy.codes/). +* [Support Contract with the Maintainer](https://github.com/sponsors/dmonad) - +By contributing financially to the open-source Yjs project, you can receive +professional support directly from the author. This includes the opportunity for +weekly video calls to discuss your specific challenges. +* [Synergy Codes](https://synergycodes.com/yjs-services/) - Specializing in +consulting and developing real-time collaborative editing solutions for visual +apps, Synergy Codes focuses on interactive diagrams, complex graphs, charts, and +various data visualization types. Their expertise empowers developers to build +engaging and interactive visual experiences leveraging the power of Yjs. See +their work in action at [Visual Collaboration +Showcase](https://yjs-diagram.synergy.codes/). ## Who is using Yjs diff --git a/src/internals.js b/src/internals.js index bc386f0a..cb2fcac8 100644 --- a/src/internals.js +++ b/src/internals.js @@ -1,4 +1,3 @@ - export * from './utils/AbstractConnector.js' export * from './utils/DeleteSet.js' export * from './utils/Doc.js' diff --git a/src/structs/AbstractStruct.js b/src/structs/AbstractStruct.js index 38457aef..ad000053 100644 --- a/src/structs/AbstractStruct.js +++ b/src/structs/AbstractStruct.js @@ -1,4 +1,3 @@ - import { UpdateEncoderV1, UpdateEncoderV2, ID, Transaction // eslint-disable-line } from '../internals.js' diff --git a/src/structs/ContentDeleted.js b/src/structs/ContentDeleted.js index 7225e1f6..917ba247 100644 --- a/src/structs/ContentDeleted.js +++ b/src/structs/ContentDeleted.js @@ -1,4 +1,3 @@ - import { addToDeleteSet, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Item, Transaction // eslint-disable-line diff --git a/src/structs/ContentDoc.js b/src/structs/ContentDoc.js index 2c3bf8a6..15836f51 100644 --- a/src/structs/ContentDoc.js +++ b/src/structs/ContentDoc.js @@ -1,4 +1,3 @@ - import { Doc, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Transaction, Item // eslint-disable-line } from '../internals.js' diff --git a/src/structs/ContentEmbed.js b/src/structs/ContentEmbed.js index a64c53fa..46fba375 100644 --- a/src/structs/ContentEmbed.js +++ b/src/structs/ContentEmbed.js @@ -1,4 +1,3 @@ - import { UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Item, Transaction // eslint-disable-line } from '../internals.js' diff --git a/src/structs/ContentFormat.js b/src/structs/ContentFormat.js index dbc06a53..eb2bd0ee 100644 --- a/src/structs/ContentFormat.js +++ b/src/structs/ContentFormat.js @@ -1,4 +1,3 @@ - import { YText, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Item, StructStore, Transaction // eslint-disable-line } from '../internals.js' diff --git a/src/structs/ContentType.js b/src/structs/ContentType.js index e9c11de1..630efeb3 100644 --- a/src/structs/ContentType.js +++ b/src/structs/ContentType.js @@ -1,4 +1,3 @@ - import { readYArray, readYMap, diff --git a/src/structs/GC.js b/src/structs/GC.js index 42d71f73..3c7cec0c 100644 --- a/src/structs/GC.js +++ b/src/structs/GC.js @@ -1,4 +1,3 @@ - import { AbstractStruct, addStruct, diff --git a/src/structs/Item.js b/src/structs/Item.js index c14778b3..1b7ba939 100644 --- a/src/structs/Item.js +++ b/src/structs/Item.js @@ -1,4 +1,3 @@ - import { GC, getState, diff --git a/src/structs/Skip.js b/src/structs/Skip.js index 3db2399d..3f7caafa 100644 --- a/src/structs/Skip.js +++ b/src/structs/Skip.js @@ -1,4 +1,3 @@ - import { AbstractStruct, UpdateEncoderV1, UpdateEncoderV2, StructStore, Transaction, ID // eslint-disable-line diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 8aef5dc4..4cc1bf8a 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -1,4 +1,3 @@ - import { removeEventHandlerListener, callEventHandlerListeners, diff --git a/src/types/YMap.js b/src/types/YMap.js index 3e1a975e..855ccb4f 100644 --- a/src/types/YMap.js +++ b/src/types/YMap.js @@ -1,4 +1,3 @@ - /** * @module YMap */ diff --git a/src/types/YText.js b/src/types/YText.js index 399a6ff3..c02ae6e5 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -1,4 +1,3 @@ - /** * @module YText */ @@ -118,14 +117,15 @@ const findNextPosition = (transaction, pos, count) => { * @param {Transaction} transaction * @param {AbstractType} parent * @param {number} index + * @param {boolean} useSearchMarker * @return {ItemTextListPosition} * * @private * @function */ -const findPosition = (transaction, parent, index) => { +const findPosition = (transaction, parent, index, useSearchMarker) => { const currentAttributes = new Map() - const marker = findMarker(parent, index) + const marker = useSearchMarker ? findMarker(parent, index) : null if (marker) { const pos = new ItemTextListPosition(marker.p.left, marker.p, marker.index, currentAttributes) return findNextPosition(transaction, pos, index - marker.index) @@ -1120,7 +1120,7 @@ export class YText extends AbstractType { const y = this.doc if (y !== null) { transact(y, transaction => { - const pos = findPosition(transaction, this, index) + const pos = findPosition(transaction, this, index, !attributes) if (!attributes) { attributes = {} // @ts-ignore @@ -1138,20 +1138,20 @@ export class YText extends AbstractType { * * @param {number} index The index to insert the embed at. * @param {Object | AbstractType} embed The Object that represents the embed. - * @param {TextAttributes} attributes Attribute information to apply on the + * @param {TextAttributes} [attributes] Attribute information to apply on the * embed * * @public */ - insertEmbed (index, embed, attributes = {}) { + insertEmbed (index, embed, attributes) { const y = this.doc if (y !== null) { transact(y, transaction => { - const pos = findPosition(transaction, this, index) - insertText(transaction, this, pos, embed, attributes) + const pos = findPosition(transaction, this, index, !attributes) + insertText(transaction, this, pos, embed, attributes || {}) }) } else { - /** @type {Array} */ (this._pending).push(() => this.insertEmbed(index, embed, attributes)) + /** @type {Array} */ (this._pending).push(() => this.insertEmbed(index, embed, attributes || {})) } } @@ -1170,7 +1170,7 @@ export class YText extends AbstractType { const y = this.doc if (y !== null) { transact(y, transaction => { - deleteText(transaction, findPosition(transaction, this, index), length) + deleteText(transaction, findPosition(transaction, this, index, true), length) }) } else { /** @type {Array} */ (this._pending).push(() => this.delete(index, length)) @@ -1194,7 +1194,7 @@ export class YText extends AbstractType { const y = this.doc if (y !== null) { transact(y, transaction => { - const pos = findPosition(transaction, this, index) + const pos = findPosition(transaction, this, index, false) if (pos.right === null) { return } diff --git a/src/types/YXmlEvent.js b/src/types/YXmlEvent.js index 3c2566ed..022b72d5 100644 --- a/src/types/YXmlEvent.js +++ b/src/types/YXmlEvent.js @@ -1,4 +1,3 @@ - import { YEvent, YXmlText, YXmlElement, YXmlFragment, Transaction // eslint-disable-line diff --git a/src/types/YXmlHook.js b/src/types/YXmlHook.js index be8c759b..c5b5ed6d 100644 --- a/src/types/YXmlHook.js +++ b/src/types/YXmlHook.js @@ -1,4 +1,3 @@ - import { YMap, YXmlHookRefID, diff --git a/src/types/YXmlText.js b/src/types/YXmlText.js index 470ce70f..413b247c 100644 --- a/src/types/YXmlText.js +++ b/src/types/YXmlText.js @@ -1,4 +1,3 @@ - import { YText, YXmlTextRefID, diff --git a/src/utils/AbstractConnector.js b/src/utils/AbstractConnector.js index ecf76a3b..5f544684 100644 --- a/src/utils/AbstractConnector.js +++ b/src/utils/AbstractConnector.js @@ -1,4 +1,3 @@ - import { Observable } from 'lib0/observable' import { diff --git a/src/utils/DeleteSet.js b/src/utils/DeleteSet.js index d3b3ad75..fe07b7ce 100644 --- a/src/utils/DeleteSet.js +++ b/src/utils/DeleteSet.js @@ -1,4 +1,3 @@ - import { findIndexSS, getState, diff --git a/src/utils/ID.js b/src/utils/ID.js index 225ee5b4..b0cabd8f 100644 --- a/src/utils/ID.js +++ b/src/utils/ID.js @@ -1,4 +1,3 @@ - import { AbstractType } from '../internals.js' // eslint-disable-line import * as decoding from 'lib0/decoding' diff --git a/src/utils/PermanentUserData.js b/src/utils/PermanentUserData.js index d9e44f12..80b71259 100644 --- a/src/utils/PermanentUserData.js +++ b/src/utils/PermanentUserData.js @@ -1,4 +1,3 @@ - import { YArray, YMap, diff --git a/src/utils/RelativePosition.js b/src/utils/RelativePosition.js index 614c0bc5..a1b4356b 100644 --- a/src/utils/RelativePosition.js +++ b/src/utils/RelativePosition.js @@ -1,4 +1,3 @@ - import { writeID, readID, diff --git a/src/utils/Snapshot.js b/src/utils/Snapshot.js index dfd82c86..777cd39d 100644 --- a/src/utils/Snapshot.js +++ b/src/utils/Snapshot.js @@ -1,4 +1,3 @@ - import { isDeleted, createDeleteSetFromStructStore, diff --git a/src/utils/StructStore.js b/src/utils/StructStore.js index 7a2e256c..55a85178 100644 --- a/src/utils/StructStore.js +++ b/src/utils/StructStore.js @@ -1,4 +1,3 @@ - import { GC, splitItem, diff --git a/src/utils/Transaction.js b/src/utils/Transaction.js index 5b93369f..c5931ab4 100644 --- a/src/utils/Transaction.js +++ b/src/utils/Transaction.js @@ -1,4 +1,3 @@ - import { getState, writeStructsFromTransaction, diff --git a/src/utils/UpdateEncoder.js b/src/utils/UpdateEncoder.js index e8c5d06c..8cf30381 100644 --- a/src/utils/UpdateEncoder.js +++ b/src/utils/UpdateEncoder.js @@ -1,4 +1,3 @@ - import * as error from 'lib0/error' import * as encoding from 'lib0/encoding' diff --git a/src/utils/YEvent.js b/src/utils/YEvent.js index b47d8c9a..13174148 100644 --- a/src/utils/YEvent.js +++ b/src/utils/YEvent.js @@ -1,4 +1,3 @@ - import { isDeleted, Item, AbstractType, Transaction, AbstractStruct // eslint-disable-line diff --git a/src/utils/encoding.js b/src/utils/encoding.js index a86f7b42..2277a140 100644 --- a/src/utils/encoding.js +++ b/src/utils/encoding.js @@ -1,4 +1,3 @@ - /** * @module encoding */ diff --git a/src/utils/isParentOf.js b/src/utils/isParentOf.js index d3012e24..d8f5a613 100644 --- a/src/utils/isParentOf.js +++ b/src/utils/isParentOf.js @@ -1,4 +1,3 @@ - import { AbstractType, Item } from '../internals.js' // eslint-disable-line /** diff --git a/src/utils/logging.js b/src/utils/logging.js index 37709763..989ac488 100644 --- a/src/utils/logging.js +++ b/src/utils/logging.js @@ -1,4 +1,3 @@ - import { AbstractType // eslint-disable-line } from '../internals.js' diff --git a/src/utils/updates.js b/src/utils/updates.js index c64ce355..fc40cd57 100644 --- a/src/utils/updates.js +++ b/src/utils/updates.js @@ -1,4 +1,3 @@ - import * as binary from 'lib0/binary' import * as decoding from 'lib0/decoding' import * as encoding from 'lib0/encoding' diff --git a/tests/compatibility.tests.js b/tests/compatibility.tests.js index 3a7ad4fe..fc71364c 100644 --- a/tests/compatibility.tests.js +++ b/tests/compatibility.tests.js @@ -1,4 +1,3 @@ - /** * Testing if encoding/decoding compatibility and integration compatiblity is given. * We expect that the document always looks the same, even if we upgrade the integration algorithm, or add additional encoding approaches. diff --git a/tests/doc.tests.js b/tests/doc.tests.js index 60524936..bb94819d 100644 --- a/tests/doc.tests.js +++ b/tests/doc.tests.js @@ -1,4 +1,3 @@ - import * as Y from '../src/index.js' import * as t from 'lib0/testing' diff --git a/tests/relativePositions.tests.js b/tests/relativePositions.tests.js index 817b9805..93fec230 100644 --- a/tests/relativePositions.tests.js +++ b/tests/relativePositions.tests.js @@ -1,4 +1,3 @@ - import * as Y from '../src/index.js' import * as t from 'lib0/testing' diff --git a/tests/testHelper.js b/tests/testHelper.js index f1ff4756..c74b7438 100644 --- a/tests/testHelper.js +++ b/tests/testHelper.js @@ -1,4 +1,3 @@ - import * as t from 'lib0/testing' import * as prng from 'lib0/prng' import * as encoding from 'lib0/encoding' diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index 1844af86..f1dbf428 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -3,6 +3,46 @@ import { init } from './testHelper.js' // eslint-disable-line import * as Y from '../src/index.js' import * as t from 'lib0/testing' +export const testInconsistentFormat = () => { + /** + * @param {Y.Doc} ydoc + */ + const testYjsMerge = ydoc => { + const content = /** @type {Y.XmlText} */ (ydoc.get('text', Y.XmlText)) + content.format(0, 6, { bold: null }) + content.format(6, 4, { type: 'text' }) + t.compare(content.toDelta(), [ + { + attributes: { type: 'text' }, + insert: 'Merge Test' + }, + { + attributes: { type: 'text', italic: true }, + insert: ' After' + } + ]) + } + const initializeYDoc = () => { + const yDoc = new Y.Doc({ gc: false }) + + const content = /** @type {Y.XmlText} */ (yDoc.get('text', Y.XmlText)) + content.insert(0, ' After', { type: 'text', italic: true }) + content.insert(0, 'Test', { type: 'text' }) + content.insert(0, 'Merge ', { type: 'text', bold: true }) + return yDoc + } + { + const yDoc = initializeYDoc() + testYjsMerge(yDoc) + } + { + const initialYDoc = initializeYDoc() + const yDoc = new Y.Doc({ gc: false }) + Y.applyUpdate(yDoc, Y.encodeStateAsUpdate(initialYDoc)) + testYjsMerge(yDoc) + } +} + /** * @param {t.TestCase} tc */ From 415a645874bd7757d98d5a7d4461cb35e29ebbde Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 21 Jan 2024 11:30:14 +0100 Subject: [PATCH 023/152] 13.6.11 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41934864..e07ca40b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.10", + "version": "13.6.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.10", + "version": "13.6.11", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index bdefe320..9bdb1055 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.10", + "version": "13.6.11", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 16d9638bc80384b833101eb06d51c1fd6016934f Mon Sep 17 00:00:00 2001 From: Raine Revere Date: Mon, 5 Feb 2024 13:24:11 +0000 Subject: [PATCH 024/152] Add ydoc.getXmlElement --- README.md | 2 ++ src/utils/Doc.js | 12 ++++++++++++ tests/y-xml.tests.js | 13 +++++++++++++ 3 files changed, 27 insertions(+) diff --git a/README.md b/README.md index 6f85686b..a8ebef99 100644 --- a/README.md +++ b/README.md @@ -739,6 +739,8 @@ type. Doesn't log types that have not been defined (using
Define a shared Y.Map type. Is equivalent to y.get(string, Y.Map).
getText(string):Y.Text
Define a shared Y.Text type. Is equivalent to y.get(string, Y.Text).
+ getXmlElement(string, string):Y.XmlElement +
Define a shared Y.XmlElement type. Is equivalent to y.get(string, Y.XmlElement).
getXmlFragment(string):Y.XmlFragment
Define a shared Y.XmlFragment type. Is equivalent to y.get(string, Y.XmlFragment).
on(string, function) diff --git a/src/utils/Doc.js b/src/utils/Doc.js index ddde1d54..e809e7ec 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -8,6 +8,7 @@ import { YArray, YText, YMap, + YXmlElement, YXmlFragment, transact, ContentDoc, Item, Transaction, YEvent // eslint-disable-line @@ -262,6 +263,17 @@ export class Doc extends Observable { return this.get(name, YMap) } + /** + * @param {string} [name] + * @return {YXmlElement} + * + * @public + */ + getXmlElement (name = '') { + // @ts-ignore + return this.get(name, YXmlElement) + } + /** * @param {string} [name] * @return {YXmlFragment} diff --git a/tests/y-xml.tests.js b/tests/y-xml.tests.js index 1ae2c813..22f12be9 100644 --- a/tests/y-xml.tests.js +++ b/tests/y-xml.tests.js @@ -210,3 +210,16 @@ export const testFormattingBug = _tc => { yxml.applyDelta(delta) t.compare(yxml.toDelta(), delta) } + +/** + * @param {t.TestCase} _tc + */ +export const testElement = _tc => { + const ydoc = new Y.Doc() + const yxmlel = ydoc.getXmlElement() + + const text1 = new Y.XmlText('text1') + const text2 = new Y.XmlText('text2') + yxmlel.insert(0, [text1, text2]) + t.compareArrays(yxmlel.toArray(), [text1, text2]) +} From e1bce03ed8d37898e6e7289d49e1e56da9ce821a Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 9 Feb 2024 23:27:24 +0100 Subject: [PATCH 025/152] better typings for ydoc.get --- src/types/YXmlElement.js | 2 +- src/utils/Doc.js | 22 +++++++++------------- tests/y-xml.tests.js | 2 -- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/types/YXmlElement.js b/src/types/YXmlElement.js index 7b18be69..1c1f3190 100644 --- a/src/types/YXmlElement.js +++ b/src/types/YXmlElement.js @@ -20,7 +20,7 @@ import { /** * An YXmlElement imitates the behavior of a - * {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}. + * https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element * * * An YXmlElement has attributes (key value pairs) * * An YXmlElement has childElements that must inherit from YXmlElement diff --git a/src/utils/Doc.js b/src/utils/Doc.js index e809e7ec..0d8d471b 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -181,6 +181,7 @@ export class Doc extends Observable { * Define all types right after the Yjs instance is created and store them in a separate object. * Also use the typed methods `getText(name)`, `getArray(name)`, .. * + * @template {typeof AbstractType} Type * @example * const y = new Y(..) * const appState = { @@ -189,12 +190,12 @@ export class Doc extends Observable { * } * * @param {string} name - * @param {Function} TypeConstructor The constructor of the type definition. E.g. Y.Text, Y.Array, Y.Map, ... - * @return {AbstractType} The created type. Constructed with TypeConstructor + * @param {Type} TypeConstructor The constructor of the type definition. E.g. Y.Text, Y.Array, Y.Map, ... + * @return {InstanceType} The created type. Constructed with TypeConstructor * * @public */ - get (name, TypeConstructor = AbstractType) { + get (name, TypeConstructor = /** @type {any} */ (AbstractType)) { const type = map.setIfUndefined(this.share, name, () => { // @ts-ignore const t = new TypeConstructor() @@ -220,12 +221,12 @@ export class Doc extends Observable { t._length = type._length this.share.set(name, t) t._integrate(this, null) - return t + return /** @type {InstanceType} */ (t) } else { throw new Error(`Type with the name ${name} has already been defined with a different constructor`) } } - return type + return /** @type {InstanceType} */ (type) } /** @@ -236,8 +237,7 @@ export class Doc extends Observable { * @public */ getArray (name = '') { - // @ts-ignore - return this.get(name, YArray) + return /** @type {YArray} */ (this.get(name, YArray)) } /** @@ -247,7 +247,6 @@ export class Doc extends Observable { * @public */ getText (name = '') { - // @ts-ignore return this.get(name, YText) } @@ -259,8 +258,7 @@ export class Doc extends Observable { * @public */ getMap (name = '') { - // @ts-ignore - return this.get(name, YMap) + return /** @type {YMap} */ (this.get(name, YMap)) } /** @@ -270,8 +268,7 @@ export class Doc extends Observable { * @public */ getXmlElement (name = '') { - // @ts-ignore - return this.get(name, YXmlElement) + return /** @type {YXmlElement<{[key:string]:string}>} */ (this.get(name, YXmlElement)) } /** @@ -281,7 +278,6 @@ export class Doc extends Observable { * @public */ getXmlFragment (name = '') { - // @ts-ignore return this.get(name, YXmlFragment) } diff --git a/tests/y-xml.tests.js b/tests/y-xml.tests.js index 22f12be9..a9395c2d 100644 --- a/tests/y-xml.tests.js +++ b/tests/y-xml.tests.js @@ -189,7 +189,6 @@ export const testClone = _tc => { const third = new Y.XmlElement('p') yxml.push([first, second, third]) t.compareArrays(yxml.toArray(), [first, second, third]) - const cloneYxml = yxml.clone() ydoc.getArray('copyarr').insert(0, [cloneYxml]) t.assert(cloneYxml.length === 3) @@ -217,7 +216,6 @@ export const testFormattingBug = _tc => { export const testElement = _tc => { const ydoc = new Y.Doc() const yxmlel = ydoc.getXmlElement() - const text1 = new Y.XmlText('text1') const text2 = new Y.XmlText('text2') yxmlel.insert(0, [text1, text2]) From ce06b2abec864e56628b3f408a4a274681a3321a Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 9 Feb 2024 23:31:07 +0100 Subject: [PATCH 026/152] update deps --- package-lock.json | 1121 ++++++++++++++++++++++++++++++--------------- 1 file changed, 742 insertions(+), 379 deletions(-) diff --git a/package-lock.json b/package-lock.json index e07ca40b..aefd16a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,35 +34,45 @@ "url": "https://github.com/sponsors/dmonad" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -70,9 +80,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz", - "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", + "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -102,6 +112,16 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/@eslint/eslintrc/node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -128,6 +148,18 @@ "node": ">= 4" } }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/eslintrc/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -135,15 +167,15 @@ "dev": true }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@rollup/plugin-commonjs": { - "version": "24.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.0.1.tgz", - "integrity": "sha512-15LsiWRZk4eOGqvrJyu3z3DaBu5BhXIMeWnijSRvd8irrrg9SHpQ1pH+BUK4H6Z9wL9yOxZJMTLU+Au86XHxow==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz", + "integrity": "sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -165,56 +197,16 @@ } } }, - "node_modules/@rollup/plugin-commonjs/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@rollup/plugin-commonjs/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@rollup/plugin-commonjs/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@rollup/plugin-node-resolve": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.1.tgz", - "integrity": "sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.0", + "is-builtin-module": "^3.2.1", "is-module": "^1.0.0", "resolve": "^1.22.1" }, @@ -222,7 +214,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.78.0||^3.0.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -231,9 +223,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "dev": true, "dependencies": { "@types/estree": "^1.0.0", @@ -244,7 +236,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -253,9 +245,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", - "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/json5": { @@ -265,9 +257,9 @@ "dev": true }, "node_modules/@types/linkify-it": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz", - "integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", + "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", "dev": true }, "node_modules/@types/markdown-it": { @@ -281,16 +273,19 @@ } }, "node_modules/@types/mdurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz", - "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", + "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", "dev": true }, "node_modules/@types/node": { - "version": "18.15.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.5.tgz", - "integrity": "sha512-Ark2WDjjZO7GmvsyFFf81MXuGTA/d6oP38anyxWOL6EREyBKAxKoFHwBhaZxCfLRLpO8JgVXwqOwSwa7jRcjew==", - "dev": true + "version": "18.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.15.tgz", + "integrity": "sha512-AMZ2UWx+woHNfM11PyAEQmfSxi05jm9OlkxczuHeEqmvwPkYj6MWv44gbzDPefYOLysTOFyI3ziiy2ONmUZfpA==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/resolve": { "version": "1.20.2", @@ -372,28 +367,31 @@ "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", "is-string": "^1.0.7" }, "engines": { @@ -404,14 +402,14 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -422,14 +420,14 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -439,6 +437,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -458,9 +478,9 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz", + "integrity": "sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==", "dev": true, "engines": { "node": ">= 0.4" @@ -497,13 +517,12 @@ "dev": true }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/builtin-modules": { @@ -519,13 +538,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz", + "integrity": "sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "set-function-length": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -773,12 +797,28 @@ "node": ">=0.10.0" } }, + "node_modules/define-data-property": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz", + "integrity": "sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.2", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -865,12 +905,13 @@ "dev": true }, "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, "dependencies": { - "ansi-colors": "^4.1.1" + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8.6" @@ -895,25 +936,26 @@ } }, "node_modules/es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.5", "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", "has-property-descriptors": "^1.0.0", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", + "hasown": "^2.0.0", "internal-slot": "^1.0.5", "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", @@ -921,19 +963,23 @@ "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" + "which-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -942,27 +988,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { @@ -1096,20 +1151,20 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", - "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, "dependencies": { "debug": "^3.2.7", - "is-core-module": "^2.11.0", - "resolve": "^1.22.1" + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, "node_modules/eslint-module-utils": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", - "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -1171,6 +1226,16 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" } }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint-plugin-import/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1192,6 +1257,18 @@ "node": ">=0.10.0" } }, + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint-plugin-import/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -1218,10 +1295,32 @@ "eslint": ">=5.16.0" } }, + "node_modules/eslint-plugin-node/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-node/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -1266,6 +1365,16 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7" } }, + "node_modules/eslint-plugin-react/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint-plugin-react/node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -1278,13 +1387,25 @@ "node": ">=0.10.0" } }, + "node_modules/eslint-plugin-react/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", - "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -1365,6 +1486,16 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1434,6 +1565,18 @@ "node": ">= 4" } }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1441,9 +1584,9 @@ "dev": true }, "node_modules/eslint/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -1600,12 +1743,13 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { @@ -1613,15 +1757,15 @@ } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, "funding": [ { @@ -1654,9 +1798,9 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -1668,21 +1812,24 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -1707,14 +1854,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1730,13 +1882,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -1746,20 +1899,19 @@ } }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -1832,13 +1984,10 @@ "dev": true }, "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, "engines": { "node": ">= 0.4.0" } @@ -1862,12 +2011,12 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "get-intrinsic": "^1.2.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1898,12 +2047,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -1912,6 +2061,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -2043,13 +2204,13 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -2057,14 +2218,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2132,12 +2295,12 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2289,16 +2452,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -2319,6 +2478,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2409,6 +2574,12 @@ "node": ">=8" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -2446,18 +2617,29 @@ "dev": true }, "node_modules/jsx-ast-utils": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", - "integrity": "sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", "dev": true, "dependencies": { - "array-includes": "^3.1.5", - "object.assign": "^4.1.3" + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" }, "engines": { "node": ">=4.0" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/klaw": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", @@ -2481,9 +2663,9 @@ } }, "node_modules/lib0": { - "version": "0.2.86", - "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.86.tgz", - "integrity": "sha512-kxigQTM4Q7NwJkEgdqQvU21qiR37twcqqLmh+/SbiGbRLfPlLVbHyY9sWp7PwXh0Xus9ELDSjsUOwcrdt5yZ4w==", + "version": "0.2.88", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.88.tgz", + "integrity": "sha512-KyroiEvCeZcZEMx5Ys+b4u4eEBbA1ch7XUaBhYpwa/nPMrzTjUhI4RfcytmQfYoTBPcdyx+FX6WFNIoNuJzJfQ==", "dependencies": { "isomorphic.js": "^0.2.4" }, @@ -2728,6 +2910,16 @@ "node": ">=10" } }, + "node_modules/markdownlint-cli/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/markdownlint-cli/node_modules/commander": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", @@ -2819,9 +3011,9 @@ } }, "node_modules/marked": { - "version": "4.2.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz", - "integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, "bin": { "marked": "bin/marked.js" @@ -2849,15 +3041,15 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=10" } }, "node_modules/minimist": { @@ -2924,9 +3116,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2942,13 +3134,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -2960,28 +3152,28 @@ } }, "node_modules/object.entries": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", - "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", + "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.fromentries": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", - "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -2991,27 +3183,27 @@ } }, "node_modules/object.hasown": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz", - "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz", + "integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==", "dev": true, "dependencies": { - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -3039,17 +3231,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -3355,18 +3547,18 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/qs": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", - "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "dev": true, "dependencies": { "side-channel": "^1.0.4" @@ -3459,14 +3651,14 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -3512,12 +3704,12 @@ } }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -3552,10 +3744,52 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/rollup": { - "version": "3.20.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.0.tgz", - "integrity": "sha512-YsIfrk80NqUDrxrjWPXUa7PWvAfegZEXHuPsEZg58fGCdjL1I9C1i/NaG+L+27kxxwkrG/QEDEQc8s/ynXWWGQ==", + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -3574,6 +3808,24 @@ "integrity": "sha512-Ue4ZB7Dzbn2I9sIj8ws536nOP2S53uypyCkCz9q0vlYD5Kn6/pu4dE+wt2ZfFzd9m73hiYKnnCb1OyKqc+MRkg==", "dev": true }, + "node_modules/safe-array-concat": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -3595,15 +3847,18 @@ ] }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3615,14 +3870,45 @@ "dev": true }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" } }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -3645,14 +3931,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", + "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3725,9 +4015,9 @@ } }, "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz", + "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==", "dev": true }, "node_modules/spdx-expression-parse": { @@ -3741,9 +4031,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", + "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", "dev": true }, "node_modules/sprintf-js": { @@ -3853,18 +4143,19 @@ } }, "node_modules/string.prototype.matchall": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", - "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", + "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.4.3", + "internal-slot": "^1.0.5", + "regexp.prototype.flags": "^1.5.0", + "set-function-name": "^2.0.0", "side-channel": "^1.0.4" }, "funding": { @@ -3872,14 +4163,14 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -3889,28 +4180,28 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4033,9 +4324,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", @@ -4074,6 +4365,57 @@ "node": ">=8" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.1.tgz", + "integrity": "sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typed-array-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", @@ -4128,6 +4470,12 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/union": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", @@ -4162,9 +4510,9 @@ "dev": true }, "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", + "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", "dev": true }, "node_modules/validate-npm-package-license": { @@ -4209,17 +4557,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", + "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.5", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "has-tostringtag": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -4228,15 +4575,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -4259,16 +4597,23 @@ "dev": true }, "node_modules/y-protocols": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/y-protocols/-/y-protocols-1.0.5.tgz", - "integrity": "sha512-Wil92b7cGk712lRHDqS4T90IczF6RkcvCwAD0A2OPg+adKmOe+nOiT/N2hvpQIWS3zfjmtL4CPaH5sIW1Hkm/A==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/y-protocols/-/y-protocols-1.0.6.tgz", + "integrity": "sha512-vHRF2L6iT3rwj1jub/K5tYcTT/mEYDUppgNPXwp8fmLpui9f7Yeq3OEtTLVF012j39QnV+KEQpNqoN7CWU7Y9Q==", "dev": true, "dependencies": { - "lib0": "^0.2.42" + "lib0": "^0.2.85" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=8.0.0" }, "funding": { "type": "GitHub Sponsors ❤", "url": "https://github.com/sponsors/dmonad" + }, + "peerDependencies": { + "yjs": "^13.0.0" } }, "node_modules/yallist": { @@ -4276,6 +4621,24 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true + }, + "node_modules/yjs": { + "version": "13.6.11", + "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.11.tgz", + "integrity": "sha512-FvRRJKX9u270dOLkllGF/UDCWwmIv2Z+ucM4v1QO1TuxdmoiMnSUXH1HAcOKOrkBEhQtPTkxep7tD2DrQB+l0g==", + "dev": true, + "peer": true, + "dependencies": { + "lib0": "^0.2.86" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=8.0.0" + }, + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + } } } } From a8582442e31de4f185fc04b13935ceeb31354126 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 9 Feb 2024 23:38:50 +0100 Subject: [PATCH 027/152] 13.6.12 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index aefd16a0..e11d6c60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.11", + "version": "13.6.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.11", + "version": "13.6.12", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index 9bdb1055..d0133c49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.11", + "version": "13.6.12", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 009f6ab5510acf502e2459bef7852c61ad8cec34 Mon Sep 17 00:00:00 2001 From: MentalGear <2837147+MentalGear@users.noreply.github.com> Date: Sat, 17 Feb 2024 20:38:53 +0100 Subject: [PATCH 028/152] docs: fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a8ebef99..97d08cd5 100644 --- a/README.md +++ b/README.md @@ -878,7 +878,7 @@ ydoc2.getText().toString() // => "00000000000" #### Using V2 update format Yjs implements two update formats. By default you are using the V1 update format. -You can opt-in into the V2 update format wich provides much better compression. +You can opt-in into the V2 update format which provides much better compression. It is not yet used by all providers. However, you can already use it if you are building your own provider. All below functions are available with the suffix "V2". E.g. `Y.applyUpdate` ⇒ `Y.applyUpdateV2`. Also when listening to updates From 90a90ab010665216401543648ee5d0747b71b64e Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 20 Feb 2024 19:52:58 +0100 Subject: [PATCH 029/152] add y-fire to provider list #189 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a8ebef99..df66419a 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,10 @@ y-websocket provider.
Like y-indexeddb, but with sub-documents support and fully TypeScript.
+
y-fire
+
+A database and connection provider for Yjs based on Firestore. +
# Ports From 917261a1cedde3e762f0890f8132f9c31547d5b3 Mon Sep 17 00:00:00 2001 From: Myles J Date: Wed, 28 Feb 2024 23:58:37 +0000 Subject: [PATCH 030/152] Facilitate referencing UndoManager StackItem inside Type observers --- src/utils/UndoManager.js | 10 +++++++ tests/undo-redo.tests.js | 63 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index f6f13ee5..c0dca63d 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -191,6 +191,12 @@ export class UndoManager extends Observable { */ this.undoing = false this.redoing = false + /** + * The currently popped stack item if UndoManager.undoing or UndoManager.redoing + * + * @type {StackItem|null} + */ + this.doingStackItem = null this.lastChange = 0 this.ignoreRemoteMapChanges = ignoreRemoteMapChanges this.captureTimeout = captureTimeout @@ -331,10 +337,12 @@ export class UndoManager extends Observable { */ undo () { this.undoing = true + this.doingStackItem = array.last(this.undoStack) ?? null let res try { res = popStackItem(this, this.undoStack, 'undo') } finally { + this.doingStackItem = null this.undoing = false } return res @@ -347,10 +355,12 @@ export class UndoManager extends Observable { */ redo () { this.redoing = true + this.doingStackItem = array.last(this.redoStack) ?? null let res try { res = popStackItem(this, this.redoStack, 'redo') } finally { + this.doingStackItem = null this.redoing = false } return res diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index f1dbf428..82c98129 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -715,3 +715,66 @@ export const testUndoDeleteInMap = (tc) => { undoManager.undo() t.compare(map0.toJSON(), { a: 'a' }) } + +/** + * It should expose the StackItem being processed if undoing + * + * @param {t.TestCase} tc + */ +export const testUndoDoingStackItem = async (tc) => { + const doc = new Y.Doc() + const text = doc.getText('text') + const undoManager = new Y.UndoManager([text]) + + undoManager.on('stack-item-added', /** @param {any} event */ event => { + event.stackItem.meta.set('str', '42') + }) + + const meta = new Promise((resolve) => { + setTimeout(() => resolve('ABORTED'), 50) + text.observe((event) => { + const /** @type {Y.UndoManager} */ origin = event.transaction.origin + if (origin === undoManager && origin.undoing) { + resolve(origin.doingStackItem?.meta.get('str')) + } + }) + }) + + text.insert(0, 'abc') + undoManager.undo() + + t.compare(await meta, '42') + t.compare(undoManager.doingStackItem, null) +} + +/** + * It should expose the StackItem being processed if redoing + * + * @param {t.TestCase} tc + */ +export const testRedoDoingStackItem = async (tc) => { + const doc = new Y.Doc() + const text = doc.getText('text') + const undoManager = new Y.UndoManager([text]) + + undoManager.on('stack-item-added', /** @param {any} event */ event => { + event.stackItem.meta.set('str', '42') + }) + + const meta = new Promise(resolve => { + setTimeout(() => resolve('ABORTED'), 50) + text.observe((event) => { + const /** @type {Y.UndoManager} */ origin = event.transaction.origin + if (origin === undoManager && origin.redoing) { + resolve(origin.doingStackItem?.meta.get('str')) + } + }) + }) + + text.insert(0, 'abc') + undoManager.undo() + undoManager.redo() + + t.compare(await meta, '42') + t.compare(undoManager.doingStackItem, null) +} From 29fa60ccf9fd537352de088fdf362e7df25fa076 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 29 Feb 2024 14:46:43 +0100 Subject: [PATCH 031/152] [Undo] add UndoManager.currStackItem --- package.json | 3 +- src/utils/UndoManager.js | 22 +++++---------- tests/undo-redo.tests.js | 61 +++++++++------------------------------- 3 files changed, 23 insertions(+), 63 deletions(-) diff --git a/package.json b/package.json index d0133c49..16544493 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,10 @@ "url": "https://github.com/sponsors/dmonad" }, "scripts": { + "clean": "rm -rf dist docs", "test": "npm run dist && node ./dist/tests.cjs --repetition-time 50", "test-extensive": "npm run lint && npm run dist && node ./dist/tests.cjs --production --repetition-time 10000", - "dist": "rm -rf dist && rollup -c && tsc", + "dist": "npm run clean && rollup -c && tsc", "watch": "rollup -wc", "lint": "markdownlint README.md && standard && tsc", "docs": "rm -rf docs; jsdoc --configure ./.jsdoc.json --verbose --readme ./README.md --package ./package.json || true", diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index c0dca63d..16ccb7ae 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -52,11 +52,6 @@ const clearUndoManagerStackItem = (tr, um, stackItem) => { * @return {StackItem?} */ const popStackItem = (undoManager, stack, eventType) => { - /** - * Whether a change happened - * @type {StackItem?} - */ - let result = null /** * Keep a reference to the transaction so we can fire the event with the changedParentTypes * @type {any} @@ -65,7 +60,7 @@ const popStackItem = (undoManager, stack, eventType) => { const doc = undoManager.doc const scope = undoManager.scope transact(doc, transaction => { - while (stack.length > 0 && result === null) { + while (stack.length > 0 && undoManager.currStackItem === null) { const store = doc.store const stackItem = /** @type {StackItem} */ (stack.pop()) /** @@ -113,7 +108,7 @@ const popStackItem = (undoManager, stack, eventType) => { performedChange = true } } - result = performedChange ? stackItem : null + undoManager.currStackItem = performedChange ? stackItem : null } transaction.changed.forEach((subProps, type) => { // destroy search marker if necessary @@ -123,11 +118,12 @@ const popStackItem = (undoManager, stack, eventType) => { }) _tr = transaction }, undoManager) - if (result != null) { + if (undoManager.currStackItem != null) { const changedParentTypes = _tr.changedParentTypes - undoManager.emit('stack-item-popped', [{ stackItem: result, type: eventType, changedParentTypes }, undoManager]) + undoManager.emit('stack-item-popped', [{ stackItem: undoManager.currStackItem, type: eventType, changedParentTypes }, undoManager]) + undoManager.currStackItem = null } - return result + return undoManager.currStackItem } /** @@ -196,7 +192,7 @@ export class UndoManager extends Observable { * * @type {StackItem|null} */ - this.doingStackItem = null + this.currStackItem = null this.lastChange = 0 this.ignoreRemoteMapChanges = ignoreRemoteMapChanges this.captureTimeout = captureTimeout @@ -337,12 +333,10 @@ export class UndoManager extends Observable { */ undo () { this.undoing = true - this.doingStackItem = array.last(this.undoStack) ?? null let res try { res = popStackItem(this, this.undoStack, 'undo') } finally { - this.doingStackItem = null this.undoing = false } return res @@ -355,12 +349,10 @@ export class UndoManager extends Observable { */ redo () { this.redoing = true - this.doingStackItem = array.last(this.redoStack) ?? null let res try { res = popStackItem(this, this.redoStack, 'redo') } finally { - this.doingStackItem = null this.redoing = false } return res diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index 82c98129..2fb2ff2e 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -719,62 +719,29 @@ export const testUndoDeleteInMap = (tc) => { /** * It should expose the StackItem being processed if undoing * - * @param {t.TestCase} tc - */ -export const testUndoDoingStackItem = async (tc) => { - const doc = new Y.Doc() - const text = doc.getText('text') - const undoManager = new Y.UndoManager([text]) - - undoManager.on('stack-item-added', /** @param {any} event */ event => { - event.stackItem.meta.set('str', '42') - }) - - const meta = new Promise((resolve) => { - setTimeout(() => resolve('ABORTED'), 50) - text.observe((event) => { - const /** @type {Y.UndoManager} */ origin = event.transaction.origin - if (origin === undoManager && origin.undoing) { - resolve(origin.doingStackItem?.meta.get('str')) - } - }) - }) - - text.insert(0, 'abc') - undoManager.undo() - - t.compare(await meta, '42') - t.compare(undoManager.doingStackItem, null) -} - -/** - * It should expose the StackItem being processed if redoing - * - * @param {t.TestCase} tc + * @param {t.TestCase} _tc */ -export const testRedoDoingStackItem = async (tc) => { +export const testUndoDoingStackItem = async (_tc) => { const doc = new Y.Doc() const text = doc.getText('text') const undoManager = new Y.UndoManager([text]) - undoManager.on('stack-item-added', /** @param {any} event */ event => { event.stackItem.meta.set('str', '42') }) - - const meta = new Promise(resolve => { - setTimeout(() => resolve('ABORTED'), 50) - text.observe((event) => { - const /** @type {Y.UndoManager} */ origin = event.transaction.origin - if (origin === undoManager && origin.redoing) { - resolve(origin.doingStackItem?.meta.get('str')) - } - }) + let metaUndo = /** @type {any} */ (null) + let metaRedo = /** @type {any} */ (null) + text.observe((event) => { + const /** @type {Y.UndoManager} */ origin = event.transaction.origin + if (origin === undoManager && origin.undoing) { + metaUndo = origin.currStackItem?.meta.get('str') + } else if (origin === undoManager && origin.redoing) { + metaRedo = origin.currStackItem?.meta.get('str') + } }) - text.insert(0, 'abc') undoManager.undo() undoManager.redo() - - t.compare(await meta, '42') - t.compare(undoManager.doingStackItem, null) + t.compare(metaUndo, '42', 'currStackItem is accessible while undoing') + t.compare(metaRedo, '42', 'currStackItem is accessible while redoing') + t.compare(undoManager.currStackItem, null, 'currStackItem is null after observe/transaction') } From 541306b254dac825a8e8f2393936bb67975f0122 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 29 Feb 2024 17:08:57 +0100 Subject: [PATCH 032/152] migrate to ObservableV2 --- src/utils/AbstractConnector.js | 6 ++--- src/utils/Doc.js | 43 +++++++++++++++++----------------- src/utils/UndoManager.js | 23 +++++++++++++----- tests/testHelper.js | 4 ++-- tests/updates.tests.js | 16 ++++++------- 5 files changed, 52 insertions(+), 40 deletions(-) diff --git a/src/utils/AbstractConnector.js b/src/utils/AbstractConnector.js index 5f544684..f5c0566a 100644 --- a/src/utils/AbstractConnector.js +++ b/src/utils/AbstractConnector.js @@ -1,4 +1,4 @@ -import { Observable } from 'lib0/observable' +import { ObservableV2 } from 'lib0/observable' import { Doc // eslint-disable-line @@ -10,9 +10,9 @@ import { * @note This interface is experimental and it is not advised to actually inherit this class. * It just serves as typing information. * - * @extends {Observable} + * @extends {ObservableV2} */ -export class AbstractConnector extends Observable { +export class AbstractConnector extends ObservableV2 { /** * @param {Doc} ydoc * @param {any} awareness diff --git a/src/utils/Doc.js b/src/utils/Doc.js index 0d8d471b..8a8936b9 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -14,7 +14,7 @@ import { ContentDoc, Item, Transaction, YEvent // eslint-disable-line } from '../internals.js' -import { Observable } from 'lib0/observable' +import { ObservableV2 } from 'lib0/observable' import * as random from 'lib0/random' import * as map from 'lib0/map' import * as array from 'lib0/array' @@ -33,11 +33,27 @@ export const generateNewClientId = random.uint32 * @property {boolean} [DocOpts.shouldLoad] Whether the document should be synced by the provider now. This is toggled to true when you call ydoc.load() */ +/** + * @typedef {Object} DocEvents + * @property {function(Doc):void} DocEvents.destroy + * @property {function(Doc):void} DocEvents.load + * @property {function(boolean, Doc):void} DocEvents.sync + * @property {function(Uint8Array, any, Doc, Transaction):void} DocEvents.update + * @property {function(Uint8Array, any, Doc, Transaction):void} DocEvents.updateV2 + * @property {function(Doc):void} DocEvents.beforeAllTransactions + * @property {function(Transaction, Doc):void} DocEvents.beforeTransaction + * @property {function(Transaction, Doc):void} DocEvents.beforeObserverCalls + * @property {function(Transaction, Doc):void} DocEvents.afterTransaction + * @property {function(Transaction, Doc):void} DocEvents.afterTransactionCleanup + * @property {function(Doc, Array):void} DocEvents.afterAllTransactions + * @property {function({ loaded: Set, added: Set, removed: Set }, Doc, Transaction):void} DocEvents.subdocs + */ + /** * A Yjs instance handles the state of shared data. - * @extends Observable + * @extends ObservableV2 */ -export class Doc extends Observable { +export class Doc extends ObservableV2 { /** * @param {DocOpts} opts configuration */ @@ -115,7 +131,7 @@ export class Doc extends Observable { } this.isSynced = isSynced === undefined || isSynced === true if (this.isSynced && !this.isLoaded) { - this.emit('load', []) + this.emit('load', [this]) } }) /** @@ -321,24 +337,9 @@ export class Doc extends Observable { transaction.subdocsRemoved.add(this) }, null, true) } - this.emit('destroyed', [true]) + // @ts-ignore + this.emit('destroyed', [true]) // DEPRECATED! this.emit('destroy', [this]) super.destroy() } - - /** - * @param {string} eventName - * @param {function(...any):any} f - */ - on (eventName, f) { - super.on(eventName, f) - } - - /** - * @param {string} eventName - * @param {function} f - */ - off (eventName, f) { - super.off(eventName, f) - } } diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index 16ccb7ae..27023ecf 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -10,13 +10,13 @@ import { getItemCleanStart, isDeleted, addToDeleteSet, - Transaction, Doc, Item, GC, DeleteSet, AbstractType // eslint-disable-line + YEvent, Transaction, Doc, Item, GC, DeleteSet, AbstractType // eslint-disable-line } from '../internals.js' import * as time from 'lib0/time' import * as array from 'lib0/array' import * as logging from 'lib0/logging' -import { Observable } from 'lib0/observable' +import { ObservableV2 } from 'lib0/observable' export class StackItem { /** @@ -48,7 +48,7 @@ const clearUndoManagerStackItem = (tr, um, stackItem) => { /** * @param {UndoManager} undoManager * @param {Array} stack - * @param {string} eventType + * @param {'undo'|'redo'} eventType * @return {StackItem?} */ const popStackItem = (undoManager, stack, eventType) => { @@ -120,7 +120,7 @@ const popStackItem = (undoManager, stack, eventType) => { }, undoManager) if (undoManager.currStackItem != null) { const changedParentTypes = _tr.changedParentTypes - undoManager.emit('stack-item-popped', [{ stackItem: undoManager.currStackItem, type: eventType, changedParentTypes }, undoManager]) + undoManager.emit('stack-item-popped', [{ stackItem: undoManager.currStackItem, type: eventType, changedParentTypes, origin: undoManager }, undoManager]) undoManager.currStackItem = null } return undoManager.currStackItem @@ -139,6 +139,14 @@ const popStackItem = (undoManager, stack, eventType) => { * @property {Doc} [doc] The document that this UndoManager operates on. Only needed if typeScope is empty. */ +/** + * @typedef {Object} StackItemEvent + * @property {StackItem} StackItemEvent.stackItem + * @property {any} StackItemEvent.origin + * @property {'undo'|'redo'} StackItemEvent.type + * @property {Map>,Array>>} StackItemEvent.changedParentTypes + */ + /** * Fires 'stack-item-added' event when a stack item was added to either the undo- or * the redo-stack. You may store additional stack information via the @@ -146,9 +154,9 @@ const popStackItem = (undoManager, stack, eventType) => { * Fires 'stack-item-popped' event when a stack item was popped from either the * undo- or the redo-stack. You may restore the saved stack information from `event.stackItem.meta`. * - * @extends {Observable<'stack-item-added'|'stack-item-popped'|'stack-cleared'|'stack-item-updated'>} + * @extends {ObservableV2<{'stack-item-added':function(StackItemEvent, UndoManager):void, 'stack-item-popped': function(StackItemEvent, UndoManager):void, 'stack-cleared': function({ undoStackCleared: boolean, redoStackCleared: boolean }):void, 'stack-item-updated': function(StackItemEvent, UndoManager):void }>} */ -export class UndoManager extends Observable { +export class UndoManager extends ObservableV2 { /** * @param {AbstractType|Array>} typeScope Accepts either a single type, or an array of types * @param {UndoManagerOptions} options @@ -246,6 +254,9 @@ export class UndoManager extends Observable { keepItem(item, true) } }) + /** + * @type {[StackItemEvent, UndoManager]} + */ const changeEvent = [{ stackItem: stack[stack.length - 1], origin: transaction.origin, type: undoing ? 'redo' : 'undo', changedParentTypes: transaction.changedParentTypes }, this] if (didAdd) { this.emit('stack-item-added', changeEvent) diff --git a/tests/testHelper.js b/tests/testHelper.js index c74b7438..56983679 100644 --- a/tests/testHelper.js +++ b/tests/testHelper.js @@ -34,7 +34,7 @@ export const encV1 = { mergeUpdates: Y.mergeUpdates, applyUpdate: Y.applyUpdate, logUpdate: Y.logUpdate, - updateEventName: 'update', + updateEventName: /** @type {'update'} */ ('update'), diffUpdate: Y.diffUpdate } @@ -43,7 +43,7 @@ export const encV2 = { mergeUpdates: Y.mergeUpdatesV2, applyUpdate: Y.applyUpdateV2, logUpdate: Y.logUpdateV2, - updateEventName: 'updateV2', + updateEventName: /** @type {'updateV2'} */ ('updateV2'), diffUpdate: Y.diffUpdateV2 } diff --git a/tests/updates.tests.js b/tests/updates.tests.js index 4ba3bab6..f3169cfe 100644 --- a/tests/updates.tests.js +++ b/tests/updates.tests.js @@ -15,7 +15,7 @@ import * as object from 'lib0/object' * @property {function(Uint8Array):{from:Map,to:Map}} Enc.parseUpdateMeta * @property {function(Y.Doc):Uint8Array} Enc.encodeStateVector * @property {function(Uint8Array):Uint8Array} Enc.encodeStateVectorFromUpdate - * @property {string} Enc.updateEventName + * @property {'update'|'updateV2'} Enc.updateEventName * @property {string} Enc.description * @property {function(Uint8Array, Uint8Array):Uint8Array} Enc.diffUpdate */ @@ -169,7 +169,7 @@ const checkUpdateCases = (ydoc, updates, enc, hasDeletes) => { // t.info('Target State: ') // enc.logUpdate(targetState) - cases.forEach((mergedUpdates, i) => { + cases.forEach((mergedUpdates) => { // t.info('State Case $' + i + ':') // enc.logUpdate(updates) const merged = new Y.Doc({ gc: false }) @@ -218,10 +218,10 @@ const checkUpdateCases = (ydoc, updates, enc, hasDeletes) => { } /** - * @param {t.TestCase} tc + * @param {t.TestCase} _tc */ -export const testMergeUpdates1 = tc => { - encoders.forEach((enc, i) => { +export const testMergeUpdates1 = _tc => { + encoders.forEach((enc) => { t.info(`Using encoder: ${enc.description}`) const ydoc = new Y.Doc({ gc: false }) const updates = /** @type {Array} */ ([]) @@ -299,16 +299,16 @@ export const testMergePendingUpdates = tc => { Y.applyUpdate(yDoc5, update4) Y.applyUpdate(yDoc5, serverUpdates[4]) // @ts-ignore - const update5 = Y.encodeStateAsUpdate(yDoc5) // eslint-disable-line + const _update5 = Y.encodeStateAsUpdate(yDoc5) // eslint-disable-line const yText5 = yDoc5.getText('textBlock') t.compareStrings(yText5.toString(), 'nenor') } /** - * @param {t.TestCase} tc + * @param {t.TestCase} _tc */ -export const testObfuscateUpdates = tc => { +export const testObfuscateUpdates = _tc => { const ydoc = new Y.Doc() const ytext = ydoc.getText('text') const ymap = ydoc.getMap('map') From 90675be3ab74df86cfd2e15d49f1f7efb00743f2 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 29 Feb 2024 17:37:25 +0100 Subject: [PATCH 033/152] 13.6.13 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e11d6c60..0f59a920 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.12", + "version": "13.6.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.12", + "version": "13.6.13", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index 16544493..43dee697 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.12", + "version": "13.6.13", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From cdbb55818dab520fa09987e19d82766e7dddfad9 Mon Sep 17 00:00:00 2001 From: Julian Lehrhuber Date: Fri, 1 Mar 2024 10:37:51 +0100 Subject: [PATCH 034/152] Allow falsy attribute values --- src/types/YText.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/YText.js b/src/types/YText.js index c02ae6e5..50a21490 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -227,7 +227,7 @@ const insertAttributes = (transaction, parent, currPos, attributes) => { // insert format-start items for (const key in attributes) { const val = attributes[key] - const currentVal = currPos.currentAttributes.get(key) || null + const currentVal = currPos.currentAttributes.get(key) ?? null if (!equalAttrs(currentVal, val)) { // save negated attribute (set null if currentVal undefined) negatedAttributes.set(key, currentVal) From 133cfc9cdc91517b1d9777384effc4a0fbb8fade Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 1 Mar 2024 11:29:14 +0100 Subject: [PATCH 035/152] allow falsy values in formatting attributes --- src/types/YText.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/types/YText.js b/src/types/YText.js index 50a21490..8de9260e 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -201,7 +201,7 @@ const minimizeAttributeChanges = (currPos, attributes) => { while (true) { if (currPos.right === null) { break - } else if (currPos.right.deleted || (currPos.right.content.constructor === ContentFormat && equalAttrs(attributes[(/** @type {ContentFormat} */ (currPos.right.content)).key] || null, /** @type {ContentFormat} */ (currPos.right.content).value))) { + } else if (currPos.right.deleted || (currPos.right.content.constructor === ContentFormat && equalAttrs(attributes[(/** @type {ContentFormat} */ (currPos.right.content)).key] ?? null, /** @type {ContentFormat} */ (currPos.right.content).value))) { // } else { break @@ -389,12 +389,12 @@ const cleanupFormattingGap = (transaction, start, curr, startAttributes, currAtt switch (content.constructor) { case ContentFormat: { const { key, value } = /** @type {ContentFormat} */ (content) - const startAttrValue = startAttributes.get(key) || null + const startAttrValue = startAttributes.get(key) ?? null if (endFormats.get(key) !== content || startAttrValue === value) { // Either this format is overwritten or it is not necessary because the attribute already existed. start.delete(transaction) cleanups++ - if (!reachedCurr && (currAttributes.get(key) || null) === value && startAttrValue !== value) { + if (!reachedCurr && (currAttributes.get(key) ?? null) === value && startAttrValue !== value) { if (startAttrValue === null) { currAttributes.delete(key) } else { @@ -769,12 +769,12 @@ export class YTextEvent extends YEvent { const { key, value } = /** @type {ContentFormat} */ (item.content) if (this.adds(item)) { if (!this.deletes(item)) { - const curVal = currentAttributes.get(key) || null + const curVal = currentAttributes.get(key) ?? null if (!equalAttrs(curVal, value)) { if (action === 'retain') { addOp() } - if (equalAttrs(value, (oldAttributes.get(key) || null))) { + if (equalAttrs(value, (oldAttributes.get(key) ?? null))) { delete attributes[key] } else { attributes[key] = value @@ -785,7 +785,7 @@ export class YTextEvent extends YEvent { } } else if (this.deletes(item)) { oldAttributes.set(key, value) - const curVal = currentAttributes.get(key) || null + const curVal = currentAttributes.get(key) ?? null if (!equalAttrs(curVal, value)) { if (action === 'retain') { addOp() From 1e69d650b83fa73a964656bbf6ca3e2e9ba3dabb Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 1 Mar 2024 11:31:21 +0100 Subject: [PATCH 036/152] 13.6.14 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f59a920..3001c522 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.13", + "version": "13.6.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.13", + "version": "13.6.14", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index 43dee697..d291b525 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.13", + "version": "13.6.14", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 6beab79eb4fe852080122f6018c85a9cd8078c56 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 1 Mar 2024 11:39:31 +0100 Subject: [PATCH 037/152] add tests for falsy formatting attributes - #619 --- tests/y-text.tests.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/y-text.tests.js b/tests/y-text.tests.js index 87ac21a4..34ae7e9e 100644 --- a/tests/y-text.tests.js +++ b/tests/y-text.tests.js @@ -1746,6 +1746,27 @@ export const testBasicFormat = tc => { compare(users) } +/** + * @param {t.TestCase} tc + */ +export const testFalsyFormats = tc => { + const { users, text0 } = init(tc, { users: 2 }) + let delta + text0.observe(event => { + delta = event.delta + }) + text0.insert(0, 'abcde', { falsy: false }) + t.compare(text0.toDelta(), [{ insert: 'abcde', attributes: { falsy: false } }]) + t.compare(delta, [{ insert: 'abcde', attributes: { falsy: false } }]) + text0.format(1, 3, { falsy: true }) + t.compare(text0.toDelta(), [{ insert: 'a', attributes: { falsy: false } }, { insert: 'bcd', attributes: { falsy: true } }, { insert: 'e', attributes: { falsy: false } }]) + t.compare(delta, [{ retain: 1 }, { retain: 3, attributes: { falsy: true } }]) + text0.format(2, 1, { falsy: false }) + t.compare(text0.toDelta(), [{ insert: 'a', attributes: { falsy: false } }, { insert: 'b', attributes: { falsy: true } }, { insert: 'c', attributes: { falsy: false } }, { insert: 'd', attributes: { falsy: true } }, { insert: 'e', attributes: { falsy: false } }]) + t.compare(delta, [{ retain: 2 }, { retain: 1, attributes: { falsy: false } }]) + compare(users) +} + /** * @param {t.TestCase} _tc */ From b235c57d76e9d1b353f1f46cb80c440de311f72f Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 12 Mar 2024 16:22:12 +0100 Subject: [PATCH 038/152] add tinybase --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 31d13130..86ce843f 100644 --- a/README.md +++ b/README.md @@ -205,6 +205,11 @@ An ActionCable companion for Yjs clients. There is a fitting
Websocket backend, written in Python.
+
Tinybase
+
+The reactive data store for local-first apps. They support multiple CRDTs and + different network technologies. +
#### Persistence Providers From 2fba694cd4c605812914082a27b0bcfa1011dca0 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 14 Mar 2024 20:33:34 +0100 Subject: [PATCH 039/152] Add documentation & clarification to clone method #622 --- src/types/AbstractType.js | 4 ++++ src/types/YArray.js | 4 ++++ src/types/YMap.js | 4 ++++ src/types/YText.js | 4 ++++ src/types/YXmlElement.js | 4 ++++ src/types/YXmlFragment.js | 4 ++++ src/types/YXmlHook.js | 4 ++++ src/types/YXmlText.js | 4 ++++ 8 files changed, 32 insertions(+) diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 4cc1bf8a..8927548e 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -316,6 +316,10 @@ export class AbstractType { } /** + * Makes a copy of this data type that can be included somewhere else. + * + * Note that the content is only readable _after_ it has been included somewhere in the Ydoc. + * * @return {AbstractType} */ clone () { diff --git a/src/types/YArray.js b/src/types/YArray.js index a895274e..54a20c19 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -95,6 +95,10 @@ export class YArray extends AbstractType { } /** + * Makes a copy of this data type that can be included somewhere else. + * + * Note that the content is only readable _after_ it has been included somewhere in the Ydoc. + * * @return {YArray} */ clone () { diff --git a/src/types/YMap.js b/src/types/YMap.js index 855ccb4f..974e7316 100644 --- a/src/types/YMap.js +++ b/src/types/YMap.js @@ -88,6 +88,10 @@ export class YMap extends AbstractType { } /** + * Makes a copy of this data type that can be included somewhere else. + * + * Note that the content is only readable _after_ it has been included somewhere in the Ydoc. + * * @return {YMap} */ clone () { diff --git a/src/types/YText.js b/src/types/YText.js index 8de9260e..8919b009 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -897,6 +897,10 @@ export class YText extends AbstractType { } /** + * Makes a copy of this data type that can be included somewhere else. + * + * Note that the content is only readable _after_ it has been included somewhere in the Ydoc. + * * @return {YText} */ clone () { diff --git a/src/types/YXmlElement.js b/src/types/YXmlElement.js index 1c1f3190..48029f69 100644 --- a/src/types/YXmlElement.js +++ b/src/types/YXmlElement.js @@ -81,6 +81,10 @@ export class YXmlElement extends YXmlFragment { } /** + * Makes a copy of this data type that can be included somewhere else. + * + * Note that the content is only readable _after_ it has been included somewhere in the Ydoc. + * * @return {YXmlElement} */ clone () { diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js index b229a4ac..496c5ab6 100644 --- a/src/types/YXmlFragment.js +++ b/src/types/YXmlFragment.js @@ -163,6 +163,10 @@ export class YXmlFragment extends AbstractType { } /** + * Makes a copy of this data type that can be included somewhere else. + * + * Note that the content is only readable _after_ it has been included somewhere in the Ydoc. + * * @return {YXmlFragment} */ clone () { diff --git a/src/types/YXmlHook.js b/src/types/YXmlHook.js index c5b5ed6d..1bf24846 100644 --- a/src/types/YXmlHook.js +++ b/src/types/YXmlHook.js @@ -29,6 +29,10 @@ export class YXmlHook extends YMap { } /** + * Makes a copy of this data type that can be included somewhere else. + * + * Note that the content is only readable _after_ it has been included somewhere in the Ydoc. + * * @return {YXmlHook} */ clone () { diff --git a/src/types/YXmlText.js b/src/types/YXmlText.js index 413b247c..ab02dbf3 100644 --- a/src/types/YXmlText.js +++ b/src/types/YXmlText.js @@ -30,6 +30,10 @@ export class YXmlText extends YText { } /** + * Makes a copy of this data type that can be included somewhere else. + * + * Note that the content is only readable _after_ it has been included somewhere in the Ydoc. + * * @return {YXmlText} */ clone () { From 6e674ff5f71e8d84b07ef68f6837035f62bd1eaa Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 14 Mar 2024 21:09:34 +0100 Subject: [PATCH 040/152] add y-webxdc - related to yjs/docs#55 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 86ce843f..e5a4c5d3 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,10 @@ Websocket backend, written in Python. The reactive data store for local-first apps. They support multiple CRDTs and different network technologies. +
y-webxdc
+
+Provider for sharing data in webxdc chat apps. +
#### Persistence Providers From 2062f52a900547abbd5bd262bd7855dfb2cdd0fd Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 15 Mar 2024 01:42:07 +0100 Subject: [PATCH 041/152] add reference to y-redis --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e5a4c5d3..627b84df 100644 --- a/README.md +++ b/README.md @@ -145,9 +145,9 @@ collaborative app.
y-websocket
A module that contains a simple websocket backend and a websocket client that -connects to that backend. The backend can be extended to persist updates in a -leveldb database. y-sweet and ypy-websocket (see below) are -compatible to the y-wesocket protocol. +connects to that backend. y-redis, +y-sweet, and ypy-websocket (see below) are alternative +backends to y-websocket.
y-webrtc
From dc45a8d3cf66867cb2aa76d2a44119a976cce887 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 23 Mar 2024 12:43:54 +0100 Subject: [PATCH 042/152] [readme] Added AppMaster to "Who is Using" --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 627b84df..6cc6ebd8 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,8 @@ Showcase](https://yjs-diagram.synergy.codes/). * [AWS SageMaker](https://aws.amazon.com/sagemaker/) Tools for building Machine Learning Models * [linear](https://linear.app) Streamline issues, projects, and product roadmaps. +* [AppMaster](https://appmaster.io) A No-Code platform for creating + production-ready applications with source code generation. ## Table of Contents From ca24f1ee765a68d1a50a2665a786cf486775da2c Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 23 Mar 2024 14:29:23 +0100 Subject: [PATCH 043/152] added more sponsors --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cc6ebd8..957bf40e 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,15 @@ Showcase](https://yjs-diagram.synergy.codes/). Nimbus Web. :star: * [Pluxbox RadioManager](https://getradiomanager.com/) A web-based app to collaboratively organize radio broadcasts. :star: +* [modyfi](https://www.modyfi.com) - Modyfi is the design platform built for + multidisciplinary designers. Design, generate, animate, and more — without + switching between apps. :star: * [Sana](https://sanalabs.com/) A learning platform with collaborative text editing powered by Yjs. * [Serenity Notes](https://www.serenity.re/en/notes) End-to-end encrypted collaborative notes app. -* [PRSM](https://prsm.uk/) Collaborative mind-mapping and system visualisation. *[(source)](https://github.com/micrology/prsm)* +* [PRSM](https://prsm.uk/) Collaborative mind-mapping and system visualisation. + *[(source)](https://github.com/micrology/prsm)* * [Alldone](https://alldone.app/) A next-gen project management and collaboration platform. * [Living Spec](https://livingspec.com/) A modern way for product teams to collaborate. @@ -91,6 +95,12 @@ Showcase](https://yjs-diagram.synergy.codes/). * [AWS SageMaker](https://aws.amazon.com/sagemaker/) Tools for building Machine Learning Models * [linear](https://linear.app) Streamline issues, projects, and product roadmaps. +* [btw](https://www.btw.so) - Personal website builder +* [AWS SageMaker](https://aws.amazon.com/sagemaker/) - Machine Learning Service +* [Arkiter](https://www.arkiter.com/) - Live interview software +* [Appflowy](https://www.appflowy.io/) - They use Yrs +* [Multi.app](https://multi.app) - Multiplayer app sharing: Point, draw and edit + in shared apps as if they're on your computer. They are using Yrs. * [AppMaster](https://appmaster.io) A No-Code platform for creating production-ready applications with source code generation. From d730abe594ff1c149c75efb9c17549cf4b140eba Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 24 Mar 2024 21:00:23 +0100 Subject: [PATCH 044/152] add synthesia as a user --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 957bf40e..1791686e 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ Showcase](https://yjs-diagram.synergy.codes/). in shared apps as if they're on your computer. They are using Yrs. * [AppMaster](https://appmaster.io) A No-Code platform for creating production-ready applications with source code generation. +* [Synthesia](https://www.synthesia.io) - Collaborative Video Editor ## Table of Contents From d119459fad8404a27dfcef59cbee37818c0e2e0d Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 3 Apr 2024 15:22:52 +0200 Subject: [PATCH 045/152] add huly as a user --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1791686e..c6a9ab5c 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,9 @@ Showcase](https://yjs-diagram.synergy.codes/). ## Who is using Yjs * [AFFiNE](https://affine.pro/) A local-first, privacy-first, open source - knowledge base. 🏅 + knowledge base. :start2: +* [Huly](https://huly.io/) - Open Source All-in-One Project Management Platform + :start2: * [Cargo](https://cargo.site/) Site builder for designers and artists :star2: * [Gitbook](https://gitbook.com) Knowledge management for technical teams :star2: * [Evernote](https://evernote.com) Note-taking app :star2: From 52b906898fee761a6223eeef6a33adc2a4041b80 Mon Sep 17 00:00:00 2001 From: Satyajeet Jadhav Date: Tue, 9 Apr 2024 16:39:18 +0530 Subject: [PATCH 046/152] Update Readme who-is-using (thinkdeli.com) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c6a9ab5c..c81bc923 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [AppMaster](https://appmaster.io) A No-Code platform for creating production-ready applications with source code generation. * [Synthesia](https://www.synthesia.io) - Collaborative Video Editor +* [thinkdeli](https://thinkdeli.com) - A fast and simple notes app powered by AI ## Table of Contents From 43e17802a607ca8f8cd2c4ea8a7b63ce28197a9d Mon Sep 17 00:00:00 2001 From: synix Date: Thu, 11 Apr 2024 11:21:14 +0800 Subject: [PATCH 047/152] fix: update search marker count in INTERNALS.md --- INTERNALS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INTERNALS.md b/INTERNALS.md index 4daf9659..3f4ae1db 100644 --- a/INTERNALS.md +++ b/INTERNALS.md @@ -88,7 +88,7 @@ When a local insert happens, Yjs needs to map the insert position in the document (eg position 1000) to an ID. With just the linked list, this would require a slow O(n) linear scan of the list. But when editing a document, most inserts are either at the same position as the last insert, or nearby. To -improve performance, Yjs stores a cache of the 10 most recently looked up +improve performance, Yjs stores a cache of the 80 most recently looked up insert positions in the document. This is consulted and updated when a position is looked up to improve performance in the average case. The cache is updated using a heuristic that is still changing (currently, it is updated when a new From f5aa852054c39d441100efb290508ad329a29dbf Mon Sep 17 00:00:00 2001 From: synix Date: Sat, 13 Apr 2024 21:26:44 +0800 Subject: [PATCH 048/152] remove outdated Y instance in comments --- src/utils/Doc.js | 14 +++++++------- src/utils/Transaction.js | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/utils/Doc.js b/src/utils/Doc.js index 8a8936b9..62643617 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -187,22 +187,22 @@ export class Doc extends ObservableV2 { /** * Define a shared data type. * - * Multiple calls of `y.get(name, TypeConstructor)` yield the same result + * Multiple calls of `ydoc.get(name, TypeConstructor)` yield the same result * and do not overwrite each other. I.e. - * `y.define(name, Y.Array) === y.define(name, Y.Array)` + * `ydoc.get(name, Y.Array) === ydoc.get(name, Y.Array)` * - * After this method is called, the type is also available on `y.share.get(name)`. + * After this method is called, the type is also available on `ydoc.share.get(name)`. * * *Best Practices:* - * Define all types right after the Yjs instance is created and store them in a separate object. + * Define all types right after the Y.Doc instance is created and store them in a separate object. * Also use the typed methods `getText(name)`, `getArray(name)`, .. * * @template {typeof AbstractType} Type * @example - * const y = new Y(..) + * const ydoc = new Y.Doc(..) * const appState = { - * document: y.getText('document') - * comments: y.getArray('comments') + * document: ydoc.getText('document') + * comments: ydoc.getArray('comments') * } * * @param {string} name diff --git a/src/utils/Transaction.js b/src/utils/Transaction.js index c5931ab4..829589ec 100644 --- a/src/utils/Transaction.js +++ b/src/utils/Transaction.js @@ -28,7 +28,8 @@ import { callAll } from 'lib0/function' * possible. Here is an example to illustrate the advantages of bundling: * * @example - * const map = y.define('map', YMap) + * const ydoc = new Y.Doc() + * const map = ydoc.getMap('map') * // Log content when change is triggered * map.observe(() => { * console.log('change triggered') @@ -37,7 +38,7 @@ import { callAll } from 'lib0/function' * map.set('a', 0) // => "change triggered" * map.set('b', 0) // => "change triggered" * // When put in a transaction, it will trigger the log after the transaction: - * y.transact(() => { + * ydoc.transact(() => { * map.set('a', 1) * map.set('b', 1) * }) // => "change triggered" From f1532771b7534273d99ef89df598176f170799e8 Mon Sep 17 00:00:00 2001 From: saki Date: Tue, 16 Apr 2024 01:15:02 +0900 Subject: [PATCH 049/152] fix typo --- src/types/AbstractType.js | 4 ++-- src/types/YArray.js | 2 +- src/types/YXmlFragment.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 8927548e..3dff240c 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -481,7 +481,7 @@ export const typeListToArraySnapshot = (type, snapshot) => { } /** - * Executes a provided function on once on overy element of this YArray. + * Executes a provided function on once on every element of this YArray. * * @param {AbstractType} type * @param {function(any,number,any):void} f A function to execute on every element of this YArray. @@ -573,7 +573,7 @@ export const typeListCreateIterator = type => { } /** - * Executes a provided function on once on overy element of this YArray. + * Executes a provided function on once on every element of this YArray. * Operates on a snapshotted state of the document. * * @param {AbstractType} type diff --git a/src/types/YArray.js b/src/types/YArray.js index 54a20c19..ce60de78 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -248,7 +248,7 @@ export class YArray extends AbstractType { } /** - * Executes a provided function once on overy element of this YArray. + * Executes a provided function once on every element of this YArray. * * @param {function(T,number,YArray):void} f A function to execute on every element of this YArray. */ diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js index 496c5ab6..2f37684a 100644 --- a/src/types/YXmlFragment.js +++ b/src/types/YXmlFragment.js @@ -410,7 +410,7 @@ export class YXmlFragment extends AbstractType { } /** - * Executes a provided function on once on overy child element. + * Executes a provided function on once on every child element. * * @param {function(YXmlElement|YXmlText,number, typeof self):void} f A function to execute on every element of this YArray. */ From 4ffd23fd0be7401053673882096c096438f7fd01 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 17 Apr 2024 20:41:42 +0200 Subject: [PATCH 050/152] typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c81bc923..97070b70 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ Showcase](https://yjs-diagram.synergy.codes/). ## Who is using Yjs * [AFFiNE](https://affine.pro/) A local-first, privacy-first, open source - knowledge base. :start2: + knowledge base. :star2: * [Huly](https://huly.io/) - Open Source All-in-One Project Management Platform - :start2: + :star2: * [Cargo](https://cargo.site/) Site builder for designers and artists :star2: * [Gitbook](https://gitbook.com) Knowledge management for technical teams :star2: * [Evernote](https://evernote.com) Note-taking app :star2: From 5e712e39b1f98002a3517860c1a24322159b54db Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 24 Apr 2024 16:03:21 +0200 Subject: [PATCH 051/152] add ourboard as user --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 97070b70..0c7c773f 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ Showcase](https://yjs-diagram.synergy.codes/). production-ready applications with source code generation. * [Synthesia](https://www.synthesia.io) - Collaborative Video Editor * [thinkdeli](https://thinkdeli.com) - A fast and simple notes app powered by AI +* [ourboard](https://github.com/raimohanska/ourboard) - A collaborative whiteboard + applicaiton ## Table of Contents From 25ae9f3236ec3b7acb27a7f81b897b8bf647c950 Mon Sep 17 00:00:00 2001 From: synix Date: Thu, 25 Apr 2024 11:03:17 +0800 Subject: [PATCH 052/152] remove unused _transaction in YArray --- src/types/YArray.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/types/YArray.js b/src/types/YArray.js index ce60de78..217c154e 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -32,7 +32,6 @@ export class YArrayEvent extends YEvent { */ constructor (yarray, transaction) { super(yarray, transaction) - this._transaction = transaction } } From f0dc53f53f4c2fdf90a2701df73f73b6c2f06395 Mon Sep 17 00:00:00 2001 From: synix Date: Thu, 25 Apr 2024 11:17:49 +0800 Subject: [PATCH 053/152] fix minor typos --- src/utils/Transaction.js | 2 +- src/utils/encoding.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/Transaction.js b/src/utils/Transaction.js index 829589ec..9792d32e 100644 --- a/src/utils/Transaction.js +++ b/src/utils/Transaction.js @@ -225,7 +225,7 @@ const tryGcDeleteSet = (ds, store, gcFilter) => { */ const tryMergeDeleteSet = (ds, store) => { // try to merge deleted / gc'd items - // merge from right to left for better efficiecy and so we don't miss any merge targets + // merge from right to left for better efficiency and so we don't miss any merge targets ds.clients.forEach((deleteItems, client) => { const structs = /** @type {Array} */ (store.clients.get(client)) for (let di = deleteItems.length - 1; di >= 0; di--) { diff --git a/src/utils/encoding.js b/src/utils/encoding.js index 2277a140..08a9602d 100644 --- a/src/utils/encoding.js +++ b/src/utils/encoding.js @@ -154,7 +154,7 @@ export const readClientsStructRefs = (decoder, doc) => { // @type {string|null} const struct = new Item( createID(client, clock), - null, // leftd + null, // left (info & binary.BIT8) === binary.BIT8 ? decoder.readLeftID() : null, // origin null, // right (info & binary.BIT7) === binary.BIT7 ? decoder.readRightID() : null, // right origin @@ -178,7 +178,7 @@ export const readClientsStructRefs = (decoder, doc) => { const struct = new Item( createID(client, clock), - null, // leftd + null, // left origin, // origin null, // right rightOrigin, // right origin @@ -370,7 +370,7 @@ export const writeStructsFromTransaction = (encoder, transaction) => writeClient /** * Read and apply a document update. * - * This function has the same effect as `applyUpdate` but accepts an decoder. + * This function has the same effect as `applyUpdate` but accepts a decoder. * * @param {decoding.Decoder} decoder * @param {Doc} ydoc @@ -451,7 +451,7 @@ export const readUpdateV2 = (decoder, ydoc, transactionOrigin, structDecoder = n /** * Read and apply a document update. * - * This function has the same effect as `applyUpdate` but accepts an decoder. + * This function has the same effect as `applyUpdate` but accepts a decoder. * * @param {decoding.Decoder} decoder * @param {Doc} ydoc From 43815d8292d19be4ec2d3cfed4574bef3521ac9a Mon Sep 17 00:00:00 2001 From: synix Date: Thu, 25 Apr 2024 11:33:36 +0800 Subject: [PATCH 054/152] fix lint error --- src/types/YArray.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/types/YArray.js b/src/types/YArray.js index 217c154e..2afdb7e6 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -25,15 +25,7 @@ import { typeListSlice } from './AbstractType.js' * @template T * @extends YEvent> */ -export class YArrayEvent extends YEvent { - /** - * @param {YArray} yarray The changed type - * @param {Transaction} transaction The transaction object - */ - constructor (yarray, transaction) { - super(yarray, transaction) - } -} +export class YArrayEvent extends YEvent {} /** * A shared Array implementation. From 8270373c9fe42dc1ffee106b3e7afd41fc863063 Mon Sep 17 00:00:00 2001 From: Felix Salazar Date: Thu, 25 Apr 2024 19:34:05 +0200 Subject: [PATCH 055/152] Add Hocuspocus as a backend provider --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c7c773f..d3a1d660 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ collaborative app.
A module that contains a simple websocket backend and a websocket client that connects to that backend. y-redis, -y-sweet, and ypy-websocket (see below) are alternative +y-sweet, ypy-websocket and Hocuspocus (see below) are alternative backends to y-websocket.
y-webrtc
@@ -187,6 +187,10 @@ browser DevTools extension.
A standalone yjs server with persistence to S3 or filesystem. They offer a cloud service as well. +
+
Hocuspocus
+
+A standalone extensible yjs server with sqlite persistence, webhooks, auth and more.
PartyKit
From 387be70ae96e884dab468f73aaf776616b062d0b Mon Sep 17 00:00:00 2001 From: synix Date: Fri, 26 Apr 2024 11:49:52 +0800 Subject: [PATCH 056/152] make slice() function's doc more accurate --- src/types/YArray.js | 6 +++--- src/types/YXmlFragment.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/types/YArray.js b/src/types/YArray.js index 2afdb7e6..609247bd 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -162,9 +162,9 @@ export class YArray extends AbstractType { } /** - * Preppends content to this YArray. + * Prepends content to this YArray. * - * @param {Array} content Array of content to preppend. + * @param {Array} content Array of content to prepend. */ unshift (content) { this.insert(0, content) @@ -206,7 +206,7 @@ export class YArray extends AbstractType { } /** - * Transforms this YArray to a JavaScript Array. + * Returns a portion of this YArray into a JavaScript Array selected from start to end (end not included). * * @param {number} [start] * @param {number} [end] diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js index 2f37684a..16b54985 100644 --- a/src/types/YXmlFragment.js +++ b/src/types/YXmlFragment.js @@ -380,9 +380,9 @@ export class YXmlFragment extends AbstractType { } /** - * Preppends content to this YArray. + * Prepends content to this YArray. * - * @param {Array} content Array of content to preppend. + * @param {Array} content Array of content to prepend. */ unshift (content) { this.insert(0, content) @@ -399,7 +399,7 @@ export class YXmlFragment extends AbstractType { } /** - * Transforms this YArray to a JavaScript Array. + * Returns a portion of this YXmlFragment into a JavaScript Array selected from start to end (end not included). * * @param {number} [start] * @param {number} [end] From 3df335cb4cc1db585c2eb7af8942e99e9256ece2 Mon Sep 17 00:00:00 2001 From: synix Date: Fri, 26 Apr 2024 12:03:28 +0800 Subject: [PATCH 057/152] update slice() function's doc --- src/types/YArray.js | 3 ++- src/types/YXmlFragment.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/types/YArray.js b/src/types/YArray.js index 609247bd..38b4e11f 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -206,7 +206,8 @@ export class YArray extends AbstractType { } /** - * Returns a portion of this YArray into a JavaScript Array selected from start to end (end not included). + * Returns a portion of this YArray into a JavaScript Array selected + * from start to end (end not included). * * @param {number} [start] * @param {number} [end] diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js index 16b54985..1445139c 100644 --- a/src/types/YXmlFragment.js +++ b/src/types/YXmlFragment.js @@ -399,7 +399,8 @@ export class YXmlFragment extends AbstractType { } /** - * Returns a portion of this YXmlFragment into a JavaScript Array selected from start to end (end not included). + * Returns a portion of this YXmlFragment into a JavaScript Array selected + * from start to end (end not included). * * @param {number} [start] * @param {number} [end] From 0af69cf6d6ac6be029f749ce507783299bdcccae Mon Sep 17 00:00:00 2001 From: synix Date: Fri, 26 Apr 2024 13:15:06 +0800 Subject: [PATCH 058/152] fix: markdownlint readme error --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d3a1d660..80acf025 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,8 @@ collaborative app.
A module that contains a simple websocket backend and a websocket client that connects to that backend. y-redis, -y-sweet, ypy-websocket and Hocuspocus (see below) are alternative +y-sweet, ypy-websocket and +Hocuspocus (see below) are alternative backends to y-websocket.
y-webrtc
From ce43124ad0516e95a3a1075148264758762574de Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 27 Apr 2024 00:24:49 +0200 Subject: [PATCH 059/152] [relative-positions] add option to configure whether to follow redon insertions - #638 --- src/utils/RelativePosition.js | 18 +++++++++++++++--- tests/relativePositions.tests.js | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/utils/RelativePosition.js b/src/utils/RelativePosition.js index a1b4356b..744dff37 100644 --- a/src/utils/RelativePosition.js +++ b/src/utils/RelativePosition.js @@ -8,6 +8,7 @@ import { createID, ContentType, followRedone, + getItem, ID, Doc, AbstractType // eslint-disable-line } from '../internals.js' @@ -256,13 +257,24 @@ export const readRelativePosition = decoder => { export const decodeRelativePosition = uint8Array => readRelativePosition(decoding.createDecoder(uint8Array)) /** + * Transform a relative position to an absolute position. + * + * If you want to share the relative position with other users, you should set + * `followUndoneDeletions` to false to get consistent results across all clients. + * + * When calculating the absolute position, we try to follow the "undone deletions". This yields + * better results for the user who performed undo. However, only the user who performed the undo + * will get the better results, the other users don't know which operations recreated a deleted + * range of content. There is more information in this ticket: https://github.com/yjs/yjs/issues/638 + * * @param {RelativePosition} rpos * @param {Doc} doc + * @param {boolean} followUndoneDeletions - whether to follow undone deletions - see https://github.com/yjs/yjs/issues/638 * @return {AbsolutePosition|null} * * @function */ -export const createAbsolutePositionFromRelativePosition = (rpos, doc) => { +export const createAbsolutePositionFromRelativePosition = (rpos, doc, followUndoneDeletions = true) => { const store = doc.store const rightID = rpos.item const typeID = rpos.type @@ -274,7 +286,7 @@ export const createAbsolutePositionFromRelativePosition = (rpos, doc) => { if (getState(store, rightID.client) <= rightID.clock) { return null } - const res = followRedone(store, rightID) + const res = followUndoneDeletions ? followRedone(store, rightID) : { item: getItem(store, rightID), diff: 0 } const right = res.item if (!(right instanceof Item)) { return null @@ -298,7 +310,7 @@ export const createAbsolutePositionFromRelativePosition = (rpos, doc) => { // type does not exist yet return null } - const { item } = followRedone(store, typeID) + const { item } = followUndoneDeletions ? followRedone(store, typeID) : { item: getItem(store, typeID) } if (item instanceof Item && item.content instanceof ContentType) { type = item.content.type } else { diff --git a/tests/relativePositions.tests.js b/tests/relativePositions.tests.js index 93fec230..ab86168b 100644 --- a/tests/relativePositions.tests.js +++ b/tests/relativePositions.tests.js @@ -101,3 +101,25 @@ export const testRelativePositionAssociationDifference = tc => { t.assert(posRight != null && posRight.index === 2) t.assert(posLeft != null && posLeft.index === 1) } + +/** + * @param {t.TestCase} tc + */ +export const testRelativePositionWithUndo = tc => { + const ydoc = new Y.Doc() + const ytext = ydoc.getText() + ytext.insert(0, 'hello world') + const rpos = Y.createRelativePositionFromTypeIndex(ytext, 1) + const um = new Y.UndoManager(ytext) + ytext.delete(0, 6) + t.assert(Y.createAbsolutePositionFromRelativePosition(rpos, ydoc)?.index === 0) + um.undo() + t.assert(Y.createAbsolutePositionFromRelativePosition(rpos, ydoc)?.index === 1) + const posWithoutFollow = Y.createAbsolutePositionFromRelativePosition(rpos, ydoc, false) + console.log({ posWithoutFollow }) + t.assert(Y.createAbsolutePositionFromRelativePosition(rpos, ydoc, false)?.index === 6) + const ydocClone = new Y.Doc() + Y.applyUpdate(ydocClone, Y.encodeStateAsUpdate(ydoc)) + t.assert(Y.createAbsolutePositionFromRelativePosition(rpos, ydocClone)?.index === 6) + t.assert(Y.createAbsolutePositionFromRelativePosition(rpos, ydocClone, false)?.index === 6) +} From 91b718cde076a76e0f028b4f21a143bd3064297a Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 27 Apr 2024 00:50:32 +0200 Subject: [PATCH 060/152] 13.6.15 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3001c522..94573a13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.14", + "version": "13.6.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.14", + "version": "13.6.15", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index d291b525..6d35562f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.14", + "version": "13.6.15", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 656b7e7f6a33dfef9f5ff844aa6572d02e6430c6 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 28 Apr 2024 21:16:58 +0200 Subject: [PATCH 061/152] add more users --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 80acf025..32e35dcd 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,9 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Evernote](https://evernote.com) Note-taking app :star2: * [Lessonspace](https://thelessonspace.com) Enterprise platform for virtual classrooms and online training :star2: +* [Ellipsus]{ellipsus.com} - Collaborative writing app for storytelling etc. + Supports versioning, change attribution, and "blame". A solution for the whole + publishing process (also selling) :star: * [Dynaboard](https://dynaboard.com/) Build web apps collaboratively. :star: * [Relm](https://www.relm.us/) A collaborative gameworld for teamwork and community. :star: @@ -109,6 +112,8 @@ Showcase](https://yjs-diagram.synergy.codes/). * [thinkdeli](https://thinkdeli.com) - A fast and simple notes app powered by AI * [ourboard](https://github.com/raimohanska/ourboard) - A collaborative whiteboard applicaiton +* [Ellie.ai](https://ellie.ai) - Data Product Design and Collaboration +* [GoPeer](https://gopeer.org/) - Collaborative tutoring ## Table of Contents From 54594a2d7546aef289542a7189edfa5bb0cade2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20Jan=C3=9Fen?= Date: Tue, 30 Apr 2024 16:29:06 +0200 Subject: [PATCH 062/152] Add y-op-sqlite to readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5c20b508..ebec926f 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,10 @@ Like y-indexeddb, but with sub-documents support and fully TypeScript.
A database and connection provider for Yjs based on Firestore.
+
y-op-sqlite
+
+Persist YJS updates in your React Native app using op-sqlite, the fastest SQLite library for React Native. +
# Ports From 06e71f651d7364630bcc93610e497ea1e3429ae8 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Thu, 9 May 2024 05:55:26 -0500 Subject: [PATCH 063/152] Fix y-websocket server path The commmit https://github.com/yjs/y-websocket/commit/c3d14cf07d8628431a7480213131ce58cad9adc9 renamed `server.js` to `server.cjs`; mirror that change here. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c20b508..a9d109a7 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ npm i yjs y-websocket Start the y-websocket server: ```sh -PORT=1234 node ./node_modules/y-websocket/bin/server.js +PORT=1234 node ./node_modules/y-websocket/bin/server.cjs ``` ### Example: Observe types From edad668dbdf64b590777b6086c00c27be0d27c09 Mon Sep 17 00:00:00 2001 From: i12345 Date: Wed, 15 May 2024 13:43:59 -0500 Subject: [PATCH 064/152] Update INTERNALS.md explained 53 bit JS numbers --- INTERNALS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INTERNALS.md b/INTERNALS.md index 3f4ae1db..8ec81c07 100644 --- a/INTERNALS.md +++ b/INTERNALS.md @@ -26,7 +26,7 @@ article](https://blog.kevinjahns.de/are-crdts-suitable-for-shared-editing/). Each client is assigned a unique *clientID* property on first insert. This is a random 53-bit integer (53 bits because that fits in the javascript safe integer -range). +range \[JavaScript uses IEEE 754 floats\]). ## List items From d67a951104d09685f86bf6870e07c93b9d5974d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20N=C3=B6tzold?= <69591795+MaxNoetzold@users.noreply.github.com> Date: Tue, 21 May 2024 15:30:24 +0200 Subject: [PATCH 065/152] add y-postgresql info to readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6e0a6377..e87792fb 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,10 @@ A database and connection provider for Yjs based on Firestore.
Persist YJS updates in your React Native app using op-sqlite, the fastest SQLite library for React Native.
+
y-postgresql
+
+Provides persistent storage for a web server using PostgreSQL and is easily compatible with y-websocket. +
# Ports From 03593aeeb15dcee35a8108d82f8fd912f27f15ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20N=C3=B6tzold?= <69591795+MaxNoetzold@users.noreply.github.com> Date: Tue, 21 May 2024 16:03:31 +0200 Subject: [PATCH 066/152] fix linting errors --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e87792fb..85748eee 100644 --- a/README.md +++ b/README.md @@ -270,11 +270,14 @@ A database and connection provider for Yjs based on Firestore.
y-op-sqlite
-Persist YJS updates in your React Native app using op-sqlite, the fastest SQLite library for React Native. + Persist YJS updates in your React Native app using + op-sqlite + , the fastest SQLite library for React Native.
y-postgresql
-Provides persistent storage for a web server using PostgreSQL and is easily compatible with y-websocket. + Provides persistent storage for a web server using PostgreSQL and + is easily compatible with y-websocket.
From 6932696795fff7f0c6b3c23a24b972a10a85320d Mon Sep 17 00:00:00 2001 From: Fuad Saud Date: Thu, 6 Jun 2024 13:38:08 +0200 Subject: [PATCH 067/152] Export mergeDeleteSets Useful for comparing snapshots. --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index ae96b747..b13b2077 100644 --- a/src/index.js +++ b/src/index.js @@ -100,6 +100,7 @@ export { UpdateDecoderV1, UpdateDecoderV2, equalDeleteSets, + mergeDeleteSets, snapshotContainsUpdate } from './internals.js' From 0678ed1eb520f471f46c2f8a4f929565c2d622f9 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 10 Jun 2024 12:18:16 +0200 Subject: [PATCH 068/152] fix event.path in observeDeep - closes #457 --- src/utils/YEvent.js | 4 ++-- tests/y-array.tests.js | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/utils/YEvent.js b/src/utils/YEvent.js index 13174148..d6a60242 100644 --- a/src/utils/YEvent.js +++ b/src/utils/YEvent.js @@ -264,8 +264,8 @@ const getPathTo = (parent, child) => { let i = 0 let c = /** @type {AbstractType} */ (child._item.parent)._start while (c !== child._item && c !== null) { - if (!c.deleted) { - i++ + if (!c.deleted && c.countable) { + i += c.length } c = c.right } diff --git a/tests/y-array.tests.js b/tests/y-array.tests.js index 941598ac..9875e85e 100644 --- a/tests/y-array.tests.js +++ b/tests/y-array.tests.js @@ -330,6 +330,29 @@ export const testObserveDeepEventOrder = tc => { } } +/** + * Correct index when computing event.path in observeDeep - https://github.com/yjs/yjs/issues/457 + * + * @param {t.TestCase} _tc + */ +export const testObservedeepIndexes = _tc => { + const doc = new Y.Doc() + const map = doc.getMap() + // Create a field with the array as value + map.set('my-array', new Y.Array()) + // Fill the array with some strings and our Map + map.get('my-array').push(['a', 'b', 'c', new Y.Map()]) + /** + * @type {Array} + */ + let eventPath = [] + map.observeDeep((events) => { eventPath = events[0].path }) + // set a value on the map inside of our array + map.get('my-array').get(3).set('hello', 'world') + console.log(eventPath) + t.compare(eventPath, ['my-array', 3]) +} + /** * @param {t.TestCase} tc */ From fbd088ee785cf6e22c5d009b436473f14210dfeb Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 10 Jun 2024 12:21:06 +0200 Subject: [PATCH 069/152] 13.6.16 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 94573a13..6c3fe7d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.15", + "version": "13.6.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.15", + "version": "13.6.16", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index 6d35562f..795aab1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.15", + "version": "13.6.16", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 88506f6d789def87043a3dcabcd20fa7872eb14f Mon Sep 17 00:00:00 2001 From: Sebastian Szvetecz Date: Wed, 12 Jun 2024 01:12:13 +0200 Subject: [PATCH 070/152] Fixed star icon in README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 85748eee..35e5ca80 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [AFFiNE](https://affine.pro/) A local-first, privacy-first, open source knowledge base. :star2: -* [Huly](https://huly.io/) - Open Source All-in-One Project Management Platform - :star2: +* [Huly](https://huly.io/) - Open Source All-in-One Project Management Platform :star2: * [Cargo](https://cargo.site/) Site builder for designers and artists :star2: * [Gitbook](https://gitbook.com) Knowledge management for technical teams :star2: * [Evernote](https://evernote.com) Note-taking app :star2: From 2e79d0369ecc73305c361d9baad4b8aaf7d0027b Mon Sep 17 00:00:00 2001 From: Sebastian Szvetecz Date: Wed, 12 Jun 2024 01:12:48 +0200 Subject: [PATCH 071/152] Fixed markdown link for ellipsus.org in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35e5ca80..4626fd15 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Evernote](https://evernote.com) Note-taking app :star2: * [Lessonspace](https://thelessonspace.com) Enterprise platform for virtual classrooms and online training :star2: -* [Ellipsus]{ellipsus.com} - Collaborative writing app for storytelling etc. +* [Ellipsus](ellipsus.com) - Collaborative writing app for storytelling etc. Supports versioning, change attribution, and "blame". A solution for the whole publishing process (also selling) :star: * [Dynaboard](https://dynaboard.com/) Build web apps collaboratively. :star: From d4dac558c036f34000fd565b7961ed27e6f8f352 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 17 Jun 2024 15:12:31 +0200 Subject: [PATCH 072/152] fix creating relative position from json when type name is the empty string --- src/utils/RelativePosition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/RelativePosition.js b/src/utils/RelativePosition.js index 744dff37..214fc6f0 100644 --- a/src/utils/RelativePosition.js +++ b/src/utils/RelativePosition.js @@ -102,7 +102,7 @@ export const relativePositionToJSON = rpos => { * * @function */ -export const createRelativePositionFromJSON = json => new RelativePosition(json.type == null ? null : createID(json.type.client, json.type.clock), json.tname || null, json.item == null ? null : createID(json.item.client, json.item.clock), json.assoc == null ? 0 : json.assoc) +export const createRelativePositionFromJSON = json => new RelativePosition(json.type == null ? null : createID(json.type.client, json.type.clock), json.tname ?? null, json.item == null ? null : createID(json.item.client, json.item.clock), json.assoc == null ? 0 : json.assoc) export class AbsolutePosition { /** From 34b06b6cf918266bbd4f646f193b9fa3d408089b Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 17 Jun 2024 15:15:04 +0200 Subject: [PATCH 073/152] 13.6.17 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c3fe7d7..cb163c67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.16", + "version": "13.6.17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.16", + "version": "13.6.17", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index 795aab1e..7ad73ac8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.16", + "version": "13.6.17", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 3f1746f3a9323c951794ab1142de8a7a56ed8077 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 17 Jun 2024 20:29:14 +0200 Subject: [PATCH 074/152] add lexical editor --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4626fd15..da7d827e 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,8 @@ are implemented in separate modules. | [Monaco](https://microsoft.github.io/monaco-editor/) | ✔ | [y-monaco](https://github.com/yjs/y-monaco) | [demo](https://demos.yjs.dev/monaco/monaco.html) | | [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) | +| [Lexical](https://lexical.dev/) | ✔ | (native) | [demo](https://lexical.dev/docs/collaboration/react#see-it-in-action) | + | [valtio](https://github.com/pmndrs/valtio) | | [valtio-yjs](https://github.com/dai-shi/valtio-yjs) | [demo](https://codesandbox.io/s/valtio-yjs-demo-ox3iy) | | [immer](https://github.com/immerjs/immer) | | [immer-yjs](https://github.com/sep2/immer-yjs) | [demo](https://codesandbox.io/s/immer-yjs-demo-6e0znb) | | React / Vue / Svelte / MobX | | [SyncedStore](https://syncedstore.org) | [demo](https://syncedstore.org/docs/react) | From 2e5abad7739288c6c3ccd5488dd28941da9982d2 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 18 Jun 2024 16:51:57 +0200 Subject: [PATCH 075/152] fix #645 yjs/y-utility#8 --- README.md | 1 - src/utils/UndoManager.js | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index da7d827e..e19b9dc8 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,6 @@ are implemented in separate modules. | [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) | | [Lexical](https://lexical.dev/) | ✔ | (native) | [demo](https://lexical.dev/docs/collaboration/react#see-it-in-action) | - | [valtio](https://github.com/pmndrs/valtio) | | [valtio-yjs](https://github.com/dai-shi/valtio-yjs) | [demo](https://codesandbox.io/s/valtio-yjs-demo-ox3iy) | | [immer](https://github.com/immerjs/immer) | | [immer-yjs](https://github.com/sep2/immer-yjs) | [demo](https://codesandbox.io/s/immer-yjs-demo-6e0znb) | | React / Vue / Svelte / MobX | | [SyncedStore](https://syncedstore.org) | [demo](https://syncedstore.org/docs/react) | diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index 27023ecf..a3645cd8 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -118,12 +118,13 @@ const popStackItem = (undoManager, stack, eventType) => { }) _tr = transaction }, undoManager) - if (undoManager.currStackItem != null) { + const res = undoManager.currStackItem + if (res != null) { const changedParentTypes = _tr.changedParentTypes - undoManager.emit('stack-item-popped', [{ stackItem: undoManager.currStackItem, type: eventType, changedParentTypes, origin: undoManager }, undoManager]) + undoManager.emit('stack-item-popped', [{ stackItem: res, type: eventType, changedParentTypes, origin: undoManager }, undoManager]) undoManager.currStackItem = null } - return undoManager.currStackItem + return res } /** From 1bfa6dfb74704d527f74f7f06f4f92a9eb66be2c Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 18 Jun 2024 16:59:36 +0200 Subject: [PATCH 076/152] 13.6.18 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cb163c67..7d95ce38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.17", + "version": "13.6.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.17", + "version": "13.6.18", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index 7ad73ac8..16c95a9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.17", + "version": "13.6.18", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 5e19c35405ab20bf63fe75abe93fe404b5128819 Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Mon, 24 Jun 2024 13:35:55 +0200 Subject: [PATCH 077/152] add react-yjs to bindings --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e19b9dc8..b7265b42 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ are implemented in separate modules. | [Lexical](https://lexical.dev/) | ✔ | (native) | [demo](https://lexical.dev/docs/collaboration/react#see-it-in-action) | | [valtio](https://github.com/pmndrs/valtio) | | [valtio-yjs](https://github.com/dai-shi/valtio-yjs) | [demo](https://codesandbox.io/s/valtio-yjs-demo-ox3iy) | | [immer](https://github.com/immerjs/immer) | | [immer-yjs](https://github.com/sep2/immer-yjs) | [demo](https://codesandbox.io/s/immer-yjs-demo-6e0znb) | +| React | | [react-yjs](https://github.com/nikgraf/react-yjs) | [demo](https://react-yjs-example.vercel.app/) | | React / Vue / Svelte / MobX | | [SyncedStore](https://syncedstore.org) | [demo](https://syncedstore.org/docs/react) | | [mobx-keystone](https://mobx-keystone.js.org/) | | [mobx-keystone-yjs](https://github.com/xaviergonz/mobx-keystone/tree/master/packages/mobx-keystone-yjs) | [demo](https://mobx-keystone.js.org/examples/yjs-binding) | From f29cd2baf44a45f3664b1be1bf0b9bc9c9cb9915 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 10 Jul 2024 17:52:23 +0200 Subject: [PATCH 078/152] update users --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b7265b42..4378f584 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,9 @@ Showcase](https://yjs-diagram.synergy.codes/). applicaiton * [Ellie.ai](https://ellie.ai) - Data Product Design and Collaboration * [GoPeer](https://gopeer.org/) - Collaborative tutoring -* [screen.garden](https://screen.garden) Collaborative backend for PKM apps. +* [screen.garden](https://screen.garden) - Collaborative backend for PKM apps. +* [NextCloud](https://nextcloud.com/) - Content Collaboration Platform +* [keystatic](https://github.com/Thinkmill/keystatic) - git-based CMS ## Table of Contents From c944a4553c94be1a4b87fd35e950938f0f2900c8 Mon Sep 17 00:00:00 2001 From: Mikko Reinikainen Date: Tue, 30 Jul 2024 12:55:11 +0300 Subject: [PATCH 079/152] Add Y.Array.from() and yarray.clone() to API docs --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4378f584..31142780 100644 --- a/README.md +++ b/README.md @@ -412,6 +412,8 @@ necessary.

const yarray = new Y.Array()
+ Y.Array.from(Array<object|boolean|Array|string|number|null|Uint8Array|Y.Type>): Y.Array +
An alternative factory function to create a Y.Array based on existing content.
parent:Y.AbstractType|null
insert(index:number, content:Array<object|boolean|Array|string|number|null|Uint8Array|Y.Type>) @@ -441,6 +443,8 @@ forEach(function(value:object|boolean|Array|string|number|null|Uint8Array|Y.Type
map(function(T, number, YArray):M):Array<M>
+ clone(): Y.Array +
Clone all values into a fresh Y.Array instance. The returned type can be included into the Yjs document.
toArray():Array<object|boolean|Array|string|number|null|Uint8Array|Y.Type>
Copies the content of this YArray to a new Array.
toJSON():Array<Object|boolean|Array|string|number|null> From 294c6a15c5ee9de478fbbe45f9bdcbed03842dbd Mon Sep 17 00:00:00 2001 From: Mikko Reinikainen Date: Tue, 30 Jul 2024 12:55:45 +0300 Subject: [PATCH 080/152] Remove erroneous ymap.get(index:number) from API docs --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 31142780..5f6cfb0a 100644 --- a/README.md +++ b/README.md @@ -501,8 +501,6 @@ or any of its children.
has(key:string):boolean
- get(index:number) -
clear()
Removes all elements from this YMap.
clone():Y.Map From eeb4c9969d68baa5b42c1b52cb15372bad7785c5 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 5 Aug 2024 16:14:47 +0200 Subject: [PATCH 081/152] lint readme --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f6cfb0a..502d2869 100644 --- a/README.md +++ b/README.md @@ -412,7 +412,10 @@ necessary.

const yarray = new Y.Array()
- Y.Array.from(Array<object|boolean|Array|string|number|null|Uint8Array|Y.Type>): Y.Array + +Y.Array.from(Array<object|boolean|Array|string|number|null|Uint8Array|Y.Type>): +Y.Array +
An alternative factory function to create a Y.Array based on existing content.
parent:Y.AbstractType|null
@@ -444,7 +447,10 @@ forEach(function(value:object|boolean|Array|string|number|null|Uint8Array|Y.Type map(function(T, number, YArray):M):Array<M>
clone(): Y.Array -
Clone all values into a fresh Y.Array instance. The returned type can be included into the Yjs document.
+
+Clone all values into a fresh Y.Array instance. The returned type can be +included into the Yjs document. +
toArray():Array<object|boolean|Array|string|number|null|Uint8Array|Y.Type>
Copies the content of this YArray to a new Array.
toJSON():Array<Object|boolean|Array|string|number|null> From dd17228a8f410bfe5d3ef2e853973a1e678a3bd8 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 6 Aug 2024 16:37:52 +0200 Subject: [PATCH 082/152] update markdownlint --- package-lock.json | 646 +++++++++++++++++++++++++++++++++++----------- package.json | 2 +- 2 files changed, 495 insertions(+), 153 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d95ce38..e01df332 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "concurrently": "^3.6.1", "http-server": "^0.12.3", "jsdoc": "^3.6.7", - "markdownlint-cli": "^0.23.2", + "markdownlint-cli": "^0.41.0", "rollup": "^3.20.0", "standard": "^16.0.4", "tui-jsdoc-template": "^1.2.2", @@ -166,12 +166,89 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@rollup/plugin-commonjs": { "version": "24.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz", @@ -773,13 +850,12 @@ } }, "node_modules/deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": ">=4.0.0" } }, "node_modules/deep-is": { @@ -882,6 +958,12 @@ "domelementtype": "1" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ecstatic": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz", @@ -1791,6 +1873,22 @@ "is-callable": "^1.1.3" } }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1873,12 +1971,15 @@ } }, "node_modules/get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha512-jZV7n6jGE3Gt7fgSTJoz91Ak5MuTLwMwkoYdjxuJ/AmjIsE1UC03y/IWkZCQGEvVNS9qoRNwy5BCqxImv0FVeA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", "dev": true, "engines": { - "node": ">=0.12.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/get-symbol-description": { @@ -1977,12 +2078,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w==", - "dev": true - }, "node_modules/has": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", @@ -2148,9 +2243,9 @@ } }, "node_modules/ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -2198,10 +2293,13 @@ "dev": true }, "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/internal-slot": { "version": "1.0.7", @@ -2499,6 +2597,21 @@ "url": "https://github.com/sponsors/dmonad" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2611,11 +2724,20 @@ } }, "node_modules/jsonc-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz", - "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", "dev": true }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -2742,12 +2864,6 @@ "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", "dev": true }, - "node_modules/lodash.differencewith": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.differencewith/-/lodash.differencewith-4.5.0.tgz", - "integrity": "sha512-/8JFjydAS+4bQuo3CpLMBv7WxGFyk7/etOAsrQUCu0a9QVDemxv0YQ0rFyeZvqlUD314SERfNlgnlqqHmaQ0Cg==", - "dev": true - }, "node_modules/lodash.filter": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", @@ -2871,145 +2987,164 @@ } }, "node_modules/markdownlint": { - "version": "0.20.4", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.20.4.tgz", - "integrity": "sha512-jpfaPgjT0OpeBbemjYNZbzGG3hCLcAIvrm/pEY3+q/szDScG6ZonDacqySVRJAv9glbo8y4wBPJ0wgW17+9GGA==", + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.34.0.tgz", + "integrity": "sha512-qwGyuyKwjkEMOJ10XN6OTKNOVYvOIi35RNvDLNxTof5s8UmyGHlCdpngRHoRGNvQVGuxO3BJ7uNSgdeX166WXw==", "dev": true, "dependencies": { - "markdown-it": "10.0.0" + "markdown-it": "14.1.0", + "markdownlint-micromark": "0.1.9" }, "engines": { - "node": ">=10" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" } }, "node_modules/markdownlint-cli": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.23.2.tgz", - "integrity": "sha512-OSl5OZ8xzGN6z355cqRkiq67zPi3reJimklaF72p0554q85Dng5ToOjjSB9tDKZebSt85jX8cp+ruoQlPqOsPA==", - "dev": true, - "dependencies": { - "commander": "~2.9.0", - "deep-extend": "~0.5.1", - "get-stdin": "~5.0.1", - "glob": "~7.1.2", - "ignore": "~5.1.4", - "js-yaml": "~3.13.1", - "jsonc-parser": "~2.2.0", - "lodash.differencewith": "~4.5.0", - "lodash.flatten": "~4.4.0", - "markdownlint": "~0.20.4", - "markdownlint-rule-helpers": "~0.11.0", - "minimatch": "~3.0.4", - "minimist": "~1.2.5", - "rc": "~1.2.7" + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.41.0.tgz", + "integrity": "sha512-kp29tKrMKdn+xonfefjp3a/MsNzAd9c5ke0ydMEI9PR98bOjzglYN4nfMSaIs69msUf1DNkgevAIAPtK2SeX0Q==", + "dev": true, + "dependencies": { + "commander": "~12.1.0", + "get-stdin": "~9.0.0", + "glob": "~10.4.1", + "ignore": "~5.3.1", + "js-yaml": "^4.1.0", + "jsonc-parser": "~3.2.1", + "jsonpointer": "5.0.1", + "markdownlint": "~0.34.0", + "minimatch": "~9.0.4", + "run-con": "~1.3.2", + "smol-toml": "~1.2.0" }, "bin": { "markdownlint": "markdownlint.js" }, "engines": { - "node": ">=10" - } - }, - "node_modules/markdownlint-cli/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "node": ">=18" } }, "node_modules/markdownlint-cli/node_modules/commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha512-bmkUukX8wAOjHdN26xj5c4ctEV22TQ7dQYhSmuckKhToXrkUn0iIaolHdIxYYqD55nhpSPA9zPQ1yP57GdXP2A==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, - "dependencies": { - "graceful-readlink": ">= 1.0.0" - }, "engines": { - "node": ">= 0.6.x" + "node": ">=18" } }, "node_modules/markdownlint-cli/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": "*" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/markdownlint-cli/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/markdownlint-cli/node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/markdownlint-rule-helpers": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.11.0.tgz", - "integrity": "sha512-PhGii9dOiDJDXxiRMpK8N0FM9powprvRPsXALgkjlSPTwLh6ymH+iF3iUe3nq8KGu26tclFBlLL5xAGy/zb7FA==", - "dev": true - }, - "node_modules/markdownlint/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/markdownlint-micromark": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/markdownlint-micromark/-/markdownlint-micromark-0.1.9.tgz", + "integrity": "sha512-5hVs/DzAFa8XqYosbEAEg6ok6MF2smDj89ztn9pKkCtdKHVdPQuGMH7frFfYL9mLkvfFe4pTyAMffLbjf3/EyA==", "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" } }, "node_modules/markdownlint/node_modules/entities": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", - "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", - "dev": true + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, "node_modules/markdownlint/node_modules/linkify-it": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "dev": true, "dependencies": { - "uc.micro": "^1.0.1" + "uc.micro": "^2.0.0" } }, "node_modules/markdownlint/node_modules/markdown-it": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", - "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "entities": "~2.0.0", - "linkify-it": "^2.0.0", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" }, "bin": { - "markdown-it": "bin/markdown-it.js" + "markdown-it": "bin/markdown-it.mjs" } }, + "node_modules/markdownlint/node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true + }, + "node_modules/markdownlint/node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true + }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -3061,6 +3196,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -3280,6 +3424,12 @@ "node": ">=4" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -3338,6 +3488,28 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "node_modules/path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -3555,6 +3727,15 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { "version": "6.11.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", @@ -3570,39 +3751,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -3802,6 +3950,21 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-con": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.3.2.tgz", + "integrity": "sha512-CcfE+mYiTcKEzg0IqS08+efdnH0oJ3zV0wSUFBNrMHMuxCtXvBCLzCJHatwuXDcu/RlhjTziTo/a1ruQik6/Yg==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~4.1.0", + "minimist": "^1.2.8", + "strip-json-comments": "~3.1.1" + }, + "bin": { + "run-con": "cli.js" + } + }, "node_modules/rx": { "version": "2.3.24", "resolved": "https://registry.npmjs.org/rx/-/rx-2.3.24.tgz", @@ -3948,6 +4111,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -3998,6 +4173,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/smol-toml": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.2.2.tgz", + "integrity": "sha512-fVEjX2ybKdJKzFL46VshQbj9PuA4IUKivalgp48/3zwS9vXzyykzQ6AX92UxHSvWJagziMRLeHMgEzoGO7A8hQ==", + "dev": true, + "engines": { + "node": ">= 18" + } + }, "node_modules/spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", @@ -4142,6 +4326,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", @@ -4219,6 +4418,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -4575,6 +4787,136 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 16c95a9a..68bb42b4 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "concurrently": "^3.6.1", "http-server": "^0.12.3", "jsdoc": "^3.6.7", - "markdownlint-cli": "^0.23.2", + "markdownlint-cli": "^0.41.0", "rollup": "^3.20.0", "standard": "^16.0.4", "tui-jsdoc-template": "^1.2.2", From 44e51080afab40c8ee1441766e31de0a2b9b72ce Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 6 Aug 2024 16:48:14 +0200 Subject: [PATCH 083/152] fix new lint issues --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 502d2869..8c21c464 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ > A CRDT framework with a powerful abstraction of shared data -Yjs is a [CRDT implementation](#Yjs-CRDT-Algorithm) that exposes its internal +Yjs is a [CRDT implementation](#yjs-crdt-algorithm) that exposes its internal data structure as *shared types*. Shared types are common data types like `Map` or `Array` with superpowers: changes are automatically distributed to other peers and merged without merge conflicts. @@ -119,19 +119,19 @@ Showcase](https://yjs-diagram.synergy.codes/). ## Table of Contents -* [Overview](#Overview) - * [Bindings](#Bindings) - * [Providers](#Providers) - * [Ports](#Ports) -* [Getting Started](#Getting-Started) -* [API](#API) - * [Shared Types](#Shared-Types) - * [Y.Doc](#YDoc) - * [Document Updates](#Document-Updates) - * [Relative Positions](#Relative-Positions) - * [Y.UndoManager](#YUndoManager) -* [Yjs CRDT Algorithm](#Yjs-CRDT-Algorithm) -* [License and Author](#License-and-Author) +* [Overview](#overview) + * [Bindings](#bindings) + * [Providers](#providers) + * [Ports](#ports) +* [Getting Started](#getting-started) +* [API](#api) + * [Shared Types](#shared-types) + * [Y.Doc](#ydoc) + * [Document Updates](#document-updates) + * [Relative Positions](#relative-positions) + * [Y.UndoManager](#yundomanager) +* [Yjs CRDT Algorithm](#yjs-crdt-algorithm) +* [License and Author](#license-and-author) ## Overview @@ -860,7 +860,7 @@ doc1.getArray('myarray').insert(0, ['Hello doc2, you got this?']) doc2.getArray('myarray').get(0) // => 'Hello doc2, you got this?' ``` -Yjs internally maintains a [state vector](#State-Vector) that denotes the next +Yjs internally maintains a [state vector](#state-vector) that denotes the next expected clock from each client. In a different interpretation it holds the number of structs created by each client. When two clients sync, you can either exchange the complete document structure or only the differences by sending the From 5b4d2a6bcf63e26f0637f9e83b4202d5f535906a Mon Sep 17 00:00:00 2001 From: Julian Lehrhuber Date: Thu, 29 Aug 2024 14:24:29 +0200 Subject: [PATCH 084/152] Add QDAcity to `README.md` --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8c21c464..e9f414e0 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [screen.garden](https://screen.garden) - Collaborative backend for PKM apps. * [NextCloud](https://nextcloud.com/) - Content Collaboration Platform * [keystatic](https://github.com/Thinkmill/keystatic) - git-based CMS +* [QDAcity](https://qdacity.com) - Collaborative qualitative data analysis platform ## Table of Contents From f2ff8b95367250b8d080db0c98940997de1bc986 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 30 Aug 2024 19:09:59 +0200 Subject: [PATCH 085/152] add kanbert as a user --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e9f414e0..775f6125 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [NextCloud](https://nextcloud.com/) - Content Collaboration Platform * [keystatic](https://github.com/Thinkmill/keystatic) - git-based CMS * [QDAcity](https://qdacity.com) - Collaborative qualitative data analysis platform +* [Kanbert](https://kanbert.com) - Project management software ## Table of Contents From 95e2bc44297af7390806b902784b80f804309b33 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 2 Sep 2024 18:54:19 +0200 Subject: [PATCH 086/152] add secsync --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 775f6125..c21804ea 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,11 @@ The reactive data store for local-first apps. They support multiple CRDTs and
Provider for sharing data in webxdc chat apps.
+
secsync
+
+An architecture to relay end-to-end encrypted CRDTs over a central service. +
+
#### Persistence Providers From 7422b18e87cb41ac675c17ea09dfa832253b6cd2 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 4 Sep 2024 00:02:19 +0200 Subject: [PATCH 087/152] add eclipse theia as a user --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c21804ea..844c9159 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,8 @@ Showcase](https://yjs-diagram.synergy.codes/). * [keystatic](https://github.com/Thinkmill/keystatic) - git-based CMS * [QDAcity](https://qdacity.com) - Collaborative qualitative data analysis platform * [Kanbert](https://kanbert.com) - Project management software +* [Eclipse Theia](https://github.com/eclipse-theia/theia) - A cloud & desktop + IDE that runs in the browser. ## Table of Contents From c1ef9a12b95619e6a148f41754c2b99847be50c4 Mon Sep 17 00:00:00 2001 From: Batchor Date: Thu, 5 Sep 2024 15:22:40 -0700 Subject: [PATCH 088/152] add ScienHub as a user. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 844c9159..aae97bc9 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Kanbert](https://kanbert.com) - Project management software * [Eclipse Theia](https://github.com/eclipse-theia/theia) - A cloud & desktop IDE that runs in the browser. +* [ScienHub](https://scienhub.com) - An AI-empowered scientific collaboration platform. ## Table of Contents From 4fb7789cdd8ccc1c535e850f99d5e4b91849a7cd Mon Sep 17 00:00:00 2001 From: Batchor Date: Thu, 5 Sep 2024 15:23:58 -0700 Subject: [PATCH 089/152] add ScienHub as a user. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aae97bc9..7da8f849 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Kanbert](https://kanbert.com) - Project management software * [Eclipse Theia](https://github.com/eclipse-theia/theia) - A cloud & desktop IDE that runs in the browser. -* [ScienHub](https://scienhub.com) - An AI-empowered scientific collaboration platform. +* [ScienHub](https://scienhub.com) - Collaborative LaTeX editor in the browser. ## Table of Contents From f604250fc3af79fe1c6fb40a5e309e2f67719f10 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 10 Sep 2024 15:35:46 +0200 Subject: [PATCH 090/152] add `ydoc.isDestroyed` property --- src/utils/Doc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/Doc.js b/src/utils/Doc.js index 62643617..d5165426 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -104,6 +104,7 @@ export class Doc extends ObservableV2 { * lost (with false as a parameter). */ this.isSynced = false + this.isDestroyed = false /** * Promise that resolves once the document has been loaded from a presistence provider. */ @@ -322,6 +323,7 @@ export class Doc extends ObservableV2 { * Emit `destroy` event and unregister all event handlers. */ destroy () { + this.isDestroyed = true array.from(this.subdocs).forEach(subdoc => subdoc.destroy()) const item = this._item if (item !== null) { From 9a993f81d43690a9e25e54735dff70769371ff2b Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 10 Sep 2024 15:37:58 +0200 Subject: [PATCH 091/152] 13.6.19 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e01df332..c0757f88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.18", + "version": "13.6.19", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.18", + "version": "13.6.19", "license": "MIT", "dependencies": { "lib0": "^0.2.86" diff --git a/package.json b/package.json index 68bb42b4..3452ac16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.18", + "version": "13.6.19", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 8cd1a482bbcfb34c1a557afc7a15cdbb1816b7fd Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 26 Sep 2024 19:30:25 +0200 Subject: [PATCH 092/152] Y.Array.length should be 0 before it is integrated - #666 --- src/types/YArray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/YArray.js b/src/types/YArray.js index 38b4e11f..c70f2cda 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -104,7 +104,7 @@ export class YArray extends AbstractType { } get length () { - return this._prelimContent === null ? this._length : this._prelimContent.length + return this._length } /** From 3bf44b98505abadd8b73db7492d2079484c38733 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 4 Oct 2024 21:07:19 +0200 Subject: [PATCH 093/152] #667 - add sanity messages when data is read before type is added to a document. --- src/types/AbstractType.js | 21 +++++++++++++++++++-- src/types/YArray.js | 2 ++ src/types/YMap.js | 11 +++++++---- src/types/YText.js | 4 ++++ src/types/YXmlFragment.js | 3 +++ 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 3dff240c..24fa8802 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -17,6 +17,12 @@ import * as map from 'lib0/map' import * as iterator from 'lib0/iterator' import * as error from 'lib0/error' import * as math from 'lib0/math' +import * as log from 'lib0/logging' + +/** + * https://docs.yjs.dev/getting-started/working-with-shared-types#caveats + */ +export const warnPrematureAccess = () => { log.warn('Invalid access: Add Yjs type to a document before reading data.') } const maxSearchMarker = 80 @@ -215,6 +221,7 @@ export const updateMarkerChanges = (searchMarker, index, len) => { * @return {Array} */ export const getTypeChildren = t => { + t.doc ?? warnPrematureAccess() let s = t._start const arr = [] while (s) { @@ -408,6 +415,7 @@ export class AbstractType { * @function */ export const typeListSlice = (type, start, end) => { + type.doc ?? warnPrematureAccess() if (start < 0) { start = type._length + start } @@ -443,6 +451,7 @@ export const typeListSlice = (type, start, end) => { * @function */ export const typeListToArray = type => { + type.doc ?? warnPrematureAccess() const cs = [] let n = type._start while (n !== null) { @@ -492,6 +501,7 @@ export const typeListToArraySnapshot = (type, snapshot) => { export const typeListForEach = (type, f) => { let index = 0 let n = type._start + type.doc ?? warnPrematureAccess() while (n !== null) { if (n.countable && !n.deleted) { const c = n.content.getContent() @@ -606,6 +616,7 @@ export const typeListForEachSnapshot = (type, f, snapshot) => { * @function */ export const typeListGet = (type, index) => { + type.doc ?? warnPrematureAccess() const marker = findMarker(type, index) let n = type._start if (marker !== null) { @@ -874,6 +885,7 @@ export const typeMapSet = (transaction, parent, key, value) => { * @function */ export const typeMapGet = (parent, key) => { + parent.doc ?? warnPrematureAccess() const val = parent._map.get(key) return val !== undefined && !val.deleted ? val.content.getContent()[val.length - 1] : undefined } @@ -890,6 +902,7 @@ export const typeMapGetAll = (parent) => { * @type {Object} */ const res = {} + parent.doc ?? warnPrematureAccess() parent._map.forEach((value, key) => { if (!value.deleted) { res[key] = value.content.getContent()[value.length - 1] @@ -907,6 +920,7 @@ export const typeMapGetAll = (parent) => { * @function */ export const typeMapHas = (parent, key) => { + parent.doc ?? warnPrematureAccess() const val = parent._map.get(key) return val !== undefined && !val.deleted } @@ -957,10 +971,13 @@ export const typeMapGetAllSnapshot = (parent, snapshot) => { } /** - * @param {Map} map + * @param {AbstractType & { _map: Map }} type * @return {IterableIterator>} * * @private * @function */ -export const createMapIterator = map => iterator.iteratorFilter(map.entries(), /** @param {any} entry */ entry => !entry[1].deleted) +export const createMapIterator = type => { + type.doc ?? warnPrematureAccess() + return iterator.iteratorFilter(type._map.entries(), /** @param {any} entry */ entry => !entry[1].deleted) +} diff --git a/src/types/YArray.js b/src/types/YArray.js index c70f2cda..8fd5c215 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -16,6 +16,7 @@ import { YArrayRefID, callTypeObservers, transact, + warnPrematureAccess, ArraySearchMarker, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Doc, Transaction, Item // eslint-disable-line } from '../internals.js' import { typeListSlice } from './AbstractType.js' @@ -104,6 +105,7 @@ export class YArray extends AbstractType { } get length () { + this.doc ?? warnPrematureAccess() return this._length } diff --git a/src/types/YMap.js b/src/types/YMap.js index 974e7316..22b94afb 100644 --- a/src/types/YMap.js +++ b/src/types/YMap.js @@ -13,6 +13,7 @@ import { YMapRefID, callTypeObservers, transact, + warnPrematureAccess, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Doc, Transaction, Item // eslint-disable-line } from '../internals.js' @@ -121,6 +122,7 @@ export class YMap extends AbstractType { * @return {Object} */ toJSON () { + this.doc ?? warnPrematureAccess() /** * @type {Object} */ @@ -140,7 +142,7 @@ export class YMap extends AbstractType { * @return {number} */ get size () { - return [...createMapIterator(this._map)].length + return [...createMapIterator(this)].length } /** @@ -149,7 +151,7 @@ export class YMap extends AbstractType { * @return {IterableIterator} */ keys () { - return iterator.iteratorMap(createMapIterator(this._map), /** @param {any} v */ v => v[0]) + return iterator.iteratorMap(createMapIterator(this), /** @param {any} v */ v => v[0]) } /** @@ -158,7 +160,7 @@ export class YMap extends AbstractType { * @return {IterableIterator} */ values () { - return iterator.iteratorMap(createMapIterator(this._map), /** @param {any} v */ v => v[1].content.getContent()[v[1].length - 1]) + return iterator.iteratorMap(createMapIterator(this), /** @param {any} v */ v => v[1].content.getContent()[v[1].length - 1]) } /** @@ -167,7 +169,7 @@ export class YMap extends AbstractType { * @return {IterableIterator<[string, MapType]>} */ entries () { - return iterator.iteratorMap(createMapIterator(this._map), /** @param {any} v */ v => /** @type {any} */ ([v[0], v[1].content.getContent()[v[1].length - 1]])) + return iterator.iteratorMap(createMapIterator(this), /** @param {any} v */ v => /** @type {any} */ ([v[0], v[1].content.getContent()[v[1].length - 1]])) } /** @@ -176,6 +178,7 @@ export class YMap extends AbstractType { * @param {function(MapType,string,YMap):void} f A function to execute on every element of this YArray. */ forEach (f) { + this.doc ?? warnPrematureAccess() this._map.forEach((item, key) => { if (!item.deleted) { f(item.content.getContent()[item.length - 1], key, this) diff --git a/src/types/YText.js b/src/types/YText.js index 8919b009..d4c59f03 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -26,6 +26,7 @@ import { typeMapGetAll, updateMarkerChanges, ContentType, + warnPrematureAccess, ArraySearchMarker, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, ID, Doc, Item, Snapshot, Transaction // eslint-disable-line } from '../internals.js' @@ -875,6 +876,7 @@ export class YText extends AbstractType { * @type {number} */ get length () { + this.doc ?? warnPrematureAccess() return this._length } @@ -931,6 +933,7 @@ export class YText extends AbstractType { * @public */ toString () { + this.doc ?? warnPrematureAccess() let str = '' /** * @type {Item|null} @@ -1004,6 +1007,7 @@ export class YText extends AbstractType { * @public */ toDelta (snapshot, prevSnapshot, computeYChange) { + this.doc ?? warnPrematureAccess() /** * @type{Array} */ diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js index 1445139c..2c0e9c5b 100644 --- a/src/types/YXmlFragment.js +++ b/src/types/YXmlFragment.js @@ -17,6 +17,7 @@ import { transact, typeListGet, typeListSlice, + warnPrematureAccess, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Doc, ContentType, Transaction, Item, YXmlText, YXmlHook // eslint-disable-line } from '../internals.js' @@ -66,6 +67,7 @@ export class YXmlTreeWalker { */ this._currentNode = /** @type {Item} */ (root._start) this._firstCall = true + root.doc ?? warnPrematureAccess() } [Symbol.iterator] () { @@ -177,6 +179,7 @@ export class YXmlFragment extends AbstractType { } get length () { + this.doc ?? warnPrematureAccess() return this._prelimContent === null ? this._length : this._prelimContent.length } From 8152cf81cb6f11f96339450e2b0b061fed875063 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 4 Oct 2024 21:23:59 +0200 Subject: [PATCH 094/152] [#667] sanity checks for Yjs caveats. In dev_mode, objects inserted into Yjs can't be manipulated. --- package-lock.json | 9 +++++---- package.json | 4 ++-- src/structs/ContentAny.js | 6 ++++++ tests/y-array.tests.js | 25 +++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0757f88..69feaaa8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "13.6.19", "license": "MIT", "dependencies": { - "lib0": "^0.2.86" + "lib0": "^0.2.98" }, "devDependencies": { "@rollup/plugin-commonjs": "^24.0.1", @@ -2785,13 +2785,14 @@ } }, "node_modules/lib0": { - "version": "0.2.88", - "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.88.tgz", - "integrity": "sha512-KyroiEvCeZcZEMx5Ys+b4u4eEBbA1ch7XUaBhYpwa/nPMrzTjUhI4RfcytmQfYoTBPcdyx+FX6WFNIoNuJzJfQ==", + "version": "0.2.98", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.98.tgz", + "integrity": "sha512-XteTiNO0qEXqqweWx+b21p/fBnNHUA1NwAtJNJek1oPrewEZs2uiT4gWivHKr9GqCjDPAhchz0UQO8NwU3bBNA==", "dependencies": { "isomorphic.js": "^0.2.4" }, "bin": { + "0ecdsa-generate-keypair": "bin/0ecdsa-generate-keypair.js", "0gentesthtml": "bin/gentesthtml.js", "0serve": "bin/0serve.js" }, diff --git a/package.json b/package.json index 3452ac16..4afa4fab 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "scripts": { "clean": "rm -rf dist docs", - "test": "npm run dist && node ./dist/tests.cjs --repetition-time 50", + "test": "npm run dist && NODE_ENV=development node ./dist/tests.cjs --repetition-time 50", "test-extensive": "npm run lint && npm run dist && node ./dist/tests.cjs --production --repetition-time 10000", "dist": "npm run clean && rollup -c && tsc", "watch": "rollup -wc", @@ -76,7 +76,7 @@ }, "homepage": "https://docs.yjs.dev", "dependencies": { - "lib0": "^0.2.86" + "lib0": "^0.2.98" }, "devDependencies": { "@rollup/plugin-commonjs": "^24.0.1", diff --git a/src/structs/ContentAny.js b/src/structs/ContentAny.js index 613144d8..3ab2dc5f 100644 --- a/src/structs/ContentAny.js +++ b/src/structs/ContentAny.js @@ -2,6 +2,11 @@ import { UpdateEncoderV1, UpdateEncoderV2, UpdateDecoderV1, UpdateDecoderV2, Transaction, Item, StructStore // eslint-disable-line } from '../internals.js' +import * as env from 'lib0/environment' +import * as object from 'lib0/object' + +const isDevMode = env.getVariable('node_env') === 'development' + export class ContentAny { /** * @param {Array} arr @@ -11,6 +16,7 @@ export class ContentAny { * @type {Array} */ this.arr = arr + isDevMode && object.deepFreeze(arr) } /** diff --git a/tests/y-array.tests.js b/tests/y-array.tests.js index 9875e85e..1f593485 100644 --- a/tests/y-array.tests.js +++ b/tests/y-array.tests.js @@ -4,6 +4,9 @@ import * as Y from '../src/index.js' import * as t from 'lib0/testing' import * as prng from 'lib0/prng' import * as math from 'lib0/math' +import * as env from 'lib0/environment' + +const isDevMode = env.getVariable('node_env') === 'development' /** * @param {t.TestCase} tc @@ -17,6 +20,28 @@ export const testBasicUpdate = tc => { t.compare(doc2.getArray('array').toArray(), ['hi']) } +/** + * @param {t.TestCase} tc + */ +export const testFailsObjectManipulationInDevMode = tc => { + if (isDevMode) { + t.info('running in dev mode') + const doc = new Y.Doc() + const a = [1, 2, 3] + const b = { o: 1 } + doc.getArray('test').insert(0, [a]) + doc.getMap('map').set('k', b) + t.fails(() => { + a[0] = 42 + }) + t.fails(() => { + b.o = 42 + }) + } else { + t.info('not in dev mode') + } +} + /** * @param {t.TestCase} tc */ From 4ff65b5dc34a4054731c16d0a932e4f0dd9a94aa Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 7 Oct 2024 09:43:13 +0200 Subject: [PATCH 095/152] add devtools --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7da8f849..4ced57ac 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Overview](#overview) * [Bindings](#bindings) * [Providers](#providers) + * [Tooling][#tooling] * [Ports](#ports) * [Getting Started](#getting-started) * [API](#api) @@ -294,7 +295,12 @@ A database and connection provider for Yjs based on Firestore.
-# Ports +### Tooling + +- [y-sweet debugger](https://docs.jamsocket.com/y-sweet/advanced/debugger) +- [liveblocks devtools](https://liveblocks.io/devtools) + +### Ports There are several Yjs-compatible ports to other programming languages. From 345fd31b102ef1beb980abf117670ca8bde2cc81 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 7 Oct 2024 09:45:27 +0200 Subject: [PATCH 096/152] add yjs-inspector --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4ced57ac..ef9a8670 100644 --- a/README.md +++ b/README.md @@ -299,6 +299,7 @@ A database and connection provider for Yjs based on Firestore. - [y-sweet debugger](https://docs.jamsocket.com/y-sweet/advanced/debugger) - [liveblocks devtools](https://liveblocks.io/devtools) +- [Yjs inspector](https://inspector.yjs.dev) ### Ports From 487465d701fd7c1e59f48d49f0cd081b79cd7379 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 14 Oct 2024 01:39:15 +0200 Subject: [PATCH 097/152] lint --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ef9a8670..dcd36330 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Overview](#overview) * [Bindings](#bindings) * [Providers](#providers) - * [Tooling][#tooling] + * [Tooling](#tooling) * [Ports](#ports) * [Getting Started](#getting-started) * [API](#api) @@ -297,9 +297,9 @@ A database and connection provider for Yjs based on Firestore. ### Tooling -- [y-sweet debugger](https://docs.jamsocket.com/y-sweet/advanced/debugger) -- [liveblocks devtools](https://liveblocks.io/devtools) -- [Yjs inspector](https://inspector.yjs.dev) +* [y-sweet debugger](https://docs.jamsocket.com/y-sweet/advanced/debugger) +* [liveblocks devtools](https://liveblocks.io/devtools) +* [Yjs inspector](https://inspector.yjs.dev) ### Ports From a304024a76311e048bd0e57e5131c1d10e234d9f Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 14 Oct 2024 01:41:22 +0200 Subject: [PATCH 098/152] 13.6.20 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 69feaaa8..b29c699a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.19", + "version": "13.6.20", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.19", + "version": "13.6.20", "license": "MIT", "dependencies": { "lib0": "^0.2.98" diff --git a/package.json b/package.json index 4afa4fab..4beb88f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.19", + "version": "13.6.20", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From e804dd757385d961fb5d6316c05f945ce0eac588 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 4 Sep 2024 16:55:46 +0200 Subject: [PATCH 099/152] add y-crdt elexir bindings --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dcd36330..8527491f 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,7 @@ language bindings to other languages * [yswift](https://github.com/y-crdt/yswift) - Swift binding * [yffi](https://github.com/y-crdt/y-crdt/tree/main/yffi) - C-FFI * [ywasm](https://github.com/y-crdt/y-crdt/tree/main/ywasm) - WASM binding + * [y_ex](https://github.com/satoren/y_ex) - Elixir bindings * [ycs](https://github.com/yjs/ycs) - .Net compatible C# implementation. ## Getting Started From cc2d7320aa8736b55114853fee3a669a14d23c8d Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 19 Oct 2024 04:39:37 +0200 Subject: [PATCH 100/152] add funding.json --- funding.json | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 funding.json diff --git a/funding.json b/funding.json new file mode 100644 index 00000000..dbb1eca6 --- /dev/null +++ b/funding.json @@ -0,0 +1,97 @@ +{ + "version": "v1.0.0", + "entity": { + "type": "group", // Required. [individual, group, organisation, other]. Use the closest approximation. + "role": "steward", // Required. [owner, steward, maintainer, contributor, other]. Use the closest approximation. + "name": "Kevin Jahns", // Required. Name of the entity. Max len 250. + "email": "kevin.jahns@protonmail.com", // Required. Max len 250. + "description": "OSS Developer", // Required. Information about the entity. Max len 2000. + "webpageUrl": { + "url": "https://github.com/dmonad", // Required. Webpage with information about the entity. Starts with https:// or http://. Max len 250. + } + }, + + // Optional. One or more projects for which the funding is solicited. + "projects": [{ + "guid": "yjs", // Required. A short unique ID for the project. Lowercase-alphanumeric-dashes only. eg: my-cool-project. Max len 32. + "name": "Yjs", // Required. Name of the project. Max len 250. + "description": "A library for building collaborative applications. #p2p #local-first #CRDT Funding this project will also enable me to maintain the other Yjs-related technologies.", // Required. Description of the project. Max len 2000. + "webpageUrl": { + "url": "https://github.com/yjs/yjs", // Required. Webpage with information about the project. Starts with https:// or http://. Max len 250. + }, + "repositoryUrl": { + "url": "https://github.com/yjs/yjs", // Required. URL of the repository where the project's source code and other assets are available. Starts with https:// or http://. Max len 250. + "wellKnown": "" // Optional. Required if the above url and the URL of the funding.json manifest do not have the same hostname. Starts with https:// or http://. Max len 250. + }, + "licenses": ["spdx:MIT"], // Required. The project's licenses (up to 5). For standard licenses, use the license ID from the SDPX index prefixed by "spdx:". eg: "spdx:GPL-3.0", "spdx:CC-BY-SA-4.0" + "tags": ["collaboration", "p2p", "CRDT", "rich-text", "real-time"] // Required. Up to 10 general tags describing the project. Lowercase-alphanumeric-dashes (max 32 chars). eg: ["programming", "developer-tools"]. For reference, see tags.txt + }, { + "guid": "ystream", // Required. A short unique ID for the project. Lowercase-alphanumeric-dashes only. eg: my-cool-project. Max len 32. + "name": "Y/Stream", // Required. Name of the project. Max len 250. + "description": "A provider for syncing millions of docs efficiently with other peers. This will become the foundation for building real local-first apps with Yjs.", // Required. Description of the project. Max len 2000. + "webpageUrl": { + "url": "https://github.com/yjs/ystream", // Required. Webpage with information about the project. Starts with https:// or http://. Max len 250. + }, + "repositoryUrl": { + "url": "https://github.com/yjs/ystream", // Required. URL of the repository where the project's source code and other assets are available. Starts with https:// or http://. Max len 250. + }, + "licenses": ["spdx:MIT", "spdx:GPL"], // Required. The project's licenses (up to 5). For standard licenses, use the license ID from the SDPX index prefixed by "spdx:". eg: "spdx:GPL-3.0", "spdx:CC-BY-SA-4.0" + "tags": ["collaboration", "p2p", "CRDT", "rich-text", "real-time"] // Required. Up to 10 general tags describing the project. Lowercase-alphanumeric-dashes (max 32 chars). eg: ["programming", "developer-tools"]. For reference, see tags.txt + }], + + // Required. + "funding": { + // Required. This describes one or more channels via which the entity can receive funds. + "channels": [{ + "guid": "github-sponsors", // Required. A short unique ID for the channel. Lowercase-alphanumeric-dashes only. eg: mybank, my-paypal. Max len 32. + "type": "gateway", // Required. [bank, gateway, cheque, cash, other]. + "address": "", // Optional. A short unstructured textual representation of the payment address for the channel. eg: "Account: 12345 (branch: ABCX)", "mypaypal@domain.com", "https://payment-url.com", or a physical address for cheques. Max len 250. + "description": "For funding of the Yjs project" // Optional. Any additional description or instructions for the payment channel. Max len 500. + }, { + "guid": "y-collective", // Required. A short unique ID for the channel. Lowercase-alphanumeric-dashes only. eg: mybank, my-paypal. Max len 32. + "type": "gateway", // Required. [bank, gateway, cheque, cash, other]. + "address": "https://opencollective.com/y-collective", // Optional. A short unstructured textual representation of the payment address for the channel. eg: "Account: 12345 (branch: ABCX)", "mypaypal@domain.com", "https://payment-url.com", or a physical address for cheques. Max len 250. + "description": "For funding of the Y-CRDT - the Rust implementation of Yjs" // Optional. Any additional description or instructions for the payment channel. Max len 500. + }], + + // Required. One or more funding and payment plans. + "plans": [{ + "guid": "supporter", // Required. A short unique ID for the plan. Lowercase-alphanumeric-dashes only. eg: mybank, paypal. Max len 32. + "status": "active", // Required. [active, inactive]. Indicates whether this plan is currently active or inactive. + "name": "Supporter", // Required. Name of the funding plan. eg: "Starter support plan", "Infra hosting", "Monthly funding plan". + "description": "", // Optional. Any additional description or instructions for the funding plan. + "amount": 0, // Required. The solicited amount for this plan. 0 is a wildcard that indicates "any amount". + "currency": "USD", // Required. Three letter ISO 4217 currency code. eg: USD + "frequency": "monthly", // Required. [one-time, weekly, fortnightly, monthly, yearly, other] + "channels": ["github-sponsors", "y-collective"] // Required. One or more channel IDs defined in channels[] via which this plan can accept payments. + }, { + "guid": "bronze-sponsor", // Required. A short unique ID for the plan. Lowercase-alphanumeric-dashes only. eg: mybank, paypal. Max len 32. + "status": "active", // Required. [active, inactive]. Indicates whether this plan is currently active or inactive. + "name": "Bronze Sponsor", // Required. Name of the funding plan. eg: "Starter support plan", "Infra hosting", "Monthly funding plan". + "description": "This is the recommended plan for companies that use Yjs.", // Optional. Any additional description or instructions for the funding plan. + "amount": 500, // Required. The solicited amount for this plan. 0 is a wildcard that indicates "any amount". + "currency": "USD", // Required. Three letter ISO 4217 currency code. eg: USD + "frequency": "monthly", // Required. [one-time, weekly, fortnightly, monthly, yearly, other] + "channels": ["github-sponsors"] // Required. One or more channel IDs defined in channels[] via which this plan can accept payments. + }, { + "guid": "silver-sponsor", // Required. A short unique ID for the plan. Lowercase-alphanumeric-dashes only. eg: mybank, paypal. Max len 32. + "status": "active", // Required. [active, inactive]. Indicates whether this plan is currently active or inactive. + "name": "Silver Sponsor", // Required. Name of the funding plan. eg: "Starter support plan", "Infra hosting", "Monthly funding plan". + "description": "This is the recommended plan for large companies that use Yjs.", // Optional. Any additional description or instructions for the funding plan. + "amount": 1000, // Required. The solicited amount for this plan. 0 is a wildcard that indicates "any amount". + "currency": "USD", // Required. Three letter ISO 4217 currency code. eg: USD + "frequency": "monthly", // Required. [one-time, weekly, fortnightly, monthly, yearly, other] + "channels": ["github-sponsors"] // Required. One or more channel IDs defined in channels[] via which this plan can accept payments. + }, { + "guid": "gold-sponsor", // Required. A short unique ID for the plan. Lowercase-alphanumeric-dashes only. eg: mybank, paypal. Max len 32. + "status": "active", // Required. [active, inactive]. Indicates whether this plan is currently active or inactive. + "name": "Gold Sponsor", // Required. Name of the funding plan. eg: "Starter support plan", "Infra hosting", "Monthly funding plan". + "description": "This is the recommended plan for successfull companies that build their entire product around Yjs-related technologies.", // Optional. Any additional description or instructions for the funding plan. + "amount": 3000, // Required. The solicited amount for this plan. 0 is a wildcard that indicates "any amount". + "currency": "USD", // Required. Three letter ISO 4217 currency code. eg: USD + "frequency": "monthly", // Required. [one-time, weekly, fortnightly, monthly, yearly, other] + "channels": ["github-sponsors"] // Required. One or more channel IDs defined in channels[] via which this plan can accept payments. + }], + } +} + From 42bbb44bfc168b339e67e2164df8d468ceb2b77b Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 19 Oct 2024 04:50:46 +0200 Subject: [PATCH 101/152] fix errors in funding.json --- funding.json | 226 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 133 insertions(+), 93 deletions(-) diff --git a/funding.json b/funding.json index dbb1eca6..8cdbe627 100644 --- a/funding.json +++ b/funding.json @@ -1,97 +1,137 @@ { - "version": "v1.0.0", - "entity": { - "type": "group", // Required. [individual, group, organisation, other]. Use the closest approximation. - "role": "steward", // Required. [owner, steward, maintainer, contributor, other]. Use the closest approximation. - "name": "Kevin Jahns", // Required. Name of the entity. Max len 250. - "email": "kevin.jahns@protonmail.com", // Required. Max len 250. - "description": "OSS Developer", // Required. Information about the entity. Max len 2000. - "webpageUrl": { - "url": "https://github.com/dmonad", // Required. Webpage with information about the entity. Starts with https:// or http://. Max len 250. - } + "id": 0, + "guid": "", + "version": "", + "url": "", + "meta": {}, + "status": "", + "status_message": null, + "crawl_errors": 0, + "crawl_message": null, + "created_at": "0001-01-01T00:00:00Z", + "updated_at": "0001-01-01T00:00:00Z", + "entity": { + "type": "group", + "role": "steward", + "name": "Kevin Jahns", + "email": "kevin.jahns@protonmail.com", + "phone": "", + "description": "OSS Developer", + "webpageUrl": { + "url": "https://github.com/dmonad" + } + }, + "projects": [ + { + "guid": "yjs", + "name": "Yjs", + "description": "A library for building collaborative applications. #p2p #local-first #CRDT Funding this project will also enable me to maintain the other Yjs-related technologies.", + "webpageUrl": { + "url": "https://github.com/yjs/yjs" + }, + "repositoryUrl": { + "url": "https://github.com/yjs/yjs" + }, + "licenses": [ + "spdx:MIT" + ], + "tags": [ + "collaboration", + "p2p", + "CRDT", + "rich-text", + "real-time" + ] }, - - // Optional. One or more projects for which the funding is solicited. - "projects": [{ - "guid": "yjs", // Required. A short unique ID for the project. Lowercase-alphanumeric-dashes only. eg: my-cool-project. Max len 32. - "name": "Yjs", // Required. Name of the project. Max len 250. - "description": "A library for building collaborative applications. #p2p #local-first #CRDT Funding this project will also enable me to maintain the other Yjs-related technologies.", // Required. Description of the project. Max len 2000. - "webpageUrl": { - "url": "https://github.com/yjs/yjs", // Required. Webpage with information about the project. Starts with https:// or http://. Max len 250. - }, - "repositoryUrl": { - "url": "https://github.com/yjs/yjs", // Required. URL of the repository where the project's source code and other assets are available. Starts with https:// or http://. Max len 250. - "wellKnown": "" // Optional. Required if the above url and the URL of the funding.json manifest do not have the same hostname. Starts with https:// or http://. Max len 250. - }, - "licenses": ["spdx:MIT"], // Required. The project's licenses (up to 5). For standard licenses, use the license ID from the SDPX index prefixed by "spdx:". eg: "spdx:GPL-3.0", "spdx:CC-BY-SA-4.0" - "tags": ["collaboration", "p2p", "CRDT", "rich-text", "real-time"] // Required. Up to 10 general tags describing the project. Lowercase-alphanumeric-dashes (max 32 chars). eg: ["programming", "developer-tools"]. For reference, see tags.txt - }, { - "guid": "ystream", // Required. A short unique ID for the project. Lowercase-alphanumeric-dashes only. eg: my-cool-project. Max len 32. - "name": "Y/Stream", // Required. Name of the project. Max len 250. - "description": "A provider for syncing millions of docs efficiently with other peers. This will become the foundation for building real local-first apps with Yjs.", // Required. Description of the project. Max len 2000. - "webpageUrl": { - "url": "https://github.com/yjs/ystream", // Required. Webpage with information about the project. Starts with https:// or http://. Max len 250. - }, - "repositoryUrl": { - "url": "https://github.com/yjs/ystream", // Required. URL of the repository where the project's source code and other assets are available. Starts with https:// or http://. Max len 250. - }, - "licenses": ["spdx:MIT", "spdx:GPL"], // Required. The project's licenses (up to 5). For standard licenses, use the license ID from the SDPX index prefixed by "spdx:". eg: "spdx:GPL-3.0", "spdx:CC-BY-SA-4.0" - "tags": ["collaboration", "p2p", "CRDT", "rich-text", "real-time"] // Required. Up to 10 general tags describing the project. Lowercase-alphanumeric-dashes (max 32 chars). eg: ["programming", "developer-tools"]. For reference, see tags.txt - }], - - // Required. - "funding": { - // Required. This describes one or more channels via which the entity can receive funds. - "channels": [{ - "guid": "github-sponsors", // Required. A short unique ID for the channel. Lowercase-alphanumeric-dashes only. eg: mybank, my-paypal. Max len 32. - "type": "gateway", // Required. [bank, gateway, cheque, cash, other]. - "address": "", // Optional. A short unstructured textual representation of the payment address for the channel. eg: "Account: 12345 (branch: ABCX)", "mypaypal@domain.com", "https://payment-url.com", or a physical address for cheques. Max len 250. - "description": "For funding of the Yjs project" // Optional. Any additional description or instructions for the payment channel. Max len 500. - }, { - "guid": "y-collective", // Required. A short unique ID for the channel. Lowercase-alphanumeric-dashes only. eg: mybank, my-paypal. Max len 32. - "type": "gateway", // Required. [bank, gateway, cheque, cash, other]. - "address": "https://opencollective.com/y-collective", // Optional. A short unstructured textual representation of the payment address for the channel. eg: "Account: 12345 (branch: ABCX)", "mypaypal@domain.com", "https://payment-url.com", or a physical address for cheques. Max len 250. - "description": "For funding of the Y-CRDT - the Rust implementation of Yjs" // Optional. Any additional description or instructions for the payment channel. Max len 500. - }], - - // Required. One or more funding and payment plans. - "plans": [{ - "guid": "supporter", // Required. A short unique ID for the plan. Lowercase-alphanumeric-dashes only. eg: mybank, paypal. Max len 32. - "status": "active", // Required. [active, inactive]. Indicates whether this plan is currently active or inactive. - "name": "Supporter", // Required. Name of the funding plan. eg: "Starter support plan", "Infra hosting", "Monthly funding plan". - "description": "", // Optional. Any additional description or instructions for the funding plan. - "amount": 0, // Required. The solicited amount for this plan. 0 is a wildcard that indicates "any amount". - "currency": "USD", // Required. Three letter ISO 4217 currency code. eg: USD - "frequency": "monthly", // Required. [one-time, weekly, fortnightly, monthly, yearly, other] - "channels": ["github-sponsors", "y-collective"] // Required. One or more channel IDs defined in channels[] via which this plan can accept payments. - }, { - "guid": "bronze-sponsor", // Required. A short unique ID for the plan. Lowercase-alphanumeric-dashes only. eg: mybank, paypal. Max len 32. - "status": "active", // Required. [active, inactive]. Indicates whether this plan is currently active or inactive. - "name": "Bronze Sponsor", // Required. Name of the funding plan. eg: "Starter support plan", "Infra hosting", "Monthly funding plan". - "description": "This is the recommended plan for companies that use Yjs.", // Optional. Any additional description or instructions for the funding plan. - "amount": 500, // Required. The solicited amount for this plan. 0 is a wildcard that indicates "any amount". - "currency": "USD", // Required. Three letter ISO 4217 currency code. eg: USD - "frequency": "monthly", // Required. [one-time, weekly, fortnightly, monthly, yearly, other] - "channels": ["github-sponsors"] // Required. One or more channel IDs defined in channels[] via which this plan can accept payments. - }, { - "guid": "silver-sponsor", // Required. A short unique ID for the plan. Lowercase-alphanumeric-dashes only. eg: mybank, paypal. Max len 32. - "status": "active", // Required. [active, inactive]. Indicates whether this plan is currently active or inactive. - "name": "Silver Sponsor", // Required. Name of the funding plan. eg: "Starter support plan", "Infra hosting", "Monthly funding plan". - "description": "This is the recommended plan for large companies that use Yjs.", // Optional. Any additional description or instructions for the funding plan. - "amount": 1000, // Required. The solicited amount for this plan. 0 is a wildcard that indicates "any amount". - "currency": "USD", // Required. Three letter ISO 4217 currency code. eg: USD - "frequency": "monthly", // Required. [one-time, weekly, fortnightly, monthly, yearly, other] - "channels": ["github-sponsors"] // Required. One or more channel IDs defined in channels[] via which this plan can accept payments. - }, { - "guid": "gold-sponsor", // Required. A short unique ID for the plan. Lowercase-alphanumeric-dashes only. eg: mybank, paypal. Max len 32. - "status": "active", // Required. [active, inactive]. Indicates whether this plan is currently active or inactive. - "name": "Gold Sponsor", // Required. Name of the funding plan. eg: "Starter support plan", "Infra hosting", "Monthly funding plan". - "description": "This is the recommended plan for successfull companies that build their entire product around Yjs-related technologies.", // Optional. Any additional description or instructions for the funding plan. - "amount": 3000, // Required. The solicited amount for this plan. 0 is a wildcard that indicates "any amount". - "currency": "USD", // Required. Three letter ISO 4217 currency code. eg: USD - "frequency": "monthly", // Required. [one-time, weekly, fortnightly, monthly, yearly, other] - "channels": ["github-sponsors"] // Required. One or more channel IDs defined in channels[] via which this plan can accept payments. - }], + { + "guid": "ystream", + "name": "Y/Stream", + "description": "A provider for syncing millions of docs efficiently with other peers. This will become the foundation for building real local-first apps with Yjs.", + "webpageUrl": { + "url": "https://github.com/yjs/ystream" + }, + "repositoryUrl": { + "url": "https://github.com/yjs/ystream" + }, + "licenses": [ + "spdx:MIT", + "spdx:GPL-3.0" + ], + "tags": [ + "collaboration", + "p2p", + "CRDT", + "rich-text", + "real-time" + ] } + ], + "funding": { + "channels": [ + { + "guid": "github-sponsors", + "type": "payment-provider", + "address": "", + "description": "For funding of the Yjs project" + }, + { + "guid": "y-collective", + "type": "payment-provider", + "address": "https://opencollective.com/y-collective", + "description": "For funding of the Y-CRDT - the Rust implementation of Yjs" + } + ], + "plans": [ + { + "guid": "supporter", + "status": "active", + "name": "Supporter", + "description": "", + "amount": 0, + "currency": "USD", + "frequency": "monthly", + "channels": [ + "github-sponsors", + "y-collective" + ] + }, + { + "guid": "bronze-sponsor", + "status": "active", + "name": "Bronze Sponsor", + "description": "This is the recommended plan for companies that use Yjs.", + "amount": 500, + "currency": "USD", + "frequency": "monthly", + "channels": [ + "github-sponsors" + ] + }, + { + "guid": "silver-sponsor", + "status": "active", + "name": "Silver Sponsor", + "description": "This is the recommended plan for large companies that use Yjs.", + "amount": 1000, + "currency": "USD", + "frequency": "monthly", + "channels": [ + "github-sponsors" + ] + }, + { + "guid": "gold-sponsor", + "status": "active", + "name": "Gold Sponsor", + "description": "This is the recommended plan for successfull companies that build their entire product around Yjs-related technologies.", + "amount": 3000, + "currency": "USD", + "frequency": "monthly", + "channels": [ + "github-sponsors" + ] + } + ], + "history": null + } } - From 6074f80257675c8988495b77c501e33863029fb4 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 19 Oct 2024 17:43:48 +0200 Subject: [PATCH 102/152] [funding.json] fix some validation issues --- funding.json | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/funding.json b/funding.json index 8cdbe627..1a69263f 100644 --- a/funding.json +++ b/funding.json @@ -1,15 +1,5 @@ { - "id": 0, - "guid": "", - "version": "", - "url": "", - "meta": {}, - "status": "", - "status_message": null, - "crawl_errors": 0, - "crawl_message": null, - "created_at": "0001-01-01T00:00:00Z", - "updated_at": "0001-01-01T00:00:00Z", + "version": "v1.0.0", "entity": { "type": "group", "role": "steward", @@ -18,7 +8,7 @@ "phone": "", "description": "OSS Developer", "webpageUrl": { - "url": "https://github.com/dmonad" + "url": "https://github.com/yjs" } }, "projects": [ @@ -48,10 +38,12 @@ "name": "Y/Stream", "description": "A provider for syncing millions of docs efficiently with other peers. This will become the foundation for building real local-first apps with Yjs.", "webpageUrl": { - "url": "https://github.com/yjs/ystream" + "url": "https://github.com/yjs/ystream", + "wellKnown": "https://github.com/yjs/ystream/blob/main/.well-known/funding-manifest-urls" }, "repositoryUrl": { - "url": "https://github.com/yjs/ystream" + "url": "https://github.com/yjs/ystream", + "wellKnown": "https://github.com/yjs/ystream/blob/main/.well-known/funding-manifest-urls" }, "licenses": [ "spdx:MIT", @@ -62,7 +54,8 @@ "p2p", "CRDT", "rich-text", - "real-time" + "real-time", + "web-development" ] } ], @@ -78,7 +71,7 @@ "guid": "y-collective", "type": "payment-provider", "address": "https://opencollective.com/y-collective", - "description": "For funding of the Y-CRDT - the Rust implementation of Yjs" + "description": "For funding the Y-CRDT - the Rust implementation of Yjs and other listed projects." } ], "plans": [ @@ -95,6 +88,18 @@ "y-collective" ] }, + { + "guid": "ystream-funding", + "status": "active", + "name": "YStream Funding", + "description": "Fund the next generation of local-first providers.", + "amount": 30000, + "currency": "USD", + "frequency": "one-time", + "channels": [ + "github-sponsors" + ] + }, { "guid": "bronze-sponsor", "status": "active", @@ -111,7 +116,7 @@ "guid": "silver-sponsor", "status": "active", "name": "Silver Sponsor", - "description": "This is the recommended plan for large companies that use Yjs.", + "description": "This is the recommended plan for large/successfull companies that use Yjs.", "amount": 1000, "currency": "USD", "frequency": "monthly", @@ -123,7 +128,7 @@ "guid": "gold-sponsor", "status": "active", "name": "Gold Sponsor", - "description": "This is the recommended plan for successfull companies that build their entire product around Yjs-related technologies.", + "description": "This is the recommended plan for successful companies that build their entire product around Yjs-related technologies.", "amount": 3000, "currency": "USD", "frequency": "monthly", From 4f47355893bbf9b6c9bee6d90081bc5b7ac10b16 Mon Sep 17 00:00:00 2001 From: Carlos Date: Tue, 22 Oct 2024 15:41:02 -0300 Subject: [PATCH 103/152] add SuperViz Provider in yjs README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8527491f..7e5c6033 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,10 @@ documents. No configuration or maintenance is required. It also features Yjs webhook events, REST API to read and update Yjs documents, and a browser DevTools extension. +
@superviz/yjs
+
+ The SuperViz Yjs Provider comes with a secure, scalable real-time infrastructure for Yjs documents, fully compatible with a set of real-time collaboration components offered by SuperViz. This solution ensures synchronization, offline editing, and real-time updates, enabling multiple users to collaborate effectively within shared workspaces. +
y-sweet
A standalone yjs server with persistence to S3 or filesystem. They offer a From 43299973506f336dc4a0909109762f808a866158 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 24 Oct 2024 18:05:42 +0200 Subject: [PATCH 104/152] add stars to providers that sponsor yjs --- README.md | 21 ++++++++++++++------- funding.json | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7e5c6033..3d179339 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ are available. Communication over the signaling servers can be encrypted by providing a shared secret, keeping the connection information and the shared document private.
-
@liveblocks/yjs
+
@liveblocks/yjs 🌟
Liveblocks Yjs provides a fully hosted WebSocket infrastructure and persisted data store for Yjs @@ -199,19 +199,26 @@ documents. No configuration or maintenance is required. It also features Yjs webhook events, REST API to read and update Yjs documents, and a browser DevTools extension.
-
@superviz/yjs
-
- The SuperViz Yjs Provider comes with a secure, scalable real-time infrastructure for Yjs documents, fully compatible with a set of real-time collaboration components offered by SuperViz. This solution ensures synchronization, offline editing, and real-time updates, enabling multiple users to collaborate effectively within shared workspaces. -
-
y-sweet
+
y-sweet ⭐
A standalone yjs server with persistence to S3 or filesystem. They offer a cloud service as well.
-
Hocuspocus
+
Hocuspocus ⭐
A standalone extensible yjs server with sqlite persistence, webhooks, auth and more.
+
@superviz/yjs
+
+ The + SuperViz Yjs Provider + + comes with a secure, scalable real-time infrastructure for Yjs + documents, fully compatible with a set of real-time collaboration + components offered by SuperViz. This solution ensures synchronization, + offline editing, and real-time updates, enabling multiple users to + collaborate effectively within shared workspaces. +
PartyKit
Cloud service for building multiplayer apps. diff --git a/funding.json b/funding.json index 1a69263f..5a6c33c8 100644 --- a/funding.json +++ b/funding.json @@ -50,6 +50,7 @@ "spdx:GPL-3.0" ], "tags": [ + "privacy", "collaboration", "p2p", "CRDT", From 8dc1296a0bd15e70c573160593c2617e0d772f01 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 24 Oct 2024 18:07:52 +0200 Subject: [PATCH 105/152] update readme --- README.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3d179339..c8079ccf 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ are available. Communication over the signaling servers can be encrypted by providing a shared secret, keeping the connection information and the shared document private.
-
@liveblocks/yjs 🌟
+
@liveblocks/yjs 🌟
Liveblocks Yjs provides a fully hosted WebSocket infrastructure and persisted data store for Yjs @@ -199,25 +199,22 @@ documents. No configuration or maintenance is required. It also features Yjs webhook events, REST API to read and update Yjs documents, and a browser DevTools extension.
-
y-sweet ⭐
+
y-sweet
A standalone yjs server with persistence to S3 or filesystem. They offer a cloud service as well.
-
Hocuspocus ⭐
+
Hocuspocus
A standalone extensible yjs server with sqlite persistence, webhooks, auth and more.
-
@superviz/yjs
+
@superviz/yjs
- The - SuperViz Yjs Provider - - comes with a secure, scalable real-time infrastructure for Yjs - documents, fully compatible with a set of real-time collaboration - components offered by SuperViz. This solution ensures synchronization, - offline editing, and real-time updates, enabling multiple users to - collaborate effectively within shared workspaces. + SuperViz Yjs Provider comes with a secure, scalable real-time infrastructure + for Yjs documents, fully compatible with a set of real-time + collaboration components offered by SuperViz. This solution ensures + synchronization, offline editing, and real-time updates, enabling + multiple users to collaborate effectively within shared workspaces.
PartyKit
From 4e2d3c8ac6ddc1acc84962ce67fc8de122af34aa Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Wed, 27 Nov 2024 15:42:50 -0800 Subject: [PATCH 106/152] docs: remove `@toeverything/y-indexeddb` --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index c8079ccf..f8bc3899 100644 --- a/README.md +++ b/README.md @@ -280,11 +280,6 @@ network provider.
Adds persistent storage to a server with MongoDB. Can be used with the y-websocket provider. -
-
-@toeverything/y-indexeddb
-
-Like y-indexeddb, but with sub-documents support and fully TypeScript.
y-fire
From c951f2b7eae39bd338bfb0ea59851275f195218f Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 28 Nov 2024 01:08:37 +0100 Subject: [PATCH 107/152] add Open Collaboration Tools as a user --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c8079ccf..75d19de5 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,8 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Eclipse Theia](https://github.com/eclipse-theia/theia) - A cloud & desktop IDE that runs in the browser. * [ScienHub](https://scienhub.com) - Collaborative LaTeX editor in the browser. +- [Open Collaboration Tools](https://www.open-collab.tools/) - Collaborative +editing for your IDE or custom editor ## Table of Contents From 4ffd3709f839588aa56f1ec438c23fe7a5fd956f Mon Sep 17 00:00:00 2001 From: Viet Hoang Do Date: Fri, 6 Dec 2024 09:58:19 +1000 Subject: [PATCH 108/152] Add PSPDFKit binding to README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0041e872..033e4666 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ are implemented in separate modules. | React | | [react-yjs](https://github.com/nikgraf/react-yjs) | [demo](https://react-yjs-example.vercel.app/) | | React / Vue / Svelte / MobX | | [SyncedStore](https://syncedstore.org) | [demo](https://syncedstore.org/docs/react) | | [mobx-keystone](https://mobx-keystone.js.org/) | | [mobx-keystone-yjs](https://github.com/xaviergonz/mobx-keystone/tree/master/packages/mobx-keystone-yjs) | [demo](https://mobx-keystone.js.org/examples/yjs-binding) | +| [PSPDFKit](https://www.nutrient.io/) | | [yjs-pspdfkit](https://github.com/hoangqwe159/yjs-pspdfkit) | [demo](https://github.com/hoangqwe159/yjs-pspdfkit) | ### Providers From 4404d090e424a096a5e3f1977f4ff13000d95480 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 18 Dec 2024 14:34:26 +0100 Subject: [PATCH 109/152] add nodejs specific tests --- tests/index.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/index.js b/tests/index.js index ec22ed05..fd9c08e7 100644 --- a/tests/index.js +++ b/tests/index.js @@ -15,15 +15,28 @@ import * as relativePositions from './relativePositions.tests.js' import { runTests } from 'lib0/testing' import { isBrowser, isNode } from 'lib0/environment' import * as log from 'lib0/logging' +import { environment } from 'lib0' if (isBrowser) { log.createVConsole(document.body) } -runTests({ + +/** + * @type {any} + */ +const tests = { doc, map, array, text, xml, encoding, undoredo, compatibility, snapshot, updates, relativePositions -}).then(success => { +} + +const run = async () => { + if (environment.isNode) { + // tests.nodejs = await import('./node.tests.js') + } + + const success = await runTests(tests) /* istanbul ignore next */ if (isNode) { process.exit(success ? 0 : 1) } -}) +} +run() From 1b0f2e5463cf56d47bfbfc44b7752f5f1784b4fa Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 18 Dec 2024 14:35:13 +0100 Subject: [PATCH 110/152] lint --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 033e4666..5803373f 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Eclipse Theia](https://github.com/eclipse-theia/theia) - A cloud & desktop IDE that runs in the browser. * [ScienHub](https://scienhub.com) - Collaborative LaTeX editor in the browser. -- [Open Collaboration Tools](https://www.open-collab.tools/) - Collaborative +* [Open Collaboration Tools](https://www.open-collab.tools/) - Collaborative editing for your IDE or custom editor ## Table of Contents From f583d2a211fedc94c568e0887b8bb6aed03dcd72 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 21 Dec 2024 00:52:48 +0100 Subject: [PATCH 111/152] fix #657 - relative positions issue when using followUndoneDeletions=false --- src/utils/RelativePosition.js | 16 ++++++++++++++-- tests/relativePositions.tests.js | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/utils/RelativePosition.js b/src/utils/RelativePosition.js index 214fc6f0..cba65996 100644 --- a/src/utils/RelativePosition.js +++ b/src/utils/RelativePosition.js @@ -9,7 +9,7 @@ import { ContentType, followRedone, getItem, - ID, Doc, AbstractType // eslint-disable-line + StructStore, ID, Doc, AbstractType, // eslint-disable-line } from '../internals.js' import * as encoding from 'lib0/encoding' @@ -256,6 +256,18 @@ export const readRelativePosition = decoder => { */ export const decodeRelativePosition = uint8Array => readRelativePosition(decoding.createDecoder(uint8Array)) +/** + * @param {StructStore} store + * @param {ID} id + */ +const getItemWithOffset = (store, id) => { + const item = getItem(store, id) + const diff = id.clock - item.id.clock + return { + item, diff + } +} + /** * Transform a relative position to an absolute position. * @@ -286,7 +298,7 @@ export const createAbsolutePositionFromRelativePosition = (rpos, doc, followUndo if (getState(store, rightID.client) <= rightID.clock) { return null } - const res = followUndoneDeletions ? followRedone(store, rightID) : { item: getItem(store, rightID), diff: 0 } + const res = followUndoneDeletions ? followRedone(store, rightID) : getItemWithOffset(store, rightID) const right = res.item if (!(right instanceof Item)) { return null diff --git a/tests/relativePositions.tests.js b/tests/relativePositions.tests.js index ab86168b..75e7088d 100644 --- a/tests/relativePositions.tests.js +++ b/tests/relativePositions.tests.js @@ -85,6 +85,26 @@ export const testRelativePositionCase6 = tc => { checkRelativePositions(ytext) } +/** + * Testing https://github.com/yjs/yjs/issues/657 + * + * @param {t.TestCase} tc + */ +export const testRelativePositionCase7 = tc => { + const docA = new Y.Doc() + const textA = docA.getText('text') + textA.insert(0, 'abcde') + // Create a relative position at index 2 in 'textA' + const relativePosition = Y.createRelativePositionFromTypeIndex(textA, 2) + // Verify that the absolutes positions on 'docA' are the same + const absolutePositionWithFollow = + Y.createAbsolutePositionFromRelativePosition(relativePosition, docA, true) + const absolutePositionWithoutFollow = + Y.createAbsolutePositionFromRelativePosition(relativePosition, docA, false) + t.assert(absolutePositionWithFollow?.index === 2) + t.assert(absolutePositionWithoutFollow?.index === 2) +} + /** * @param {t.TestCase} tc */ From 89dddc2a95079460b7203bde07f45dffd56629f2 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 21 Dec 2024 00:55:05 +0100 Subject: [PATCH 112/152] 13.6.21 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b29c699a..23cc8343 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.20", + "version": "13.6.21", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.20", + "version": "13.6.21", "license": "MIT", "dependencies": { "lib0": "^0.2.98" diff --git a/package.json b/package.json index 4beb88f2..9304d9bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.20", + "version": "13.6.21", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From f18eab2dfed7593ebf23ace2e147f1cf2c0dc18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Fri, 3 Jan 2025 18:11:43 +0000 Subject: [PATCH 113/152] Fix typos --- INTERNALS.md | 2 +- README.md | 10 +++++----- src/structs/AbstractStruct.js | 2 +- src/types/AbstractType.js | 10 +++++----- src/types/YText.js | 4 ++-- src/types/YXmlEvent.js | 2 +- src/utils/Doc.js | 2 +- src/utils/PermanentUserData.js | 2 +- src/utils/RelativePosition.js | 2 +- src/utils/StructStore.js | 4 ++-- src/utils/UpdateEncoder.js | 2 +- src/utils/encoding.js | 14 +++++++------- tests/compatibility.tests.js | 2 +- tests/snapshot.tests.js | 2 +- tests/y-map.tests.js | 12 ++++++------ tests/y-text.tests.js | 2 +- 16 files changed, 37 insertions(+), 37 deletions(-) diff --git a/INTERNALS.md b/INTERNALS.md index 8ec81c07..79bd7f29 100644 --- a/INTERNALS.md +++ b/INTERNALS.md @@ -60,7 +60,7 @@ characters have either been deleted or all characters are not deleted. The item will be split if the run is interrupted for any reason (eg a character in the middle of the run is deleted). -When an item is created, it stores a reference to the IDs of the preceeding and +When an item is created, it stores a reference to the IDs of the preceding and succeeding item. These are stored in the item's `origin` and `originRight` fields, respectively. These are used when peers concurrently insert at the same location in a document. Though quite rare in practice, Yjs needs to make sure diff --git a/README.md b/README.md index 5803373f..20cab46d 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Synthesia](https://www.synthesia.io) - Collaborative Video Editor * [thinkdeli](https://thinkdeli.com) - A fast and simple notes app powered by AI * [ourboard](https://github.com/raimohanska/ourboard) - A collaborative whiteboard - applicaiton + application * [Ellie.ai](https://ellie.ai) - Data Product Design and Collaboration * [GoPeer](https://gopeer.org/) - Collaborative tutoring * [screen.garden](https://screen.garden) - Collaborative backend for PKM apps. @@ -189,7 +189,7 @@ backends to y-websocket.
y-webrtc
Propagates document updates peer-to-peer using WebRTC. The peers exchange -signaling data over signaling servers. Publically available signaling servers +signaling data over signaling servers. Publicly available signaling servers are available. Communication over the signaling servers can be encrypted by providing a shared secret, keeping the connection information and the shared document private. @@ -1097,7 +1097,7 @@ encoding format for document updates. If you prefer JSON encoding, you can simply JSON.stringify / JSON.parse the relative position instead.
Y.decodeRelativePosition(Uint8Array):RelativePosition -
Decode a binary-encoded relative position to a RelativePositon object.
+
Decode a binary-encoded relative position to a RelativePosition object.
### Y.UndoManager @@ -1277,11 +1277,11 @@ More information about the specific implementation is available in CRDTs that are suitable for shared text editing suffer from the fact that they only grow in size. There are CRDTs that do not grow in size, but they do not -have the characteristics that are benificial for shared text editing (like +have the characteristics that are beneficial for shared text editing (like intention preservation). Yjs implements many improvements to the original algorithm that diminish the trade-off that the document only grows in size. We can't garbage collect deleted structs (tombstones) while ensuring a unique -order of the structs. But we can 1. merge preceeding structs into a single +order of the structs. But we can 1. merge preceding structs into a single struct to reduce the amount of meta information, 2. we can delete content from the struct if it is deleted, and 3. we can garbage collect tombstones if we don't care about the order of the structs anymore (e.g. if the parent was diff --git a/src/structs/AbstractStruct.js b/src/structs/AbstractStruct.js index ad000053..52773eb7 100644 --- a/src/structs/AbstractStruct.js +++ b/src/structs/AbstractStruct.js @@ -26,7 +26,7 @@ export class AbstractStruct { * This method is already assuming that `this.id.clock + this.length === this.id.clock`. * Also this method does *not* remove right from StructStore! * @param {AbstractStruct} right - * @return {boolean} wether this merged with right + * @return {boolean} whether this merged with right */ mergeWith (right) { return false diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 24fa8802..019369ec 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -155,11 +155,11 @@ export const findMarker = (yarray, index) => { // } // } // if (marker) { - // if (window.lengthes == null) { - // window.lengthes = [] - // window.getLengthes = () => window.lengthes.sort((a, b) => a - b) + // if (window.lengths == null) { + // window.lengths = [] + // window.getLengths = () => window.lengths.sort((a, b) => a - b) // } - // window.lengthes.push(marker.index - pindex) + // window.lengths.push(marker.index - pindex) // console.log('distance', marker.index - pindex, 'len', p && p.parent.length) // } if (marker !== null && math.abs(marker.index - pindex) < /** @type {YText|YArray} */ (p.parent).length / maxSearchMarker) { @@ -751,7 +751,7 @@ export const typeListInsertGenerics = (transaction, parent, index, content) => { /** * Pushing content is special as we generally want to push after the last item. So we don't have to update - * the serach marker. + * the search marker. * * @param {Transaction} transaction * @param {AbstractType} parent diff --git a/src/types/YText.js b/src/types/YText.js index d4c59f03..a196ecd0 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -478,7 +478,7 @@ export const cleanupYTextFormatting = type => { } /** - * This will be called by the transction once the event handlers are called to potentially cleanup + * This will be called by the transaction once the event handlers are called to potentially cleanup * formatting attributes. * * @param {Transaction} transaction @@ -568,7 +568,7 @@ const deleteText = (transaction, currPos, length) => { /** * The Quill Delta format represents changes on a text document with - * formatting information. For mor information visit {@link https://quilljs.com/docs/delta/|Quill Delta} + * formatting information. For more information visit {@link https://quilljs.com/docs/delta/|Quill Delta} * * @example * { diff --git a/src/types/YXmlEvent.js b/src/types/YXmlEvent.js index 022b72d5..f18a06e8 100644 --- a/src/types/YXmlEvent.js +++ b/src/types/YXmlEvent.js @@ -12,7 +12,7 @@ export class YXmlEvent extends YEvent { * @param {YXmlElement|YXmlText|YXmlFragment} target The target on which the event is created. * @param {Set} subs The set of changed attributes. `null` is included if the * child list changed. - * @param {Transaction} transaction The transaction instance with wich the + * @param {Transaction} transaction The transaction instance with which the * change was created. */ constructor (target, subs, transaction) { diff --git a/src/utils/Doc.js b/src/utils/Doc.js index d5165426..317f8c21 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -106,7 +106,7 @@ export class Doc extends ObservableV2 { this.isSynced = false this.isDestroyed = false /** - * Promise that resolves once the document has been loaded from a presistence provider. + * Promise that resolves once the document has been loaded from a persistence provider. */ this.whenLoaded = promise.create(resolve => { this.on('load', () => { diff --git a/src/utils/PermanentUserData.js b/src/utils/PermanentUserData.js index 80b71259..a5d990b9 100644 --- a/src/utils/PermanentUserData.js +++ b/src/utils/PermanentUserData.js @@ -62,7 +62,7 @@ export class PermanentUserData { initUser(storeType.get(userDescription), userDescription) ) }) - // add intial data + // add initial data storeType.forEach(initUser) } diff --git a/src/utils/RelativePosition.js b/src/utils/RelativePosition.js index cba65996..4f6ced71 100644 --- a/src/utils/RelativePosition.js +++ b/src/utils/RelativePosition.js @@ -66,7 +66,7 @@ export class RelativePosition { * after the meant position. * I.e. position 1 in 'ab' is associated to character 'b'. * - * If assoc < 0, then the relative position is associated to the caharacter + * If assoc < 0, then the relative position is associated to the character * before the meant position. * * @type {number} diff --git a/src/utils/StructStore.js b/src/utils/StructStore.js index 55a85178..692743d7 100644 --- a/src/utils/StructStore.js +++ b/src/utils/StructStore.js @@ -66,13 +66,13 @@ export const getState = (store, client) => { * @private * @function */ -export const integretyCheck = store => { +export const integrityCheck = store => { store.clients.forEach(structs => { for (let i = 1; i < structs.length; i++) { const l = structs[i - 1] const r = structs[i] if (l.id.clock + l.length !== r.id.clock) { - throw new Error('StructStore failed integrety check') + throw new Error('StructStore failed integrity check') } } }) diff --git a/src/utils/UpdateEncoder.js b/src/utils/UpdateEncoder.js index 8cf30381..2b742bee 100644 --- a/src/utils/UpdateEncoder.js +++ b/src/utils/UpdateEncoder.js @@ -167,7 +167,7 @@ export class UpdateEncoderV2 extends DSEncoderV2 { */ this.keyMap = new Map() /** - * Refers to the next uniqe key-identifier to me used. + * Refers to the next unique key-identifier to me used. * See writeKey method for more information. * * @type {number} diff --git a/src/utils/encoding.js b/src/utils/encoding.js index 08a9602d..b195ccc3 100644 --- a/src/utils/encoding.js +++ b/src/utils/encoding.js @@ -211,7 +211,7 @@ export const readClientsStructRefs = (decoder, doc) => { * then we start emptying the stack. * * It is not possible to have circles: i.e. struct1 (from client1) depends on struct2 (from client2) - * depends on struct3 (from client1). Therefore the max stack size is eqaul to `structReaders.length`. + * depends on struct3 (from client1). Therefore the max stack size is equal to `structReaders.length`. * * This method is implemented in a way so that we can resume computation if this update * causally depends on another update. @@ -279,14 +279,14 @@ const integrateStructs = (transaction, store, clientsStructRefs) => { const addStackToRestSS = () => { for (const item of stack) { const client = item.id.client - const unapplicableItems = clientsStructRefs.get(client) - if (unapplicableItems) { + const inapplicableItems = clientsStructRefs.get(client) + if (inapplicableItems) { // decrement because we weren't able to apply previous operation - unapplicableItems.i-- - restStructs.clients.set(client, unapplicableItems.refs.slice(unapplicableItems.i)) + inapplicableItems.i-- + restStructs.clients.set(client, inapplicableItems.refs.slice(inapplicableItems.i)) clientsStructRefs.delete(client) - unapplicableItems.i = 0 - unapplicableItems.refs = [] + inapplicableItems.i = 0 + inapplicableItems.refs = [] } else { // item was the last item on clientsStructRefs and the field was already cleared. Add item to restStructs and continue restStructs.clients.set(client, [item]) diff --git a/tests/compatibility.tests.js b/tests/compatibility.tests.js index fc71364c..0b8e1100 100644 --- a/tests/compatibility.tests.js +++ b/tests/compatibility.tests.js @@ -1,5 +1,5 @@ /** - * Testing if encoding/decoding compatibility and integration compatiblity is given. + * Testing if encoding/decoding compatibility and integration compatibility is given. * We expect that the document always looks the same, even if we upgrade the integration algorithm, or add additional encoding approaches. * * The v1 documents were generated with Yjs v13.2.0 based on the randomisized tests. diff --git a/tests/snapshot.tests.js b/tests/snapshot.tests.js index 4f3ecd47..01c956f4 100644 --- a/tests/snapshot.tests.js +++ b/tests/snapshot.tests.js @@ -58,7 +58,7 @@ export const testEmptyRestoreSnapshot = _tc => { t.compare(docRestored.getArray().toArray(), []) t.compare(doc.getArray().toArray(), ['world']) - // now this snapshot reflects the latest state. It shoult still work. + // now this snapshot reflects the latest state. It should still work. const snap2 = Y.snapshot(doc) const docRestored2 = Y.createDocFromSnapshot(doc, snap2) t.compare(docRestored2.getArray().toArray(), ['world']) diff --git a/tests/y-map.tests.js b/tests/y-map.tests.js index 70b3e3b1..080b7140 100644 --- a/tests/y-map.tests.js +++ b/tests/y-map.tests.js @@ -369,11 +369,11 @@ export const testObserversUsingObservedeep = tc => { /** * @type {Array>} */ - const pathes = [] + const paths = [] let calls = 0 map0.observeDeep(events => { events.forEach(event => { - pathes.push(event.path) + paths.push(event.path) }) calls++ }) @@ -381,7 +381,7 @@ export const testObserversUsingObservedeep = tc => { map0.get('map').set('array', new Y.Array()) map0.get('map').get('array').insert(0, ['content']) t.assert(calls === 3) - t.compare(pathes, [[], ['map'], ['map', 'array']]) + t.compare(paths, [[], ['map'], ['map', 'array']]) compare(users) } @@ -393,14 +393,14 @@ export const testPathsOfSiblingEvents = tc => { /** * @type {Array>} */ - const pathes = [] + const paths = [] let calls = 0 const doc = users[0] map0.set('map', new Y.Map()) map0.get('map').set('text1', new Y.Text('initial')) map0.observeDeep(events => { events.forEach(event => { - pathes.push(event.path) + paths.push(event.path) }) calls++ }) @@ -409,7 +409,7 @@ export const testPathsOfSiblingEvents = tc => { map0.get('map').set('text2', new Y.Text('new')) }) t.assert(calls === 1) - t.compare(pathes, [['map'], ['map', 'text1']]) + t.compare(paths, [['map'], ['map', 'text1']]) compare(users) } diff --git a/tests/y-text.tests.js b/tests/y-text.tests.js index 34ae7e9e..4b9c6d2e 100644 --- a/tests/y-text.tests.js +++ b/tests/y-text.tests.js @@ -376,7 +376,7 @@ export const testDeltaBug = _tc => { }, { insert: '\n', - // This attibutes has only list and no table-cell-line + // This attributes has only list and no table-cell-line attributes: { list: { rowspan: '1', From e67b1296a7bbde60d7a4d8ace511153aa0321fea Mon Sep 17 00:00:00 2001 From: Yuxiang Kou <97371951+ykou-clickup@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:58:47 -0800 Subject: [PATCH 114/152] fix(yText): applyDelta should support both Delta and Ops[] Fixed an issue that the yText.applyDelta() accepted only Ops[], but not Delta. --- src/types/YText.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/types/YText.js b/src/types/YText.js index a196ecd0..a754cde1 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -972,15 +972,16 @@ export class YText extends AbstractType { if (this.doc !== null) { transact(this.doc, transaction => { const currPos = new ItemTextListPosition(null, this._start, 0, new Map()) - for (let i = 0; i < delta.length; i++) { - const op = delta[i] + const ops = Array.isArray(delta) ? delta : (Array.isArray(delta?.ops) ? delta.ops : []); + for (let i = 0; i < ops.length; i++) { + const op = ops[i] if (op.insert !== undefined) { // Quill assumes that the content starts with an empty paragraph. // Yjs/Y.Text assumes that it starts empty. We always hide that // there is a newline at the end of the content. // If we omit this step, clients will see a different number of // paragraphs, but nothing bad will happen. - const ins = (!sanitize && typeof op.insert === 'string' && i === delta.length - 1 && currPos.right === null && op.insert.slice(-1) === '\n') ? op.insert.slice(0, -1) : op.insert + const ins = (!sanitize && typeof op.insert === 'string' && i === ops.length - 1 && currPos.right === null && op.insert.slice(-1) === '\n') ? op.insert.slice(0, -1) : op.insert if (typeof ins !== 'string' || ins.length > 0) { insertText(transaction, this, currPos, ins, op.attributes || {}) } From 80e83a84c6d8c9a4ca1c447f9f94e23e690a9516 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 12 Jan 2025 19:32:51 +0100 Subject: [PATCH 115/152] Revert "fix(yText): applyDelta should support both Delta and Ops[]" --- src/types/YText.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/types/YText.js b/src/types/YText.js index a754cde1..a196ecd0 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -972,16 +972,15 @@ export class YText extends AbstractType { if (this.doc !== null) { transact(this.doc, transaction => { const currPos = new ItemTextListPosition(null, this._start, 0, new Map()) - const ops = Array.isArray(delta) ? delta : (Array.isArray(delta?.ops) ? delta.ops : []); - for (let i = 0; i < ops.length; i++) { - const op = ops[i] + for (let i = 0; i < delta.length; i++) { + const op = delta[i] if (op.insert !== undefined) { // Quill assumes that the content starts with an empty paragraph. // Yjs/Y.Text assumes that it starts empty. We always hide that // there is a newline at the end of the content. // If we omit this step, clients will see a different number of // paragraphs, but nothing bad will happen. - const ins = (!sanitize && typeof op.insert === 'string' && i === ops.length - 1 && currPos.right === null && op.insert.slice(-1) === '\n') ? op.insert.slice(0, -1) : op.insert + const ins = (!sanitize && typeof op.insert === 'string' && i === delta.length - 1 && currPos.right === null && op.insert.slice(-1) === '\n') ? op.insert.slice(0, -1) : op.insert if (typeof ins !== 'string' || ins.length > 0) { insertText(transaction, this, currPos, ins, op.attributes || {}) } From bb5410b6ddc74a23e7bdb75aa09d252aaed81b8d Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 12 Jan 2025 19:41:19 +0100 Subject: [PATCH 116/152] marginally better typings for applyDelta - #689 --- package-lock.json | 8 ++++---- package.json | 2 +- src/types/YText.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23cc8343..998e5cc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "13.6.21", "license": "MIT", "dependencies": { - "lib0": "^0.2.98" + "lib0": "^0.2.99" }, "devDependencies": { "@rollup/plugin-commonjs": "^24.0.1", @@ -2785,9 +2785,9 @@ } }, "node_modules/lib0": { - "version": "0.2.98", - "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.98.tgz", - "integrity": "sha512-XteTiNO0qEXqqweWx+b21p/fBnNHUA1NwAtJNJek1oPrewEZs2uiT4gWivHKr9GqCjDPAhchz0UQO8NwU3bBNA==", + "version": "0.2.99", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.99.tgz", + "integrity": "sha512-vwztYuUf1uf/1zQxfzRfO5yzfNKhTtgOByCruuiQQxWQXnPb8Itaube5ylofcV0oM0aKal9Mv+S1s1Ky0UYP1w==", "dependencies": { "isomorphic.js": "^0.2.4" }, diff --git a/package.json b/package.json index 9304d9bb..41968c18 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ }, "homepage": "https://docs.yjs.dev", "dependencies": { - "lib0": "^0.2.98" + "lib0": "^0.2.99" }, "devDependencies": { "@rollup/plugin-commonjs": "^24.0.1", diff --git a/src/types/YText.js b/src/types/YText.js index a196ecd0..75bf5dd6 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -961,7 +961,7 @@ export class YText extends AbstractType { /** * Apply a {@link Delta} on this shared YText type. * - * @param {any} delta The changes to apply on this element. + * @param {Array} delta The changes to apply on this element. * @param {object} opts * @param {boolean} [opts.sanitize] Sanitize input delta. Removes ending newlines if set to true. * From 1bec008862d8682e51ecc6d8a0f1a2c13f25c241 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 12 Jan 2025 19:45:03 +0100 Subject: [PATCH 117/152] 13.6.22 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 998e5cc2..44a8957c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.21", + "version": "13.6.22", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.21", + "version": "13.6.22", "license": "MIT", "dependencies": { "lib0": "^0.2.99" diff --git a/package.json b/package.json index 41968c18..88d3c404 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.21", + "version": "13.6.22", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From e53c44e3a6d04013c876341514211603deb4d8c2 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 15 Jan 2025 21:44:18 +0100 Subject: [PATCH 118/152] expose getItemCleanStart/End --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index b13b2077..5382e376 100644 --- a/src/index.js +++ b/src/index.js @@ -50,6 +50,8 @@ export { findRootTypeKey, findIndexSS, getItem, + getItemCleanStart, + getItemCleanEnd, typeListToArraySnapshot, typeMapGetSnapshot, typeMapGetAllSnapshot, From c05b815b4c6e680ffeefa737d46c2bf1f9f444b5 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 15 Jan 2025 21:46:23 +0100 Subject: [PATCH 119/152] 13.6.23 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44a8957c..ea3b8cf2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.22", + "version": "13.6.23", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.22", + "version": "13.6.23", "license": "MIT", "dependencies": { "lib0": "^0.2.99" diff --git a/package.json b/package.json index 88d3c404..b362704d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.22", + "version": "13.6.23", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 40725e373b41b5115dd0b824d84764c30740cd57 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Fri, 17 Jan 2025 11:57:20 +0100 Subject: [PATCH 120/152] Add Typst to Yjs users in README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 20cab46d..c7cbc274 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [ScienHub](https://scienhub.com) - Collaborative LaTeX editor in the browser. * [Open Collaboration Tools](https://www.open-collab.tools/) - Collaborative editing for your IDE or custom editor +* [Typst](https://typst.app/) - Compose, edit, and automate technical documents ## Table of Contents From cc9a8574416d803adf5fd645725b94e5db1b9ec5 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 24 Feb 2025 20:30:48 +0100 Subject: [PATCH 121/152] slightly optimize TreeWalker and integration process --- src/structs/Item.js | 3 +-- src/types/YXmlFragment.js | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/structs/Item.js b/src/structs/Item.js index 1b7ba939..2d2b1bb9 100644 --- a/src/structs/Item.js +++ b/src/structs/Item.js @@ -393,8 +393,7 @@ export class Item extends AbstractStruct { if (this.left && this.left.constructor === Item) { this.parent = this.left.parent this.parentSub = this.left.parentSub - } - if (this.right && this.right.constructor === Item) { + } else if (this.right && this.right.constructor === Item) { this.parent = this.right.parent this.parentSub = this.right.parentSub } diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js index 2c0e9c5b..544a18ce 100644 --- a/src/types/YXmlFragment.js +++ b/src/types/YXmlFragment.js @@ -96,8 +96,12 @@ export class YXmlTreeWalker { } else { // walk right or up in the tree while (n !== null) { - if (n.right !== null) { - n = n.right + /** + * @type {Item | null} + */ + const nxt = n.next + if (nxt !== null) { + n = nxt break } else if (n.parent === this._root) { n = null From 69d4a5c821123f2b08b69390ab9eaba40b200e84 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 4 Mar 2025 14:41:44 +0100 Subject: [PATCH 122/152] [UndoManager] support global undo --- src/utils/UndoManager.js | 24 +++++++++++++----------- tests/undo-redo.tests.js | 13 +++++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index a3645cd8..3cc395de 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -39,7 +39,7 @@ export class StackItem { */ const clearUndoManagerStackItem = (tr, um, stackItem) => { iterateDeletedStructs(tr, stackItem.deletions, item => { - if (item instanceof Item && um.scope.some(type => isParentOf(type, item))) { + if (item instanceof Item && um.scope.some(type => type === tr.doc || isParentOf(/** @type {AbstractType} */ (type), item))) { keepItem(item, false) } }) @@ -81,7 +81,7 @@ const popStackItem = (undoManager, stack, eventType) => { } struct = item } - if (!struct.deleted && scope.some(type => isParentOf(type, /** @type {Item} */ (struct)))) { + if (!struct.deleted && scope.some(type => type === transaction.doc || isParentOf(/** @type {AbstractType} */ (type), /** @type {Item} */ (struct)))) { itemsToDelete.push(struct) } } @@ -89,7 +89,7 @@ const popStackItem = (undoManager, stack, eventType) => { iterateDeletedStructs(transaction, stackItem.deletions, struct => { if ( struct instanceof Item && - scope.some(type => isParentOf(type, struct)) && + scope.some(type => type === transaction.doc || isParentOf(/** @type {AbstractType} */ (type), struct)) && // Never redo structs in stackItem.insertions because they were created and deleted in the same capture interval. !isDeleted(stackItem.insertions, struct.id) ) { @@ -159,7 +159,7 @@ const popStackItem = (undoManager, stack, eventType) => { */ export class UndoManager extends ObservableV2 { /** - * @param {AbstractType|Array>} typeScope Accepts either a single type, or an array of types + * @param {Doc|AbstractType|Array>} typeScope Accepts either a single type, or an array of types * @param {UndoManagerOptions} options */ constructor (typeScope, { @@ -168,11 +168,11 @@ export class UndoManager extends ObservableV2 { deleteFilter = () => true, trackedOrigins = new Set([null]), ignoreRemoteMapChanges = false, - doc = /** @type {Doc} */ (array.isArray(typeScope) ? typeScope[0].doc : typeScope.doc) + doc = /** @type {Doc} */ (array.isArray(typeScope) ? typeScope[0].doc : typeScope instanceof Doc ? typeScope : typeScope.doc) } = {}) { super() /** - * @type {Array>} + * @type {Array | Doc>} */ this.scope = [] this.doc = doc @@ -212,7 +212,7 @@ export class UndoManager extends ObservableV2 { // Only track certain transactions if ( !this.captureTransaction(transaction) || - !this.scope.some(type => transaction.changedParentTypes.has(type)) || + !this.scope.some(type => transaction.changedParentTypes.has(/** @type {AbstractType} */ (type)) || type === this.doc) || (!this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor))) ) { return @@ -251,7 +251,7 @@ export class UndoManager extends ObservableV2 { } // make sure that deleted structs are not gc'd iterateDeletedStructs(transaction, transaction.deleteSet, /** @param {Item|GC} item */ item => { - if (item instanceof Item && this.scope.some(type => isParentOf(type, item))) { + if (item instanceof Item && this.scope.some(type => type === transaction.doc || isParentOf(/** @type {AbstractType} */ (type), item))) { keepItem(item, true) } }) @@ -272,13 +272,15 @@ export class UndoManager extends ObservableV2 { } /** - * @param {Array> | AbstractType} ytypes + * @param {Array | Doc> | AbstractType | Doc} ytypes */ addToScope (ytypes) { + const tmpSet = new Set(this.scope) ytypes = array.isArray(ytypes) ? ytypes : [ytypes] ytypes.forEach(ytype => { - if (this.scope.every(yt => yt !== ytype)) { - if (ytype.doc !== this.doc) logging.warn('[yjs#509] Not same Y.Doc') // use MultiDocUndoManager instead. also see https://github.com/yjs/yjs/issues/509 + if (!tmpSet.has(ytype)) { + tmpSet.add(ytype) + if (ytype instanceof AbstractType ? ytype.doc !== this.doc : ytype !== this.doc) logging.warn('[yjs#509] Not same Y.Doc') // use MultiDocUndoManager instead. also see https://github.com/yjs/yjs/issues/509 this.scope.push(ytype) } }) diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index 2fb2ff2e..df9f9ab3 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -116,6 +116,19 @@ export const testEmptyTypeScope = _tc => { t.assert(yarray.length === 0) } +/** + * Test case to fix #241 + * @param {t.TestCase} _tc + */ +export const testGlobalScope = _tc => { + const ydoc = new Y.Doc() + const um = new Y.UndoManager(ydoc) + const yarray = ydoc.getArray() + yarray.insert(0, [1]) + um.undo() + t.assert(yarray.length === 0) +} + /** * Test case to fix #241 * @param {t.TestCase} _tc From 78e0527b468b0aa57fbea31fbb0a4989f08641df Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 4 Mar 2025 14:44:19 +0100 Subject: [PATCH 123/152] 13.6.24 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea3b8cf2..31af45d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.23", + "version": "13.6.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.23", + "version": "13.6.24", "license": "MIT", "dependencies": { "lib0": "^0.2.99" diff --git a/package.json b/package.json index b362704d..18854b84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.23", + "version": "13.6.24", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 09fbb62ba9f28dca15c75c3a9804a6f0dd87ad1a Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 4 Mar 2025 14:52:19 +0100 Subject: [PATCH 124/152] improve documentation on global UndoManager --- src/utils/UndoManager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index 3cc395de..98410e4d 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -159,7 +159,7 @@ const popStackItem = (undoManager, stack, eventType) => { */ export class UndoManager extends ObservableV2 { /** - * @param {Doc|AbstractType|Array>} typeScope Accepts either a single type, or an array of types + * @param {Doc|AbstractType|Array>} typeScope Limits the scope of the UndoManager. If this is set to a ydoc instance, all changes on that ydoc will be undone. If set to a specific type, only changes on that type or its children will be undone. Also accepts an array of types. * @param {UndoManagerOptions} options */ constructor (typeScope, { @@ -272,6 +272,8 @@ export class UndoManager extends ObservableV2 { } /** + * Extend the scope. + * * @param {Array | Doc> | AbstractType | Doc} ytypes */ addToScope (ytypes) { From afa4c358663ae27bff734e98d5f431942992de48 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 5 Mar 2025 14:15:12 +0100 Subject: [PATCH 125/152] update titanic funding information - closes #696 --- funding.json | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/funding.json b/funding.json index 5a6c33c8..3ae1c266 100644 --- a/funding.json +++ b/funding.json @@ -34,20 +34,19 @@ ] }, { - "guid": "ystream", - "name": "Y/Stream", + "guid": "Titanic", + "name": "Y/Titanic", "description": "A provider for syncing millions of docs efficiently with other peers. This will become the foundation for building real local-first apps with Yjs.", "webpageUrl": { - "url": "https://github.com/yjs/ystream", - "wellKnown": "https://github.com/yjs/ystream/blob/main/.well-known/funding-manifest-urls" + "url": "https://github.com/yjs/titanic", + "wellKnown": "https://github.com/yjs/titanic/blob/main/.well-known/funding-manifest-urls" }, "repositoryUrl": { - "url": "https://github.com/yjs/ystream", - "wellKnown": "https://github.com/yjs/ystream/blob/main/.well-known/funding-manifest-urls" + "url": "https://github.com/yjs/titanic", + "wellKnown": "https://github.com/yjs/titanic/blob/main/.well-known/funding-manifest-urls" }, "licenses": [ - "spdx:MIT", - "spdx:GPL-3.0" + "spdx:MIT" ], "tags": [ "privacy", @@ -90,9 +89,9 @@ ] }, { - "guid": "ystream-funding", + "guid": "titanic-funding", "status": "active", - "name": "YStream Funding", + "name": "Titanic Funding", "description": "Fund the next generation of local-first providers.", "amount": 30000, "currency": "USD", From e3739bce8e2700b407d80dd97fd4c1dcd6a834db Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 5 Mar 2025 14:15:26 +0100 Subject: [PATCH 126/152] test example for rejecting updates --- tests/undo-redo.tests.js | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index df9f9ab3..487601e2 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -116,6 +116,57 @@ export const testEmptyTypeScope = _tc => { t.assert(yarray.length === 0) } +/** + * @param {t.TestCase} _tc + */ +export const testRejectUpdateExample = _tc => { + const tmpydoc1 = new Y.Doc() + tmpydoc1.getArray('restricted').insert(0, [1]) + tmpydoc1.getArray('public').insert(0, [1]) + const update1 = Y.encodeStateAsUpdate(tmpydoc1) + const tmpydoc2 = new Y.Doc() + tmpydoc2.getArray('public').insert(0, [2]) + const update2 = Y.encodeStateAsUpdate(tmpydoc2) + + const ydoc = new Y.Doc() + const restrictedType = ydoc.getArray('restricted') + + /** + * Assume this function handles incoming updates via a communication channel like websockets. + * Changes to the `ydoc.getMap('restricted')` type should be rejected. + * + * - set up undo manager on the restricted types + * - cache pending* updates from the Ydoc to avoid certain attacks + * - apply received update and check whether the restricted type (or any of its children) has been changed. + * - catch errors that might try to circumvent the restrictions + * - undo changes on restricted types + * - reapply pending* updates + * + * @param {Uint8Array} update + */ + const updateHandler = (update) => { + // don't handle changes of the local undo manager, which is used to undo invalid changes + const um = new Y.UndoManager(restrictedType, { trackedOrigins: new Set(['remote change']) }) + const beforePendingDs = ydoc.store.pendingDs + const beforePendingStructs = ydoc.store.pendingStructs?.update + try { + Y.applyUpdate(ydoc, update, 'remote change') + } finally { + um.undo() + um.destroy() + ydoc.store.pendingDs = beforePendingDs + ydoc.store.pendingStructs = null + if (beforePendingStructs) { + Y.applyUpdateV2(ydoc, beforePendingStructs) + } + } + } + updateHandler(update1) + updateHandler(update2) + t.assert(restrictedType.length === 0) + t.assert(ydoc.getArray('public').length === 2) +} + /** * Test case to fix #241 * @param {t.TestCase} _tc From 35c030d834a428f0e9acc3a2fd9b9258c0c24ff5 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 6 Mar 2025 10:36:18 +0100 Subject: [PATCH 127/152] improve reject update example --- tests/undo-redo.tests.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index 487601e2..faf42aff 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -152,7 +152,9 @@ export const testRejectUpdateExample = _tc => { try { Y.applyUpdate(ydoc, update, 'remote change') } finally { - um.undo() + while (um.undoStack.length) { + um.undo() + } um.destroy() ydoc.store.pendingDs = beforePendingDs ydoc.store.pendingStructs = null From 3ecfb4e898076ff3cd4d83001be2721065c43acf Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 9 Mar 2025 20:57:52 +0100 Subject: [PATCH 128/152] add rowsncolumns --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c7cbc274..141e62bf 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,7 @@ are implemented in separate modules. | React / Vue / Svelte / MobX | | [SyncedStore](https://syncedstore.org) | [demo](https://syncedstore.org/docs/react) | | [mobx-keystone](https://mobx-keystone.js.org/) | | [mobx-keystone-yjs](https://github.com/xaviergonz/mobx-keystone/tree/master/packages/mobx-keystone-yjs) | [demo](https://mobx-keystone.js.org/examples/yjs-binding) | | [PSPDFKit](https://www.nutrient.io/) | | [yjs-pspdfkit](https://github.com/hoangqwe159/yjs-pspdfkit) | [demo](https://github.com/hoangqwe159/yjs-pspdfkit) | +| [Rows n'Columns](https://www.rowsncolumns.app/) | ✔ | [@rowsncolumns/y-spreadsheet](https://docs.rowsncolumns.app/collaboration/yjs-collaboration) | | ### Providers From 06cd5b52aa4ee5a573625527bd92b7025e41fdaf Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Tue, 18 Mar 2025 19:22:02 +0100 Subject: [PATCH 129/152] README: Remove a duplicate SageMaker mention AWS SageMaker was mentioned twice. Remove one of the mentions. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 141e62bf..e5348a57 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,6 @@ Showcase](https://yjs-diagram.synergy.codes/). Learning Models * [linear](https://linear.app) Streamline issues, projects, and product roadmaps. * [btw](https://www.btw.so) - Personal website builder -* [AWS SageMaker](https://aws.amazon.com/sagemaker/) - Machine Learning Service * [Arkiter](https://www.arkiter.com/) - Live interview software * [Appflowy](https://www.appflowy.io/) - They use Yrs * [Multi.app](https://multi.app) - Multiplayer app sharing: Point, draw and edit From 2ef9ccd1701235c6a649b1580f2b6702b230c842 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Tue, 18 Mar 2025 19:23:51 +0100 Subject: [PATCH 130/152] README: Remove duplicate btw mention 'btw' was mentioned twice; remove one mention. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 141e62bf..0a4aed5c 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,6 @@ Showcase](https://yjs-diagram.synergy.codes/). * [AWS SageMaker](https://aws.amazon.com/sagemaker/) Tools for building Machine Learning Models * [linear](https://linear.app) Streamline issues, projects, and product roadmaps. -* [btw](https://www.btw.so) - Personal website builder * [AWS SageMaker](https://aws.amazon.com/sagemaker/) - Machine Learning Service * [Arkiter](https://www.arkiter.com/) - Live interview software * [Appflowy](https://www.appflowy.io/) - They use Yrs From d5b5e7a9a19ab36130fcf2c080268afc72f3869b Mon Sep 17 00:00:00 2001 From: kapil verma Date: Wed, 26 Mar 2025 01:55:02 +0530 Subject: [PATCH 131/152] Update README.md to add https://github.com/kapv89/k_yrs_go to persistence providers Ref: https://x.com/kevin_jahns/status/1904252641124753641 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0a4aed5c..d9711f40 100644 --- a/README.md +++ b/README.md @@ -300,6 +300,10 @@ A database and connection provider for Yjs based on Firestore. Provides persistent storage for a web server using PostgreSQL and is easily compatible with y-websocket. +
k_yrs_go
+
+ Golang database server for YJS CRDT using Postgres + Redis +
### Tooling From 1b006dc34e096893ccde65812de402e4b363c07f Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 31 Mar 2025 17:34:58 +0800 Subject: [PATCH 132/152] Update README.md Add Kedyou as a user of Yjs --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d9711f40..2151583b 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [Open Collaboration Tools](https://www.open-collab.tools/) - Collaborative editing for your IDE or custom editor * [Typst](https://typst.app/) - Compose, edit, and automate technical documents +* [Kedyou](https://kedyou.com/) - Digital workspaces for tutoring ## Table of Contents From 66989ca14038e66fc36eae92a3f28bc402e6d035 Mon Sep 17 00:00:00 2001 From: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Date: Tue, 1 Apr 2025 08:04:17 +0530 Subject: [PATCH 133/152] feat: add ace bindings --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2151583b..ae3fc76d 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ are implemented in separate modules. | [Quill](https://quilljs.com/) | ✔ | [y-quill](https://github.com/yjs/y-quill) | [demo](https://demos.yjs.dev/quill/quill.html) | | [CodeMirror](https://codemirror.net/) | ✔ | [y-codemirror](https://github.com/yjs/y-codemirror) | [demo](https://demos.yjs.dev/codemirror/codemirror.html) | | [Monaco](https://microsoft.github.io/monaco-editor/) | ✔ | [y-monaco](https://github.com/yjs/y-monaco) | [demo](https://demos.yjs.dev/monaco/monaco.html) | -| [Slate](https://github.com/ianstormtaylor/slate) | ✔ | [slate-yjs](https://github.com/bitphinix/slate-yjs) | [demo](https://bitphinix.github.io/slate-yjs-example) | +| [Ace](https://ace.c9.io/) | ✔ | [y-ace](https://github.com/bajrangCoder/y-ace) | | [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) | | [Lexical](https://lexical.dev/) | ✔ | (native) | [demo](https://lexical.dev/docs/collaboration/react#see-it-in-action) | | [valtio](https://github.com/pmndrs/valtio) | | [valtio-yjs](https://github.com/dai-shi/valtio-yjs) | [demo](https://codesandbox.io/s/valtio-yjs-demo-ox3iy) | From f1f96e1d87e8cb3f8882979acdb6fe8493c28591 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 1 Apr 2025 11:02:23 +0200 Subject: [PATCH 134/152] lint --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e393672..eab49f84 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,8 @@ are implemented in separate modules. | [Quill](https://quilljs.com/) | ✔ | [y-quill](https://github.com/yjs/y-quill) | [demo](https://demos.yjs.dev/quill/quill.html) | | [CodeMirror](https://codemirror.net/) | ✔ | [y-codemirror](https://github.com/yjs/y-codemirror) | [demo](https://demos.yjs.dev/codemirror/codemirror.html) | | [Monaco](https://microsoft.github.io/monaco-editor/) | ✔ | [y-monaco](https://github.com/yjs/y-monaco) | [demo](https://demos.yjs.dev/monaco/monaco.html) | -| [Ace](https://ace.c9.io/) | ✔ | [y-ace](https://github.com/bajrangCoder/y-ace) | | [Slate](https://github.com/ianstormtaylor/slate) | ✔ | [slate-yjs](https://github.com/bitphinix/slate-yjs) | [demo](https://bitphinix.github.io/slate-yjs-example) | +| [Ace](https://ace.c9.io/) | ✔ | [y-ace](https://github.com/bajrangCoder/y-ace) | | +| [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) | | [Lexical](https://lexical.dev/) | ✔ | (native) | [demo](https://lexical.dev/docs/collaboration/react#see-it-in-action) | | [valtio](https://github.com/pmndrs/valtio) | | [valtio-yjs](https://github.com/dai-shi/valtio-yjs) | [demo](https://codesandbox.io/s/valtio-yjs-demo-ox3iy) | From 2b621ebe568bb7b01ad25aa28731e76cf3ea306b Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 1 Apr 2025 20:07:19 +0200 Subject: [PATCH 135/152] add JupyterGIS --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index eab49f84..cca04a2c 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ Showcase](https://yjs-diagram.synergy.codes/). * [JupyterLab](https://jupyter.org/) Collaborative computational Notebooks * [JupyterCad](https://jupytercad.readthedocs.io/en/latest/) Extension to JupyterLab that enables collaborative editing of 3d FreeCAD Models. +* [JupyterGIS](https://github.com/geojupyter/jupytergis) Collaborative GIS + (Geographic Information System) editor in Jupyter * [Hyperquery](https://hyperquery.ai/) A collaborative data workspace for sharing analyses, documentation, spreadsheets, and dashboards. * [Nosgestesclimat](https://nosgestesclimat.fr/groupe) The french carbon From 4d671671b31344db13da9a7961c9e084f6eb81ca Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 3 Apr 2025 00:18:36 +0200 Subject: [PATCH 136/152] add yrs-warp to providers --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cca04a2c..8be52749 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ collaborative app.
A module that contains a simple websocket backend and a websocket client that connects to that backend. y-redis, -y-sweet, ypy-websocket and +y-sweet, ypy-websocket, yrs-warp and Hocuspocus (see below) are alternative backends to y-websocket.
From b9aa098b04f02f7204abaaa2f3b2f6b50d4e1383 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 7 Apr 2025 06:48:54 +0200 Subject: [PATCH 137/152] add y-op-sqlite --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 8be52749..430ad32d 100644 --- a/README.md +++ b/README.md @@ -307,6 +307,11 @@ A database and connection provider for Yjs based on Firestore.
Golang database server for YJS CRDT using Postgres + Redis
+
y-op-sqlite
+
+ Yjs persistence provider for op-sqlite +
+ ### Tooling From c2097e71e7da651e3fb7c89621919944c6dc4d4b Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 18 Apr 2025 14:15:13 +0200 Subject: [PATCH 138/152] fix iterating through deleted structs when they dont exist --- src/utils/DeleteSet.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/DeleteSet.js b/src/utils/DeleteSet.js index fe07b7ce..17695b08 100644 --- a/src/utils/DeleteSet.js +++ b/src/utils/DeleteSet.js @@ -58,8 +58,9 @@ export class DeleteSet { export const iterateDeletedStructs = (transaction, ds, f) => ds.clients.forEach((deletes, clientid) => { const structs = /** @type {Array} */ (transaction.doc.store.clients.get(clientid)) - for (let i = 0; i < deletes.length; i++) { - const del = deletes[i] + const lastStruct = structs[structs.length - 1] + const clockState = lastStruct.id.clock + lastStruct.length + for (let i = 0, del = deletes[i]; i < deletes.length && del.clock < clockState; del = deletes[++i]) { iterateStructs(transaction, structs, del.clock, del.len, f) } }) From e86622219358dbd34e08617d59e1aafed5d640dc Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 18 Apr 2025 14:20:36 +0200 Subject: [PATCH 139/152] lint --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 430ad32d..cd4e1d97 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ Showcase](https://yjs-diagram.synergy.codes/). * [JupyterCad](https://jupytercad.readthedocs.io/en/latest/) Extension to JupyterLab that enables collaborative editing of 3d FreeCAD Models. * [JupyterGIS](https://github.com/geojupyter/jupytergis) Collaborative GIS - (Geographic Information System) editor in Jupyter + (Geographic Information System) editor in Jupyter * [Hyperquery](https://hyperquery.ai/) A collaborative data workspace for sharing analyses, documentation, spreadsheets, and dashboards. * [Nosgestesclimat](https://nosgestesclimat.fr/groupe) The french carbon @@ -309,7 +309,7 @@ A database and connection provider for Yjs based on Firestore.
y-op-sqlite
- Yjs persistence provider for op-sqlite + Yjs persistence provider for op-sqlite
From 0ae8d6cf5a3e5165fa47f8f77ff5ad656139422d Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 18 Apr 2025 14:22:09 +0200 Subject: [PATCH 140/152] 13.6.25 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31af45d8..c01fc083 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.24", + "version": "13.6.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.24", + "version": "13.6.25", "license": "MIT", "dependencies": { "lib0": "^0.2.99" diff --git a/package.json b/package.json index 18854b84..4797373e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.24", + "version": "13.6.25", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 13cd563c53e688581eae844ebab39ce9bd315936 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 18 Apr 2025 16:10:35 +0200 Subject: [PATCH 141/152] [iterateStructs] additional check for non-existent structs --- src/utils/DeleteSet.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/utils/DeleteSet.js b/src/utils/DeleteSet.js index 17695b08..94e32ddb 100644 --- a/src/utils/DeleteSet.js +++ b/src/utils/DeleteSet.js @@ -58,10 +58,12 @@ export class DeleteSet { export const iterateDeletedStructs = (transaction, ds, f) => ds.clients.forEach((deletes, clientid) => { const structs = /** @type {Array} */ (transaction.doc.store.clients.get(clientid)) - const lastStruct = structs[structs.length - 1] - const clockState = lastStruct.id.clock + lastStruct.length - for (let i = 0, del = deletes[i]; i < deletes.length && del.clock < clockState; del = deletes[++i]) { - iterateStructs(transaction, structs, del.clock, del.len, f) + if (structs != null) { + const lastStruct = structs[structs.length - 1] + const clockState = lastStruct.id.clock + lastStruct.length + for (let i = 0, del = deletes[i]; i < deletes.length && del.clock < clockState; del = deletes[++i]) { + iterateStructs(transaction, structs, del.clock, del.len, f) + } } }) From 2f4b8c38a1255548f310ed9b1fbc095f39f451fc Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 18 Apr 2025 16:12:26 +0200 Subject: [PATCH 142/152] 13.6.26 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c01fc083..35506087 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.25", + "version": "13.6.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.25", + "version": "13.6.26", "license": "MIT", "dependencies": { "lib0": "^0.2.99" diff --git a/package.json b/package.json index 4797373e..8e0643eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.25", + "version": "13.6.26", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", From 2fbc73e8f8acebe6b08c7f61e9ec230e11ea540e Mon Sep 17 00:00:00 2001 From: Yeshan Kaushik <68059178+Yeshan-K@users.noreply.github.com> Date: Tue, 22 Apr 2025 20:39:09 +0530 Subject: [PATCH 143/152] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index cd4e1d97..e9ebd08d 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,22 @@ are implemented in separate modules. | [PSPDFKit](https://www.nutrient.io/) | | [yjs-pspdfkit](https://github.com/hoangqwe159/yjs-pspdfkit) | [demo](https://github.com/hoangqwe159/yjs-pspdfkit) | | [Rows n'Columns](https://www.rowsncolumns.app/) | ✔ | [@rowsncolumns/y-spreadsheet](https://docs.rowsncolumns.app/collaboration/yjs-collaboration) | | +### Utilities + +
+
y-utility
+
+Library with YMultiDocUndoManager (undo/redo across Yjs docs) and YKeyValue (optimized key-value store). +
+ +
yjs-orderedtree 🌳
+
+Class for ordered trees via Y.Map. Handles insert, delete, and move operations for folder-like hierarchies. +
+ +
+ + ### Providers Setting up the communication between clients, managing awareness information, From 120856dfaf0a8ede92bc4fda30d94bd2825bb4d6 Mon Sep 17 00:00:00 2001 From: Yeshan Kaushik <68059178+Yeshan-K@users.noreply.github.com> Date: Tue, 22 Apr 2025 20:44:16 +0530 Subject: [PATCH 144/152] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e9ebd08d..fbdac5d0 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,7 @@ are implemented in separate modules. | [Rows n'Columns](https://www.rowsncolumns.app/) | ✔ | [@rowsncolumns/y-spreadsheet](https://docs.rowsncolumns.app/collaboration/yjs-collaboration) | | ### Utilities +Tools that extend the core functionality of Yjs.
y-utility
From 50378316faa9b9823460fc3974b658e925dae471 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 27 Apr 2025 18:58:33 +0200 Subject: [PATCH 145/152] add funding manifest to .well-known --- .well-known/funding-manifest-urls | 1 + 1 file changed, 1 insertion(+) create mode 100644 .well-known/funding-manifest-urls diff --git a/.well-known/funding-manifest-urls b/.well-known/funding-manifest-urls new file mode 100644 index 00000000..bc204ec6 --- /dev/null +++ b/.well-known/funding-manifest-urls @@ -0,0 +1 @@ +https://yjs.dev From 780b27bdba9966118f3b74941452babf0b509802 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 27 Apr 2025 19:27:14 +0200 Subject: [PATCH 146/152] update funding manifest --- funding.json | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/funding.json b/funding.json index 3ae1c266..5ac8cf88 100644 --- a/funding.json +++ b/funding.json @@ -8,7 +8,8 @@ "phone": "", "description": "OSS Developer", "webpageUrl": { - "url": "https://github.com/yjs" + "url": "https://yjs.dev", + "wellKnown": "https://yjs.dev/.well-known/funding-manifest-urls" } }, "projects": [ @@ -17,7 +18,8 @@ "name": "Yjs", "description": "A library for building collaborative applications. #p2p #local-first #CRDT Funding this project will also enable me to maintain the other Yjs-related technologies.", "webpageUrl": { - "url": "https://github.com/yjs/yjs" + "url": "https://yjs.dev", + "wellKnown": "https://yjs.dev/.well-known/funding-manifest-urls" }, "repositoryUrl": { "url": "https://github.com/yjs/yjs" @@ -34,8 +36,8 @@ ] }, { - "guid": "Titanic", - "name": "Y/Titanic", + "guid": "titanic", + "name": "Titanic", "description": "A provider for syncing millions of docs efficiently with other peers. This will become the foundation for building real local-first apps with Yjs.", "webpageUrl": { "url": "https://github.com/yjs/titanic", @@ -64,14 +66,20 @@ { "guid": "github-sponsors", "type": "payment-provider", - "address": "", + "address": "https://github.com/sponsors/dmonad", "description": "For funding of the Yjs project" }, { - "guid": "y-collective", + "guid": "yjs-opencollective", + "type": "payment-provider", + "address": "https://opencollective.com/y-collective/projects/yjs", + "description": "For funding Yjs via the OpenCollective." + }, + { + "guid": "ycrdt-opencollective", "type": "payment-provider", - "address": "https://opencollective.com/y-collective", - "description": "For funding the Y-CRDT - the Rust implementation of Yjs and other listed projects." + "address": "https://opencollective.com/y-collective/projects/y-crdt", + "description": "For funding Y-CRDT via the OpenCollective." } ], "plans": [ @@ -85,7 +93,7 @@ "frequency": "monthly", "channels": [ "github-sponsors", - "y-collective" + "yjs-opencollective" ] }, { @@ -97,7 +105,8 @@ "currency": "USD", "frequency": "one-time", "channels": [ - "github-sponsors" + "github-sponsors", + "yjs-opencollective" ] }, { @@ -109,7 +118,8 @@ "currency": "USD", "frequency": "monthly", "channels": [ - "github-sponsors" + "github-sponsors", + "yjs-opencollective" ] }, { @@ -121,7 +131,8 @@ "currency": "USD", "frequency": "monthly", "channels": [ - "github-sponsors" + "github-sponsors", + "yjs-opencollective" ] }, { @@ -133,7 +144,8 @@ "currency": "USD", "frequency": "monthly", "channels": [ - "github-sponsors" + "github-sponsors", + "yjs-opencollective" ] } ], From 29ab38cc431e38ef10aea8ad00b9e086806ef861 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 27 Apr 2025 19:42:00 +0200 Subject: [PATCH 147/152] add y-crdt --- funding.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/funding.json b/funding.json index 5ac8cf88..d326780e 100644 --- a/funding.json +++ b/funding.json @@ -59,6 +59,32 @@ "real-time", "web-development" ] + }, + { + "guid": "y-crdt", + "name": "Y-CRDT", + "description": "Rust implementation of Yjs with many bindings to other languages (C#, Python, Cffi, Wasm, Swift, ..)", + "webpageUrl": { + "url": "https://github.com/y-crdt/y-crdt", + "wellKnown": "https://github.com/y-crdt/y-crdt/blob/main/.well-known/funding-manifest-urls" + }, + "repositoryUrl": { + "url": "https://github.com/y-crdt/y-crdt", + "wellKnown": "https://github.com/y-crdt/y-crdt/blob/main/.well-known/funding-manifest-urls" + }, + "licenses": [ + "spdx:MIT" + ], + "tags": [ + "privacy", + "collaboration", + "p2p", + "CRDT", + "rich-text", + "real-time", + "web-development" + ] + } ], "funding": { From 120d61176cd5d355336d9d91a6fd87f79385607e Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 27 Apr 2025 19:48:11 +0200 Subject: [PATCH 148/152] better description of myself --- funding.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funding.json b/funding.json index d326780e..be198c3c 100644 --- a/funding.json +++ b/funding.json @@ -6,7 +6,7 @@ "name": "Kevin Jahns", "email": "kevin.jahns@protonmail.com", "phone": "", - "description": "OSS Developer", + "description": "Independent OSS Developer maintaining Yjs and many related libraries. My goal is to make the web more (real-time) collaborative.", "webpageUrl": { "url": "https://yjs.dev", "wellKnown": "https://yjs.dev/.well-known/funding-manifest-urls" From 2f33d1665e57385d4cb2beebb81e1da841edd6b1 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sun, 27 Apr 2025 19:52:50 +0200 Subject: [PATCH 149/152] lint --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fbdac5d0..4b1d9b10 100644 --- a/README.md +++ b/README.md @@ -170,22 +170,26 @@ are implemented in separate modules. | [Rows n'Columns](https://www.rowsncolumns.app/) | ✔ | [@rowsncolumns/y-spreadsheet](https://docs.rowsncolumns.app/collaboration/yjs-collaboration) | | ### Utilities + Tools that extend the core functionality of Yjs.
y-utility
-Library with YMultiDocUndoManager (undo/redo across Yjs docs) and YKeyValue (optimized key-value store). +Library with YMultiDocUndoManager (undo/redo across Yjs docs) and +YKeyValue (optimized key-value store).
- -
yjs-orderedtree 🌳
+
+ yjs-orderedtree 🌳 +
-Class for ordered trees via Y.Map. Handles insert, delete, and move operations for folder-like hierarchies. +Class for ordered trees via Y.Map. Handles insert, +delete, and move operations for folder-like +hierarchies.
- ### Providers Setting up the communication between clients, managing awareness information, From bd645c47bffd57ca68e406194eef9f811d0ca84a Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 30 Apr 2025 18:26:02 +0200 Subject: [PATCH 150/152] remove y-crdt (separate funding.json is maintained in y-crdt org) --- funding.json | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/funding.json b/funding.json index be198c3c..03740f20 100644 --- a/funding.json +++ b/funding.json @@ -59,32 +59,6 @@ "real-time", "web-development" ] - }, - { - "guid": "y-crdt", - "name": "Y-CRDT", - "description": "Rust implementation of Yjs with many bindings to other languages (C#, Python, Cffi, Wasm, Swift, ..)", - "webpageUrl": { - "url": "https://github.com/y-crdt/y-crdt", - "wellKnown": "https://github.com/y-crdt/y-crdt/blob/main/.well-known/funding-manifest-urls" - }, - "repositoryUrl": { - "url": "https://github.com/y-crdt/y-crdt", - "wellKnown": "https://github.com/y-crdt/y-crdt/blob/main/.well-known/funding-manifest-urls" - }, - "licenses": [ - "spdx:MIT" - ], - "tags": [ - "privacy", - "collaboration", - "p2p", - "CRDT", - "rich-text", - "real-time", - "web-development" - ] - } ], "funding": { @@ -100,12 +74,6 @@ "type": "payment-provider", "address": "https://opencollective.com/y-collective/projects/yjs", "description": "For funding Yjs via the OpenCollective." - }, - { - "guid": "ycrdt-opencollective", - "type": "payment-provider", - "address": "https://opencollective.com/y-collective/projects/y-crdt", - "description": "For funding Y-CRDT via the OpenCollective." } ], "plans": [ From 7dad24d7b630587081cacc6ca4fe8db17c1e6def Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 13 May 2025 16:25:40 +0200 Subject: [PATCH 151/152] support bigints in Y.Map.set - fixes #711 --- src/types/AbstractType.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 019369ec..a83f3a58 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -857,6 +857,8 @@ export const typeMapSet = (transaction, parent, key, value) => { case Boolean: case Array: case String: + case Date: + case BigInt: content = new ContentAny([value]) break case Uint8Array: From 987c9ebb5ad0a2a89a0230f3a0c6b31f095d5f2d Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 13 May 2025 16:32:59 +0200 Subject: [PATCH 152/152] 13.6.27 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35506087..c2a1194a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yjs", - "version": "13.6.26", + "version": "13.6.27", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yjs", - "version": "13.6.26", + "version": "13.6.27", "license": "MIT", "dependencies": { "lib0": "^0.2.99" diff --git a/package.json b/package.json index 8e0643eb..2f22d074 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.6.26", + "version": "13.6.27", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs",