mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 03:19:52 +08:00
a828c74f87
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 -->
18 lines
635 B
TypeScript
18 lines
635 B
TypeScript
import { AdapterPanel, AFFINE_ADAPTER_PANEL } from './adapter-panel';
|
|
import {
|
|
AdapterPanelBody,
|
|
AFFINE_ADAPTER_PANEL_BODY,
|
|
} from './body/adapter-panel-body';
|
|
import { AdapterMenu, AFFINE_ADAPTER_MENU } from './header/adapter-menu';
|
|
import {
|
|
AdapterPanelHeader,
|
|
AFFINE_ADAPTER_PANEL_HEADER,
|
|
} from './header/adapter-panel-header';
|
|
|
|
export function effects() {
|
|
customElements.define(AFFINE_ADAPTER_PANEL, AdapterPanel);
|
|
customElements.define(AFFINE_ADAPTER_MENU, AdapterMenu);
|
|
customElements.define(AFFINE_ADAPTER_PANEL_HEADER, AdapterPanelHeader);
|
|
customElements.define(AFFINE_ADAPTER_PANEL_BODY, AdapterPanelBody);
|
|
}
|