API > @blocksuite/block-std > SelectionManager
Class: SelectionManager ​
Constructors ​
constructor ​
new SelectionManager(
std
):SelectionManager
Parameters ​
Parameter | Type |
---|---|
std | BlockStdProvider |
Returns ​
Defined In ​
block-std/src/selection/manager.ts:29
Properties ​
_selectionConstructors ​
private
_selectionConstructors:Record
<string
,SelectionConstructor
> ={}
Defined In ​
block-std/src/selection/manager.ts:22
disposables ​
disposables:
DisposableGroup
Defined In ​
block-std/src/selection/manager.ts:21
slots ​
slots:
object
Type declaration ​
slots.changed
​changed:
Slot
<BaseSelection
[] >
slots.remoteChanged
​remoteChanged:
Slot
<Map
<number
,BaseSelection
[] > >
Defined In ​
block-std/src/selection/manager.ts:24
std ​
std:
BlockStdProvider
Defined In ​
block-std/src/selection/manager.ts:29
Accessors ​
_store ​
private
get
_store():AwarenessStore
<BlockSuiteFlags
>
Defined In ​
block-std/src/selection/manager.ts:40
remoteSelections ​
get
remoteSelections():Map
<number
,BaseSelection
[] >
Defined In ​
block-std/src/selection/manager.ts:127
value ​
get
value():BaseSelection
[]
Defined In ​
block-std/src/selection/manager.ts:72
Methods ​
_itemAdded ​
private
_itemAdded(event
):void
Parameters ​
Parameter | Type |
---|---|
event | object |
event.stackItem | StackItem |
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:140
_itemPopped ​
private
_itemPopped(event
):void
Parameters ​
Parameter | Type |
---|---|
event | object |
event.stackItem | StackItem |
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:144
_jsonToSelection ​
private
_jsonToSelection(json
):BaseSelection
Parameters ​
Parameter | Type |
---|---|
json | Record < string , unknown > |
Returns ​
Defined In ​
block-std/src/selection/manager.ts:53
_setupDefaultSelections ​
private
_setupDefaultSelections():void
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:44
clear ​
clear(
types
?):void
Parameters ​
Parameter | Type |
---|---|
types ? | string [] |
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:104
dispose ​
dispose():
void
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:173
filter ​
filter<
T
>(type
):SelectionInstance
[T
][]
Type parameters ​
Parameter |
---|
T extends keyof Selection |
Parameters ​
Parameter | Type |
---|---|
type | T |
Returns ​
SelectionInstance
[T
][]
Defined In ​
block-std/src/selection/manager.ts:121
find ​
find<
T
>(type
):undefined
|SelectionInstance
[T
]
Type parameters ​
Parameter |
---|
T extends keyof Selection |
Parameters ​
Parameter | Type |
---|---|
type | T |
Returns ​
undefined
| SelectionInstance
[T
]
Defined In ​
block-std/src/selection/manager.ts:115
fromJSON ​
fromJSON(
json
):void
Parameters ​
Parameter | Type |
---|---|
json | Record < string , unknown >[] |
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:78
getGroup ​
getGroup(
group
):BaseSelection
[]
Parameters ​
Parameter | Type |
---|---|
group | string |
Returns ​
Defined In ​
block-std/src/selection/manager.ts:95
getInstance ​
getInstance<
T
>(type
, ...args
):SelectionInstance
[T
]
Type parameters ​
Parameter |
---|
T extends keyof Selection |
Parameters ​
Parameter | Type |
---|---|
type | T |
...args | ConstructorParameters < Selection [T ] > |
Returns ​
SelectionInstance
[T
]
Defined In ​
block-std/src/selection/manager.ts:61
mount ​
mount():
void
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:151
register ​
register(
ctor
):SelectionManager
Parameters ​
Parameter | Type |
---|---|
ctor | SelectionConstructor | SelectionConstructor [] |
Returns ​
Defined In ​
block-std/src/selection/manager.ts:33
set ​
set(
selections
):void
Parameters ​
Parameter | Type |
---|---|
selections | BaseSelection [] |
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:85
setGroup ​
setGroup(
group
,selections
):void
Parameters ​
Parameter | Type |
---|---|
group | string |
selections | BaseSelection [] |
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:90
unmount ​
unmount():
void
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:165
update ​
update(
fn
):void
Parameters ​
Parameter | Type |
---|---|
fn | function |
Returns ​
void
Defined In ​
block-std/src/selection/manager.ts:99