@blocksuite/virgo
Advanced tools
Comparing version 0.10.0 to 0.11.0-nightly-202312061456-a5bf73a
@@ -160,3 +160,3 @@ import { assertExists } from '@blocksuite/global/utils'; | ||
if (this.vRangeProvider) { | ||
this.vRangeProvider.setVRange(vRange); | ||
this.vRangeProvider.setVRange(vRange, sync); | ||
return; | ||
@@ -163,0 +163,0 @@ } |
@@ -8,3 +8,3 @@ function handleInsertText(vRange, data, editor, attributes) { | ||
length: 0, | ||
}, false); | ||
}); | ||
} | ||
@@ -16,3 +16,3 @@ function handleInsertParagraph(vRange, editor) { | ||
length: 0, | ||
}, false); | ||
}); | ||
} | ||
@@ -24,3 +24,3 @@ function handleDelete(vRange, editor) { | ||
length: 0, | ||
}, false); | ||
}); | ||
} | ||
@@ -27,0 +27,0 @@ export function transformInput(inputType, data, attributes, vRange, editor) { |
@@ -13,3 +13,3 @@ import { DisposableGroup, Slot } from '@blocksuite/global/utils'; | ||
getVRange(): VRange | null; | ||
setVRange(vRange: VRange | null): void; | ||
setVRange(vRange: VRange | null, sync: boolean): void; | ||
vRangeUpdatedSlot: Slot<VRangeUpdatedProp>; | ||
@@ -16,0 +16,0 @@ } |
{ | ||
"name": "@blocksuite/virgo", | ||
"version": "0.10.0", | ||
"version": "0.11.0-nightly-202312061456-a5bf73a", | ||
"description": "A micro editor.", | ||
@@ -11,4 +11,4 @@ "type": "module", | ||
"devDependencies": { | ||
"lit": "^3.0.2", | ||
"yjs": "^13.6.8" | ||
"lit": "^3.1.0", | ||
"yjs": "^13.6.10" | ||
}, | ||
@@ -28,3 +28,3 @@ "peerDependencies": { | ||
"zod": "^3.22.4", | ||
"@blocksuite/global": "0.10.0" | ||
"@blocksuite/global": "0.11.0-nightly-202312061456-a5bf73a" | ||
}, | ||
@@ -31,0 +31,0 @@ "scripts": { |
@@ -24,3 +24,3 @@ # `@blocksuite/virgo` | ||
You can go to [virgo playground](https://blocksuite-toeverything.vercel.app/examples/virgo/) | ||
You can go to [virgo playground](https://try-blocksuite.vercel.app/examples/virgo/) | ||
for online testing and check out the code in its [repository](https://github.com/toeverything/blocksuite/tree/master/packages/playground/examples/virgo). | ||
@@ -49,3 +49,7 @@ | ||
.object({ | ||
type: z.enum(['Subpage', 'LinkedPage']), | ||
type: type: z.enum([ | ||
// @deprecated Subpage is deprecated, use LinkedPage instead | ||
'Subpage', | ||
'LinkedPage', | ||
]), | ||
pageId: z.string(), | ||
@@ -57,2 +61,3 @@ }) | ||
background: z.string().optional().nullable().catch(undefined), | ||
color: z.string().optional().nullable().catch(undefined), | ||
}); | ||
@@ -59,0 +64,0 @@ |
@@ -255,3 +255,3 @@ import { assertExists } from '@blocksuite/global/utils'; | ||
if (this.vRangeProvider) { | ||
this.vRangeProvider.setVRange(vRange); | ||
this.vRangeProvider.setVRange(vRange, sync); | ||
return; | ||
@@ -258,0 +258,0 @@ } |
@@ -13,9 +13,6 @@ import type { VRange } from '../types.js'; | ||
editor.insertText(vRange, data, attributes); | ||
editor.setVRange( | ||
{ | ||
index: vRange.index + data.length, | ||
length: 0, | ||
}, | ||
false | ||
); | ||
editor.setVRange({ | ||
index: vRange.index + data.length, | ||
length: 0, | ||
}); | ||
} | ||
@@ -25,9 +22,6 @@ | ||
editor.insertLineBreak(vRange); | ||
editor.setVRange( | ||
{ | ||
index: vRange.index + 1, | ||
length: 0, | ||
}, | ||
false | ||
); | ||
editor.setVRange({ | ||
index: vRange.index + 1, | ||
length: 0, | ||
}); | ||
} | ||
@@ -37,9 +31,6 @@ | ||
editor.deleteText(vRange); | ||
editor.setVRange( | ||
{ | ||
index: vRange.index, | ||
length: 0, | ||
}, | ||
false | ||
); | ||
editor.setVRange({ | ||
index: vRange.index, | ||
length: 0, | ||
}); | ||
} | ||
@@ -46,0 +37,0 @@ |
@@ -30,3 +30,3 @@ import { assertExists, DisposableGroup, Slot } from '@blocksuite/global/utils'; | ||
getVRange(): VRange | null; | ||
setVRange(vRange: VRange | null): void; | ||
setVRange(vRange: VRange | null, sync: boolean): void; | ||
vRangeUpdatedSlot: Slot<VRangeUpdatedProp>; | ||
@@ -33,0 +33,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
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
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
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
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
533363
121
8564
+ Added@blocksuite/global@0.11.0-nightly-202312061456-a5bf73a(transitive)
- Removed@blocksuite/global@0.10.0(transitive)
Updated@blocksuite/global@0.11.0-nightly-202312061456-a5bf73a