@blocksuite/block-std
Advanced tools
Comparing version 0.0.0-20230903053104-ef722e5c-nightly to 0.0.0-20230904210824-82bf80a4-nightly
import { DisposableGroup, Slot } from '@blocksuite/global/utils'; | ||
import { BlockSelection, SurfaceSelection, TextSelection, } from './variants/index.js'; | ||
import { BlockSelection, CursorSelection, SurfaceSelection, TextSelection, } from './variants/index.js'; | ||
export class SelectionManager { | ||
@@ -40,3 +40,8 @@ constructor(blockStore) { | ||
_setupDefaultSelections() { | ||
this.register([TextSelection, BlockSelection, SurfaceSelection]); | ||
this.register([ | ||
TextSelection, | ||
BlockSelection, | ||
SurfaceSelection, | ||
CursorSelection, | ||
]); | ||
} | ||
@@ -43,0 +48,0 @@ getInstance(type, ...args) { |
export * from './block.js'; | ||
export * from './cursor.js'; | ||
export * from './surface.js'; | ||
@@ -3,0 +4,0 @@ export * from './text.js'; |
export * from './block.js'; | ||
export * from './cursor.js'; | ||
export * from './surface.js'; | ||
export * from './text.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -15,3 +15,4 @@ import { BaseSelection } from '../base.js'; | ||
this.elements.length === other.elements.length && | ||
this.elements.every((id, idx) => id === other.elements[idx])); | ||
this.elements.every((id, idx) => id === other.elements[idx]) && | ||
this.editing === other.editing); | ||
} | ||
@@ -18,0 +19,0 @@ return false; |
{ | ||
"name": "@blocksuite/block-std", | ||
"version": "0.0.0-20230903053104-ef722e5c-nightly", | ||
"version": "0.0.0-20230904210824-82bf80a4-nightly", | ||
"description": "Std for blocksuite blocks", | ||
@@ -12,10 +12,10 @@ "main": "dist/index.js", | ||
"peerDependencies": { | ||
"@blocksuite/store": "0.0.0-20230903053104-ef722e5c-nightly" | ||
"@blocksuite/store": "0.0.0-20230904210824-82bf80a4-nightly" | ||
}, | ||
"dependencies": { | ||
"w3c-keyname": "^2.2.8", | ||
"@blocksuite/global": "0.0.0-20230903053104-ef722e5c-nightly" | ||
"@blocksuite/global": "0.0.0-20230904210824-82bf80a4-nightly" | ||
}, | ||
"devDependencies": { | ||
"@blocksuite/store": "0.0.0-20230903053104-ef722e5c-nightly" | ||
"@blocksuite/store": "0.0.0-20230904210824-82bf80a4-nightly" | ||
}, | ||
@@ -22,0 +22,0 @@ "exports": { |
@@ -8,2 +8,3 @@ import { DisposableGroup, Slot } from '@blocksuite/global/utils'; | ||
BlockSelection, | ||
CursorSelection, | ||
SurfaceSelection, | ||
@@ -46,3 +47,8 @@ TextSelection, | ||
private _setupDefaultSelections() { | ||
this.register([TextSelection, BlockSelection, SurfaceSelection]); | ||
this.register([ | ||
TextSelection, | ||
BlockSelection, | ||
SurfaceSelection, | ||
CursorSelection, | ||
]); | ||
} | ||
@@ -49,0 +55,0 @@ |
export * from './block.js'; | ||
export * from './cursor.js'; | ||
export * from './surface.js'; | ||
@@ -3,0 +4,0 @@ export * from './text.js'; |
@@ -25,3 +25,4 @@ import { BaseSelection } from '../base.js'; | ||
this.elements.length === other.elements.length && | ||
this.elements.every((id, idx) => id === other.elements[idx]) | ||
this.elements.every((id, idx) => id === other.elements[idx]) && | ||
this.editing === other.editing | ||
); | ||
@@ -28,0 +29,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
278640
159
3869
+ Added@blocksuite/global@0.0.0-20230904210824-82bf80a4-nightly(transitive)
+ Added@blocksuite/store@0.0.0-20230904210824-82bf80a4-nightly(transitive)
+ Added@blocksuite/virgo@0.0.0-20230904210824-82bf80a4-nightly(transitive)
+ Addedfs-monkey@1.0.6(transitive)
+ Addedunionfs@4.5.4(transitive)
- Removed@blocksuite/global@0.0.0-20230903053104-ef722e5c-nightly(transitive)
- Removed@blocksuite/store@0.0.0-20230903053104-ef722e5c-nightly(transitive)
- Removed@blocksuite/virgo@0.0.0-20230903053104-ef722e5c-nightly(transitive)
Updated@blocksuite/global@0.0.0-20230904210824-82bf80a4-nightly