feat(editor): fragment extensions (#12066)
Closes: BS-3382 Closes: BS-3381 Closes: BS-3380 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced new view extensions for document title, frame panel, and outline fragments, enhancing modularity and extensibility. - **Refactor** - Updated export structure for fragments to support directory-based modules and added dedicated view module exports. - Replaced a centralized view extension with individual fragment-based view extensions for improved clarity. - **Chores** - Updated dependencies and TypeScript project references to ensure compatibility and maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
"dependencies": {
|
||||
"@blocksuite/affine-block-note": "workspace:*",
|
||||
"@blocksuite/affine-components": "workspace:*",
|
||||
"@blocksuite/affine-ext-loader": "workspace:*",
|
||||
"@blocksuite/affine-fragment-doc-title": "workspace:*",
|
||||
"@blocksuite/affine-model": "workspace:*",
|
||||
"@blocksuite/affine-rich-text": "workspace:*",
|
||||
@@ -32,7 +33,8 @@
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./effects": "./src/effects.ts"
|
||||
"./effects": "./src/effects.ts",
|
||||
"./view": "./src/view.ts"
|
||||
},
|
||||
"files": [
|
||||
"src",
|
||||
|
||||
12
blocksuite/affine/fragments/outline/src/view.ts
Normal file
12
blocksuite/affine/fragments/outline/src/view.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { ViewExtensionProvider } from '@blocksuite/affine-ext-loader';
|
||||
|
||||
import { effects } from './effects';
|
||||
|
||||
export class OutlineViewExtension extends ViewExtensionProvider {
|
||||
override name = 'affine-outline-fragment';
|
||||
|
||||
override effect() {
|
||||
super.effect();
|
||||
effects();
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
"references": [
|
||||
{ "path": "../../blocks/note" },
|
||||
{ "path": "../../components" },
|
||||
{ "path": "../../ext-loader" },
|
||||
{ "path": "../doc-title" },
|
||||
{ "path": "../../model" },
|
||||
{ "path": "../../rich-text" },
|
||||
|
||||
Reference in New Issue
Block a user