feat(editor): add experimental feature adapter panel to AFFiNE canary (#12489)

Closes: [BS-2539](https://linear.app/affine-design/issue/BS-2539/为-affine-添加-ef,并且支持在-affine-预览对应的功能)

> [!warning]
> This feature is only available in the canary build and is intended for debugging purposes.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced an "Adapter Panel" feature with a new sidebar tab for previewing document content in multiple formats (Markdown, PlainText, HTML, Snapshot), controllable via a feature flag.
  - Added a fully integrated adapter panel component with reactive UI elements for selecting adapters, toggling HTML preview modes, and updating content.
  - Provided a customizable adapter panel for both main app and playground environments, supporting content transformation pipelines and export previews.
  - Enabled seamless toggling and live updating of adapter panel content through intuitive menus and controls.

- **Localization**
  - Added English translations and descriptive settings for the Adapter Panel feature.

- **Chores**
  - Added new package and workspace dependencies along with TypeScript project references to support the Adapter Panel modules and components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
donteatfriedrice
2025-05-23 14:08:12 +00:00
parent 2a80fbb993
commit a828c74f87
28 changed files with 970 additions and 308 deletions

View File

@@ -28,6 +28,7 @@ export const PackageList = [
'blocksuite/affine/components',
'blocksuite/affine/ext-loader',
'blocksuite/affine/foundation',
'blocksuite/affine/fragments/adapter-panel',
'blocksuite/affine/fragments/doc-title',
'blocksuite/affine/fragments/frame-panel',
'blocksuite/affine/fragments/outline',
@@ -475,6 +476,19 @@ export const PackageList = [
'blocksuite/framework/store',
],
},
{
location: 'blocksuite/affine/fragments/adapter-panel',
name: '@blocksuite/affine-fragment-adapter-panel',
workspaceDependencies: [
'blocksuite/affine/components',
'blocksuite/affine/ext-loader',
'blocksuite/affine/model',
'blocksuite/affine/shared',
'blocksuite/framework/global',
'blocksuite/framework/std',
'blocksuite/framework/store',
],
},
{
location: 'blocksuite/affine/fragments/doc-title',
name: '@blocksuite/affine-fragment-doc-title',
@@ -1475,6 +1489,7 @@ export type PackageName =
| '@blocksuite/data-view'
| '@blocksuite/affine-ext-loader'
| '@blocksuite/affine-foundation'
| '@blocksuite/affine-fragment-adapter-panel'
| '@blocksuite/affine-fragment-doc-title'
| '@blocksuite/affine-fragment-frame-panel'
| '@blocksuite/affine-fragment-outline'