BlockSuite API Documentation / @blocksuite/block-std / SelectionManager
Class: SelectionManager ​
Contents ​
Constructors ​
new SelectionManager(std) ​
new SelectionManager(
std
):SelectionManager
Parameters ​
• std: BlockStdProvider
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
Type declaration ​
changed ​
changed:
Slot
<BaseSelection
[]>
remoteChanged ​
remoteChanged:
Slot
<Map
<number
,BaseSelection
[]>>
Source ​
block-std/src/selection/manager.ts:24
std ​
std:
BlockStdProvider
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:127
value ​
get
value():BaseSelection
[]
Returns ​
Source ​
block-std/src/selection/manager.ts:72
Methods ​
_itemAdded() ​
private
_itemAdded(event
):void
Parameters ​
• event: Object
• event.stackItem: StackItem
Returns ​
void
Source ​
block-std/src/selection/manager.ts:146
_itemPopped() ​
private
_itemPopped(event
):void
Parameters ​
• event: Object
• event.stackItem: StackItem
Returns ​
void
Source ​
block-std/src/selection/manager.ts:150
_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:104
dispose() ​
dispose():
void
Returns ​
void
Source ​
block-std/src/selection/manager.ts:179
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:121
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:115
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:95
getInstance() ​
getInstance<
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
mount() ​
mount():
void
Returns ​
void
Source ​
block-std/src/selection/manager.ts:157
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:90
unmount() ​
unmount():
void
Returns ​
void
Source ​
block-std/src/selection/manager.ts:171
update() ​
update(
fn
):void
Parameters ​
• fn: (currentSelections
) => BaseSelection
[]
Returns ​
void
Source ​
block-std/src/selection/manager.ts:99
Generated using typedoc-plugin-markdown and TypeDoc