@jupyter/ydoc
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -52,4 +52,7 @@ /** | ||
* document are bundled into a single event. | ||
* | ||
* @param f Transaction to execute | ||
* @param undoable Whether to track the change in the action history or not (default `true`) | ||
*/ | ||
transact(f: () => void): void; | ||
transact(f: () => void, undoable?: boolean): void; | ||
} | ||
@@ -56,0 +59,0 @@ /** |
@@ -646,3 +646,3 @@ /* ----------------------------------------------------------------------------- | ||
this.ymodel.set('metadata', clone); | ||
}); | ||
}, false); | ||
} | ||
@@ -661,3 +661,3 @@ else { | ||
this.ymodel.set('metadata', clone); | ||
}); | ||
}, false); | ||
} | ||
@@ -682,7 +682,7 @@ } | ||
transact(f, undoable = true) { | ||
this.notebook && undoable | ||
? this.notebook.transact(f) | ||
: this.ymodel.doc == null | ||
!this.notebook || this.notebook.disableDocumentWideUndoRedo | ||
? this.ymodel.doc == null | ||
? f() | ||
: this.ymodel.doc.transact(f, this); | ||
: this.ymodel.doc.transact(f, undoable ? this : null) | ||
: this.notebook.transact(f, undoable); | ||
} | ||
@@ -802,3 +802,3 @@ /** | ||
this.ymodel.set('execution_count', count); | ||
}); | ||
}, false); | ||
} | ||
@@ -910,3 +910,3 @@ } | ||
} | ||
}); | ||
}, false); | ||
} | ||
@@ -913,0 +913,0 @@ /** |
126
package.json
{ | ||
"name": "@jupyter/ydoc", | ||
"version": "0.2.2", | ||
"type": "module", | ||
"description": "Jupyter document structures for collaborative editing using YJS", | ||
"homepage": "https://github.com/jupyter-server/jupyter_ydoc", | ||
"bugs": { | ||
"url": "https://github.com/jupyter-server/jupyter_ydoc/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyter-server/jupyter_ydoc.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"author": "Project Jupyter", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"directories": { | ||
"lib": "lib/" | ||
}, | ||
"files": [ | ||
"lib/**/*.{d.ts,js,js.map,json}" | ||
], | ||
"scripts": { | ||
"build": "tsc -b", | ||
"build:test": "tsc --build tsconfig.test.json", | ||
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo", | ||
"docs": "typedoc src", | ||
"eslint": "eslint --ext .js,.jsx,.ts,.tsx --cache --fix .", | ||
"eslint:check": "eslint --ext .js,.jsx,.ts,.tsx --cache .", | ||
"lint": "yarn prettier && yarn eslint", | ||
"lint:check": "yarn prettier:check && yarn eslint:check", | ||
"prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json}\"", | ||
"prettier:check": "prettier --check \"**/*{.ts,.tsx,.js,.jsx,.css,.json}\"", | ||
"test": "jest", | ||
"test:cov": "jest --collect-coverage", | ||
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand", | ||
"test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch", | ||
"watch": "tsc -b --watch" | ||
}, | ||
"dependencies": { | ||
"@jupyterlab/nbformat": "^3.0.0 || ^4.0.0-alpha.15", | ||
"@lumino/coreutils": "^1.11.0 || ^2.0.0-alpha.6", | ||
"@lumino/disposable": "^1.10.0 || ^2.0.0-alpha.6", | ||
"@lumino/signaling": "^1.10.0 || ^2.0.0-alpha.6", | ||
"y-protocols": "^1.0.5", | ||
"yjs": "^13.5.40" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.36.0", | ||
"@typescript-eslint/parser": "^5.36.0", | ||
"eslint": "^8.17.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-jest": "^27.0.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"jest": "^29.0.0", | ||
"prettier": "^2.6.0", | ||
"rimraf": "^3.0.0", | ||
"typescript": "^4.8.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
"name": "@jupyter/ydoc", | ||
"version": "0.2.3", | ||
"type": "module", | ||
"description": "Jupyter document structures for collaborative editing using YJS", | ||
"homepage": "https://github.com/jupyter-server/jupyter_ydoc", | ||
"bugs": { | ||
"url": "https://github.com/jupyter-server/jupyter_ydoc/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyter-server/jupyter_ydoc.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"author": "Project Jupyter", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"directories": { | ||
"lib": "lib/" | ||
}, | ||
"files": [ | ||
"lib/**/*.{d.ts,js,js.map,json}" | ||
], | ||
"scripts": { | ||
"build": "tsc -b", | ||
"build:test": "tsc --build tsconfig.test.json", | ||
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo", | ||
"docs": "typedoc src", | ||
"eslint": "eslint --ext .js,.jsx,.ts,.tsx --cache --fix .", | ||
"eslint:check": "eslint --ext .js,.jsx,.ts,.tsx --cache .", | ||
"lint": "yarn prettier && yarn eslint", | ||
"lint:check": "yarn prettier:check && yarn eslint:check", | ||
"prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json}\"", | ||
"prettier:check": "prettier --check \"**/*{.ts,.tsx,.js,.jsx,.css,.json}\"", | ||
"test": "jest", | ||
"test:cov": "jest --collect-coverage", | ||
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand", | ||
"test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch", | ||
"watch": "tsc -b --watch" | ||
}, | ||
"dependencies": { | ||
"@jupyterlab/nbformat": "^3.0.0 || ^4.0.0-alpha.15", | ||
"@lumino/coreutils": "^1.11.0 || ^2.0.0-alpha.6", | ||
"@lumino/disposable": "^1.10.0 || ^2.0.0-alpha.6", | ||
"@lumino/signaling": "^1.10.0 || ^2.0.0-alpha.6", | ||
"y-protocols": "^1.0.5", | ||
"yjs": "^13.5.40" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.36.0", | ||
"@typescript-eslint/parser": "^5.36.0", | ||
"eslint": "^8.17.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-jest": "^27.0.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"jest": "^29.0.0", | ||
"prettier": "^2.6.0", | ||
"rimraf": "^3.0.0", | ||
"typescript": "^4.8.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116614
2773