feat(editor): implement view extension manager with builder pattern (#12193)

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

- **Refactor**
  - Streamlined and modularized the configuration of editor and theme extensions, introducing a chainable API for extension management.
  - Migrated extension setup to use new provider classes and centralized patch logic, improving maintainability and consistency.
  - Updated internal extension retrieval processes to use a more explicit, stepwise initialization sequence.
  - Removed legacy theme and editor config registration from common views and editor setups.
  - Removed direct patch registrations from editor views, consolidating them into extension providers.
  - Renamed classes and variables for clarity and consistency across the codebase.

- **New Features**
  - Added new extension providers for editor configuration, theme management, and edgeless block header customization, enabling more flexible and validated extension registration.
  - Introduced animated viewport focus and dynamic header rendering for edgeless notes and embedded synced documents.
  - Integrated reactive editor settings and toolbar configurations with workspace-aware base URL resolution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Saul-Mirone
2025-05-09 10:26:05 +00:00
parent 7b6e00d84a
commit 8704c98c7e
16 changed files with 521 additions and 313 deletions
@@ -56,7 +56,12 @@ export const EdgelessSnapshot = (props: Props) => {
const { editorSetting } = framework.get(EditorSettingService);
const extensions = useMemo(() => {
const manager = getViewManager(framework, false);
const manager = getViewManager()
.config.init()
.common(framework)
.theme(framework)
.database(framework)
.linkedDoc(framework).value;
return manager
.get('preview-edgeless')
.concat([ViewportElementExtension('.ref-viewport')]);