BlockSuite API Documentation / @blocksuite/block-std / SelectionManager
Class: SelectionManager
Constructors
new SelectionManager(std)
new SelectionManager(
std
):SelectionManager
Parameters
• std: BlockStdScope
Returns
Source
block-std/src/selection/manager.ts:29
Properties
_selectionConstructors
private
_selectionConstructors:Record
<string
,SelectionConstructor
> ={}
Source
block-std/src/selection/manager.ts:22
disposables
disposables:
DisposableGroup
Source
block-std/src/selection/manager.ts:21
slots
slots:
Object
slots.changed
changed:
Slot
<BaseSelection
[]>
slots.remoteChanged
remoteChanged:
Slot
<Map
<number
,BaseSelection
[]>>
Source
block-std/src/selection/manager.ts:24
std
std:
BlockStdScope
Source
block-std/src/selection/manager.ts:29
Accessors
_store
get
private
_store():AwarenessStore
<BlockSuiteFlags
>
Returns
AwarenessStore
<BlockSuiteFlags
>
Source
block-std/src/selection/manager.ts:40
remoteSelections
get
remoteSelections():Map
<number
,BaseSelection
[]>
Returns
Map
<number
, BaseSelection
[]>
Source
block-std/src/selection/manager.ts:130
value
get
value():BaseSelection
[]
Returns
Source
block-std/src/selection/manager.ts:72
Methods
_itemAdded()
private
_itemAdded(event
):void
Parameters
• event
• event.stackItem: StackItem
Returns
void
Source
block-std/src/selection/manager.ts:152
_itemPopped()
private
_itemPopped(event
):void
Parameters
• event
• event.stackItem: StackItem
Returns
void
Source
block-std/src/selection/manager.ts:156
_jsonToSelection()
private
_jsonToSelection(json
):BaseSelection
Parameters
• json: Record
<string
, unknown
>
Returns
Source
block-std/src/selection/manager.ts:53
_setupDefaultSelections()
private
_setupDefaultSelections():void
Returns
void
Source
block-std/src/selection/manager.ts:44
clear()
clear(
types
?):void
Parameters
• types?: string
[]
Returns
void
Source
block-std/src/selection/manager.ts:107
create()
create<
T
>(type
, ...args
):SelectionInstance
[T
]
Type parameters
• T extends keyof Selection
Parameters
• type: T
• ...args: ConstructorParameters
<Selection
[T
]>
Returns
SelectionInstance
[T
]
Source
block-std/src/selection/manager.ts:61
dispose()
dispose():
void
Returns
void
Source
block-std/src/selection/manager.ts:185
filter()
filter<
T
>(type
):SelectionInstance
[T
][]
Type parameters
• T extends keyof Selection
Parameters
• type: T
Returns
SelectionInstance
[T
][]
Source
block-std/src/selection/manager.ts:124
find()
find<
T
>(type
):undefined
|SelectionInstance
[T
]
Type parameters
• T extends keyof Selection
Parameters
• type: T
Returns
undefined
| SelectionInstance
[T
]
Source
block-std/src/selection/manager.ts:118
fromJSON()
fromJSON(
json
):void
Parameters
• json: Record
<string
, unknown
>[]
Returns
void
Source
block-std/src/selection/manager.ts:78
getGroup()
getGroup(
group
):BaseSelection
[]
Parameters
• group: string
Returns
Source
block-std/src/selection/manager.ts:98
mount()
mount():
void
Returns
void
Source
block-std/src/selection/manager.ts:163
register()
register(
ctor
):SelectionManager
Parameters
• ctor: SelectionConstructor
| SelectionConstructor
[]
Returns
Source
block-std/src/selection/manager.ts:33
set()
set(
selections
):void
Parameters
• selections: BaseSelection
[]
Returns
void
Source
block-std/src/selection/manager.ts:85
setGroup()
setGroup(
group
,selections
):void
Parameters
• group: string
• selections: BaseSelection
[]
Returns
void
Source
block-std/src/selection/manager.ts:93
unmount()
unmount():
void
Returns
void
Source
block-std/src/selection/manager.ts:177
update()
update(
fn
):void
Parameters
• fn
Returns
void
Source
block-std/src/selection/manager.ts:102