Compare commits
4 Commits
v13.0.0-10
...
v13.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fb55981ba | ||
|
|
89378e29ae | ||
|
|
cce35270ec | ||
|
|
d78180bf97 |
@@ -20,9 +20,6 @@ suited for even large documents.
|
|||||||
* Podcast [**"Yjs Deep Dive into real time collaborative editing solutions":**](https://www.tag1consulting.com/blog/deep-dive-real-time-collaborative-editing-solutions-tagteamtalk-001-0)
|
* Podcast [**"Yjs Deep Dive into real time collaborative editing solutions":**](https://www.tag1consulting.com/blog/deep-dive-real-time-collaborative-editing-solutions-tagteamtalk-001-0)
|
||||||
* Podcast [**"Google Docs-style editing in Gutenberg with the YJS framework":**](https://publishpress.com/blog/yjs/)
|
* Podcast [**"Google Docs-style editing in Gutenberg with the YJS framework":**](https://publishpress.com/blog/yjs/)
|
||||||
|
|
||||||
:warning: This is the documentation for v13 (still in alpha). For the stable v12
|
|
||||||
release checkout the [v12 docs](./README.v12.md) :warning:
|
|
||||||
|
|
||||||
:construction_worker_woman: If you are looking for professional support to build
|
:construction_worker_woman: If you are looking for professional support to build
|
||||||
collaborative or distributed applications ping us at <yjs@tag1consulting.com>.
|
collaborative or distributed applications ping us at <yjs@tag1consulting.com>.
|
||||||
|
|
||||||
@@ -103,7 +100,7 @@ hypercores and y-dat listens to changes and applies them to the Yjs document.
|
|||||||
Install Yjs and a provider with your favorite package manager:
|
Install Yjs and a provider with your favorite package manager:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm i yjs@13.0.0-103 y-websocket@1.0.0-6
|
npm i yjs y-websocket
|
||||||
```
|
```
|
||||||
|
|
||||||
Start the y-websocket server:
|
Start the y-websocket server:
|
||||||
@@ -677,7 +674,7 @@ undo- or the redo-stack.
|
|||||||
<code>
|
<code>
|
||||||
on('stack-item-popped', { stackItem: { meta: Map<any,any> }, type: 'undo'
|
on('stack-item-popped', { stackItem: { meta: Map<any,any> }, type: 'undo'
|
||||||
| 'redo' })
|
| 'redo' })
|
||||||
</code>
|
</code>
|
||||||
</b>
|
</b>
|
||||||
<dd>
|
<dd>
|
||||||
Register an event that is called when a <code>StackItem</code> is popped from
|
Register an event that is called when a <code>StackItem</code> is popped from
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.0-108",
|
"version": "13.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.0-108",
|
"version": "13.0.0",
|
||||||
"description": "Shared Editing Library",
|
"description": "Shared Editing Library",
|
||||||
"main": "./dist/yjs.cjs",
|
"main": "./dist/yjs.cjs",
|
||||||
"module": "./src/index.js",
|
"module": "./src/index.js",
|
||||||
|
"types": "./dist/src/index.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run dist && node ./dist/tests.cjs --repitition-time 50",
|
"test": "npm run dist && node ./dist/tests.cjs --repitition-time 50",
|
||||||
"test-exhaustive": "npm run lint && npm run dist && node ./dist/tests.cjs --production --repitition-time 10000",
|
"test-exhaustive": "npm run lint && npm run dist && node ./dist/tests.cjs --production --repitition-time 10000",
|
||||||
"dist": "rm -rf dist && rollup -c",
|
"dist": "rm -rf dist && rollup -c && tsc",
|
||||||
"watch": "rollup -wc",
|
"watch": "rollup -wc",
|
||||||
"lint": "markdownlint README.md && standard && tsc",
|
"lint": "markdownlint README.md && standard && tsc",
|
||||||
"docs": "rm -rf docs; jsdoc --configure ./.jsdoc.json --verbose --readme ./README.md --package ./package.json || true",
|
"docs": "rm -rf docs; jsdoc --configure ./.jsdoc.json --verbose --readme ./README.md --package ./package.json || true",
|
||||||
|
|||||||
@@ -71,10 +71,10 @@ export class PermanentUserData {
|
|||||||
* @param {Doc} doc
|
* @param {Doc} doc
|
||||||
* @param {number} clientid
|
* @param {number} clientid
|
||||||
* @param {string} userDescription
|
* @param {string} userDescription
|
||||||
* @param {Object} conf
|
* @param {Object} [conf]
|
||||||
* @param {function(Transaction, DeleteSet):boolean} [conf.filter]
|
* @param {function(Transaction, DeleteSet):boolean} [conf.filter]
|
||||||
*/
|
*/
|
||||||
setUserMapping (doc, clientid, userDescription, { filter = () => true }) {
|
setUserMapping (doc, clientid, userDescription, { filter = () => true } = {}) {
|
||||||
const users = this.yusers
|
const users = this.yusers
|
||||||
let user = users.get(userDescription)
|
let user = users.get(userDescription)
|
||||||
if (!user) {
|
if (!user) {
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
"allowJs": true, /* Allow javascript files to be compiled. */
|
"allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
"checkJs": true, /* Report errors in .js files. */
|
"checkJs": true, /* Report errors in .js files. */
|
||||||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||||
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||||
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
// "outFile": "./dist/yjs.js", /* Concatenate and emit output to single file. */
|
||||||
// "outDir": "./build", /* Redirect output structure to the directory. */
|
"outDir": "./dist", /* Redirect output structure to the directory. */
|
||||||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
"rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||||
// "composite": true, /* Enable project compilation */
|
// "composite": true, /* Enable project compilation */
|
||||||
// "removeComments": true, /* Do not emit comments to output. */
|
// "removeComments": true, /* Do not emit comments to output. */
|
||||||
"noEmit": true, /* Do not emit outputs. */
|
// "noEmit": true, /* Do not emit outputs. */
|
||||||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
||||||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
||||||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
/* Strict Type-Checking Options */
|
/* Strict Type-Checking Options */
|
||||||
"strict": true, /* Enable all strict type-checking options. */
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||||
@@ -62,6 +63,6 @@
|
|||||||
"maxNodeModuleJsDepth": 5,
|
"maxNodeModuleJsDepth": 5,
|
||||||
// "types": ["./src/utils/typedefs.js"]
|
// "types": ["./src/utils/typedefs.js"]
|
||||||
},
|
},
|
||||||
"include": ["./src/**/*", "./tests/**/*"],
|
"include": ["./src/**/*.js", "./tests/**/*.js"],
|
||||||
"exclude": ["../lib0/**/*", "node_modules/**/*", "dist", "dist/**/*.js"]
|
"exclude": ["../lib0/**/*", "node_modules/**/*", "dist", "dist/**/*.js"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user