BlockSuite API Documentation / @blocksuite/block-std / SelectionManager
Class: SelectionManager
Constructors
new SelectionManager(std)
new SelectionManager(
std
):SelectionManager
Parameters
• std: BlockStdScope
Returns
Source
packages/framework/block-std/src/selection/manager.ts:29
Properties
_selectionConstructors
private
_selectionConstructors:Record
<string
,SelectionConstructor
> ={}
Source
packages/framework/block-std/src/selection/manager.ts:22
disposables
disposables:
DisposableGroup
Source
packages/framework/block-std/src/selection/manager.ts:21
slots
slots:
object
changed
changed:
Slot
<BaseSelection
[]>
remoteChanged
remoteChanged:
Slot
<Map
<number
,BaseSelection
[]>>
Source
packages/framework/block-std/src/selection/manager.ts:24
std
std:
BlockStdScope
Source
packages/framework/block-std/src/selection/manager.ts:29
Accessors
_store
get
private
_store():AwarenessStore
<BlockSuiteFlags
>
Returns
AwarenessStore
<BlockSuiteFlags
>
Source
packages/framework/block-std/src/selection/manager.ts:40
remoteSelections
get
remoteSelections():Map
<number
,BaseSelection
[]>
Returns
Map
<number
, BaseSelection
[]>
Source
packages/framework/block-std/src/selection/manager.ts:132
value
get
value():BaseSelection
[]
Returns
Source
packages/framework/block-std/src/selection/manager.ts:72
Methods
_itemAdded()
private
_itemAdded(event
):void
Parameters
• event
• event.stackItem: StackItem
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:154
_itemPopped()
private
_itemPopped(event
):void
Parameters
• event
• event.stackItem: StackItem
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:158
_jsonToSelection()
private
_jsonToSelection(json
):BaseSelection
Parameters
• json: Record
<string
, unknown
>
Returns
Source
packages/framework/block-std/src/selection/manager.ts:53
_setupDefaultSelections()
private
_setupDefaultSelections():void
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:44
clear()
clear(
types
?):void
Parameters
• types?: string
[]
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:109
create()
create<
T
>(type
, ...args
):SelectionInstance
[T
]
Type parameters
• T extends keyof Selection
Parameters
• type: T
• ...args: ConstructorParameters
<Selection
[T
]>
Returns
SelectionInstance
[T
]
Source
packages/framework/block-std/src/selection/manager.ts:61
dispose()
dispose():
void
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:187
filter()
filter<
T
>(type
):SelectionInstance
[T
][]
Type parameters
• T extends keyof Selection
Parameters
• type: T
Returns
SelectionInstance
[T
][]
Source
packages/framework/block-std/src/selection/manager.ts:126
find()
find<
T
>(type
):undefined
|SelectionInstance
[T
]
Type parameters
• T extends keyof Selection
Parameters
• type: T
Returns
undefined
| SelectionInstance
[T
]
Source
packages/framework/block-std/src/selection/manager.ts:120
fromJSON()
fromJSON(
json
):void
Parameters
• json: Record
<string
, unknown
>[]
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:80
getGroup()
getGroup(
group
):BaseSelection
[]
Parameters
• group: string
Returns
Source
packages/framework/block-std/src/selection/manager.ts:100
mount()
mount():
void
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:165
register()
register(
ctor
):SelectionManager
Parameters
• ctor: SelectionConstructor
| SelectionConstructor
[]
Returns
Source
packages/framework/block-std/src/selection/manager.ts:33
set()
set(
selections
):void
Parameters
• selections: BaseSelection
[]
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:87
setGroup()
setGroup(
group
,selections
):void
Parameters
• group: string
• selections: BaseSelection
[]
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:95
unmount()
unmount():
void
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:179
update()
update(
fn
):void
Parameters
• fn
Returns
void
Source
packages/framework/block-std/src/selection/manager.ts:104