Files
AFFiNE-Mirror/tsconfig.json
Saul-Mirone fe5f0f62ec feat(editor): rich text package (#10689)
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.
2025-03-07 04:08:47 +00:00

131 lines
5.2 KiB
JSON

{
"compilerOptions": {
// Strictness
"strict": true,
"verbatimModuleSyntax": true,
"exactOptionalPropertyTypes": false,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noPropertyAccessFromIndexSignature": false,
"noUncheckedIndexedAccess": false,
"skipLibCheck": true,
// Modules
"module": "ESNext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"typeRoots": ["./tools/@types", "./node_modules/@types"],
// Emit
"lib": ["ES2024"],
"target": "ES2024",
"useDefineForClassFields": false,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"importsNotUsedAsValues": "remove",
// Interop Constraints
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
// Composite
"composite": true,
// NOTE(@forehalo):
// We now "fully" resolve package exports by standard "exports" field in package.json
// but core's exports are lit bit complex, so we left it here and will fix it when repos reorganization is done
"paths": {
"@affine/core/*": ["./packages/frontend/core/src/*"]
}
},
"include": [],
"files": [],
"exclude": ["node_modules", "target", "dist", "lib"],
// NOTE(@forehalo):
// The references are generated by the cli, do not modify it manually
// COMMAND: `yarn affine init`
"references": [
{ "path": "./blocksuite/affine/all" },
{ "path": "./blocksuite/affine/block-attachment" },
{ "path": "./blocksuite/affine/block-bookmark" },
{ "path": "./blocksuite/affine/block-callout" },
{ "path": "./blocksuite/affine/block-code" },
{ "path": "./blocksuite/affine/block-data-view" },
{ "path": "./blocksuite/affine/block-database" },
{ "path": "./blocksuite/affine/block-divider" },
{ "path": "./blocksuite/affine/block-edgeless-text" },
{ "path": "./blocksuite/affine/block-embed" },
{ "path": "./blocksuite/affine/block-frame" },
{ "path": "./blocksuite/affine/block-image" },
{ "path": "./blocksuite/affine/block-latex" },
{ "path": "./blocksuite/affine/block-list" },
{ "path": "./blocksuite/affine/block-note" },
{ "path": "./blocksuite/affine/block-paragraph" },
{ "path": "./blocksuite/affine/block-root" },
{ "path": "./blocksuite/affine/block-surface" },
{ "path": "./blocksuite/affine/block-surface-ref" },
{ "path": "./blocksuite/affine/block-table" },
{ "path": "./blocksuite/affine/components" },
{ "path": "./blocksuite/affine/data-view" },
{ "path": "./blocksuite/affine/fragment-doc-title" },
{ "path": "./blocksuite/affine/fragment-frame-panel" },
{ "path": "./blocksuite/affine/fragment-outline" },
{ "path": "./blocksuite/affine/model" },
{ "path": "./blocksuite/affine/rich-text" },
{ "path": "./blocksuite/affine/shared" },
{ "path": "./blocksuite/affine/widget-drag-handle" },
{ "path": "./blocksuite/affine/widget-edgeless-auto-connect" },
{ "path": "./blocksuite/affine/widget-frame-title" },
{ "path": "./blocksuite/affine/widget-remote-selection" },
{ "path": "./blocksuite/affine/widget-scroll-anchoring" },
{ "path": "./blocksuite/affine/widget-slash-menu" },
{ "path": "./blocksuite/affine/widget-toolbar" },
{ "path": "./blocksuite/blocks" },
{ "path": "./blocksuite/framework/block-std" },
{ "path": "./blocksuite/framework/global" },
{ "path": "./blocksuite/framework/inline" },
{ "path": "./blocksuite/framework/store" },
{ "path": "./blocksuite/framework/sync" },
{ "path": "./blocksuite/integration-test" },
{ "path": "./blocksuite/playground" },
{ "path": "./blocksuite/tests-legacy" },
{ "path": "./packages/backend/native" },
{ "path": "./packages/backend/server" },
{ "path": "./packages/common/debug" },
{ "path": "./packages/common/env" },
{ "path": "./packages/common/error" },
{ "path": "./packages/common/infra" },
{ "path": "./packages/common/nbstore" },
{ "path": "./packages/frontend/admin" },
{ "path": "./packages/frontend/apps/android" },
{ "path": "./packages/frontend/apps/electron" },
{ "path": "./packages/frontend/apps/electron-renderer" },
{ "path": "./packages/frontend/apps/ios" },
{ "path": "./packages/frontend/apps/mobile" },
{ "path": "./packages/frontend/apps/web" },
{ "path": "./packages/frontend/component" },
{ "path": "./packages/frontend/core" },
{ "path": "./packages/frontend/electron-api" },
{ "path": "./packages/frontend/graphql" },
{ "path": "./packages/frontend/i18n" },
{ "path": "./packages/frontend/media-capture-playground" },
{ "path": "./packages/frontend/native" },
{ "path": "./packages/frontend/track" },
{ "path": "./tests/affine-cloud" },
{ "path": "./tests/affine-cloud-copilot" },
{ "path": "./tests/affine-desktop" },
{ "path": "./tests/affine-desktop-cloud" },
{ "path": "./tests/affine-local" },
{ "path": "./tests/affine-mobile" },
{ "path": "./tests/kit" },
{ "path": "./tools/cli" },
{ "path": "./tools/playstore-auto-bump" },
{ "path": "./tools/utils" }
]
}