snapshot of https://github.com/toeverything/AFFiNE.git (canary, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Build & Test / Analyze (javascript, blocksuite) (push) Failing after 3s
Build & Test / Rust test filter (push) Failing after 3s
Build & Test / E2E BlockSuite Test (2) (push) Failing after 3s
Build & Test / E2E BlockSuite Test (3) (push) Failing after 4s
Build & Test / E2E BlockSuite Test (4) (push) Failing after 3s
Build & Test / E2E BlockSuite Cross Browser Test (push) Failing after 3s
Build & Test / E2E Mobile Test (1) (push) Failing after 3s
Build & Test / E2E Mobile Test (2) (push) Failing after 3s
Build & Test / Build AFFiNE native (x86_64-unknown-linux-gnu) (push) Failing after 4s
Build & Test / Unit Test (1) (push) Has been skipped
Build & Test / Unit Test (2) (push) Has been skipped
Build & Test / Unit Test (3) (push) Has been skipped
Build & Test / Build Server native (push) Failing after 3s
Build & Test / Check Git Status (push) Has been skipped
Build & Test / Server Test (0, 4) (push) Has been skipped
Build & Test / Server Test (1, 4) (push) Has been skipped
Build & Test / Analyze (javascript, affine) (push) Failing after 3s
Build & Test / Analyze (typescript, affine) (push) Failing after 3s
Build & Test / Analyze (typescript, blocksuite) (push) Failing after 3s
Build & Test / Mobile native build filter (push) Failing after 3s
Build & Test / Check yarn binary (push) Failing after 3s
Build & Test / E2E BlockSuite Test (1) (push) Failing after 4s
Build & Test / E2E BlockSuite Test (5) (push) Failing after 3s
Build & Test / Unit Test (4) (push) Has been skipped
Build & Test / Unit Test (5) (push) Has been skipped
Build & Test / Native Unit Test (push) Has been skipped
Build & Test / Server Test (2, 4) (push) Has been skipped
Build & Test / Server Test (3, 4) (push) Has been skipped
Build & Test / Server Test with Elasticsearch (push) Has been skipped
Build & Test / Server Test with Embedded Search (push) Has been skipped
Build & Test / Server Test with Manticore Search (push) Has been skipped
Build & Test / Server E2E Test (push) Has been skipped
Build & Test / Cloud Desktop E2E Test (push) Has been skipped
Build & Test / Cloud E2E Test 1/2 (push) Has been skipped
Build & Test / Cloud E2E Test 2/2 (push) Has been skipped
Build & Test / Build @affine/electron renderer (push) Failing after 3s
Build & Test / Copilot test filter (push) Failing after 4s
Build & Test / Lint Rust (push) Has been skipped
Build & Test / Build Android app (push) Has been skipped
Build & Test / Test Android app (push) Has been skipped
Build & Test / Run native tests (push) Has been skipped
Build & Test / Server Copilot Api Test (push) Has been skipped
Build & Test / Frontend Copilot E2E Test (3, 5) (push) Has been skipped
Build & Test / Frontend Copilot E2E Test (4, 5) (push) Has been skipped
Build & Test / Frontend Copilot E2E Test (1, 5) (push) Has been skipped
Build & Test / Frontend Copilot E2E Test (2, 5) (push) Has been skipped
Build & Test / Frontend Copilot E2E Test (5, 5) (push) Has been skipped
Build & Test / Desktop Test (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true) (push) Has been cancelled
Build & Test / Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true) (push) Has been cancelled
Build & Test / 3, 2, 1 Launch (push) Has been cancelled
Build & Test / Lint (push) Has been cancelled
Build & Test / Typecheck (push) Has been cancelled
Build & Test / Build iOS app (push) Has been cancelled
Build & Test / Build AFFiNE native (aarch64-apple-darwin) (push) Has been cancelled
Build & Test / E2E Test (1) (push) Has been cancelled
Build & Test / E2E Test (2) (push) Has been cancelled
Build & Test / E2E Test (3) (push) Has been cancelled
Build & Test / E2E Test (4) (push) Has been cancelled
Build & Test / E2E Test (5) (push) Has been cancelled
Build & Test / Build AFFiNE native (x86_64-apple-darwin) (push) Has been cancelled
Build & Test / Build AFFiNE native (aarch64-pc-windows-msvc) (push) Has been cancelled
Build & Test / Build AFFiNE native (x86_64-pc-windows-msvc) (push) Has been cancelled
Build & Test / Desktop Test (macos-latest, macos, arm64, aarch64-apple-darwin, true) (push) Has been cancelled
Build & Test / Desktop Test (macos-latest, macos, x64, x86_64-apple-darwin, false) (push) Has been cancelled

This commit is contained in:
upstream-mirror
2026-09-16 00:31:07 +05:00
commit 50f788e799
7907 changed files with 988785 additions and 0 deletions

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**(): `boolean` \| `undefined`
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
`boolean` \| `undefined`
#### 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
`boolean` \| `undefined`
##### 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,64 @@
[**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
## 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`