docs(editor): scaffolding docs generator (#10925)

This commit is contained in:
Saul-Mirone
2025-03-17 12:51:08 +00:00
parent 363c9799f3
commit 1d04438049
59 changed files with 2101 additions and 9 deletions

View File

@@ -0,0 +1,75 @@
[**@blocksuite/block-std**](../../../../@blocksuite/block-std/README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/block-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/block-std**](../../../../@blocksuite/block-std/README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/block-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/block-std**](../../../../@blocksuite/block-std/README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/block-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/block-std**](../../../../@blocksuite/block-std/README.md)
***
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/block-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.