refactor(editor): rename block-std to std (#11250)

Closes: BS-2946
This commit is contained in:
Saul-Mirone
2025-03-28 07:20:34 +00:00
parent 4498676a96
commit 205cd7a86d
1029 changed files with 1580 additions and 1698 deletions

View File

@@ -0,0 +1,46 @@
[**BlockSuite API Documentation**](../../../README.md)
***
[BlockSuite API Documentation](../../../README.md) / [@blocksuite/std](../README.md) / gfx
# gfx
## Classes
- [GfxBlockElementModel](classes/GfxBlockElementModel.md)
- [GfxSelectionManager](classes/GfxSelectionManager.md)
## Interfaces
- [GfxCompatibleInterface](interfaces/GfxCompatibleInterface.md)
- [GfxElementGeometry](interfaces/GfxElementGeometry.md)
- [GfxGroupCompatibleInterface](interfaces/GfxGroupCompatibleInterface.md)
- [PointTestOptions](interfaces/PointTestOptions.md)
## Type Aliases
- [GfxCommonBlockProps](type-aliases/GfxCommonBlockProps.md)
- [GfxCompatibleProps](type-aliases/GfxCompatibleProps.md)
## Variables
- [gfxGroupCompatibleSymbol](variables/gfxGroupCompatibleSymbol.md)
- [SURFACE\_TEXT\_UNIQ\_IDENTIFIER](variables/SURFACE_TEXT_UNIQ_IDENTIFIER.md)
- [SURFACE\_YMAP\_UNIQ\_IDENTIFIER](variables/SURFACE_YMAP_UNIQ_IDENTIFIER.md)
## Functions
- [canSafeAddToContainer](functions/canSafeAddToContainer.md)
- [compareLayer](functions/compareLayer.md)
- [convert](functions/convert.md)
- [derive](functions/derive.md)
- [generateKeyBetween](functions/generateKeyBetween.md)
- [generateKeyBetweenV2](functions/generateKeyBetweenV2.md)
- [generateNKeysBetween](functions/generateNKeysBetween.md)
- [getTopElements](functions/getTopElements.md)
- [GfxCompatible](functions/GfxCompatible.md)
- [isGfxGroupCompatibleModel](functions/isGfxGroupCompatibleModel.md)
- [local](functions/local.md)
- [observe](functions/observe.md)
- [watch](functions/watch.md)

View File

@@ -0,0 +1,147 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxBlockElementModel
# Class: GfxBlockElementModel\<Props\>
The graphic block model that can be rendered in the graphics mode.
All the graphic block model should extend this class.
You can use `GfxCompatibleBlockModel` to convert a BlockModel to a subclass that extends it.
## Extends
- `BlockModel`\<`Props`\>
## Type Parameters
### Props
`Props` *extends* [`GfxCompatibleProps`](../type-aliases/GfxCompatibleProps.md) = [`GfxCompatibleProps`](../type-aliases/GfxCompatibleProps.md)
## Implements
- [`GfxCompatibleInterface`](../interfaces/GfxCompatibleInterface.md)
## Properties
### responseExtension
> **responseExtension**: \[`number`, `number`\]
Defines the extension of the response area beyond the element's bounding box.
This tuple specifies the horizontal and vertical margins to be added to the element's [x, y, width, height].
The first value represents the horizontal extension (added to both left and right sides),
and the second value represents the vertical extension (added to both top and bottom sides).
The response area is computed as:
`[x - horizontal, y - vertical, width + 2 * horizontal, height + 2 * vertical]`.
Example:
- Bounding box: `[0, 0, 100, 100]`, `responseExtension: [10, 20]`
Resulting response area: `[-10, -20, 120, 140]`.
- `responseExtension: [0, 0]` keeps the response area equal to the bounding box.
#### Implementation of
[`GfxCompatibleInterface`](../interfaces/GfxCompatibleInterface.md).[`responseExtension`](../interfaces/GfxCompatibleInterface.md#responseextension)
## Accessors
### elementBound
#### Get Signature
> **get** **elementBound**(): `Bound`
The bound of the element without considering the response extension.
##### Returns
`Bound`
The bound of the element without considering the response extension.
#### Implementation of
[`GfxCompatibleInterface`](../interfaces/GfxCompatibleInterface.md).[`elementBound`](../interfaces/GfxCompatibleInterface.md#elementbound)
***
### lockedBySelf
#### Get Signature
> **get** **lockedBySelf**(): `undefined` \| `boolean`
Indicates whether the current block is explicitly locked by self.
For checking the lock status of the element, use `isLocked` instead.
For (un)locking the element, use `(un)lock` instead.
##### Returns
`undefined` \| `boolean`
#### Set Signature
> **set** **lockedBySelf**(`lockedBySelf`): `void`
Indicates whether the current block is explicitly locked by self.
For checking the lock status of the element, use `isLocked` instead.
For (un)locking the element, use `(un)lock` instead.
##### Parameters
###### lockedBySelf
`undefined` | `boolean`
##### Returns
`void`
Indicates whether the current block is explicitly locked by self.
For checking the lock status of the element, use `isLocked` instead.
For (un)locking the element, use `(un)lock` instead.
#### Implementation of
[`GfxCompatibleInterface`](../interfaces/GfxCompatibleInterface.md).[`lockedBySelf`](../interfaces/GfxCompatibleInterface.md#lockedbyself)
***
### responseBound
#### Get Signature
> **get** **responseBound**(): `Bound`
The bound of the element considering the response extension.
##### Returns
`Bound`
The bound of the element considering the response extension.
#### Implementation of
[`GfxCompatibleInterface`](../interfaces/GfxCompatibleInterface.md).[`responseBound`](../interfaces/GfxCompatibleInterface.md#responsebound)
## Methods
### isLocked()
> **isLocked**(): `boolean`
Check if the element is locked. It will check the lock status of the element and its ancestors.
#### Returns
`boolean`
#### Implementation of
[`GfxCompatibleInterface`](../interfaces/GfxCompatibleInterface.md).[`isLocked`](../interfaces/GfxCompatibleInterface.md#islocked)

View File

@@ -0,0 +1,68 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxSelectionManager
# Class: GfxSelectionManager
GfxSelectionManager is just a wrapper of std selection providing
convenient method and states in gfx
## Extends
- `GfxExtension`
## Methods
### has()
> **has**(`element`): `boolean`
check if the element is selected in local
#### Parameters
##### element
`string`
#### Returns
`boolean`
***
### hasRemote()
> **hasRemote**(`element`): `boolean`
check if element is selected by remote peers
#### Parameters
##### element
`string`
#### Returns
`boolean`
***
### toggle()
> **toggle**(`element`): `void`
Toggle the selection state of single element
#### Parameters
##### element
`string` | `GfxModel`
#### Returns
`void`

View File

@@ -0,0 +1,35 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxCompatible
# Function: GfxCompatible()
> **GfxCompatible**\<`Props`, `T`\>(`BlockModelSuperClass`): *typeof* [`GfxBlockElementModel`](../classes/GfxBlockElementModel.md)
Convert a BlockModel to a GfxBlockElementModel.
## Type Parameters
### Props
`Props` *extends* [`GfxCompatibleProps`](../type-aliases/GfxCompatibleProps.md)
### T
`T` *extends* `Constructor`\<`BlockModel`\<`Props`\>\> = `Constructor`\<`BlockModel`\<`Props`\>\>
## Parameters
### BlockModelSuperClass
`T`
The BlockModel class to be converted.
## Returns
*typeof* [`GfxBlockElementModel`](../classes/GfxBlockElementModel.md)
The returned class is a subclass of the GfxBlockElementModel class and the given BlockModelSuperClass.

View File

@@ -0,0 +1,25 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / canSafeAddToContainer
# Function: canSafeAddToContainer()
> **canSafeAddToContainer**(`container`, `element`): `boolean`
This checker is used to prevent circular reference, when adding a child element to a container.
## Parameters
### container
`GfxGroupModel`
### element
[`GfxCompatibleInterface`](../interfaces/GfxCompatibleInterface.md)
## Returns
`boolean`

View File

@@ -0,0 +1,26 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / compareLayer
# Function: compareLayer()
> **compareLayer**(`a`, `b`): `SortOrder`
A comparator function for sorting elements in the surface.
SortOrder.AFTER means a should be rendered after b and so on.
## Parameters
### a
`GfxModel` | `GfxLocalElementModel`
### b
`GfxModel` | `GfxLocalElementModel`
## Returns
`SortOrder`

View File

@@ -0,0 +1,49 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / convert
# Function: convert()
> **convert**\<`V`, `T`\>(`fn`): (`_`, `context`) => `ClassAccessorDecoratorResult`\<`T`, `V`\>
The convert decorator is used to convert the property value before it's
set to the Y map.
Note:
1. This decorator function will not execute in model initialization.
## Type Parameters
### V
`V`
### T
`T` *extends* `GfxPrimitiveElementModel`\<`BaseElementProps`\>
## Parameters
### fn
(`propValue`, `instance`) => `unknown`
## Returns
`Function`
### Parameters
#### \_
`unknown`
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`T`, `V`\>

View File

@@ -0,0 +1,54 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / derive
# Function: derive()
> **derive**\<`V`, `T`\>(`fn`): (`_`, `context`) => `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
The derive decorator is used to derive other properties' update when the
decorated property is updated through assignment in the local.
Note:
1. The first argument of the function is the new value of the decorated property
before the `convert` decorator is called.
2. The decorator function will execute after the decorated property has been updated.
3. The decorator function will not execute during model creation.
4. The decorator function will not execute if the decorated property is updated through
the Y map. That is to say, if other peers update the property will not trigger this decorator
## Type Parameters
### V
`V`
### T
`T` *extends* `GfxPrimitiveElementModel`\<`BaseElementProps`\>
## Parameters
### fn
(`propValue`, `instance`) => `Record`\<`string`, `unknown`\>
## Returns
`Function`
### Parameters
#### \_
`unknown`
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>

View File

@@ -0,0 +1,27 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / generateKeyBetween
# Function: generateKeyBetween()
> **generateKeyBetween**(`a`, `b`, `digits`?): `string`
## Parameters
### a
`undefined` | `null` | `string`
### b
`undefined` | `null` | `string`
### digits?
`string`
## Returns
`string`

View File

@@ -0,0 +1,28 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / generateKeyBetweenV2
# Function: generateKeyBetweenV2()
> **generateKeyBetweenV2**(`a`, `b`): `string`
generate a key between a and b, the result key is always satisfied with a < result < b.
the key always has a random suffix, so there is no need to worry about collision.
make sure a and b are generated by this function.
## Parameters
### a
`null` | `string`
### b
`null` | `string`
## Returns
`string`

View File

@@ -0,0 +1,39 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / generateNKeysBetween
# Function: generateNKeysBetween()
> **generateNKeysBetween**(`a`, `b`, `n`, `digits`?): `string`[]
same preconditions as generateKeysBetween.
n >= 0.
Returns an array of n distinct keys in sorted order.
If a and b are both null, returns [a0, a1, ...]
If one or the other is null, returns consecutive "integer"
keys. Otherwise, returns relatively short keys between
a and b.
## Parameters
### a
`undefined` | `null` | `string`
### b
`undefined` | `null` | `string`
### n
`number`
### digits?
`string`
## Returns
`string`[]

View File

@@ -0,0 +1,36 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / getTopElements
# Function: getTopElements()
> **getTopElements**(`elements`): `GfxModel`[]
Get the top elements from the list of elements, which are in some tree structures.
For example: a list `[G1, E1, G2, E2, E3, E4, G4, E5, E6]`,
and they are in the elements tree like:
```
G1 G4 E6
/ \ |
E1 G2 E5
/ \
E2 G3*
/ \
E3 E4
```
where the star symbol `*` denote it is not in the list.
The result should be `[G1, G4, E6]`
## Parameters
### elements
`GfxModel`[]
## Returns
`GfxModel`[]

View File

@@ -0,0 +1,21 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / isGfxGroupCompatibleModel
# Function: isGfxGroupCompatibleModel()
> **isGfxGroupCompatibleModel**(`elm`): `elm is GfxGroupModel`
Check if the element is a container element.
## Parameters
### elm
`unknown`
## Returns
`elm is GfxGroupModel`

View File

@@ -0,0 +1,42 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / local
# Function: local()
> **local**\<`V`, `T`\>(): (`_target`, `context`) => `ClassAccessorDecoratorResult`\<`T`, `V`\>
A decorator to mark the property as a local property.
The local property act like it is a field property, but it's not synced to the Y map.
Updating local property will also trigger the `elementUpdated` slot of the surface model
## Type Parameters
### V
`V`
### T
`T` *extends* `GfxPrimitiveElementModel`\<`BaseElementProps`\>
## Returns
`Function`
### Parameters
#### \_target
`ClassAccessorDecoratorTarget`\<`T`, `V`\>
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`T`, `V`\>

View File

@@ -0,0 +1,53 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / observe
# Function: observe()
> **observe**\<`V`, `E`, `T`\>(`fn`): (`_`, `context`) => `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
A decorator to observe the y type property.
You can think of it is just a decorator version of 'observe' method of Y.Array and Y.Map.
The observer function start to observe the property when the model is mounted. And it will
re-observe the property automatically when the value is altered.
## Type Parameters
### V
`V`
### E
`E` *extends* `YEvent`\<`any`\>
### T
`T` *extends* `GfxPrimitiveElementModel`\<`BaseElementProps`\>
## Parameters
### fn
`ObserveFn`\<`E`, `T`\>
## Returns
`Function`
### Parameters
#### \_
`unknown`
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>

View File

@@ -0,0 +1,46 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / watch
# Function: watch()
> **watch**\<`V`, `T`\>(`fn`): (`_`, `context`) => `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
The watch decorator is used to watch the property change of the element.
You can thinks of it as a decorator version of `elementUpdated` slot of the surface model.
## Type Parameters
### V
`V`
### T
`T` *extends* `GfxPrimitiveElementModel`\<`BaseElementProps`\>
## Parameters
### fn
`WatchFn`\<`T`\>
## Returns
`Function`
### Parameters
#### \_
`unknown`
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>

View File

@@ -0,0 +1,75 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxCompatibleInterface
# Interface: GfxCompatibleInterface
All the model that can be rendered in graphics mode should implement this interface.
## Extends
- `IBound`.[`GfxElementGeometry`](GfxElementGeometry.md)
## Extended by
- [`GfxGroupCompatibleInterface`](GfxGroupCompatibleInterface.md)
## Properties
### elementBound
> `readonly` **elementBound**: `Bound`
The bound of the element without considering the response extension.
***
### lockedBySelf?
> `optional` **lockedBySelf**: `boolean`
Indicates whether the current block is explicitly locked by self.
For checking the lock status of the element, use `isLocked` instead.
For (un)locking the element, use `(un)lock` instead.
***
### responseBound
> `readonly` **responseBound**: `Bound`
The bound of the element considering the response extension.
***
### responseExtension
> **responseExtension**: \[`number`, `number`\]
Defines the extension of the response area beyond the element's bounding box.
This tuple specifies the horizontal and vertical margins to be added to the element's bound.
The first value represents the horizontal extension (added to both left and right sides),
and the second value represents the vertical extension (added to both top and bottom sides).
The response area is computed as:
`[x - horizontal, y - vertical, w + 2 * horizontal, h + 2 * vertical]`.
Example:
- xywh: `[0, 0, 100, 100]`, `responseExtension: [10, 20]`
Resulting response area: `[-10, -20, 120, 140]`.
- `responseExtension: [0, 0]` keeps the response area equal to the bounding box.
## Methods
### isLocked()
> **isLocked**(): `boolean`
Check if the element is locked. It will check the lock status of the element and its ancestors.
#### Returns
`boolean`

View File

@@ -0,0 +1,14 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxElementGeometry
# Interface: GfxElementGeometry
The methods that a graphic element should implement.
It is already included in the `GfxCompatibleInterface` interface.
## Extended by
- [`GfxCompatibleInterface`](GfxCompatibleInterface.md)

View File

@@ -0,0 +1,110 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxGroupCompatibleInterface
# Interface: GfxGroupCompatibleInterface
GfxGroupCompatibleElement is a model that can contain other models.
It just like a group that in common graphic software.
## Extends
- [`GfxCompatibleInterface`](GfxCompatibleInterface.md)
## Properties
### childElements
> **childElements**: `GfxModel`[]
All child element models of this container.
Note that the `childElements` may not contains all the children in `childIds`,
because some children may not be loaded.
***
### childIds
> **childIds**: `string`[]
All child ids of this container.
***
### elementBound
> `readonly` **elementBound**: `Bound`
The bound of the element without considering the response extension.
#### Inherited from
[`GfxCompatibleInterface`](GfxCompatibleInterface.md).[`elementBound`](GfxCompatibleInterface.md#elementbound)
***
### lockedBySelf?
> `optional` **lockedBySelf**: `boolean`
Indicates whether the current block is explicitly locked by self.
For checking the lock status of the element, use `isLocked` instead.
For (un)locking the element, use `(un)lock` instead.
#### Inherited from
[`GfxCompatibleInterface`](GfxCompatibleInterface.md).[`lockedBySelf`](GfxCompatibleInterface.md#lockedbyself)
***
### responseBound
> `readonly` **responseBound**: `Bound`
The bound of the element considering the response extension.
#### Inherited from
[`GfxCompatibleInterface`](GfxCompatibleInterface.md).[`responseBound`](GfxCompatibleInterface.md#responsebound)
***
### responseExtension
> **responseExtension**: \[`number`, `number`\]
Defines the extension of the response area beyond the element's bounding box.
This tuple specifies the horizontal and vertical margins to be added to the element's bound.
The first value represents the horizontal extension (added to both left and right sides),
and the second value represents the vertical extension (added to both top and bottom sides).
The response area is computed as:
`[x - horizontal, y - vertical, w + 2 * horizontal, h + 2 * vertical]`.
Example:
- xywh: `[0, 0, 100, 100]`, `responseExtension: [10, 20]`
Resulting response area: `[-10, -20, 120, 140]`.
- `responseExtension: [0, 0]` keeps the response area equal to the bounding box.
#### Inherited from
[`GfxCompatibleInterface`](GfxCompatibleInterface.md).[`responseExtension`](GfxCompatibleInterface.md#responseextension)
## Methods
### isLocked()
> **isLocked**(): `boolean`
Check if the element is locked. It will check the lock status of the element and its ancestors.
#### Returns
`boolean`
#### Inherited from
[`GfxCompatibleInterface`](GfxCompatibleInterface.md).[`isLocked`](GfxCompatibleInterface.md#islocked)

View File

@@ -0,0 +1,54 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / PointTestOptions
# Interface: PointTestOptions
The options for the hit testing of a point.
## Properties
### hitThreshold?
> `optional` **hitThreshold**: `number`
The threshold of the hit test. The unit is pixel.
***
### ignoreTransparent?
> `optional` **ignoreTransparent**: `boolean`
If true, the transparent area of the element will be ignored during the point inclusion test.
Otherwise, the transparent area will be considered as filled area.
Default is true.
***
### responsePadding?
> `optional` **responsePadding**: \[`number`, `number`\]
The padding of the response area for each element when do the hit testing. The unit is pixel.
The first value is the padding for the x-axis, and the second value is the padding for the y-axis.
***
### useElementBound?
> `optional` **useElementBound**: `boolean`
If true, the element bound will be used for the hit testing.
By default, the response bound will be used.
***
### zoom?
> `optional` **zoom**: `number`
The zoom level of current view when do the hit testing.

View File

@@ -0,0 +1,22 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxCommonBlockProps
# Type Alias: GfxCommonBlockProps
> **GfxCommonBlockProps** = [`GfxCompatibleProps`](GfxCompatibleProps.md) & `object`
This type include the common props for the graphic block model.
You can use this type with Omit to define the props of a graphic block model.
## Type declaration
### rotate
> **rotate**: `number`
### scale
> **scale**: `number`

View File

@@ -0,0 +1,11 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxCompatibleProps
# Type Alias: GfxCompatibleProps
> **GfxCompatibleProps** = `object`
The props that a graphics block model should have.

View File

@@ -0,0 +1,11 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / SURFACE\_TEXT\_UNIQ\_IDENTIFIER
# Variable: SURFACE\_TEXT\_UNIQ\_IDENTIFIER
> `const` **SURFACE\_TEXT\_UNIQ\_IDENTIFIER**: `"affine:surface:text"` = `'affine:surface:text'`
Used for text field

View File

@@ -0,0 +1,11 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / SURFACE\_YMAP\_UNIQ\_IDENTIFIER
# Variable: SURFACE\_YMAP\_UNIQ\_IDENTIFIER
> `const` **SURFACE\_YMAP\_UNIQ\_IDENTIFIER**: `"affine:surface:ymap"` = `'affine:surface:ymap'`
Used for field that use Y.Map. E.g. group children field

View File

@@ -0,0 +1,11 @@
[**BlockSuite API Documentation**](../../../../README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / gfxGroupCompatibleSymbol
# Variable: gfxGroupCompatibleSymbol
> `const` **gfxGroupCompatibleSymbol**: *typeof* `gfxGroupCompatibleSymbol`
The symbol to mark a model as a container.