mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
This PR performs a significant architectural refactoring by extracting rich text functionality into a dedicated package. Here are the key changes: 1. **New Package Creation** - Created a new package `@blocksuite/affine-rich-text` to house rich text related functionality - Moved rich text components, utilities, and types from `@blocksuite/affine-components` to this new package 2. **Dependency Updates** - Updated multiple block packages to include the new `@blocksuite/affine-rich-text` as a direct dependency: - block-callout - block-code - block-database - block-edgeless-text - block-embed - block-list - block-note - block-paragraph 3. **Import Path Updates** - Refactored all imports that previously referenced rich text functionality from `@blocksuite/affine-components/rich-text` to now use `@blocksuite/affine-rich-text` - Updated imports for components like: - DefaultInlineManagerExtension - RichText types and interfaces - Text manipulation utilities (focusTextModel, textKeymap, etc.) - Reference node components and providers 4. **Build Configuration Updates** - Added references to the new rich text package in the `tsconfig.json` files of all affected packages - Maintained workspace dependencies using the `workspace:*` version specifier The primary motivation appears to be: 1. Better separation of concerns by isolating rich text functionality 2. Improved maintainability through more modular package structure 3. Clearer dependencies between packages 4. Potential for better tree-shaking and bundle optimization This is primarily an architectural improvement that should make the codebase more maintainable and better organized.
50 lines
1.8 KiB
JSON
50 lines
1.8 KiB
JSON
{
|
|
"extends": "../tsconfig.json",
|
|
"compilerOptions": {
|
|
"rootDir": "./src",
|
|
"outDir": "./dist",
|
|
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
|
|
},
|
|
"include": ["./src"],
|
|
"references": [
|
|
{ "path": "../affine/block-attachment" },
|
|
{ "path": "../affine/block-bookmark" },
|
|
{ "path": "../affine/block-callout" },
|
|
{ "path": "../affine/block-code" },
|
|
{ "path": "../affine/block-data-view" },
|
|
{ "path": "../affine/block-database" },
|
|
{ "path": "../affine/block-divider" },
|
|
{ "path": "../affine/block-edgeless-text" },
|
|
{ "path": "../affine/block-embed" },
|
|
{ "path": "../affine/block-frame" },
|
|
{ "path": "../affine/block-image" },
|
|
{ "path": "../affine/block-latex" },
|
|
{ "path": "../affine/block-list" },
|
|
{ "path": "../affine/block-note" },
|
|
{ "path": "../affine/block-paragraph" },
|
|
{ "path": "../affine/block-root" },
|
|
{ "path": "../affine/block-surface" },
|
|
{ "path": "../affine/block-surface-ref" },
|
|
{ "path": "../affine/block-table" },
|
|
{ "path": "../affine/components" },
|
|
{ "path": "../affine/fragment-doc-title" },
|
|
{ "path": "../affine/fragment-frame-panel" },
|
|
{ "path": "../affine/fragment-outline" },
|
|
{ "path": "../affine/model" },
|
|
{ "path": "../affine/rich-text" },
|
|
{ "path": "../affine/shared" },
|
|
{ "path": "../affine/widget-drag-handle" },
|
|
{ "path": "../affine/widget-edgeless-auto-connect" },
|
|
{ "path": "../affine/widget-frame-title" },
|
|
{ "path": "../affine/widget-remote-selection" },
|
|
{ "path": "../affine/widget-scroll-anchoring" },
|
|
{ "path": "../affine/widget-slash-menu" },
|
|
{ "path": "../affine/widget-toolbar" },
|
|
{ "path": "../framework/block-std" },
|
|
{ "path": "../affine/data-view" },
|
|
{ "path": "../framework/global" },
|
|
{ "path": "../framework/inline" },
|
|
{ "path": "../framework/store" }
|
|
]
|
|
}
|