@blocksuite/virgo
Advanced tools
Comparing version 0.5.0-20230310095333-5202fb9 to 0.5.0-20230310132906-cc38585
@@ -156,11 +156,9 @@ import { assertExists, Slot } from '@blocksuite/global/utils'; | ||
const vRange = this._vRange; | ||
const text = data.replace(/(\r\n|\r|\n)/g, '\n'); | ||
if (vRange) { | ||
this.insertText(vRange, data); | ||
this.slots.updateVRange.emit([ | ||
{ | ||
index: vRange.index + data.length, | ||
length: 0, | ||
}, | ||
'input', | ||
]); | ||
this.insertText(vRange, text); | ||
this.setVRange({ | ||
index: vRange.index + text.length, | ||
length: 0, | ||
}); | ||
} | ||
@@ -441,2 +439,3 @@ } | ||
}); | ||
this.bindHandlers(); | ||
this.slots.mounted.emit(); | ||
@@ -443,0 +442,0 @@ } |
{ | ||
"name": "@blocksuite/virgo", | ||
"version": "0.5.0-20230310095333-5202fb9", | ||
"version": "0.5.0-20230310132906-cc38585", | ||
"description": "A micro editor.", | ||
@@ -26,3 +26,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@blocksuite/global": "0.5.0-20230310095333-5202fb9", | ||
"@blocksuite/global": "0.5.0-20230310132906-cc38585", | ||
"zod": "^3.20.6" | ||
@@ -29,0 +29,0 @@ }, |
@@ -226,11 +226,9 @@ import { assertExists, Slot } from '@blocksuite/global/utils'; | ||
const vRange = this._vRange; | ||
const text = data.replace(/(\r\n|\r|\n)/g, '\n'); | ||
if (vRange) { | ||
this.insertText(vRange, data); | ||
this.slots.updateVRange.emit([ | ||
{ | ||
index: vRange.index + data.length, | ||
length: 0, | ||
}, | ||
'input', | ||
]); | ||
this.insertText(vRange, text); | ||
this.setVRange({ | ||
index: vRange.index + text.length, | ||
length: 0, | ||
}); | ||
} | ||
@@ -369,2 +367,4 @@ } | ||
this.bindHandlers(); | ||
this.slots.mounted.emit(); | ||
@@ -371,0 +371,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
364394
4907
+ Added@blocksuite/global@0.5.0-20230310132906-cc38585(transitive)
- Removed@blocksuite/global@0.5.0-20230310095333-5202fb9(transitive)