@blocksuite/block-std
Advanced tools
Comparing version 0.0.0-20230810005427-25adb757-nightly to 0.0.0-20230810154852-8a8eccea-nightly
@@ -27,2 +27,4 @@ import { DisposableGroup, Slot } from '@blocksuite/store'; | ||
clear(types?: string[]): void; | ||
find<T extends BlockSuiteSelectionType>(type: T): BlockSuiteSelectionInstance[T] | undefined; | ||
filter<T extends BlockSuiteSelectionType>(type: T): BlockSuiteSelectionInstance[T][]; | ||
get remoteSelections(): { | ||
@@ -29,0 +31,0 @@ [k: string]: BaseSelection[]; |
@@ -71,2 +71,8 @@ import { DisposableGroup, Slot } from '@blocksuite/store'; | ||
} | ||
find(type) { | ||
return this.value.find((sel) => sel.is(type)); | ||
} | ||
filter(type) { | ||
return this.value.filter((sel) => sel.is(type)); | ||
} | ||
get remoteSelections() { | ||
@@ -73,0 +79,0 @@ return Object.fromEntries(Array.from(this._store.getStates().entries()) |
{ | ||
"name": "@blocksuite/block-std", | ||
"version": "0.0.0-20230810005427-25adb757-nightly", | ||
"version": "0.0.0-20230810154852-8a8eccea-nightly", | ||
"description": "Std for blocksuite blocks", | ||
@@ -12,10 +12,10 @@ "main": "dist/index.js", | ||
"peerDependencies": { | ||
"@blocksuite/store": "0.0.0-20230810005427-25adb757-nightly" | ||
"@blocksuite/store": "0.0.0-20230810154852-8a8eccea-nightly" | ||
}, | ||
"dependencies": { | ||
"w3c-keyname": "^2.2.8", | ||
"@blocksuite/global": "0.0.0-20230810005427-25adb757-nightly" | ||
"@blocksuite/global": "0.0.0-20230810154852-8a8eccea-nightly" | ||
}, | ||
"devDependencies": { | ||
"@blocksuite/store": "0.0.0-20230810005427-25adb757-nightly" | ||
"@blocksuite/store": "0.0.0-20230810154852-8a8eccea-nightly" | ||
}, | ||
@@ -22,0 +22,0 @@ "exports": { |
@@ -94,2 +94,14 @@ import type { StackItem } from '@blocksuite/store'; | ||
find<T extends BlockSuiteSelectionType>(type: T) { | ||
return this.value.find((sel): sel is BlockSuiteSelectionInstance[T] => | ||
sel.is(type) | ||
); | ||
} | ||
filter<T extends BlockSuiteSelectionType>(type: T) { | ||
return this.value.filter((sel): sel is BlockSuiteSelectionInstance[T] => | ||
sel.is(type) | ||
); | ||
} | ||
get remoteSelections() { | ||
@@ -96,0 +108,0 @@ return Object.fromEntries( |
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
428433
3446
+ Added@blocksuite/global@0.0.0-20230810154852-8a8eccea-nightly(transitive)
+ Added@blocksuite/store@0.0.0-20230810154852-8a8eccea-nightly(transitive)
+ Added@blocksuite/virgo@0.0.0-20230810154852-8a8eccea-nightly(transitive)
- Removed@blocksuite/global@0.0.0-20230810005427-25adb757-nightly(transitive)
- Removed@blocksuite/store@0.0.0-20230810005427-25adb757-nightly(transitive)
- Removed@blocksuite/virgo@0.0.0-20230810005427-25adb757-nightly(transitive)
Updated@blocksuite/global@0.0.0-20230810154852-8a8eccea-nightly