Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45df311dd7 | ||
|
|
62888b4004 | ||
|
|
76c389dba0 | ||
|
|
78fa98c000 |
20
package-lock.json
generated
20
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.1",
|
"version": "13.0.3",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1332,9 +1332,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"isomorphic.js": {
|
"isomorphic.js": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.1.3.tgz",
|
||||||
"integrity": "sha512-Q85LNm6e50saL4EPWa0mWEYNUuV51n623gzPVNC1QiLGLmjONEtfFT3pa04OoUIYB7rzGJBpzO2iNPhV1Ib4hg=="
|
"integrity": "sha512-pabBRLDwYefSsNS+qCazJ97o7P5xDTrNoxSYFTM09JlZTxPrOEPGKekwqUy3/Np4C4PHnVUXHYsZPOix0jELsA=="
|
||||||
},
|
},
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@@ -1439,9 +1439,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lib0": {
|
"lib0": {
|
||||||
"version": "0.2.7",
|
"version": "0.2.12",
|
||||||
"resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.12.tgz",
|
||||||
"integrity": "sha512-25ojhgEondpayWt2mgVTKels6R8viO27AetFgvdOk+WWGVah+q2pXouQ6dGj/gtxNwCDD2ih2B0LbDovNEtCrg==",
|
"integrity": "sha512-ileLyIMsWqcpyFLP6WMIgD6C7rkwrdYjH6CCFvAnqOhnGcyAl8LmLkiryVNmKW0sLRw/gLcB47LGXJDw0tDlkg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"isomorphic.js": "^0.1.1"
|
"isomorphic.js": "^0.1.1"
|
||||||
}
|
}
|
||||||
@@ -2291,9 +2291,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rollup": {
|
"rollup": {
|
||||||
"version": "1.29.1",
|
"version": "1.30.0",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.29.1.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.30.0.tgz",
|
||||||
"integrity": "sha512-dGQ+b9d1FOX/gluiggTAVnTvzQZUEkCi/TwZcax7ujugVRHs0nkYJlV9U4hsifGEMojnO+jvEML2CJQ6qXgbHA==",
|
"integrity": "sha512-ANcmfaSQwpcJtZUTA0ZMNBtFcQ1B4A5FldlNqEK0WdWm9sHSKu93ffa2KV1ux8HA/yKIV/ZARV28m7rNdXJgEw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/estree": "*",
|
"@types/estree": "*",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.1",
|
"version": "13.0.3",
|
||||||
"description": "Shared Editing Library",
|
"description": "Shared Editing Library",
|
||||||
"main": "./dist/yjs.cjs",
|
"main": "./dist/yjs.cjs",
|
||||||
"module": "./src/index.js",
|
"module": "./dist/yjs.mjs",
|
||||||
"types": "./dist/src/index.d.ts",
|
"types": "./dist/src/index.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://yjs.dev",
|
"homepage": "https://yjs.dev",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lib0": "^0.2.7"
|
"lib0": "^0.2.12"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^11.0.1",
|
"@rollup/plugin-commonjs": "^11.0.1",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
"http-server": "^0.12.1",
|
"http-server": "^0.12.1",
|
||||||
"jsdoc": "^3.6.3",
|
"jsdoc": "^3.6.3",
|
||||||
"markdownlint-cli": "^0.19.0",
|
"markdownlint-cli": "^0.19.0",
|
||||||
"rollup": "^1.29.1",
|
"rollup": "^1.30.0",
|
||||||
"rollup-cli": "^1.0.9",
|
"rollup-cli": "^1.0.9",
|
||||||
"standard": "^14.0.0",
|
"standard": "^14.0.0",
|
||||||
"tui-jsdoc-template": "^1.2.2",
|
"tui-jsdoc-template": "^1.2.2",
|
||||||
|
|||||||
@@ -51,6 +51,21 @@ export default [{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
external: id => /^lib0\//.test(id)
|
external: id => /^lib0\//.test(id)
|
||||||
|
}, {
|
||||||
|
input: './src/index.js',
|
||||||
|
output: {
|
||||||
|
name: 'Y',
|
||||||
|
file: 'dist/yjs.mjs',
|
||||||
|
format: 'esm',
|
||||||
|
sourcemap: true,
|
||||||
|
paths: path => {
|
||||||
|
if (/^lib0\//.test(path)) {
|
||||||
|
return `lib0/dist/${path.slice(5, -3)}.cjs`
|
||||||
|
}
|
||||||
|
return path
|
||||||
|
}
|
||||||
|
},
|
||||||
|
external: id => /^lib0\//.test(id)
|
||||||
}, {
|
}, {
|
||||||
input: './tests/index.js',
|
input: './tests/index.js',
|
||||||
output: {
|
output: {
|
||||||
|
|||||||
@@ -56,5 +56,6 @@ export {
|
|||||||
isParentOf,
|
isParentOf,
|
||||||
equalSnapshots,
|
equalSnapshots,
|
||||||
PermanentUserData, // @TODO experimental
|
PermanentUserData, // @TODO experimental
|
||||||
tryGc
|
tryGc,
|
||||||
|
transact
|
||||||
} from './internals.js'
|
} from './internals.js'
|
||||||
|
|||||||
@@ -617,6 +617,11 @@ export class YText extends AbstractType {
|
|||||||
this._pending = string !== undefined ? [() => this.insert(0, string)] : []
|
this._pending = string !== undefined ? [() => this.insert(0, string)] : []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of characters of this text type.
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
get length () {
|
get length () {
|
||||||
return this._length
|
return this._length
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -338,7 +338,6 @@ const cleanupTransactions = (transactionCleanups, i) => {
|
|||||||
* @param {function(Transaction):void} f
|
* @param {function(Transaction):void} f
|
||||||
* @param {any} [origin=true]
|
* @param {any} [origin=true]
|
||||||
*
|
*
|
||||||
* @private
|
|
||||||
* @function
|
* @function
|
||||||
*/
|
*/
|
||||||
export const transact = (doc, f, origin = null, local = true) => {
|
export const transact = (doc, f, origin = null, local = true) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user